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, ...@@ -420,14 +420,14 @@ void MacroAssembler::RecordWrite(Register object, Operand offset,
Register temp = temps.Acquire(); Register temp = temps.Acquire();
CheckPageFlag(value, CheckPageFlag(value,
temp, // Used as scratch. temp, // Used as scratch.
MemoryChunk::kPointersToHereAreInterestingMask, MemoryChunk::kPointersToHereAreInterestingOrInSharedHeapMask,
eq, // In RISC-V, it uses cc for a comparison with 0, so if 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 // no bits are set, and cc is eq, it will branch to done
&done); &done);
CheckPageFlag(object, CheckPageFlag(object,
temp, // Used as scratch. temp, // Used as scratch.
MemoryChunk::kPointersFromHereAreInterestingMask, MemoryChunk::kPointersToHereAreInterestingOrInSharedHeapMask,
eq, // In RISC-V, it uses cc for a comparison with 0, so if 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 // no bits are set, and cc is eq, it will branch to done
&done); &done);
......
...@@ -176,8 +176,9 @@ class OutOfLineRecordWrite final : public OutOfLineCode { ...@@ -176,8 +176,9 @@ class OutOfLineRecordWrite final : public OutOfLineCode {
__ DecompressTaggedPointer(value_, value_); __ DecompressTaggedPointer(value_, value_);
} }
#endif #endif
__ CheckPageFlag(value_, scratch0_, __ CheckPageFlag(
MemoryChunk::kPointersToHereAreInterestingMask, eq, value_, scratch0_,
MemoryChunk::kPointersToHereAreInterestingOrInSharedHeapMask, eq,
exit()); exit());
__ AddWord(scratch1_, object_, index_); __ AddWord(scratch1_, object_, index_);
SaveFPRegsMode const save_fp_mode = frame()->DidAllocateDoubleRegisters() SaveFPRegsMode const save_fp_mode = frame()->DidAllocateDoubleRegisters()
......
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