Rotate Left

Rotate a register's bits left, with bits shifted out reentering at the bottom.

Bit Manipulation

Semantics

rd = (rs1 << n) | (rs1 >> (XLEN - n)). AArch64 provides only rotate-RIGHT, so a left rotate by n is expressed as ROR by (width - n).

Architecture Instructions Expressed as How this architecture does it
x86 one instruction ROL and ROR both exist, and ROL updates CF with the rotated-out bit.
ARM an idiom AArch64 provides only rotate-right, so a left rotate by n is written as ROR by (register width - n).
RISC-V one instruction Zbb provides both directions plus immediate forms.
PowerISA one instruction The rotate-and-mask instructions are unusually powerful: one instruction rotates and applies a bit mask, so it also covers shifts, field extraction, and field insertion.