The only x86 exception now logged is illegal instruction.

This commit is contained in:
OBattler 2016-08-10 04:56:55 +02:00
parent 246ef0f785
commit 9a1d5ba3a7
2 changed files with 9 additions and 5 deletions

View file

@ -269,12 +269,13 @@ void x86_int_sw(int num)
CPU_BLOCK_END();
}
int prev_prev_opcode = 0;
int prev_opcode = 0;
void x86illegal()
{
uint16_t addr;
pclog("x86 illegal %04X %08X %04X:%08X %02X (prev. %02X)\n",msw,cr0,CS,cpu_state.pc,opcode,prev_opcode);
pclog("x86 illegal %04X %08X %04X:%08X %02X (prev. %02X, prev. prev. %02X)\n",msw,cr0,CS,cpu_state.pc,opcode,prev_opcode,prev_prev_opcode);
// if (output)
// {
@ -1272,6 +1273,7 @@ void exec386_dynarec(int cycs)
if (!abrt)
{
trap = flags & T_FLAG;
prev_prev_opcode = prev_opcode;
prev_opcode = opcode;
opcode = fetchdat & 0xFF;
fetchdat >>= 8;
@ -1424,6 +1426,7 @@ inrecomp=0;
if (!abrt)
{
trap = flags & T_FLAG;
prev_prev_opcode = prev_opcode;
prev_opcode = opcode;
opcode = fetchdat & 0xFF;
fetchdat >>= 8;
@ -1504,6 +1507,7 @@ inrecomp=0;
if (!abrt)
{
trap = flags & T_FLAG;
prev_prev_opcode = prev_opcode;
prev_opcode = opcode;
opcode = fetchdat & 0xFF;
fetchdat >>= 8;

View file

@ -145,25 +145,25 @@ void x86_doabrt(int x86_abrt)
}
void x86gpf(char *s, uint16_t error)
{
pclog("GPF %04X : %s\n", error, s);
// pclog("GPF %04X : %s\n", error, s);
abrt = ABRT_GPF;
abrt_error = error;
}
void x86ss(char *s, uint16_t error)
{
pclog("SS %04X\n", error);
// pclog("SS %04X\n", error);
abrt = ABRT_SS;
abrt_error = error;
}
void x86ts(char *s, uint16_t error)
{
pclog("TS %04X\n", error);
// pclog("TS %04X\n", error);
abrt = ABRT_TS;
abrt_error = error;
}
void x86np(char *s, uint16_t error)
{
pclog("NP %04X : %s\n", error, s);
// pclog("NP %04X : %s\n", error, s);
abrt = ABRT_NP;
abrt_error = error;
}