Commit 717e5847 authored by Liu Yu's avatar Liu Yu Committed by V8 LUCI CQ

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

Port: d3d4a896

Bug: v8:11420
Change-Id: I016981f83f347a1bafae9a72882b634a69b86c64
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2894002
Auto-Submit: Liu yu <liuyu@loongson.cn>
Reviewed-by: 's avatarZhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Commit-Queue: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Cr-Commit-Position: refs/heads/master@{#74552}
parent 4066e598
...@@ -161,9 +161,6 @@ class OutOfLineRecordWrite final : public OutOfLineCode { ...@@ -161,9 +161,6 @@ class OutOfLineRecordWrite final : public OutOfLineCode {
} }
void Generate() final { void Generate() final {
if (mode_ > RecordWriteMode::kValueIsPointer) {
__ JumpIfSmi(value_, exit());
}
__ CheckPageFlag(value_, scratch0_, __ CheckPageFlag(value_, scratch0_,
MemoryChunk::kPointersToHereAreInterestingMask, eq, MemoryChunk::kPointersToHereAreInterestingMask, eq,
exit()); exit());
...@@ -916,6 +913,9 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction( ...@@ -916,6 +913,9 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction(
DetermineStubCallMode()); DetermineStubCallMode());
__ Addu(kScratchReg, object, index); __ Addu(kScratchReg, object, index);
__ sw(value, MemOperand(kScratchReg)); __ sw(value, MemOperand(kScratchReg));
if (mode > RecordWriteMode::kValueIsPointer) {
__ JumpIfSmi(value, ool->exit());
}
__ CheckPageFlag(object, scratch0, __ CheckPageFlag(object, scratch0,
MemoryChunk::kPointersFromHereAreInterestingMask, ne, MemoryChunk::kPointersFromHereAreInterestingMask, ne,
ool->entry()); ool->entry());
......
...@@ -163,9 +163,6 @@ class OutOfLineRecordWrite final : public OutOfLineCode { ...@@ -163,9 +163,6 @@ class OutOfLineRecordWrite final : public OutOfLineCode {
} }
void Generate() final { void Generate() final {
if (mode_ > RecordWriteMode::kValueIsPointer) {
__ JumpIfSmi(value_, exit());
}
__ CheckPageFlag(value_, scratch0_, __ CheckPageFlag(value_, scratch0_,
MemoryChunk::kPointersToHereAreInterestingMask, eq, MemoryChunk::kPointersToHereAreInterestingMask, eq,
exit()); exit());
...@@ -878,6 +875,9 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction( ...@@ -878,6 +875,9 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction(
DetermineStubCallMode()); DetermineStubCallMode());
__ Daddu(kScratchReg, object, index); __ Daddu(kScratchReg, object, index);
__ Sd(value, MemOperand(kScratchReg)); __ Sd(value, MemOperand(kScratchReg));
if (mode > RecordWriteMode::kValueIsPointer) {
__ JumpIfSmi(value, ool->exit());
}
__ CheckPageFlag(object, scratch0, __ CheckPageFlag(object, scratch0,
MemoryChunk::kPointersFromHereAreInterestingMask, ne, MemoryChunk::kPointersFromHereAreInterestingMask, ne,
ool->entry()); 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