[edk2-devel] [Patch v3 1/2] ShellPkg/AcpiView: Fix IA32 link error

Michael D Kinney posted 2 patches 6 years, 6 months ago
[edk2-devel] [Patch v3 1/2] ShellPkg/AcpiView: Fix IA32 link error
Posted by Michael D Kinney 6 years, 6 months ago
https://bugzilla.tianocore.org/show_bug.cgi?id=1970

Update SLIT_ELEMENT() macro to use MultU64x64() to
perform multiplication on 64-bit operands.  This is
required to avoid use of an intrinsic on IA32 VS20xx
builds.

Cc: Jaben Carsey <jaben.carsey@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Zhichao Gao <zhichao.gao@intel.com>
Cc: Sami Mujawar <sami.mujawar@arm.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
---
 .../UefiShellAcpiViewCommandLib/Parsers/Slit/SlitParser.c       | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Slit/SlitParser.c b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Slit/SlitParser.c
index 1f9dac66ee..ca2808db52 100644
--- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Slit/SlitParser.c
+++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Slit/SlitParser.c
@@ -30,7 +30,7 @@ STATIC CONST ACPI_PARSER SlitParser[] = {
 /**
   Macro to get the value of a System Locality
 **/
-#define SLIT_ELEMENT(Ptr, i, j) *(Ptr + (i * LocalityCount) + j)
+#define SLIT_ELEMENT(Ptr, i, j) *(Ptr + (MultU64x64 (i, LocalityCount)) + j)
 
 /**
   This function parses the ACPI SLIT table.
-- 
2.21.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#44876): https://edk2.groups.io/g/devel/message/44876
Mute This Topic: https://groups.io/mt/32697115/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-