diff options
author | Misha Brukman <brukman+llvm@gmail.com> | 2004-08-19 21:51:19 +0000 |
---|---|---|
committer | Misha Brukman <brukman+llvm@gmail.com> | 2004-08-19 21:51:19 +0000 |
commit | 170943a795444e1a865bdaa4b5e6ad4b9674460e (patch) | |
tree | bfa0f4550a1ab5538ee34c0e19af67124c936f97 /llvm/lib/Target/PowerPC/PPC64ISelSimple.cpp | |
parent | f73c87b36ce9971787b1d243327e3db6522cdcbb (diff) | |
download | bcm5719-llvm-170943a795444e1a865bdaa4b5e6ad4b9674460e.tar.gz bcm5719-llvm-170943a795444e1a865bdaa4b5e6ad4b9674460e.zip |
Stack space for argument passing is 32 regardless of 32- vs. 64-bit arch.
Thanks to Nate Begeman for pointing this out.
llvm-svn: 15930
Diffstat (limited to 'llvm/lib/Target/PowerPC/PPC64ISelSimple.cpp')
-rw-r--r-- | llvm/lib/Target/PowerPC/PPC64ISelSimple.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/llvm/lib/Target/PowerPC/PPC64ISelSimple.cpp b/llvm/lib/Target/PowerPC/PPC64ISelSimple.cpp index f80c569d328..b2dd07e5138 100644 --- a/llvm/lib/Target/PowerPC/PPC64ISelSimple.cpp +++ b/llvm/lib/Target/PowerPC/PPC64ISelSimple.cpp @@ -94,10 +94,10 @@ namespace { std::map<AllocaInst*, unsigned> AllocaMap; // Target configuration data - const unsigned ParameterSaveAreaOffset; + const unsigned ParameterSaveAreaOffset, MaxArgumentStackSpace; ISel(TargetMachine &tm) : TM(reinterpret_cast<PPC64TargetMachine&>(tm)), - F(0), BB(0), ParameterSaveAreaOffset(24) {} + F(0), BB(0), ParameterSaveAreaOffset(24), MaxArgumentStackSpace(32) {} bool doInitialization(Module &M) { // Add external functions that we may call @@ -1290,10 +1290,10 @@ void ISel::doCall(const ValueRecord &Ret, MachineInstr *CallMI, default: assert(0 && "Unknown class!"); } - // Just to be safe, we'll always reserve the full 64 bytes worth of - // argument passing space in case any called code gets funky on us. - if (NumBytes < ParameterSaveAreaOffset + 64) - NumBytes = ParameterSaveAreaOffset + 64; + // Just to be safe, we'll always reserve the full argument passing space in + // case any called code gets funky on us. + if (NumBytes < ParameterSaveAreaOffset + MaxArgumentStackSpace) + NumBytes = ParameterSaveAreaOffset + MaxArgumentStackSpace; // Adjust the stack pointer for the new arguments... // These functions are automatically eliminated by the prolog/epilog pass |