mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-23 14:25:07 +00:00
Move the getJTRelocation method out of here.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33479 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -23,23 +23,11 @@ using namespace llvm;
|
|||||||
namespace {
|
namespace {
|
||||||
class VISIBILITY_HIDDEN PPCMachOWriter : public MachOWriter {
|
class VISIBILITY_HIDDEN PPCMachOWriter : public MachOWriter {
|
||||||
public:
|
public:
|
||||||
PPCMachOWriter(std::ostream &O, PPCTargetMachine &TM) : MachOWriter(O, TM) {
|
PPCMachOWriter(std::ostream &O, PPCTargetMachine &TM)
|
||||||
if (TM.getTargetData()->getPointerSizeInBits() == 64) {
|
: MachOWriter(O, TM) {}
|
||||||
Header.cputype = MachOHeader::HDR_CPU_TYPE_POWERPC64;
|
|
||||||
} else {
|
|
||||||
Header.cputype = MachOHeader::HDR_CPU_TYPE_POWERPC;
|
|
||||||
}
|
|
||||||
Header.cpusubtype = MachOHeader::HDR_CPU_SUBTYPE_POWERPC_ALL;
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual void GetTargetRelocation(MachineRelocation &MR, MachOSection &From,
|
virtual void GetTargetRelocation(MachineRelocation &MR, MachOSection &From,
|
||||||
MachOSection &To);
|
MachOSection &To);
|
||||||
virtual MachineRelocation GetJTRelocation(unsigned Offset,
|
|
||||||
MachineBasicBlock *MBB);
|
|
||||||
|
|
||||||
virtual const char *getPassName() const {
|
|
||||||
return "PowerPC Mach-O Writer";
|
|
||||||
}
|
|
||||||
|
|
||||||
// Constants for the relocation r_type field.
|
// Constants for the relocation r_type field.
|
||||||
// see <mach-o/ppc/reloc.h>
|
// see <mach-o/ppc/reloc.h>
|
||||||
@@ -165,10 +153,3 @@ void PPCMachOWriter::GetTargetRelocation(MachineRelocation &MR,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MachineRelocation PPCMachOWriter::GetJTRelocation(unsigned Offset,
|
|
||||||
MachineBasicBlock *MBB) {
|
|
||||||
// FIXME: do something about PIC
|
|
||||||
return MachineRelocation::getBB(Offset, PPC::reloc_vanilla, MBB);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user