1
0
Fork 0
mirror of https://github.com/tobast/libunwind-eh_elf.git synced 2024-09-27 08:59:28 +02:00

(hash): Define magic constant as unsigned long long and then cast it to the

right type.  Avoids compiler warnings when cross-compiling from a
	32-bit platform.

(Logical change 1.214)
This commit is contained in:
(none)!davidm 2004-04-23 01:31:47 +00:00
parent a2cd0592ca
commit 1218cf85e3

View file

@ -60,7 +60,8 @@ static __thread struct ia64_script_cache ia64_per_thread_cache =
static inline unw_hash_index_t
hash (unw_word_t ip)
{
# define magic 0x9e3779b97f4a7c16 /* based on (sqrt(5)/2-1)*2^64 */
/* based on (sqrt(5)/2-1)*2^64 */
# define magic ((unw_word_t) 0x9e3779b97f4a7c16ULL)
return (ip >> 4) * magic >> (64 - IA64_LOG_UNW_HASH_SIZE);
}