mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 10:13:56 -06:00
target/arm: Convert Neon 2-reg-scalar float multiplies to decodetree
Convert the float versions of VMLA, VMLS and VMUL in the Neon 2-reg-scalar group to decodetree. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> --- As noted in the comment on the WRAP_FP_FN macro, we could have had a do_2scalar_fp() function, but for 3 insns it seemed simpler to just do the wrapping to get hold of the fpstatus ptr. (These are the only fp insns in the group.) Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
96fc80f5f1
commit
85ac9aef9a
3 changed files with 71 additions and 34 deletions
|
@ -5187,15 +5187,11 @@ static int disas_neon_data_insn(DisasContext *s, uint32_t insn)
|
|||
case 0: /* Integer VMLA scalar */
|
||||
case 4: /* Integer VMLS scalar */
|
||||
case 8: /* Integer VMUL scalar */
|
||||
return 1; /* handled by decodetree */
|
||||
|
||||
case 1: /* Float VMLA scalar */
|
||||
case 5: /* Floating point VMLS scalar */
|
||||
case 9: /* Floating point VMUL scalar */
|
||||
if (size == 1) {
|
||||
return 1;
|
||||
}
|
||||
/* fall through */
|
||||
return 1; /* handled by decodetree */
|
||||
|
||||
case 12: /* VQDMULH scalar */
|
||||
case 13: /* VQRDMULH scalar */
|
||||
if (u && ((rd | rn) & 1)) {
|
||||
|
@ -5212,41 +5208,14 @@ static int disas_neon_data_insn(DisasContext *s, uint32_t insn)
|
|||
} else {
|
||||
gen_helper_neon_qdmulh_s32(tmp, cpu_env, tmp, tmp2);
|
||||
}
|
||||
} else if (op == 13) {
|
||||
} else {
|
||||
if (size == 1) {
|
||||
gen_helper_neon_qrdmulh_s16(tmp, cpu_env, tmp, tmp2);
|
||||
} else {
|
||||
gen_helper_neon_qrdmulh_s32(tmp, cpu_env, tmp, tmp2);
|
||||
}
|
||||
} else {
|
||||
TCGv_ptr fpstatus = get_fpstatus_ptr(1);
|
||||
gen_helper_vfp_muls(tmp, tmp, tmp2, fpstatus);
|
||||
tcg_temp_free_ptr(fpstatus);
|
||||
}
|
||||
tcg_temp_free_i32(tmp2);
|
||||
if (op < 8) {
|
||||
/* Accumulate. */
|
||||
tmp2 = neon_load_reg(rd, pass);
|
||||
switch (op) {
|
||||
case 1:
|
||||
{
|
||||
TCGv_ptr fpstatus = get_fpstatus_ptr(1);
|
||||
gen_helper_vfp_adds(tmp, tmp, tmp2, fpstatus);
|
||||
tcg_temp_free_ptr(fpstatus);
|
||||
break;
|
||||
}
|
||||
case 5:
|
||||
{
|
||||
TCGv_ptr fpstatus = get_fpstatus_ptr(1);
|
||||
gen_helper_vfp_subs(tmp, tmp2, tmp, fpstatus);
|
||||
tcg_temp_free_ptr(fpstatus);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
abort();
|
||||
}
|
||||
tcg_temp_free_i32(tmp2);
|
||||
}
|
||||
neon_store_reg(rd, pass, tmp);
|
||||
}
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue