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

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

This is a reland of commit 59d7cf52

Original change's description:
> [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: ji qiu <qiuji@iscas.ac.cn>
> Cr-Commit-Position: refs/heads/main@{#82710}

Bug: v8:11708
Change-Id: I56fcfc8a92c71463bce22a8090e161173cc2c64c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3857980
Commit-Queue: ji qiu <qiuji@iscas.ac.cn>
Auto-Submit: Yahan Lu <yahan@iscas.ac.cn>
Reviewed-by: 's avatarji qiu <qiuji@iscas.ac.cn>
Cr-Commit-Position: refs/heads/main@{#82737}
parent 72a10843
......@@ -420,7 +420,7 @@ 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);
......
......@@ -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