diff options
Diffstat (limited to 'cpu-exec.c')
-rw-r--r-- | cpu-exec.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/cpu-exec.c b/cpu-exec.c index 72e32684a1..de1fff2122 100644 --- a/cpu-exec.c +++ b/cpu-exec.c @@ -251,6 +251,19 @@ int cpu_exec(CPUState *env1) TranslationBlock *tb; uint8_t *tc_ptr; +#if defined(TARGET_I386) + /* handle exit of HALTED state */ + if (env1->hflags & HF_HALTED_MASK) { + /* disable halt condition */ + if ((env1->interrupt_request & CPU_INTERRUPT_HARD) && + (env1->eflags & IF_MASK)) { + env1->hflags &= ~HF_HALTED_MASK; + } else { + return EXCP_HALTED; + } + } +#endif + cpu_single_env = env1; /* first we save global registers */ |