From 0dd1f7f01a8a744811aede5814111b8681271a6b Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Tue, 14 Sep 2010 00:29:38 -0700 Subject: 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. --- src/arch/power/insts/branch.cc | 1 + src/arch/power/types.hh | 12 ++++++++++++ src/arch/power/utility.hh | 14 -------------- 3 files changed, 13 insertions(+), 14 deletions(-) (limited to 'src/arch/power') 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 : public hash { + size_t operator()(const PowerISA::ExtMachInst &emi) const { + return hash::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 : public hash { - size_t operator()(const PowerISA::ExtMachInst &emi) const { - return hash::operator()((uint32_t)emi); - }; -}; - -} // __hash_namespace namespace - namespace PowerISA { /** -- cgit v1.2.3