re PR go/48501 (64bit-out.go, select5-out.go, tmp.go compilation times out)

PR go/48501
runtime: Fix identity hash function for big-endian systems.

From-SVN: r184218
This commit is contained in:
Ian Lance Taylor 2012-02-14 18:02:09 +00:00
parent 7f0dbd0aee
commit 95787705db
1 changed files with 4 additions and 1 deletions

View File

@ -32,7 +32,10 @@ __go_type_hash_identity (const void *key, uintptr_t key_size)
} u;
u.v = 0;
__builtin_memcpy (&u.a, key, key_size);
return (uintptr_t) u.v;
if (sizeof (uintptr_t) >= 8)
return (uintptr_t) u.v;
else
return (uintptr_t) ((u.v >> 32) ^ (u.v & 0xffffffff));
}
ret = 5381;