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 1766 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1777 | 1777 |
1778 // Reserve space on the stack for the three arguments passed to the call. If | 1778 // Reserve space on the stack for the three arguments passed to the call. If |
1779 // result size is greater than can be returned in registers, also reserve | 1779 // result size is greater than can be returned in registers, also reserve |
1780 // space for the hidden argument for the result location, and space for the | 1780 // space for the hidden argument for the result location, and space for the |
1781 // result itself. | 1781 // result itself. |
1782 int arg_stack_space = result_size() < 3 ? 3 : 4 + result_size(); | 1782 int arg_stack_space = result_size() < 3 ? 3 : 4 + result_size(); |
1783 | 1783 |
1784 // Enter the exit frame that transitions from JavaScript to C++. | 1784 // Enter the exit frame that transitions from JavaScript to C++. |
1785 if (argv_in_register()) { | 1785 if (argv_in_register()) { |
1786 DCHECK(!save_doubles()); | 1786 DCHECK(!save_doubles()); |
| 1787 DCHECK(!is_builtin_exit()); |
1787 __ EnterApiExitFrame(arg_stack_space); | 1788 __ EnterApiExitFrame(arg_stack_space); |
1788 | 1789 |
1789 // Move argc and argv into the correct registers. | 1790 // Move argc and argv into the correct registers. |
1790 __ mov(esi, ecx); | 1791 __ mov(esi, ecx); |
1791 __ mov(edi, eax); | 1792 __ mov(edi, eax); |
1792 } else { | 1793 } else { |
1793 __ EnterExitFrame(arg_stack_space, save_doubles()); | 1794 __ EnterExitFrame( |
| 1795 arg_stack_space, save_doubles(), |
| 1796 is_builtin_exit() ? StackFrame::BUILTIN_EXIT : StackFrame::EXIT); |
1794 } | 1797 } |
1795 | 1798 |
1796 // ebx: pointer to C function (C callee-saved) | 1799 // ebx: pointer to C function (C callee-saved) |
1797 // ebp: frame pointer (restored after C call) | 1800 // ebp: frame pointer (restored after C call) |
1798 // esp: stack pointer (restored after C call) | 1801 // esp: stack pointer (restored after C call) |
1799 // edi: number of arguments including receiver (C callee-saved) | 1802 // edi: number of arguments including receiver (C callee-saved) |
1800 // esi: pointer to the first argument (C callee-saved) | 1803 // esi: pointer to the first argument (C callee-saved) |
1801 | 1804 |
1802 // Result returned in eax, or eax+edx if result size is 2. | 1805 // Result returned in eax, or eax+edx if result size is 2. |
1803 | 1806 |
(...skipping 3814 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5618 kStackUnwindSpace, nullptr, return_value_operand, | 5621 kStackUnwindSpace, nullptr, return_value_operand, |
5619 NULL); | 5622 NULL); |
5620 } | 5623 } |
5621 | 5624 |
5622 #undef __ | 5625 #undef __ |
5623 | 5626 |
5624 } // namespace internal | 5627 } // namespace internal |
5625 } // namespace v8 | 5628 } // namespace v8 |
5626 | 5629 |
5627 #endif // V8_TARGET_ARCH_IA32 | 5630 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |