aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/PowerPC/PPCRegisterInfo.cpp
diff options
context:
space:
mode:
authorNate Begeman <natebegeman@mac.com>2006-04-11 19:44:43 +0000
committerNate Begeman <natebegeman@mac.com>2006-04-11 19:44:43 +0000
commit218629813a47d3e398f37b5be284e179a0ec855f (patch)
tree8a32b069418c451e01f498a11e2ecd6fb033f55f /lib/Target/PowerPC/PPCRegisterInfo.cpp
parent030514cd96e9b8bb08fd9585d890bd7a5f0dbb77 (diff)
Fix SingleSource/UnitTests/Vector/sumarray-dbl
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27594 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/PowerPC/PPCRegisterInfo.cpp')
-rw-r--r--lib/Target/PowerPC/PPCRegisterInfo.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/Target/PowerPC/PPCRegisterInfo.cpp b/lib/Target/PowerPC/PPCRegisterInfo.cpp
index 963ca055d5..cbc22de621 100644
--- a/lib/Target/PowerPC/PPCRegisterInfo.cpp
+++ b/lib/Target/PowerPC/PPCRegisterInfo.cpp
@@ -397,12 +397,11 @@ void PPCRegisterInfo::emitPrologue(MachineFunction &MF) const {
// If there is a preferred stack alignment, align R1 now
if (MaxAlign > TargetAlign) {
assert(isPowerOf2_32(MaxAlign) && MaxAlign < 32767 && "Invalid alignment!");
- assert(NumBytes <= 32768 && "Unhandled stack size and alignment combo!");
+ assert(isInt16(MaxAlign-NumBytes) && "Unhandled stack size and alignment!");
BuildMI(MBB, MBBI, PPC::RLWINM, 4, PPC::R0)
.addReg(PPC::R1).addImm(0).addImm(32-Log2_32(MaxAlign)).addImm(31);
- BuildMI(MBB, MBBI, PPC::SUBFIC,2,PPC::R0).addReg(PPC::R0).addSImm(MaxAlign);
- BuildMI(MBB, MBBI, PPC::ADDI, 2, PPC::R0).addReg(PPC::R0)
- .addSImm(NegNumbytes);
+ BuildMI(MBB, MBBI, PPC::SUBFIC,2,PPC::R0).addReg(PPC::R0)
+ .addSImm(MaxAlign-NumBytes);
BuildMI(MBB, MBBI, PPC::STWUX, 3)
.addReg(PPC::R1).addReg(PPC::R1).addReg(PPC::R0);
} else if (NumBytes <= 32768) {