diff options
author | DJ Delorie <dj@delorie.com> | 2013-05-10 03:03:03 +0000 |
---|---|---|
committer | DJ Delorie <dj@delorie.com> | 2013-05-10 03:03:03 +0000 |
commit | 8a3c1578db45f41d8ca9fd0d3113c4f6be8a6216 (patch) | |
tree | 31cfa95b92e92cd1df826a2828902890b1eaac15 /libiberty | |
parent | ce936e07b2999b56da5f49bf344b71cbb5dbc123 (diff) | |
download | binutils-redhat-8a3c1578db45f41d8ca9fd0d3113c4f6be8a6216.tar.gz |
merge from gcc
Diffstat (limited to 'libiberty')
-rw-r--r-- | libiberty/ChangeLog | 8 | ||||
-rw-r--r-- | libiberty/hashtab.c | 13 |
2 files changed, 10 insertions, 11 deletions
diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog index 1420ad402f..a30a363a3f 100644 --- a/libiberty/ChangeLog +++ b/libiberty/ChangeLog @@ -1,3 +1,11 @@ +2013-05-06 David Edelsohn <dje.gcc@gmail.com> + Peter Bergner <bergner@vnet.ibm.com> + Segher Boessenkool <segher@kernel.crashing.org> + Jakub Jelinek <jakub@redhat.com> + + * hashtab.c (hash_pointer): Remove conditional and avoid + unexecuted shift equal to wordsize. + 2013-04-22 Andi Kleen <ak@linux.intel.com> * hashtab.c (hash_pointer): Move to end of file and reimplement. diff --git a/libiberty/hashtab.c b/libiberty/hashtab.c index a2fe3ee3bd..04607ea6a0 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; |