Commit 307f6dc9 authored by Ng Zhi An's avatar Ng Zhi An Committed by Commit Bot

[wasm-simd][arm64][liftoff] Implement store lane

Bug: v8:10975
Change-Id: I7d69b533fda8be369afe949699eea5abddda9a5c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2645469
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72338}
parent d70c8f45
......@@ -1677,7 +1677,22 @@ void LiftoffAssembler::StoreLane(Register dst, Register offset,
uintptr_t offset_imm, LiftoffRegister src,
StoreType type, uint8_t lane,
uint32_t* protected_store_pc) {
bailout(kSimd, "store lane");
UseScratchRegisterScope temps(this);
MemOperand dst_op =
liftoff::GetMemOpWithImmOffsetZero(this, &temps, dst, offset, offset_imm);
if (protected_store_pc) *protected_store_pc = pc_offset();
MachineRepresentation rep = type.mem_rep();
if (rep == MachineRepresentation::kWord8) {
st1(src.fp().B(), lane, dst_op);
} else if (rep == MachineRepresentation::kWord16) {
st1(src.fp().H(), lane, dst_op);
} else if (rep == MachineRepresentation::kWord32) {
st1(src.fp().S(), lane, dst_op);
} else {
DCHECK_EQ(MachineRepresentation::kWord64, rep);
st1(src.fp().D(), lane, dst_op);
}
}
void LiftoffAssembler::emit_i8x16_swizzle(LiftoffRegister dst,
......
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