diff options
-rw-r--r-- | target/arm/op_helper.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/target/arm/op_helper.c b/target/arm/op_helper.c index 2a85666579..5a94a5f2ba 100644 --- a/target/arm/op_helper.c +++ b/target/arm/op_helper.c @@ -370,6 +370,11 @@ static inline int check_wfx_trap(CPUARMState *env, bool is_wfe) int cur_el = arm_current_el(env); uint64_t mask; + if (arm_feature(env, ARM_FEATURE_M)) { + /* M profile cores can never trap WFI/WFE. */ + return 0; + } + /* If we are currently in EL0 then we need to check if SCTLR is set up for * WFx instructions being trapped to EL1. These trap bits don't exist in v7. */ |