Commit 176cd48e authored by Michael Munday's avatar Michael Munday

runtime: fix memhash64 on big endian systems

Fixes #21677.

Change-Id: I869dee5f43df5d87d86922681726297e3024c562
Reviewed-on: https://go-review.googlesource.com/59810
Run-TryBot: Michael Munday <mike.munday@ibm.com>
Reviewed-by: 's avatarMartin Möhrmann <moehrmann@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
parent b7397c81
...@@ -95,7 +95,7 @@ func memhash32(p unsafe.Pointer, seed uintptr) uintptr { ...@@ -95,7 +95,7 @@ func memhash32(p unsafe.Pointer, seed uintptr) uintptr {
func memhash64(p unsafe.Pointer, seed uintptr) uintptr { func memhash64(p unsafe.Pointer, seed uintptr) uintptr {
h := uint64(seed + 8*hashkey[0]) h := uint64(seed + 8*hashkey[0])
h ^= readUnaligned64(p) h ^= uint64(readUnaligned32(p)) | uint64(readUnaligned32(add(p, 4)))<<32
h = rotl_31(h*m1) * m2 h = rotl_31(h*m1) * m2
h ^= h >> 29 h ^= h >> 29
h *= m3 h *= m3
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment