summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/MCAsmStreamer.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Now that they're implemented, make the Win64 EH MCAsmStreamer methods callCharles Davis2011-05-201-0/+26
| | | | | | super. llvm-svn: 131743
* Misc code refactorings:Rafael Espindola2011-05-191-1/+1
| | | | | | | * Remove unnecessary arguments now that ForceExpAbs is a method. * Use ForceExpAbs in EmitAbsValue. llvm-svn: 131683
* Implement the Win64 EH prolog instruction methods on the base MCStreamer.Charles Davis2011-05-191-10/+10
| | | | | | 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-21/+31
| | | | | | | | | 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
* Remove comments as Chris requested.Charles Davis2011-05-181-48/+12
| | | | llvm-svn: 131590
* Fix an obvious typo in r131572.Cameron Zwarich2011-05-181-2/+2
| | | | llvm-svn: 131579
* Add some more Win64 EH directives:Charles Davis2011-05-181-0/+36
| | | | | | | | | | | | | - 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
* Implement the Win64 EH directive methods for the assembly language streamer.Charles Davis2011-05-181-0/+77
| | | | | | | | | GAS has no such directives (not even mingw-w64 GAS has them), so I took creative license with their names in assembly. I prefixed them all with "w64_" to avoid namespace collisions, for example. If I discover that GAS has taken a different approach, I'll change ours to match. llvm-svn: 131525
* sets bit 0 of the function address of thumb function in .symtabRafael Espindola2011-05-161-1/+2
| | | | | | | | | | ("T is 1 if the target symbol S has type STT_FUNC and the symbol addresses a Thumb instruction ;it is 0 otherwise." from "ELF for the ARM Architecture" 4.7.1.2) Patch by Koan-Sin Tan! llvm-svn: 131406
* Add CFIStartSections to the asm printer. Add an assert that at leastRafael Espindola2011-05-101-0/+19
| | | | | | one of the sections is created. llvm-svn: 131124
* Factor some code into a new EmitFrames method.Rafael Espindola2011-05-101-2/+2
| | | | llvm-svn: 131119
* GCC uses a different encoding of pointers in the FDE when usingRafael Espindola2011-05-011-0/+3
| | | | | | -fno-dwarf2-cfi-asm. Implement the same behavior. llvm-svn: 130637
* Simplify the handling of pcrel relocations on ELF. Now we do the right thingRafael Espindola2011-05-011-3/+2
| | | | | | | | | | 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
* Revert the previous patch while I figure out how to make llvm-gccRafael Espindola2011-04-301-3/+0
| | | | | | less agressive about disabling cfi on linux :-( llvm-svn: 130626
* Enable CFI on OS X.Rafael Espindola2011-04-301-0/+3
| | | | | | | | | | | | | | | Currently the output should be almost identical to the one produced by CodeGen to make the transition easier. The only two differences I know of are: * Some files get an extra advance loc of size 0. This will be fixed when relaxations are enabled. * The optimization of declaring an EH symbol as an external variable is not implemented. This is a subset of adding the nounwind attribute, so we if really this at -O0 we should probably do it at the IL level. llvm-svn: 130623
* Implement MCAsmStreamer::EmitEHSymAttributes. Doing this in the asm streamerRafael Espindola2011-04-301-3/+31
| | | | | | | is a bit ugly, but doing it on the base MCStreamer would be redundant with the object streamer which does it using SD. llvm-svn: 130611
* Add all the plumbing needed for MC to expand cfi to the old tables inRafael Espindola2011-04-301-4/+44
| | | | | | | the final assembly. It is the same technique used when targeting assemblers that don't support .loc. llvm-svn: 130587
* Implement MCAsmStreamer::EmitDwarfAdvanceFrameAddr.Rafael Espindola2011-04-301-0/+11
| | | | llvm-svn: 130585
* Implement MCAsmStreamer::EmitCFIDefCfa.Rafael Espindola2011-04-291-1/+4
| | | | llvm-svn: 130543
* Hoist MCLineEntry construction AsmPrinter so that anyone who derives from ↵Devang Patel2011-04-291-3/+0
| | | | | | | | AsmPrinter can have line number entries. PR 9810 llvm-svn: 130518
* Factor a bit of code to MCStreamer::EmitLabel. Keep track of the lastRafael Espindola2011-04-271-3/+1
| | | | | | | | | | | | 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
* Remove unused argument.Rafael Espindola2011-04-211-6/+6
| | | | llvm-svn: 129955
* Reduce clutter in asm output. Do not emit source location as comment for ↵Devang Patel2011-04-181-3/+11
| | | | | | each instruction. llvm-svn: 129715
* Be consistent about being virtual and returning void in the cfi methods.Rafael Espindola2011-04-121-40/+64
| | | | | | Implement the ones that were missing in the asm streamer. llvm-svn: 129413
* Fix whitespace.NAKAMURA Takumi2011-03-271-2/+2
| | | | llvm-svn: 128370
* Preliminary support for ARM frame save directives emission via MI flags.Anton Korobeynikov2011-03-051-0/+34
| | | | | | | 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/+31
| | | | | | mode". llvm-svn: 127099
* Roll out r126425 and r126450 to see if it fixes the failures on the buildbots.Cameron Zwarich2011-02-251-6/+0
| | | | llvm-svn: 126488
* Enable DebugInfo support for COFF object files.Devang Patel2011-02-241-0/+6
| | | | | | Patch by Nathan Jeffords! llvm-svn: 126425
* Add support for pushsection and popsection. Patch by Joerg Sonnenberger.Rafael Espindola2011-02-161-12/+8
| | | | llvm-svn: 125629
* Use common style for .cfi directivesAnton Korobeynikov2011-01-141-7/+7
| | | | llvm-svn: 123472
* Add comment about Thumb2 fixup comments being completely bogus.Evan Cheng2011-01-131-1/+3
| | | | llvm-svn: 123411
* Relax an assertion. On archs like ARM, an immediate field may be scattered. ↵Evan Cheng2011-01-131-2/+6
| | | | | | So it's possible for some bits of every 8 bits to be encoded already, and the rest still needs to be fixed up. llvm-svn: 123403
* Add support for .cfi_lsda.Rafael Espindola2010-12-271-4/+4
| | | | llvm-svn: 122584
* Add support for the same encodings of the personality function that gnu asRafael Espindola2010-12-271-4/+5
| | | | | | supports. llvm-svn: 122577
* Add missing standard headers. Patch by Joerg Sonnenberger!Nick Lewycky2010-12-191-0/+1
| | | | llvm-svn: 122193
* MC: Move target specific fixup info descriptors to TargetAsmBackend instead ofDaniel Dunbar2010-12-161-2/+3
| | | | | | | the MCCodeEmitter, which seems like a better organization. - Also, cleaned up some magic constants while in the area. llvm-svn: 121953
* MC: Make TargetAsmBackend available to the AsmStreamer.Daniel Dunbar2010-12-161-7/+11
| | | | | | - Treaty talks on the non-proliferation of MC objects broke down. llvm-svn: 121949
* Fixed version of 121434 with no new memory leaks.Rafael Espindola2010-12-101-39/+24
| | | | llvm-svn: 121471
* Revert my previous patch to make the valgrind bots happy.Rafael Espindola2010-12-101-24/+39
| | | | llvm-svn: 121461
* Initial support for the cfi directives. This is just enough to getRafael Espindola2010-12-091-39/+24
| | | | | | | | | | | f: .cfi_startproc nop .cfi_endproc assembled (on ELF). llvm-svn: 121434
* Second try at making direct object emission produce the same resultsRafael Espindola2010-12-061-34/+0
| | | | | | | as llc + llvm-mc. This time ELF is not changed and I tested that llvm-gcc bootstrap on darwin10 using darwin9's assembler and linker. llvm-svn: 121006
* There are two reasons why we might want to useRafael Espindola2010-12-041-4/+31
| | | | | | | | | | | | | | | | foo = a - b .long foo instead of just .long a - b First, on darwin9 64 bits the assembler produces the wrong result. Second, if "a" is the end of the section all darwin assemblers (9, 10 and mc) will not consider a - b to be a constant but will if the dummy foo is created. Split how we handle these cases. The first one is something MC should take care of. The second one has to be handled by the caller. llvm-svn: 120889
* Next step: Only pad debug_line when the target is darwin. Add a FIXME to avoidRafael Espindola2010-12-041-2/+1
| | | | | | | | | | | doing that if the target is darwin10 or newer. This fixes *) Direct object emission was producing objects without the workaround on darwin9. *) Assembly printing was producing objects with the workaround on linux. llvm-svn: 120866
* Make EmitIntValue more efficient and more like what we do for leb128. TheRafael Espindola2010-12-031-0/+7
| | | | | | difference is much smaller (about 0.3s) but significant. llvm-svn: 120787
* Do with uleb the same trick we now do with dwarf line/address advances. ThisRafael Espindola2010-12-031-8/+2
| | | | | | avoids creating leb128 fragments and speeds up the test in PR8711 to 33s. llvm-svn: 120774
* Try to resolve symbol differences early, and if successful create a plainRafael Espindola2010-12-031-4/+12
| | | | | | | data fragment. This reduces the time to assemble the test in 8711 from 60s to 54s. llvm-svn: 120767
* It may not be an option to skip .debug_line if there are file reference in ↵Devang Patel2010-12-031-2/+2
| | | | | | already emitted debug info. So, for now, emit dummy line table entry to make older linker and assemblers happy. This is not a new behavior, original AsmPrinter emitted similar line table entries. llvm-svn: 120760
* Use set directive for StartMinusEndExpr.Devang Patel2010-12-021-2/+11
| | | | | | This is a fix for llvm-gcc-i386-darwin9 buildbot failure. llvm-svn: 120742
* If tehre are not any line entry then do not try to emit .debug_line section.Devang Patel2010-12-021-1/+1
| | | | llvm-svn: 120637
OpenPOWER on IntegriCloud