summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC
Commit message (Collapse)AuthorAgeFilesLines
* MC/Mach-O: Introduce Object/MachOFormat for describing purely platform / machineDaniel Dunbar2010-11-271-38/+24
| | | | | | | independent information on the Mach object format, and move some stuff from MachObjectWriter.cpp there. llvm-svn: 120186
* Remove the unused TheTarget member.Rafael Espindola2010-11-261-3/+2
| | | | llvm-svn: 120168
* Fix Whitespace.Michael J. Spencer2010-11-261-14/+14
| | | | llvm-svn: 120166
* Factor some code to parseSectionFlags and fix the default type of a section.Rafael Espindola2010-11-251-49/+58
| | | | llvm-svn: 120145
* Behave a bit more like gnu as and use the symbol (instead of the section)Rafael Espindola2010-11-242-6/+18
| | | | | | for any relocation to a symbol defined in a tls section. llvm-svn: 120121
* Relocate with the symbol if the relocation is of kind NTPOFF.Rafael Espindola2010-11-241-1/+2
| | | | | | Patch by David Meyer, I added the test. llvm-svn: 120104
* Fix and add tests for all cases in x86 and x86_64 where gnu as implicitlyRafael Espindola2010-11-241-5/+13
| | | | | | sets the type of a symbol to STT_TLS. llvm-svn: 120100
* If a symbol is used as tls, mark it as tls even if not declare as so. ProbablyRafael Espindola2010-11-241-0/+40
| | | | | | fixes PR8659. llvm-svn: 120076
* Invalidate the layout on any relaxation, not just Instructions. Bug found by ↵Rafael Espindola2010-11-231-9/+11
| | | | | | | | David Meyer. While here, remove unused argument and rename UpdateForSlide to Invalidate. llvm-svn: 120009
* Reuse data fragments while lowering. Patch by David Meyer.Rafael Espindola2010-11-231-26/+77
| | | | llvm-svn: 119999
* Fixed some style issues (no _, no spc after !)Jason W Kim2010-11-221-6/+6
| | | | llvm-svn: 119986
* Make the <ARCH>ELFObjectWriter statics privateJason W Kim2010-11-221-0/+3
| | | | llvm-svn: 119982
* Fix misplaced statics.Jason W Kim2010-11-221-6/+5
| | | | llvm-svn: 119981
* Kill trailing whitespaceJason W Kim2010-11-221-3/+3
| | | | llvm-svn: 119979
* Refactor the ELFRelocationEntry (pull up) and move the arch-specific statics ↵Jason W Kim2010-11-221-46/+54
| | | | | | | | | | to inside the class where it belongs. Next step is to rationally break apart the RecordRelocation() Probably the step will be to have 1 member function for ech slot of the ELFRelocationEntry() llvm-svn: 119978
* Add basic CFI methods to the streamer interface.Rafael Espindola2010-11-223-7/+125
| | | | llvm-svn: 119972
* Remove some #includes.Rafael Espindola2010-11-221-0/+1
| | | | llvm-svn: 119967
* Implement ELF object file writing support for the MBlaze backend. Its not ↵Wesley Peck2010-11-211-2/+140
| | | | | | perfect yet, but it works for many tests. llvm-svn: 119952
* Handle PCRel relocations with absolute values. Fixes PR8656.Rafael Espindola2010-11-211-9/+23
| | | | llvm-svn: 119917
* Added support for the Mach-O .symbol_resolver directive. rdar://8673046Kevin Enderby2010-11-196-0/+10
| | | | llvm-svn: 119816
* Add a MCLineSectionOrder vector so that we produce the line tables in aRafael Espindola2010-11-191-10/+15
| | | | | | deterministic order. llvm-svn: 119795
* Add an assert.Rafael Espindola2010-11-191-1/+3
| | | | llvm-svn: 119788
* Fix llvm-gcc boostrap on OS X by avoiding printing sleb and uleb whenRafael Espindola2010-11-191-0/+16
| | | | | | possible. llvm-svn: 119785
* Change some methods in MCDwarf.cpp to be able to handle an arbitraryRafael Espindola2010-11-194-34/+83
| | | | | | | | | | | | MCStreamer instead of just MCObjectStreamer. Address changes cannot be as efficient as we have to use DW_LNE_set_addres, but at least most of the logic is shared. This will be used so that, with CodeGen still using EmitDwarfLocDirective, llvm-gcc is able to produce debug_line sections without needing an assembler that supports .loc. llvm-svn: 119777
* Change CodeGen to use .loc directives. This produces a lot more readable outputRafael Espindola2010-11-181-1/+0
| | | | | | | | and testing is easier. A good example is the unknown-location.ll test that now can just look for ".loc 1 0 0". We also don't use a DW_LNE_set_address for every address change anymore. llvm-svn: 119613
* make isVirtualSection a virtual method on MCSection. Chris' suggestion.Rafael Espindola2010-11-175-7/+21
| | | | llvm-svn: 119547
* Fix typo.Jim Grosbach2010-11-171-1/+1
| | | | llvm-svn: 119542
* Add support for .int.Rafael Espindola2010-11-171-0/+2
| | | | llvm-svn: 119512
* Add support for .2byte, .4byte and .8byte.Rafael Espindola2010-11-171-0/+6
| | | | | | Fixes PR8631. llvm-svn: 119511
* MC-JIT: Stub out "pure" streamer.Daniel Dunbar2010-11-172-0/+260
| | | | | | - No immediate use, but maybe someone feels like hacking on it. llvm-svn: 119510
* Add .loc methods to the streamer.Rafael Espindola2010-11-169-24/+73
| | | | | | | Next: Add support for the !HasDotLocAndDotFile case to the MCAsmStreamer and then switch codegen to use it. llvm-svn: 119384
* Parse and ignore some .cfi_* directives.Rafael Espindola2010-11-161-0/+95
| | | | llvm-svn: 119362
* A bit more of gnu as compatibility when handling relocations with aliases.Rafael Espindola2010-11-161-2/+5
| | | | llvm-svn: 119328
* Fix compiler warnigns.Benjamin Kramer2010-11-151-2/+2
| | | | llvm-svn: 119175
* Change MCExpr::EvaluateAsRelocatableImpl of variables to return the originalRafael Espindola2010-11-155-116/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | variable if recursing fails to simplify it. Factor AliasedSymbol to be a method of MCSymbol. Update MCAssembler::EvaluateFixup to match the change in EvaluateAsRelocatableImpl. Remove the WeakRefExpr hack, as the object writer now sees the weakref with no extra effort needed. Nothing else is using MCTargetExpr, but keep it for now. Now that the ELF writer sees relocations with aliases, handle .weak foo2 foo2: .weak bar2 .set bar2,foo2 .quad bar2 the same way gas does and produce a relocation with bar2. llvm-svn: 119152
* Dovetail with Dan Dunbar's rework of ELFObjectWriter.Jason W Kim2010-11-151-223/+311
| | | | | | | Added 2 new subclasses - X86ELFObjectWriter and ARMELFObectWriter. ARM and X86 require different code for RecordRelocation(), possibly others. llvm-svn: 119149
* Fix PR8565.Rafael Espindola2010-11-152-6/+26
| | | | | | | | | | | This moves most of the isUsed logic to the MCSymbol itself. With this we get a bit more relaxed about allowing definitions after uses: uses that don't evaluate their argument immediately (jmp foo) are accepted. ddunbar, this was the smallest compromise I could think of that lets us accept gcc (and clang!) assembly. llvm-svn: 119144
* correct the fixup comment printer to work on big endian platforms.Chris Lattner2010-11-151-1/+8
| | | | llvm-svn: 119122
* add targetoperand flags for jump tables, constant pool and block addressChris Lattner2010-11-151-4/+15
| | | | | | | | | | | | | | nodes to indicate when ha16/lo16 modifiers should be used. This lets us pass PowerPC/indirectbr.ll. The one annoying thing about this patch is that the MCSymbolExpr isn't expressive enough to represent ha16(label1-label2) which we need on PowerPC. I have a terrible hack in the meantime, but this will have to be revisited at some point. Last major conversion item left is global variable references. llvm-svn: 119105
* Move the logic to decide with which symbol we produce a relocation (if any) toRafael Espindola2010-11-141-27/+44
| | | | | | a central location. This also makes us a bit more compatible with gas. llvm-svn: 119094
* reimplement ppc asmprinter "toc" handling to use a VariantKindChris Lattner2010-11-141-1/+2
| | | | | | | | on the operand, required for .o file writing and fixing the PowerPC/mult-alt-generic-powerpc64.ll failure with the new instprinter. llvm-svn: 119087
* Fix another case of a .comm directive without a corresponding .typeRafael Espindola2010-11-141-1/+2
| | | | | | directive. llvm-svn: 119073
* Fix the type of a symbol created with .comm and no corresponding .type.Rafael Espindola2010-11-141-0/+1
| | | | llvm-svn: 119060
* Handle a peculiar comdat case: Creating a section with an undefinedRafael Espindola2010-11-142-29/+55
| | | | | | | signature symbol causes a local symbol to be created unless there is some other use of the symbol. llvm-svn: 119026
* Simplify getSymbolIndexInSymbolTable by setting the actual index ofRafael Espindola2010-11-141-11/+6
| | | | | | the symbols. llvm-svn: 119022
* Fix warning.Rafael Espindola2010-11-141-0/+4
| | | | llvm-svn: 119021
* MC: Simplify Mach-O and ELF object writer implementations.Daniel Dunbar2010-11-132-192/+98
| | | | | | - What was I thinking????? llvm-svn: 118992
* Fix warning and add support for printing gnu_unique_object.Rafael Espindola2010-11-131-0/+2
| | | | llvm-svn: 118981
* Parse and record the gnu_unique_object type.Rafael Espindola2010-11-132-0/+2
| | | | llvm-svn: 118980
* Parse and remember discriminators in .loc line. I try to output them withRafael Espindola2010-11-132-2/+8
| | | | | | | another patch. This lets us parse a bit more of the gcc 4.5 output. llvm-svn: 118975
OpenPOWER on IntegriCloud