summaryrefslogtreecommitdiff
path: root/src/mem/gems_common
diff options
context:
space:
mode:
Diffstat (limited to 'src/mem/gems_common')
-rw-r--r--src/mem/gems_common/Map.hh19
-rw-r--r--src/mem/gems_common/ioutil/initvar.cc2
-rw-r--r--src/mem/gems_common/util.cc2
3 files changed, 4 insertions, 19 deletions
diff --git a/src/mem/gems_common/Map.hh b/src/mem/gems_common/Map.hh
index 6b145a90a..5128a0fee 100644
--- a/src/mem/gems_common/Map.hh
+++ b/src/mem/gems_common/Map.hh
@@ -34,24 +34,9 @@
#ifndef MAP_H
#define MAP_H
+#include "base/hashmap.hh"
#include "mem/gems_common/Vector.hh"
-namespace __gnu_cxx {
- template <> struct hash <std::string>
- {
- size_t operator()(const string& s) const { return hash<char*>()(s.c_str()); }
- };
-}
-
-typedef unsigned long long uint64;
-//hack for uint64 hashes...
-namespace __gnu_cxx {
- template <> struct hash <uint64>
- {
- size_t operator()(const uint64 & s) const { return (size_t) s; }
- };
-}
-
template <class KEY_TYPE, class VALUE_TYPE>
class Map
{
@@ -84,7 +69,7 @@ private:
// m_map is declared mutable because some methods from the STL "map"
// class that should be const are not. Thus we define this as
// mutable so we can still have conceptually const accessors.
- mutable __gnu_cxx::hash_map<KEY_TYPE, VALUE_TYPE> m_map;
+ mutable m5::hash_map<KEY_TYPE, VALUE_TYPE> m_map;
};
template <class KEY_TYPE, class VALUE_TYPE>
diff --git a/src/mem/gems_common/ioutil/initvar.cc b/src/mem/gems_common/ioutil/initvar.cc
index 62fe3b6af..4388c0de4 100644
--- a/src/mem/gems_common/ioutil/initvar.cc
+++ b/src/mem/gems_common/ioutil/initvar.cc
@@ -541,7 +541,7 @@ void initvar_t::list_param( FILE *fp )
#define PARAM_UINT( NAME ) \
fprintf( fp, "%-44.44s: %26u\n", #NAME, NAME );
#define PARAM_ULONG( NAME ) \
- fprintf( fp, "%-44.44s: %26llu\n", #NAME, NAME );
+ fprintf( fp, "%-44.44s: %26llu\n", #NAME, (unsigned long long)NAME );
#define PARAM_BOOL( NAME ) \
if (NAME == true) { \
fprintf( fp, "%-44.44s: %26.26s\n", #NAME, "true" ); \
diff --git a/src/mem/gems_common/util.cc b/src/mem/gems_common/util.cc
index f1535bdcf..d7b0e7853 100644
--- a/src/mem/gems_common/util.cc
+++ b/src/mem/gems_common/util.cc
@@ -42,7 +42,7 @@ string string_split(string& str, char split_character)
string head = "";
string tail = "";
- uint counter = 0;
+ unsigned counter = 0;
while(counter < str.size()) {
if (str[counter] == split_character) {
counter++;