X86: Check src1 for illegal values since that's the index we actually use.
authorGabe Black <gblack@eecs.umich.edu>
Wed, 25 Feb 2009 18:19:47 +0000 (10:19 -0800)
committerGabe Black <gblack@eecs.umich.edu>
Wed, 25 Feb 2009 18:19:47 +0000 (10:19 -0800)
src/arch/x86/isa/microops/regop.isa

index 4434f9e744955a446e6859dd36a2a7c411acff6a..74c93a20a85de82976694382a47078a3b1fa5e47 100644 (file)
@@ -928,7 +928,7 @@ let {{
             super(Rdcr, self).__init__(dest, \
                     src1, "NUM_INTREGS", flags, dataSize)
         code = '''
-            if (dest == 1 || (dest > 4 && dest < 8) || (dest > 8)) {
+            if (src1 == 1 || (src1 > 4 && src1 < 8) || (src1 > 8)) {
                 fault = new InvalidOpcode();
             } else {
                 DestReg = ControlSrc1;