mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-22 20:05:38 +00:00
Use a better name for the label relocations while emitting them for Jump Tables
llvm-svn: 76334
This commit is contained in:
parent
f53e82f48a
commit
fc0fe7ea20
@ -106,7 +106,7 @@ namespace llvm {
|
||||
|
||||
/// getJumpTableRelocationTy - Returns the machine relocation type used
|
||||
/// to reference a jumptable.
|
||||
virtual unsigned getJumpTableMachineRelocationTy() const = 0;
|
||||
virtual unsigned getAbsoluteLabelMachineRelTy() const = 0;
|
||||
};
|
||||
|
||||
} // end llvm namespace
|
||||
|
@ -185,7 +185,7 @@ void ELFCodeEmitter::emitJumpTables(MachineJumpTableInfo *MJTI) {
|
||||
// Each MBB entry in the Jump table section has a relocation entry
|
||||
// against the current text section.
|
||||
for (unsigned mi = 0, me = MBBs.size(); mi != me; ++mi) {
|
||||
unsigned MachineRelTy = TEW->getJumpTableMachineRelocationTy();
|
||||
unsigned MachineRelTy = TEW->getAbsoluteLabelMachineRelTy();
|
||||
MachineRelocation MR =
|
||||
MachineRelocation::getBB(JTSection.size(),
|
||||
MachineRelTy,
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user