Commit a3ff9047 authored by Andreas Haas's avatar Andreas Haas Committed by Commit Bot

[wasm][liftoff][arm64] Record correct offset in StoreTaggedPointer

The write barrier for storing a reference to an object requires the
destination offset as a parameter. The existing code only passed the
immediate offset, however, not the offset provided through a register.
With this CL, the correct offset is provided.

R=thibaudm@chromium.org

Bug: v8:7581
Change-Id: I3ab3cf41150b8f852839c1956be2fec677f68894
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2640473Reviewed-by: 's avatarThibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72199}
parent 3c869fde
......@@ -450,8 +450,11 @@ void LiftoffAssembler::StoreTaggedPointer(Register dst_addr,
}
CheckPageFlag(src.gp(), MemoryChunk::kPointersToHereAreInterestingMask, ne,
&exit);
CallRecordWriteStub(dst_addr, Operand(offset_imm), EMIT_REMEMBERED_SET,
kSaveFPRegs, wasm::WasmCode::kRecordWrite);
CallRecordWriteStub(
dst_addr,
dst_op.IsRegisterOffset() ? Operand(dst_op.regoffset().X())
: Operand(dst_op.offset()),
EMIT_REMEMBERED_SET, kSaveFPRegs, wasm::WasmCode::kRecordWrite);
bind(&exit);
}
......
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