mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-23 03:32:32 +00:00
Merge pull request #1051 from TomHarte/STOPReturn
Fix return address following a STOP.
This commit is contained in:
commit
37516e6f6b
@ -382,6 +382,13 @@ void Processor<BusHandler, dtack_is_implicit, permit_overrun, signal_will_perfor
|
|||||||
// Apply the suffix status.
|
// Apply the suffix status.
|
||||||
status_.set_status(prefetch_.w);
|
status_.set_status(prefetch_.w);
|
||||||
did_update_status();
|
did_update_status();
|
||||||
|
|
||||||
|
// Ensure that after this STOP exits, the eventual RTE returns to
|
||||||
|
// after the STOP rather than to it. Unlike most instructions, STOP
|
||||||
|
// has not prefetched the next instruction, so the program counter
|
||||||
|
// is at the actual return point, not beyond it.
|
||||||
|
instruction_address_.l = program_counter_.l;
|
||||||
|
|
||||||
[[fallthrough]];
|
[[fallthrough]];
|
||||||
|
|
||||||
BeginState(WaitForInterrupt):
|
BeginState(WaitForInterrupt):
|
||||||
|
Loading…
Reference in New Issue
Block a user