mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-07-08 11:00:35 +00:00
target/arm: Convert V[US]DOT (scalar) to decodetree
Convert the V[US]DOT (scalar) insns in the 2reg-scalar-ext group to decodetree. Backports commit 35f5d4d1747558c6af2d914bcd848dcc30c3b531 from qemu
This commit is contained in:
parent
73dbfbe4d7
commit
49cdb7e2db
|
@ -54,3 +54,6 @@ VCMLA_scalar 1111 1110 0 . rot:2 .... .... 1000 . q:1 index:1 0 vm:4 \
|
||||||
vn=%vn_dp vd=%vd_dp size=0
|
vn=%vn_dp vd=%vd_dp size=0
|
||||||
VCMLA_scalar 1111 1110 1 . rot:2 .... .... 1000 . q:1 . 0 .... \
|
VCMLA_scalar 1111 1110 1 . rot:2 .... .... 1000 . q:1 . 0 .... \
|
||||||
vm=%vm_dp vn=%vn_dp vd=%vd_dp size=1 index=0
|
vm=%vm_dp vn=%vn_dp vd=%vd_dp size=1 index=0
|
||||||
|
|
||||||
|
VDOT_scalar 1111 1110 0 . 10 .... .... 1101 . q:1 index:1 u:1 rm:4 \
|
||||||
|
vm=%vm_dp vn=%vn_dp vd=%vd_dp
|
||||||
|
|
|
@ -212,3 +212,39 @@ static bool trans_VCMLA_scalar(DisasContext *s, arg_VCMLA_scalar *a)
|
||||||
tcg_temp_free_ptr(tcg_ctx, fpst);
|
tcg_temp_free_ptr(tcg_ctx, fpst);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static bool trans_VDOT_scalar(DisasContext *s, arg_VDOT_scalar *a)
|
||||||
|
{
|
||||||
|
gen_helper_gvec_3 *fn_gvec;
|
||||||
|
int opr_sz;
|
||||||
|
TCGv_ptr fpst;
|
||||||
|
TCGContext *tcg_ctx = s->uc->tcg_ctx;
|
||||||
|
|
||||||
|
if (!dc_isar_feature(aa32_dp, s)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* UNDEF accesses to D16-D31 if they don't exist. */
|
||||||
|
if (!dc_isar_feature(aa32_simd_r32, s) &&
|
||||||
|
((a->vd | a->vn) & 0x10)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((a->vd | a->vn) & a->q) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!vfp_access_check(s)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
fn_gvec = a->u ? gen_helper_gvec_udot_idx_b : gen_helper_gvec_sdot_idx_b;
|
||||||
|
opr_sz = (1 + a->q) * 8;
|
||||||
|
fpst = get_fpstatus_ptr(s, 1);
|
||||||
|
tcg_gen_gvec_3_ool(tcg_ctx, vfp_reg_offset(1, a->vd),
|
||||||
|
vfp_reg_offset(1, a->vn),
|
||||||
|
vfp_reg_offset(1, a->rm),
|
||||||
|
opr_sz, opr_sz, a->index, fn_gvec);
|
||||||
|
tcg_temp_free_ptr(tcg_ctx, fpst);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
|
@ -7182,18 +7182,7 @@ static int disas_neon_insn_2reg_scalar_ext(DisasContext *s, uint32_t insn)
|
||||||
bool is_long = false, q = extract32(insn, 6, 1);
|
bool is_long = false, q = extract32(insn, 6, 1);
|
||||||
bool ptr_is_env = false;
|
bool ptr_is_env = false;
|
||||||
|
|
||||||
if ((insn & 0xffb00f00) == 0xfe200d00) {
|
if ((insn & 0xffa00f10) == 0xfe000810) {
|
||||||
/* V[US]DOT -- 1111 1110 0.10 .... .... 1101 .Q.U .... */
|
|
||||||
int u = extract32(insn, 4, 1);
|
|
||||||
|
|
||||||
if (!dc_isar_feature(aa32_dp, s)) {
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
fn_gvec = u ? gen_helper_gvec_udot_idx_b : gen_helper_gvec_sdot_idx_b;
|
|
||||||
/* rm is just Vm, and index is M. */
|
|
||||||
data = extract32(insn, 5, 1); /* index */
|
|
||||||
rm = extract32(insn, 0, 4);
|
|
||||||
} else if ((insn & 0xffa00f10) == 0xfe000810) {
|
|
||||||
/* VFM[AS]L -- 1111 1110 0.0S .... .... 1000 .Q.1 .... */
|
/* VFM[AS]L -- 1111 1110 0.0S .... .... 1000 .Q.1 .... */
|
||||||
int is_s = extract32(insn, 20, 1);
|
int is_s = extract32(insn, 20, 1);
|
||||||
int vm20 = extract32(insn, 0, 3);
|
int vm20 = extract32(insn, 0, 3);
|
||||||
|
|
Loading…
Reference in a new issue