]> git.proxmox.com Git - mirror_edk2.git/commit - MdePkg/Library/BaseSafeIntLib/SafeIntLib.c
MdePkg/BaseSafeIntLib: Fix VS2015 IA32 NOOPT build failure
authorDandan Bi <dandan.bi@intel.com>
Mon, 26 Feb 2018 03:55:15 +0000 (11:55 +0800)
committerLiming Gao <liming.gao@intel.com>
Wed, 28 Feb 2018 03:44:14 +0000 (11:44 +0800)
commitdc9b2a57403262cf6df9d150ea3a118a7d765ad8
tree4a191454ab1b8d5e5afc448e305e829a2a9ed408
parent97e1ff1b913bdedcf08c0d1917d488e0097759b7
MdePkg/BaseSafeIntLib: Fix VS2015 IA32 NOOPT build failure

v2: Add [LibraryClasses] section in INF file and refine coding style.

There are VS2015 NOOPT IA32 build failure like below in BaseSafeIntLib.
XXX.lib(XXX.obj): error LNK2001: unresolved external symbol __allmul
XXX.lib(XXX.obj): error LNK2001: unresolved external symbol __allshl
XXX.lib(XXX.obj): error LNK2001: unresolved external symbol __aullshr

This patch replaces direct shift/multiplication of 64-bit integer
with related function call to fix these failure.

Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Michael Kinney <michael.d.kinney@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
MdePkg/Library/BaseSafeIntLib/BaseSafeIntLib.inf
MdePkg/Library/BaseSafeIntLib/SafeIntLib.c
MdePkg/Library/BaseSafeIntLib/SafeIntLib32.c