2.6.3.3.2 Register with Optional Shift

You specify an Operand2 register in the form:

Rm {, shift}

where:
  • Rm: is the register holding the data for the second operand.
  • shift: is an optional shift to be applied to Rm. It can be one of:
    • ASR #n: arithmetic shift right n bits, 1 ≤ n ≤ 32
    • LSL #n: logical shift left n bits, 1 ≤ n ≤ 31
    • LSR #n: logical shift right n bits, 1 ≤ n ≤ 32
    • ROR #n: rotate right n bits, 1 ≤ n ≤ 31
    • RRX: rotate right one bit, with extend

-: if omitted, no shift occurs, equivalent to LSL #0.

If you omit the shift, or specify LSL #0, the instruction uses the value in Rm.

If you specify a shift, the shift is applied to the value in Rm, and the resulting 32-bit value is used by the instruction. However, the contents in the register Rm remains unchanged. Specifying a register with shift also updates the carry flag when used with certain instructions. For information on the shift operations and how they affect the carry flag, refer to Shift Operations.