diff --git a/src/wasm/baseline/ppc/liftoff-assembler-ppc.h b/src/wasm/baseline/ppc/liftoff-assembler-ppc.h index 920a89a6dd..1abd570b43 100644 --- a/src/wasm/baseline/ppc/liftoff-assembler-ppc.h +++ b/src/wasm/baseline/ppc/liftoff-assembler-ppc.h @@ -5,8 +5,11 @@ #ifndef V8_WASM_BASELINE_PPC_LIFTOFF_ASSEMBLER_PPC_H_ #define V8_WASM_BASELINE_PPC_LIFTOFF_ASSEMBLER_PPC_H_ +#include "src/base/platform/wrappers.h" +#include "src/codegen/assembler.h" +#include "src/heap/memory-chunk.h" #include "src/wasm/baseline/liftoff-assembler.h" - +#include "src/wasm/simd-shuffle.h" namespace v8 { namespace internal { @@ -216,7 +219,32 @@ void LiftoffAssembler::StoreTaggedPointer(Register dst_addr, LiftoffRegister src, LiftoffRegList pinned, SkipWriteBarrier skip_write_barrier) { - bailout(kRefTypes, "GlobalSet"); + MemOperand dst_op = MemOperand(dst_addr, offset_reg, offset_imm); + StoreTaggedField(src.gp(), dst_op, r0); + + if (skip_write_barrier || FLAG_disable_write_barriers) return; + + Label write_barrier; + Label exit; + CheckPageFlag(dst_addr, r0, MemoryChunk::kPointersFromHereAreInterestingMask, + ne, &write_barrier); + b(&exit); + bind(&write_barrier); + JumpIfSmi(src.gp(), &exit); + if (COMPRESS_POINTERS_BOOL) { + DecompressTaggedPointer(src.gp(), src.gp()); + } + CheckPageFlag(src.gp(), r0, MemoryChunk::kPointersToHereAreInterestingMask, + eq, &exit); + mov(ip, Operand(offset_imm)); + add(ip, ip, dst_addr); + if (offset_reg != no_reg) { + add(ip, ip, offset_reg); + } + CallRecordWriteStub(dst_addr, ip, RememberedSetAction::kEmit, + SaveFPRegsMode::kSave, + StubCallMode::kCallWasmRuntimeStub); + bind(&exit); } void LiftoffAssembler::Load(LiftoffRegister dst, Register src_addr,