summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC
Commit message (Collapse)AuthorAgeFilesLines
* 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
* 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
* Handle PrivateExtern eh symbols.Rafael Espindola2011-04-301-0/+2
| | | | llvm-svn: 130609
* 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-303-22/+34
| | | | llvm-svn: 130585
* Avoid some uses of .uleb128. This is a small speedup and more importantlyRafael Espindola2011-04-291-17/+22
| | | | | | | lets this code be used when producing assembly code for old assemblers without uleb support. llvm-svn: 130544
* Implement MCAsmStreamer::EmitCFIDefCfa.Rafael Espindola2011-04-291-1/+4
| | | | llvm-svn: 130543
* MCAsmLayout: Add support for computing the symbol offset of variables. NotDaniel Dunbar2011-04-291-0/+27
| | | | | | currently used, because variables don't get reported as being "defined". llvm-svn: 130524
* MC: Change variable symbols to be recognized as defined, by assigning their ↵Daniel Dunbar2011-04-291-3/+7
| | | | | | sections based on FindAssociatedSection(). llvm-svn: 130523
* MC/Mach-O: Update getSymbolAddress() to support evaluation of variables.Daniel Dunbar2011-04-291-0/+27
| | | | llvm-svn: 130522
* MC/Mach-O: Allow emission of relocations for variables in some more cases.Daniel Dunbar2011-04-291-19/+19
| | | | llvm-svn: 130520
* MC/Mach-O: Find section ordinal's by looking at the symbol, instead of ↵Daniel Dunbar2011-04-291-4/+8
| | | | | | assuming they are present in a fragment. llvm-svn: 130519
* 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
* MCExpr: Add FindAssociatedSection, which attempts to mirror the 'as' semanticsDaniel Dunbar2011-04-291-0/+42
| | | | | | that associate sections with expressions. llvm-svn: 130517
* MC/AsmParser: Generalize a check.Daniel Dunbar2011-04-291-1/+1
| | | | llvm-svn: 130515
* Last bit by bit compatibility patch to MCDwarf.cpp: If a FDE with no LSDA isRafael Espindola2011-04-291-5/+20
| | | | | | assigned to a CIE that requires one, just output a 0. llvm-svn: 130472
* Add an alternative implementation of CIE and FDE emission that outputs themRafael Espindola2011-04-291-0/+58
| | | | | | in the same order as the one in CodeGen. llvm-svn: 130471
* Add the getExprForFDESymbol method that responsible for computing theRafael Espindola2011-04-283-14/+17
| | | | | | expressions used in the FDE to refer to symbols. llvm-svn: 130437
* Add a getExprForPersonalitySymbol method to MCAsmInfo. Use it whenRafael Espindola2011-04-283-1/+35
| | | | | | converting the symbol passed to .cfi_personality into bytes is the file. llvm-svn: 130400
* Mark the EH symbol global or weak if the corresponding function is.Rafael Espindola2011-04-283-0/+17
| | | | llvm-svn: 130397
* Add a small temporary hack for producing identical eh_frame sections on OS X.Rafael Espindola2011-04-282-6/+14
| | | | | | | This removes one of the main advantages of moving eh_frame to MC, but makes the transition a lot easier to debug (run md5). llvm-svn: 130379
OpenPOWER on IntegriCloud