Index: src/x64/code-stubs-x64.cc |
=================================================================== |
--- src/x64/code-stubs-x64.cc (revision 5846) |
+++ src/x64/code-stubs-x64.cc (working copy) |
@@ -2483,20 +2483,6 @@ |
} |
-void ApiGetterEntryStub::Generate(MacroAssembler* masm) { |
- __ PrepareCallApiFunction(kStackSpace); |
-#ifdef _WIN64 |
- // All the parameters should be set up by a caller. |
-#else |
- // Set 1st parameter register with property name. |
- __ movq(rsi, rdx); |
- // Second parameter register rdi should be set with pointer to AccessorInfo |
- // by a caller. |
-#endif |
- __ CallApiFunctionAndReturn(fun()); |
-} |
- |
- |
void CEntryStub::GenerateCore(MacroAssembler* masm, |
Label* throw_normal_exception, |
Label* throw_termination_exception, |
@@ -2549,18 +2535,18 @@ |
#ifdef _WIN64 |
// Windows 64-bit ABI passes arguments in rcx, rdx, r8, r9 |
// Store Arguments object on stack, below the 4 WIN64 ABI parameter slots. |
- __ movq(Operand(rsp, 4 * kPointerSize), r14); // argc. |
- __ movq(Operand(rsp, 5 * kPointerSize), r12); // argv. |
+ __ movq(StackSpaceOperand(0), r14); // argc. |
+ __ movq(StackSpaceOperand(1), r12); // argv. |
if (result_size_ < 2) { |
// Pass a pointer to the Arguments object as the first argument. |
// Return result in single register (rax). |
- __ lea(rcx, Operand(rsp, 4 * kPointerSize)); |
+ __ lea(rcx, StackSpaceOperand(0)); |
} else { |
ASSERT_EQ(2, result_size_); |
// Pass a pointer to the result location as the first argument. |
- __ lea(rcx, Operand(rsp, 6 * kPointerSize)); |
+ __ lea(rcx, StackSpaceOperand(2)); |
// Pass a pointer to the Arguments object as the second argument. |
- __ lea(rdx, Operand(rsp, 4 * kPointerSize)); |
+ __ lea(rdx, StackSpaceOperand(0)); |
} |
#else // _WIN64 |
@@ -2596,7 +2582,7 @@ |
__ j(zero, &failure_returned); |
// Exit the JavaScript to C++ exit frame. |
- __ LeaveExitFrame(result_size_); |
+ __ LeaveExitFrame(); |
__ ret(0); |
// Handling of failure. |
@@ -2700,7 +2686,12 @@ |
// builtin once. |
// Enter the exit frame that transitions from JavaScript to C++. |
- __ EnterExitFrame(result_size_); |
+#ifdef _WIN64 |
+ int arg_stack_space = (result_size_ < 2 ? 2 : 4); |
+#else |
+ int arg_stack_space = 0; |
+#endif |
+ __ EnterExitFrame(arg_stack_space); |
// rax: Holds the context at this point, but should not be used. |
// On entry to code generated by GenerateCore, it must hold |