cpu/i386: saner fatal error handling

This commit is contained in:
angelosa 2024-03-23 02:27:21 +01:00
parent f338e1590e
commit b8d8e7a052
5 changed files with 7 additions and 6 deletions

View file

@ -1690,7 +1690,7 @@ void i386_device::i386_pop_rm16() // Opcode 0x8f
catch(uint64_t e)
{
REG32(ESP) = temp_sp;
throw e;
throw emu_fatalerror("i386_pop_rm16: %llx", e);
}
}
}

View file

@ -1541,7 +1541,7 @@ void i386_device::i386_pop_rm32() // Opcode 0x8f
catch(uint64_t e)
{
REG32(ESP) = temp_sp;
throw e;
throw emu_fatalerror("i386_pop_rm32: %llx", e);
}
}
}

View file

@ -1269,7 +1269,7 @@ void i386_device::i386_repeat(int invert_flag)
catch (uint64_t e)
{
m_eip = m_prev_eip;
throw e;
throw emu_fatalerror("i386_repeat: %llx", e);
}
CYCLES_NUM(cycle_adjustment);

View file

@ -758,7 +758,7 @@ void i386_device::i386_trap(int irq, int irq_gate, int trap_level)
catch(uint64_t e)
{
REG32(ESP) = tempSP;
throw e;
throw emu_fatalerror("i386_trap: %llx", e);
}
if(SetRPL != 0)
segment = (segment & ~0x03) | m_CPL;
@ -1762,7 +1762,7 @@ void i386_device::i386_protected_mode_call(uint16_t seg, uint32_t off, int indir
catch(uint64_t e)
{
REG32(ESP) = tempSP;
throw e;
throw emu_fatalerror("i386_protected_mode_call: %llx", e);
}
CHANGE_PC(m_eip);

View file

@ -69,7 +69,8 @@
#define X87_IS_ST_EMPTY(x) (X87_TAG(ST_TO_PHYS(x)) == X87_TW_EMPTY)
#define X87_SW_C3_0 X87_SW_C0
#define UNIMPLEMENTED fatalerror("Unimplemented x87 op: %s (PC:%x)\n", __FUNCTION__, m_pc)
// FIXME: no reference about this across i386 package
#define UNIMPLEMENTED throw emu_fatalerror("Unimplemented x87 op: %s (PC:%x)\n", __FUNCTION__, m_pc)
/*************************************