diff options
author | Chris Lattner <sabre@nondot.org> | 2002-12-03 20:30:12 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-12-03 20:30:12 +0000 |
commit | d852c15546add6a8a54be154559a377563ebfe18 (patch) | |
tree | 016662a4d5f556a2e4a4d3018ea01d6a9e97c779 /lib/Target/X86/InstSelectSimple.cpp | |
parent | ac676bef500d8cf55e3df47438b133a32b167060 (diff) |
Fix instsel for calls
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4891 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/InstSelectSimple.cpp')
-rw-r--r-- | lib/Target/X86/InstSelectSimple.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/Target/X86/InstSelectSimple.cpp b/lib/Target/X86/InstSelectSimple.cpp index 10fdf0f911..04827f03fc 100644 --- a/lib/Target/X86/InstSelectSimple.cpp +++ b/lib/Target/X86/InstSelectSimple.cpp @@ -389,10 +389,9 @@ ISel::visitCallInst (CallInst & CI) { // 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 @@ ISel::visitCallInst (CallInst & CI) 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. |