[llvm-commits] CVS: llvm/lib/Target/PowerPC/PPC64ISelSimple.cpp

Misha Brukman brukman at cs.uiuc.edu
Thu Aug 19 14:51:29 PDT 2004



Changes in directory llvm/lib/Target/PowerPC:

PPC64ISelSimple.cpp updated: 1.10 -> 1.11
---
Log message:

Stack space for argument passing is 32 regardless of 32- vs. 64-bit arch.
Thanks to Nate Begeman for pointing this out.


---
Diffs of the changes:  (+6 -6)

Index: llvm/lib/Target/PowerPC/PPC64ISelSimple.cpp
diff -u llvm/lib/Target/PowerPC/PPC64ISelSimple.cpp:1.10 llvm/lib/Target/PowerPC/PPC64ISelSimple.cpp:1.11
--- llvm/lib/Target/PowerPC/PPC64ISelSimple.cpp:1.10	Thu Aug 19 16:34:05 2004
+++ llvm/lib/Target/PowerPC/PPC64ISelSimple.cpp	Thu Aug 19 16:51:19 2004
@@ -94,10 +94,10 @@
     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 @@
       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






More information about the llvm-commits mailing list