mirror of
https://github.com/TomHarte/CLK.git
synced 2024-09-29 16:55:59 +00:00
Fix standard exception stack write order.
This commit is contained in:
parent
670201fcc2
commit
da8e6737c6
@ -409,15 +409,14 @@ void Processor<BusHandler, dtack_is_implicit, permit_overrun, signal_will_perfor
|
|||||||
|
|
||||||
// Push status and current program counter.
|
// Push status and current program counter.
|
||||||
// Write order is wacky here, but I think it's correct.
|
// Write order is wacky here, but I think it's correct.
|
||||||
registers_[15].l -= 6;
|
registers_[15].l -= 2;
|
||||||
Access(captured_status_); // ns
|
|
||||||
|
|
||||||
registers_[15].l += 4;
|
|
||||||
Access(instruction_address_.low); // ns
|
Access(instruction_address_.low); // ns
|
||||||
|
|
||||||
registers_[15].l -= 2;
|
registers_[15].l -= 4;
|
||||||
Access(instruction_address_.high); // nS
|
Access(captured_status_); // ns
|
||||||
|
|
||||||
|
registers_[15].l += 2;
|
||||||
|
Access(instruction_address_.high); // nS
|
||||||
registers_[15].l -= 2;
|
registers_[15].l -= 2;
|
||||||
|
|
||||||
// Grab new program counter.
|
// Grab new program counter.
|
||||||
|
Loading…
Reference in New Issue
Block a user