mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
target/arm: Rename TBFLAG_A64_NV2_MEM_E20 with *_E2H
Install e2h in tbflags and compute nv2_mem_e20 from that in aarch64_tr_init_disas_context. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
committed by
Peter Maydell
parent
5bd746e212
commit
10bca9650c
+1
-2
@@ -3065,8 +3065,7 @@ FIELD(TBFLAG_A64, ATA0, 31, 1)
|
||||
FIELD(TBFLAG_A64, NV, 32, 1)
|
||||
FIELD(TBFLAG_A64, NV1, 33, 1)
|
||||
FIELD(TBFLAG_A64, NV2, 34, 1)
|
||||
/* Set if FEAT_NV2 RAM accesses use the EL2&0 translation regime */
|
||||
FIELD(TBFLAG_A64, NV2_MEM_E20, 35, 1)
|
||||
FIELD(TBFLAG_A64, E2H, 35, 1)
|
||||
/* Set if FEAT_NV2 RAM accesses are big-endian */
|
||||
FIELD(TBFLAG_A64, NV2_MEM_BE, 36, 1)
|
||||
FIELD(TBFLAG_A64, AH, 37, 1) /* FPCR.AH */
|
||||
|
||||
@@ -258,6 +258,11 @@ static CPUARMTBFlags rebuild_hflags_a64(CPUARMState *env, int el, int fp_el,
|
||||
DP_TBFLAG_A64(flags, TBII, tbii);
|
||||
DP_TBFLAG_A64(flags, TBID, tbid);
|
||||
|
||||
/* E2H is used by both VHE and NV2. */
|
||||
if (hcr & HCR_E2H) {
|
||||
DP_TBFLAG_A64(flags, E2H, 1);
|
||||
}
|
||||
|
||||
if (cpu_isar_feature(aa64_sve, env_archcpu(env))) {
|
||||
int sve_el = sve_exception_el(env, el);
|
||||
|
||||
@@ -390,9 +395,6 @@ static CPUARMTBFlags rebuild_hflags_a64(CPUARMState *env, int el, int fp_el,
|
||||
}
|
||||
if (hcr & HCR_NV2) {
|
||||
DP_TBFLAG_A64(flags, NV2, 1);
|
||||
if (hcr & HCR_E2H) {
|
||||
DP_TBFLAG_A64(flags, NV2_MEM_E20, 1);
|
||||
}
|
||||
if (env->cp15.sctlr_el[2] & SCTLR_EE) {
|
||||
DP_TBFLAG_A64(flags, NV2_MEM_BE, 1);
|
||||
}
|
||||
|
||||
@@ -10304,10 +10304,11 @@ static void aarch64_tr_init_disas_context(DisasContextBase *dcbase,
|
||||
dc->pstate_za = EX_TBFLAG_A64(tb_flags, PSTATE_ZA);
|
||||
dc->sme_trap_nonstreaming = EX_TBFLAG_A64(tb_flags, SME_TRAP_NONSTREAMING);
|
||||
dc->naa = EX_TBFLAG_A64(tb_flags, NAA);
|
||||
dc->e2h = EX_TBFLAG_A64(tb_flags, E2H);
|
||||
dc->nv = EX_TBFLAG_A64(tb_flags, NV);
|
||||
dc->nv1 = EX_TBFLAG_A64(tb_flags, NV1);
|
||||
dc->nv2 = EX_TBFLAG_A64(tb_flags, NV2);
|
||||
dc->nv2_mem_e20 = EX_TBFLAG_A64(tb_flags, NV2_MEM_E20);
|
||||
dc->nv2_mem_e20 = dc->nv2 && dc->e2h;
|
||||
dc->nv2_mem_be = EX_TBFLAG_A64(tb_flags, NV2_MEM_BE);
|
||||
dc->fpcr_ah = EX_TBFLAG_A64(tb_flags, AH);
|
||||
dc->fpcr_nep = EX_TBFLAG_A64(tb_flags, NEP);
|
||||
|
||||
@@ -150,6 +150,8 @@ typedef struct DisasContext {
|
||||
bool trap_eret;
|
||||
/* True if FEAT_LSE2 SCTLR_ELx.nAA is set */
|
||||
bool naa;
|
||||
/* True if HCR_EL2.E2H is set */
|
||||
bool e2h;
|
||||
/* True if FEAT_NV HCR_EL2.NV is enabled */
|
||||
bool nv;
|
||||
/* True if NV enabled and HCR_EL2.NV1 is set */
|
||||
|
||||
Reference in New Issue
Block a user