diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/arch/arm/utility.hh | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/arch/arm/utility.hh b/src/arch/arm/utility.hh index ded5aa36c..3a1506114 100644 --- a/src/arch/arm/utility.hh +++ b/src/arch/arm/utility.hh @@ -156,6 +156,12 @@ currEL(ThreadContext *tc) return opModeToEL(currOpMode(tc)); } +inline ExceptionLevel +currEL(CPSR cpsr) +{ + return opModeToEL((OperatingMode) (uint8_t)cpsr.mode); +} + /** * This function checks whether selected EL provided as an argument * is using the AArch32 ISA. This information might be unavailable |