diff options
Diffstat (limited to 'target')
-rw-r--r-- | target/arm/mte_helper.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/target/arm/mte_helper.c b/target/arm/mte_helper.c index 734cc5c..153bd1e 100644 --- a/target/arm/mte_helper.c +++ b/target/arm/mte_helper.c @@ -525,14 +525,10 @@ static void mte_check_fail(CPUARMState *env, uint32_t desc, reg_el = regime_el(env, arm_mmu_idx); sctlr = env->cp15.sctlr_el[reg_el]; - switch (arm_mmu_idx) { - case ARMMMUIdx_E10_0: - case ARMMMUIdx_E20_0: - el = 0; + el = arm_current_el(env); + if (el == 0) { tcf = extract64(sctlr, 38, 2); - break; - default: - el = reg_el; + } else { tcf = extract64(sctlr, 40, 2); } |