rdpid
Read Processor ID
RDPID r32
Reads the processor ID (TSC_AUX) into register.
Details
Reads the processor ID (IA32_TSC_AUX MSR value) into the destination 32-bit register, providing thread/core identification information. This is a fast operation compared to RDMSR and requires the RDPID CPU feature. No flags are modified; the instruction can execute in user mode if IA32_TSC_AUX is readable.
Pseudocode Operation
Example
RDPID eax
Encoding
Binary Layout
F3
+0
0F
+1
C7
+2
ModRM
+3
Operands
-
dest
32-bit general-purpose register (e.g. EAX)
Reference (Intel® SDM)
Instruction Forms
| Opcode | Instruction | Op/En | 64/32-bit Mode | CPUID | Description |
|---|---|---|---|---|---|
| F3 0F C7 /7 | RDPID | R | N.E./V | Read IA32_TSC_AUX into r32. RDPID r32 | |
| F3 0F C7 /7 | RDPID | R | V/N.E. | R | Read IA32_TSC_AUX into r64. RDPID r64 Instruction Operand Encoding1 Op/En Operand 1 Operand 2 Operand 3 Operand 4 ModRM:r/m (w) N/A N/A N/A |
Description
Reads the value of the IA32_TSC_AUX MSR (address C0000103H) into the destination register. The value of CS.D and operand-size prefixes (66H and REX.W) do not affect the behavior of the RDPID instruction.
Operation
DEST := IA32_TSC_AUX
Flags Affected
None.
Exceptions
Protected Mode Exceptions
#UD If the LOCK prefix is used.
If CPUID.07H.00H:ECX.RDPID[22] = 0.
Real-Address Mode Exceptions
Same exceptions as in protected mode.
Virtual-8086 Mode Exceptions
Same exceptions as in protected mode.
Compatibility Mode Exceptions
Same exceptions as in protected mode.
64-Bit Mode Exceptions
Same exceptions as in protected mode.
1.ModRM.MOD = 011B required
RDPID—Read Processor ID Vol. 2B 4-548