diff options
author | Bruno Cardoso Lopes <bruno.cardoso@gmail.com> | 2009-07-18 20:52:11 +0000 |
---|---|---|
committer | Bruno Cardoso Lopes <bruno.cardoso@gmail.com> | 2009-07-18 20:52:11 +0000 |
commit | e376b53c7bedac425c41b3c6832ab823a4d6e8f5 (patch) | |
tree | 8e567f340b11a52b6ae8dcbebb67c1d65f0b400a /llvm/lib/Target/X86 | |
parent | 4f51628b022a31bbcff8ac576e0490914ba4426a (diff) | |
download | bcm5719-llvm-e376b53c7bedac425c41b3c6832ab823a4d6e8f5.tar.gz bcm5719-llvm-e376b53c7bedac425c41b3c6832ab823a4d6e8f5.zip |
Use a better name for the label relocations while emitting them for Jump Tables
llvm-svn: 76334
Diffstat (limited to 'llvm/lib/Target/X86')
-rw-r--r-- | llvm/lib/Target/X86/X86ELFWriterInfo.cpp | 5 | ||||
-rw-r--r-- | llvm/lib/Target/X86/X86ELFWriterInfo.h | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/llvm/lib/Target/X86/X86ELFWriterInfo.cpp b/llvm/lib/Target/X86/X86ELFWriterInfo.cpp index 4002e265304..4e4b6f1d917 100644 --- a/llvm/lib/Target/X86/X86ELFWriterInfo.cpp +++ b/llvm/lib/Target/X86/X86ELFWriterInfo.cpp @@ -102,7 +102,8 @@ unsigned X86ELFWriterInfo::getRelocationTySize(unsigned RelTy) const { return 0; } -unsigned X86ELFWriterInfo::getJumpTableMachineRelocationTy() const { - return X86::reloc_absolute_dword; +unsigned X86ELFWriterInfo::getAbsoluteLabelMachineRelTy() const { + return is64Bit ? + X86::reloc_absolute_dword : X86::reloc_absolute_word; } diff --git a/llvm/lib/Target/X86/X86ELFWriterInfo.h b/llvm/lib/Target/X86/X86ELFWriterInfo.h index f372658f706..7782a5b12fb 100644 --- a/llvm/lib/Target/X86/X86ELFWriterInfo.h +++ b/llvm/lib/Target/X86/X86ELFWriterInfo.h @@ -58,7 +58,7 @@ namespace llvm { /// getJumpTableRelocationTy - Returns the machine relocation type used /// to reference a jumptable. - virtual unsigned getJumpTableMachineRelocationTy() const; + virtual unsigned getAbsoluteLabelMachineRelTy() const; }; } // end llvm namespace |