Index: src/x64/stub-cache-x64.cc |
diff --git a/src/x64/stub-cache-x64.cc b/src/x64/stub-cache-x64.cc |
index 499ccdf24caeadb9b648cf5a846633241de815e6..0898d27ff7d20f641654eb5932bb1048b83e161e 100644 |
--- a/src/x64/stub-cache-x64.cc |
+++ b/src/x64/stub-cache-x64.cc |
@@ -406,9 +406,9 @@ static void ReserveSpaceForFastApiCall(MacroAssembler* masm, Register scratch) { |
// -- rsp[0] : return address |
// -- rsp[8] : last argument in the internal frame of the caller |
// ----------------------------------- |
- __ movq(scratch, StackOperandForReturnAddress(0)); |
+ __ MoveReturnAddress(scratch, Operand(rsp, 0)); |
__ subq(rsp, Immediate(kFastApiCallArguments * kPointerSize)); |
- __ movq(StackOperandForReturnAddress(0), scratch); |
+ __ MoveReturnAddress(Operand(rsp, 0), scratch); |
__ Move(scratch, Smi::FromInt(0)); |
StackArgumentsAccessor args(rsp, kFastApiCallArguments, |
ARGUMENTS_DONT_CONTAIN_RECEIVER); |
@@ -429,8 +429,8 @@ static void FreeSpaceForFastApiCall(MacroAssembler* masm, Register scratch) { |
// -- rsp[kFastApiCallArguments * 8 + 8] : last argument in the internal |
// frame. |
// ----------------------------------- |
- __ movq(scratch, StackOperandForReturnAddress(0)); |
- __ movq(StackOperandForReturnAddress(kFastApiCallArguments * kPointerSize), |
+ __ MoveReturnAddress(scratch, Operand(rsp, 0)); |
+ __ MoveReturnAddress(Operand(rsp, kFastApiCallArguments * kPointerSize), |
scratch); |
__ addq(rsp, Immediate(kPointerSize * kFastApiCallArguments)); |
} |
@@ -547,10 +547,10 @@ static void GenerateFastApiCall(MacroAssembler* masm, |
// argc + 1 is the argument number before FastApiCall arguments, 1 ~ receiver |
const int kHolderIndex = argc + 1 + |
kFastApiCallArguments - 1 - FunctionCallbackArguments::kHolderIndex; |
- __ movq(scratch, StackOperandForReturnAddress(0)); |
+ __ MoveReturnAddress(scratch, Operand(rsp, 0)); |
// Assign stack space for the call arguments and receiver. |
__ subq(rsp, Immediate((fast_api_call_argc + 1) * kPointerSize)); |
- __ movq(StackOperandForReturnAddress(0), scratch); |
+ __ MoveReturnAddress(Operand(rsp, 0), scratch); |
// Write holder to stack frame. |
__ movq(args.GetArgumentOperand(kHolderIndex), receiver); |
__ movq(args.GetReceiverOperand(), receiver); |
@@ -2490,9 +2490,8 @@ Handle<Code> CallStubCompiler::CompileFastApiCall( |
name, depth, &miss); |
// Move the return address on top of the stack. |
- __ movq(rax, |
- StackOperandForReturnAddress(kFastApiCallArguments * kPointerSize)); |
- __ movq(StackOperandForReturnAddress(0), rax); |
+ __ MoveReturnAddress(rax, Operand(rsp, kFastApiCallArguments * kPointerSize)); |
+ __ MoveReturnAddress(Operand(rsp, 0), rax); |
GenerateFastApiCall(masm(), optimization, argc, false); |