diff options
author | Nate Begeman <natebegeman@mac.com> | 2004-08-16 01:50:22 +0000 |
---|---|---|
committer | Nate Begeman <natebegeman@mac.com> | 2004-08-16 01:50:22 +0000 |
commit | 8b44a072468c44af3c2b3d5f722d340d00b6e198 (patch) | |
tree | 6c6aa93af5d7de45b014947cb296578ef67f8c3e | |
parent | 8af61ddb960dfe4a71d7b130fa3ca87c94ecc1cf (diff) | |
download | bcm5719-llvm-8b44a072468c44af3c2b3d5f722d340d00b6e198.tar.gz bcm5719-llvm-8b44a072468c44af3c2b3d5f722d340d00b6e198.zip |
Fix mismatched adjust down/up of SP in functions that contain variable
sized allocas.
llvm-svn: 15806
-rw-r--r-- | llvm/lib/Target/PowerPC/PPC32ISelSimple.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Target/PowerPC/PPC32ISelSimple.cpp b/llvm/lib/Target/PowerPC/PPC32ISelSimple.cpp index 4e474e4eb88..b1251d5d782 100644 --- a/llvm/lib/Target/PowerPC/PPC32ISelSimple.cpp +++ b/llvm/lib/Target/PowerPC/PPC32ISelSimple.cpp @@ -1439,9 +1439,9 @@ void ISel::doCall(const ValueRecord &Ret, MachineInstr *CallMI, 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 @@ void ISel::doCall(const ValueRecord &Ret, MachineInstr *CallMI, 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); |