mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 09:43:56 -06:00
target/arm: Convert Neon fp VMAX/VMIN/VMAXNM/VMINNM/VRECPS/VRSQRTS to decodetree
Convert the Neon fp VMAX/VMIN/VMAXNM/VMINNM/VRECPS/VRSQRTS 3-reg-same insns to decodetree. (These are all the remaining non-accumulation instructions in this group.) Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20200512163904.10918-17-peter.maydell@linaro.org
This commit is contained in:
parent
26c6f695cf
commit
d5fdf9e9e1
3 changed files with 78 additions and 40 deletions
|
@ -5436,6 +5436,8 @@ static int disas_neon_data_insn(DisasContext *s, uint32_t insn)
|
|||
case NEON_3R_FLOAT_MULTIPLY:
|
||||
case NEON_3R_FLOAT_CMP:
|
||||
case NEON_3R_FLOAT_ACMP:
|
||||
case NEON_3R_FLOAT_MINMAX:
|
||||
case NEON_3R_FLOAT_MISC:
|
||||
/* Already handled by decodetree */
|
||||
return 1;
|
||||
}
|
||||
|
@ -5445,17 +5447,6 @@ static int disas_neon_data_insn(DisasContext *s, uint32_t insn)
|
|||
return 1;
|
||||
}
|
||||
switch (op) {
|
||||
case NEON_3R_FLOAT_MINMAX:
|
||||
if (u) {
|
||||
return 1; /* VPMIN/VPMAX handled by decodetree */
|
||||
}
|
||||
break;
|
||||
case NEON_3R_FLOAT_MISC:
|
||||
/* VMAXNM/VMINNM in ARMv8 */
|
||||
if (u && !arm_dc_feature(s, ARM_FEATURE_V8)) {
|
||||
return 1;
|
||||
}
|
||||
break;
|
||||
case NEON_3R_VFM_VQRDMLSH:
|
||||
if (!dc_isar_feature(aa32_simdfmac, s)) {
|
||||
return 1;
|
||||
|
@ -5471,35 +5462,6 @@ static int disas_neon_data_insn(DisasContext *s, uint32_t insn)
|
|||
tmp = neon_load_reg(rn, pass);
|
||||
tmp2 = neon_load_reg(rm, pass);
|
||||
switch (op) {
|
||||
case NEON_3R_FLOAT_MINMAX:
|
||||
{
|
||||
TCGv_ptr fpstatus = get_fpstatus_ptr(1);
|
||||
if (size == 0) {
|
||||
gen_helper_vfp_maxs(tmp, tmp, tmp2, fpstatus);
|
||||
} else {
|
||||
gen_helper_vfp_mins(tmp, tmp, tmp2, fpstatus);
|
||||
}
|
||||
tcg_temp_free_ptr(fpstatus);
|
||||
break;
|
||||
}
|
||||
case NEON_3R_FLOAT_MISC:
|
||||
if (u) {
|
||||
/* VMAXNM/VMINNM */
|
||||
TCGv_ptr fpstatus = get_fpstatus_ptr(1);
|
||||
if (size == 0) {
|
||||
gen_helper_vfp_maxnums(tmp, tmp, tmp2, fpstatus);
|
||||
} else {
|
||||
gen_helper_vfp_minnums(tmp, tmp, tmp2, fpstatus);
|
||||
}
|
||||
tcg_temp_free_ptr(fpstatus);
|
||||
} else {
|
||||
if (size == 0) {
|
||||
gen_helper_recps_f32(tmp, cpu_env, tmp, tmp2);
|
||||
} else {
|
||||
gen_helper_rsqrts_f32(tmp, cpu_env, tmp, tmp2);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case NEON_3R_VFM_VQRDMLSH:
|
||||
{
|
||||
/* VFMA, VFMS: fused multiply-add */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue