mirror of
https://github.com/TomHarte/CLK.git
synced 2024-12-27 16:31:31 +00:00
Populate carry whenever count != 0, regardless of modulo.
This commit is contained in:
parent
555250dbd9
commit
abb19e6670
@ -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(
|
||||
|
Loading…
Reference in New Issue
Block a user