changeset d2850235e31c in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=d2850235e31c
description:
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:
src/arch/arm/types.hh | 17 +++++++++++------
1 files changed, 11 insertions(+), 6 deletions(-)
diffs (27 lines):
diff -r 9e02c14446bb -r d2850235e31c src/arch/arm/types.hh
--- a/src/arch/arm/types.hh Mon Sep 01 16:55:52 2014 -0500
+++ b/src/arch/arm/types.hh Wed Sep 03 07:42:19 2014 -0400
@@ -727,12 +727,17 @@
} // 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
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev