diff --git a/src/cpu/386.c b/src/cpu/386.c index 30340c226..ecf426270 100644 --- a/src/cpu/386.c +++ b/src/cpu/386.c @@ -172,17 +172,6 @@ exec386(int cycs) if (cpu_end_block_after_ins) cpu_end_block_after_ins--; - if (trap) { - flags_rebuild(); - trap = 0; -#ifndef USE_NEW_DYNAREC - oldcs = CS; -#endif - cpu_state.oldpc = cpu_state.pc; - dr[6] |= 0x4000; - x86_int(1); - } - if (cpu_state.abrt) { flags_rebuild(); tempi = cpu_state.abrt & ABRT_MASK; @@ -205,6 +194,15 @@ exec386(int cycs) #endif } } + } else if (trap) { + flags_rebuild(); + trap = 0; +#ifndef USE_NEW_DYNAREC + oldcs = CS; +#endif + cpu_state.oldpc = cpu_state.pc; + dr[6] |= 0x4000; + x86_int(1); } if (smi_line) diff --git a/src/cpu/386_dynarec.c b/src/cpu/386_dynarec.c index f90ce5f80..ca7b94647 100644 --- a/src/cpu/386_dynarec.c +++ b/src/cpu/386_dynarec.c @@ -398,7 +398,7 @@ exec386_dynarec_int(void) CPU_BLOCK_END(); } - if (trap) { + if (!cpu_state.abrt && trap) { trap = 0; #ifndef USE_NEW_DYNAREC oldcs = CS;