forked from OSchip/llvm-project
parent
fe3e46a0b3
commit
ba7fe16dbf
|
@ -36,8 +36,8 @@ namespace llvm {
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
const std::string PPC32 = "PowerPC/32bit";
|
const std::string PPC32ID = "PowerPC/32bit";
|
||||||
const std::string PPC64 = "PowerPC/64bit";
|
const std::string PPC64ID = "PowerPC/64bit";
|
||||||
|
|
||||||
// Register the targets
|
// Register the targets
|
||||||
RegisterTarget<PPC32TargetMachine>
|
RegisterTarget<PPC32TargetMachine>
|
||||||
|
@ -50,9 +50,8 @@ PowerPCTargetMachine::PowerPCTargetMachine(const std::string &name,
|
||||||
IntrinsicLowering *IL,
|
IntrinsicLowering *IL,
|
||||||
const TargetData &TD,
|
const TargetData &TD,
|
||||||
const PowerPCFrameInfo &TFI,
|
const PowerPCFrameInfo &TFI,
|
||||||
const PowerPCJITInfo &TJI,
|
const PowerPCJITInfo &TJI)
|
||||||
bool is64b)
|
: TargetMachine(name, IL, TD), FrameInfo(TFI), JITInfo(TJI)
|
||||||
: TargetMachine(name, IL, TD), InstrInfo(is64b), FrameInfo(TFI), JITInfo(TJI)
|
|
||||||
{}
|
{}
|
||||||
|
|
||||||
unsigned PowerPCTargetMachine::getJITMatchQuality() {
|
unsigned PowerPCTargetMachine::getJITMatchQuality() {
|
||||||
|
@ -105,7 +104,7 @@ bool PowerPCTargetMachine::addPassesToEmitAssembly(PassManager &PM,
|
||||||
if (AIX)
|
if (AIX)
|
||||||
PM.add(createPPC64AsmPrinter(Out, *this));
|
PM.add(createPPC64AsmPrinter(Out, *this));
|
||||||
else
|
else
|
||||||
PM.add(createPPCAsmPrinter(Out, *this));
|
PM.add(createPPC32AsmPrinter(Out, *this));
|
||||||
|
|
||||||
PM.add(createMachineCodeDeleter());
|
PM.add(createMachineCodeDeleter());
|
||||||
return false;
|
return false;
|
||||||
|
@ -143,18 +142,17 @@ void *PowerPCJITInfo::getJITStubForFunction(Function *F,
|
||||||
|
|
||||||
/// PowerPCTargetMachine ctor - Create an ILP32 architecture model
|
/// PowerPCTargetMachine ctor - Create an ILP32 architecture model
|
||||||
///
|
///
|
||||||
PPC32TargetMachine::PPC32TargetMachine(const Module &M,
|
PPC32TargetMachine::PPC32TargetMachine(const Module &M, IntrinsicLowering *IL)
|
||||||
IntrinsicLowering *IL)
|
: PowerPCTargetMachine(PPC32ID, IL,
|
||||||
: PowerPCTargetMachine(PPC32, IL,
|
TargetData(PPC32ID,false,4,4,4,4,4,4,2,1,4),
|
||||||
TargetData(PPC32,false,4,4,4,4,4,4,2,1,4),
|
PowerPCFrameInfo(*this), PPC32JITInfo(*this)) {}
|
||||||
PowerPCFrameInfo(*this), PPC32JITInfo(*this), false) {}
|
|
||||||
|
|
||||||
/// PPC64TargetMachine ctor - Create a LP64 architecture model
|
/// PPC64TargetMachine ctor - Create a LP64 architecture model
|
||||||
///
|
///
|
||||||
PPC64TargetMachine::PPC64TargetMachine(const Module &M, IntrinsicLowering *IL)
|
PPC64TargetMachine::PPC64TargetMachine(const Module &M, IntrinsicLowering *IL)
|
||||||
: PowerPCTargetMachine(PPC64, IL,
|
: PowerPCTargetMachine(PPC64ID, IL,
|
||||||
TargetData(PPC64,false,8,4,4,4,4,4,2,1,4),
|
TargetData(PPC64ID,false,8,4,4,4,4,4,2,1,4),
|
||||||
PowerPCFrameInfo(*this), PPC64JITInfo(*this), true) {}
|
PowerPCFrameInfo(*this), PPC64JITInfo(*this)) {}
|
||||||
|
|
||||||
unsigned PPC32TargetMachine::getModuleMatchQuality(const Module &M) {
|
unsigned PPC32TargetMachine::getModuleMatchQuality(const Module &M) {
|
||||||
if (M.getEndianness() == Module::BigEndian &&
|
if (M.getEndianness() == Module::BigEndian &&
|
||||||
|
|
Loading…
Reference in New Issue