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, ...@@ -815,8 +815,9 @@ void MacroAssembler::RecordWrite(Register object, Operand offset,
JumpIfSmi(value, &done); JumpIfSmi(value, &done);
} }
CheckPageFlag(value, MemoryChunk::kPointersToHereAreInterestingMask, eq, CheckPageFlag(value,
&done); MemoryChunk::kPointersToHereAreInterestingOrInSharedHeapMask,
eq, &done);
CheckPageFlag(object, MemoryChunk::kPointersFromHereAreInterestingMask, eq, CheckPageFlag(object, MemoryChunk::kPointersFromHereAreInterestingMask, eq,
&done); &done);
......
...@@ -3501,8 +3501,9 @@ void MacroAssembler::RecordWrite(Register object, Operand offset, ...@@ -3501,8 +3501,9 @@ void MacroAssembler::RecordWrite(Register object, Operand offset,
DCHECK_EQ(0, kSmiTag); DCHECK_EQ(0, kSmiTag);
JumpIfSmi(value, &done); JumpIfSmi(value, &done);
} }
CheckPageFlag(value, MemoryChunk::kPointersToHereAreInterestingMask, ne, CheckPageFlag(value,
&done); MemoryChunk::kPointersToHereAreInterestingOrInSharedHeapMask,
ne, &done);
CheckPageFlag(object, MemoryChunk::kPointersFromHereAreInterestingMask, ne, CheckPageFlag(object, MemoryChunk::kPointersFromHereAreInterestingMask, ne,
&done); &done);
......
...@@ -526,8 +526,8 @@ void MacroAssembler::RecordWrite(Register object, Register slot_address, ...@@ -526,8 +526,8 @@ void MacroAssembler::RecordWrite(Register object, Register slot_address,
CheckPageFlag(value, CheckPageFlag(value,
value, // Used as scratch. value, // Used as scratch.
MemoryChunk::kPointersToHereAreInterestingMask, zero, &done, MemoryChunk::kPointersToHereAreInterestingOrInSharedHeapMask,
Label::kNear); zero, &done, Label::kNear);
CheckPageFlag(object, CheckPageFlag(object,
value, // Used as scratch. value, // Used as scratch.
MemoryChunk::kPointersFromHereAreInterestingMask, zero, &done, MemoryChunk::kPointersFromHereAreInterestingMask, zero, &done,
......
...@@ -655,8 +655,8 @@ void MacroAssembler::RecordWrite(Register object, Register slot_address, ...@@ -655,8 +655,8 @@ void MacroAssembler::RecordWrite(Register object, Register slot_address,
CheckPageFlag(value, CheckPageFlag(value,
value, // Used as scratch. value, // Used as scratch.
MemoryChunk::kPointersToHereAreInterestingMask, zero, &done, MemoryChunk::kPointersToHereAreInterestingOrInSharedHeapMask,
Label::kNear); zero, &done, Label::kNear);
CheckPageFlag(object, CheckPageFlag(object,
value, // Used as scratch. 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