diff options
Diffstat (limited to 'src/arch/arm')
-rw-r--r-- | src/arch/arm/types.hh | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/arch/arm/types.hh b/src/arch/arm/types.hh index e99a00435..2fe4f4aa7 100644 --- a/src/arch/arm/types.hh +++ b/src/arch/arm/types.hh @@ -234,6 +234,24 @@ namespace ArmISA MODE_SYSTEM = 31 }; + static inline bool + badMode(OperatingMode mode) + { + switch (mode) { + case MODE_USER: + case MODE_FIQ: + case MODE_IRQ: + case MODE_SVC: + case MODE_MON: + case MODE_ABORT: + case MODE_UNDEFINED: + case MODE_SYSTEM: + return false; + default: + return true; + } + } + struct CoreSpecific { // Empty for now on the ARM }; |