1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-11-26 08:49:37 +00:00

Signal will_perform even for invalid instructions.

This commit is contained in:
Thomas Harte 2022-05-19 18:50:43 -04:00
parent 334e3ec529
commit efe5a5ac26

View File

@ -301,6 +301,11 @@ void Processor<BusHandler, dtack_is_implicit, permit_overrun, signal_will_perfor
instruction_ = decoder_.decode(opcode_);
instruction_address_.l = program_counter_.l - 4;
// Signal the bus handler if requested.
if constexpr (signal_will_perform) {
bus_handler_.will_perform(instruction_address_.l, opcode_);
}
// Check for a privilege violation.
if(instruction_.requires_supervisor() && !status_.is_supervisor) {
exception_vector_ = InstructionSet::M68k::Exception::PrivilegeViolation;
@ -323,11 +328,6 @@ void Processor<BusHandler, dtack_is_implicit, permit_overrun, signal_will_perfor
MoveToState(StandardException);
}
// Signal the bus handler if requested.
if constexpr (signal_will_perform) {
bus_handler_.will_perform(instruction_address_.l, opcode_);
}
// Ensure the first parameter is next fetched.
next_operand_ = 0;