X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=libiberty%2Fhashtab.c;h=04607ea6a0167bb2c48a7ac847bc5ac968b3a783;hb=5ecffcbbd49639b83e574a0411f8a3088093f4aa;hp=a2fe3ee3bddbff6745024ea3b01df707744574ba;hpb=29f045bb482a412d4f410f368c333df2dc8c771e;p=platform%2Fupstream%2Fbinutils.git 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;