Index: src/compiler/arm/code-generator-arm.cc |
diff --git a/src/compiler/arm/code-generator-arm.cc b/src/compiler/arm/code-generator-arm.cc |
index a474220630d423672bbbf1a93efc25348efdd0fe..68d500c3df58b0626649b4d1a13a5fca8ed12fca 100644 |
--- a/src/compiler/arm/code-generator-arm.cc |
+++ b/src/compiler/arm/code-generator-arm.cc |
@@ -1913,9 +1913,6 @@ void CodeGenerator::AssembleArchTrap(Instruction* instr, |
if (frame_elided_) { |
__ set_has_frame(old_has_frame); |
} |
- if (FLAG_debug_code) { |
- __ stop(GetBailoutReason(kUnexpectedReturnFromWasmTrap)); |
- } |
} |
private: |
@@ -1929,15 +1926,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_; |