mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-26 08:49:37 +00:00
Adds a check for instruction privilege violation, albeit that I think I need different bus steps.
This commit is contained in:
parent
3e34ae67f6
commit
2c1d8fa18a
@ -150,8 +150,18 @@ template <class T, bool dtack_is_implicit, bool signal_will_perform> void Proces
|
||||
}
|
||||
|
||||
if(instructions[decoded_instruction_].micro_operations) {
|
||||
active_program_ = &instructions[decoded_instruction_];
|
||||
active_micro_op_ = active_program_->micro_operations;
|
||||
// Check for a privilege violation.
|
||||
if(instructions[decoded_instruction_].requires_supervisor && !is_supervisor_) {
|
||||
// TODO: this isn't the correct set of bus steps; this exception should
|
||||
// push more informatio to the stack.
|
||||
active_program_ = nullptr;
|
||||
active_micro_op_ = exception_micro_ops_;
|
||||
populate_trap_steps(8, get_status());
|
||||
} else {
|
||||
// Standard instruction dispatch.
|
||||
active_program_ = &instructions[decoded_instruction_];
|
||||
active_micro_op_ = active_program_->micro_operations;
|
||||
}
|
||||
} else {
|
||||
active_program_ = nullptr;
|
||||
active_micro_op_ = exception_micro_ops_;
|
||||
|
Loading…
Reference in New Issue
Block a user