mirror of
https://github.com/TomHarte/CLK.git
synced 2025-02-27 15:29:34 +00:00
Fixes the interrupt return address.
This commit is contained in:
parent
c86fe9ada9
commit
b3d2b4cd37
@ -179,7 +179,6 @@ template <class T, bool dtack_is_implicit, bool signal_will_perform> void Proces
|
|||||||
// If an interrupt (TODO: or reset) has finally arrived that will be serviced,
|
// If an interrupt (TODO: or reset) has finally arrived that will be serviced,
|
||||||
// exit the STOP.
|
// exit the STOP.
|
||||||
if(bus_interrupt_level_ > interrupt_level_) {
|
if(bus_interrupt_level_ > interrupt_level_) {
|
||||||
// TODO: schedule interrupt right here.
|
|
||||||
execution_state_ = ExecutionState::BeginInterrupt;
|
execution_state_ = ExecutionState::BeginInterrupt;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -215,6 +214,9 @@ template <class T, bool dtack_is_implicit, bool signal_will_perform> void Proces
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
case ExecutionState::BeginInterrupt:
|
case ExecutionState::BeginInterrupt:
|
||||||
|
#ifdef LOG_TRACE
|
||||||
|
should_log = true;
|
||||||
|
#endif
|
||||||
active_program_ = nullptr;
|
active_program_ = nullptr;
|
||||||
active_micro_op_ = interrupt_micro_ops_;
|
active_micro_op_ = interrupt_micro_ops_;
|
||||||
execution_state_ = ExecutionState::Executing;
|
execution_state_ = ExecutionState::Executing;
|
||||||
@ -281,7 +283,7 @@ template <class T, bool dtack_is_implicit, bool signal_will_perform> void Proces
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef LOG_TRACE
|
#ifdef LOG_TRACE
|
||||||
should_log |= (program_counter_.full - 4) == 0x405350;
|
should_log |= (program_counter_.full - 4) == 0x405984;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if(instructions[decoded_instruction_.full].micro_operations) {
|
if(instructions[decoded_instruction_.full].micro_operations) {
|
||||||
@ -1869,6 +1871,10 @@ template <class T, bool dtack_is_implicit, bool signal_will_perform> void Proces
|
|||||||
// data strobe to collect the corresponding vector byte.
|
// data strobe to collect the corresponding vector byte.
|
||||||
accepted_interrupt_level_ = interrupt_level_ = bus_interrupt_level_;
|
accepted_interrupt_level_ = interrupt_level_ = bus_interrupt_level_;
|
||||||
effective_address_[0].full = 1 | uint32_t(accepted_interrupt_level_ << 1);
|
effective_address_[0].full = 1 | uint32_t(accepted_interrupt_level_ << 1);
|
||||||
|
|
||||||
|
// Recede the program counter to where it would have been were there no
|
||||||
|
// prefetch; that's where the reading stream should pick up upon RTE.
|
||||||
|
program_counter_.full -= 4;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case int(MicroOp::Action::PrepareINTVector):
|
case int(MicroOp::Action::PrepareINTVector):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user