From d0d933facc9085727c12f53de76a2cb879ded4c8 Mon Sep 17 00:00:00 2001 From: Andreas Hansson Date: Tue, 5 May 2015 03:22:19 -0400 Subject: cpu: Work around gcc 4.9 issues with Num_OpClasses This patch fixes a recent issue with gcc 4.9 (and possibly more) being convinced that indices outside the array bounds are used when initialising the FUPool members. --- src/cpu/o3/fu_pool.hh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/cpu/o3/fu_pool.hh') diff --git a/src/cpu/o3/fu_pool.hh b/src/cpu/o3/fu_pool.hh index 8b501fc81..e6bb8cb8e 100644 --- a/src/cpu/o3/fu_pool.hh +++ b/src/cpu/o3/fu_pool.hh @@ -43,6 +43,7 @@ #ifndef __CPU_O3_FU_POOL_HH__ #define __CPU_O3_FU_POOL_HH__ +#include #include #include #include @@ -71,9 +72,9 @@ class FUPool : public SimObject { private: /** Maximum op execution latencies, per op class. */ - Cycles maxOpLatencies[Num_OpClasses]; + std::array maxOpLatencies; /** Whether op is pipelined or not. */ - bool pipelined[Num_OpClasses]; + std::array pipelined; /** Bitvector listing capabilities of this FU pool. */ std::bitset capabilityList; -- cgit v1.2.3