Commit 265e076e authored by QiuJi's avatar QiuJi Committed by V8 LUCI CQ

[riscv64][compiler] Keep WriteBarrier Smi check on the main code path

Port: d3d4a896
Bug: v8:11420
Change-Id: I995bb6f9e4f0d62d2e048fbae0d17747c301db4d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2894036
Commit-Queue: Brice Dobry <brice.dobry@futurewei.com>
Reviewed-by: 's avatarBrice Dobry <brice.dobry@futurewei.com>
Cr-Commit-Position: refs/heads/master@{#74555}
parent 2dd71b3e
......@@ -157,9 +157,6 @@ class OutOfLineRecordWrite final : public OutOfLineCode {
zone_(gen->zone()) {}
void Generate() final {
if (mode_ > RecordWriteMode::kValueIsPointer) {
__ JumpIfSmi(value_, exit());
}
__ CheckPageFlag(value_, scratch0_,
MemoryChunk::kPointersToHereAreInterestingMask, eq,
exit());
......@@ -824,6 +821,9 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction(
DetermineStubCallMode());
__ Add64(kScratchReg, object, index);
__ Sd(value, MemOperand(kScratchReg));
if (mode > RecordWriteMode::kValueIsPointer) {
__ JumpIfSmi(value, ool->exit());
}
__ CheckPageFlag(object, scratch0,
MemoryChunk::kPointersFromHereAreInterestingMask, ne,
ool->entry());
......
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