Commit f72ec739 authored by Junliang Yan's avatar Junliang Yan Committed by V8 LUCI CQ

ppc: [liftoff] implement StoreTaggedPointer

Change-Id: I55a80003a148c80f2b7a1f644c127d81963f8ac7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2918141Reviewed-by: 's avatarMilad Fa <mfarazma@redhat.com>
Commit-Queue: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/master@{#74789}
parent c2d5e408
......@@ -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,
......
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