mirror of
https://github.com/TomHarte/CLK.git
synced 2025-07-01 20:23:57 +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 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(
|
||||||
|
Reference in New Issue
Block a user