X86: Correct how the hi portion of a product is computed.
authorGabe Black <gblack@eecs.umich.edu>
Thu, 6 Sep 2007 23:20:12 +0000 (16:20 -0700)
committerGabe Black <gblack@eecs.umich.edu>
Thu, 6 Sep 2007 23:20:12 +0000 (16:20 -0700)
--HG--
extra : convert_revision : 1f503e1cae0374e62e6254e8073e903adc29d067

src/arch/x86/isa/microops/regop.isa

index 57edbb606b9de1404cb988002047d321705406ea..60089085f6b12520778dd2e55c3044fa4ac9c888 100644 (file)
@@ -463,8 +463,8 @@ let {{
             uint64_t psrc2_h = op2 >> halfSize;
             uint64_t psrc2_l = op2 & mask(halfSize);
             uint64_t result =
-                ((psrc1_l * psrc2_h) >> halfSize) +
-                ((psrc1_h * psrc2_l) >> halfSize) +
+                ((psrc1_l * psrc2_h + psrc1_h * psrc2_l +
+                 ((psrc1_l * psrc2_l) >> halfSize)) >> halfSize) +
                 psrc1_h * psrc2_h;
             DestReg = merge(DestReg, result, dataSize);
             '''