Commit 59d7cf52 authored by Lu Yahan's avatar Lu Yahan Committed by V8 LUCI CQ

[riscv] Port [heap] Add shared barrier to RecordWrite builtin

Bug: v8:11708

Change-Id: I803b5499f1bbc3f7b4e626628a73f98239df8454
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3854435
Auto-Submit: Yahan Lu <yahan@iscas.ac.cn>
Commit-Queue: ji qiu <qiuji@iscas.ac.cn>
Reviewed-by: 's avatarji qiu <qiuji@iscas.ac.cn>
Cr-Commit-Position: refs/heads/main@{#82710}
parent 6ee0e4c4
......@@ -420,14 +420,14 @@ void MacroAssembler::RecordWrite(Register object, Operand offset,
Register temp = temps.Acquire();
CheckPageFlag(value,
temp, // Used as scratch.
MemoryChunk::kPointersToHereAreInterestingMask,
MemoryChunk::kPointersToHereAreInterestingOrInSharedHeapMask,
eq, // In RISC-V, it uses cc for a comparison with 0, so if
// no bits are set, and cc is eq, it will branch to done
&done);
CheckPageFlag(object,
temp, // Used as scratch.
MemoryChunk::kPointersFromHereAreInterestingMask,
MemoryChunk::kPointersToHereAreInterestingOrInSharedHeapMask,
eq, // In RISC-V, it uses cc for a comparison with 0, so if
// no bits are set, and cc is eq, it will branch to done
&done);
......
......@@ -176,9 +176,10 @@ class OutOfLineRecordWrite final : public OutOfLineCode {
__ DecompressTaggedPointer(value_, value_);
}
#endif
__ CheckPageFlag(value_, scratch0_,
MemoryChunk::kPointersToHereAreInterestingMask, eq,
exit());
__ CheckPageFlag(
value_, scratch0_,
MemoryChunk::kPointersToHereAreInterestingOrInSharedHeapMask, eq,
exit());
__ AddWord(scratch1_, object_, index_);
SaveFPRegsMode const save_fp_mode = frame()->DidAllocateDoubleRegisters()
? SaveFPRegsMode::kSave
......
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