diff options
| author | 2024-03-23 02:27:21 +0100 | |
|---|---|---|
| committer | 2024-03-23 02:27:21 +0100 | |
| commit | b8d8e7a0527afabd6abc3eb48dba6ba6efdb1bf6 (patch) | |
| tree | dc69880da847cf745c677d0778b4e1129947b73a | |
| parent | f338e1590e0e7452da5d01cc30f125530c074bea (diff) | |
cpu/i386: saner fatal error handlingx86_std-exceptions
| -rw-r--r-- | src/devices/cpu/i386/i386op16.hxx | 2 | ||||
| -rw-r--r-- | src/devices/cpu/i386/i386op32.hxx | 2 | ||||
| -rw-r--r-- | src/devices/cpu/i386/i386ops.hxx | 2 | ||||
| -rw-r--r-- | src/devices/cpu/i386/i386segs.hxx | 4 | ||||
| -rw-r--r-- | src/devices/cpu/i386/x87priv.h | 3 |
5 files changed, 7 insertions, 6 deletions
diff --git a/src/devices/cpu/i386/i386op16.hxx b/src/devices/cpu/i386/i386op16.hxx index 4950a7ed73e..036a235f0d6 100644 --- a/src/devices/cpu/i386/i386op16.hxx +++ b/src/devices/cpu/i386/i386op16.hxx @@ -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); } } } diff --git a/src/devices/cpu/i386/i386op32.hxx b/src/devices/cpu/i386/i386op32.hxx index 72a4c0c2eb7..ee1a33b3b81 100644 --- a/src/devices/cpu/i386/i386op32.hxx +++ b/src/devices/cpu/i386/i386op32.hxx @@ -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); } } } diff --git a/src/devices/cpu/i386/i386ops.hxx b/src/devices/cpu/i386/i386ops.hxx index a063fa65d9f..ea8157864fd 100644 --- a/src/devices/cpu/i386/i386ops.hxx +++ b/src/devices/cpu/i386/i386ops.hxx @@ -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); diff --git a/src/devices/cpu/i386/i386segs.hxx b/src/devices/cpu/i386/i386segs.hxx index de7efe755f2..b1a9e03f885 100644 --- a/src/devices/cpu/i386/i386segs.hxx +++ b/src/devices/cpu/i386/i386segs.hxx @@ -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); diff --git a/src/devices/cpu/i386/x87priv.h b/src/devices/cpu/i386/x87priv.h index 1d2c227b292..3fb35dc7574 100644 --- a/src/devices/cpu/i386/x87priv.h +++ b/src/devices/cpu/i386/x87priv.h @@ -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) /************************************* |
