summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC
Commit message (Collapse)AuthorAgeFilesLines
...
* Asm parser range checking on .<size> <value> directives.Jim Grosbach2011-06-291-3/+9
| | | | | | | | | For example, ".byte 256" would previously assert() when emitting an object file. Now it generates a diagnostic that the literal value is out of range. rdar://9686950 llvm-svn: 134069
* Fix CMake build.NAKAMURA Takumi2011-06-291-0/+1
| | | | llvm-svn: 134055
* Sink SubtargetFeature and TargetInstrItineraries (renamed ↵Evan Cheng2011-06-291-0/+384
| | | | | | MCInstrItineraries) into MC. llvm-svn: 134049
* Refactor MachO relocation generaration into the Target directories.Jim Grosbach2011-06-241-985/+19
| | | | | | | | | Move the target-specific RecordRelocation logic out of the generic MC MachObjectWriter and into the target-specific object writers. This allows nuking quite a bit of target knowledge from the supposedly target-independent bits in lib/MC. llvm-svn: 133844
* tidy up whitespace.Jim Grosbach2011-06-241-1/+1
| | | | llvm-svn: 133815
* Fixup info for Thumb2 unconditional branch.Jim Grosbach2011-06-241-0/+1
| | | | | | rdar://9667872 llvm-svn: 133808
* Tidy up.Jim Grosbach2011-06-231-1/+1
| | | | llvm-svn: 133770
* Reinstate r133513 (reverted in r133700) with an additional fix for aJay Foad2011-06-231-4/+4
| | | | | | -Wshorten-64-to-32 warning in Instructions.h. llvm-svn: 133708
* Use a reference. Don't make a useless copy of the vector.Bill Wendling2011-06-231-1/+1
| | | | llvm-svn: 133707
* Formatting changes. No functionality change.Bill Wendling2011-06-231-32/+30
| | | | llvm-svn: 133706
* Revert r133513:Eric Christopher2011-06-231-4/+4
| | | | | | | | | "Reinstate r133435 and r133449 (reverted in r133499) now that the clang self-hosted build failure has been fixed (r133512)." Due to some additional warnings. llvm-svn: 133700
* Use the presence of the __compact_unwind section to indicate that a targetBill Wendling2011-06-231-1/+1
| | | | | | supports compact unwind info instead of having a separate flag indicating this. llvm-svn: 133685
* Some skeleton code to emit the compact unwind. If the information is unable toBill Wendling2011-06-231-1/+63
| | | | | | be emitted in a compact way, we then default to emitting a CIE and FDE. llvm-svn: 133676
* 80-column violations.Bill Wendling2011-06-231-12/+17
| | | | llvm-svn: 133668
* Move class methods out-of-line. This reduces the indentation, and is more inBill Wendling2011-06-221-1289/+1410
| | | | | | | line with LLVM's general coding style. No functionality change. llvm-svn: 133645
* Remove the subclassing. This will be moved to the ASM printer.Bill Wendling2011-06-201-379/+0
| | | | llvm-svn: 133473
* Directly print to a raw_ostream instead of printing to a buffer first.Benjamin Kramer2011-06-181-4/+1
| | | | llvm-svn: 133352
* MC: Allow .common as alias for .comm assembler directive. PR10116.Hans Wennborg2011-06-181-1/+1
| | | | llvm-svn: 133349
* * Override the "EmitBytes" function, since it can sneak values in that way.Bill Wendling2011-06-181-1/+18
| | | | | | * Make this used only if CFI is used. llvm-svn: 133319
* Remove false assertion.Bill Wendling2011-06-171-3/+1
| | | | llvm-svn: 133314
* Disable for another investigation.Bill Wendling2011-06-171-1/+2
| | | | llvm-svn: 133299
* Support only DwarfCFI or SjLj exception handling in LSDA decoder.Bill Wendling2011-06-171-1/+5
| | | | llvm-svn: 133297
* SjLj exception handling LSDA decoding support wasn't represented correctly. UseBill Wendling2011-06-171-17/+15
| | | | | | | the correct values, etc. In particular, the exception handling type is SjLj, not ARM. llvm-svn: 133296
* Disable to investigate ARM failure.Bill Wendling2011-06-171-1/+2
| | | | llvm-svn: 133293
* Use the verbose asm flag instead of a new flag for decoding the LSDA.Bill Wendling2011-06-171-2/+2
| | | | llvm-svn: 133292
* Add an option that allows one to "decode" the LSDA.Bill Wendling2011-06-171-3/+365
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The LSDA is a bit difficult for the non-initiated to read. Even with comments, it's not always clear what's going on. This wraps the ASM streamer in a class that retains the LSDA and then emits a human-readable description of what's going on in it. So instead of having to make sense of: Lexception1: .byte 255 .byte 155 .byte 168 .space 1 .byte 3 .byte 26 Lset0 = Ltmp7-Leh_func_begin1 .long Lset0 Lset1 = Ltmp812-Ltmp7 .long Lset1 Lset2 = Ltmp913-Leh_func_begin1 .long Lset2 .byte 3 Lset3 = Ltmp812-Leh_func_begin1 .long Lset3 Lset4 = Leh_func_end1-Ltmp812 .long Lset4 .long 0 .byte 0 .byte 1 .byte 0 .byte 2 .byte 125 .long __ZTIi@GOTPCREL+4 .long __ZTIPKc@GOTPCREL+4 you can read this instead: ## Exception Handling Table: Lexception1 ## @LPStart Encoding: omit ## @TType Encoding: indirect pcrel sdata4 ## @TType Base: 40 bytes ## @CallSite Encoding: udata4 ## @Action Table Size: 26 bytes ## Action 1: ## A throw between Ltmp7 and Ltmp812 jumps to Ltmp913 on an exception. ## For type(s): __ZTIi@GOTPCREL+4 __ZTIPKc@GOTPCREL+4 ## Action 2: ## A throw between Ltmp812 and Leh_func_end1 does not have a landing pad. llvm-svn: 133286
* Remove a useless copy of MCELFStreamer. Patch by Logan Chien!Benjamin Kramer2011-06-171-134/+0
| | | | llvm-svn: 133272
* Diagnostic for undefined assembler local symbols.Jim Grosbach2011-06-151-4/+29
| | | | | | | | | | | | | | | Re-apply 133010, with fixes for inline assembler. Original commit message: "When an assembler local symbol is used but not defined in a module, a Darwin assembler wants to issue a diagnostic to that effect." Added fix to only perform the check when finalizing, as otherwise we're not done and undefined symbols may simply not have been encountered yet. Passes "make check" and a self-host check on Darwin. llvm-svn: 133071
* Revert 133010. Self-hosted buildbot unhappy.Jim Grosbach2011-06-141-25/+4
| | | | | | | Apparently llvm itself generates undefined assembler local labels, causing self-hosting problems with this patch. Reverting until that's sorted out. llvm-svn: 133013
* Diagnostic for undefined assembler local symbols.Jim Grosbach2011-06-141-4/+25
| | | | | | | | | When an assembler local symbol is used but not defined in a module, a Darwin assembler wants to issue a diagnostic to that effect. rdar://9559714 llvm-svn: 133010
* Fix emission of PPC64 assembler on non-darwin platforms by splittingRoman Divacky2011-06-091-6/+8
| | | | | | | | VK_PPC_{HA,LO}16 into darwin and gas variants. Darwin wants {ha,lo}16(symbol) while gnu as wants symbol@{ha,l}. llvm-svn: 132802
* Remove an uneeded switch - Turns out reloc results are identical w/o the ↵Jason W Kim2011-06-091-12/+1
| | | | | | switch. (face+palm) llvm-svn: 132790
* Make EmitIntValue() work properly on big-endian targets.Roman Divacky2011-06-071-3/+6
| | | | llvm-svn: 132715
* Basic support for macros with explicit arguments.Rafael Espindola2011-06-052-39/+105
| | | | | | | | | | | We still don't handle * default values * :req * :vararg * \() llvm-svn: 132656
* Produce an undefined reference to _GLOBAL_OFFSET_TABLE_ if we have aRafael Espindola2011-06-051-0/+2
| | | | | | | | | | VK_GOTOFF reloc. This matches as' behavior, but it is not clear why the linker might need this, so I added a FIXME. I could test this by duplicating test/MC/ELF/got.s, but it doesn't look worthwhile. llvm-svn: 132655
* Add support for @GOTPTOFF in i386 mode.Nick Lewycky2011-06-041-0/+3
| | | | llvm-svn: 132643
* .cfi directive register parsing flexibility.Jim Grosbach2011-06-021-1/+1
| | | | | | | | | | Parsing a register name/number for .cfi directives can't assume that a register name starts with a '%' token. Be more flexible and check for a register number instead. Still unlikely to be perfect, but it allows us to parse both plain identifiers as register names and integers as register numbers, which is what we're wanting to support at this point. llvm-svn: 132466
* Don't hardcode the %reg format in the streamer.Rafael Espindola2011-06-022-8/+11
| | | | llvm-svn: 132451
* Add new -d option to tblgen. It writes a make(1)-style dependency file.Joerg Sonnenberger2011-06-011-1/+2
| | | | llvm-svn: 132395
* Use the dwarf->llvm mapping to print register names in the cfiRafael Espindola2011-05-301-5/+25
| | | | | | | | directives. Fixes PR9826. llvm-svn: 132317
* Add a parameter to the Win64 EH section getters to get a section with aCharles Davis2011-05-272-10/+40
| | | | | | | | | | suffix (e.g. .xdata$myfunc). The suffix part isn't implemented yet, but I'll get to it in the next patch. Fix up all callers of the affected functions. Make them pass said suffix to the function. llvm-svn: 132205
* Assorted fixes for Win64 EH unwind info emission:Charles Davis2011-05-271-16/+29
| | | | | | | | | | - Flip order of bitfields. This gets our output matching GAS. - Handle case where the end of the prolog wasn't specified. - If the resulting unwind info struct is less than 8 bytes, pad to 8 bytes. Add a test for the latter two. llvm-svn: 132188
* Start keeping track of where the various unwind instructions are in the prolog.Charles Davis2011-05-272-22/+39
| | | | | | | Use them to calculate the offset inside the prolog. Emit this value when emitting the unwind codes. llvm-svn: 132177
* Add missing break statements. Align UNWIND_INFO and RUNTIME_FUNCTION structsCharles Davis2011-05-271-0/+6
| | | | | | | | to 4 bytes. I'm surprised no one caught the missing break statements. llvm-svn: 132176
* My attempt at fixing the leak reported by the valgrind buildbots. Valgrind willCharles Davis2011-05-271-2/+4
| | | | | | | | still report leaks, but they're spurious now. Valgrind cannot peer into std::vector objects--or any dynamic array, for that matter--because it doesn't know how big the array is. llvm-svn: 132174
* Fix inverted conditional in SaveReg and SaveXMM. Err when the frame pointer isCharles Davis2011-05-271-3/+7
| | | | | | | already defined, and err when the PushMachFrame operation isn't the first operation (if specified at all). llvm-svn: 132173
* Test .seh_startchained and .seh_endchained parsing.Charles Davis2011-05-261-13/+13
| | | | | | | | | | | Rework how the MCWin64EHUnwindInfo instances are stored. Fix issues with chained unwind areas exposed by the test that were related to this. The ChainedParent field had the wrong address, because when the chained unwind info was added, the addresses shifted around. Now we store the pointers to the structures, which are now allocated from the MC heap. llvm-svn: 132106
* Add tests for .seh_setframe and .seh_handlerdata parsing. Fix issues withCharles Davis2011-05-252-2/+15
| | | | | | | | | | them. I had to add a special SwitchSectionNoChange method to MCStreamer just for .seh_handlerdata. If this isn't OK, please let me know, and I'll find some other way to fix .seh_handlerdata streaming. llvm-svn: 132084
* Add tests for .seh_savereg and .seh_savexmm parsing. Once again, fix theCharles Davis2011-05-251-6/+17
| | | | | | buggy methods that parse these directives. llvm-svn: 132045
* Add a test for .seh_pushframe parsing. Fix the bug exposed by it (and anotherCharles Davis2011-05-251-6/+9
| | | | | | one I found by inspection). llvm-svn: 132037
OpenPOWER on IntegriCloud