diff options
author | Andreas Hansson <andreas.hansson@arm.com> | 2014-09-03 07:42:19 -0400 |
---|---|---|
committer | Andreas Hansson <andreas.hansson@arm.com> | 2014-09-03 07:42:19 -0400 |
commit | 1046b8d6e5303fa4fede2d7c0712ef0719c82eb7 (patch) | |
tree | a29d77e627e5ef41c4518df511619b7d35c1390a /src/arch | |
parent | fa1fbcf020ee9aacdd4a7a09e81a633e09bad97a (diff) | |
download | gem5-1046b8d6e5303fa4fede2d7c0712ef0719c82eb7.tar.xz |
arm: Fix ExtMachInst hash operator underlying type
This patch fixes the hash operator used for ARM ExtMachInst, which
incorrectly was still using uint32_t. Instead of changing it to
uint64_t it is not using the underlying data type of the BitUnion.
Diffstat (limited to 'src/arch')
-rw-r--r-- | src/arch/arm/types.hh | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/src/arch/arm/types.hh b/src/arch/arm/types.hh index 7b736492b..14cce8294 100644 --- a/src/arch/arm/types.hh +++ b/src/arch/arm/types.hh @@ -727,12 +727,17 @@ namespace ArmISA } // namespace ArmISA __hash_namespace_begin - template<> - struct hash<ArmISA::ExtMachInst> : public hash<uint32_t> { - size_t operator()(const ArmISA::ExtMachInst &emi) const { - return hash<uint32_t>::operator()((uint32_t)emi); - }; - }; + +template<> +struct hash<ArmISA::ExtMachInst> : + public hash<ArmISA::ExtMachInst::__DataType> { + + size_t operator()(const ArmISA::ExtMachInst &emi) const { + return hash<ArmISA::ExtMachInst::__DataType>::operator()(emi); + } + +}; + __hash_namespace_end #endif |