LR needs to be saved at 16-byte offset on a 64-bit arch

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15929 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Misha Brukman 2004-08-19 21:36:14 +00:00
parent 4debafbea4
commit 983e92dc0d
2 changed files with 6 additions and 6 deletions

View File

@ -25,10 +25,10 @@ class PowerPCFrameInfo: public TargetFrameInfo {
std::pair<unsigned, int> LR[1]; std::pair<unsigned, int> LR[1];
public: public:
PowerPCFrameInfo(const TargetMachine &tm) PowerPCFrameInfo(const TargetMachine &tm, bool LP64)
: TargetFrameInfo(TargetFrameInfo::StackGrowsDown, 16, 0), TM(tm) { : TargetFrameInfo(TargetFrameInfo::StackGrowsDown, 16, 0), TM(tm) {
LR[0].first = PPC::LR; LR[0].first = PPC::LR;
LR[0].second = 8; LR[0].second = LP64 ? 16 : 8;
} }
const std::pair<unsigned, int> * const std::pair<unsigned, int> *

View File

@ -42,8 +42,8 @@ namespace {
// Register the targets // Register the targets
RegisterTarget<PPC32TargetMachine> RegisterTarget<PPC32TargetMachine>
X("ppc32", " PowerPC 32-bit (experimental)"); X("ppc32", " PowerPC 32-bit (experimental)");
//RegisterTarget<PPC64TargetMachine> RegisterTarget<PPC64TargetMachine>
//Y("ppc64", " PowerPC 64-bit (unimplemented)"); Y("ppc64", " PowerPC 64-bit (unimplemented)");
} }
PowerPCTargetMachine::PowerPCTargetMachine(const std::string &name, PowerPCTargetMachine::PowerPCTargetMachine(const std::string &name,
@ -145,14 +145,14 @@ void *PowerPCJITInfo::getJITStubForFunction(Function *F,
PPC32TargetMachine::PPC32TargetMachine(const Module &M, IntrinsicLowering *IL) PPC32TargetMachine::PPC32TargetMachine(const Module &M, IntrinsicLowering *IL)
: PowerPCTargetMachine(PPC32ID, IL, : PowerPCTargetMachine(PPC32ID, IL,
TargetData(PPC32ID,false,4,4,4,4,4,4,2,1,4), TargetData(PPC32ID,false,4,4,4,4,4,4,2,1,4),
PowerPCFrameInfo(*this), PPC32JITInfo(*this)) {} PowerPCFrameInfo(*this, false), PPC32JITInfo(*this)) {}
/// 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(PPC64ID, IL, : PowerPCTargetMachine(PPC64ID, IL,
TargetData(PPC64ID,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)) {} PowerPCFrameInfo(*this, true), PPC64JITInfo(*this)) {}
unsigned PPC32TargetMachine::getModuleMatchQuality(const Module &M) { unsigned PPC32TargetMachine::getModuleMatchQuality(const Module &M) {
if (M.getEndianness() == Module::BigEndian && if (M.getEndianness() == Module::BigEndian &&