Index: src/mips/stub-cache-mips.cc |
diff --git a/src/mips/stub-cache-mips.cc b/src/mips/stub-cache-mips.cc |
index 3d4617a0a7d6d775c1523ac7b2cc765bfc746d99..6c38e904c4c7c14305f7aa4482f57c412204b412 100644 |
--- a/src/mips/stub-cache-mips.cc |
+++ b/src/mips/stub-cache-mips.cc |
@@ -899,12 +899,12 @@ static void GenerateFastApiCall(MacroAssembler* masm, |
__ sw(receiver, MemOperand(sp, FCA::kHolderIndex * kPointerSize)); |
// Write receiver to stack frame. |
int index = stack_space - 1; |
- __ sw(receiver, MemOperand(sp, index * kPointerSize)); |
+ __ sw(receiver, MemOperand(sp, index-- * kPointerSize)); |
// Write the arguments to stack frame. |
for (int i = 0; i < argc; i++) { |
ASSERT(!receiver.is(values[i])); |
ASSERT(!scratch.is(values[i])); |
- __ sw(receiver, MemOperand(sp, index-- * kPointerSize)); |
+ __ sw(values[i], MemOperand(sp, index-- * kPointerSize)); |
} |
GenerateFastApiDirectCall(masm, optimization, argc, true); |