diff options
author | Misha Brukman <brukman+llvm@gmail.com> | 2004-08-19 21:36:14 +0000 |
---|---|---|
committer | Misha Brukman <brukman+llvm@gmail.com> | 2004-08-19 21:36:14 +0000 |
commit | f73c87b36ce9971787b1d243327e3db6522cdcbb (patch) | |
tree | 1c3877b2d68c2ef4b58ad82b28e48b99daa8a47d /llvm/lib | |
parent | f35b35a926f3531ae1747813834a43406a9c3af3 (diff) | |
download | bcm5719-llvm-f73c87b36ce9971787b1d243327e3db6522cdcbb.tar.gz bcm5719-llvm-f73c87b36ce9971787b1d243327e3db6522cdcbb.zip |
LR needs to be saved at 16-byte offset on a 64-bit arch
llvm-svn: 15929
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Target/PowerPC/PowerPCFrameInfo.h | 4 | ||||
-rw-r--r-- | llvm/lib/Target/PowerPC/PowerPCTargetMachine.cpp | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/llvm/lib/Target/PowerPC/PowerPCFrameInfo.h b/llvm/lib/Target/PowerPC/PowerPCFrameInfo.h index b0bba7979ab..423de2978ed 100644 --- a/llvm/lib/Target/PowerPC/PowerPCFrameInfo.h +++ b/llvm/lib/Target/PowerPC/PowerPCFrameInfo.h @@ -25,10 +25,10 @@ class PowerPCFrameInfo: public TargetFrameInfo { std::pair<unsigned, int> LR[1]; public: - PowerPCFrameInfo(const TargetMachine &tm) + PowerPCFrameInfo(const TargetMachine &tm, bool LP64) : TargetFrameInfo(TargetFrameInfo::StackGrowsDown, 16, 0), TM(tm) { LR[0].first = PPC::LR; - LR[0].second = 8; + LR[0].second = LP64 ? 16 : 8; } const std::pair<unsigned, int> * diff --git a/llvm/lib/Target/PowerPC/PowerPCTargetMachine.cpp b/llvm/lib/Target/PowerPC/PowerPCTargetMachine.cpp index b7e45a3e0b8..084eb3d1572 100644 --- a/llvm/lib/Target/PowerPC/PowerPCTargetMachine.cpp +++ b/llvm/lib/Target/PowerPC/PowerPCTargetMachine.cpp @@ -42,8 +42,8 @@ namespace { // Register the targets RegisterTarget<PPC32TargetMachine> X("ppc32", " PowerPC 32-bit (experimental)"); - //RegisterTarget<PPC64TargetMachine> - //Y("ppc64", " PowerPC 64-bit (unimplemented)"); + RegisterTarget<PPC64TargetMachine> + Y("ppc64", " PowerPC 64-bit (unimplemented)"); } PowerPCTargetMachine::PowerPCTargetMachine(const std::string &name, @@ -145,14 +145,14 @@ void *PowerPCJITInfo::getJITStubForFunction(Function *F, PPC32TargetMachine::PPC32TargetMachine(const Module &M, IntrinsicLowering *IL) : PowerPCTargetMachine(PPC32ID, IL, 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::PPC64TargetMachine(const Module &M, IntrinsicLowering *IL) : PowerPCTargetMachine(PPC64ID, IL, 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) { if (M.getEndianness() == Module::BigEndian && |