diff options
author | Greg Kurz <groug@kaod.org> | 2020-12-09 18:35:36 +0100 |
---|---|---|
committer | David Gibson <david@gibson.dropbear.id.au> | 2020-12-14 15:54:12 +1100 |
commit | d57d72a874e6b6b7bea70fd7024fb217d4b51b52 (patch) | |
tree | af7c50cf9f96bdff37ab46b349c3c233b055cad4 /target/ppc/cpu-qom.h | |
parent | d55dfd446cd58b36f1b58d178039d7657a50e803 (diff) | |
download | qemu-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/cpu-qom.h')
-rw-r--r-- | target/ppc/cpu-qom.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/target/ppc/cpu-qom.h b/target/ppc/cpu-qom.h index 5fdb96f..63b9e86 100644 --- a/target/ppc/cpu-qom.h +++ b/target/ppc/cpu-qom.h @@ -74,6 +74,11 @@ enum powerpc_mmu_t { POWERPC_MMU_3_00 = POWERPC_MMU_64 | 0x00000005, }; +static inline bool mmu_is_64bit(powerpc_mmu_t mmu_model) +{ + return mmu_model & POWERPC_MMU_64; +} + /*****************************************************************************/ /* Exception model */ typedef enum powerpc_excp_t powerpc_excp_t; |