mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-03-23 05:25:11 +00:00
target/arm: Convert VJCVT to decodetree
Convert the VJCVT instruction to decodetree. Backports commit 92073e947487e2109f3dfebfeaa48d6323cbd981 from qemu
This commit is contained in:
parent
7be9e6f9b4
commit
c66d477359
|
@ -2467,3 +2467,32 @@ static bool trans_VCVT_int_dp(DisasContext *s, arg_VCVT_int_dp *a)
|
|||
tcg_temp_free_ptr(tcg_ctx, fpst);
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool trans_VJCVT(DisasContext *s, arg_VJCVT *a)
|
||||
{
|
||||
TCGContext *tcg_ctx = s->uc->tcg_ctx;
|
||||
TCGv_i32 vd;
|
||||
TCGv_i64 vm;
|
||||
|
||||
if (!dc_isar_feature(aa32_jscvt, s)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
/* UNDEF accesses to D16-D31 if they don't exist. */
|
||||
if (!dc_isar_feature(aa32_fp_d32, s) && (a->vm & 0x10)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!vfp_access_check(s)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
vm = tcg_temp_new_i64(tcg_ctx);
|
||||
vd = tcg_temp_new_i32(tcg_ctx);
|
||||
neon_load_reg64(s, vm, a->vm);
|
||||
gen_helper_vjcvt(tcg_ctx, vd, vm, tcg_ctx->cpu_env);
|
||||
neon_store_reg32(s, vd, a->vd);
|
||||
tcg_temp_free_i64(tcg_ctx, vm);
|
||||
tcg_temp_free_i32(tcg_ctx, vd);
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -3081,7 +3081,6 @@ static void gen_neon_dup_high16(DisasContext *s, TCGv_i32 var)
|
|||
*/
|
||||
static int disas_vfp_insn(DisasContext *s, uint32_t insn)
|
||||
{
|
||||
TCGContext *tcg_ctx = s->uc->tcg_ctx;
|
||||
uint32_t rd, rn, rm, op, delta_d, delta_m, bank_mask;
|
||||
int dp, veclen;
|
||||
|
||||
|
@ -3145,7 +3144,7 @@ static int disas_vfp_insn(DisasContext *s, uint32_t insn)
|
|||
return 1;
|
||||
case 15:
|
||||
switch (rn) {
|
||||
case 0 ... 17:
|
||||
case 0 ... 19:
|
||||
/* Already handled by decodetree */
|
||||
return 1;
|
||||
default:
|
||||
|
@ -3180,13 +3179,6 @@ static int disas_vfp_insn(DisasContext *s, uint32_t insn)
|
|||
rm_is_dp = false;
|
||||
break;
|
||||
|
||||
case 0x13: /* vjcvt */
|
||||
if (!dp || !dc_isar_feature(aa32_jscvt, s)) {
|
||||
return 1;
|
||||
}
|
||||
rd_is_dp = false;
|
||||
break;
|
||||
|
||||
default:
|
||||
return 1;
|
||||
}
|
||||
|
@ -3272,9 +3264,6 @@ static int disas_vfp_insn(DisasContext *s, uint32_t insn)
|
|||
switch (op) {
|
||||
case 15: /* extension space */
|
||||
switch (rn) {
|
||||
case 19: /* vjcvt */
|
||||
gen_helper_vjcvt(tcg_ctx, s->F0s, s->F0d, tcg_ctx->cpu_env);
|
||||
break;
|
||||
case 20: /* fshto */
|
||||
gen_vfp_shto(s, dp, 16 - rm, 0);
|
||||
break;
|
||||
|
|
|
@ -220,3 +220,7 @@ VCVT_int_sp ---- 1110 1.11 1000 .... 1010 s:1 1.0 .... \
|
|||
vd=%vd_sp vm=%vm_sp
|
||||
VCVT_int_dp ---- 1110 1.11 1000 .... 1011 s:1 1.0 .... \
|
||||
vd=%vd_dp vm=%vm_sp
|
||||
|
||||
# VJCVT is always dp to sp
|
||||
VJCVT ---- 1110 1.11 1001 .... 1011 11.0 .... \
|
||||
vd=%vd_sp vm=%vm_dp
|
||||
|
|
Loading…
Reference in a new issue