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 Exchange Atomic Fetch and Add Breakpoint Trap Byte Swap (Endianness Reversal) CPU Feature Detection Cache Line Flush Cache Prefetch Hint Compare and Branch Conditional Select (Branchless Move) Count Leading Zeros Count Trailing Zeros Enable and Disable Interrupts Floating-Point Compare Floating-Point Square Root Function Call and Return Fused Multiply-Add Indirect Branch Instruction Cache Synchronisation Integer Addition Integer Divide Integer Multiply Integer and Floating-Point Conversion Load and Store Load-Acquire Load-Linked / Store-Conditional Logical and Arithmetic Shift Materialise a Large Constant Memory Barrier / Fence Multiply High No Operation PC-Relative Address Population Count Read Cycle Counter Return From Exception Sign Extend Byte Speculation Barrier Spin-Wait Hint Stack Push and Pop System Call