summaryrefslogtreecommitdiff
path: root/src/cpu/o3/fu_pool.hh
diff options
context:
space:
mode:
authorAndreas Hansson <andreas.hansson@arm.com>2015-05-05 03:22:19 -0400
committerAndreas Hansson <andreas.hansson@arm.com>2015-05-05 03:22:19 -0400
commitd0d933facc9085727c12f53de76a2cb879ded4c8 (patch)
tree6f4bbec33f85ff63e9804cafa00a735cad31c551 /src/cpu/o3/fu_pool.hh
parenteb1a9977bfcf53652cc7ddbb948ed63262b794be (diff)
downloadgem5-d0d933facc9085727c12f53de76a2cb879ded4c8.tar.xz
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.
Diffstat (limited to 'src/cpu/o3/fu_pool.hh')
-rw-r--r--src/cpu/o3/fu_pool.hh5
1 files changed, 3 insertions, 2 deletions
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 <array>
#include <bitset>
#include <list>
#include <string>
@@ -71,9 +72,9 @@ class FUPool : public SimObject
{
private:
/** Maximum op execution latencies, per op class. */
- Cycles maxOpLatencies[Num_OpClasses];
+ std::array<Cycles, Num_OpClasses> maxOpLatencies;
/** Whether op is pipelined or not. */
- bool pipelined[Num_OpClasses];
+ std::array<bool, Num_OpClasses> pipelined;
/** Bitvector listing capabilities of this FU pool. */
std::bitset<Num_OpClasses> capabilityList;