audk/MdePkg/Library/BaseSafeIntLib
Michael D Kinney 02b7b861b1 MdePkg/BaseSafeIntLib: Fix VS20xx IA32 link failures
https://bugzilla.tianocore.org/show_bug.cgi?id=2525

SafeUint64Mult() looks for 64-bit overflows and performs
several 32-bit multiples with 64-bit results to check for
all possible overflow conditions.  IA32 builds using VS20xx
with optimizations enabled are producing a reference to
the _allmull intrinsic.

The fix is to use MultU64x64() instead of '*' for
these operations.  These are safe because the inputs
are guaranteed to have the upper 32-bits clear, which
means MultU64x64() can never overflow with those inputs.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Sean Brogan <sean.brogan@microsoft.com>
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Bret Barkelew <bret.barkelew@microsoft.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
2020-02-13 01:42:50 +00:00
..
BaseSafeIntLib.inf MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
SafeIntLib.c MdePkg/BaseSafeIntLib: Fix VS20xx IA32 link failures 2020-02-13 01:42:50 +00:00
SafeIntLib32.c MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
SafeIntLib64.c MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
SafeIntLibEbc.c MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00