From: Andreas Hansson Date: Fri, 8 Jun 2012 16:44:17 +0000 (-0400) Subject: Power: Fix MaxMiscDestRegs which was set to zero X-Git-Tag: stable_2012_06_28~8 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a118c01716aad899d6d45b57cd71c380ee402ae3;p=gem5.git Power: Fix MaxMiscDestRegs which was set to zero This patch fixes a failing compilation caused by MaxMiscDestRegs being zero. According to gcc 4.6, the result is a comparison that is always false due to limited range of data type. --- diff --git a/src/arch/power/registers.hh b/src/arch/power/registers.hh index 2d09677b2..723d664d2 100644 --- a/src/arch/power/registers.hh +++ b/src/arch/power/registers.hh @@ -38,7 +38,10 @@ namespace PowerISA { using PowerISAInst::MaxInstSrcRegs; using PowerISAInst::MaxInstDestRegs; -using PowerISAInst::MaxMiscDestRegs; + +// Power writes a misc register outside of the isa parser, so it can't +// be detected by it. Manually add it here. +const int MaxMiscDestRegs = PowerISAInst::MaxMiscDestRegs + 1; typedef uint8_t RegIndex;