>From 0e66ca87ac7c94219ab49cfbed6f586c51c697de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Poussineau?= Date: Sun, 28 Feb 2016 15:00:29 +0100 Subject: [PATCH] target-i386: partially revert 'Perform set/reset_inhibit_irq inline' This partially reverts commit 7f0b7141b4c7deab51efd8ee1e83eab2d9b7a9ea to fix Windows XP. --- target-i386/cc_helper.c | 5 +++++ target-i386/helper.h | 1 + target-i386/translate.c | 3 ++- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/target-i386/cc_helper.c b/target-i386/cc_helper.c index 83af223..e6f4fe9 100644 --- a/target-i386/cc_helper.c +++ b/target-i386/cc_helper.c @@ -383,3 +383,8 @@ void helper_sti_vm(CPUX86State *env) } } #endif + +void helper_set_inhibit_irq(CPUX86State *env) +{ + env->hflags |= HF_INHIBIT_IRQ_MASK; +} diff --git a/target-i386/helper.h b/target-i386/helper.h index e33451a..bdba6bd 100644 --- a/target-i386/helper.h +++ b/target-i386/helper.h @@ -70,6 +70,7 @@ DEF_HELPER_1(cli, void, env) DEF_HELPER_1(sti, void, env) DEF_HELPER_1(clac, void, env) DEF_HELPER_1(stac, void, env) +DEF_HELPER_1(set_inhibit_irq, void, env) DEF_HELPER_3(boundw, void, env, tl, int) DEF_HELPER_3(boundl, void, env, tl, int) DEF_HELPER_1(rsm, void, env) diff --git a/target-i386/translate.c b/target-i386/translate.c index 9171929..4ec94b9 100644 --- a/target-i386/translate.c +++ b/target-i386/translate.c @@ -6780,7 +6780,8 @@ static target_ulong disas_insn(CPUX86State *env, DisasContext *s, /* interruptions are enabled only the first insn after sti */ /* If several instructions disable interrupts, only the _first_ does it */ - gen_set_hflag(s, HF_INHIBIT_IRQ_MASK); + if (!(s->tb->flags & HF_INHIBIT_IRQ_MASK)) + gen_helper_set_inhibit_irq(cpu_env); /* give a chance to handle pending irqs */ gen_jmp_im(s->pc - s->cs_base); gen_eob(s); -- 2.1.4