Index: src/compiler/mips/code-generator-mips.cc |
diff --git a/src/compiler/mips/code-generator-mips.cc b/src/compiler/mips/code-generator-mips.cc |
index a3a4aafb101351b83639c2dce0427c83684b808d..00357283bdc11099c88676e29c4829d45600fa14 100644 |
--- a/src/compiler/mips/code-generator-mips.cc |
+++ b/src/compiler/mips/code-generator-mips.cc |
@@ -1761,9 +1761,6 @@ void CodeGenerator::AssembleArchTrap(Instruction* instr, |
if (frame_elided_) { |
__ set_has_frame(old_has_frame); |
} |
- if (FLAG_debug_code) { |
- __ stop(GetBailoutReason(kUnexpectedReturnFromWasmTrap)); |
- } |
} |
private: |
@@ -1777,15 +1774,20 @@ void CodeGenerator::AssembleArchTrap(Instruction* instr, |
__ CallCFunction( |
ExternalReference::wasm_call_trap_callback_for_testing(isolate()), |
0); |
+ __ LeaveFrame(StackFrame::WASM_COMPILED); |
+ __ Ret(); |
} else { |
__ Move(cp, Smi::kZero); |
gen_->AssembleSourcePosition(instr_); |
__ CallRuntime(trap_id); |
+ ReferenceMap* reference_map = |
+ new (gen_->zone()) ReferenceMap(gen_->zone()); |
+ gen_->RecordSafepoint(reference_map, Safepoint::kSimple, 0, |
+ Safepoint::kNoLazyDeopt); |
+ if (FLAG_debug_code) { |
+ __ stop(GetBailoutReason(kUnexpectedReturnFromWasmTrap)); |
+ } |
} |
- ReferenceMap* reference_map = |
- new (gen_->zone()) ReferenceMap(gen_->zone()); |
- gen_->RecordSafepoint(reference_map, Safepoint::kSimple, 0, |
- Safepoint::kNoLazyDeopt); |
} |
bool frame_elided_; |