In Intel Software Developer's Manual, Volume 2B, page 4-540, the assembly RDPID
instruction is presented.
Opcode/Instruction
F3 0F C7 /7
RDPID r32
Op/En
R
64/32-bit Mode
N.E./V
CPUID Feature Flag
RDPID
Description
Read IA32_TSC_AUX into r32.
Opcode/Instruction
F3 0F C7 /7
RDPID r64
Op/En
R
64/32-bit Mode
V/N.E.
CPUID Feature Flag
RDPID
Description
Read IA32_TSC_AUX into r64.
and then
Instruction Operand Encoding
Op/En
R
Operand 1
ModRM:r/m (w)
Operand 2
N/A
Operand 3
N/A
Operand 4
N/A
I am not familiar with the conventions adopted and, from the table, I can't understand the syntax of the instruction. The only thing I can guess is that the opcode is the same for 32 and 64 bit mode, so maybe the instruction is the same in both cases. Also, the instruction is read-only (maybe this is the R
in Op/En
).
But what about the rest? I tried
rdpid <destination_register>
and it seems to work. Also CS.D
and REX.W
are mentioned, which I don't know (and a search through the manual for REX.W
was unuseful, I couldn't find an explanation). Why isn't Operand 1 the destination register? And what is ModRM:r/m (w)
?
So, the actual question: which is the correct syntax for this instruction and how to get it from the information provided in the manual?