summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC
Commit message (Collapse)AuthorAgeFilesLines
...
* No reason not to allow defining the CFA as a reg w/ offset zero.Jim Grosbach2011-05-201-2/+0
| | | | llvm-svn: 131760
* Add missing leading \t when printing .cfi_def_cfa in the asmstreamer.Jim Grosbach2011-05-201-1/+1
| | | | llvm-svn: 131755
* fixes target address tBL and tBLX and sets relocation typeRafael Espindola2011-05-201-0/+11
| | | | | | | | of tBL/tBLX to R_ARM_THM_CALL (ARM ELF 4.7.1.6) Patch by koan-sin tan. llvm-svn: 131748
* Now that they're implemented, make the Win64 EH MCAsmStreamer methods callCharles Davis2011-05-201-0/+26
| | | | | | super. llvm-svn: 131743
* "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-193-19/+13
| | | | | | | * 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-192-27/+43
| | | | | | I had to change the API slightly to avoid overloading issues. llvm-svn: 131666
* Reapply 131644 including the missing header changes:Joerg Sonnenberger2011-05-192-8/+14
| | | | | | Introduce -fatal-assembler-warnings for the obvious purpose llvm-svn: 131655
* Revert r131644; it's breaking the build.Eli Friedman2011-05-192-14/+8
| | | | llvm-svn: 131653
* Turns out GAS does have Win64 EH directives. (It also supports WinCE EH.) MakeCharles Davis2011-05-192-43/+53
| | | | | | | | | 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
* Introduce -fatal-assembler-warnings for the obvious purposeJoerg Sonnenberger2011-05-192-8/+14
| | | | llvm-svn: 131644
* 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
* 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-182-0/+60
| | | | | | | | | | | | | - 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
* 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
* Add a FIXME reminder to remove ForceARMElfPIC switch.Jason W Kim2011-05-161-0/+4
| | | | llvm-svn: 131411
* sets bit 0 of the function address of thumb function in .symtabRafael Espindola2011-05-164-5/+16
| | | | | | | | | | ("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
* 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
* Remove an unused variable and move a couple others inside DEBUG.Matt Beaumont-Gay2011-05-111-6/+6
| | | | llvm-svn: 131208
* Address the last bit of relocation flag related divergence betweeenJason W Kim2011-05-112-25/+120
| | | | | | | | | | | | | | | | | | | | | | | | | | | | LLVM and binutils. With this patch, there are no functional differences between the .o produced directly from LLVM versus the .s to .o via GNU as, for relocation tags at least, for both PIC and non-PIC modes. Because some non-PIC reloc tags are used (legally) on PIC, so IsPCRel flag is necessary but not sufficient to determine whether the overall codegen mode is PIC or not. Why is this necessary? There is an incompatibility of how relocs are emitted in the .rodata section. Binutils PIC likes to emit certain relocs as section relative offsets. Non-PIC does not do this. So I added a hidden switch on the ELFObjectwriter "-arm-elf-force-pic" which forces the objectwriter to pretend that all relocs are for PIC mode. Todo: Activate ForceARMElfPIC to true if -relocation-model=pic is selected on llc. Todo: There are probably more issues for PIC mode on ARM/MC/ELF... Todo: Existing tests in MC/ARM/elf-reloc*.ll need to be converted over to .s tests as well as expanded to cover the gamut. llvm-svn: 131205
* Avoid a gcc warning.Rafael Espindola2011-05-101-1/+2
| | | | llvm-svn: 131161
* On MachO, unlike ELF, there should be no relocation to produce the CIE pointer.Rafael Espindola2011-05-101-8/+17
| | | | llvm-svn: 131149
* Rename DwarfRequiresRelocationForStmtList toRafael Espindola2011-05-102-2/+2
| | | | | | DwarfRequiresRelocationForSectionOffset as this is not specific to StmtList. llvm-svn: 131148
* The EH symbols are only needed in eh_frame, not debug_frame.Rafael Espindola2011-05-101-2/+2
| | | | llvm-svn: 131146
* In a debug_frame the cfi offset is to the start of the debug_frame section!Rafael Espindola2011-05-101-3/+7
| | | | llvm-svn: 131129
* Add CFIStartSections to the asm printer. Add an assert that at leastRafael Espindola2011-05-102-0/+20
| | | | | | one of the sections is created. llvm-svn: 131124
* Add support for producing .deubg_frame sections.Rafael Espindola2011-05-102-46/+63
| | | | llvm-svn: 131121
* Small cleanups.Rafael Espindola2011-05-101-8/+5
| | | | llvm-svn: 131120
* Factor some code into a new EmitFrames method.Rafael Espindola2011-05-104-6/+12
| | | | llvm-svn: 131119
* Remove unused argument.Rafael Espindola2011-05-101-12/+4
| | | | llvm-svn: 131118
* Parsing and plumbing for .cfi_sections.Rafael Espindola2011-05-102-1/+43
| | | | llvm-svn: 131117
* Eliminate an unused line to fix a warning.NAKAMURA Takumi2011-05-081-1/+0
| | | | llvm-svn: 131078
* Don't force relaxation of AdvanceLoc instructions on OS X. gdb is happy withRafael Espindola2011-05-082-13/+6
| | | | | | | the smaller encoding and this cuts 270336 bytes from a release version of clang and 1246272 bytes from a debug build. llvm-svn: 131067
* Switch Darwin to the generic CIE/FDE printer.Rafael Espindola2011-05-061-64/+0
| | | | llvm-svn: 131031
* Dead code elimination.Rafael Espindola2011-05-061-1/+0
| | | | llvm-svn: 130984
* Don't produce a __debug_frame.Rafael Espindola2011-05-051-1/+1
| | | | | | | I tested both gdb on a bootstrapped clang and and the gdb testsuite on OS X (snow leopard) and both are happy using __eh_frame. llvm-svn: 130937
* Producing a DW_FORM_addr for DW_AT_stmt_list is probably correct, butRafael Espindola2011-05-042-2/+2
| | | | | | | | | | | it is both inefficient and unexpected by dwarfdump. Change to a DW_FORM_data4. While in here, change the predicate name to reflect that the position is not really absolute (it is an offset), just that the linker needs a relocation. llvm-svn: 130846
* MCDwarf: Don't save Twine to local variable, this is almost never safe to doDaniel Dunbar2011-05-031-2/+2
| | | | | | | (and should thus never be done). - Should fix a crash on win32. llvm-svn: 130793
* Add r130623 back now that ELF has been fixed to work with -fno-dwarf2-cfi-asm.Rafael Espindola2011-05-011-0/+3
| | | | llvm-svn: 130658
* GCC uses a different encoding of pointers in the FDE when usingRafael Espindola2011-05-013-9/+16
| | | | | | -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-019-51/+35
| | | | | | | | | | 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-302-6/+0
| | | | | | less agressive about disabling cfi on linux :-( llvm-svn: 130626
* Enable CFI on OS X.Rafael Espindola2011-04-302-0/+6
| | | | | | | | | | | | | | | 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
OpenPOWER on IntegriCloud