On Fri, Apr 19, 2013 at 2:31 PM, Andi Kleen <[email protected]> wrote:
> From: Andi Kleen <[email protected]>
>
> 2013-04-18 Andi Kleen <[email protected]>
>
> * hashtab.c (hash_pointer): Move to end of file and reimplement.
> +/* Returns a hash code for pointer P. Simplified version of evahash */
> +
> +static hashval_t
> +hash_pointer (const PTR p)
> +{
> + intptr_t v = (intptr_t)p;
Space after ')'.
> + unsigned a, b, c;
> + a = b = 0x9e3779b9;
Blank line after variable declarations.
> + if (sizeof(intptr_t) == 4)
Space before '('.
> + {
> + /* Mix as 16bit for now */
> + a += v >> 16;
> + b += v & 0xffff;
> + }
> + else
> + {
> + a += v >> 32;
> + b += v & 0xffffffff;
> + }
> + c = 0x42135234;
> + mix(a, b, c);
Space before '('.
This is OK with those changes if it bootstraps and passes tests.
Thanks.
Ian