diff options
author | Chris Lattner <sabre@nondot.org> | 2006-11-18 01:34:43 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2006-11-18 01:34:43 +0000 |
commit | 572e238c1485a5aa7b477bce53d5a72cfd4b72ad (patch) | |
tree | 9175987c3564865c6558d9be2cec469db4c53abe | |
parent | 9ca15c891474e0f7112b5688d480c7c0429dd06d (diff) | |
download | bcm5719-llvm-572e238c1485a5aa7b477bce53d5a72cfd4b72ad.tar.gz bcm5719-llvm-572e238c1485a5aa7b477bce53d5a72cfd4b72ad.zip |
make sure to safe LR8 in the right stack slot for PPC64
llvm-svn: 31839
-rw-r--r-- | llvm/lib/Target/PowerPC/PPCFrameInfo.h | 9 | ||||
-rw-r--r-- | llvm/lib/Target/PowerPC/PPCTargetMachine.cpp | 2 |
2 files changed, 8 insertions, 3 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCFrameInfo.h b/llvm/lib/Target/PowerPC/PPCFrameInfo.h index ed67496e55d..1330034f5ad 100644 --- a/llvm/lib/Target/PowerPC/PPCFrameInfo.h +++ b/llvm/lib/Target/PowerPC/PPCFrameInfo.h @@ -26,8 +26,13 @@ class PPCFrameInfo: public TargetFrameInfo { public: PPCFrameInfo(const TargetMachine &tm, bool LP64) : TargetFrameInfo(TargetFrameInfo::StackGrowsDown, 16, 0), TM(tm) { - LR[0].first = PPC::LR; - LR[0].second = LP64 ? 16 : 8; + if (LP64) { + LR[0].first = PPC::LR8; + LR[0].second = 16; + } else { + LR[0].first = PPC::LR; + LR[0].second = 8; + } } const std::pair<unsigned, int> * diff --git a/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp b/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp index 954d15c5b69..dde998f5a7f 100644 --- a/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp +++ b/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp @@ -83,7 +83,7 @@ PPCTargetMachine::PPCTargetMachine(const Module &M, const std::string &FS, bool is64Bit) : Subtarget(M, FS, is64Bit), DataLayout(Subtarget.getTargetDataString()), InstrInfo(*this), - FrameInfo(*this, false), JITInfo(*this, is64Bit), TLInfo(*this), + FrameInfo(*this, is64Bit), JITInfo(*this, is64Bit), TLInfo(*this), InstrItins(Subtarget.getInstrItineraryData()) { if (getRelocationModel() == Reloc::Default) |