Commit 3d9506f9 authored by Thibaud Michaud's avatar Thibaud Michaud Committed by Commit Bot

[wasm] Mark tail calls as unconditional jumps

R=clemensb@chromium.org

Bug: chromium:1111015
Change-Id: Ia56e38e1aa1b7de69b2203fe2b028f24cba16861
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2330024
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69159}
parent 151501a2
......@@ -457,6 +457,8 @@ constexpr bool WasmOpcodes::IsUnconditionalJump(WasmOpcode opcode) {
case kExprBr:
case kExprBrTable:
case kExprReturn:
case kExprReturnCall:
case kExprReturnCallIndirect:
return true;
default:
return false;
......
......@@ -479,6 +479,16 @@ TEST(InterpreterLoadWithoutMemory) {
CHECK_TRAP32(r.Call(0));
}
TEST(Regress1111015) {
EXPERIMENTAL_FLAG_SCOPE(return_call);
WasmRunner<uint32_t> r(ExecutionTier::kInterpreter);
WasmFunctionCompiler& f = r.NewFunction<int32_t>("f");
BUILD(r, WASM_BLOCK_I(WASM_RETURN_CALL_FUNCTION0(f.function_index()),
kExprDrop));
BUILD(f, WASM_I32V(0));
r.Call();
}
} // namespace test_run_wasm_interpreter
} // namespace wasm
} // namespace internal
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment