RDSSPD, RDSSPQ
Read Shadow Stack Pointer
stableVMJITAOTinstruction
Encodings
| Opcode | Instruction | Op/En | 64-bit | Compat/Legacy | Description |
|---|---|---|---|---|---|
F3 0F 1E /1 (mod=11) | RDSSPD r32 | R | Valid | Valid | Copy low 32 bits of shadow stack pointer (SSP) to r32. |
F3 REX.W 0F 1E /1 (mod=11) | RDSSPQ r64 | R | Valid | Not encodable | Copies shadow stack pointer (SSP) to r64. |
Operand encoding
Each mode is a value of the Op/En column above. It says which field of the encoded instruction carries each operand, in the order they are written, and whether the instruction reads it, writes it or both.
R
modrm.rmescrituraModRM byte, r/m field (bits 2-0); with the SIB byte and the displacement when the mod field asks for them
Measured cost
Loading measurements from arch-data...
Description
Copies the current shadow stack pointer (SSP) register to the register destination. This opcode is a NOP when CET shadow stacks are not enabled and on processors that do not support CET.
Operation
IF CPL = 3
IF CR4.CET & IA32_U_CET.SH_STK_EN
IF (operand size is 64 bit)
THEN
Dest := SSP;
ELSE
Dest := SSP[31:0];
FI;
FI;
ELSE
IF CR4.CET & IA32_S_CET.SH_STK_EN
IF (operand size is 64 bit)
THEN
Dest := SSP;
ELSE
Dest := SSP[31:0];
FI;
FI;
FI;Flags affected
None.
C/C++ Compiler Intrinsic Equivalent
RDSSPD__int32 _rdsspd_i32(void); RDSSPQ__int64 _rdsspq_i64(void);
Exceptions
Real address mode
#UD | If the LOCK prefix is used. |
Protected mode
#UD | If the LOCK prefix is used. |
Virtual-8086 mode
#UD | If the LOCK prefix is used. |
Compatibility mode
#UD | If the LOCK prefix is used. |
64-bit mode
#UD | If the LOCK prefix is used. |