summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Hansson <andreas.hansson@arm.com>2014-09-03 07:42:19 -0400
committerAndreas Hansson <andreas.hansson@arm.com>2014-09-03 07:42:19 -0400
commit1046b8d6e5303fa4fede2d7c0712ef0719c82eb7 (patch)
treea29d77e627e5ef41c4518df511619b7d35c1390a
parentfa1fbcf020ee9aacdd4a7a09e81a633e09bad97a (diff)
downloadgem5-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.
-rw-r--r--src/arch/arm/types.hh17
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