From: Gabe Black Date: Wed, 25 Feb 2009 18:19:47 +0000 (-0800) Subject: X86: Check src1 for illegal values since that's the index we actually use. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=cb4141f6e679db9725ad152df89941998535ad95;p=gem5.git X86: Check src1 for illegal values since that's the index we actually use. --- diff --git a/src/arch/x86/isa/microops/regop.isa b/src/arch/x86/isa/microops/regop.isa index 4434f9e74..74c93a20a 100644 --- a/src/arch/x86/isa/microops/regop.isa +++ b/src/arch/x86/isa/microops/regop.isa @@ -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;