[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 006/117] target/arm: Use TRANS_FEAT for gen_gvec_ool_zz
From: |
Peter Maydell |
Subject: |
[PULL 006/117] target/arm: Use TRANS_FEAT for gen_gvec_ool_zz |
Date: |
Mon, 30 May 2022 17:05:17 +0100 |
From: Richard Henderson <richard.henderson@linaro.org>
Convert SVE translation functions using gen_gvec_ool_zz to TRANS_FEAT.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20220527181907.189259-4-richard.henderson@linaro.org
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
target/arm/translate-sve.c | 39 +++++++++++++-------------------------
1 file changed, 13 insertions(+), 26 deletions(-)
diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c
index 903514cb6a8..f7e7a569b7a 100644
--- a/target/arm/translate-sve.c
+++ b/target/arm/translate-sve.c
@@ -1375,16 +1375,12 @@ static bool trans_ADR_u32(DisasContext *s, arg_rrri *a)
*** SVE Integer Misc - Unpredicated Group
*/
-static bool trans_FEXPA(DisasContext *s, arg_rr_esz *a)
-{
- static gen_helper_gvec_2 * const fns[4] = {
- NULL,
- gen_helper_sve_fexpa_h,
- gen_helper_sve_fexpa_s,
- gen_helper_sve_fexpa_d,
- };
- return gen_gvec_ool_zz(s, fns[a->esz], a->rd, a->rn, 0);
-}
+static gen_helper_gvec_2 * const fexpa_fns[4] = {
+ NULL, gen_helper_sve_fexpa_h,
+ gen_helper_sve_fexpa_s, gen_helper_sve_fexpa_d,
+};
+TRANS_FEAT(FEXPA, aa64_sve, gen_gvec_ool_zz,
+ fexpa_fns[a->esz], a->rd, a->rn, 0)
static bool trans_FTSSEL(DisasContext *s, arg_rrr_esz *a)
{
@@ -2418,14 +2414,11 @@ static bool trans_INSR_r(DisasContext *s, arg_rrr_esz
*a)
return true;
}
-static bool trans_REV_v(DisasContext *s, arg_rr_esz *a)
-{
- static gen_helper_gvec_2 * const fns[4] = {
- gen_helper_sve_rev_b, gen_helper_sve_rev_h,
- gen_helper_sve_rev_s, gen_helper_sve_rev_d
- };
- return gen_gvec_ool_zz(s, fns[a->esz], a->rd, a->rn, 0);
-}
+static gen_helper_gvec_2 * const rev_fns[4] = {
+ gen_helper_sve_rev_b, gen_helper_sve_rev_h,
+ gen_helper_sve_rev_s, gen_helper_sve_rev_d
+};
+TRANS_FEAT(REV_v, aa64_sve, gen_gvec_ool_zz, rev_fns[a->esz], a->rd, a->rn, 0)
static bool trans_TBL(DisasContext *s, arg_rrr_esz *a)
{
@@ -8376,14 +8369,8 @@ static bool trans_USDOT_zzzz(DisasContext *s,
arg_USDOT_zzzz *a)
return true;
}
-static bool trans_AESMC(DisasContext *s, arg_AESMC *a)
-{
- if (!dc_isar_feature(aa64_sve2_aes, s)) {
- return false;
- }
- return gen_gvec_ool_zz(s, gen_helper_crypto_aesmc,
- a->rd, a->rd, a->decrypt);
-}
+TRANS_FEAT(AESMC, aa64_sve2_aes, gen_gvec_ool_zz,
+ gen_helper_crypto_aesmc, a->rd, a->rd, a->decrypt)
static bool do_aese(DisasContext *s, arg_rrr_esz *a, bool decrypt)
{
--
2.25.1
- [PULL 000/117] target-arm queue, Peter Maydell, 2022/05/30
- [PULL 003/117] hw/sd/allwinner-sdhost: report FIFO water level as 1 when data ready, Peter Maydell, 2022/05/30
- [PULL 005/117] target/arm: Move null function and sve check into gen_gvec_ool_zz, Peter Maydell, 2022/05/30
- [PULL 011/117] target/arm: Move null function and sve check into gen_gvec_ool_zzzz, Peter Maydell, 2022/05/30
- [PULL 010/117] target/arm: Use TRANS_FEAT for do_sve2_zzz_ool, Peter Maydell, 2022/05/30
- [PULL 012/117] target/arm: Use TRANS_FEAT for gen_gvec_ool_zzzz, Peter Maydell, 2022/05/30
- [PULL 013/117] target/arm: Introduce gen_gvec_ool_arg_zzzz, Peter Maydell, 2022/05/30
- [PULL 001/117] docs/system/arm: Add FEAT_HCX to list of emulated features, Peter Maydell, 2022/05/30
- [PULL 007/117] target/arm: Move null function and sve check into gen_gvec_ool_zzz, Peter Maydell, 2022/05/30
- [PULL 015/117] target/arm: Use TRANS_FEAT for gen_gvec_ool_arg_zzzz, Peter Maydell, 2022/05/30
- [PULL 006/117] target/arm: Use TRANS_FEAT for gen_gvec_ool_zz,
Peter Maydell <=
- [PULL 002/117] target/arm/hvf: Include missing "cpregs.h", Peter Maydell, 2022/05/30
- [PULL 009/117] target/arm: Use TRANS_FEAT for gen_gvec_ool_arg_zzz, Peter Maydell, 2022/05/30
- [PULL 019/117] target/arm: Use TRANS_FEAT for do_sve2_zzzz_data, Peter Maydell, 2022/05/30
- [PULL 023/117] target/arm: Introduce gen_gvec_ool_arg_zpz, Peter Maydell, 2022/05/30
- [PULL 008/117] target/arm: Introduce gen_gvec_ool_arg_zzz, Peter Maydell, 2022/05/30
- [PULL 014/117] target/arm: Use TRANS_FEAT for do_sve2_zzzz_ool, Peter Maydell, 2022/05/30
- [PULL 016/117] target/arm: Rename do_zzxz_ool to gen_gvec_ool_arg_zzxz, Peter Maydell, 2022/05/30
- [PULL 017/117] target/arm: Use TRANS_FEAT for gen_gvec_ool_arg_zzxz, Peter Maydell, 2022/05/30
- [PULL 018/117] target/arm: Use TRANS_FEAT for do_sve2_zzz_data, Peter Maydell, 2022/05/30
- [PULL 004/117] target/arm: Introduce TRANS, TRANS_FEAT, Peter Maydell, 2022/05/30