[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 057/114] target/arm: Move sve zip high_ofs into simd_data
From: |
Richard Henderson |
Subject: |
[PATCH 057/114] target/arm: Move sve zip high_ofs into simd_data |
Date: |
Fri, 27 May 2022 11:18:10 -0700 |
This is in line with how we treat uzp, and will
eliminate the special case code during translation.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
target/arm/sve_helper.c | 6 ++++--
target/arm/translate-sve.c | 12 ++++++------
2 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/target/arm/sve_helper.c b/target/arm/sve_helper.c
index e0f9aa9983..3bdcd4ce9d 100644
--- a/target/arm/sve_helper.c
+++ b/target/arm/sve_helper.c
@@ -3382,6 +3382,7 @@ void HELPER(sve_punpk_p)(void *vd, void *vn, uint32_t
pred_desc)
void HELPER(NAME)(void *vd, void *vn, void *vm, uint32_t desc) \
{ \
intptr_t oprsz = simd_oprsz(desc); \
+ intptr_t odd_ofs = simd_data(desc); \
intptr_t i, oprsz_2 = oprsz / 2; \
ARMVectorReg tmp_n, tmp_m; \
/* We produce output faster than we consume input. \
@@ -3393,8 +3394,9 @@ void HELPER(NAME)(void *vd, void *vn, void *vm, uint32_t
desc) \
vm = memcpy(&tmp_m, vm, oprsz_2); \
} \
for (i = 0; i < oprsz_2; i += sizeof(TYPE)) { \
- *(TYPE *)(vd + H(2 * i + 0)) = *(TYPE *)(vn + H(i)); \
- *(TYPE *)(vd + H(2 * i + sizeof(TYPE))) = *(TYPE *)(vm + H(i)); \
+ *(TYPE *)(vd + H(2 * i + 0)) = *(TYPE *)(vn + odd_ofs + H(i)); \
+ *(TYPE *)(vd + H(2 * i + sizeof(TYPE))) = \
+ *(TYPE *)(vm + odd_ofs + H(i)); \
} \
if (sizeof(TYPE) == 16 && unlikely(oprsz & 16)) { \
memset(vd + oprsz - 16, 0, 16); \
diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c
index 1e6bcedb9d..c2ced3e2bb 100644
--- a/target/arm/translate-sve.c
+++ b/target/arm/translate-sve.c
@@ -2298,9 +2298,9 @@ static bool do_zip(DisasContext *s, arg_rrr_esz *a, bool
high)
unsigned vsz = vec_full_reg_size(s);
unsigned high_ofs = high ? vsz / 2 : 0;
tcg_gen_gvec_3_ool(vec_full_reg_offset(s, a->rd),
- vec_full_reg_offset(s, a->rn) + high_ofs,
- vec_full_reg_offset(s, a->rm) + high_ofs,
- vsz, vsz, 0, fns[a->esz]);
+ vec_full_reg_offset(s, a->rn),
+ vec_full_reg_offset(s, a->rm),
+ vsz, vsz, high_ofs, fns[a->esz]);
}
return true;
}
@@ -2324,9 +2324,9 @@ static bool do_zip_q(DisasContext *s, arg_rrr_esz *a,
bool high)
unsigned vsz = vec_full_reg_size(s);
unsigned high_ofs = high ? QEMU_ALIGN_DOWN(vsz, 32) / 2 : 0;
tcg_gen_gvec_3_ool(vec_full_reg_offset(s, a->rd),
- vec_full_reg_offset(s, a->rn) + high_ofs,
- vec_full_reg_offset(s, a->rm) + high_ofs,
- vsz, vsz, 0, gen_helper_sve2_zip_q);
+ vec_full_reg_offset(s, a->rn),
+ vec_full_reg_offset(s, a->rm),
+ vsz, vsz, high_ofs, gen_helper_sve2_zip_q);
}
return true;
}
--
2.34.1
- [PATCH 044/114] target/arm: Use TRANS_FEAT for do_shift_imm, (continued)
- [PATCH 044/114] target/arm: Use TRANS_FEAT for do_shift_imm, Richard Henderson, 2022/05/27
- [PATCH 043/114] target/arm: Use TRANS_FEAT for do_vpz_ool, Richard Henderson, 2022/05/27
- [PATCH 045/114] target/arm: Introduce do_shift_zpzi, Richard Henderson, 2022/05/27
- [PATCH 048/114] target/arm: Move sve check into do_index, Richard Henderson, 2022/05/27
- [PATCH 053/114] target/arm: Use TRANS_FEAT for do_pfirst_pnext, Richard Henderson, 2022/05/27
- [PATCH 052/114] target/arm: Use TRANS_FEAT for RDFFR, WRFFR, Richard Henderson, 2022/05/27
- [PATCH 051/114] target/arm: Use TRANS_FEAT for do_predset, Richard Henderson, 2022/05/27
- [PATCH 047/114] target/arm: Use TRANS_FEAT for do_zpzzz_ool, Richard Henderson, 2022/05/27
- [PATCH 054/114] target/arm: Use TRANS_FEAT for do_EXT, Richard Henderson, 2022/05/27
- [PATCH 055/114] target/arm: Use TRANS_FEAT for do_perm_pred3, Richard Henderson, 2022/05/27
- [PATCH 057/114] target/arm: Move sve zip high_ofs into simd_data,
Richard Henderson <=
- [PATCH 061/114] target/arm: Use TRANS_FEAT for do_clast_fp, Richard Henderson, 2022/05/27
- [PATCH 040/114] target/arm: Hoist sve access check through do_sel_z, Richard Henderson, 2022/05/27
- [PATCH 064/114] target/arm: Use TRANS_FEAT for do_last_general, Richard Henderson, 2022/05/27
- [PATCH 068/114] target/arm: Use TRANS_FEAT for do_ppzi_flags, Richard Henderson, 2022/05/27
- [PATCH 072/114] target/arm: Reject add/sub w/ shifted byte early, Richard Henderson, 2022/05/27
- [PATCH 077/114] target/arm: Introduce gen_gvec_{ptr,fpst}_zzzz, Richard Henderson, 2022/05/27
- [PATCH 059/114] target/arm: Use TRANS_FEAT for do_zip, do_zip_q, Richard Henderson, 2022/05/27
- [PATCH 074/114] target/arm: Use TRANS_FEAT for ADD_zzi, Richard Henderson, 2022/05/27
- [PATCH 067/114] target/arm: Use TRANS_FEAT for do_sve2_ppzz_flags, Richard Henderson, 2022/05/27
- [PATCH 076/114] target/arm: Use TRANS_FEAT for do_zzi_ool, Richard Henderson, 2022/05/27