X86: Fix the sra microop to get the sign bit from the right operand.
authorGabe Black <gblack@eecs.umich.edu>
Thu, 30 Aug 2007 03:39:41 +0000 (20:39 -0700)
committerGabe Black <gblack@eecs.umich.edu>
Thu, 30 Aug 2007 03:39:41 +0000 (20:39 -0700)
--HG--
extra : convert_revision : 71e58dd6dd6918ee403f2e332c47e29acdace464

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

index cacdc7144bd3430d881491c0be687e492f7ee15a..eca640d35a33d5385bee66361389f91a0f34fe84 100644 (file)
@@ -590,7 +590,7 @@ let {{
             // is not defined in the C/C++ standard, we have to sign extend
             // them manually to be sure.
             uint64_t arithMask =
-                -bits(op2, dataSize * 8 - 1) << (dataSize * 8 - shiftAmt);
+                -bits(psrc1, dataSize * 8 - 1) << (dataSize * 8 - shiftAmt);
             DestReg = merge(DestReg, (psrc1 >> shiftAmt) | arithMask, dataSize);
             ''')
     defineMicroRegOp('Ror', '''