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

Side by Side Diff: src/builtins/s390/builtins-s390.cc

Issue 2486393005: PPC/s390: [turbofan] Advance bytecode offset after lazy deopt. (Closed)
Patch Set: Created 4 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/builtins/ppc/builtins-ppc.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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_S390 5 #if V8_TARGET_ARCH_S390
6 6
7 #include "src/codegen.h" 7 #include "src/codegen.h"
8 #include "src/debug/debug.h" 8 #include "src/debug/debug.h"
9 #include "src/deoptimizer.h" 9 #include "src/deoptimizer.h"
10 #include "src/full-codegen/full-codegen.h" 10 #include "src/full-codegen/full-codegen.h"
(...skipping 1310 matching lines...) Expand 10 before | Expand all | Expand 10 after
1321 __ TailCallStub(&stub); 1321 __ TailCallStub(&stub);
1322 1322
1323 __ bind(&stack_overflow); 1323 __ bind(&stack_overflow);
1324 { 1324 {
1325 __ TailCallRuntime(Runtime::kThrowStackOverflow); 1325 __ TailCallRuntime(Runtime::kThrowStackOverflow);
1326 // Unreachable Code. 1326 // Unreachable Code.
1327 __ bkpt(0); 1327 __ bkpt(0);
1328 } 1328 }
1329 } 1329 }
1330 1330
1331 void Builtins::Generate_InterpreterEnterBytecodeDispatch(MacroAssembler* masm) { 1331 static void Generate_InterpreterEnterBytecode(MacroAssembler* masm) {
1332 // Set the return address to the correct point in the interpreter entry 1332 // Set the return address to the correct point in the interpreter entry
1333 // trampoline. 1333 // trampoline.
1334 Smi* interpreter_entry_return_pc_offset( 1334 Smi* interpreter_entry_return_pc_offset(
1335 masm->isolate()->heap()->interpreter_entry_return_pc_offset()); 1335 masm->isolate()->heap()->interpreter_entry_return_pc_offset());
1336 DCHECK_NE(interpreter_entry_return_pc_offset, Smi::kZero); 1336 DCHECK_NE(interpreter_entry_return_pc_offset, Smi::kZero);
1337 __ Move(r4, masm->isolate()->builtins()->InterpreterEntryTrampoline()); 1337 __ Move(r4, masm->isolate()->builtins()->InterpreterEntryTrampoline());
1338 __ AddP(r14, r4, Operand(interpreter_entry_return_pc_offset->value() + 1338 __ AddP(r14, r4, Operand(interpreter_entry_return_pc_offset->value() +
1339 Code::kHeaderSize - kHeapObjectTag)); 1339 Code::kHeaderSize - kHeapObjectTag));
1340 1340
1341 // Initialize the dispatch table register. 1341 // Initialize the dispatch table register.
(...skipping 20 matching lines...) Expand all
1362 __ SmiUntag(kInterpreterBytecodeOffsetRegister); 1362 __ SmiUntag(kInterpreterBytecodeOffsetRegister);
1363 1363
1364 // Dispatch to the target bytecode. 1364 // Dispatch to the target bytecode.
1365 __ LoadlB(r3, MemOperand(kInterpreterBytecodeArrayRegister, 1365 __ LoadlB(r3, MemOperand(kInterpreterBytecodeArrayRegister,
1366 kInterpreterBytecodeOffsetRegister)); 1366 kInterpreterBytecodeOffsetRegister));
1367 __ ShiftLeftP(ip, r3, Operand(kPointerSizeLog2)); 1367 __ ShiftLeftP(ip, r3, Operand(kPointerSizeLog2));
1368 __ LoadP(ip, MemOperand(kInterpreterDispatchTableRegister, ip)); 1368 __ LoadP(ip, MemOperand(kInterpreterDispatchTableRegister, ip));
1369 __ Jump(ip); 1369 __ Jump(ip);
1370 } 1370 }
1371 1371
1372 void Builtins::Generate_InterpreterEnterBytecodeAdvance(MacroAssembler* masm) {
1373 // Advance the current bytecode offset stored within the given interpreter
1374 // stack frame. This simulates what all bytecode handlers do upon completion
1375 // of the underlying operation.
1376 __ LoadP(r3, MemOperand(fp, InterpreterFrameConstants::kBytecodeArrayFromFp));
1377 __ LoadP(r4,
1378 MemOperand(fp, InterpreterFrameConstants::kBytecodeOffsetFromFp));
1379 __ LoadP(cp, MemOperand(fp, StandardFrameConstants::kContextOffset));
1380 {
1381 FrameScope scope(masm, StackFrame::INTERNAL);
1382 __ Push(kInterpreterAccumulatorRegister, r3, r4);
1383 __ CallRuntime(Runtime::kInterpreterAdvanceBytecodeOffset);
1384 __ Move(r4, r2); // Result is the new bytecode offset.
1385 __ Pop(kInterpreterAccumulatorRegister);
1386 }
1387 __ StoreP(r4,
1388 MemOperand(fp, InterpreterFrameConstants::kBytecodeOffsetFromFp));
1389
1390 Generate_InterpreterEnterBytecode(masm);
1391 }
1392
1393 void Builtins::Generate_InterpreterEnterBytecodeDispatch(MacroAssembler* masm) {
1394 Generate_InterpreterEnterBytecode(masm);
1395 }
1396
1372 void Builtins::Generate_CompileLazy(MacroAssembler* masm) { 1397 void Builtins::Generate_CompileLazy(MacroAssembler* masm) {
1373 // ----------- S t a t e ------------- 1398 // ----------- S t a t e -------------
1374 // -- r2 : argument count (preserved for callee) 1399 // -- r2 : argument count (preserved for callee)
1375 // -- r5 : new target (preserved for callee) 1400 // -- r5 : new target (preserved for callee)
1376 // -- r3 : target function (preserved for callee) 1401 // -- r3 : target function (preserved for callee)
1377 // ----------------------------------- 1402 // -----------------------------------
1378 // First lookup code, maybe we don't need to compile! 1403 // First lookup code, maybe we don't need to compile!
1379 Label gotta_call_runtime; 1404 Label gotta_call_runtime;
1380 Label try_shared; 1405 Label try_shared;
1381 Label loop_top, loop_bottom; 1406 Label loop_top, loop_bottom;
(...skipping 1605 matching lines...) Expand 10 before | Expand all | Expand 10 after
2987 __ bkpt(0); 3012 __ bkpt(0);
2988 } 3013 }
2989 } 3014 }
2990 3015
2991 #undef __ 3016 #undef __
2992 3017
2993 } // namespace internal 3018 } // namespace internal
2994 } // namespace v8 3019 } // namespace v8
2995 3020
2996 #endif // V8_TARGET_ARCH_S390 3021 #endif // V8_TARGET_ARCH_S390
OLDNEW
« no previous file with comments | « src/builtins/ppc/builtins-ppc.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698