Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(755)

Side by Side Diff: src/ia32/code-stubs-ia32.cc

Issue 1362383002: [Interpreter] Add CallRuntime support to the interpreter. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix arm32 debug build check errors. Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/ia32/builtins-ia32.cc ('k') | src/ia32/interface-descriptors-ia32.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
2428 2431
2429 ProfileEntryHookStub::MaybeCallEntryHook(masm); 2432 ProfileEntryHookStub::MaybeCallEntryHook(masm);
2430 2433
2431 // Enter the exit frame that transitions from JavaScript to C++. 2434 // Enter the exit frame that transitions from JavaScript to C++.
2432 __ EnterExitFrame(save_doubles()); 2435 if (argv_in_register()) {
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 }
2433 2445
2434 // ebx: pointer to C function (C callee-saved) 2446 // ebx: pointer to C function (C callee-saved)
2435 // ebp: frame pointer (restored after C call) 2447 // ebp: frame pointer (restored after C call)
2436 // esp: stack pointer (restored after C call) 2448 // esp: stack pointer (restored after C call)
2437 // edi: number of arguments including receiver (C callee-saved) 2449 // edi: number of arguments including receiver (C callee-saved)
2438 // esi: pointer to the first argument (C callee-saved) 2450 // esi: pointer to the first argument (C callee-saved)
2439 2451
2440 // Result returned in eax, or eax+edx if result size is 2. 2452 // Result returned in eax, or eax+edx if result size is 2.
2441 2453
2442 // Check stack alignment. 2454 // Check stack alignment.
(...skipping 24 matching lines...) Expand all
2467 Isolate::kPendingExceptionAddress, isolate()); 2479 Isolate::kPendingExceptionAddress, isolate());
2468 __ cmp(edx, Operand::StaticVariable(pending_exception_address)); 2480 __ cmp(edx, Operand::StaticVariable(pending_exception_address));
2469 // Cannot use check here as it attempts to generate call into runtime. 2481 // Cannot use check here as it attempts to generate call into runtime.
2470 __ j(equal, &okay, Label::kNear); 2482 __ j(equal, &okay, Label::kNear);
2471 __ int3(); 2483 __ int3();
2472 __ bind(&okay); 2484 __ bind(&okay);
2473 __ pop(edx); 2485 __ pop(edx);
2474 } 2486 }
2475 2487
2476 // Exit the JavaScript to C++ exit frame. 2488 // Exit the JavaScript to C++ exit frame.
2477 __ LeaveExitFrame(save_doubles()); 2489 __ LeaveExitFrame(save_doubles(), !argv_in_register());
2478 __ ret(0); 2490 __ ret(0);
2479 2491
2480 // Handling of exception. 2492 // Handling of exception.
2481 __ bind(&exception_returned); 2493 __ bind(&exception_returned);
2482 2494
2483 ExternalReference pending_handler_context_address( 2495 ExternalReference pending_handler_context_address(
2484 Isolate::kPendingHandlerContextAddress, isolate()); 2496 Isolate::kPendingHandlerContextAddress, isolate());
2485 ExternalReference pending_handler_code_address( 2497 ExternalReference pending_handler_code_address(
2486 Isolate::kPendingHandlerCodeAddress, isolate()); 2498 Isolate::kPendingHandlerCodeAddress, isolate());
2487 ExternalReference pending_handler_offset_address( 2499 ExternalReference pending_handler_offset_address(
(...skipping 3327 matching lines...) Expand 10 before | Expand all | Expand 10 after
5815 Operand(ebp, 7 * kPointerSize), NULL); 5827 Operand(ebp, 7 * kPointerSize), NULL);
5816 } 5828 }
5817 5829
5818 5830
5819 #undef __ 5831 #undef __
5820 5832
5821 } // namespace internal 5833 } // namespace internal
5822 } // namespace v8 5834 } // namespace v8
5823 5835
5824 #endif // V8_TARGET_ARCH_IA32 5836 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/builtins-ia32.cc ('k') | src/ia32/interface-descriptors-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698