mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 00:33:55 -06:00
target/arm: Convert sq{, r}dmulh to gvec for aa64 advsimd
Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 20200815013145.539409-21-richard.henderson@linaro.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
parent
3607440c4d
commit
ed78849d97
3 changed files with 81 additions and 10 deletions
|
@ -678,6 +678,20 @@ static void gen_gvec_op3_fpst(DisasContext *s, bool is_q, int rd, int rn,
|
|||
tcg_temp_free_ptr(fpst);
|
||||
}
|
||||
|
||||
/* Expand a 3-operand + qc + operation using an out-of-line helper. */
|
||||
static void gen_gvec_op3_qc(DisasContext *s, bool is_q, int rd, int rn,
|
||||
int rm, gen_helper_gvec_3_ptr *fn)
|
||||
{
|
||||
TCGv_ptr qc_ptr = tcg_temp_new_ptr();
|
||||
|
||||
tcg_gen_addi_ptr(qc_ptr, cpu_env, offsetof(CPUARMState, vfp.qc));
|
||||
tcg_gen_gvec_3_ptr(vec_full_reg_offset(s, rd),
|
||||
vec_full_reg_offset(s, rn),
|
||||
vec_full_reg_offset(s, rm), qc_ptr,
|
||||
is_q ? 16 : 8, vec_full_reg_size(s), 0, fn);
|
||||
tcg_temp_free_ptr(qc_ptr);
|
||||
}
|
||||
|
||||
/* Set ZF and NF based on a 64 bit result. This is alas fiddlier
|
||||
* than the 32 bit equivalent.
|
||||
*/
|
||||
|
@ -11734,6 +11748,15 @@ static void disas_simd_3same_int(DisasContext *s, uint32_t insn)
|
|||
gen_gvec_fn3(s, is_q, rd, rn, rm, gen_gvec_mla, size);
|
||||
}
|
||||
return;
|
||||
case 0x16: /* SQDMULH, SQRDMULH */
|
||||
{
|
||||
static gen_helper_gvec_3_ptr * const fns[2][2] = {
|
||||
{ gen_helper_neon_sqdmulh_h, gen_helper_neon_sqrdmulh_h },
|
||||
{ gen_helper_neon_sqdmulh_s, gen_helper_neon_sqrdmulh_s },
|
||||
};
|
||||
gen_gvec_op3_qc(s, is_q, rd, rn, rm, fns[size - 1][u]);
|
||||
}
|
||||
return;
|
||||
case 0x11:
|
||||
if (!u) { /* CMTST */
|
||||
gen_gvec_fn3(s, is_q, rd, rn, rm, gen_gvec_cmtst, size);
|
||||
|
@ -11845,16 +11868,6 @@ static void disas_simd_3same_int(DisasContext *s, uint32_t insn)
|
|||
genenvfn = fns[size][u];
|
||||
break;
|
||||
}
|
||||
case 0x16: /* SQDMULH, SQRDMULH */
|
||||
{
|
||||
static NeonGenTwoOpEnvFn * const fns[2][2] = {
|
||||
{ gen_helper_neon_qdmulh_s16, gen_helper_neon_qrdmulh_s16 },
|
||||
{ gen_helper_neon_qdmulh_s32, gen_helper_neon_qrdmulh_s32 },
|
||||
};
|
||||
assert(size == 1 || size == 2);
|
||||
genenvfn = fns[size - 1][u];
|
||||
break;
|
||||
}
|
||||
default:
|
||||
g_assert_not_reached();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue