|
@@ -1204,10 +1204,10 @@ desc_spill_sprel_p (unsigned char qp, unw_word t, unsigned char abreg, unw_word
|
|
static inline unw_hash_index_t
|
|
static inline unw_hash_index_t
|
|
hash (unsigned long ip)
|
|
hash (unsigned long ip)
|
|
{
|
|
{
|
|
-# define hashmagic 0x9e3779b97f4a7c16UL /* based on (sqrt(5)/2-1)*2^64 */
|
|
|
|
|
|
+ /* magic number = ((sqrt(5)-1)/2)*2^64 */
|
|
|
|
+ static const unsigned long hashmagic = 0x9e3779b97f4a7c16UL;
|
|
|
|
|
|
- return (ip >> 4)*hashmagic >> (64 - UNW_LOG_HASH_SIZE);
|
|
|
|
-#undef hashmagic
|
|
|
|
|
|
+ return (ip >> 4) * hashmagic >> (64 - UNW_LOG_HASH_SIZE);
|
|
}
|
|
}
|
|
|
|
|
|
static inline long
|
|
static inline long
|