mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-26 23:52:26 +00:00
Disallow copying, add some basic asserts.
This commit is contained in:
parent
12277d9305
commit
f4ae58b1e5
@ -394,6 +394,8 @@ template <class BusHandler, bool dtack_is_implicit = true, bool permit_overrun =
|
||||
class Processor: private ProcessorBase {
|
||||
public:
|
||||
Processor(BusHandler &bus_handler) : ProcessorBase(), bus_handler_(bus_handler) {}
|
||||
Processor(const Processor& rhs) = delete;
|
||||
Processor& operator=(const Processor& rhs) = delete;
|
||||
|
||||
void run_for(HalfCycles duration);
|
||||
|
||||
|
@ -1091,6 +1091,7 @@ void Processor<BusHandler, dtack_is_implicit, permit_overrun, signal_will_perfor
|
||||
// (i) this operand isn't used; or
|
||||
// (ii) its address calculation will end up conflated with performance,
|
||||
// so there's no generic bus-accurate approach.
|
||||
assert(next_operand_ >= 0 && next_operand_ < 2);
|
||||
if(!(operand_flags_ & (1 << next_operand_))) {
|
||||
MoveToStateDynamic(perform_state_);
|
||||
}
|
||||
@ -1099,6 +1100,7 @@ void Processor<BusHandler, dtack_is_implicit, permit_overrun, signal_will_perfor
|
||||
|
||||
// As above, but for .l.
|
||||
BeginState(FetchOperand_l):
|
||||
assert(next_operand_ >= 0 && next_operand_ < 2);
|
||||
if(!(operand_flags_ & (1 << next_operand_))) {
|
||||
MoveToStateDynamic(perform_state_);
|
||||
}
|
||||
|
@ -22,6 +22,8 @@ struct ProcessorBase: public InstructionSet::M68k::NullFlowController {
|
||||
ProcessorBase() {
|
||||
read_program_announce.address = read_program.address = &program_counter_.l;
|
||||
}
|
||||
ProcessorBase(const ProcessorBase& rhs) = delete;
|
||||
ProcessorBase& operator=(const ProcessorBase& rhs) = delete;
|
||||
|
||||
int state_ = std::numeric_limits<int>::min();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user