OLD | NEW |
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_MIPS64 | 5 #if V8_TARGET_ARCH_MIPS64 |
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 1119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1130 __ bind(&switch_to_different_code_kind); | 1130 __ bind(&switch_to_different_code_kind); |
1131 __ LeaveFrame(StackFrame::JAVA_SCRIPT); | 1131 __ LeaveFrame(StackFrame::JAVA_SCRIPT); |
1132 __ ld(a4, FieldMemOperand(a1, JSFunction::kSharedFunctionInfoOffset)); | 1132 __ ld(a4, FieldMemOperand(a1, JSFunction::kSharedFunctionInfoOffset)); |
1133 __ ld(a4, FieldMemOperand(a4, SharedFunctionInfo::kCodeOffset)); | 1133 __ ld(a4, FieldMemOperand(a4, SharedFunctionInfo::kCodeOffset)); |
1134 __ Daddu(a4, a4, Operand(Code::kHeaderSize - kHeapObjectTag)); | 1134 __ Daddu(a4, a4, Operand(Code::kHeaderSize - kHeapObjectTag)); |
1135 __ sd(a4, FieldMemOperand(a1, JSFunction::kCodeEntryOffset)); | 1135 __ sd(a4, FieldMemOperand(a1, JSFunction::kCodeEntryOffset)); |
1136 __ RecordWriteCodeEntryField(a1, a4, a5); | 1136 __ RecordWriteCodeEntryField(a1, a4, a5); |
1137 __ Jump(a4); | 1137 __ Jump(a4); |
1138 } | 1138 } |
1139 | 1139 |
1140 void Builtins::Generate_InterpreterMarkBaselineOnReturn(MacroAssembler* masm) { | |
1141 // Save the function and context for call to CompileBaseline. | |
1142 __ ld(a1, MemOperand(fp, StandardFrameConstants::kFunctionOffset)); | |
1143 __ ld(kContextRegister, | |
1144 MemOperand(fp, StandardFrameConstants::kContextOffset)); | |
1145 | |
1146 // Leave the frame before recompiling for baseline so that we don't count as | |
1147 // an activation on the stack. | |
1148 LeaveInterpreterFrame(masm, t0); | |
1149 | |
1150 { | |
1151 FrameScope frame_scope(masm, StackFrame::INTERNAL); | |
1152 // Push return value. | |
1153 __ push(v0); | |
1154 | |
1155 // Push function as argument and compile for baseline. | |
1156 __ push(a1); | |
1157 __ CallRuntime(Runtime::kCompileBaseline); | |
1158 | |
1159 // Restore return value. | |
1160 __ pop(v0); | |
1161 } | |
1162 __ Jump(ra); | |
1163 } | |
1164 | |
1165 static void Generate_StackOverflowCheck(MacroAssembler* masm, Register num_args, | 1140 static void Generate_StackOverflowCheck(MacroAssembler* masm, Register num_args, |
1166 Register scratch1, Register scratch2, | 1141 Register scratch1, Register scratch2, |
1167 Label* stack_overflow) { | 1142 Label* stack_overflow) { |
1168 // Check the stack for overflow. We are not trying to catch | 1143 // Check the stack for overflow. We are not trying to catch |
1169 // interruptions (e.g. debug break and preemption) here, so the "real stack | 1144 // interruptions (e.g. debug break and preemption) here, so the "real stack |
1170 // limit" is checked. | 1145 // limit" is checked. |
1171 __ LoadRoot(scratch1, Heap::kRealStackLimitRootIndex); | 1146 __ LoadRoot(scratch1, Heap::kRealStackLimitRootIndex); |
1172 // Make scratch1 the space we have left. The stack might already be overflowed | 1147 // Make scratch1 the space we have left. The stack might already be overflowed |
1173 // here which will cause scratch1 to become negative. | 1148 // here which will cause scratch1 to become negative. |
1174 __ dsubu(scratch1, sp, scratch1); | 1149 __ dsubu(scratch1, sp, scratch1); |
(...skipping 1808 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2983 __ break_(0xCC); | 2958 __ break_(0xCC); |
2984 } | 2959 } |
2985 } | 2960 } |
2986 | 2961 |
2987 #undef __ | 2962 #undef __ |
2988 | 2963 |
2989 } // namespace internal | 2964 } // namespace internal |
2990 } // namespace v8 | 2965 } // namespace v8 |
2991 | 2966 |
2992 #endif // V8_TARGET_ARCH_MIPS64 | 2967 #endif // V8_TARGET_ARCH_MIPS64 |
OLD | NEW |