Index: src/x64/stub-cache-x64.cc |
diff --git a/src/x64/stub-cache-x64.cc b/src/x64/stub-cache-x64.cc |
index 9bf6e9f2fb34d2ec94d52a3067d33092ff7a2995..06fb11d2523e5b44a82233fbbb6de490910b8784 100644 |
--- a/src/x64/stub-cache-x64.cc |
+++ b/src/x64/stub-cache-x64.cc |
@@ -475,7 +475,7 @@ static void GenerateFastApiCall(MacroAssembler* masm, |
// Prepare arguments. |
STATIC_ASSERT(kFastApiCallArguments == 7); |
- __ lea(rax, Operand(rsp, 1 * kPointerSize)); |
+ __ lea(rax, args.GetArgumentOperand(offset - FCA::kHolderIndex)); |
haitao.feng
2013/12/04 08:04:26
Sorry this one was missed from https://codereview.
|
GenerateFastApiCallBody(masm, optimization, argc, false); |
} |
@@ -495,8 +495,7 @@ static void GenerateFastApiCall(MacroAssembler* masm, |
Register* values) { |
ASSERT(optimization.is_simple_api_call()); |
- // Copy return value. |
- __ pop(scratch1); |
+ __ PopReturnAddressTo(scratch1); |
// receiver |
__ push(receiver); |
@@ -563,9 +562,7 @@ static void GenerateFastApiCall(MacroAssembler* masm, |
ASSERT(!scratch1.is(rax)); |
// store receiver address for GenerateFastApiCallBody |
__ movq(rax, rsp); |
- |
- // return address |
- __ push(scratch1); |
+ __ PushReturnAddressFrom(scratch1); |
GenerateFastApiCallBody(masm, optimization, argc, true); |
} |