Commit 11df6ed1 authored by Milad Fa's avatar Milad Fa Committed by V8 LUCI CQ

PPC/s390: [compiler] Keep WriteBarrier Smi check on the main code path

Port d3d4a896

Original Commit Message:

    Checking for Smis is cheap. There is no need to put this in the
    deferred code block. With this CL we will bail out earlier for
    Smis.

R=cbruni@chromium.org, joransiu@ca.ibm.com, junyan@redhat.com, midawson@redhat.com
BUG=
LOG=N

Change-Id: I29811cdeae0310031c114260734f3d5429e77633
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2883861Reviewed-by: 's avatarJunliang Yan <junyan@redhat.com>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#74478}
parent 5f4a9045
......@@ -171,9 +171,6 @@ class OutOfLineRecordWrite final : public OutOfLineCode {
void Generate() final {
ConstantPoolUnavailableScope constant_pool_unavailable(tasm());
if (mode_ > RecordWriteMode::kValueIsPointer) {
__ JumpIfSmi(value_, exit());
}
if (COMPRESS_POINTERS_BOOL) {
__ DecompressTaggedPointer(value_, value_);
}
......@@ -1192,6 +1189,9 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction(
DetermineStubCallMode(), &unwinding_info_writer_);
__ StoreTaggedFieldX(value, MemOperand(object, offset), r0);
}
if (mode > RecordWriteMode::kValueIsPointer) {
__ JumpIfSmi(value, ool->exit());
}
__ CheckPageFlag(object, scratch0,
MemoryChunk::kPointersFromHereAreInterestingMask, ne,
ool->entry());
......
......@@ -206,9 +206,6 @@ class OutOfLineRecordWrite final : public OutOfLineCode {
zone_(gen->zone()) {}
void Generate() final {
if (mode_ > RecordWriteMode::kValueIsPointer) {
__ JumpIfSmi(value_, exit());
}
if (COMPRESS_POINTERS_BOOL) {
__ DecompressTaggedPointer(value_, value_);
}
......@@ -1374,6 +1371,9 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction(
DetermineStubCallMode(), &unwinding_info_writer_);
__ StoreTaggedField(value, MemOperand(object, offset));
}
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