X86: Fix the computation of the bottom part of rotate right with carry.
authorGabe Black <gblack@eecs.umich.edu>
Wed, 5 Aug 2009 10:01:07 +0000 (03:01 -0700)
committerGabe Black <gblack@eecs.umich.edu>
Wed, 5 Aug 2009 10:01:07 +0000 (03:01 -0700)
src/arch/x86/isa/microops/regop.isa

index 1aa7c510b3920fb9a7ae7f4f75158f6871db87f9..e3ad164ebc0b194595525b5e020a9bfa1735e64c 100644 (file)
@@ -768,7 +768,7 @@ let {{
                 uint64_t top = flags.cf << (dataSize * 8 - shiftAmt);
                 if(shiftAmt > 1)
                     top |= psrc1 << (dataSize * 8 - shiftAmt + 1);
-                uint64_t bottom = bits(psrc1, dataSize * 8, shiftAmt);
+                uint64_t bottom = bits(psrc1, dataSize * 8 - 1, shiftAmt);
                 DestReg = merge(DestReg, top | bottom, dataSize);
             }
             else