summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC
Commit message (Collapse)AuthorAgeFilesLines
* MC/Mach-O/x86_64: Add getAtom[ForAddress].Daniel Dunbar2010-03-191-0/+36
| | | | | | - These find the defining symbol which identifies the containing atom for a symbol or address. They are currently very slow, but will be eliminated eventually. llvm-svn: 98925
* MC/Mach-O: Factor out isScatteredFixupFullyResolvedSimple predicate, and fix ↵Daniel Dunbar2010-03-191-15/+52
| | | | | | some corner cases. llvm-svn: 98924
* MC/Mach-O: Factor out isSymbolLinkerVisible method; "linker visible" is a ↵Daniel Dunbar2010-03-191-10/+18
| | | | | | made up term to refer to non-temporary labels + temporary labels in sections-which-require symbols. For Darwin, it corresponds to symbols which effectively define an atom. llvm-svn: 98923
* MCValue: Change to holding MCSymbolRefExprs instead of MCSymbols, we will ↵Daniel Dunbar2010-03-183-37/+44
| | | | | | need this for accessing to symbol modifiers. llvm-svn: 98791
* MC/Darwin: Add a new target hook for whether the target uses "reliable" ↵Daniel Dunbar2010-03-181-1/+4
| | | | | | | | symbol differences, basically whether the assembler should attempt to understand atoms when using scattered symbols. Also, avoid some virtual call overhead. llvm-svn: 98789
* fix GetOrCreateTemporarySymbol to require a name, clientsChris Lattner2010-03-171-11/+0
| | | | | | | should use CreateTempSymbol() if they don't care about the name. llvm-svn: 98712
* MC: Allow modifiers in MCSymbolRefExpr, and eliminate X86MCTargetExpr.Daniel Dunbar2010-03-152-7/+63
| | | | | | | - Although it would be nice to allow this decoupling, the assembler needs to be able to reason about MCSymbolRefExprs in too many places to make this viable. We can use a target specific encoding of the variant if this becomes an issue. - This patch also extends llvm-mc to support parsing of the modifiers, as opposed to lumping them in with the symbol. llvm-svn: 98592
* MC/Mach-O/x86_64: Temporary labels in cstring sections require symbols (and ↵Daniel Dunbar2010-03-151-2/+8
| | | | | | external relocations, but we don't have x86_64 relocations yet). llvm-svn: 98583
* MC/Mach-O: Add MCSectionMachO::getType()Daniel Dunbar2010-03-151-12/+5
| | | | llvm-svn: 98582
* fix a memory leak yjasskin pointed out: MCSymbol is bump pointerChris Lattner2010-03-151-10/+14
| | | | | | | | | | allocated and thus not freed. This is cool except that it contains and std::string so the string data didn't get freed. In any case there is no reason to redundantly store the string data in the MCSymbol anyway, just make the MCSymbol ref the string data in the MCContext StringMap. llvm-svn: 98536
* add a new CreateTempSymbol method, the use case forChris Lattner2010-03-141-0/+6
| | | | | | | CreateTempSymbol vs GetOrCreateTemporarySymbol are completely different. llvm-svn: 98486
* MC: Fix a crash on invalid, attempting to evaluate undefined symbols.Daniel Dunbar2010-03-142-4/+5
| | | | llvm-svn: 98464
* MC/X86_64: Symbol support.Daniel Dunbar2010-03-131-6/+10
| | | | llvm-svn: 98456
* MC/Mach-O: Initial x86_64 support.Daniel Dunbar2010-03-131-45/+80
| | | | llvm-svn: 98454
* add a hack to allow parsing negative minint. rdar://7751341Chris Lattner2010-03-131-2/+8
| | | | llvm-svn: 98442
* MC/Mach-O: PCrel relocations weren't using the right base address, they areDaniel Dunbar2010-03-131-1/+1
| | | | | | | relative to the fragment address, not its offset. This was masked by the text section normally being at address 0. llvm-svn: 98420
* llvm-mc: Support -n, useful for comparing -integrated-as output since theDaniel Dunbar2010-03-131-7/+6
| | | | | | compiler may not lead with the text section. llvm-svn: 98418
* MC/Mach-O: Implement initial support for relaxation.Daniel Dunbar2010-03-121-9/+117
| | | | | | | | | | | | - The implementation is currently very brain dead and inefficient, but I have a clear plan on how to fix it. - The good news is, it works and correctly assembles 403.gcc (when built with Clang, at '-Os', '-Os -g', and '-O3'). Even better, at '-Os' and '-Os -g', the resulting binary is exactly equivalent to that when built with the system assembler. So it probably works! :) llvm-svn: 98396
* move fastcall/stdcall mangling up into Mangler.Chris Lattner2010-03-122-0/+2
| | | | llvm-svn: 98384
* MC: Factor out MCAssembler::EvaluateFixup, and simplify.Daniel Dunbar2010-03-121-33/+52
| | | | llvm-svn: 98381
* MC: Constify MCAsmLayout argument to MCExpr::EvaluteAs...Daniel Dunbar2010-03-121-2/+3
| | | | llvm-svn: 98380
* MC: Add MCAssembler::addFixup, which enforces that fixups are added in order.Daniel Dunbar2010-03-121-6/+4
| | | | llvm-svn: 98379
* remove MAI argument from createAsmStreamer since itChris Lattner2010-03-121-5/+4
| | | | | | can get it from the context now. llvm-svn: 98361
* enhance MCContext::GetOrCreateTemporarySymbol() to create a new symbolChris Lattner2010-03-111-0/+6
| | | | | | with an arbitrary unique name. llvm-svn: 98294
* change MCContext to always have an MCAsmInfo.Chris Lattner2010-03-111-1/+1
| | | | llvm-svn: 98293
* empty symbols aren't possible, the mcsymbol ctor aborts on them.Chris Lattner2010-03-111-4/+0
| | | | llvm-svn: 98288
* MC/Mach-O: Add MCSymbolData::getAddress() utility.Daniel Dunbar2010-03-111-4/+4
| | | | llvm-svn: 98266
* MC/Mach-O: Implement "absolutizing" semantics of .set, by evaluating the ↵Daniel Dunbar2010-03-112-4/+28
| | | | | | assembly time value of variables. llvm-svn: 98241
* MC/Mach-O: Start passing in the basic MCAsmLayout object.Daniel Dunbar2010-03-111-13/+14
| | | | | | - Also, drop the current location part of AsmLayout, I think I prefer to implement this via explicit symbols. llvm-svn: 98240
* MC: Sketch initial MCAsmLayout class, which encapsulates the current layout ↵Daniel Dunbar2010-03-111-8/+8
| | | | | | of an assembly file. The MCAsmLayout is also available for use by MCExpr::EvaluateAs{Absolute,Relocatable}, to allow target specific hooks and "absolutizing" of symbols. llvm-svn: 98227
* MC: Provide MCAssembler with a TargetAsmBackend.Daniel Dunbar2010-03-112-7/+9
| | | | llvm-svn: 98222
* MC/Mach-O: Use the MCAssembler symbol map instead of reconstructing.Daniel Dunbar2010-03-101-32/+17
| | | | llvm-svn: 98187
* MC: Move the backend section and symbol data maps to MCAssembler.Daniel Dunbar2010-03-101-30/+11
| | | | llvm-svn: 98186
* Remove unneeded includes.Daniel Dunbar2010-03-103-3/+0
| | | | llvm-svn: 98167
* move three lowering hooks from MAI to TLOF and make one of themChris Lattner2010-03-102-14/+0
| | | | | | | semantic instead of syntactic. This completes MCization of darwin/x86[-64]! llvm-svn: 98145
* set the temporary bit on MCSymbols correctly.Chris Lattner2010-03-101-0/+5
| | | | llvm-svn: 98124
* MC/Mach-O: Resolve a FIXME; these relocation types are no longer semanticaly ↵Daniel Dunbar2010-03-101-3/+5
| | | | | | different. llvm-svn: 98120
* eliminate MCContext::CreateSymbol and CreateTemporarySymbol.Chris Lattner2010-03-102-17/+12
| | | | | | | Add a new GetOrCreateTemporarySymbol method and a version that takes a twine. llvm-svn: 98118
* MC/Mach-O: Use the SECTDIFF relocation type for (A - B + constant) where A ↵Daniel Dunbar2010-03-101-8/+11
| | | | | | | | is external. - I'm not sure why, but this is what 'as' does. llvm-svn: 98115
* make the NullStreamer set the section on a label when emitted so that ↵Chris Lattner2010-03-091-1/+5
| | | | | | isDefined() works. llvm-svn: 98100
* MC/Mach-O: For PCrel relocations, we need to compensate for the PCrel ↵Daniel Dunbar2010-03-091-5/+9
| | | | | | adjustment when determining if we need a scattered relocation. llvm-svn: 98082
* MC/Mach-O: Also set the PCrel bit in the second half of paired relocation ↵Daniel Dunbar2010-03-091-4/+2
| | | | | | entries. llvm-svn: 98081
* MC/Mach-O: Don't generate relocations for PCrel fixups to local labels.Daniel Dunbar2010-03-091-9/+19
| | | | llvm-svn: 98080
* MC/Mach-O: Tweak .dump() formatting.Daniel Dunbar2010-03-091-4/+4
| | | | llvm-svn: 98028
* MC/Mach-O: Don't adjust section sizes when aligning zero fill sections, just ↵Daniel Dunbar2010-03-091-5/+1
| | | | | | pad the address. llvm-svn: 98027
* add a EmitSymbolValue convenience method to MCStreamer.Chris Lattner2010-03-091-0/+5
| | | | llvm-svn: 98017
* MC/Macho-O: Align the zerofill section itself to the maximum alignment.Daniel Dunbar2010-03-081-0/+10
| | | | llvm-svn: 97991
* MC/Mach-O: Fix address compution for zero fill sections.Daniel Dunbar2010-03-081-2/+2
| | | | llvm-svn: 97984
* MC/Mach-O: Error out instead of crashing on invalid scattered relocation ↵Daniel Dunbar2010-03-081-2/+11
| | | | | | expressions. llvm-svn: 97983
* pass in more section kinds, enough to get the .align 0x90Chris Lattner2010-02-261-5/+9
| | | | | | stuff to emit optimal nops in the right places. llvm-svn: 97233
OpenPOWER on IntegriCloud