diff options
author | Peter Maydell | 2021-09-01 10:02:36 +0200 |
---|---|---|
committer | Peter Maydell | 2021-09-01 12:08:16 +0200 |
commit | abfe39b263595a47f42219aa3a3fc63804a12a35 (patch) | |
tree | 9515d6eda16b3832c87489a354b3cbdbc30b763b /target/arm/translate-mve.c | |
parent | target/arm: Implement MVE VMAXNMA and VMINNMA (diff) | |
download | qemu-abfe39b263595a47f42219aa3a3fc63804a12a35.tar.gz qemu-abfe39b263595a47f42219aa3a3fc63804a12a35.tar.xz qemu-abfe39b263595a47f42219aa3a3fc63804a12a35.zip |
target/arm: Implement MVE scalar fp insns
Implement the MVE scalar floating point insns VADD, VSUB and VMUL.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'target/arm/translate-mve.c')
-rw-r--r-- | target/arm/translate-mve.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/target/arm/translate-mve.c b/target/arm/translate-mve.c index 4d702da808..bc4b3f840a 100644 --- a/target/arm/translate-mve.c +++ b/target/arm/translate-mve.c @@ -960,6 +960,26 @@ static bool trans_VQDMULLT_scalar(DisasContext *s, arg_2scalar *a) return do_2op_scalar(s, a, fns[a->size]); } + +#define DO_2OP_FP_SCALAR(INSN, FN) \ + static bool trans_##INSN(DisasContext *s, arg_2scalar *a) \ + { \ + static MVEGenTwoOpScalarFn * const fns[] = { \ + NULL, \ + gen_helper_mve_##FN##h, \ + gen_helper_mve_##FN##s, \ + NULL, \ + }; \ + if (!dc_isar_feature(aa32_mve_fp, s)) { \ + return false; \ + } \ + return do_2op_scalar(s, a, fns[a->size]); \ + } + +DO_2OP_FP_SCALAR(VADD_fp_scalar, vfadd_scalar) +DO_2OP_FP_SCALAR(VSUB_fp_scalar, vfsub_scalar) +DO_2OP_FP_SCALAR(VMUL_fp_scalar, vfmul_scalar) + static bool do_long_dual_acc(DisasContext *s, arg_vmlaldav *a, MVEGenLongDualAccOpFn *fn) { |