diff options
author | Andreas Hansson <andreas.hansson@arm.com> | 2012-09-14 12:13:18 -0400 |
---|---|---|
committer | Andreas Hansson <andreas.hansson@arm.com> | 2012-09-14 12:13:18 -0400 |
commit | 806a1144ceea710cb6586fc2a80ae60a6e0be552 (patch) | |
tree | 280cdc619480f95840db6763eabc91e626770e09 /src/mem/ruby/system/Sequencer.cc | |
parent | ae1652b813e461d5e8840be876d038956b64a8cc (diff) | |
download | gem5-806a1144ceea710cb6586fc2a80ae60a6e0be552.tar.xz |
scons: Use c++0x with gcc >= 4.4 instead of 4.6
This patch shifts the version of gcc for which we enable c++0x from
4.6 to 4.4 The more long term plan is to see what the c++0x features
can bring and what level of support would be enabled simply by bumping
the required version of gcc from 4.3 to 4.4.
A few minor things had to be fixed in the code base, most notably the
choice of a hashmap implementation. In the Ruby Sequencer there were
also a few minor issues that gcc 4.4 was not too happy about.
Diffstat (limited to 'src/mem/ruby/system/Sequencer.cc')
-rw-r--r-- | src/mem/ruby/system/Sequencer.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/mem/ruby/system/Sequencer.cc b/src/mem/ruby/system/Sequencer.cc index efb0b002e..854d360ac 100644 --- a/src/mem/ruby/system/Sequencer.cc +++ b/src/mem/ruby/system/Sequencer.cc @@ -214,6 +214,11 @@ Sequencer::insertRequest(PacketPtr pkt, RubyRequestType request_type) Address line_addr(pkt->getAddr()); line_addr.makeLineAddress(); + // Create a default entry, mapping the address to NULL, the cast is + // there to make gcc 4.4 happy + RequestTable::value_type default_entry(line_addr, + (SequencerRequest*) NULL); + if ((request_type == RubyRequestType_ST) || (request_type == RubyRequestType_RMW_Read) || (request_type == RubyRequestType_RMW_Write) || @@ -231,7 +236,7 @@ Sequencer::insertRequest(PacketPtr pkt, RubyRequestType request_type) } pair<RequestTable::iterator, bool> r = - m_writeRequestTable.insert(RequestTable::value_type(line_addr, 0)); + m_writeRequestTable.insert(default_entry); if (r.second) { RequestTable::iterator i = r.first; i->second = new SequencerRequest(pkt, request_type, @@ -251,7 +256,7 @@ Sequencer::insertRequest(PacketPtr pkt, RubyRequestType request_type) } pair<RequestTable::iterator, bool> r = - m_readRequestTable.insert(RequestTable::value_type(line_addr, 0)); + m_readRequestTable.insert(default_entry); if (r.second) { RequestTable::iterator i = r.first; |