s390x: [liftoff] implement Load/StoreTaggedPointer

Change-Id: Ia8e8600cabb7e317befca480e734915239e10f69
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2634828
Reviewed-by: Milad Fa <mfarazma@redhat.com>
Commit-Queue: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/master@{#72135}
This commit is contained in:
Junliang Yan 2021-01-18 09:41:20 -05:00 committed by Commit Bot
parent 2800584800
commit c92aa9e17b

View File

@ -203,7 +203,11 @@ void LiftoffAssembler::LoadTaggedPointer(Register dst, Register src_addr,
Register offset_reg,
int32_t offset_imm,
LiftoffRegList pinned) {
bailout(kUnsupportedArchitecture, "LoadTaggedPointer");
STATIC_ASSERT(kTaggedSize == kInt64Size);
CHECK(is_int20(offset_imm));
LoadTaggedPointerField(
dst,
MemOperand(src_addr, offset_reg == no_reg ? r0 : offset_reg, offset_imm));
}
void LiftoffAssembler::StoreTaggedPointer(Register dst_addr,
@ -211,7 +215,25 @@ void LiftoffAssembler::StoreTaggedPointer(Register dst_addr,
int32_t offset_imm,
LiftoffRegister src,
LiftoffRegList pinned) {
bailout(kRefTypes, "GlobalSet");
MemOperand dst_op =
MemOperand(dst_addr, offset_reg == no_reg ? r0 : offset_reg, offset_imm);
StoreTaggedField(src.gp(), dst_op);
Label write_barrier;
Label exit;
CheckPageFlag(dst_addr, r1, 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(), r1, MemoryChunk::kPointersToHereAreInterestingMask,
eq, &exit);
lay(r1, dst_op);
CallRecordWriteStub(dst_addr, r1, EMIT_REMEMBERED_SET, kSaveFPRegs,
wasm::WasmCode::kRecordWrite);
bind(&exit);
}
void LiftoffAssembler::Load(LiftoffRegister dst, Register src_addr,