]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Library/BaseSafeIntLib/SafeIntLib.c
MdePkg/BaseSafeIntLib: Fix VS20xx IA32 link failures
[mirror_edk2.git] / MdePkg / Library / BaseSafeIntLib / SafeIntLib.c
index 0f6be6e064663cfbfa40f034e7d3fbacd23955c4..eec8ac1ffda6ac45d8218f90e7fc4859917a19a7 100644 (file)
@@ -3380,14 +3380,14 @@ SafeUint64Mult (
       //\r
       // a * d must be less than 2^32 or there would be bits set in the high 64-bits\r
       //\r
-      ProductAD = (((UINT64)DwordA) *(UINT64)DwordD);\r
+      ProductAD = MultU64x64 ((UINT64)DwordA, (UINT64)DwordD);\r
       if ((ProductAD & 0xffffffff00000000) == 0) {\r
         DwordB = (UINT32)Multiplicand;\r
 \r
         //\r
         // b * c must be less than 2^32 or there would be bits set in the high 64-bits\r
         //\r
-        ProductBC = (((UINT64)DwordB) *(UINT64)DwordC);\r
+        ProductBC = MultU64x64 ((UINT64)DwordB, (UINT64)DwordC);\r
         if ((ProductBC & 0xffffffff00000000) == 0) {\r
           //\r
           // now sum them all up checking for overflow.\r
@@ -3397,7 +3397,7 @@ SafeUint64Mult (
             //\r
             // b * d\r
             //\r
-            ProductBD = (((UINT64)DwordB) *(UINT64)DwordD);\r
+            ProductBD = MultU64x64 ((UINT64)DwordB, (UINT64)DwordD);\r
 \r
             if (!RETURN_ERROR (SafeUint64Add (UnsignedResult, ProductBD, &UnsignedResult))) {\r
               *Result = UnsignedResult;\r