[llvm-commits] CVS: llvm/lib/Target/PowerPC/PPC32ISelSimple.cpp
Nate Begeman
natebegeman at mac.com
Sun Aug 15 18:50:33 PDT 2004
Changes in directory llvm/lib/Target/PowerPC:
PPC32ISelSimple.cpp updated: 1.65 -> 1.66
---
Log message:
Fix mismatched adjust down/up of SP in functions that contain variable
sized allocas.
---
Diffs of the changes: (+4 -4)
Index: llvm/lib/Target/PowerPC/PPC32ISelSimple.cpp
diff -u llvm/lib/Target/PowerPC/PPC32ISelSimple.cpp:1.65 llvm/lib/Target/PowerPC/PPC32ISelSimple.cpp:1.66
--- llvm/lib/Target/PowerPC/PPC32ISelSimple.cpp:1.65 Sun Aug 15 01:42:28 2004
+++ llvm/lib/Target/PowerPC/PPC32ISelSimple.cpp Sun Aug 15 20:50:22 2004
@@ -1439,9 +1439,9 @@
default: assert(0 && "Unknown class!");
}
- // Just to be safe, we'll always reserve the full 32 bytes worth of
- // argument passing space in case any called code gets funky on us.
- if (NumBytes < 24 + 32) NumBytes = 24 + 32;
+ // Just to be safe, we'll always reserve the full 24 bytes of linkage area
+ // plus 32 bytes of argument space in case any called code gets funky on us.
+ if (NumBytes < 56) NumBytes = 56;
// Adjust the stack pointer for the new arguments...
// These functions are automatically eliminated by the prolog/epilog pass
@@ -1586,7 +1586,7 @@
GPR_idx++;
}
} else {
- BuildMI(BB, PPC::ADJCALLSTACKDOWN, 1).addImm(0);
+ BuildMI(BB, PPC::ADJCALLSTACKDOWN, 1).addImm(NumBytes);
}
BuildMI(BB, PPC::IMPLICIT_DEF, 0, PPC::LR);
More information about the llvm-commits
mailing list