mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
target/arm: New utility function to extract EC from syndrome
Create and use a utility function to extract the EC field from a syndrome, rather than open-coding the shift. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20181012144235.19646-9-peter.maydell@linaro.org
This commit is contained in:
parent
eadb2febf0
commit
64b91e3f89
4 changed files with 9 additions and 4 deletions
|
@ -278,6 +278,11 @@ enum arm_exception_class {
|
|||
#define ARM_EL_IL (1 << ARM_EL_IL_SHIFT)
|
||||
#define ARM_EL_ISV (1 << ARM_EL_ISV_SHIFT)
|
||||
|
||||
static inline uint32_t syn_get_ec(uint32_t syn)
|
||||
{
|
||||
return syn >> ARM_EL_EC_SHIFT;
|
||||
}
|
||||
|
||||
/* Utility functions for constructing various kinds of syndrome value.
|
||||
* Note that in general we follow the AArch64 syndrome values; in a
|
||||
* few cases the value in HSR for exceptions taken to AArch32 Hyp
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue