mirror of
				https://github.com/TomHarte/CLK.git
				synced 2025-11-04 00:16:26 +00:00 
			
		
		
		
	Move set_pc into the operation-specific group.
				
					
				
			This commit is contained in:
		@@ -48,11 +48,11 @@ template <Model model, typename BusHandler> class Executor {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
		// Flow control.
 | 
							// Flow control.
 | 
				
			||||||
		void consume_cycles(int) {}
 | 
							void consume_cycles(int) {}
 | 
				
			||||||
		void set_pc(uint32_t);
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
		void raise_exception(int, bool use_current_instruction_pc = true);
 | 
							void raise_exception(int, bool use_current_instruction_pc = true);
 | 
				
			||||||
		void did_update_status();
 | 
							void did_update_status();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							void jmp(uint32_t);
 | 
				
			||||||
		template <typename IntT> void complete_bcc(bool matched_condition, IntT offset);
 | 
							template <typename IntT> void complete_bcc(bool matched_condition, IntT offset);
 | 
				
			||||||
		void complete_dbcc(bool matched_condition, bool overflowed, int16_t offset);
 | 
							void complete_dbcc(bool matched_condition, bool overflowed, int16_t offset);
 | 
				
			||||||
		void stop();
 | 
							void stop();
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -361,7 +361,7 @@ template <Model model, typename BusHandler>
 | 
				
			|||||||
void Executor<model, BusHandler>::stop() {}
 | 
					void Executor<model, BusHandler>::stop() {}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
template <Model model, typename BusHandler>
 | 
					template <Model model, typename BusHandler>
 | 
				
			||||||
void Executor<model, BusHandler>::set_pc(uint32_t address) {
 | 
					void Executor<model, BusHandler>::jmp(uint32_t address) {
 | 
				
			||||||
	program_counter_.l = address;
 | 
						program_counter_.l = address;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -373,7 +373,7 @@ template <
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
		// JMP: copies EA(0) to the program counter.
 | 
							// JMP: copies EA(0) to the program counter.
 | 
				
			||||||
		case Operation::JMP:
 | 
							case Operation::JMP:
 | 
				
			||||||
			flow_controller.set_pc(src.l);
 | 
								flow_controller.jmp(src.l);
 | 
				
			||||||
		break;
 | 
							break;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		// JSR: jump to EA(0), pushing the current PC to the stack.
 | 
							// JSR: jump to EA(0), pushing the current PC to the stack.
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user