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

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

Issue 1418213002: X87: [Interpreter] Add CallRuntime support to the interpreter. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 1 month 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/x87/builtins-x87.cc ('k') | src/x87/interface-descriptors-x87.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_X87 5 #if V8_TARGET_ARCH_X87
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 2119 matching lines...) Expand 10 before | Expand all | Expand 10 after
2130 } 2130 }
2131 2131
2132 2132
2133 void CEntryStub::Generate(MacroAssembler* masm) { 2133 void CEntryStub::Generate(MacroAssembler* masm) {
2134 // eax: number of arguments including receiver 2134 // eax: number of arguments including receiver
2135 // ebx: pointer to C function (C callee-saved) 2135 // ebx: pointer to C function (C callee-saved)
2136 // ebp: frame pointer (restored after C call) 2136 // ebp: frame pointer (restored after C call)
2137 // esp: stack pointer (restored after C call) 2137 // esp: stack pointer (restored after C call)
2138 // esi: current context (C callee-saved) 2138 // esi: current context (C callee-saved)
2139 // edi: JS function of the caller (C callee-saved) 2139 // edi: JS function of the caller (C callee-saved)
2140 //
2141 // If argv_in_register():
2142 // ecx: pointer to the first argument
2140 2143
2141 ProfileEntryHookStub::MaybeCallEntryHook(masm); 2144 ProfileEntryHookStub::MaybeCallEntryHook(masm);
2142 2145
2143 // Enter the exit frame that transitions from JavaScript to C++. 2146 // Enter the exit frame that transitions from JavaScript to C++.
2144 __ EnterExitFrame(save_doubles()); 2147 if (argv_in_register()) {
2148 DCHECK(!save_doubles());
2149 __ EnterApiExitFrame(3);
2150
2151 // Move argc and argv into the correct registers.
2152 __ mov(esi, ecx);
2153 __ mov(edi, eax);
2154 } else {
2155 __ EnterExitFrame(save_doubles());
2156 }
2145 2157
2146 // ebx: pointer to C function (C callee-saved) 2158 // ebx: pointer to C function (C callee-saved)
2147 // ebp: frame pointer (restored after C call) 2159 // ebp: frame pointer (restored after C call)
2148 // esp: stack pointer (restored after C call) 2160 // esp: stack pointer (restored after C call)
2149 // edi: number of arguments including receiver (C callee-saved) 2161 // edi: number of arguments including receiver (C callee-saved)
2150 // esi: pointer to the first argument (C callee-saved) 2162 // esi: pointer to the first argument (C callee-saved)
2151 2163
2152 // Result returned in eax, or eax+edx if result size is 2. 2164 // Result returned in eax, or eax+edx if result size is 2.
2153 2165
2154 // Check stack alignment. 2166 // Check stack alignment.
(...skipping 24 matching lines...) Expand all
2179 Isolate::kPendingExceptionAddress, isolate()); 2191 Isolate::kPendingExceptionAddress, isolate());
2180 __ cmp(edx, Operand::StaticVariable(pending_exception_address)); 2192 __ cmp(edx, Operand::StaticVariable(pending_exception_address));
2181 // Cannot use check here as it attempts to generate call into runtime. 2193 // Cannot use check here as it attempts to generate call into runtime.
2182 __ j(equal, &okay, Label::kNear); 2194 __ j(equal, &okay, Label::kNear);
2183 __ int3(); 2195 __ int3();
2184 __ bind(&okay); 2196 __ bind(&okay);
2185 __ pop(edx); 2197 __ pop(edx);
2186 } 2198 }
2187 2199
2188 // Exit the JavaScript to C++ exit frame. 2200 // Exit the JavaScript to C++ exit frame.
2189 __ LeaveExitFrame(save_doubles()); 2201 __ LeaveExitFrame(save_doubles(), !argv_in_register());
2190 __ ret(0); 2202 __ ret(0);
2191 2203
2192 // Handling of exception. 2204 // Handling of exception.
2193 __ bind(&exception_returned); 2205 __ bind(&exception_returned);
2194 2206
2195 ExternalReference pending_handler_context_address( 2207 ExternalReference pending_handler_context_address(
2196 Isolate::kPendingHandlerContextAddress, isolate()); 2208 Isolate::kPendingHandlerContextAddress, isolate());
2197 ExternalReference pending_handler_code_address( 2209 ExternalReference pending_handler_code_address(
2198 Isolate::kPendingHandlerCodeAddress, isolate()); 2210 Isolate::kPendingHandlerCodeAddress, isolate());
2199 ExternalReference pending_handler_offset_address( 2211 ExternalReference pending_handler_offset_address(
(...skipping 3301 matching lines...) Expand 10 before | Expand all | Expand 10 after
5501 Operand(ebp, 7 * kPointerSize), NULL); 5513 Operand(ebp, 7 * kPointerSize), NULL);
5502 } 5514 }
5503 5515
5504 5516
5505 #undef __ 5517 #undef __
5506 5518
5507 } // namespace internal 5519 } // namespace internal
5508 } // namespace v8 5520 } // namespace v8
5509 5521
5510 #endif // V8_TARGET_ARCH_X87 5522 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « src/x87/builtins-x87.cc ('k') | src/x87/interface-descriptors-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698