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. |
Other operations
Add With Carry Atomic Compare and Swap Atomic Fetch and Add Breakpoint Trap Byte Swap (Endianness Reversal) Cache Line Flush Cache Prefetch Hint Compare and Branch Conditional Select (Branchless Move) Count Leading Zeros Count Trailing Zeros Floating-Point Square Root Fused Multiply-Add Integer Addition Integer Divide Integer Multiply Load-Acquire Memory Barrier / Fence No Operation Population Count Sign Extend Byte System Call