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

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

Issue 1665853002: [Interpreter] Add explicit StackCheck bytecodes on function entry and back branches. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix unittests. Created 4 years, 10 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/x64/builtins-x64.cc ('k') | test/cctest/cctest.status » ('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/code-factory.h" 7 #include "src/code-factory.h"
8 #include "src/codegen.h" 8 #include "src/codegen.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 583 matching lines...) Expand 10 before | Expand all | Expand 10 after
594 __ j(greater_equal, &loop_header); 594 __ j(greater_equal, &loop_header);
595 } 595 }
596 596
597 // TODO(rmcilroy): List of things not currently dealt with here but done in 597 // TODO(rmcilroy): List of things not currently dealt with here but done in
598 // fullcodegen's prologue: 598 // fullcodegen's prologue:
599 // - Support profiler (specifically profiling_counter). 599 // - Support profiler (specifically profiling_counter).
600 // - Call ProfileEntryHookStub when isolate has a function_entry_hook. 600 // - Call ProfileEntryHookStub when isolate has a function_entry_hook.
601 // - Allow simulator stop operations if FLAG_stop_at is set. 601 // - Allow simulator stop operations if FLAG_stop_at is set.
602 // - Code aging of the BytecodeArray object. 602 // - Code aging of the BytecodeArray object.
603 603
604 // Perform stack guard check.
605 {
606 Label ok;
607 ExternalReference stack_limit =
608 ExternalReference::address_of_stack_limit(masm->isolate());
609 __ cmp(esp, Operand::StaticVariable(stack_limit));
610 __ j(above_equal, &ok);
611 __ push(kInterpreterBytecodeArrayRegister);
612 __ CallRuntime(Runtime::kStackGuard);
613 __ pop(kInterpreterBytecodeArrayRegister);
614 __ bind(&ok);
615 }
616
617 // Load accumulator, register file, bytecode offset, dispatch table into 604 // Load accumulator, register file, bytecode offset, dispatch table into
618 // registers. 605 // registers.
619 __ LoadRoot(kInterpreterAccumulatorRegister, Heap::kUndefinedValueRootIndex); 606 __ LoadRoot(kInterpreterAccumulatorRegister, Heap::kUndefinedValueRootIndex);
620 __ mov(kInterpreterRegisterFileRegister, ebp); 607 __ mov(kInterpreterRegisterFileRegister, ebp);
621 __ add(kInterpreterRegisterFileRegister, 608 __ add(kInterpreterRegisterFileRegister,
622 Immediate(InterpreterFrameConstants::kRegisterFilePointerFromFp)); 609 Immediate(InterpreterFrameConstants::kRegisterFilePointerFromFp));
623 __ mov(kInterpreterBytecodeOffsetRegister, 610 __ mov(kInterpreterBytecodeOffsetRegister,
624 Immediate(BytecodeArray::kHeaderSize - kHeapObjectTag)); 611 Immediate(BytecodeArray::kHeaderSize - kHeapObjectTag));
625 // Since the dispatch table root might be set after builtins are generated, 612 // Since the dispatch table root might be set after builtins are generated,
626 // load directly from the roots table. 613 // load directly from the roots table.
(...skipping 2189 matching lines...) Expand 10 before | Expand all | Expand 10 after
2816 2803
2817 __ bind(&ok); 2804 __ bind(&ok);
2818 __ ret(0); 2805 __ ret(0);
2819 } 2806 }
2820 2807
2821 #undef __ 2808 #undef __
2822 } // namespace internal 2809 } // namespace internal
2823 } // namespace v8 2810 } // namespace v8
2824 2811
2825 #endif // V8_TARGET_ARCH_X87 2812 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « src/x64/builtins-x64.cc ('k') | test/cctest/cctest.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698