English
Language : 

PM0214 Datasheet, PDF (63/245 Pages) STMicroelectronics – This programming manual provides information
PM0214
The STM32 Cortex-M4 instruction set
ROR
Rotate right by n bits moves the left-hand 32-n bits of the register Rm, to the right by n places,
into the right-hand 32-n bits of the result. It also moves the right-hand n bits of the register
into the left-hand n bits of the result (see Figure 16).
When the instruction is RORS or when ROR #n is used in operand2 with the instructions
MOVS, MVNS, ANDS, ORRS, ORNS, EORS, BICS, TEQ or TST, the carry flag is updated
to the last bit rotation, bit[n-1], of the register Rm.
Note: 1 If n is 32, then the value of the result is same as the value in Rm, and if the carry flag is
updated, it is updated to bit[31] of Rm.
2 ROR with shift length, n, more than 32 is the same as ROR with shift length n-32.
Figure 16. ROR #3
&DUU\
)ODJ

    

RRX
Rotate right with extend moves the bits of the register Rm to the right by one bit. And it
copies the carry flag into bit[31] of the result (see Figure 17).
When the instruction is RRXS or when RRX is used in operand2 with the instructions
MOVS, MVNS, ANDS, ORRS, ORNS, EORS, BICS, TEQ or TST, the carry flag is updated
to bit[0] of the register Rm.
Figure 17. RRX #3
 

&DUU\
)ODJ


DocID022708 Rev 4
63/245
244