summaryrefslogtreecommitdiff
path: root/src/arch/power/types.hh
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2010-09-14 00:29:38 -0700
committerGabe Black <gblack@eecs.umich.edu>2010-09-14 00:29:38 -0700
commit0dd1f7f01a8a744811aede5814111b8681271a6b (patch)
tree8d6f8936821696b19135495db72ffee29dac490e /src/arch/power/types.hh
parent8f3fbd2d13dbfc3699dc43b27b3c2a389049078d (diff)
downloadgem5-0dd1f7f01a8a744811aede5814111b8681271a6b.tar.xz
CPU: Trim unnecessary includes from some common files.
This reduces the scope of those includes and makes it less likely for there to be a dependency loop. This also moves the hashing functions associated with ExtMachInst objects to be with the ExtMachInst definitions and out of utility.hh.
Diffstat (limited to 'src/arch/power/types.hh')
-rw-r--r--src/arch/power/types.hh12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/arch/power/types.hh b/src/arch/power/types.hh
index 7b994adc9..6a8d1e9d3 100644
--- a/src/arch/power/types.hh
+++ b/src/arch/power/types.hh
@@ -32,6 +32,7 @@
#define __ARCH_POWER_TYPES_HH__
#include "base/bitunion.hh"
+#include "base/hashmap.hh"
#include "base/types.hh"
namespace PowerISA
@@ -88,4 +89,15 @@ struct CoreSpecific {
} // PowerISA namspace
+namespace __hash_namespace {
+
+template<>
+struct hash<PowerISA::ExtMachInst> : public hash<uint32_t> {
+ size_t operator()(const PowerISA::ExtMachInst &emi) const {
+ return hash<uint32_t>::operator()((uint32_t)emi);
+ };
+};
+
+} // __hash_namespace namespace
+
#endif // __ARCH_POWER_TYPES_HH__