x86: correct EIP of INT instruction by updating it only after calling interrupt handler

This commit is contained in:
Nguyen Anh Quynh
2015-09-06 14:58:11 +08:00
parent cf00345d65
commit a166c24f8e
2 changed files with 5 additions and 1 deletions

View File

@@ -2796,7 +2796,7 @@ static void gen_interrupt(DisasContext *s, int intno,
gen_update_cc_op(s);
// Unicorn: skip to the next instruction after our interrupt callback
gen_jmp_im(s, next_eip);
gen_jmp_im(s, cur_eip);
gen_helper_raise_interrupt(tcg_ctx, tcg_ctx->cpu_env, tcg_const_i32(tcg_ctx, intno),
tcg_const_i32(tcg_ctx, next_eip - cur_eip));
s->is_jmp = DISAS_TB_JUMP;