mirror of
				https://github.com/TomHarte/CLK.git
				synced 2025-11-04 00:16:26 +00:00 
			
		
		
		
	Populate carry whenever count != 0, regardless of modulo.
This commit is contained in:
		@@ -392,11 +392,13 @@ template <Operation operation, typename IntT, typename FlowController> void rota
 | 
			
		||||
	);
 | 
			
		||||
 | 
			
		||||
	const auto size = bit_size<IntT>();
 | 
			
		||||
	const auto shift = shift_count<IntT>(uint8_t(source), flow_controller) & (size - 1);
 | 
			
		||||
	auto shift = shift_count<IntT>(uint8_t(source), flow_controller);
 | 
			
		||||
 | 
			
		||||
	if(!shift) {
 | 
			
		||||
		status.carry_flag = 0;
 | 
			
		||||
	} else {
 | 
			
		||||
		shift &= size - 1;
 | 
			
		||||
 | 
			
		||||
		switch(operation) {
 | 
			
		||||
			case Operation::ROLb:	case Operation::ROLw:	case Operation::ROLl:
 | 
			
		||||
				destination = IntT(
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user