SAVEPREVSSP—Save Previous Shadow Stack PointerInstruction Operand EncodingDescriptionPush a restore-shadow-stack token on the previous shadow stack at the next 8 byte aligned boundary. The previous SSP is obtained from the previous-ssp token at the top of the current shadow stack.OperationIF CPL = 3IF (CR4.CET & IA32_U_CET.SH_STK_EN) = 0THEN #UD; FI;ELSEIF (CR4.CET & IA32_S_CET.SH_STK_EN) = 0THEN #UD; FI;FI;IF SSP not aligned to 8 bytesTHEN #GP(0); FI;(* Pop the “previous-ssp” token from current shadow stack *)previous_ssp_token = ShadowStackPop8B(SSP)(* If the CF flag indicates there was a alignment hole on current shadow stack then pop that alignment hole *)(* Note that the alignment hole must be zero and can be present only when in legacy/compatibility mode *)IF RFLAGS.CF == 1 AND (IA32_EFER.LMA AND CS.L)#GP(0)FI;IF RFLAGS.CF == 1must_be_zero = ShadowStackPop4B(SSP)IF must_be_zero != 0 THEN #GP(0)FI;(* Previous SSP token must have the bit 1 set *)IF ((previous_ssp_token & 0x02) == 0)THEN #GP(0); (* bit 1 was 0 *)IF ((IA32_EFER.LMA AND CS.L) = 0 AND previous_ssp_token [63:32] != 0)THEN #GP(0); FI; (* If compatibility/legacy mode and SSP not in 4G *)(* Save Prev SSP from previous_ssp_token to the old shadow stack at next 8 byte aligned address *)old_SSP = previous_ssp_token & ~0x03temp := (old_SSP | (IA32_EFER.LMA & CS.L));Shadow_stack_store 4 bytes of 0 to (old_SSP - 4)old_SSP := old_SSP & ~0x07;Opcode/InstructionOp/ En64/32 bit Mode SupportCPUID Feature FlagDescriptionF3 0F 01 EA (mod!=11, /5, RM=010)SAVEPREVSSPZOV/VCET_SSSave a restore-shadow-stack token on previous shadow stack.Op/EnOperand 1Operand 2Operand 3Operand 4ZONANANANA
This UNOFFICIAL reference was generated from the official Intel® 64 and IA-32 Architectures Software Developer’s Manual by a dumb script. There is no guarantee that some parts aren't mangled or broken and is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.