mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-03-20 11:32:33 +00:00
Use a better name for the label relocations while emitting them for Jump Tables
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76334 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
f689fa185f
commit
617dd7baa6
@ -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