summaryrefslogtreecommitdiff
path: root/deps/v8/src/codegen/mips/macro-assembler-mips.cc
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/src/codegen/mips/macro-assembler-mips.cc')
-rw-r--r--deps/v8/src/codegen/mips/macro-assembler-mips.cc54
1 files changed, 32 insertions, 22 deletions
diff --git a/deps/v8/src/codegen/mips/macro-assembler-mips.cc b/deps/v8/src/codegen/mips/macro-assembler-mips.cc
index 6526f48da5..6ae70798c1 100644
--- a/deps/v8/src/codegen/mips/macro-assembler-mips.cc
+++ b/deps/v8/src/codegen/mips/macro-assembler-mips.cc
@@ -4668,6 +4668,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) {
@@ -5374,31 +5375,38 @@ void TurboAssembler::CallCFunctionHelper(Register function_base,
// 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 = t4;
- Register scratch2 = t5;
- DCHECK(!AreAliased(scratch1, scratch2, function_base));
-
- 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()));
- sw(scratch2, MemOperand(scratch1));
- li(scratch1, ExternalReference::fast_c_call_caller_fp_address(isolate()));
- sw(fp, MemOperand(scratch1));
+ // 't' registers are caller-saved so this is safe as a scratch register.
+ Register pc_scratch = t4;
+ Register scratch = t5;
+ DCHECK(!AreAliased(pc_scratch, scratch, function_base));
+
+ 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()) {
+ sw(pc_scratch, MemOperand(kRootRegister,
+ IsolateData::fast_c_call_caller_pc_offset()));
+ sw(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()));
+ sw(pc_scratch, MemOperand(scratch));
+ li(scratch, ExternalReference::fast_c_call_caller_fp_address(isolate()));
+ sw(fp, MemOperand(scratch));
}
Call(function_base, function_offset);
- if (isolate() != nullptr) {
- // We don't unset the PC; the FP is the source of truth.
- Register scratch = t4;
+ // We don't unset the PC; the FP is the source of truth.
+ if (root_array_available()) {
+ sw(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()));
sw(zero_reg, MemOperand(scratch));
}
@@ -5469,7 +5477,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 deipt id in kRootRegister (we don't need the roots array from now