aboutsummaryrefslogtreecommitdiff
path: root/target-arm/op_helper.c
diff options
context:
space:
mode:
Diffstat (limited to 'target-arm/op_helper.c')
-rw-r--r--target-arm/op_helper.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/target-arm/op_helper.c b/target-arm/op_helper.c
index a52231346c..a918e5b27a 100644
--- a/target-arm/op_helper.c
+++ b/target-arm/op_helper.c
@@ -218,8 +218,10 @@ uint32_t HELPER(usat16)(CPUARMState *env, uint32_t x, uint32_t shift)
void HELPER(wfi)(CPUARMState *env)
{
+ CPUState *cs = CPU(arm_env_get_cpu(env));
+
env->exception_index = EXCP_HLT;
- env->halted = 1;
+ cs->halted = 1;
cpu_loop_exit(env);
}