ppc: [liftoff] implement StoreTaggedPointer

Change-Id: I55a80003a148c80f2b7a1f644c127d81963f8ac7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2918141
Reviewed-by: Milad Fa <mfarazma@redhat.com>
Commit-Queue: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/master@{#74789}
This commit is contained in:
Junliang Yan 2021-05-25 19:45:14 -04:00 committed by V8 LUCI CQ
parent c2d5e408b5
commit f72ec73993

View File

@ -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,