summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/MCExpr.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Rename TargetAsmBackend to MCAsmBackend; rename createAsmBackend to ↵Evan Cheng2011-07-251-1/+0
| | | | | | createMCAsmBackend. llvm-svn: 136010
* Move TargetAsmParser.h TargetAsmBackend.h and TargetAsmLexer.h to MC where ↵Evan Cheng2011-07-231-1/+1
| | | | | | they belong. llvm-svn: 135833
* Fix emission of PPC64 assembler on non-darwin platforms by splittingRoman Divacky2011-06-091-6/+8
| | | | | | | | VK_PPC_{HA,LO}16 into darwin and gas variants. Darwin wants {ha,lo}16(symbol) while gnu as wants symbol@{ha,l}. llvm-svn: 132802
* MCExpr: Add FindAssociatedSection, which attempts to mirror the 'as' semanticsDaniel Dunbar2011-04-291-0/+42
| | | | | | that associate sections with expressions. llvm-svn: 130517
* Fix a ton of comment typos found by codespell. Patch byChris Lattner2011-04-151-1/+1
| | | | | | Luis Felipe Strano Moraes! llvm-svn: 129558
* Add support for Thumb interworking addresses for symbol offsets that get ↵Owen Anderson2011-03-211-0/+5
| | | | | | | | constant folded very early. This fixes SPASS with -integrated-as. <rdar://problem/9165399> llvm-svn: 128037
* Add support for lowercase variants.Rafael Espindola2011-01-231-0/+14
| | | | llvm-svn: 124071
* Model :upper16: and :lower16: as ARM specific MCTargetExpr. This is a stepEvan Cheng2011-01-131-8/+0
| | | | | | | | in the right direction. It eliminated some hacks and will unblock codegen work. But it's far from being done. It doesn't reject illegal expressions, e.g. (FOO - :lower16:BAR). It also doesn't work in Thumb2 mode at all. llvm-svn: 123369
* Add r122359 back now that the bug in MCDwarfLineAddrFragment fragment has beenRafael Espindola2010-12-221-19/+5
| | | | | | fixed. llvm-svn: 122448
* Revert r122359 while I debug PR8845.Rafael Espindola2010-12-221-5/+19
| | | | llvm-svn: 122427
* Use references and simplify.Rafael Espindola2010-12-221-6/+3
| | | | llvm-svn: 122405
* Simplify EvaluateAsAbsolute now that EvaluateAsRelocatableImpl does allRafael Espindola2010-12-211-19/+5
| | | | | | the folding it can. llvm-svn: 122359
* Fixed version of 122160 (the previous one would fold undefined symbols).Rafael Espindola2010-12-191-50/+52
| | | | llvm-svn: 122167
* Revert 122160 while I debug it.Rafael Espindola2010-12-191-44/+50
| | | | llvm-svn: 122165
* Move all folding to AttemptToFoldSymbolOffsetDifference.Rafael Espindola2010-12-191-50/+44
| | | | llvm-svn: 122160
* Merge isAbsolute into IsSymbolRefDifferenceFullyResolved.Rafael Espindola2010-12-181-5/+4
| | | | llvm-svn: 122148
* Remove the MCObjectFormat class.Rafael Espindola2010-12-181-3/+2
| | | | llvm-svn: 122147
* Add a FIXME and explain a hack.Rafael Espindola2010-12-181-1/+4
| | | | llvm-svn: 122144
* Fix the note.Rafael Espindola2010-12-181-1/+1
| | | | llvm-svn: 122139
* Revert 122011, 122012, 122013, 122023 adding back an important optimization.Rafael Espindola2010-12-181-16/+56
| | | | | | I added a note, but suggestions on how to add a test are really welcome. llvm-svn: 122138
* MC/Expr: Implemnt more aggressive folding during symbol evaluation usingDaniel Dunbar2010-12-171-8/+44
| | | | | | | | | | | | | | | | IsSymbolRefDifferenceFullyResolved(). For example, we will now fold away something like: -- _a: ... L0: ... L1: ... .long (L1 - L0) / 2 -- llvm-svn: 122043
* MC/Expr: Simplify.Daniel Dunbar2010-12-171-8/+0
| | | | llvm-svn: 122023
* MC: Remove another dead MCAssembler argument, and update clients.Daniel Dunbar2010-12-171-21/+1
| | | | llvm-svn: 122013
* MC: Remove dead MCAssembler argument -- Rafael, can you check the FIXME I addedDaniel Dunbar2010-12-171-12/+9
| | | | | | here? llvm-svn: 122012
* MC: Simplify (remove unnecessary MCAssembler argument, obsoleted by containmentDaniel Dunbar2010-12-171-12/+8
| | | | | | in MCAsmLayout). llvm-svn: 122011
* Write => in a more normal form.Daniel Dunbar2010-12-171-1/+2
| | | | llvm-svn: 122009
* MC/Expr: Simplify (and add a FIXME).Daniel Dunbar2010-12-171-10/+16
| | | | llvm-svn: 122008
* MC/Expr: Add a doxyment.Daniel Dunbar2010-12-161-0/+14
| | | | llvm-svn: 121988
* Sorry for such a large commit. The summary is that only MachO cares about theRafael Espindola2010-12-071-20/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | actuall addresses in a .o file, so it is better to let the MachO writer compute it. This is good for two reasons. First, areas that shouldn't care about addresses now don't have access to it. Second, the layout of each section is independent. I should use this in a subsequent commit to speed it up. Most of the patch is just removing the section address computation. The two interesting parts are the change on how we handle padding in the end of sections and how MachO can get the address of a-b when a and b are in different sections. Since now the expression evaluation normally doesn't know the section address, it will think that a-b needs relocation and let the MachO writer know. Once it has computed the section addresses, it calls back the expression evaluation with the section addresses to resolve these expressions. The remaining problem is the handling of padding. Currently it will create a special alignment fragment at the end. Since that fragment doesn't update the alignment of the section, it needs the real address to be computed. Since now the layout will not compute a-b with a and b in different sections, the only effect that the special alignment fragment has is update the address size of the section. This can also be done by the MachO writer. llvm-svn: 121076
* Use references to simplify the code a bit.Rafael Espindola2010-12-061-7/+4
| | | | llvm-svn: 121050
* Simplify a bit.Rafael Espindola2010-12-061-1/+1
| | | | llvm-svn: 120980
* Try to resolve symbol differences early, and if successful create a plainRafael Espindola2010-12-031-21/+52
| | | | | | | data fragment. This reduces the time to assemble the test in 8711 from 60s to 54s. llvm-svn: 120767
* Add a fast path to EvaluateSymbolicAdd. This avoids computing symbol addressesRafael Espindola2010-12-021-3/+11
| | | | | | | | which then avoids running EnsureValid. This cuts the assembly time of the testcase in PR8711 from 2:50 minutes to 1 minute. llvm-svn: 120697
* Fix typo.Jim Grosbach2010-11-171-1/+1
| | | | llvm-svn: 119542
* Change MCExpr::EvaluateAsRelocatableImpl of variables to return the originalRafael Espindola2010-11-151-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
* 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
* 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
* Update ARMConstantPoolValue to not use a modifier string. Use an explicitJim Grosbach2010-11-101-1/+11
| | | | | | | VariantKind marker to indicate the additional information necessary. Update MC to handle the new Kinds. rdar://8647623 llvm-svn: 118671
* Implement TLSLD.Rafael Espindola2010-10-281-0/+2
| | | | llvm-svn: 117547
* Implement DTPOFF.Rafael Espindola2010-10-281-0/+2
| | | | llvm-svn: 117546
* Implement TLSLDM.Rafael Espindola2010-10-281-0/+2
| | | | llvm-svn: 117544
* Implement VK_GOTNTPOFF and switch RelocNeedsGOT to use VariantKind.Rafael Espindola2010-10-281-0/+2
| | | | llvm-svn: 117543
* Do not recurse into symbol refs that have a variant kind. This prevents usRafael Espindola2010-10-211-1/+1
| | | | | | from losing the variant when producing a relocation on an alias. llvm-svn: 117037
* Add a MCObjectFormat class so that code common to all targets that use aRafael Espindola2010-10-161-27/+39
| | | | | | | | | | | | single object format can be shared. This also adds support for mov zed+(bar-foo), %eax on ELF and COFF targets. llvm-svn: 116675
* Changes EvaluateAsAbsolute() to return the "current value" of the expressionKevin Enderby2010-09-301-1/+16
| | | | | | | | if we are given a Layout object, even in cases when the value is not fixed. This will be needed by the final patch for the dwarf .loc support to size a new MCDwarf fragment needed to build and emit dwarf line number tables. llvm-svn: 115155
* Add support for ELF PLT references for ARM MC asm printing. Adding aJim Grosbach2010-09-221-3/+6
| | | | | | | | new VariantKind to the MCSymbolExpr seems like overkill, but I'm not sure there's a more straightforward way to get the printing difference captured. (i.e., x86 uses @PLT, ARM uses (PLT)). llvm-svn: 114613
* Convert some tab stops into spaces.Duncan Sands2010-07-121-3/+3
| | | | llvm-svn: 108130
* Start adding mach-o tls reloc support.Eric Christopher2010-05-261-0/+2
| | | | llvm-svn: 104651
* Add support for movi32 of global values to the new (MC) asm printer.Rafael Espindola2010-05-121-1/+9
| | | | llvm-svn: 103576
* MC: Rename MCSymbol::{g,s}etValue -> MCSymbol::{g,s}etVariableValue.Daniel Dunbar2010-05-051-1/+1
| | | | llvm-svn: 103095
OpenPOWER on IntegriCloud