Index: src/x64/ic-x64.cc |
diff --git a/src/x64/ic-x64.cc b/src/x64/ic-x64.cc |
index f26b234fed68c324b451c934cb50d568588e9aba..af4382ea03d2c7301f5e2bc6d9d71b65802bf00d 100644 |
--- a/src/x64/ic-x64.cc |
+++ b/src/x64/ic-x64.cc |
@@ -905,7 +905,7 @@ void CallICBase::GenerateNormal(MacroAssembler* masm, int argc) { |
Label miss; |
// Get the receiver of the function from the stack. |
- __ movq(rdx, Operand(rsp, (argc + 1) * kPointerSize)); |
+ __ movq(rdx, StackArgumentOperand((argc + 1) * kPointerSize)); |
GenerateNameDictionaryReceiverCheck(masm, rdx, rax, rbx, &miss); |
@@ -941,7 +941,7 @@ void CallICBase::GenerateMiss(MacroAssembler* masm, |
} |
// Get the receiver of the function from the stack; 1 ~ return address. |
- __ movq(rdx, Operand(rsp, (argc + 1) * kPointerSize)); |
+ __ movq(rdx, StackArgumentOperand((argc + 1) * kPointerSize)); |
// Enter an internal frame. |
{ |
@@ -965,7 +965,7 @@ void CallICBase::GenerateMiss(MacroAssembler* masm, |
// This can happen only for regular CallIC but not KeyedCallIC. |
if (id == IC::kCallIC_Miss) { |
Label invoke, global; |
- __ movq(rdx, Operand(rsp, (argc + 1) * kPointerSize)); // receiver |
+ __ movq(rdx, StackArgumentOperand((argc + 1) * kPointerSize)); // receiver |
__ JumpIfSmi(rdx, &invoke); |
__ CmpObjectType(rdx, JS_GLOBAL_OBJECT_TYPE, rcx); |
__ j(equal, &global); |
@@ -975,7 +975,7 @@ void CallICBase::GenerateMiss(MacroAssembler* masm, |
// Patch the receiver on the stack. |
__ bind(&global); |
__ movq(rdx, FieldOperand(rdx, GlobalObject::kGlobalReceiverOffset)); |
- __ movq(Operand(rsp, (argc + 1) * kPointerSize), rdx); |
+ __ movq(StackArgumentOperand((argc + 1) * kPointerSize), rdx); |
__ bind(&invoke); |
} |
@@ -1006,7 +1006,7 @@ void CallIC::GenerateMegamorphic(MacroAssembler* masm, |
// ----------------------------------- |
// Get the receiver of the function from the stack; 1 ~ return address. |
- __ movq(rdx, Operand(rsp, (argc + 1) * kPointerSize)); |
+ __ movq(rdx, StackArgumentOperand((argc + 1) * kPointerSize)); |
GenerateMonomorphicCacheProbe(masm, argc, Code::CALL_IC, extra_ic_state); |
GenerateMiss(masm, argc, extra_ic_state); |
} |
@@ -1024,7 +1024,7 @@ void KeyedCallIC::GenerateMegamorphic(MacroAssembler* masm, int argc) { |
// ----------------------------------- |
// Get the receiver of the function from the stack; 1 ~ return address. |
- __ movq(rdx, Operand(rsp, (argc + 1) * kPointerSize)); |
+ __ movq(rdx, StackArgumentOperand((argc + 1) * kPointerSize)); |
Label do_call, slow_call, slow_load; |
Label check_number_dictionary, check_name, lookup_monomorphic_cache; |
@@ -1302,7 +1302,7 @@ void KeyedCallIC::GenerateNonStrictArguments(MacroAssembler* masm, |
// rsp[(argc + 1) * 8] : argument 0 = receiver |
// ----------------------------------- |
Label slow, notin; |
- __ movq(rdx, Operand(rsp, (argc + 1) * kPointerSize)); |
+ __ movq(rdx, StackArgumentOperand((argc + 1) * kPointerSize)); |
Operand mapped_location = GenerateMappedArgumentsLookup( |
masm, rdx, rcx, rbx, rax, r8, ¬in, &slow); |
__ movq(rdi, mapped_location); |