summaryrefslogtreecommitdiff
path: root/src/arch/power/registers.hh
diff options
context:
space:
mode:
authorAndreas Hansson <andreas.hansson@arm.com>2012-06-08 12:44:17 -0400
committerAndreas Hansson <andreas.hansson@arm.com>2012-06-08 12:44:17 -0400
commita118c01716aad899d6d45b57cd71c380ee402ae3 (patch)
treeeb048eff3ef33f71c10c691f943e20867861ebe3 /src/arch/power/registers.hh
parentd6609793d4ed44068890be810743cf78d3658160 (diff)
downloadgem5-a118c01716aad899d6d45b57cd71c380ee402ae3.tar.xz
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.
Diffstat (limited to 'src/arch/power/registers.hh')
-rw-r--r--src/arch/power/registers.hh5
1 files changed, 4 insertions, 1 deletions
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;