summaryrefslogtreecommitdiff
path: root/src/cpu/o3/fu_pool.cc
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.cc
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.cc')
-rw-r--r--src/cpu/o3/fu_pool.cc6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/cpu/o3/fu_pool.cc b/src/cpu/o3/fu_pool.cc
index dab7dbed2..b99eeab69 100644
--- a/src/cpu/o3/fu_pool.cc
+++ b/src/cpu/o3/fu_pool.cc
@@ -87,10 +87,8 @@ FUPool::FUPool(const Params *p)
funcUnits.clear();
- for (int i = 0; i < Num_OpClasses; ++i) {
- maxOpLatencies[i] = Cycles(0);
- pipelined[i] = true;
- }
+ maxOpLatencies.fill(Cycles(0));
+ pipelined.fill(true);
//
// Iterate through the list of FUDescData structures