diff options
Diffstat (limited to 'deps/v8/src/codegen/mips64/macro-assembler-mips64.cc')
-rw-r--r-- | deps/v8/src/codegen/mips64/macro-assembler-mips64.cc | 54 |
1 files changed, 32 insertions, 22 deletions
diff --git a/deps/v8/src/codegen/mips64/macro-assembler-mips64.cc b/deps/v8/src/codegen/mips64/macro-assembler-mips64.cc index a9bbcf54aa..78f3228f24 100644 --- a/deps/v8/src/codegen/mips64/macro-assembler-mips64.cc +++ b/deps/v8/src/codegen/mips64/macro-assembler-mips64.cc @@ -4984,6 +4984,7 @@ void MacroAssembler::DecrementCounter(StatsCounter* counter, int value, // Debugging. void TurboAssembler::Trap() { stop(); } +void TurboAssembler::DebugBreak() { stop(); } void TurboAssembler::Assert(Condition cc, AbortReason reason, Register rs, Operand rt) { @@ -5698,31 +5699,38 @@ void TurboAssembler::CallCFunctionHelper(Register function, // Save the frame pointer and PC so that the stack layout remains iterable, // even without an ExitFrame which normally exists between JS and C frames. - if (isolate() != nullptr) { - // 't' registers are caller-saved so this is safe as a scratch register. - Register scratch1 = t1; - Register scratch2 = t2; - DCHECK(!AreAliased(scratch1, scratch2, function)); - - Label get_pc; - mov(scratch1, ra); - Call(&get_pc); - - bind(&get_pc); - mov(scratch2, ra); - mov(ra, scratch1); - - li(scratch1, ExternalReference::fast_c_call_caller_pc_address(isolate())); - Sd(scratch2, MemOperand(scratch1)); - li(scratch1, ExternalReference::fast_c_call_caller_fp_address(isolate())); - Sd(fp, MemOperand(scratch1)); + // 't' registers are caller-saved so this is safe as a scratch register. + Register pc_scratch = t1; + Register scratch = t2; + DCHECK(!AreAliased(pc_scratch, scratch, function)); + + mov(scratch, ra); + nal(); + mov(pc_scratch, ra); + mov(ra, scratch); + + // See x64 code for reasoning about how to address the isolate data fields. + if (root_array_available()) { + Sd(pc_scratch, MemOperand(kRootRegister, + IsolateData::fast_c_call_caller_pc_offset())); + Sd(fp, MemOperand(kRootRegister, + IsolateData::fast_c_call_caller_fp_offset())); + } else { + DCHECK_NOT_NULL(isolate()); + li(scratch, ExternalReference::fast_c_call_caller_pc_address(isolate())); + Sd(pc_scratch, MemOperand(scratch)); + li(scratch, ExternalReference::fast_c_call_caller_fp_address(isolate())); + Sd(fp, MemOperand(scratch)); } Call(function); - if (isolate() != nullptr) { - // We don't unset the PC; the FP is the source of truth. - Register scratch = t1; + // We don't unset the PC; the FP is the source of truth. + if (root_array_available()) { + Sd(zero_reg, MemOperand(kRootRegister, + IsolateData::fast_c_call_caller_fp_offset())); + } else { + DCHECK_NOT_NULL(isolate()); li(scratch, ExternalReference::fast_c_call_caller_fp_address(isolate())); Sd(zero_reg, MemOperand(scratch)); } @@ -5793,7 +5801,9 @@ void TurboAssembler::ResetSpeculationPoisonRegister() { li(kSpeculationPoisonRegister, -1); } -void TurboAssembler::CallForDeoptimization(Address target, int deopt_id) { +void TurboAssembler::CallForDeoptimization(Address target, int deopt_id, + Label* exit, DeoptimizeKind kind) { + USE(exit, kind); NoRootArrayScope no_root_array(this); // Save the deopt id in kRootRegister (we don't need the roots array from now |