MdePkg/Include: Add CET instructions to Nasm.inc

This is to add instruction SAVEPREVSSP, CLRSSBSY and RSTORSSP_RAX in Nasm.
The open CI is using NASM 2.14.02.
CET instructions are supported since NASM 2.15.01.

DB-encoded CET instructions need to be removed after open CI update to
 NASM 2.15.01.
The BZ ticket is https://bugzilla.tianocore.org/show_bug.cgi?id=3227 .

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3192

Signed-off-by: Sheng Wei <w.sheng@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Zhiguang Liu <zhiguang.liu@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
This commit is contained in:
Sheng Wei 2021-01-26 16:54:15 +08:00 committed by mergify[bot]
parent 0996a7883c
commit bdf1df8a5f
2 changed files with 24 additions and 0 deletions

View File

@ -9,6 +9,18 @@
; ;
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
%macro SAVEPREVSSP 0
DB 0xF3, 0x0F, 0x01, 0xEA
%endmacro
%macro CLRSSBSY_EAX 0
DB 0x67, 0xF3, 0x0F, 0xAE, 0x30
%endmacro
%macro RSTORSSP_EAX 0
DB 0x67, 0xF3, 0x0F, 0x01, 0x28
%endmacro
%macro SETSSBSY 0 %macro SETSSBSY 0
DB 0xF3, 0x0F, 0x01, 0xE8 DB 0xF3, 0x0F, 0x01, 0xE8
%endmacro %endmacro

View File

@ -9,6 +9,18 @@
; ;
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
%macro SAVEPREVSSP 0
DB 0xF3, 0x0F, 0x01, 0xEA
%endmacro
%macro CLRSSBSY_RAX 0
DB 0xF3, 0x0F, 0xAE, 0x30
%endmacro
%macro RSTORSSP_RAX 0
DB 0xF3, 0x0F, 0x01, 0x28
%endmacro
%macro SETSSBSY 0 %macro SETSSBSY 0
DB 0xF3, 0x0F, 0x01, 0xE8 DB 0xF3, 0x0F, 0x01, 0xE8
%endmacro %endmacro