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

[wasm][liftoff] Emit landing pad after the safepoint

... and after creating the debug side table entry. The safepoint and the
debug side table entry should be generated right after the call, so that
they are associated with the return address of the previous call.

R=clemensb@chromium.org

Bug: v8:11453
Change-Id: I71395851c5a7f4e2c873907454245c9d04f972f1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2739629
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73302}
parent 22e759d4
......@@ -3849,8 +3849,8 @@ class LiftoffCompiler {
source_position_table_builder_.AddPosition(
__ pc_offset(), SourcePosition(decoder->position()), true);
__ CallRuntimeStub(WasmCode::kWasmThrow);
EmitLandingPad(decoder);
DefineSafepoint();
EmitLandingPad(decoder);
}
void AtomicStoreMem(FullDecoder* decoder, StoreType type,
......@@ -5211,7 +5211,6 @@ class LiftoffCompiler {
source_position_table_builder_.AddPosition(
__ pc_offset(), SourcePosition(decoder->position()), true);
__ CallIndirect(sig, call_descriptor, target);
EmitLandingPad(decoder);
}
} else {
// A direct call within this module just gets the current instance.
......@@ -5229,12 +5228,12 @@ class LiftoffCompiler {
source_position_table_builder_.AddPosition(
__ pc_offset(), SourcePosition(decoder->position()), true);
__ CallNativeWasmCode(addr);
EmitLandingPad(decoder);
}
}
DefineSafepoint();
RegisterDebugSideTableEntry(decoder, DebugSideTableBuilder::kDidSpill);
EmitLandingPad(decoder);
__ FinishCall(sig, call_descriptor);
}
......@@ -5401,11 +5400,11 @@ class LiftoffCompiler {
source_position_table_builder_.AddPosition(
__ pc_offset(), SourcePosition(decoder->position()), true);
__ CallIndirect(sig, call_descriptor, target);
EmitLandingPad(decoder);
}
DefineSafepoint();
RegisterDebugSideTableEntry(decoder, DebugSideTableBuilder::kDidSpill);
EmitLandingPad(decoder);
__ FinishCall(sig, call_descriptor);
}
......@@ -5612,10 +5611,10 @@ class LiftoffCompiler {
source_position_table_builder_.AddPosition(
__ pc_offset(), SourcePosition(decoder->position()), true);
__ CallIndirect(sig, call_descriptor, target_reg);
EmitLandingPad(decoder);
}
DefineSafepoint();
RegisterDebugSideTableEntry(decoder, DebugSideTableBuilder::kDidSpill);
EmitLandingPad(decoder);
__ FinishCall(sig, call_descriptor);
}
......
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