1
0
Fork 0
mirror of https://github.com/tobast/libunwind-eh_elf.git synced 2024-11-22 15:47:37 +01:00

Cleanup the hash() function copied from ia64

Fixes the compiler warning on x86-32.

Signed-off-by: Arun Sharma <arun.sharma@google.com>
This commit is contained in:
Arun Sharma 2006-08-16 15:43:49 -06:00 committed by David Mosberger-Tang
parent a5d0c1f8b7
commit 55fe524775

View file

@ -533,7 +533,7 @@ hash (unw_word_t ip)
/* based on (sqrt(5)/2-1)*2^64 */
# define magic ((unw_word_t) 0x9e3779b97f4a7c16ULL)
return (ip >> 4) * magic >> (64 - DWARF_LOG_UNW_HASH_SIZE);
return ip * magic >> ((sizeof(unw_word_t) * 8) - DWARF_LOG_UNW_HASH_SIZE);
}
static inline long