[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 4/9] target/arm: Add MVE check to VMOV_reg_sp and VMOV_reg_dp
From: |
Peter Maydell |
Subject: |
[PATCH 4/9] target/arm: Add MVE check to VMOV_reg_sp and VMOV_reg_dp |
Date: |
Thu, 20 May 2021 16:28:35 +0100 |
Split out the handling of VMOV_reg_sp and VMOV_reg_dp so that we can
permit the insns if either FP or MVE are present.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
target/arm/translate-vfp.c | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/target/arm/translate-vfp.c b/target/arm/translate-vfp.c
index 89246a284aa..ac5832a4ed5 100644
--- a/target/arm/translate-vfp.c
+++ b/target/arm/translate-vfp.c
@@ -2818,8 +2818,19 @@ static bool trans_VMOV_imm_dp(DisasContext *s,
arg_VMOV_imm_dp *a)
return do_vfp_2op_##PREC(s, FN, a->vd, a->vm); \
}
-DO_VFP_2OP(VMOV_reg, sp, tcg_gen_mov_i32, aa32_fpsp_v2)
-DO_VFP_2OP(VMOV_reg, dp, tcg_gen_mov_i64, aa32_fpdp_v2)
+#define DO_VFP_VMOV(INSN, PREC, FN) \
+ static bool trans_##INSN##_##PREC(DisasContext *s, \
+ arg_##INSN##_##PREC *a) \
+ { \
+ if (!dc_isar_feature(aa32_fp##PREC##_v2, s) && \
+ !dc_isar_feature(aa32_mve, s)) { \
+ return false; \
+ } \
+ return do_vfp_2op_##PREC(s, FN, a->vd, a->vm); \
+ }
+
+DO_VFP_VMOV(VMOV_reg, sp, tcg_gen_mov_i32)
+DO_VFP_VMOV(VMOV_reg, dp, tcg_gen_mov_i64)
DO_VFP_2OP(VABS, hp, gen_helper_vfp_absh, aa32_fp16_arith)
DO_VFP_2OP(VABS, sp, gen_helper_vfp_abss, aa32_fpsp_v2)
--
2.20.1
- [PATCH 0/9] target/arm: MVE preliminaries, Peter Maydell, 2021/05/20
- [PATCH 1/9] target/arm: Add isar feature check functions for MVE, Peter Maydell, 2021/05/20
- [PATCH 2/9] target/arm: Update feature checks for insns which are "MVE or FP", Peter Maydell, 2021/05/20
- [PATCH 3/9] target/arm: Move fpsp/fpdp isar check into callers of do_vfp_2op_sp/dp, Peter Maydell, 2021/05/20
- [PATCH 4/9] target/arm: Add MVE check to VMOV_reg_sp and VMOV_reg_dp,
Peter Maydell <=
- [PATCH 5/9] target/arm: Fix return values in fp_sysreg_checks(), Peter Maydell, 2021/05/20
- [PATCH 7/9] target/arm: Make FPSCR.LTPSIZE writable for MVE, Peter Maydell, 2021/05/20
- [PATCH 8/9] target/arm: Enable FPSCR.QC bit for MVE, Peter Maydell, 2021/05/20
- [PATCH 6/9] target/arm: Implement M-profile VPR register, Peter Maydell, 2021/05/20