Index: src/x64/ic-x64.cc |
diff --git a/src/x64/ic-x64.cc b/src/x64/ic-x64.cc |
index 6e238c76ecebaf7e5800e54153d57b4587dbd434..85fb1a0c36283b5104c3f760080c8017eb2947a0 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, StackOperandForArgument((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, StackOperandForArgument((argc + 1) * kPointerSize)); |
// Enter an internal frame. |
{ |
@@ -965,7 +965,8 @@ 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 |
+ // Get the receiver of the function from the stack; 1 ~ return address. |
danno
2013/07/31 07:48:37
I don't understand the comment, what do you mean b
|
+ __ movq(rdx, StackOperandForArgument((argc + 1) * kPointerSize)); |
__ JumpIfSmi(rdx, &invoke); |
__ CmpObjectType(rdx, JS_GLOBAL_OBJECT_TYPE, rcx); |
__ j(equal, &global); |
@@ -975,7 +976,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(StackOperandForArgument((argc + 1) * kPointerSize), rdx); |
__ bind(&invoke); |
} |
@@ -1006,7 +1007,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, StackOperandForArgument((argc + 1) * kPointerSize)); |
GenerateMonomorphicCacheProbe(masm, argc, Code::CALL_IC, extra_ic_state); |
GenerateMiss(masm, argc, extra_ic_state); |
} |
@@ -1024,7 +1025,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, StackOperandForArgument((argc + 1) * kPointerSize)); |
Label do_call, slow_call, slow_load; |
Label check_number_dictionary, check_name, lookup_monomorphic_cache; |
@@ -1302,7 +1303,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, StackOperandForArgument((argc + 1) * kPointerSize)); |
danno
2013/07/31 07:48:37
Just to make it even prettier/more readible, how a
|
Operand mapped_location = GenerateMappedArgumentsLookup( |
masm, rdx, rcx, rbx, rax, r8, ¬in, &slow); |
__ movq(rdi, mapped_location); |