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 | 865075ed350ec6cee8ccd6723362dc5aa3823b25 (patch) | |
tree | 0f8a9a5081c6455ec843f504cce5e0462a95b46d /lib/Target/PowerPC/PPC32ISelSimple.cpp | |
parent | 26693113201f4c9d441678e50d96f38d3288798e (diff) |
Fix mismatched adjust down/up of SP in functions that contain variable
sized allocas.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15806 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/PowerPC/PPC32ISelSimple.cpp')
-rw-r--r-- | lib/Target/PowerPC/PPC32ISelSimple.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Target/PowerPC/PPC32ISelSimple.cpp b/lib/Target/PowerPC/PPC32ISelSimple.cpp index 4e474e4eb8..b1251d5d78 100644 --- a/lib/Target/PowerPC/PPC32ISelSimple.cpp +++ b/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); |