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

View File

@@ -157,8 +157,6 @@
mem_set_access((smm ? ACCESS_CPU_SMM : ACCESS_CPU), 1, base, size, is_smram)
#define mem_set_access_smram_bus(smm, base, size, is_smram) \
mem_set_access((smm ? ACCESS_BUS_SMM : ACCESS_BUS), 1, base, size, is_smram)
#define flushmmucache_cr3 \
flushmmucache_nopc
typedef struct {
uint16_t x : 5,

View File

@@ -2319,7 +2319,7 @@ mem_mapping_recalc(uint64_t base, uint64_t size)
map = map->next;
}
flushmmucache_cr3();
flushmmucache_nopc();
#ifdef ENABLE_MEM_LOG
pclog("\nMemory map:\n");

View File

@@ -246,7 +246,7 @@ sigma_out(uint16_t addr, uint8_t val, void *p)
return;
case 0x2DD: /* Page in RAM at 0xC1800 */
if (sigma->rom_paged != 0)
flushmmucache_cr3();
flushmmucache_nopc();
sigma->rom_paged = 0x00;
return;
@@ -290,7 +290,7 @@ sigma_in(uint16_t addr, void *p)
case 0x2DD: /* Page in ROM at 0xC1800 */
result = (sigma->rom_paged ? 0x80 : 0);
if (sigma->rom_paged != 0x80)
flushmmucache_cr3();
flushmmucache_nopc();
sigma->rom_paged = 0x80;
break;
case 0x3D1: