Fix single-step trap flag setting

This commit is contained in:
Cacodemon345
2024-01-15 01:09:52 +06:00
parent 8c6fc11bb2
commit 911deeab1a
4 changed files with 3 additions and 9 deletions

View File

@@ -276,7 +276,7 @@ exec386_2386(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);

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);
@@ -871,7 +871,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);

View File

@@ -287,9 +287,6 @@ io_debug_check_addr(uint16_t addr)
int i = 0;
int set_trap = 0;
if (trap == 4)
return; /* Debug trap already pending. */
if (!(dr[7] & 0xFF))
return;

View File

@@ -168,9 +168,6 @@ mem_debug_check_addr(uint32_t addr, int write)
int i = 0;
int set_trap = 0;
if (trap == 4)
return; /* Debug trap already pending. */
if (!(dr[7] & 0xFF))
return;