Commit 835a8b7d authored by Andreas Haas's avatar Andreas Haas Committed by V8 LUCI CQ

[wasm] Add instance to DebugBreak safepoint

Since recently, the WebAssembly instance gets cached in Liftoff code
to avoid reloading it from the stack whenever it is used. Typically the
cached instance gets invalidated at a function call and therefore does
not need to be recorded in safepoints.

However, when the DebugBreak builtin is called, the cached instance
was not invalidated. It is even incorrect to invalidate the cached
instance there because that would modify the CacheState of Liftoff.
Therefore this CL adds the register that caches the instance to the
safepoint of the call to the DebugBreak builtin.

R=clemensb@chromium.org

Bug: v8:11979
Change-Id: I7f9153e0c0e7e797b11b827111b4d61e29606071
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3063222
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76021}
parent 3129309f
......@@ -561,6 +561,9 @@ void LiftoffAssembler::CacheState::DefineSafepointWithCalleeSavedRegisters(
safepoint.DefineRegister(slot.reg().gp().code());
}
}
if (cached_instance != no_reg) {
safepoint.DefineRegister(cached_instance.code());
}
}
int LiftoffAssembler::GetTotalFrameSlotCountForGC() const {
......
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