summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2010-06-02 12:58:11 -0500
committerGabe Black <gblack@eecs.umich.edu>2010-06-02 12:58:11 -0500
commit239c9af90d61b2877a8cee8b91f162e7a0bf1e72 (patch)
tree9eabb1cfc5d2de53927fd4bde405a2b4ce3bf85a
parenta5ea52bb456951a7c8bdecfe251ca8a093bcfb2f (diff)
downloadgem5-239c9af90d61b2877a8cee8b91f162e7a0bf1e72.tar.xz
ARM: Implement a badMode function that says whether a mode is legal.
-rw-r--r--src/arch/arm/types.hh18
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
};