diff --git a/src/crab/arm/arm.cr b/src/crab/arm/arm.cr index cd714ca..90f0ae8 100644 --- a/src/crab/arm/arm.cr +++ b/src/crab/arm/arm.cr @@ -69,7 +69,7 @@ module ARM puts "Unused instruction: #{hex_str instr}" end - def rotate_register(instr : Word, carry_out : Pointer(Bool), allow_register_shifts = true) : Word + def rotate_register(instr : Word, carry_out : Pointer(Bool), allow_register_shifts : Bool) : Word reg = bits(instr, 0..3) shift_type = bits(instr, 5..6) if allow_register_shifts && bit?(instr, 4) diff --git a/src/crab/arm/data_processing.cr b/src/crab/arm/data_processing.cr index ee4ac6d..8c1eabe 100644 --- a/src/crab/arm/data_processing.cr +++ b/src/crab/arm/data_processing.cr @@ -14,7 +14,7 @@ module ARM operand_2 = if imm_flag # Operand 2 is an immediate immediate_offset bits(instr, 0..11), pointerof(barrel_shifter_carry_out) else # Operand 2 is a register - rotate_register bits(instr, 0..11), pointerof(barrel_shifter_carry_out) + rotate_register bits(instr, 0..11), pointerof(barrel_shifter_carry_out), allow_register_shifts: true end case opcode when 0b0000 # AND