[llvm-commits] CVS: llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp
Jim Laskey
jlaskey at apple.com
Sat Nov 11 14:22:22 PST 2006
Changes in directory llvm/lib/Target/PowerPC:
PPCRegisterInfo.cpp updated: 1.79 -> 1.80
---
Log message:
Make sure stack link is set in 64-bit.
---
Diffs of the changes: (+9 -3)
PPCRegisterInfo.cpp | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
Index: llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp
diff -u llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp:1.79 llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp:1.80
--- llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp:1.79 Sat Nov 11 13:05:28 2006
+++ llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp Sat Nov 11 16:22:07 2006
@@ -396,9 +396,15 @@
// Replace the pseudo instruction with a new instruction...
if (Old->getOpcode() == PPC::ADJCALLSTACKDOWN) {
- BuildMI(MBB, I, PPC::LWZ, 2, PPC::R0).addImm(0).addReg(PPC::R31);
- BuildMI(MBB, I, PPC::STWU, 3)
- .addReg(PPC::R0).addImm(-Amount).addReg(PPC::R1);
+ if (!Subtarget.isPPC64()) {
+ BuildMI(MBB, I, PPC::LWZ, 2, PPC::R0).addImm(0).addReg(PPC::R31);
+ BuildMI(MBB, I, PPC::STWU, 3)
+ .addReg(PPC::R0).addImm(-Amount).addReg(PPC::R1);
+ } else {
+ BuildMI(MBB, I, PPC::LD, 2, PPC::X0).addImm(0).addReg(PPC::X31);
+ BuildMI(MBB, I, PPC::STDU, 3)
+ .addReg(PPC::X0).addImm(-Amount/4).addReg(PPC::X1);
+ }
} else {
assert(Old->getOpcode() == PPC::ADJCALLSTACKUP);
BuildMI(MBB, I, PPC::ADDI, 2, PPC::R1).addReg(PPC::R1).addImm(Amount);
More information about the llvm-commits
mailing list