summaryrefslogtreecommitdiff
path: root/lib/MC/MCStreamer.cpp
Commit message (Collapse)AuthorAge
* Twinify.Benjamin Kramer2011-11-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143811 91177308-0d34-0410-b5e6-96231b3b80d8
* Add an option to pad an uleb128 to MCObjectWriter and remove the uleb128 ↵Benjamin Kramer2011-11-05
| | | | | | | | encoding from the DWARF asm printer. As a side effect we now print dwarf ulebs with .ascii directives. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143809 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for a new extension to the .file directive:Nick Lewycky2011-10-17
| | | | | | | | | | | .file filenumber "directory" "filename" This removes one join+split of the directory+filename in MC internals. Because bitcode files have independent fields for directory and filenames in debug info, this patch may change the .o files written by existing .bc files. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142300 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach the MC to output code/data region marker labels in MachO and ELF ↵Owen Anderson2011-10-04
| | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141135 91177308-0d34-0410-b5e6-96231b3b80d8
* Initialize member variable.Benjamin Kramer2011-08-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138548 91177308-0d34-0410-b5e6-96231b3b80d8
* Some autoconf tests use module level inline asm to test compiler's handling ofEvan Cheng2011-08-24
| | | | | | | | | | | | | | | | | .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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138504 91177308-0d34-0410-b5e6-96231b3b80d8
* Assume .cfi_startproc is the first thing in a function. If the function isRafael Espindola2011-08-02
| | | | | | | | | externally visable, create a local symbol to use in the CFE. If not, use the function label itself. Fixes PR10420. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136716 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a method to set compact unwind encoding information in a frame.Bill Wendling2011-07-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135449 91177308-0d34-0410-b5e6-96231b3b80d8
* Move some parts of TargetAsmInfo down to MCAsmInfo. This is not the greatestEvan Cheng2011-07-15
| | | | | | | | solution but it is a small step towards removing the horror that is TargetAsmInfo. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135237 91177308-0d34-0410-b5e6-96231b3b80d8
* Make EmitIntValue() work properly on big-endian targets.Roman Divacky2011-06-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132715 91177308-0d34-0410-b5e6-96231b3b80d8
* Start keeping track of where the various unwind instructions are in the prolog.Charles Davis2011-05-27
| | | | | | | | Use them to calculate the offset inside the prolog. Emit this value when emitting the unwind codes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132177 91177308-0d34-0410-b5e6-96231b3b80d8
* My attempt at fixing the leak reported by the valgrind buildbots. Valgrind willCharles Davis2011-05-27
| | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132174 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix inverted conditional in SaveReg and SaveXMM. Err when the frame pointer isCharles Davis2011-05-27
| | | | | | | | already defined, and err when the PushMachFrame operation isn't the first operation (if specified at all). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132173 91177308-0d34-0410-b5e6-96231b3b80d8
* Test .seh_startchained and .seh_endchained parsing.Charles Davis2011-05-26
| | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132106 91177308-0d34-0410-b5e6-96231b3b80d8
* Test basic SEH directive-parsing functionality. Fix a latent bug exposed byCharles Davis2011-05-24
| | | | | | | this test. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132004 91177308-0d34-0410-b5e6-96231b3b80d8
* Add methods to parse the SEH directives to the COFFAsmParser. Implement someCharles Davis2011-05-22
| | | | | | | | of them, particularly the ones that don't take arguments. Also implement .seh_proc and .seh_handler. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131866 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement emission of all Win64 exception tables. Make the COFF streamer emitCharles Davis2011-05-22
| | | | | | | these tables. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131833 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't allow unaligned offsets and sizes in the Win64 EH directives.Charles Davis2011-05-22
| | | | | | | Also, fix threshold for 'Big' register saves. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131830 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't allow .seh_handler and .seh_handlerdata directives inside chainedCharles Davis2011-05-21
| | | | | | | unwind areas. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131795 91177308-0d34-0410-b5e6-96231b3b80d8
* A handler for a function in the Win64 EH scheme can be both an unwind handlerCharles Davis2011-05-21
| | | | | | | | | | and an exception handler. Handle that case. Also, add an 'Emitted' member to the MCWin64EHUnwindInfo struct. It will be needed later. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131791 91177308-0d34-0410-b5e6-96231b3b80d8
* Set the "LastFrameInst" field when streaming a .seh_setframe directive. ThisCharles Davis2011-05-21
| | | | | | | is needed for an upcoming patch. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131772 91177308-0d34-0410-b5e6-96231b3b80d8
* "Implement" the HandlerData Win64 EH method in the base MCStreamer.Charles Davis2011-05-20
| | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131734 91177308-0d34-0410-b5e6-96231b3b80d8
* Looks like OS X assemblers (including MC) don't likeRafael Espindola2011-05-19
| | | | | | | | | | foo: bar = foo .quad bar Avoid producing it. Fixes PR9951. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131687 91177308-0d34-0410-b5e6-96231b3b80d8
* Misc code refactorings:Rafael Espindola2011-05-19
| | | | | | | * Remove unnecessary arguments now that ForceExpAbs is a method. * Use ForceExpAbs in EmitAbsValue. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131683 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement the EndProlog Win64 EH method on the base MCStreamer.Charles Davis2011-05-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131679 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement the Win64 EH prolog instruction methods on the base MCStreamer.Charles Davis2011-05-19
| | | | | | | I had to change the API slightly to avoid overloading issues. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131666 91177308-0d34-0410-b5e6-96231b3b80d8
* Turns out GAS does have Win64 EH directives. (It also supports WinCE EH.) MakeCharles Davis2011-05-19
| | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131652 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement the StartChained and EndChained Win64 EH methods on MCStreamer.Charles Davis2011-05-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131629 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement the StartProc and EndProc Win64 EH methods on the base MCStreamer.Charles Davis2011-05-19
| | | | | | | Based largely on Rafael Espindola's work on CFI. Other methods soon to follow. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131623 91177308-0d34-0410-b5e6-96231b3b80d8
* Add some more Win64 EH directives:Charles Davis2011-05-18
| | | | | | | | | | | | | | - 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). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131572 91177308-0d34-0410-b5e6-96231b3b80d8
* While thinking about how to know where the functions' boundaries are forCharles Davis2011-05-18
| | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131522 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a method I forgot in the last commit. Don't worry, this one passedCharles Davis2011-05-16
| | | | | | | self-host :). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131421 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix copy-pasto.Charles Davis2011-05-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131384 91177308-0d34-0410-b5e6-96231b3b80d8
* Add stub methods to MCStreamer for emitting Win64 exception-handlingCharles Davis2011-05-15
| | | | | | | information. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131382 91177308-0d34-0410-b5e6-96231b3b80d8
* Add CFIStartSections to the asm printer. Add an assert that at leastRafael Espindola2011-05-10
| | | | | | one of the sections is created. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131124 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for producing .deubg_frame sections.Rafael Espindola2011-05-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131121 91177308-0d34-0410-b5e6-96231b3b80d8
* Factor some code into a new EmitFrames method.Rafael Espindola2011-05-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131119 91177308-0d34-0410-b5e6-96231b3b80d8
* Parsing and plumbing for .cfi_sections.Rafael Espindola2011-05-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131117 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify the handling of pcrel relocations on ELF. Now we do the right thingRafael Espindola2011-05-01
| | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130634 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement MCAsmStreamer::EmitDwarfAdvanceFrameAddr.Rafael Espindola2011-04-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130585 91177308-0d34-0410-b5e6-96231b3b80d8
* Mark the EH symbol global or weak if the corresponding function is.Rafael Espindola2011-04-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130397 91177308-0d34-0410-b5e6-96231b3b80d8
* Factor a bit of code to MCStreamer::EmitLabel. Keep track of the lastRafael Espindola2011-04-27
| | | | | | | | | | | | non private symbol. This will be use for handling foo: .cfi_startproc ... On OS X where we have to create a foo.eh symbol. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130305 91177308-0d34-0410-b5e6-96231b3b80d8
* Reduce clutter in asm output. Do not emit source location as comment for ↵Devang Patel2011-04-18
| | | | | | each instruction. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129715 91177308-0d34-0410-b5e6-96231b3b80d8
* Be consistent about being virtual and returning void in the cfi methods.Rafael Espindola2011-04-12
| | | | | | Implement the ones that were missing in the asm streamer. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129413 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove LastOffset from the asm parser.Rafael Espindola2011-04-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129378 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix the case of a .cfi_rel_offset before any .cfi_def_cfa_offset.Rafael Espindola2011-04-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129362 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement .cfi_same_value.Rafael Espindola2011-04-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129361 91177308-0d34-0410-b5e6-96231b3b80d8
* Preliminary support for ARM frame save directives emission via MI flags.Anton Korobeynikov2011-03-05
| | | | | | | This is just very first approximation how the stuff should be done (e.g. ARM-only for now). More to follow. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127101 91177308-0d34-0410-b5e6-96231b3b80d8
* Some first rudimentary support for ARM EHABI: print exception table in "text ↵Anton Korobeynikov2011-03-05
| | | | | | mode". git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127099 91177308-0d34-0410-b5e6-96231b3b80d8
* Use a vector of pairs to implement the section stack, not twoJoerg Sonnenberger2011-02-21
| | | | | | | independent vectors. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126099 91177308-0d34-0410-b5e6-96231b3b80d8