merge from gcc

This commit is contained in:
DJ Delorie 2013-05-10 03:03:04 +00:00
parent b015e599c7
commit 3ecb733811
2 changed files with 10 additions and 11 deletions

View File

@ -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.

View File

@ -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;