aboutsummaryrefslogtreecommitdiffstats
path: root/lib/MC
Commit message (Collapse)AuthorAgeFilesLines
* MCELF: Port EmitInstruction changes from MachO streamer. Patch by Roman Divacky.Benjamin Kramer2010-08-271-41/+46
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112260 91177308-0d34-0410-b5e6-96231b3b80d8
* MCELF: Always overwrite FixedValue.Benjamin Kramer2010-08-271-2/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112259 91177308-0d34-0410-b5e6-96231b3b80d8
* MCELF: Fix a thinko of mine.Benjamin Kramer2010-08-261-1/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112203 91177308-0d34-0410-b5e6-96231b3b80d8
* MCELF: Compensate for the addend on i386. Patch by Roman Divacky, with some ↵Benjamin Kramer2010-08-261-14/+7
| | | | | | cleanups. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112197 91177308-0d34-0410-b5e6-96231b3b80d8
* MCELF: Use precomputed symbol indices, patch by Roman Divacky.Benjamin Kramer2010-08-251-11/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112079 91177308-0d34-0410-b5e6-96231b3b80d8
* MC: Fix inconsistant naming in COFF object writer. Patch by Cameron Esfahani.Michael J. Spencer2010-08-251-3/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112076 91177308-0d34-0410-b5e6-96231b3b80d8
* Change the parsing of .loc back to allow the LineNumber field to be optional asKevin Enderby2010-08-241-7/+8
| | | | | | | it is with other assemblers. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111967 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix COFF x86-64 relocations. PR7960.Michael J. Spencer2010-08-241-42/+45
| | | | | | Multiple symbol reloc handling part of the patch by Cameron Esfahani. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111963 91177308-0d34-0410-b5e6-96231b3b80d8
* First bit of support for the dwarf .loc directive. This patch updates theKevin Enderby2010-08-242-19/+97
| | | | | | | | | | | needed parsing for the .loc directive and saves the current info from that into the context. The next patch will take the current loc info after an instruction is assembled and save that info into a vector for each section for use to build the line number tables. The patch after that will encode the info from those vectors into the output file as the dwarf line tables. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111956 91177308-0d34-0410-b5e6-96231b3b80d8
* MC/AsmParser: Change ParseExpression to use ParseIdentifier(), to supportDaniel Dunbar2010-08-241-5/+9
| | | | | | dollars in identifiers. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111946 91177308-0d34-0410-b5e6-96231b3b80d8
* MC/Parser: Accept leading dollar signs in identifiers.Daniel Dunbar2010-08-241-0/+24
| | | | | | | | - Implemented by manually splicing the tokens. If this turns out to be problematically platform specific, a more elegant solution would be to implement some context dependent lexing support. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111934 91177308-0d34-0410-b5e6-96231b3b80d8
* Relocate against parent if the symbol is not in section or it's a common ↵Benjamin Kramer2010-08-241-1/+2
| | | | | | symbol, from Roman Divacky. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111925 91177308-0d34-0410-b5e6-96231b3b80d8
* fix rdar://7997827 - Accept and ignore LL and ULL suffixes on integer literals.Chris Lattner2010-08-241-2/+26
| | | | | | | Also fix 0b010 syntax to actually work while we're at it :-) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111876 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix thinko. Having no tests is great ...Benjamin Kramer2010-08-231-4/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111848 91177308-0d34-0410-b5e6-96231b3b80d8
* Reduce code duplication.Benjamin Kramer2010-08-231-26/+10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111846 91177308-0d34-0410-b5e6-96231b3b80d8
* ELFObjectWriter: Run ComputeSymbolTable before recording relocations. This ↵Benjamin Kramer2010-08-231-85/+21
| | | | | | way we can use the information it has computed and don't have to recompute the same stuff over and over again. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111844 91177308-0d34-0410-b5e6-96231b3b80d8
* Add the symbol offset to the relocation value when we relocate against ↵Benjamin Kramer2010-08-231-2/+3
| | | | | | section. By Roman Divacky. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111824 91177308-0d34-0410-b5e6-96231b3b80d8
* Use the proper relocation section + cleanup, from Roman Divacky.Benjamin Kramer2010-08-231-3/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111819 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert part of my last commit. the mingw32 build bot doesn't seem to like it.Michael J. Spencer2010-08-231-1/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111793 91177308-0d34-0410-b5e6-96231b3b80d8
* Workaround broken jump tables on x86-64 COFF.Michael J. Spencer2010-08-231-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111792 91177308-0d34-0410-b5e6-96231b3b80d8
* MC: Add partial x86-64 support to COFF.Michael J. Spencer2010-08-211-17/+43
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111728 91177308-0d34-0410-b5e6-96231b3b80d8
* MCELF: Count the section orders properly. Patch by Roman Divacky.Benjamin Kramer2010-08-191-7/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111517 91177308-0d34-0410-b5e6-96231b3b80d8
* MC/ELF: Allow null values in virtual sections, ELF doesn't use specialDaniel Dunbar2010-08-181-1/+16
| | | | | | directives for putting contents in .bss, for example. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111376 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove dead code. Fixes a GCC warning.Benjamin Kramer2010-08-171-4/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111271 91177308-0d34-0410-b5e6-96231b3b80d8
* Sketch i386 relocations handling, from Roman Divacky.Benjamin Kramer2010-08-171-24/+45
| | | | | | | Hello world builds & runs now on i386/ELF with -integrated-as. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111264 91177308-0d34-0410-b5e6-96231b3b80d8
* Use the correct entry size for relocation entries, from Roman Divacky.Benjamin Kramer2010-08-171-2/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111259 91177308-0d34-0410-b5e6-96231b3b80d8
* Differentiate between RELA and REL relocations, from Roman Divacky.Benjamin Kramer2010-08-171-6/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111252 91177308-0d34-0410-b5e6-96231b3b80d8
* One baby step towards i386 ELF, from Roman Divacky.Benjamin Kramer2010-08-171-2/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111247 91177308-0d34-0410-b5e6-96231b3b80d8
* Try to silence a overeager GCC warning.Benjamin Kramer2010-08-171-0/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111214 91177308-0d34-0410-b5e6-96231b3b80d8
* A round of minor cleanups for ELFObjectWriter.Benjamin Kramer2010-08-171-29/+12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111213 91177308-0d34-0410-b5e6-96231b3b80d8
* Silence warnings and simplify code. Eliminate a 32/64 bit portability issue.Benjamin Kramer2010-08-161-4/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111201 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixes for generation of ELF relocations. Patch by Roman Divacky.Eli Friedman2010-08-161-6/+18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111183 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a few warnings in and detabify MCELFStreamer and ELFObjectWriter.Eli Friedman2010-08-162-17/+18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111175 91177308-0d34-0410-b5e6-96231b3b80d8
* Add ELF ObjectWriter and Streamer support.Matt Fleming2010-08-162-0/+1433
| | | | | | | | I forgot to add these files in commit 111172. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111174 91177308-0d34-0410-b5e6-96231b3b80d8
* Add ELF ObjectWriter and Streamer support.Matt Fleming2010-08-162-2/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111172 91177308-0d34-0410-b5e6-96231b3b80d8
* Layout helper function.Matt Fleming2010-08-161-0/+34
| | | | | | | | | | Introduce a helper method to add a section to the end of a layout. This will be used by the ELF ObjectWriter code to add the metadata sections (symbol table, etc) to the end of an object file. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111171 91177308-0d34-0410-b5e6-96231b3b80d8
* Record a symbol's size which is needed for ELF symbol tables.Matt Fleming2010-08-161-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111170 91177308-0d34-0410-b5e6-96231b3b80d8
* silence a vc2010 warning: " result of 32-bit shift implicitly converted toChris Lattner2010-08-161-1/+1
| | | | | | | 64 bits (was 64-bit shift intended?)", pointed out by 'nobled' on llvmdev git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111148 91177308-0d34-0410-b5e6-96231b3b80d8
* MC/AsmParser: Push the burdon of emitting diagnostics about unmatchedDaniel Dunbar2010-08-121-8/+2
| | | | | | instructions onto the target specific parser, which can do a better job. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110889 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-mc: Add -show-inst-operands, for dumping the parsed instruction ↵Daniel Dunbar2010-08-112-1/+16
| | | | | | representation before matching. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110791 91177308-0d34-0410-b5e6-96231b3b80d8
* MCAsmParser: Add dump() hook to MCParsedAsmOperand.Daniel Dunbar2010-08-111-4/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110790 91177308-0d34-0410-b5e6-96231b3b80d8
* MC/AsmParser: Fix a bug in macro argument parsing, which was droppingDaniel Dunbar2010-08-101-5/+7
| | | | | | parentheses from argument lists. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110692 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "MC/MachO: Fix possible null pointer dereference."Michael J. Spencer2010-08-101-1/+1
| | | | | | | | This reverts commit 110575. Target.isAbsolute() is true if SD would be null. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110683 91177308-0d34-0410-b5e6-96231b3b80d8
* Next bit of support for the dwarf .file directive. This patch takes theKevin Enderby2010-08-092-1/+161
| | | | | | | | | previously collected info from the .file directives and outputs the encoded bytes for it. For now this is only in the Mach-O streamer but at some point will move to a more generic place. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110617 91177308-0d34-0410-b5e6-96231b3b80d8
* MC/MachO: Fix possible null pointer dereference.Michael J. Spencer2010-08-091-1/+1
| | | | | | Discovered by Microsoft Visual Studio 2010 Code Analysis. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110575 91177308-0d34-0410-b5e6-96231b3b80d8
* MC: Fix symbol fragment offsets in COFF.Michael J. Spencer2010-08-031-1/+2
| | | | | | Patch by Cameron Esfahani! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110104 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "MC: Fix symbol fragment offsets in COFF."Michael J. Spencer2010-08-031-2/+1
| | | | | | | | This reverts commit r110100 Wrong path caps. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110103 91177308-0d34-0410-b5e6-96231b3b80d8
* MC: Add time travel support to COFF.Michael J. Spencer2010-08-031-0/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110101 91177308-0d34-0410-b5e6-96231b3b80d8
* MC: Fix symbol fragment offsets in COFF.Michael J. Spencer2010-08-031-1/+2
| | | | | | Patch by Cameron Esfahani! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110100 91177308-0d34-0410-b5e6-96231b3b80d8
* Silence some -Asserts uninitialized variable warnings.Daniel Dunbar2010-07-311-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109956 91177308-0d34-0410-b5e6-96231b3b80d8