[llvm-commits] CVS: llvm/lib/Target/X86/InstSelectSimple.cpp

Chris Lattner lattner at cs.uiuc.edu
Tue Dec 3 14:31:03 PST 2002


Changes in directory llvm/lib/Target/X86:

InstSelectSimple.cpp updated: 1.44 -> 1.45

---
Log message:

Fix instsel for calls


---
Diffs of the changes:

Index: llvm/lib/Target/X86/InstSelectSimple.cpp
diff -u llvm/lib/Target/X86/InstSelectSimple.cpp:1.44 llvm/lib/Target/X86/InstSelectSimple.cpp:1.45
--- llvm/lib/Target/X86/InstSelectSimple.cpp:1.44	Tue Dec  3 12:15:59 2002
+++ llvm/lib/Target/X86/InstSelectSimple.cpp	Tue Dec  3 14:30:12 2002
@@ -389,10 +389,9 @@
 {
   // Push the arguments on the stack in reverse order, as specified by
   // the ABI.
-  for (unsigned i = CI.getNumOperands (); i >= 1; --i)
+  for (unsigned i = CI.getNumOperands()-1; i >= 1; --i)
     {
       Value *v = CI.getOperand (i);
-      unsigned argReg = getReg (v);
       switch (getClass (v->getType ()))
 	{
 	case cByte:
@@ -404,7 +403,7 @@
 	  break;
 	case cInt:
 	case cFloat:
-	  BuildMI (BB, X86::PUSHr32, 1).addReg (argReg);
+	  BuildMI (BB, X86::PUSHr32, 1).addReg(getReg(v));
 	  break;
 	default:
 	  // FIXME: long/ulong/double args not handled.





More information about the llvm-commits mailing list