Wrap I/O register reads
This can cause issues in big-endian platforms otherwise
This commit is contained in:
parent
413157dedd
commit
6eb1071dec
2
cpu.c
2
cpu.c
|
@ -1475,7 +1475,7 @@ void set_cpu_mode(cpu_mode_type new_mode)
|
||||||
|
|
||||||
#define cpu_has_interrupt() \
|
#define cpu_has_interrupt() \
|
||||||
(!(reg[REG_CPSR] & 0x80) && read_ioreg(REG_IME) && \
|
(!(reg[REG_CPSR] & 0x80) && read_ioreg(REG_IME) && \
|
||||||
(read_ioreg(REG_IE) & io_registers[REG_IF]))
|
(read_ioreg(REG_IE) & read_ioreg(REG_IF)))
|
||||||
|
|
||||||
// Returns whether the CPU has a pending interrupt.
|
// Returns whether the CPU has a pending interrupt.
|
||||||
cpu_alert_type check_interrupt() {
|
cpu_alert_type check_interrupt() {
|
||||||
|
|
Loading…
Reference in New Issue