diff options
author | Gabe Black <gblack@eecs.umich.edu> | 2010-09-14 00:29:38 -0700 |
---|---|---|
committer | Gabe Black <gblack@eecs.umich.edu> | 2010-09-14 00:29:38 -0700 |
commit | 0dd1f7f01a8a744811aede5814111b8681271a6b (patch) | |
tree | 8d6f8936821696b19135495db72ffee29dac490e /src/arch/power | |
parent | 8f3fbd2d13dbfc3699dc43b27b3c2a389049078d (diff) | |
download | gem5-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')
-rw-r--r-- | src/arch/power/insts/branch.cc | 1 | ||||
-rw-r--r-- | src/arch/power/types.hh | 12 | ||||
-rw-r--r-- | src/arch/power/utility.hh | 14 |
3 files changed, 13 insertions, 14 deletions
diff --git a/src/arch/power/insts/branch.cc b/src/arch/power/insts/branch.cc index 3f4346c97..c10f7c996 100644 --- a/src/arch/power/insts/branch.cc +++ b/src/arch/power/insts/branch.cc @@ -30,6 +30,7 @@ #include "arch/power/insts/branch.hh" #include "base/loader/symtab.hh" +#include "cpu/thread_context.hh" using namespace PowerISA; 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__ diff --git a/src/arch/power/utility.hh b/src/arch/power/utility.hh index 7245db511..b3eed9de3 100644 --- a/src/arch/power/utility.hh +++ b/src/arch/power/utility.hh @@ -35,23 +35,9 @@ #ifndef __ARCH_POWER_UTILITY_HH__ #define __ARCH_POWER_UTILITY_HH__ -#include "arch/power/miscregs.hh" -#include "arch/power/types.hh" -#include "base/hashmap.hh" #include "base/types.hh" #include "cpu/thread_context.hh" -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 - namespace PowerISA { /** |