Replaced calls to flushmmucache_cr3() to direct calls to flushmmucache_nopc() and removed the #define.

This commit is contained in:
OBattler
2023-06-11 22:12:18 +02:00
parent f4c59e907d
commit e4d860c025
7 changed files with 24 additions and 26 deletions

View File

@@ -1683,7 +1683,7 @@ sysexit(uint32_t fetchdat)
cpu_cur_status &= ~(CPU_STATUS_NOTFLATSS /* | CPU_STATUS_V86*/);
cpu_cur_status |= (CPU_STATUS_USE32 | CPU_STATUS_STACK32 | CPU_STATUS_PMODE);
flushmmucache_cr3();
flushmmucache_nopc();
set_use32(1);
set_stack32(1);
@@ -1804,7 +1804,7 @@ sysret(uint32_t fetchdat)
cpu_cur_status &= ~(CPU_STATUS_NOTFLATSS /* | CPU_STATUS_V86*/);
cpu_cur_status |= (CPU_STATUS_USE32 | CPU_STATUS_STACK32 | CPU_STATUS_PMODE);
flushmmucache_cr3();
flushmmucache_nopc();
set_use32(1);
set_stack32(1);

View File

@@ -996,7 +996,7 @@ opLOADALL386(uint32_t fetchdat)
loadall_load_segment(la_addr + 0xc0, &cpu_state.seg_es);
if (CPL == 3 && oldcpl != 3)
flushmmucache_cr3();
flushmmucache_nopc();
oldcpl = CPL;
CLOCK_CYCLES(350);

View File

@@ -461,7 +461,7 @@ op0F01_common(uint32_t fetchdat, int is32, int is286, int ea32)
break;
}
SEG_CHECK_READ(cpu_state.ea_seg);
flushmmucache_cr3();
flushmmucache_nopc();
CLOCK_CYCLES(12);
PREFETCH_RUN(12, 2, rmdat, 0, 0, 0, 0, ea32);
break;

View File

