mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-29 12:50:28 +00:00
Give Program
full ownership of the sentinel value.
In case I want to reduce the size of this field later.
This commit is contained in:
parent
32e0a66610
commit
f20940a37b
@ -332,7 +332,7 @@ template <class T, bool dtack_is_implicit, bool signal_will_perform> void Proces
|
|||||||
// should_log = (fetched_pc >= 0x408D66) && (fetched_pc <= 0x408D84);
|
// should_log = (fetched_pc >= 0x408D66) && (fetched_pc <= 0x408D84);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if(instructions[decoded_instruction_.full].micro_operations != std::numeric_limits<uint32_t>::max()) {
|
if(instructions[decoded_instruction_.full].micro_operations != Program::NoSuchProgram) {
|
||||||
if((instructions[decoded_instruction_.full].requires_supervisor) && !is_supervisor_) {
|
if((instructions[decoded_instruction_.full].requires_supervisor) && !is_supervisor_) {
|
||||||
// A privilege violation has been detected.
|
// A privilege violation has been detected.
|
||||||
active_program_ = nullptr;
|
active_program_ = nullptr;
|
||||||
|
@ -368,9 +368,11 @@ class ProcessorStorage {
|
|||||||
source_offset = 0;
|
source_offset = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static constexpr uint32_t NoSuchProgram = std::numeric_limits<uint32_t>::max();
|
||||||
|
|
||||||
/// The offset into the all_micro_ops_ at which micro-ops for this instruction begin,
|
/// The offset into the all_micro_ops_ at which micro-ops for this instruction begin,
|
||||||
/// or std::numeric_limits<uint32_t>::max() if this is an invalid Program.
|
/// or std::numeric_limits<uint32_t>::max() if this is an invalid Program.
|
||||||
uint32_t micro_operations = std::numeric_limits<uint32_t>::max();
|
uint32_t micro_operations = NoSuchProgram;
|
||||||
/// The overarching operation applied by this program when the moment comes.
|
/// The overarching operation applied by this program when the moment comes.
|
||||||
Operation operation;
|
Operation operation;
|
||||||
/// The number of bytes after the beginning of an instance of ProcessorStorage that the RegisterPair32 containing
|
/// The number of bytes after the beginning of an instance of ProcessorStorage that the RegisterPair32 containing
|
||||||
|
Loading…
Reference in New Issue
Block a user