arch-arm: Overload currEL helper with CPSR argument

Change-Id: I1edabc61637ecb9d30bca34b5dbcf1de12b35fe0
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/20250
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
Giacomo Travaglini
2019-08-16 14:25:20 +01:00
parent befa49ffb7
commit 4ccb1ea710

View File

@@ -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