UefiCpuPkg: Replace Opcode with the corresponding instructions.

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

Replace Opcode with the corresponding instructions.
The code changes have been verified with CompareBuild.py tool, which
can be used to compare the results of two different EDK II builds to
determine if they generate the same binaries.
(tool link: https://github.com/mdkinney/edk2/tree/sandbox/CompareBuild)

Signed-off-by: Jason Lou <yun.lou@intel.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Rahul Kumar <rahul1.kumar@intel.com>
This commit is contained in:
Jason
2022-01-10 22:01:18 +08:00
committed by mergify[bot]
parent 7bc8b1d9f4
commit 2aa107c0aa
10 changed files with 43 additions and 43 deletions

View File

@ -1,5 +1,5 @@
;------------------------------------------------------------------------------ ;
; Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>
; Copyright (c) 2016 - 2022, Intel Corporation. All rights reserved.<BR>
; SPDX-License-Identifier: BSD-2-Clause-Patent
;
; Module Name:
@ -32,12 +32,13 @@ ALIGN 8
; exception handler stub table
;
AsmIdtVectorBegin:
%assign Vector 0
%rep 32
db 0x6a ; push #VectorNum
db ($ - AsmIdtVectorBegin) / ((AsmIdtVectorEnd - AsmIdtVectorBegin) / 32) ; VectorNum
push byte %[Vector];
push eax
mov eax, ASM_PFX(CommonInterruptEntry)
jmp eax
%assign Vector Vector+1
%endrep
AsmIdtVectorEnd:
@ -287,7 +288,7 @@ ErrorCodeAndVectorOnStack:
test edx, BIT24 ; Test for FXSAVE/FXRESTOR support.
; edx still contains result from CPUID above
jz .3
db 0xf, 0xae, 0x7 ;fxsave [edi]
fxsave [edi]
.3:
;; UEFI calling convention for IA32 requires that Direction flag in EFLAGs is clear
@ -320,7 +321,7 @@ ErrorCodeAndVectorOnStack:
; are supported
test edx, BIT24 ; Test for FXSAVE/FXRESTOR support
jz .4
db 0xf, 0xae, 0xe ; fxrstor [esi]
fxrstor [esi]
.4:
add esp, 512