Do not raise CPU trap if an exception has occurred, fixes #2577.

This commit is contained in:
OBattler
2022-10-28 04:12:31 +02:00
parent cb13ca526a
commit 535b19a027
2 changed files with 10 additions and 12 deletions

View File

@@ -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)

View File

@@ -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;