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>
This commit is contained in:
@@ -28,6 +28,7 @@
|
||||
|
||||
#include <Base.h>
|
||||
#include <Library/SafeIntLib.h>
|
||||
#include <Library/BaseLib.h>
|
||||
|
||||
/**
|
||||
INT32 -> UINTN conversion
|
||||
@@ -549,6 +550,6 @@ SafeIntnMult (
|
||||
OUT INTN *Result
|
||||
)
|
||||
{
|
||||
return SafeInt64ToIntn (((INT64)Multiplicand) *((INT64)Multiplier), Result);
|
||||
return SafeInt64ToIntn (MultS64x64 (Multiplicand, Multiplier), Result);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user