It has to do with the special meanings of certain shift operations. From DDI 0029E
(the ARM7TDMI datasheet):
LSL #0 is a special case, where the shifter carry out is the old value of the CPSR C flag. The contents of Rm are used directly as the second operand.
....
The form of the shift field which might be expected to correspond to LSR #0 is used to encode LSR #32, which has a zero result with bit 31 of Rm as the carry output. Logical shift right zero is redundant as it is the same as logical shift left zero, so the assembler will convert LSR #0 (and ASR #0 and ROR #0) into LSL #0, and allow LSR #32 to be specified.
In other words, the processor designers assigned a special meaning to LSL #0
, which also means that there's no possible encoding for LSL #32
since shift amounts of 1..31 are interpreted as-is and 0 has its special meaning.
LSR #0
and ASR #0
will be converted to LSL #0
by the assembler since they have the same meaning, which means that the machine code encodings for LSR #0
and ASR #0
were free to use for something else; so they made a shift amount of zero be interpreted as 32 for LSR/ASR
.