mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-19 19:29:31 +00:00
Implement getModuleMatchQuality and getJITMatchQuality() for PowerPC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14780 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
878ba7cc5d
commit
01eca8d2c2
@ -28,6 +28,26 @@ namespace {
|
||||
RegisterTarget<PowerPCTargetMachine> X("powerpc", " PowerPC (experimental)");
|
||||
}
|
||||
|
||||
unsigned PowerPCTargetMachine::getJITMatchQuality() {
|
||||
#if defined(__POWERPC__) || defined (__ppc__) || defined(_POWER)
|
||||
return 10;
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
unsigned PowerPCTargetMachine::getModuleMatchQuality(const Module &M) {
|
||||
if (M.getEndianness() == Module::BigEndian &&
|
||||
M.getPointerSize() == Module::Pointer32)
|
||||
return 10; // Direct match
|
||||
else if (M.getEndianness() != Module::AnyEndianness ||
|
||||
M.getPointerSize() != Module::AnyPointerSize)
|
||||
return 0; // Match for some other target
|
||||
|
||||
return getJITMatchQuality()/2;
|
||||
}
|
||||
|
||||
|
||||
/// PowerPCTargetMachine ctor - Create an ILP32 architecture model
|
||||
///
|
||||
/// FIXME: Should double alignment be 8 bytes? Then we get a PtrAl != DoubleAl
|
||||
|
@ -50,6 +50,9 @@ public:
|
||||
MachineCodeEmitter &MCE);
|
||||
|
||||
virtual bool addPassesToEmitAssembly(PassManager &PM, std::ostream &Out);
|
||||
|
||||
static unsigned getModuleMatchQuality(const Module &M);
|
||||
static unsigned getJITMatchQuality();
|
||||
};
|
||||
|
||||
} // end namespace llvm
|
||||
|
Loading…
Reference in New Issue
Block a user