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/base/bits.h" | 7 #include "src/base/bits.h" |
8 #include "src/bootstrapper.h" | 8 #include "src/bootstrapper.h" |
9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
(...skipping 2407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2418 } | 2418 } |
2419 | 2419 |
2420 | 2420 |
2421 void CEntryStub::Generate(MacroAssembler* masm) { | 2421 void CEntryStub::Generate(MacroAssembler* masm) { |
2422 // eax: number of arguments including receiver | 2422 // eax: number of arguments including receiver |
2423 // ebx: pointer to C function (C callee-saved) | 2423 // ebx: pointer to C function (C callee-saved) |
2424 // ebp: frame pointer (restored after C call) | 2424 // ebp: frame pointer (restored after C call) |
2425 // esp: stack pointer (restored after C call) | 2425 // esp: stack pointer (restored after C call) |
2426 // esi: current context (C callee-saved) | 2426 // esi: current context (C callee-saved) |
2427 // edi: JS function of the caller (C callee-saved) | 2427 // edi: JS function of the caller (C callee-saved) |
2428 // | |
2429 // If argv_in_register(): | |
2430 // ecx: pointer to the first argument | |
2431 | 2428 |
2432 ProfileEntryHookStub::MaybeCallEntryHook(masm); | 2429 ProfileEntryHookStub::MaybeCallEntryHook(masm); |
2433 | 2430 |
2434 // Enter the exit frame that transitions from JavaScript to C++. | 2431 // Enter the exit frame that transitions from JavaScript to C++. |
2435 if (argv_in_register()) { | 2432 __ EnterExitFrame(save_doubles()); |
2436 DCHECK(!save_doubles()); | |
2437 __ EnterApiExitFrame(3); | |
2438 | |
2439 // Move argc and argv into the correct registers. | |
2440 __ mov(esi, ecx); | |
2441 __ mov(edi, eax); | |
2442 } else { | |
2443 __ EnterExitFrame(save_doubles()); | |
2444 } | |
2445 | 2433 |
2446 // ebx: pointer to C function (C callee-saved) | 2434 // ebx: pointer to C function (C callee-saved) |
2447 // ebp: frame pointer (restored after C call) | 2435 // ebp: frame pointer (restored after C call) |
2448 // esp: stack pointer (restored after C call) | 2436 // esp: stack pointer (restored after C call) |
2449 // edi: number of arguments including receiver (C callee-saved) | 2437 // edi: number of arguments including receiver (C callee-saved) |
2450 // esi: pointer to the first argument (C callee-saved) | 2438 // esi: pointer to the first argument (C callee-saved) |
2451 | 2439 |
2452 // Result returned in eax, or eax+edx if result size is 2. | 2440 // Result returned in eax, or eax+edx if result size is 2. |
2453 | 2441 |
2454 // Check stack alignment. | 2442 // Check stack alignment. |
(...skipping 3372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5827 Operand(ebp, 7 * kPointerSize), NULL); | 5815 Operand(ebp, 7 * kPointerSize), NULL); |
5828 } | 5816 } |
5829 | 5817 |
5830 | 5818 |
5831 #undef __ | 5819 #undef __ |
5832 | 5820 |
5833 } // namespace internal | 5821 } // namespace internal |
5834 } // namespace v8 | 5822 } // namespace v8 |
5835 | 5823 |
5836 #endif // V8_TARGET_ARCH_IA32 | 5824 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |