Commit 805df68f authored by Dominik Inführ's avatar Dominik Inführ Committed by V8 LUCI CQ

[heap, baseline] Implement shared write barrier for baseline compiler

Baseline write barrier needs to use different page flag mask to also
call into the slow path of the barrier for old-to-shared pointers.

Bug: v8:11708
Change-Id: I955f30376f3de912b418298cdcf1e38dd2adda2e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3834254
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: 's avatarCamillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82538}
parent 208bda48
......@@ -815,8 +815,9 @@ void MacroAssembler::RecordWrite(Register object, Operand offset,
JumpIfSmi(value, &done);
}
CheckPageFlag(value, MemoryChunk::kPointersToHereAreInterestingMask, eq,
&done);
CheckPageFlag(value,
MemoryChunk::kPointersToHereAreInterestingOrInSharedHeapMask,
eq, &done);
CheckPageFlag(object, MemoryChunk::kPointersFromHereAreInterestingMask, eq,
&done);
......
......@@ -3501,8 +3501,9 @@ void MacroAssembler::RecordWrite(Register object, Operand offset,
DCHECK_EQ(0, kSmiTag);
JumpIfSmi(value, &done);
}
CheckPageFlag(value, MemoryChunk::kPointersToHereAreInterestingMask, ne,
&done);
CheckPageFlag(value,
MemoryChunk::kPointersToHereAreInterestingOrInSharedHeapMask,
ne, &done);
CheckPageFlag(object, MemoryChunk::kPointersFromHereAreInterestingMask, ne,
&done);
......
......@@ -526,8 +526,8 @@ void MacroAssembler::RecordWrite(Register object, Register slot_address,
CheckPageFlag(value,
value, // Used as scratch.
MemoryChunk::kPointersToHereAreInterestingMask, zero, &done,
Label::kNear);
MemoryChunk::kPointersToHereAreInterestingOrInSharedHeapMask,
zero, &done, Label::kNear);
CheckPageFlag(object,
value, // Used as scratch.
MemoryChunk::kPointersFromHereAreInterestingMask, zero, &done,
......
......@@ -655,8 +655,8 @@ void MacroAssembler::RecordWrite(Register object, Register slot_address,
CheckPageFlag(value,
value, // Used as scratch.
MemoryChunk::kPointersToHereAreInterestingMask, zero, &done,
Label::kNear);
MemoryChunk::kPointersToHereAreInterestingOrInSharedHeapMask,
zero, &done, Label::kNear);
CheckPageFlag(object,
value, // Used as scratch.
......
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