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

Side by Side Diff: src/mips/builtins-mips.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/interpreter/interpreter.cc ('k') | src/mips64/builtins-mips64.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_MIPS 5 #if V8_TARGET_ARCH_MIPS
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 1013 matching lines...) Expand 10 before | Expand all | Expand 10 after
1024 __ Branch(&loop_header, ge, t0, Operand(zero_reg)); 1024 __ Branch(&loop_header, ge, t0, Operand(zero_reg));
1025 } 1025 }
1026 1026
1027 // TODO(rmcilroy): List of things not currently dealt with here but done in 1027 // TODO(rmcilroy): List of things not currently dealt with here but done in
1028 // fullcodegen's prologue: 1028 // fullcodegen's prologue:
1029 // - Support profiler (specifically profiling_counter). 1029 // - Support profiler (specifically profiling_counter).
1030 // - Call ProfileEntryHookStub when isolate has a function_entry_hook. 1030 // - Call ProfileEntryHookStub when isolate has a function_entry_hook.
1031 // - Allow simulator stop operations if FLAG_stop_at is set. 1031 // - Allow simulator stop operations if FLAG_stop_at is set.
1032 // - Code aging of the BytecodeArray object. 1032 // - Code aging of the BytecodeArray object.
1033 1033
1034 // Perform stack guard check.
1035 {
1036 Label ok;
1037 __ LoadRoot(at, Heap::kStackLimitRootIndex);
1038 __ Branch(&ok, hs, sp, Operand(at));
1039 __ push(kInterpreterBytecodeArrayRegister);
1040 __ CallRuntime(Runtime::kStackGuard);
1041 __ pop(kInterpreterBytecodeArrayRegister);
1042 __ bind(&ok);
1043 }
1044
1045 // Load bytecode offset and dispatch table into registers. 1034 // Load bytecode offset and dispatch table into registers.
1046 __ LoadRoot(kInterpreterAccumulatorRegister, Heap::kUndefinedValueRootIndex); 1035 __ LoadRoot(kInterpreterAccumulatorRegister, Heap::kUndefinedValueRootIndex);
1047 __ Addu(kInterpreterRegisterFileRegister, fp, 1036 __ Addu(kInterpreterRegisterFileRegister, fp,
1048 Operand(InterpreterFrameConstants::kRegisterFilePointerFromFp)); 1037 Operand(InterpreterFrameConstants::kRegisterFilePointerFromFp));
1049 __ li(kInterpreterBytecodeOffsetRegister, 1038 __ li(kInterpreterBytecodeOffsetRegister,
1050 Operand(BytecodeArray::kHeaderSize - kHeapObjectTag)); 1039 Operand(BytecodeArray::kHeaderSize - kHeapObjectTag));
1051 __ LoadRoot(kInterpreterDispatchTableRegister, 1040 __ LoadRoot(kInterpreterDispatchTableRegister,
1052 Heap::kInterpreterTableRootIndex); 1041 Heap::kInterpreterTableRootIndex);
1053 __ Addu(kInterpreterDispatchTableRegister, kInterpreterDispatchTableRegister, 1042 __ Addu(kInterpreterDispatchTableRegister, kInterpreterDispatchTableRegister,
1054 Operand(FixedArray::kHeaderSize - kHeapObjectTag)); 1043 Operand(FixedArray::kHeaderSize - kHeapObjectTag));
(...skipping 1722 matching lines...) Expand 10 before | Expand all | Expand 10 after
2777 } 2766 }
2778 } 2767 }
2779 2768
2780 2769
2781 #undef __ 2770 #undef __
2782 2771
2783 } // namespace internal 2772 } // namespace internal
2784 } // namespace v8 2773 } // namespace v8
2785 2774
2786 #endif // V8_TARGET_ARCH_MIPS 2775 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/interpreter/interpreter.cc ('k') | src/mips64/builtins-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698