Commit a88503ba authored by Thibaud Michaud's avatar Thibaud Michaud Committed by Commit Bot

[wasm][liftoff][eh] Do not emit handler for tail calls

"FinishCall" is also unnecessary after a tail call, move it inside the
condition too.

R=clemensb@chromium.org

Bug: chromium:1187484
Change-Id: I258dd736565546277deb33e52a4619d6aaa2fe25
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2759512Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73409}
parent 7d9fb83c
......@@ -5365,11 +5365,12 @@ class LiftoffCompiler {
}
}
DefineSafepoint();
RegisterDebugSideTableEntry(decoder, DebugSideTableBuilder::kDidSpill);
EmitLandingPad(decoder);
__ FinishCall(sig, call_descriptor);
if (call_kind == kNoReturnCall) {
DefineSafepoint();
RegisterDebugSideTableEntry(decoder, DebugSideTableBuilder::kDidSpill);
EmitLandingPad(decoder);
__ FinishCall(sig, call_descriptor);
}
}
void CallIndirect(FullDecoder* decoder, const Value& index_val,
......@@ -5536,11 +5537,12 @@ class LiftoffCompiler {
__ CallIndirect(sig, call_descriptor, target);
}
DefineSafepoint();
RegisterDebugSideTableEntry(decoder, DebugSideTableBuilder::kDidSpill);
EmitLandingPad(decoder);
__ FinishCall(sig, call_descriptor);
if (call_kind == kNoReturnCall) {
DefineSafepoint();
RegisterDebugSideTableEntry(decoder, DebugSideTableBuilder::kDidSpill);
EmitLandingPad(decoder);
__ FinishCall(sig, call_descriptor);
}
}
void CallRef(FullDecoder* decoder, ValueType func_ref_type,
......@@ -5743,10 +5745,12 @@ class LiftoffCompiler {
__ pc_offset(), SourcePosition(decoder->position()), true);
__ CallIndirect(sig, call_descriptor, target_reg);
}
DefineSafepoint();
RegisterDebugSideTableEntry(decoder, DebugSideTableBuilder::kDidSpill);
EmitLandingPad(decoder);
__ FinishCall(sig, call_descriptor);
if (call_kind == kNoReturnCall) {
DefineSafepoint();
RegisterDebugSideTableEntry(decoder, DebugSideTableBuilder::kDidSpill);
EmitLandingPad(decoder);
__ FinishCall(sig, call_descriptor);
}
}
void LoadNullValue(Register null, LiftoffRegList pinned) {
......
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