Preparation for SMI# and NMI# changes.

This commit is contained in:
OBattler
2022-07-16 02:45:46 +02:00
parent 68435320aa
commit da5d451386
3 changed files with 18 additions and 9 deletions

View File

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

View File

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

View File

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