diff options
| -rw-r--r-- | lowlevelilinstruction.h | 8 | ||||
| -rw-r--r-- | mediumlevelilinstruction.h | 5 |
2 files changed, 7 insertions, 6 deletions
diff --git a/lowlevelilinstruction.h b/lowlevelilinstruction.h index b2849d44..169c7a60 100644 --- a/lowlevelilinstruction.h +++ b/lowlevelilinstruction.h @@ -158,10 +158,10 @@ namespace std #else typedef BinaryNinja::SSARegister argument_type; #endif - typedef uint64_t result_type; + typedef uint32_t result_type; result_type operator()(argument_type const& value) const { - return ((result_type)value.reg) ^ ((result_type)value.version << 32); + return ((result_type)value.reg) ^ ((result_type)value.version << 16); } }; @@ -176,10 +176,10 @@ namespace std #else typedef BinaryNinja::SSAFlag argument_type; #endif - typedef uint64_t result_type; + typedef uint32_t result_type; result_type operator()(argument_type const& value) const { - return ((result_type)value.flag) ^ ((result_type)value.version << 32); + return ((result_type)value.flag) ^ ((result_type)value.version << 16); } }; diff --git a/mediumlevelilinstruction.h b/mediumlevelilinstruction.h index 9a76cb6c..8bab199f 100644 --- a/mediumlevelilinstruction.h +++ b/mediumlevelilinstruction.h @@ -135,10 +135,11 @@ namespace std #else typedef BinaryNinja::SSAVariable argument_type; #endif - typedef uint64_t result_type; + typedef uint32_t result_type; result_type operator()(argument_type const& value) const { - return ((result_type)value.var.ToIdentifier()) ^ ((result_type)value.version << 40); + uint64_t hashTmp = ((uint64_t)value.var.ToIdentifier()) ^ ((uint64_t)value.version << 40); + return (uint32_t)((hashTmp >> 32) ^ (uint32_t)hashTmp); } }; |
