OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #if V8_TARGET_ARCH_IA32 | 5 #if V8_TARGET_ARCH_IA32 |
6 | 6 |
7 #include "src/code-stubs.h" | 7 #include "src/code-stubs.h" |
8 #include "src/api-arguments.h" | 8 #include "src/api-arguments.h" |
9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
10 #include "src/bootstrapper.h" | 10 #include "src/bootstrapper.h" |
(...skipping 1646 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1657 | 1657 |
1658 // Reserve space on the stack for the three arguments passed to the call. If | 1658 // Reserve space on the stack for the three arguments passed to the call. If |
1659 // result size is greater than can be returned in registers, also reserve | 1659 // result size is greater than can be returned in registers, also reserve |
1660 // space for the hidden argument for the result location, and space for the | 1660 // space for the hidden argument for the result location, and space for the |
1661 // result itself. | 1661 // result itself. |
1662 int arg_stack_space = result_size() < 3 ? 3 : 4 + result_size(); | 1662 int arg_stack_space = result_size() < 3 ? 3 : 4 + result_size(); |
1663 | 1663 |
1664 // Enter the exit frame that transitions from JavaScript to C++. | 1664 // Enter the exit frame that transitions from JavaScript to C++. |
1665 if (argv_in_register()) { | 1665 if (argv_in_register()) { |
1666 DCHECK(!save_doubles()); | 1666 DCHECK(!save_doubles()); |
1667 DCHECK(!is_builtin_exit()); | |
1668 __ EnterApiExitFrame(arg_stack_space); | 1667 __ EnterApiExitFrame(arg_stack_space); |
1669 | 1668 |
1670 // Move argc and argv into the correct registers. | 1669 // Move argc and argv into the correct registers. |
1671 __ mov(esi, ecx); | 1670 __ mov(esi, ecx); |
1672 __ mov(edi, eax); | 1671 __ mov(edi, eax); |
1673 } else { | 1672 } else { |
1674 __ EnterExitFrame( | 1673 __ EnterExitFrame(arg_stack_space, save_doubles()); |
1675 arg_stack_space, save_doubles(), | |
1676 is_builtin_exit() ? StackFrame::BUILTIN_EXIT : StackFrame::EXIT); | |
1677 } | 1674 } |
1678 | 1675 |
1679 // ebx: pointer to C function (C callee-saved) | 1676 // ebx: pointer to C function (C callee-saved) |
1680 // ebp: frame pointer (restored after C call) | 1677 // ebp: frame pointer (restored after C call) |
1681 // esp: stack pointer (restored after C call) | 1678 // esp: stack pointer (restored after C call) |
1682 // edi: number of arguments including receiver (C callee-saved) | 1679 // edi: number of arguments including receiver (C callee-saved) |
1683 // esi: pointer to the first argument (C callee-saved) | 1680 // esi: pointer to the first argument (C callee-saved) |
1684 | 1681 |
1685 // Result returned in eax, or eax+edx if result size is 2. | 1682 // Result returned in eax, or eax+edx if result size is 2. |
1686 | 1683 |
(...skipping 3814 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5501 kStackUnwindSpace, nullptr, return_value_operand, | 5498 kStackUnwindSpace, nullptr, return_value_operand, |
5502 NULL); | 5499 NULL); |
5503 } | 5500 } |
5504 | 5501 |
5505 #undef __ | 5502 #undef __ |
5506 | 5503 |
5507 } // namespace internal | 5504 } // namespace internal |
5508 } // namespace v8 | 5505 } // namespace v8 |
5509 | 5506 |
5510 #endif // V8_TARGET_ARCH_IA32 | 5507 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |