diff --git a/target/arm/op_helper.c b/target/arm/op_helper.c index e5a346cb87a30140d085361180422edd01d38d10..27d16ad9ad90eedb70dd817f09f8e2d85646d879 100644 --- a/target/arm/op_helper.c +++ b/target/arm/op_helper.c @@ -295,7 +295,12 @@ void HELPER(wfi)(CPUARMState *env, uint32_t insn_len) } if (target_el) { - env->pc -= insn_len; + if (env->aarch64) { + env->pc -= insn_len; + } else { + env->regs[15] -= insn_len; + } + raise_exception(env, EXCP_UDEF, syn_wfx(1, 0xe, 0, insn_len == 2), target_el); }