1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-07-04 18:29:40 +00:00

Populate carry whenever count != 0, regardless of modulo.

This commit is contained in:
Thomas Harte 2022-10-17 22:57:21 -04:00
parent 555250dbd9
commit abb19e6670

View File

@ -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(