PPC/s390: [liftoff] Skip write barrier for storing Smis

Port 1c5076679f

Original Commit Message:

    There is no need for write barriers if the stored value is known to be a
    Smi.

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

Change-Id: I2b79511b7f2789e6fc95ae5cb349b0f2288822fc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2712787
Reviewed-by: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#72918}
This commit is contained in:
Milad Fa 2021-02-22 10:47:18 -05:00 committed by Commit Bot
parent a11395433d
commit f4ea6c5516
2 changed files with 7 additions and 2 deletions

View File

@ -124,7 +124,8 @@ void LiftoffAssembler::StoreTaggedPointer(Register dst_addr,
Register offset_reg,
int32_t offset_imm,
LiftoffRegister src,
LiftoffRegList pinned) {
LiftoffRegList pinned,
SkipWriteBarrier skip_write_barrier) {
bailout(kRefTypes, "GlobalSet");
}

View File

@ -224,10 +224,14 @@ void LiftoffAssembler::StoreTaggedPointer(Register dst_addr,
Register offset_reg,
int32_t offset_imm,
LiftoffRegister src,
LiftoffRegList pinned) {
LiftoffRegList pinned,
SkipWriteBarrier skip_write_barrier) {
MemOperand dst_op =
MemOperand(dst_addr, offset_reg == no_reg ? r0 : offset_reg, offset_imm);
StoreTaggedField(src.gp(), dst_op);
if (skip_write_barrier) return;
Label write_barrier;
Label exit;
CheckPageFlag(dst_addr, r1, MemoryChunk::kPointersFromHereAreInterestingMask,