target/arm: Move sve zip high_ofs into simd_data
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> Message-id: 20220527181907.189259-58-richard.henderson@linaro.org Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
parent
1d0fce4bd0
commit
09eb6d7025
@ -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) \
|
void HELPER(NAME)(void *vd, void *vn, void *vm, uint32_t desc) \
|
||||||
{ \
|
{ \
|
||||||
intptr_t oprsz = simd_oprsz(desc); \
|
intptr_t oprsz = simd_oprsz(desc); \
|
||||||
|
intptr_t odd_ofs = simd_data(desc); \
|
||||||
intptr_t i, oprsz_2 = oprsz / 2; \
|
intptr_t i, oprsz_2 = oprsz / 2; \
|
||||||
ARMVectorReg tmp_n, tmp_m; \
|
ARMVectorReg tmp_n, tmp_m; \
|
||||||
/* We produce output faster than we consume input. \
|
/* 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); \
|
vm = memcpy(&tmp_m, vm, oprsz_2); \
|
||||||
} \
|
} \
|
||||||
for (i = 0; i < oprsz_2; i += sizeof(TYPE)) { \
|
for (i = 0; i < oprsz_2; i += sizeof(TYPE)) { \
|
||||||
*(TYPE *)(vd + H(2 * i + 0)) = *(TYPE *)(vn + H(i)); \
|
*(TYPE *)(vd + H(2 * i + 0)) = *(TYPE *)(vn + odd_ofs + H(i)); \
|
||||||
*(TYPE *)(vd + H(2 * i + sizeof(TYPE))) = *(TYPE *)(vm + H(i)); \
|
*(TYPE *)(vd + H(2 * i + sizeof(TYPE))) = \
|
||||||
|
*(TYPE *)(vm + odd_ofs + H(i)); \
|
||||||
} \
|
} \
|
||||||
if (sizeof(TYPE) == 16 && unlikely(oprsz & 16)) { \
|
if (sizeof(TYPE) == 16 && unlikely(oprsz & 16)) { \
|
||||||
memset(vd + oprsz - 16, 0, 16); \
|
memset(vd + oprsz - 16, 0, 16); \
|
||||||
|
@ -2298,9 +2298,9 @@ static bool do_zip(DisasContext *s, arg_rrr_esz *a, bool high)
|
|||||||
unsigned vsz = vec_full_reg_size(s);
|
unsigned vsz = vec_full_reg_size(s);
|
||||||
unsigned high_ofs = high ? vsz / 2 : 0;
|
unsigned high_ofs = high ? vsz / 2 : 0;
|
||||||
tcg_gen_gvec_3_ool(vec_full_reg_offset(s, a->rd),
|
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->rn),
|
||||||
vec_full_reg_offset(s, a->rm) + high_ofs,
|
vec_full_reg_offset(s, a->rm),
|
||||||
vsz, vsz, 0, fns[a->esz]);
|
vsz, vsz, high_ofs, fns[a->esz]);
|
||||||
}
|
}
|
||||||
return true;
|
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 vsz = vec_full_reg_size(s);
|
||||||
unsigned high_ofs = high ? QEMU_ALIGN_DOWN(vsz, 32) / 2 : 0;
|
unsigned high_ofs = high ? QEMU_ALIGN_DOWN(vsz, 32) / 2 : 0;
|
||||||
tcg_gen_gvec_3_ool(vec_full_reg_offset(s, a->rd),
|
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->rn),
|
||||||
vec_full_reg_offset(s, a->rm) + high_ofs,
|
vec_full_reg_offset(s, a->rm),
|
||||||
vsz, vsz, 0, gen_helper_sve2_zip_q);
|
vsz, vsz, high_ofs, gen_helper_sve2_zip_q);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user