diff --git a/src/cpu/386.c b/src/cpu/386.c index 2484cbb66..5f30e1199 100644 --- a/src/cpu/386.c +++ b/src/cpu/386.c @@ -210,9 +210,6 @@ exec386(int cycs) loadcs(readmemw(0, addr + 2)); } } else if (nmi && nmi_enable && nmi_mask) { - if (is486 && (cpu_fast_off_flags & 0x20000000)) - cpu_fast_off_count = cpu_fast_off_val + 1; - cpu_state.oldpc = cpu_state.pc; x86_int(2); nmi_enable = 0; diff --git a/src/cpu/386_common.c b/src/cpu/386_common.c index 73a06f553..a88f892e1 100644 --- a/src/cpu/386_common.c +++ b/src/cpu/386_common.c @@ -1183,9 +1183,6 @@ enter_smm(int in_hlt) void enter_smm_check(int in_hlt) { - if (smi_line && (cpu_fast_off_flags & 0x80000000)) - cpu_fast_off_count = cpu_fast_off_val + 1; - if ((in_smm == 0) && smi_line) { #ifdef ENABLE_386_COMMON_LOG x386_common_log("SMI while not in SMM\n"); @@ -1840,6 +1837,24 @@ sysret(uint32_t fetchdat) } +void +raise_smi(void) +{ + if (is486 && (cpu_fast_off_flags & 0x80000000)) + cpu_fast_off_count = cpu_fast_off_val + 1; + + smi_line = 1; +} + + +void +raise_nmi(void) +{ + if (is486 && (cpu_fast_off_flags & 0x20000000)) + cpu_fast_off_count = cpu_fast_off_val + 1; +} + + #ifndef USE_DYNAREC /* This is for compatibility with new x87 code. */ void codegen_set_rounding_mode(int mode) diff --git a/src/cpu/386_dynarec.c b/src/cpu/386_dynarec.c index 46674fbc6..3e4d91ed2 100644 --- a/src/cpu/386_dynarec.c +++ b/src/cpu/386_dynarec.c @@ -819,9 +819,6 @@ exec386_dynarec(int cycs) if (smi_line) enter_smm_check(0); else if (nmi && nmi_enable && nmi_mask) { - if (is486 && (cpu_fast_off_flags & 0x20000000)) - cpu_fast_off_count = cpu_fast_off_val + 1; - #ifndef USE_NEW_DYNAREC oldcs = CS; #endif