diff options
| author | Daniel Dunbar <daniel@zuster.org> | 2010-02-13 09:29:02 +0000 |
|---|---|---|
| committer | Daniel Dunbar <daniel@zuster.org> | 2010-02-13 09:29:02 +0000 |
| commit | 1e2fad3de877a58feb678b41988313eb0a1a9153 (patch) | |
| tree | 14ac410d1626ed6d3ec2e108c738a0107f46c2fb /llvm/lib/MC/MCAssembler.cpp | |
| parent | 3374835b46d6c92e562717d5a21ad135006adbb3 (diff) | |
| download | bcm5719-llvm-1e2fad3de877a58feb678b41988313eb0a1a9153.tar.gz bcm5719-llvm-1e2fad3de877a58feb678b41988313eb0a1a9153.zip | |
MC/Mach-O: Start emitting fixups/relocations for instructions.
llvm-svn: 96095
Diffstat (limited to 'llvm/lib/MC/MCAssembler.cpp')
| -rw-r--r-- | llvm/lib/MC/MCAssembler.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/MC/MCAssembler.cpp b/llvm/lib/MC/MCAssembler.cpp index b2c4112f484..c9748344944 100644 --- a/llvm/lib/MC/MCAssembler.cpp +++ b/llvm/lib/MC/MCAssembler.cpp @@ -23,6 +23,10 @@ #include "llvm/Support/MachO.h" #include "llvm/Support/raw_ostream.h" #include "llvm/Support/Debug.h" + +// FIXME: Gross. +#include "../Target/X86/X86FixupKinds.h" + #include <vector> using namespace llvm; @@ -50,8 +54,11 @@ static bool isVirtualSection(const MCSection &Section) { static unsigned getFixupKindLog2Size(MCFixupKind Kind) { switch (Kind) { default: llvm_unreachable("invalid fixup kind!"); + case X86::reloc_pcrel_1byte: case FK_Data_1: return 0; case FK_Data_2: return 1; + case X86::reloc_pcrel_4byte: + case X86::reloc_riprel_4byte: case FK_Data_4: return 2; case FK_Data_8: return 3; } |

