Instruction
ROR
Rotates an operand right; APX adds three-operand forms and forms that leave the flags unchanged.
- Extensions
- Forms
- 48 (12 Legacy, 36 EVEX)
- Data
- Intel XED v2026.08.23
Forms
| Instruction | Encoding | Requires |
|---|---|---|
ROR m8, imm8
ROR_MEMb_IMMb | C0 /1 ib | Base instruction set |
ROR r8, imm8
ROR_GPR8_IMMb | C0 /1 ib | Base instruction set |
ROR r16/32/64, imm8
ROR_GPRv_IMMb | C1 /1 ib | Base instruction set |
ROR m16/32/64, imm8
ROR_MEMv_IMMb | C1 /1 ib | Base instruction set |
ROR m8, imm8
ROR_MEMb_ONE | D0 /1 | Base instruction set |
ROR r8, imm8
ROR_GPR8_ONE | D0 /1 | Base instruction set |
ROR m16/32/64, imm8
ROR_MEMv_ONE | D1 /1 | Base instruction set |
ROR r16/32/64, imm8
ROR_GPRv_ONE | D1 /1 | Base instruction set |
ROR m8, CL
ROR_MEMb_CL | D2 /1 | Base instruction set |
ROR r8, CL
ROR_GPR8_CL | D2 /1 | Base instruction set |
ROR m16/32/64, CL
ROR_MEMv_CL | D3 /1 | Base instruction set |
ROR r16/32/64, CL
ROR_GPRv_CL | D3 /1 | Base instruction set |
ROR r8, imm8
ROR_GPR8i8_IMM8_APX | EVEX.LLZ.NP.MAP4.WIG C0 /1 ib | APX_F |
ROR m8, imm8
ROR_MEMi8_IMM8_APX | EVEX.LLZ.NP.MAP4.WIG C0 /1 ib | APX_F |
ROR r8, imm8 NF
ROR_GPR8i8_IMM8_APX_N3 | EVEX.LLZ.NP.MAP4.WIG C0 /1 ib NF=1 | APX_F + APX_NCI_NDD_NF |
ROR m8, imm8 NF
ROR_MEMi8_IMM8_APX_N3 | EVEX.LLZ.NP.MAP4.WIG C0 /1 ib NF=1 | APX_F + APX_NCI_NDD_NF |
ROR r16/32/64, r16/32/64, imm8 NDD NF optional
ROR_GPRv_GPRv_IMM8_APX_N3 | EVEX.LLZ.NP.MAP4.SCALABLE C1 /1 ib ND=1 NF=0/1 | APX_F + APX_NCI_NDD_NF |
ROR r16/32/64, m16/32/64, imm8 NDD NF optional
ROR_GPRv_MEMv_IMM8_APX_N3 | EVEX.LLZ.NP.MAP4.SCALABLE C1 /1 ib ND=1 NF=0/1 | APX_F + APX_NCI_NDD_NF |
ROR r8, imm8
ROR_GPR8i8_ONE_APX | EVEX.LLZ.NP.MAP4.WIG D0 /1 | APX_F |
ROR m8, imm8
ROR_MEMi8_ONE_APX | EVEX.LLZ.NP.MAP4.WIG D0 /1 | APX_F |
ROR r8, imm8 NF
ROR_GPR8i8_ONE_APX_N3 | EVEX.LLZ.NP.MAP4.WIG D0 /1 NF=1 | APX_F + APX_NCI_NDD_NF |
ROR m8, imm8 NF
ROR_MEMi8_ONE_APX_N3 | EVEX.LLZ.NP.MAP4.WIG D0 /1 NF=1 | APX_F + APX_NCI_NDD_NF |
ROR r8, r8, imm8 NDD NF optional
ROR_GPR8i8_GPR8i8_ONE_APX_N3 | EVEX.LLZ.NP.MAP4.WIG D0 /1 ND=1 NF=0/1 | APX_F + APX_NCI_NDD_NF |
ROR r8, m8, imm8 NDD NF optional
ROR_GPR8i8_MEMi8_ONE_APX_N3 | EVEX.LLZ.NP.MAP4.WIG D0 /1 ND=1 NF=0/1 | APX_F + APX_NCI_NDD_NF |
ROR r16/32/64, imm8
ROR_GPRv_ONE_APX | EVEX.LLZ.NP.MAP4.SCALABLE D1 /1 | APX_F |
ROR m16/32/64, imm8
ROR_MEMv_ONE_APX | EVEX.LLZ.NP.MAP4.SCALABLE D1 /1 | APX_F |
ROR r16/32/64, imm8 NF
ROR_GPRv_ONE_APX_N3 | EVEX.LLZ.NP.MAP4.SCALABLE D1 /1 NF=1 | APX_F + APX_NCI_NDD_NF |
ROR m16/32/64, imm8 NF
ROR_MEMv_ONE_APX_N3 | EVEX.LLZ.NP.MAP4.SCALABLE D1 /1 NF=1 | APX_F + APX_NCI_NDD_NF |
ROR r16/32/64, r16/32/64, imm8 NDD NF optional
ROR_GPRv_GPRv_ONE_APX_N3 | EVEX.LLZ.NP.MAP4.SCALABLE D1 /1 ND=1 NF=0/1 | APX_F + APX_NCI_NDD_NF |
ROR r16/32/64, m16/32/64, imm8 NDD NF optional
ROR_GPRv_MEMv_ONE_APX_N3 | EVEX.LLZ.NP.MAP4.SCALABLE D1 /1 ND=1 NF=0/1 | APX_F + APX_NCI_NDD_NF |
ROR r8, CL
ROR_GPR8i8_CL_APX | EVEX.LLZ.NP.MAP4.WIG D2 /1 | APX_F |
ROR m8, CL
ROR_MEMi8_CL_APX | EVEX.LLZ.NP.MAP4.WIG D2 /1 | APX_F |
ROR r8, CL NF
ROR_GPR8i8_CL_APX_N3 | EVEX.LLZ.NP.MAP4.WIG D2 /1 NF=1 | APX_F + APX_NCI_NDD_NF |
ROR m8, CL NF
ROR_MEMi8_CL_APX_N3 | EVEX.LLZ.NP.MAP4.WIG D2 /1 NF=1 | APX_F + APX_NCI_NDD_NF |
ROR r8, r8, CL NDD NF optional
ROR_GPR8i8_GPR8i8_CL_APX_N3 | EVEX.LLZ.NP.MAP4.WIG D2 /1 ND=1 NF=0/1 | APX_F + APX_NCI_NDD_NF |
ROR r8, m8, CL NDD NF optional
ROR_GPR8i8_MEMi8_CL_APX_N3 | EVEX.LLZ.NP.MAP4.WIG D2 /1 ND=1 NF=0/1 | APX_F + APX_NCI_NDD_NF |
ROR r16/32/64, CL
ROR_GPRv_CL_APX | EVEX.LLZ.NP.MAP4.SCALABLE D3 /1 | APX_F |
ROR m16/32/64, CL
ROR_MEMv_CL_APX | EVEX.LLZ.NP.MAP4.SCALABLE D3 /1 | APX_F |
ROR r16/32/64, CL NF
ROR_GPRv_CL_APX_N3 | EVEX.LLZ.NP.MAP4.SCALABLE D3 /1 NF=1 | APX_F + APX_NCI_NDD_NF |
ROR m16/32/64, CL NF
ROR_MEMv_CL_APX_N3 | EVEX.LLZ.NP.MAP4.SCALABLE D3 /1 NF=1 | APX_F + APX_NCI_NDD_NF |
ROR r16/32/64, r16/32/64, CL NDD NF optional
ROR_GPRv_GPRv_CL_APX_N3 | EVEX.LLZ.NP.MAP4.SCALABLE D3 /1 ND=1 NF=0/1 | APX_F + APX_NCI_NDD_NF |
ROR r16/32/64, m16/32/64, CL NDD NF optional
ROR_GPRv_MEMv_CL_APX_N3 | EVEX.LLZ.NP.MAP4.SCALABLE D3 /1 ND=1 NF=0/1 | APX_F + APX_NCI_NDD_NF |
ROR r8, r8, imm8 NDD NF optional
ROR_GPR8i8_GPR8i8_IMM8_APX_N3 | EVEX.LLZ.NP.MAP4.WIG C0 /1 ib ND=1 NF=0/1 | APX_F + APX_NCI_NDD_NF |
ROR r8, m8, imm8 NDD NF optional
ROR_GPR8i8_MEMi8_IMM8_APX_N3 | EVEX.LLZ.NP.MAP4.WIG C0 /1 ib ND=1 NF=0/1 | APX_F + APX_NCI_NDD_NF |
ROR r16/32/64, imm8
ROR_GPRv_IMM8_APX | EVEX.LLZ.NP.MAP4.SCALABLE C1 /1 ib | APX_F |
ROR m16/32/64, imm8
ROR_MEMv_IMM8_APX | EVEX.LLZ.NP.MAP4.SCALABLE C1 /1 ib | APX_F |
ROR r16/32/64, imm8 NF
ROR_GPRv_IMM8_APX_N3 | EVEX.LLZ.NP.MAP4.SCALABLE C1 /1 ib NF=1 | APX_F + APX_NCI_NDD_NF |
ROR m16/32/64, imm8 NF
ROR_MEMv_IMM8_APX_N3 | EVEX.LLZ.NP.MAP4.SCALABLE C1 /1 ib NF=1 | APX_F + APX_NCI_NDD_NF |
Intrinsics
The C intrinsics of Clang 23.1.2 that compile to ROR, each with the form it compiles to and the Clang options it needs. The forms come from compiling every intrinsic and decoding the result with Intel XED; all intrinsics A–Z explains the method.
| Intrinsic | Compiles to |
|---|---|
_lrotr
unsigned long long _lrotr(unsigned long long a, int b) |
|
__rorb
unsigned char __rorb(unsigned char __X, int __C) |
|
__rord
unsigned int __rord(unsigned int __X, int __C) |
|
__rorq
unsigned long long __rorq(unsigned long long __X, int __C) |
|
__rorw
unsigned short __rorw(unsigned short __X, int __C) |
|
_rotr
unsigned int _rotr(unsigned int a, int b) |
|
_rotwr
unsigned short _rotwr(unsigned short a, int b) |
|
CPUID and processors
Each form belongs to an XED ISA set. A form can be used when the processor reports every CPUID bit of one of its ISA set's alternatives.
| ISA set | CPUID | Processors in XED |
|---|---|---|
I186 | No CPUID bit: part of the base instruction set. | Every x86-64 processor in XED’s model |
I86 | No CPUID bit: part of the base instruction set. | Every x86-64 processor in XED’s model |
APX_F | APX_F | Nova Lake, Diamond Rapids |
APX_F_N3 | APX_F + APX_NCI_NDD_NF | Nova Lake, Diamond Rapids |
More General-purpose instructions
- MOVSXD
- MOVZX
- MUL
- NEG
- NOP
- NOT
- OR
- OUT
- OUTS
- PAUSE
- POP
- POPA
- POPF
- PUSH
- PUSHA
- PUSHF
- RCL
- RCR
- RET
- ROL
- SALC
- SAR
- SBB
- SCAS
- SETcc
- SHL
- SHLD
- SHR
- SHRD
- STC
- STD
- STI
- STOS
- SUB
- TEST
- UD0
- UD1
- UD2
- UDB
- XADD
All 109 General-purpose instructions
More APX instructions
Sources
- Intel XED v2026.08.23 (commit
0bcb6237345c): forms, encodings, ISA sets, CPUID bits and chip model. - Clang's x86 intrinsic headers, LLVM 23.1.2 (commit
85ac56026243): the intrinsics, their signatures and doc comments, and the Clang of that release, which compiled each of them. - Intel 64 and IA-32 Architectures Software Developer's Manual, Volume 2 (325383-092, June 2026)
- Intel 64 and IA-32 Architectures Software Developer's Manual, Volume 2 (325383-093, September 2026)
- Intel Advanced Performance Extensions (Intel APX) Architecture Specification, revision 7.0 (July 2025)
The tables are derived from Intel XED, Copyright Intel Corporation, licensed under the Apache License 2.0; x86-64.net converted and reformatted them. The intrinsics and their signatures come from Clang, part of the LLVM Project, licensed under the Apache License 2.0 with LLVM Exceptions. The text is our own.