summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/MCStreamer.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Teach the MC to output code/data region marker labels in MachO and ELF ↵Owen Anderson2011-10-041-1/+86
| | | | | | modes. These are used by disassemblers to provide better disassembly, particularly on targets like ARM Thumb that like to intermingle data in the TEXT segment. llvm-svn: 141135
* Initialize member variable.Benjamin Kramer2011-08-251-1/+2
| | | | llvm-svn: 138548
* Some autoconf tests use module level inline asm to test compiler's handling ofEvan Cheng2011-08-241-2/+2
| | | | | | | | | | | | | | | | .cfi_startproc. e.g. libffi: $ cat confopt.c asm (".cfi_startproc\n\t.cfi_endproc"); int main () { return 0; } Teach MC / dwarf emission to handle these cfi directives which essentially create an empty frame. rdar://10017184 llvm-svn: 138504
* Assume .cfi_startproc is the first thing in a function. If the function isRafael Espindola2011-08-021-7/+14
| | | | | | | | | externally visable, create a local symbol to use in the CFE. If not, use the function label itself. Fixes PR10420. llvm-svn: 136716
* Add a method to set compact unwind encoding information in a frame.Bill Wendling2011-07-191-0/+6
| | | | llvm-svn: 135449
* Move some parts of TargetAsmInfo down to MCAsmInfo. This is not the greatestEvan Cheng2011-07-151-2/+1
| | | | | | | solution but it is a small step towards removing the horror that is TargetAsmInfo. llvm-svn: 135237
* Make EmitIntValue() work properly on big-endian targets.Roman Divacky2011-06-071-3/+6
| | | | llvm-svn: 132715
* Start keeping track of where the various unwind instructions are in the prolog.Charles Davis2011-05-271-6/+16
| | | | | | | Use them to calculate the offset inside the prolog. Emit this value when emitting the unwind codes. llvm-svn: 132177
* 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
* Test basic SEH directive-parsing functionality. Fix a latent bug exposed byCharles Davis2011-05-241-1/+2
| | | | | | this test. llvm-svn: 132004
* Add methods to parse the SEH directives to the COFFAsmParser. Implement someCharles Davis2011-05-221-1/+1
| | | | | | | of them, particularly the ones that don't take arguments. Also implement .seh_proc and .seh_handler. llvm-svn: 131866
* Implement emission of all Win64 exception tables. Make the COFF streamer emitCharles Davis2011-05-221-0/+7
| | | | | | these tables. llvm-svn: 131833
* Don't allow unaligned offsets and sizes in the Win64 EH directives.Charles Davis2011-05-221-2/+10
| | | | | | Also, fix threshold for 'Big' register saves. llvm-svn: 131830
* Don't allow .seh_handler and .seh_handlerdata directives inside chainedCharles Davis2011-05-211-0/+5
| | | | | | unwind areas. llvm-svn: 131795
* A handler for a function in the Win64 EH scheme can be both an unwind handlerCharles Davis2011-05-211-3/+5
| | | | | | | | | and an exception handler. Handle that case. Also, add an 'Emitted' member to the MCWin64EHUnwindInfo struct. It will be needed later. llvm-svn: 131791
* Set the "LastFrameInst" field when streaming a .seh_setframe directive. ThisCharles Davis2011-05-211-0/+1
| | | | | | is needed for an upcoming patch. llvm-svn: 131772
* "Implement" the HandlerData Win64 EH method in the base MCStreamer.Charles Davis2011-05-201-2/+1
| | | | | | | | There's really nothing to implement. All this really does is swap to a pseudo-section that later gets written to the unwind info struct. That needs to be implemented in the object streamers. llvm-svn: 131734
* Looks like OS X assemblers (including MC) don't likeRafael Espindola2011-05-191-1/+2
| | | | | | | | | | foo: bar = foo .quad bar Avoid producing it. Fixes PR9951. llvm-svn: 131687
* Misc code refactorings:Rafael Espindola2011-05-191-14/+8
| | | | | | | * Remove unnecessary arguments now that ForceExpAbs is a method. * Use ForceExpAbs in EmitAbsValue. llvm-svn: 131683
* Implement the EndProlog Win64 EH method on the base MCStreamer.Charles Davis2011-05-191-2/+4
| | | | llvm-svn: 131679
* Implement the Win64 EH prolog instruction methods on the base MCStreamer.Charles Davis2011-05-191-17/+33
| | | | | | I had to change the API slightly to avoid overloading issues. llvm-svn: 131666
* Turns out GAS does have Win64 EH directives. (It also supports WinCE EH.) MakeCharles Davis2011-05-191-22/+22
| | | | | | | | | ours compatible with GAS. In retrospect, I should have emailed binutils about this earlier. Thanks to Kai Tietz for pointing out that GAS already had SEH directives. llvm-svn: 131652
* Implement the StartChained and EndChained Win64 EH methods on MCStreamer.Charles Davis2011-05-191-13/+23
| | | | llvm-svn: 131629
* Implement the StartProc and EndProc Win64 EH methods on the base MCStreamer.Charles Davis2011-05-191-8/+29
| | | | | | Based largely on Rafael Espindola's work on CFI. Other methods soon to follow. llvm-svn: 131623
* Add some more Win64 EH directives:Charles Davis2011-05-181-0/+24
| | | | | | | | | | | | | - StartChained and EndChained delimit a chained unwind area, which can contain additional operations to be undone if an exception occurs inside of it. - UnwindOnly declares that this function doesn't handle any exceptions. If it has a handler, it's an unwind handler instead of an exception handler. - Lsda declares the location and size of the LSDA, which in the Win64 EH scheme is kept inside the UNWIND_INFO struct. Windows itself ignores the LSDA; it's used by the Language-Specific Handler (the "Personality Function" from DWARF). llvm-svn: 131572
* While thinking about how to know where the functions' boundaries are forCharles Davis2011-05-181-2/+8
| | | | | | | | | the purposes of the Win64 EH tables, I realized we had no way to tell where the function ends. (MASM bounds functions with PROC and ENDP keywords.) Add a directive to delimit the end of the function, and rename the 'frame' directive to more accurately reflect its duality with the new directive. llvm-svn: 131522
* Add a method I forgot in the last commit. Don't worry, this one passedCharles Davis2011-05-161-0/+6
| | | | | | self-host :). llvm-svn: 131421
* Fix copy-pasto.Charles Davis2011-05-151-1/+1
| | | | llvm-svn: 131384
* Add stub methods to MCStreamer for emitting Win64 exception-handlingCharles Davis2011-05-151-0/+36
| | | | | | information. llvm-svn: 131382
* Add CFIStartSections to the asm printer. Add an assert that at leastRafael Espindola2011-05-101-0/+1
| | | | | | one of the sections is created. llvm-svn: 131124
* Add support for producing .deubg_frame sections.Rafael Espindola2011-05-101-1/+4
| | | | llvm-svn: 131121
* Factor some code into a new EmitFrames method.Rafael Espindola2011-05-101-0/+8
| | | | llvm-svn: 131119
* Parsing and plumbing for .cfi_sections.Rafael Espindola2011-05-101-1/+7
| | | | llvm-svn: 131117
* Simplify the handling of pcrel relocations on ELF. Now we do the right thingRafael Espindola2011-05-011-18/+3
| | | | | | | | | | for all symbol differences and can drop the old EmitPCRelSymbolValue method. This also make getExprForFDESymbol on ELF equal to the one on MachO, and it can be made non-virtual. llvm-svn: 130634
* Implement MCAsmStreamer::EmitDwarfAdvanceFrameAddr.Rafael Espindola2011-04-301-0/+23
| | | | llvm-svn: 130585
* Mark the EH symbol global or weak if the corresponding function is.Rafael Espindola2011-04-281-0/+4
| | | | llvm-svn: 130397
* Factor a bit of code to MCStreamer::EmitLabel. Keep track of the lastRafael Espindola2011-04-271-0/+12
| | | | | | | | | | | | non private symbol. This will be use for handling foo: .cfi_startproc ... On OS X where we have to create a foo.eh symbol. llvm-svn: 130305
* Reduce clutter in asm output. Do not emit source location as comment for ↵Devang Patel2011-04-181-1/+2
| | | | | | each instruction. llvm-svn: 129715
* Be consistent about being virtual and returning void in the cfi methods.Rafael Espindola2011-04-121-23/+11
| | | | | | Implement the ones that were missing in the asm streamer. llvm-svn: 129413
* Remove LastOffset from the asm parser.Rafael Espindola2011-04-121-0/+11
| | | | llvm-svn: 129378
* Fix the case of a .cfi_rel_offset before any .cfi_def_cfa_offset.Rafael Espindola2011-04-121-0/+11
| | | | llvm-svn: 129362
* Implement .cfi_same_value.Rafael Espindola2011-04-121-0/+9
| | | | llvm-svn: 129361
* Preliminary support for ARM frame save directives emission via MI flags.Anton Korobeynikov2011-03-051-0/+15
| | | | | | | This is just very first approximation how the stuff should be done (e.g. ARM-only for now). More to follow. llvm-svn: 127101
* Some first rudimentary support for ARM EHABI: print exception table in "text ↵Anton Korobeynikov2011-03-051-0/+25
| | | | | | mode". llvm-svn: 127099
* Use a vector of pairs to implement the section stack, not twoJoerg Sonnenberger2011-02-211-2/+2
| | | | | | independent vectors. llvm-svn: 126099
* Add support for pushsection and popsection. Patch by Joerg Sonnenberger.Rafael Espindola2011-02-161-2/+3
| | | | llvm-svn: 125629
* Remove second return.Rafael Espindola2010-12-291-1/+0
| | | | llvm-svn: 122616
* Implement cfi_def_cfa. Also don't convert to dwarf reg numbers twice. LooksRafael Espindola2010-12-291-0/+12
| | | | | | like 6 is a fixed point of that and so the previous tests were OK :-) llvm-svn: 122614
OpenPOWER on IntegriCloud