mirror of
https://github.com/TomHarte/CLK.git
synced 2025-01-14 13:33:42 +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 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) {
|
if(!shift) {
|
||||||
status.carry_flag = 0;
|
status.carry_flag = 0;
|
||||||
} else {
|
} else {
|
||||||
|
shift &= size - 1;
|
||||||
|
|
||||||
switch(operation) {
|
switch(operation) {
|
||||||
case Operation::ROLb: case Operation::ROLw: case Operation::ROLl:
|
case Operation::ROLb: case Operation::ROLw: case Operation::ROLl:
|
||||||
destination = IntT(
|
destination = IntT(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user