]> Cypherpunks repositories - gostls13.git/commit
runtime: mix a bit more in arm64 hash function
authorKeith Randall <khr@golang.org>
Wed, 19 Apr 2023 23:41:37 +0000 (16:41 -0700)
committerKeith Randall <khr@google.com>
Thu, 20 Apr 2023 15:45:06 +0000 (15:45 +0000)
commit22a840aa9bfbabd7b4daf5c5f9852e1c68908d03
tree916fcafde3a860e6c399a6342d4ac2c426113ef2
parent8588a3fa08c1eb320869781926f83d3928a7de4e
runtime: mix a bit more in arm64 hash function

We really need 3 mix steps between the data being hashed and the output.
One mix can only spread a 1 bit change to 32 bits. The second mix
can spread to all 128 bits, but the spread is not complete. A third mix
spreads out ~evenly to all 128 bits.

The amd64 version has 3 mix steps.

Fixes #59643

Change-Id: I54ad8686ca42bcffb6d0ec3779d27af682cc96e9
Reviewed-on: https://go-review.googlesource.com/c/go/+/486616
Run-TryBot: Keith Randall <khr@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
src/runtime/asm_arm64.s
src/runtime/hash_test.go