Bug 1914475. r=yury, a=RyanVM

Differential Revision: https://phabricator.services.mozilla.com/D220254
This commit is contained in:
Julian Seward 2024-09-04 06:26:52 +00:00
parent 63197ceb11
commit e7a9103fcf
2 changed files with 4 additions and 2 deletions

View file

@ -9361,7 +9361,8 @@ void CodeGenerator::visitWasmCall(LWasmCall* lir) {
// Note the assembler offset and framePushed for use by the adjunct
// LSafePoint, see visitor for LWasmCallIndirectAdjunctSafepoint below.
if (callee.which() == wasm::CalleeDesc::WasmTable) {
if (callee.which() == wasm::CalleeDesc::WasmTable ||
callee.which() == wasm::CalleeDesc::FuncRef) {
lir->adjunctSafepoint()->recordSafepointInfo(secondRetOffset,
framePushedAtStackMapBase);
}

View file

@ -6454,7 +6454,8 @@ void LIRGenerator::visitWasmCall(MWasmCallT ins) {
// safepoint associated with them. Create a second safepoint here; the node
// otherwise does nothing, and codegen for it only marks the safepoint at the
// node.
if (ins->callee().which() == wasm::CalleeDesc::WasmTable &&
if ((ins->callee().which() == wasm::CalleeDesc::WasmTable ||
ins->callee().which() == wasm::CalleeDesc::FuncRef) &&
!ins->isWasmReturnCall()) {
auto* adjunctSafepoint = new (alloc()) LWasmCallIndirectAdjunctSafepoint();
add(adjunctSafepoint);