Only set eip to the instruction pointer after an interrupt if the interrupt was user-generated (#875)

This commit is contained in:
Andrew Dutcher 2017-08-29 03:14:36 -07:00 committed by Nguyen Anh Quynh
parent a893bcf138
commit 363cbacee4

View file

@ -143,8 +143,10 @@ int cpu_exec(struct uc_struct *uc, CPUArchState *env) // qq
}
cpu->exception_index = -1;
#if defined(TARGET_X86_64)
// point EIP to the next instruction after INT
env->eip = env->exception_next_eip;
if (env->exception_is_int) {
// point EIP to the next instruction after INT
env->eip = env->exception_next_eip;
}
#endif
#if defined(TARGET_MIPS) || defined(TARGET_MIPS64)
env->active_tc.PC = uc->next_pc;