summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/MCAssembler.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* MC: Add TargetAsmBackend::isVirtualSection hook.Daniel Dunbar2010-03-191-15/+7
| | | | llvm-svn: 98950
* MC: Split MCObjectWriter out of MCAssembler.cpp.Daniel Dunbar2010-03-191-131/+30
| | | | llvm-svn: 98949
* MCAssembler: Pull out MCObjectWriter class.Daniel Dunbar2010-03-191-82/+126
| | | | llvm-svn: 98948
* MCAssembler: Move ApplyFixup to the TargetAsmBackend, this is a target ↵Daniel Dunbar2010-03-191-12/+1
| | | | | | specific not object writer specific task. llvm-svn: 98947
* MC/Mach-O: Lift the fixup evaluation and application up (to the same place), ↵Daniel Dunbar2010-03-191-35/+31
| | | | | | and eliminate MCAsmFixup::FixedValue. llvm-svn: 98944
* MC/Mach-O: Factor out ExecutePostLayoutBinding, to separate the post-layout ↵Daniel Dunbar2010-03-191-31/+33
| | | | | | changes the object writer may need to make to the assembler from the actual .o writing. llvm-svn: 98943
* MC/Mach-O: Lift relocation emission logic a bit higher to separate ↵Daniel Dunbar2010-03-191-56/+77
| | | | | | evaluation / relocation handling from the actual .o writing. llvm-svn: 98942
* MC/Mach-O: Add isScatteredFixupFullyResolved, which implements the correct ↵Daniel Dunbar2010-03-191-1/+59
| | | | | | | | algorithm (used on x86_64) for determining whether an evaluated fixup is fully resolved (doesn't need relocation). - Test cases will follow, once we have x86_64 relocation support. llvm-svn: 98926
* 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-181-14/+14
| | | | | | need this for accessing to symbol modifiers. llvm-svn: 98791
* 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
* 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
* 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
* 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
* MC: Factor out MCAssembler::EvaluateFixup, and simplify.Daniel Dunbar2010-03-121-33/+52
| | | | llvm-svn: 98381
* 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-111-2/+8
| | | | | | 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: Provide MCAssembler with a TargetAsmBackend.Daniel Dunbar2010-03-111-2/+3
| | | | llvm-svn: 98222
* MC/Mach-O: Use the MCAssembler symbol map instead of reconstructing.Daniel Dunbar2010-03-101-32/+17
| | | | llvm-svn: 98187
* MC/Mach-O: Resolve a FIXME; these relocation types are no longer semanticaly ↵Daniel Dunbar2010-03-101-3/+5
| | | | | | different. llvm-svn: 98120
* 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
* 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
* 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
* This is the second patch to allow x86 code to be aligned with optimal nops.Kevin Enderby2010-02-231-2/+47
| | | | | | | | | | With the compiler changed to use EmitCodeAlignment() it does change the functionality. But X86 assembly code assembled with llvm-mc does not change its output. For that we will eventually change the assembler frontend to detect a '.align x, 0x90' when used in a section that 'hasInstructions' and use EmitCodeAlignment, but will wait until we have better target hooks. llvm-svn: 96988
* This is the first patch to put the needed bits in place to eventually allow codeKevin Enderby2010-02-231-0/+23
| | | | | | | | | | | to be aligned with optimal nops. This patch does not change any functionality and when the compiler is changed to use EmitCodeAlignment() it should also not change the resulting output. Once the compiler change is made and everything looks good the next patch with the table of optimal X86 nops will be added to WriteNopData() changing the output. There are many FIXMEs in this patch which will be removed when we have better target hooks (coming soon I hear). llvm-svn: 96963
* MC/Mach-O: Update fixup values for change to X86 offsets.Daniel Dunbar2010-02-171-6/+4
| | | | llvm-svn: 96532
* Pacify gcc-4.5, which warns (correctly) that these switches haveDuncan Sands2010-02-171-2/+2
| | | | | | cases that are not part of the enum. llvm-svn: 96477
* MCAssembler: Fix pcrel relocations. Oh and,Daniel Dunbar2010-02-131-2/+23
| | | | | | | | | -- ddunbar@ozzy:tmp$ clang -m32 -integrated-as hello.c && ./a.out hello world! -- llvm-svn: 96096
* MC/Mach-O: Start emitting fixups/relocations for instructions.Daniel Dunbar2010-02-131-0/+7
| | | | llvm-svn: 96095
* MCAssembler: Switch MCAsmFixup to storing MCFixupKind instead of just a size.Daniel Dunbar2010-02-131-8/+20
| | | | llvm-svn: 96094
* MCAssembler: Sink fixup list into MCDataFragment.Daniel Dunbar2010-02-131-15/+18
| | | | llvm-svn: 96093
* MCAssembler: Switch MCFillFragment to only taking constant values. Symbolic ↵Daniel Dunbar2010-02-131-47/+5
| | | | | | expressions can always be emitted as data + fixups. llvm-svn: 96092
* MCAssembler: Start applying fixups in the data section.Daniel Dunbar2010-02-131-1/+19
| | | | llvm-svn: 96090
* MCAssembler: Add assorted dump() methods.Daniel Dunbar2010-02-131-0/+144
| | | | llvm-svn: 96089
* MC: Move assembler-backend's fixup list into the fragment.Daniel Dunbar2010-02-111-40/+22
| | | | llvm-svn: 95926
* MC: Move MCSectionData::Fixup out to MCAsmFixup.Daniel Dunbar2010-02-111-8/+7
| | | | llvm-svn: 95925
* llvm-mc: Add --show-fixups option, for displaying the instruction fixup ↵Daniel Dunbar2010-02-091-4/+4
| | | | | | information in the asm comments. llvm-svn: 95710
* MC/Mach-O: Set SOME_INSTRUCTIONS bit for sections.Daniel Dunbar2010-02-021-2/+7
| | | | llvm-svn: 95135
* Add a new top-level MachO.h file for manifest constants, fixing Chris Lattner2010-02-021-3/+3
| | | | | | a layering violation from MC -> Target. llvm-svn: 95113
OpenPOWER on IntegriCloud