mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-01-25 00:11:02 +00:00
target/arm: Implement the IRG instruction
Backports commit da54941f45b820cbaca72aa6efd5669b3dc86e2f from qemu
This commit is contained in:
parent
6bec295bf8
commit
58f3dd2cc7
|
@ -3575,6 +3575,7 @@
|
||||||
#define helper_gvec_usra_d helper_gvec_usra_d_aarch64
|
#define helper_gvec_usra_d helper_gvec_usra_d_aarch64
|
||||||
#define helper_gvec_usra_h helper_gvec_usra_h_aarch64
|
#define helper_gvec_usra_h helper_gvec_usra_h_aarch64
|
||||||
#define helper_gvec_usra_s helper_gvec_usra_s_aarch64
|
#define helper_gvec_usra_s helper_gvec_usra_s_aarch64
|
||||||
|
#define helper_irg helper_irg_aarch64
|
||||||
#define helper_msr_i_daifclear helper_msr_i_daifclear_aarch64
|
#define helper_msr_i_daifclear helper_msr_i_daifclear_aarch64
|
||||||
#define helper_msr_i_daifset helper_msr_i_daifset_aarch64
|
#define helper_msr_i_daifset helper_msr_i_daifset_aarch64
|
||||||
#define helper_msr_i_spsel helper_msr_i_spsel_aarch64
|
#define helper_msr_i_spsel helper_msr_i_spsel_aarch64
|
||||||
|
|
|
@ -3575,6 +3575,7 @@
|
||||||
#define helper_gvec_usra_d helper_gvec_usra_d_aarch64eb
|
#define helper_gvec_usra_d helper_gvec_usra_d_aarch64eb
|
||||||
#define helper_gvec_usra_h helper_gvec_usra_h_aarch64eb
|
#define helper_gvec_usra_h helper_gvec_usra_h_aarch64eb
|
||||||
#define helper_gvec_usra_s helper_gvec_usra_s_aarch64eb
|
#define helper_gvec_usra_s helper_gvec_usra_s_aarch64eb
|
||||||
|
#define helper_irg helper_irg_aarch64eb
|
||||||
#define helper_msr_i_daifclear helper_msr_i_daifclear_aarch64eb
|
#define helper_msr_i_daifclear helper_msr_i_daifclear_aarch64eb
|
||||||
#define helper_msr_i_daifset helper_msr_i_daifset_aarch64eb
|
#define helper_msr_i_daifset helper_msr_i_daifset_aarch64eb
|
||||||
#define helper_msr_i_spsel helper_msr_i_spsel_aarch64eb
|
#define helper_msr_i_spsel helper_msr_i_spsel_aarch64eb
|
||||||
|
|
|
@ -3709,6 +3709,7 @@ aarch64_symbols = (
|
||||||
'helper_gvec_usra_d',
|
'helper_gvec_usra_d',
|
||||||
'helper_gvec_usra_h',
|
'helper_gvec_usra_h',
|
||||||
'helper_gvec_usra_s',
|
'helper_gvec_usra_s',
|
||||||
|
'helper_irg',
|
||||||
'helper_msr_i_daifclear',
|
'helper_msr_i_daifclear',
|
||||||
'helper_msr_i_daifset',
|
'helper_msr_i_daifset',
|
||||||
'helper_msr_i_spsel',
|
'helper_msr_i_spsel',
|
||||||
|
|
|
@ -79,3 +79,4 @@ obj-$(CONFIG_SOFTMMU) += psci.o
|
||||||
obj-$(TARGET_AARCH64) += translate-a64.o helper-a64.o
|
obj-$(TARGET_AARCH64) += translate-a64.o helper-a64.o
|
||||||
obj-$(TARGET_AARCH64) += translate-sve.o sve_helper.o
|
obj-$(TARGET_AARCH64) += translate-sve.o sve_helper.o
|
||||||
obj-$(TARGET_AARCH64) += pauth_helper.o
|
obj-$(TARGET_AARCH64) += pauth_helper.o
|
||||||
|
obj-$(TARGET_AARCH64) += mte_helper.o
|
||||||
|
|
|
@ -103,3 +103,5 @@ DEF_HELPER_FLAGS_3(autda, TCG_CALL_NO_WG, i64, env, i64, i64)
|
||||||
DEF_HELPER_FLAGS_3(autdb, TCG_CALL_NO_WG, i64, env, i64, i64)
|
DEF_HELPER_FLAGS_3(autdb, TCG_CALL_NO_WG, i64, env, i64, i64)
|
||||||
DEF_HELPER_FLAGS_2(xpaci, TCG_CALL_NO_RWG_SE, i64, env, i64)
|
DEF_HELPER_FLAGS_2(xpaci, TCG_CALL_NO_RWG_SE, i64, env, i64)
|
||||||
DEF_HELPER_FLAGS_2(xpacd, TCG_CALL_NO_RWG_SE, i64, env, i64)
|
DEF_HELPER_FLAGS_2(xpacd, TCG_CALL_NO_RWG_SE, i64, env, i64)
|
||||||
|
|
||||||
|
DEF_HELPER_FLAGS_3(irg, TCG_CALL_NO_RWG, i64, env, i64, i64)
|
|
@ -1265,4 +1265,9 @@ bool get_phys_addr(CPUARMState *env, target_ulong address,
|
||||||
*/
|
*/
|
||||||
#define GMID_EL1_BS 6
|
#define GMID_EL1_BS 6
|
||||||
|
|
||||||
|
static inline uint64_t address_with_allocation_tag(uint64_t ptr, int rtag)
|
||||||
|
{
|
||||||
|
return deposit64(ptr, 56, 4, rtag);
|
||||||
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -363,6 +363,12 @@ static TCGv_i64 clean_data_tbi(DisasContext *s, TCGv_i64 addr)
|
||||||
return clean;
|
return clean;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Insert a zero tag into src, with the result at dst. */
|
||||||
|
static void gen_address_with_allocation_tag0(TCGContext *s, TCGv_i64 dst, TCGv_i64 src)
|
||||||
|
{
|
||||||
|
tcg_gen_andi_i64(s, dst, src, ~MAKE_64BIT_MASK(56, 4));
|
||||||
|
}
|
||||||
|
|
||||||
typedef struct DisasCompare64 {
|
typedef struct DisasCompare64 {
|
||||||
TCGCond cond;
|
TCGCond cond;
|
||||||
TCGv_i64 value;
|
TCGv_i64 value;
|
||||||
|
@ -5506,6 +5512,18 @@ static void disas_data_proc_2src(DisasContext *s, uint32_t insn)
|
||||||
case 3: /* SDIV */
|
case 3: /* SDIV */
|
||||||
handle_div(s, true, sf, rm, rn, rd);
|
handle_div(s, true, sf, rm, rn, rd);
|
||||||
break;
|
break;
|
||||||
|
case 4: /* IRG */
|
||||||
|
if (sf == 0 || !dc_isar_feature(aa64_mte_insn_reg, s)) {
|
||||||
|
goto do_unallocated;
|
||||||
|
}
|
||||||
|
if (s->ata) {
|
||||||
|
gen_helper_irg(tcg_ctx, cpu_reg_sp(s, rd), tcg_ctx->cpu_env,
|
||||||
|
cpu_reg_sp(s, rn), cpu_reg(s, rm));
|
||||||
|
} else {
|
||||||
|
gen_address_with_allocation_tag0(tcg_ctx, cpu_reg_sp(s, rd),
|
||||||
|
cpu_reg_sp(s, rn));
|
||||||
|
}
|
||||||
|
break;
|
||||||
case 8: /* LSLV */
|
case 8: /* LSLV */
|
||||||
handle_shift_reg(s, A64_SHIFT_TYPE_LSL, sf, rm, rn, rd);
|
handle_shift_reg(s, A64_SHIFT_TYPE_LSL, sf, rm, rn, rd);
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue