X86: Let the integer multiply microop use every other possible source value.
authorGabe Black <gblack@eecs.umich.edu>
Tue, 18 Aug 2009 03:15:16 +0000 (20:15 -0700)
committerGabe Black <gblack@eecs.umich.edu>
Tue, 18 Aug 2009 03:15:16 +0000 (20:15 -0700)
src/arch/x86/isa/microops/mediaop.isa

index 52292cbd1a2b01af04676e30c18b4c08af43e9ee..7e7016368c53bf8e35089464ab804f803289bb39 100644 (file)
@@ -919,8 +919,15 @@ let {{
             uint64_t result = FpDestReg.uqw;
 
             for (int i = 0; i < items; i++) {
-                int srcHiIndex = (i + 1) * srcBits - 1;
-                int srcLoIndex = (i + 0) * srcBits;
+                int offset = 0;
+                if (ext & 16) {
+                    if (ext & 32)
+                        offset = i * (destBits - srcBits);
+                    else
+                        offset = i * (destBits - srcBits) + srcBits;
+                }
+                int srcHiIndex = (i + 1) * srcBits - 1 + offset;
+                int srcLoIndex = (i + 0) * srcBits + offset;
                 uint64_t arg1Bits = bits(FpSrcReg1.uqw, srcHiIndex, srcLoIndex);
                 uint64_t arg2Bits = bits(FpSrcReg2.uqw, srcHiIndex, srcLoIndex);
                 uint64_t resBits;