Fix problem with insertion point for ADJCALLSTACKDOWN.
authorBrian Gaeke <gaeke@uiuc.edu>
Sun, 14 Nov 2004 06:32:08 +0000 (06:32 +0000)
committerBrian Gaeke <gaeke@uiuc.edu>
Sun, 14 Nov 2004 06:32:08 +0000 (06:32 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17733 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/Sparc/SparcV8ISelSimple.cpp
lib/Target/SparcV8/SparcV8ISelSimple.cpp

index 6999affa74204d3c7e017b7d9d558597788e3cdf..1a67ebb36c7056f768249f1e94df0762dbb9056e 100644 (file)
@@ -789,10 +789,9 @@ void V8ISel::visitCallInst(CallInst &I) {
   const unsigned *OAREnd = &OutgoingArgRegs[6];
   const unsigned *OAR = &OutgoingArgRegs[0];
   unsigned ArgOffset = 68;
+  if (extraStack) BuildMI (BB, V8::ADJCALLSTACKDOWN, 1).addImm (extraStack);
   for (unsigned i = 1; i < I.getNumOperands (); ++i) {
     unsigned ArgReg = getReg (I.getOperand (i));
-    if (i == 7 && extraStack)
-      BuildMI (BB, V8::ADJCALLSTACKDOWN, 1).addImm (extraStack);
     if (getClassB (I.getOperand (i)->getType ()) < cLong) {
       // Schlep it over into the incoming arg register
       if (ArgOffset < 92) {
index 6999affa74204d3c7e017b7d9d558597788e3cdf..1a67ebb36c7056f768249f1e94df0762dbb9056e 100644 (file)
@@ -789,10 +789,9 @@ void V8ISel::visitCallInst(CallInst &I) {
   const unsigned *OAREnd = &OutgoingArgRegs[6];
   const unsigned *OAR = &OutgoingArgRegs[0];
   unsigned ArgOffset = 68;
+  if (extraStack) BuildMI (BB, V8::ADJCALLSTACKDOWN, 1).addImm (extraStack);
   for (unsigned i = 1; i < I.getNumOperands (); ++i) {
     unsigned ArgReg = getReg (I.getOperand (i));
-    if (i == 7 && extraStack)
-      BuildMI (BB, V8::ADJCALLSTACKDOWN, 1).addImm (extraStack);
     if (getClassB (I.getOperand (i)->getType ()) < cLong) {
       // Schlep it over into the incoming arg register
       if (ArgOffset < 92) {