mirror of
https://github.com/TomHarte/CLK.git
synced 2025-08-08 14:25:05 +00:00
Adds further [[fallthrough]]
attributes.
This commit is contained in:
@@ -94,6 +94,7 @@ Analyser::Static::TargetList Analyser::Static::Commodore::GetTargets(const Media
|
|||||||
switch(files.front().starting_address) {
|
switch(files.front().starting_address) {
|
||||||
default:
|
default:
|
||||||
LOG("Unrecognised loading address for Commodore program: " << PADHEX(4) << files.front().starting_address);
|
LOG("Unrecognised loading address for Commodore program: " << PADHEX(4) << files.front().starting_address);
|
||||||
|
[[fallthrough]];
|
||||||
case 0x1001:
|
case 0x1001:
|
||||||
memory_model = Target::MemoryModel::Unexpanded;
|
memory_model = Target::MemoryModel::Unexpanded;
|
||||||
break;
|
break;
|
||||||
|
@@ -263,6 +263,7 @@ void NCR5380::scsi_bus_did_change(SCSI::Bus *, SCSI::BusState new_state, double
|
|||||||
case ExecutionState::WaitingForBusy:
|
case ExecutionState::WaitingForBusy:
|
||||||
if(!(new_state & SCSI::Line::Busy) || time_since_change < SCSI::DeskewDelay) return;
|
if(!(new_state & SCSI::Line::Busy) || time_since_change < SCSI::DeskewDelay) return;
|
||||||
state_ = ExecutionState::WatchingBusy;
|
state_ = ExecutionState::WatchingBusy;
|
||||||
|
[[fallthrough]];
|
||||||
|
|
||||||
case ExecutionState::WatchingBusy:
|
case ExecutionState::WatchingBusy:
|
||||||
if(!(new_state & SCSI::Line::Busy)) {
|
if(!(new_state & SCSI::Line::Busy)) {
|
||||||
|
@@ -307,8 +307,8 @@ void IWM::run_for(const Cycles cycles) {
|
|||||||
} else {
|
} else {
|
||||||
shift_register_ = sense();
|
shift_register_ = sense();
|
||||||
}
|
}
|
||||||
|
[[fallthrough]];
|
||||||
|
|
||||||
/* Deliberate fallthrough. */
|
|
||||||
default:
|
default:
|
||||||
if(drive_is_rotating_[active_drive_]) drives_[active_drive_]->run_for(cycles);
|
if(drive_is_rotating_[active_drive_]) drives_[active_drive_]->run_for(cycles);
|
||||||
break;
|
break;
|
||||||
|
@@ -237,6 +237,7 @@ class ConcreteMachine:
|
|||||||
memory = rom_.data();
|
memory = rom_.data();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
[[fallthrough]];
|
||||||
case BusDevice::RAM:
|
case BusDevice::RAM:
|
||||||
memory = ram_.data();
|
memory = ram_.data();
|
||||||
break;
|
break;
|
||||||
|
@@ -224,6 +224,7 @@ class ConcreteMachine:
|
|||||||
switch(cycle.operation) {
|
switch(cycle.operation) {
|
||||||
case CPU::Z80::PartialMachineCycle::ReadOpcode:
|
case CPU::Z80::PartialMachineCycle::ReadOpcode:
|
||||||
if(!address) pc_zero_accesses_++;
|
if(!address) pc_zero_accesses_++;
|
||||||
|
[[fallthrough]];
|
||||||
case CPU::Z80::PartialMachineCycle::Read:
|
case CPU::Z80::PartialMachineCycle::Read:
|
||||||
if(address < 0x2000) {
|
if(address < 0x2000) {
|
||||||
if(super_game_module_.replace_bios) {
|
if(super_game_module_.replace_bios) {
|
||||||
|
@@ -215,7 +215,8 @@ class ConcreteMachine:
|
|||||||
activity_observer_->set_led_status(caps_led, caps_led_state_);
|
activity_observer_->set_led_status(caps_led, caps_led_state_);
|
||||||
}
|
}
|
||||||
|
|
||||||
// deliberate fallthrough; fe07 contains the display mode.
|
[[fallthrough]]; // fe07 contains the display mode.
|
||||||
|
|
||||||
|
|
||||||
case 0xfe02: case 0xfe03:
|
case 0xfe02: case 0xfe03:
|
||||||
case 0xfe08: case 0xfe09: case 0xfe0a: case 0xfe0b:
|
case 0xfe08: case 0xfe09: case 0xfe0a: case 0xfe0b:
|
||||||
|
@@ -492,6 +492,8 @@ class ConcreteMachine:
|
|||||||
performed_unmapped_access_ = true;
|
performed_unmapped_access_ = true;
|
||||||
}
|
}
|
||||||
pc_address_ = address; // This is retained so as to be able to name the source of an access to cartridge handlers.
|
pc_address_ = address; // This is retained so as to be able to name the source of an access to cartridge handlers.
|
||||||
|
[[fallthrough]];
|
||||||
|
|
||||||
case CPU::Z80::PartialMachineCycle::Read:
|
case CPU::Z80::PartialMachineCycle::Read:
|
||||||
if(read_pointers_[address >> 13]) {
|
if(read_pointers_[address >> 13]) {
|
||||||
*cycle.value = read_pointers_[address >> 13][address & 8191];
|
*cycle.value = read_pointers_[address >> 13][address & 8191];
|
||||||
|
@@ -269,6 +269,7 @@ template<bool is_zx81> class ConcreteMachine:
|
|||||||
tape_player_.set_motor_control((address >= automatic_tape_motor_start_address_) && (address < automatic_tape_motor_end_address_));
|
tape_player_.set_motor_control((address >= automatic_tape_motor_start_address_) && (address < automatic_tape_motor_end_address_));
|
||||||
}
|
}
|
||||||
is_opcode_read = true;
|
is_opcode_read = true;
|
||||||
|
[[fallthrough]];
|
||||||
|
|
||||||
case CPU::Z80::PartialMachineCycle::Read:
|
case CPU::Z80::PartialMachineCycle::Read:
|
||||||
if(address < ram_base_) {
|
if(address < ram_base_) {
|
||||||
|
@@ -833,7 +833,8 @@ template < class T,
|
|||||||
// MARK: - Special-case Flow
|
// MARK: - Special-case Flow
|
||||||
|
|
||||||
case MicroOp::BeginIRQMode0:
|
case MicroOp::BeginIRQMode0:
|
||||||
pc_increment_ = 0; // deliberate fallthrough
|
pc_increment_ = 0;
|
||||||
|
[[fallthrough]];
|
||||||
case MicroOp::BeginIRQ:
|
case MicroOp::BeginIRQ:
|
||||||
iff2_ = iff1_ = false;
|
iff2_ = iff1_ = false;
|
||||||
request_status_ &= ~Interrupt::IRQ;
|
request_status_ &= ~Interrupt::IRQ;
|
||||||
|
Reference in New Issue
Block a user