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_X87 | 5 #if V8_TARGET_ARCH_X87 |
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 1480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1491 | 1491 |
1492 // Reserve space on the stack for the three arguments passed to the call. If | 1492 // Reserve space on the stack for the three arguments passed to the call. If |
1493 // result size is greater than can be returned in registers, also reserve | 1493 // result size is greater than can be returned in registers, also reserve |
1494 // space for the hidden argument for the result location, and space for the | 1494 // space for the hidden argument for the result location, and space for the |
1495 // result itself. | 1495 // result itself. |
1496 int arg_stack_space = result_size() < 3 ? 3 : 4 + result_size(); | 1496 int arg_stack_space = result_size() < 3 ? 3 : 4 + result_size(); |
1497 | 1497 |
1498 // Enter the exit frame that transitions from JavaScript to C++. | 1498 // Enter the exit frame that transitions from JavaScript to C++. |
1499 if (argv_in_register()) { | 1499 if (argv_in_register()) { |
1500 DCHECK(!save_doubles()); | 1500 DCHECK(!save_doubles()); |
| 1501 DCHECK(!is_builtin_exit()); |
1501 __ EnterApiExitFrame(arg_stack_space); | 1502 __ EnterApiExitFrame(arg_stack_space); |
1502 | 1503 |
1503 // Move argc and argv into the correct registers. | 1504 // Move argc and argv into the correct registers. |
1504 __ mov(esi, ecx); | 1505 __ mov(esi, ecx); |
1505 __ mov(edi, eax); | 1506 __ mov(edi, eax); |
1506 } else { | 1507 } else { |
1507 __ EnterExitFrame(arg_stack_space, save_doubles()); | 1508 __ EnterExitFrame( |
| 1509 arg_stack_space, save_doubles(), |
| 1510 is_builtin_exit() ? StackFrame::BUILTIN_EXIT : StackFrame::EXIT); |
1508 } | 1511 } |
1509 | 1512 |
1510 // ebx: pointer to C function (C callee-saved) | 1513 // ebx: pointer to C function (C callee-saved) |
1511 // ebp: frame pointer (restored after C call) | 1514 // ebp: frame pointer (restored after C call) |
1512 // esp: stack pointer (restored after C call) | 1515 // esp: stack pointer (restored after C call) |
1513 // edi: number of arguments including receiver (C callee-saved) | 1516 // edi: number of arguments including receiver (C callee-saved) |
1514 // esi: pointer to the first argument (C callee-saved) | 1517 // esi: pointer to the first argument (C callee-saved) |
1515 | 1518 |
1516 // Result returned in eax, or eax+edx if result size is 2. | 1519 // Result returned in eax, or eax+edx if result size is 2. |
1517 | 1520 |
(...skipping 3770 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5288 kStackUnwindSpace, nullptr, return_value_operand, | 5291 kStackUnwindSpace, nullptr, return_value_operand, |
5289 NULL); | 5292 NULL); |
5290 } | 5293 } |
5291 | 5294 |
5292 #undef __ | 5295 #undef __ |
5293 | 5296 |
5294 } // namespace internal | 5297 } // namespace internal |
5295 } // namespace v8 | 5298 } // namespace v8 |
5296 | 5299 |
5297 #endif // V8_TARGET_ARCH_X87 | 5300 #endif // V8_TARGET_ARCH_X87 |
OLD | NEW |