]> git.proxmox.com Git - mirror_edk2.git/commit - UefiCpuPkg/Library/CpuExceptionHandlerLib/CpuExceptionCommon.h
UefiCpuPkg: Fix nasm warning "signed byte value exceeds"
authorZhiguang Liu <zhiguang.liu@intel.com>
Wed, 6 Jul 2022 13:10:13 +0000 (21:10 +0800)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Mon, 25 Jul 2022 02:18:26 +0000 (02:18 +0000)
commit8a5782d704cfeb78aafdec1c03685107586f4ee6
tree885b4a6e7440a8028922275e9ea2f0bff956a0d5
parentfca5de51e1fd2f3c5ddbf5974d785f0f6b2f6c38
UefiCpuPkg: Fix nasm warning "signed byte value exceeds"

Currently, "push byte %[Vector]" causes nasm warning when Vector is larger
than 0x7F. This is because push accepts a signed value, and byte means
signed int8. Maximum signed int8 is 0x7F.
When Vector is larger the 0x7F, for example, when Vector is 255, byte 255
turns to -1, and causes the warning "signed byte value exceeds".
To avoid such warning, use dword instead of byte, this will increase 3 bytes
for each IdtVector.
For IA32, the size of IdtVector will increase from 10 bytes to 13 bytes.
For X64, the size of IdtVector will increase from 15 bytes to 18 bytes.

Cc: Eric Dong <eric.dong@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Rahul Kumar <rahul1.kumar@intel.com>
Cc: Debkumar De <debkumar.de@intel.com>
Cc: Harry Han <harry.han@intel.com>
Cc: Catharine West <catharine.west@intel.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
Signed-off-by: Zhiguang Liu <zhiguang.liu@intel.com>
UefiCpuPkg/Library/CpuExceptionHandlerLib/CpuExceptionCommon.h
UefiCpuPkg/Library/CpuExceptionHandlerLib/Ia32/ExceptionHandlerAsm.nasm
UefiCpuPkg/Library/CpuExceptionHandlerLib/X64/Xcode5ExceptionHandlerAsm.nasm