More oversight fixing

This commit is contained in:
Cacodemon345
2024-01-14 20:12:53 +06:00
parent 3cf747d93e
commit 55f03f63e5
3 changed files with 12 additions and 8 deletions

View File

@@ -1492,7 +1492,7 @@ x86_int_sw(int num)
}
}
trap = 0;
trap &= ~1;
CPU_BLOCK_END();
}
@@ -1535,7 +1535,7 @@ x86_int_sw_rm(int num)
#endif
cycles -= timing_int_rm;
trap = 0;
trap &= ~1;
CPU_BLOCK_END();
return 0;

View File

@@ -300,7 +300,7 @@ exec386_dynarec_int(void)
opcode = fetchdat & 0xFF;
fetchdat >>= 8;
trap = cpu_state.flags & T_FLAG;
trap |= cpu_state.flags & T_FLAG;
cpu_state.pc++;
x86_opcodes[(opcode | cpu_state.op32) & 0x3ff](fetchdat);
@@ -342,8 +342,9 @@ exec386_dynarec_int(void)
block_ended:
if (!cpu_state.abrt && trap) {
if (trap != 4)
dr[6] |= (trap == 2) ? 0x8000 : 0x4000;
if (trap & 2) dr[6] |= 0x8000;
if (trap & 1) dr[6] |= 0x4000;
trap = 0;
# ifndef USE_NEW_DYNAREC
oldcs = CS;
@@ -864,7 +865,7 @@ exec386(int32_t cycs)
#endif
opcode = fetchdat & 0xFF;
fetchdat >>= 8;
trap = cpu_state.flags & T_FLAG;
trap |= cpu_state.flags & T_FLAG;
cpu_state.pc++;
x86_opcodes[(opcode | cpu_state.op32) & 0x3ff](fetchdat);
@@ -908,12 +909,15 @@ exec386(int32_t cycs)
}
} else if (trap) {
flags_rebuild();
if (trap & 1)
dr[6] |= 0x4000;
if (trap & 2)
dr[6] |= 0x8000;
trap = 0;
#ifndef USE_NEW_DYNAREC
oldcs = CS;
#endif
cpu_state.oldpc = cpu_state.pc;
dr[6] |= 0x4000;
x86_int(1);
}

View File

@@ -2289,7 +2289,7 @@ taskswitch286(uint16_t seg, uint16_t *segdat, int is32)
rf_flag_no_clear = 1;
if (t_bit) {
trap = 2;
trap |= 2;
#ifdef USE_DYNAREC
cpu_block_end = 1;
#endif