mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-08-05 02:41:15 +00:00
target/arm: Convert VADD to decodetree
Convert the VADD instruction to decodetree. Backports commit ce28b303716e7eca3f3765bf6776d722ebbe1122 from qemu
This commit is contained in:
parent
06584edf61
commit
f56f0342ad
|
@ -1470,3 +1470,13 @@ static bool trans_VNMUL_dp(DisasContext *s, arg_VNMUL_sp *a)
|
||||||
{
|
{
|
||||||
return do_vfp_3op_dp(s, gen_VNMUL_dp, a->vd, a->vn, a->vm, false);
|
return do_vfp_3op_dp(s, gen_VNMUL_dp, a->vd, a->vn, a->vm, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static bool trans_VADD_sp(DisasContext *s, arg_VADD_sp *a)
|
||||||
|
{
|
||||||
|
return do_vfp_3op_sp(s, gen_helper_vfp_adds, a->vd, a->vn, a->vm, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
static bool trans_VADD_dp(DisasContext *s, arg_VADD_sp *a)
|
||||||
|
{
|
||||||
|
return do_vfp_3op_dp(s, gen_helper_vfp_addd, a->vd, a->vn, a->vm, false);
|
||||||
|
}
|
||||||
|
|
|
@ -1442,7 +1442,6 @@ static inline void gen_vfp_##name(DisasContext *s, int dp)
|
||||||
tcg_temp_free_ptr(tcg_ctx, fpst); \
|
tcg_temp_free_ptr(tcg_ctx, fpst); \
|
||||||
}
|
}
|
||||||
|
|
||||||
VFP_OP2(add)
|
|
||||||
VFP_OP2(sub)
|
VFP_OP2(sub)
|
||||||
VFP_OP2(div)
|
VFP_OP2(div)
|
||||||
|
|
||||||
|
@ -3213,7 +3212,7 @@ static int disas_vfp_insn(DisasContext *s, uint32_t insn)
|
||||||
rn = VFP_SREG_N(insn);
|
rn = VFP_SREG_N(insn);
|
||||||
|
|
||||||
switch (op) {
|
switch (op) {
|
||||||
case 0 ... 5:
|
case 0 ... 6:
|
||||||
/* Already handled by decodetree */
|
/* Already handled by decodetree */
|
||||||
return 1;
|
return 1;
|
||||||
default:
|
default:
|
||||||
|
@ -3399,9 +3398,6 @@ static int disas_vfp_insn(DisasContext *s, uint32_t insn)
|
||||||
for (;;) {
|
for (;;) {
|
||||||
/* Perform the calculation. */
|
/* Perform the calculation. */
|
||||||
switch (op) {
|
switch (op) {
|
||||||
case 6: /* add: fn + fm */
|
|
||||||
gen_vfp_add(s, dp);
|
|
||||||
break;
|
|
||||||
case 7: /* sub: fn - fm */
|
case 7: /* sub: fn - fm */
|
||||||
gen_vfp_sub(s, dp);
|
gen_vfp_sub(s, dp);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -127,3 +127,8 @@ VNMUL_sp ---- 1110 0.10 .... .... 1010 .1.0 .... \
|
||||||
vm=%vm_sp vn=%vn_sp vd=%vd_sp
|
vm=%vm_sp vn=%vn_sp vd=%vd_sp
|
||||||
VNMUL_dp ---- 1110 0.10 .... .... 1011 .1.0 .... \
|
VNMUL_dp ---- 1110 0.10 .... .... 1011 .1.0 .... \
|
||||||
vm=%vm_dp vn=%vn_dp vd=%vd_dp
|
vm=%vm_dp vn=%vn_dp vd=%vd_dp
|
||||||
|
|
||||||
|
VADD_sp ---- 1110 0.11 .... .... 1010 .0.0 .... \
|
||||||
|
vm=%vm_sp vn=%vn_sp vd=%vd_sp
|
||||||
|
VADD_dp ---- 1110 0.11 .... .... 1011 .0.0 .... \
|
||||||
|
vm=%vm_dp vn=%vn_dp vd=%vd_dp
|
||||||
|
|
Loading…
Reference in a new issue