@@ -580,7 +580,7 @@ loadcs(uint16_t seg)
do_seg_load(&cpu_state.seg_cs, segdat);
use32 = (segdat[3] & 0x40) ? 0x300 : 0;
if ((CPL == 3) && (oldcpl != 3))
flushmmucache_cr3();
flushmmucache_nopc();
#ifdef USE_NEW_DYNAREC
oldcpl = CPL;
#endif
@@ -609,7 +609,7 @@ loadcs(uint16_t seg)
cpu_state.seg_cs.access = (cpu_state.eflags & VM_FLAG) ? 0xe2 : 0x82;
cpu_state.seg_cs.ar_high = 0x10;
if ((CPL == 3) && (oldcpl != 3))
flushmmucache_cr3();
flushmmucache_nopc();
#ifdef USE_NEW_DYNAREC
oldcpl = CPL;
#endif
@@ -673,7 +673,7 @@ loadcsjmp(uint16_t seg, uint32_t old_pc)
do_seg_load(&cpu_state.seg_cs, segdat);
if ((CPL == 3) && (oldcpl != 3))
flushmmucache_cr3();
flushmmucache_nopc();
#ifdef USE_NEW_DYNAREC
oldcpl = CPL;
#endif
@@ -751,7 +751,7 @@ loadcsjmp(uint16_t seg, uint32_t old_pc)
CS = seg2;
do_seg_load(&cpu_state.seg_cs, segdat);
if ((CPL == 3) && (oldcpl != 3))
flushmmucache_cr3();
flushmmucache_nopc();
#ifdef USE_NEW_DYNAREC
oldcpl = CPL;
#endif
@@ -794,7 +794,7 @@ loadcsjmp(uint16_t seg, uint32_t old_pc)
cpu_state.seg_cs.access = (cpu_state.eflags & VM_FLAG) ? 0xe2 : 0x82;
cpu_state.seg_cs.ar_high = 0x10;
if ((CPL == 3) && (oldcpl != 3))
flushmmucache_cr3();
flushmmucache_nopc();
#ifdef USE_NEW_DYNAREC
oldcpl = CPL;
#endif
@@ -957,7 +957,7 @@ loadcscall(uint16_t seg)
CS = seg;
do_seg_load(&cpu_state.seg_cs, segdat);
if ((CPL == 3) && (oldcpl != 3))
flushmmucache_cr3();
flushmmucache_nopc();
#ifdef USE_NEW_DYNAREC
oldcpl = CPL;
#endif
@@ -1100,7 +1100,7 @@ loadcscall(uint16_t seg)
CS = seg2;
do_seg_load(&cpu_state.seg_cs, segdat);
if ((CPL == 3) && (oldcpl != 3))
flushmmucache_cr3();
flushmmucache_nopc();
#ifdef USE_NEW_DYNAREC
oldcpl = CPL;
#endif
@@ -1182,7 +1182,7 @@ loadcscall(uint16_t seg)
CS = seg2;
do_seg_load(&cpu_state.seg_cs, segdat);
if ((CPL == 3) && (oldcpl != 3))
flushmmucache_cr3();
flushmmucache_nopc();
#ifdef USE_NEW_DYNAREC
oldcpl = CPL;
#endif
@@ -1227,7 +1227,7 @@ loadcscall(uint16_t seg)
cpu_state.seg_cs.access = (cpu_state.eflags & VM_FLAG) ? 0xe2 : 0x82;
cpu_state.seg_cs.ar_high = 0x10;
if ((CPL == 3) && (oldcpl != 3))
flushmmucache_cr3();
flushmmucache_nopc();
#ifdef USE_NEW_DYNAREC
oldcpl = CPL;
#endif
@@ -1332,7 +1332,7 @@ pmoderetf(int is32, uint16_t off)
do_seg_load(&cpu_state.seg_cs, segdat);
cpu_state.seg_cs.access = (cpu_state.seg_cs.access & ~(3 << 5)) | ((CS & 3) << 5);
if ((CPL == 3) && (oldcpl != 3))
flushmmucache_cr3();
flushmmucache_nopc();
#ifdef USE_NEW_DYNAREC
oldcpl = CPL;
#endif
@@ -1445,7 +1445,7 @@ pmoderetf(int is32, uint16_t off)
CS = seg;
do_seg_load(&cpu_state.seg_cs, segdat);
if ((CPL == 3) && (oldcpl != 3))
flushmmucache_cr3();
flushmmucache_nopc();
#ifdef USE_NEW_DYNAREC
oldcpl = CPL;
#endif
@@ -1697,7 +1697,7 @@ pmodeint(int num, int soft)
CS = (seg & 0xfffc) | new_cpl;
cpu_state.seg_cs.access = (cpu_state.seg_cs.access & ~0x60) | (new_cpl << 5);
if ((CPL == 3) && (oldcpl != 3))
flushmmucache_cr3();
flushmmucache_nopc();
#ifdef USE_NEW_DYNAREC
oldcpl = CPL;
#endif
@@ -1863,7 +1863,7 @@ pmodeiret(int is32)
cpu_state.seg_cs.access = 0xe2;
cpu_state.seg_cs.ar_high = 0x10;
if ((CPL == 3) && (oldcpl != 3))
flushmmucache_cr3();
flushmmucache_nopc();
#ifdef USE_NEW_DYNAREC
oldcpl = CPL;
#endif
@@ -1948,7 +1948,7 @@ pmodeiret(int is32)
do_seg_load(&cpu_state.seg_cs, segdat);
cpu_state.seg_cs.access = (cpu_state.seg_cs.access & ~0x60) | ((CS & 0x0003) << 5);
if ((CPL == 3) && (oldcpl != 3))
flushmmucache_cr3();
flushmmucache_nopc();
#ifdef USE_NEW_DYNAREC
oldcpl = CPL;
#endif
@@ -2037,7 +2037,7 @@ pmodeiret(int is32)
do_seg_load(&cpu_state.seg_cs, segdat);
cpu_state.seg_cs.access = (cpu_state.seg_cs.access & ~0x60) | ((CS & 3) << 5);
if ((CPL == 3) && (oldcpl != 3))
flushmmucache_cr3();
flushmmucache_nopc();
#ifdef USE_NEW_DYNAREC
oldcpl = CPL;
#endif
@@ -2233,7 +2233,7 @@ taskswitch286(uint16_t seg, uint16_t *segdat, int is32)
CS = new_cs;
do_seg_load(&cpu_state.seg_cs, segdat2);
if ((CPL == 3) && (oldcpl != 3))
flushmmucache_cr3();
flushmmucache_nopc();
#ifdef USE_NEW_DYNAREC
oldcpl = CPL;
#endif
@@ -2401,7 +2401,7 @@ taskswitch286(uint16_t seg, uint16_t *segdat, int is32)
CS = new_cs;
do_seg_load(&cpu_state.seg_cs, segdat2);
if ((CPL == 3) && (oldcpl != 3))
flushmmucache_cr3();
flushmmucache_nopc();
#ifdef USE_NEW_DYNAREC
oldcpl = CPL;
#endif