diff --git a/InstructionSets/M68k/Implementation/PerformImplementation.hpp b/InstructionSets/M68k/Implementation/PerformImplementation.hpp index 88d0af4e6..84e0ea7b5 100644 --- a/InstructionSets/M68k/Implementation/PerformImplementation.hpp +++ b/InstructionSets/M68k/Implementation/PerformImplementation.hpp @@ -392,11 +392,13 @@ template void rota ); const auto size = bit_size(); - const auto shift = shift_count(uint8_t(source), flow_controller) & (size - 1); + auto shift = shift_count(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(