mirror of
https://github.com/dingusdev/dingusppc.git
synced 2025-02-24 12:29:57 +00:00
ppcexceptions: fix next address for decrementer exceptions.
This commit is contained in:
parent
ee9c692115
commit
d2e7c9a5df
@ -89,7 +89,11 @@ void ppc_exception_handler(Except_Type exception_type, uint32_t srr1_bits) {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case Except_Type::EXC_DECR:
|
case Except_Type::EXC_DECR:
|
||||||
ppc_state.spr[SPR::SRR0] = (ppc_state.pc & 0xFFFFFFFC) + 4;
|
if (exec_flags & ~EXEF_TIMER) {
|
||||||
|
ppc_state.spr[SPR::SRR0] = ppc_next_instruction_address;
|
||||||
|
} else {
|
||||||
|
ppc_state.spr[SPR::SRR0] = (ppc_state.pc & 0xFFFFFFFCUL) + 4;
|
||||||
|
}
|
||||||
ppc_next_instruction_address = 0x0900;
|
ppc_next_instruction_address = 0x0900;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user