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

ppc: [liftoff] implement Load for liftoff

Change-Id: I237f5ad18b82e2e2bf807241ce587a38a27e0b10
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2979592
Commit-Queue: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Auto-Submit: Junliang Yan <junyan@redhat.com>
Reviewed-by: 's avatarMilad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#75313}
parent 8810a118
......@@ -329,7 +329,60 @@ void LiftoffAssembler::Store(Register dst_addr, Register offset_reg,
uintptr_t offset_imm, LiftoffRegister src,
StoreType type, LiftoffRegList pinned,
uint32_t* protected_store_pc, bool is_store_mem) {
bailout(kUnsupportedArchitecture, "Store");
MemOperand dst_op =
MemOperand(dst_addr, offset_reg, offset_imm);
if (protected_store_pc) *protected_store_pc = pc_offset();
switch (type.value()) {
case StoreType::kI32Store8:
case StoreType::kI64Store8:
StoreU8(src.gp(), dst_op, r0);
break;
case StoreType::kI32Store16:
case StoreType::kI64Store16:
if (is_store_mem) {
StoreU16LE(src.gp(), dst_op, r0);
} else {
StoreU16(src.gp(), dst_op, r0);
}
break;
case StoreType::kI32Store:
case StoreType::kI64Store32:
if (is_store_mem) {
StoreU32LE(src.gp(), dst_op, r0);
} else {
StoreU32(src.gp(), dst_op, r0);
}
break;
case StoreType::kI64Store:
if (is_store_mem) {
StoreU64LE(src.gp(), dst_op, r0);
} else {
StoreU64(src.gp(), dst_op, r0);
}
break;
case StoreType::kF32Store:
if (is_store_mem) {
Register scratch2 = GetUnusedRegister(kGpReg, pinned).gp();
StoreF32LE(src.fp(), dst_op, r0, scratch2);
} else {
StoreF32(src.fp(), dst_op, r0);
}
break;
case StoreType::kF64Store:
if (is_store_mem) {
Register scratch2 = GetUnusedRegister(kGpReg, pinned).gp();
StoreF64LE(src.fp(), dst_op, r0, scratch2);
} else {
StoreF64(src.fp(), dst_op, r0);
}
break;
case StoreType::kS128Store: {
bailout(kUnsupportedArchitecture, "SIMD");
break;
}
default:
UNREACHABLE();
}
}
void LiftoffAssembler::AtomicLoad(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