Commit f2cc948f authored by Ng Zhi An's avatar Ng Zhi An Committed by Commit Bot

[liftoff][wasm-simd] Support storing S128 values

Add support for storing values of type kWasmS128 to ia32, x64, arm,
arm64. These stores are never hit right now, since Liftoff does not
handle any S128 values yet.

Bug: v8:9909
Change-Id: Ib74b9db158428186757086711b8249866026dab5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1974834
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65545}
parent 1a6de19f
......@@ -459,6 +459,13 @@ void LiftoffAssembler::Store(Register dst_addr, Register offset_reg,
// Armv6 is not supported so Neon can be used to avoid alignment issues.
CpuFeatureScope scope(this, NEON);
vst1(Neon64, NeonListOperand(src.fp()), NeonMemOperand(actual_dst_addr));
} else if (type.value() == StoreType::kS128Store) {
Register actual_dst_addr = liftoff::CalculateActualAddress(
this, &temps, dst_addr, offset_reg, offset_imm);
// Armv6 is not supported so Neon can be used to avoid alignment issues.
CpuFeatureScope scope(this, NEON);
vst1(Neon8, NeonListOperand(src.low_fp(), 2),
NeonMemOperand(actual_dst_addr));
} else if (type.value() == StoreType::kF32Store) {
// TODO(arm): Use vst1 for f32 when implemented in simulator as used for
// f64. It supports unaligned access.
......
......@@ -320,6 +320,9 @@ void LiftoffAssembler::Store(Register dst_addr, Register offset_reg,
case StoreType::kF64Store:
Str(src.fp().D(), dst_op);
break;
case StoreType::kS128Store:
Str(src.fp().Q(), dst_op);
break;
default:
UNREACHABLE();
}
......
......@@ -394,6 +394,9 @@ void LiftoffAssembler::Store(Register dst_addr, Register offset_reg,
case StoreType::kF64Store:
movsd(dst_op, src.fp());
break;
case StoreType::kS128Store:
Movdqu(dst_op, src.fp());
break;
default:
UNREACHABLE();
}
......
......@@ -329,6 +329,9 @@ void LiftoffAssembler::Store(Register dst_addr, Register offset_reg,
case StoreType::kF64Store:
Movsd(dst_op, src.fp());
break;
case StoreType::kS128Store:
Movdqu(dst_op, src.fp());
break;
default:
UNREACHABLE();
}
......
......@@ -169,6 +169,8 @@ class StoreType {
return kF32Store;
case kWasmF64:
return kF64Store;
case kWasmS128:
return kS128Store;
default:
UNREACHABLE();
}
......
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