diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2021-06-17 13:07:32 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2021-06-17 13:12:01 +0100 |
commit | 2867b70703e11a87a47c76edd74ac05d977935dc (patch) | |
tree | 8ef3a9d34950c2909e52af5242a95b58cb44de4b /target/arm/mve_helper.c | |
parent | 6e0195851d06d4e2770661d7e69fd5028dce98f3 (diff) |
target/arm: Implement MVE VSHL insn
Implement the MVE VSHL insn (vector form).
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'target/arm/mve_helper.c')
-rw-r--r-- | target/arm/mve_helper.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/target/arm/mve_helper.c b/target/arm/mve_helper.c index 82140ac1e5..5da1899f3d 100644 --- a/target/arm/mve_helper.c +++ b/target/arm/mve_helper.c @@ -536,6 +536,12 @@ DO_2OP_U(vhaddu, do_vhadd_u) DO_2OP_S(vhsubs, do_vhsub_s) DO_2OP_U(vhsubu, do_vhsub_u) +#define DO_VSHLS(N, M) do_sqrshl_bhs(N, (int8_t)(M), sizeof(N) * 8, false, NULL) +#define DO_VSHLU(N, M) do_uqrshl_bhs(N, (int8_t)(M), sizeof(N) * 8, false, NULL) + +DO_2OP_S(vshls, DO_VSHLS) +DO_2OP_U(vshlu, DO_VSHLU) + static inline int32_t do_sat_bhw(int64_t val, int64_t min, int64_t max, bool *s) { if (val > max) { |