aboutsummaryrefslogtreecommitdiff
path: root/target/ppc/excp_helper.c
diff options
context:
space:
mode:
authorGreg Kurz <groug@kaod.org>2020-12-09 18:35:36 +0100
committerDavid Gibson <david@gibson.dropbear.id.au>2020-12-14 15:54:12 +1100
commitd57d72a874e6b6b7bea70fd7024fb217d4b51b52 (patch)
treeaf7c50cf9f96bdff37ab46b349c3c233b055cad4 /target/ppc/excp_helper.c
parentd55dfd446cd58b36f1b58d178039d7657a50e803 (diff)
downloadqemu-d57d72a874e6b6b7bea70fd7024fb217d4b51b52.zip
qemu-d57d72a874e6b6b7bea70fd7024fb217d4b51b52.tar.gz
qemu-d57d72a874e6b6b7bea70fd7024fb217d4b51b52.tar.bz2
target/ppc: Introduce an mmu_is_64bit() helper
Callers don't really need to know how 64-bit MMU model enums are computed. Hide this in a helper. Signed-off-by: Greg Kurz <groug@kaod.org> Message-Id: <20201209173536.1437351-3-groug@kaod.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'target/ppc/excp_helper.c')
-rw-r--r--target/ppc/excp_helper.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/target/ppc/excp_helper.c b/target/ppc/excp_helper.c
index 74f9870..85de7e6 100644
--- a/target/ppc/excp_helper.c
+++ b/target/ppc/excp_helper.c
@@ -266,7 +266,7 @@ static inline void powerpc_excp(PowerPCCPU *cpu, int excp_model, int excp)
*/
if (excp == POWERPC_EXCP_HV_EMU
#if defined(TARGET_PPC64)
- && !((env->mmu_model & POWERPC_MMU_64) && (env->msr_mask & MSR_HVB))
+ && !(mmu_is_64bit(env->mmu_model) && (env->msr_mask & MSR_HVB))
#endif /* defined(TARGET_PPC64) */
) {
@@ -824,7 +824,7 @@ static inline void powerpc_excp(PowerPCCPU *cpu, int excp_model, int excp)
vector = (uint32_t)vector;
}
} else {
- if (!msr_isf && !(env->mmu_model & POWERPC_MMU_64)) {
+ if (!msr_isf && !mmu_is_64bit(env->mmu_model)) {
vector = (uint32_t)vector;
} else {
new_msr |= (target_ulong)1 << MSR_SF;