diff options
author | DJ Delorie <dj@redhat.com> | 2013-05-10 03:03:04 +0000 |
---|---|---|
committer | DJ Delorie <dj@redhat.com> | 2013-05-10 03:03:04 +0000 |
commit | 3ecb7338119e24eee389cd1b697231d643f87500 (patch) | |
tree | e494aec5784b0178069b1a5dc356227aa5edd7e5 /libiberty/hashtab.c | |
parent | b015e599c772eeb5f818d710119ee43e7df0feff (diff) | |
download | binutils-3ecb7338119e24eee389cd1b697231d643f87500.zip binutils-3ecb7338119e24eee389cd1b697231d643f87500.tar.gz binutils-3ecb7338119e24eee389cd1b697231d643f87500.tar.bz2 |
merge from gcc
Diffstat (limited to 'libiberty/hashtab.c')
-rw-r--r-- | libiberty/hashtab.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/libiberty/hashtab.c b/libiberty/hashtab.c index a2fe3ee..04607ea 100644 --- a/libiberty/hashtab.c +++ b/libiberty/hashtab.c @@ -990,17 +990,8 @@ hash_pointer (const PTR p) unsigned a, b, c; a = b = 0x9e3779b9; - if (sizeof (intptr_t) == 4) - { - /* Mix as 16bit for now */ - a += v >> 16; - b += v & 0xffff; - } - else - { - a += v >> 32; - b += v & 0xffffffff; - } + a += v >> (sizeof (intptr_t) * CHAR_BIT / 2); + b += v & (((intptr_t) 1 << (sizeof (intptr_t) * CHAR_BIT / 2)) - 1); c = 0x42135234; mix (a, b, c); return c; |