diff --git a/src/arch/arm/types.hh b/src/arch/arm/types.hh index 0611232c42..d4e6ec0dbe 100644 --- a/src/arch/arm/types.hh +++ b/src/arch/arm/types.hh @@ -737,18 +737,4 @@ namespace ArmISA } // namespace ArmISA -namespace std { - -template<> -struct hash : - public hash { - - size_t operator()(const ArmISA::ExtMachInst &emi) const { - return hash::operator()(emi); - } - -}; - -} - #endif diff --git a/src/base/bitunion.hh b/src/base/bitunion.hh index 718a06838a..10fa005084 100644 --- a/src/base/bitunion.hh +++ b/src/base/bitunion.hh @@ -388,4 +388,20 @@ namespace BitfieldBackend template using BitUnionBaseType = typename BitfieldBackend::BitUnionBaseType::Type; +namespace std +{ + template + struct hash; + + template + struct hash > : public hash > + { + size_t + operator() (const BitUnionType &val) const + { + return hash >::operator()(val); + } + }; +} + #endif // __BASE_BITUNION_HH__