aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/asm_arm64.s
diff options
context:
space:
mode:
authorKeith Randall <keithr@alum.mit.edu>2019-08-29 16:21:58 -0700
committerKeith Randall <khr@golang.org>2019-08-30 00:10:31 +0000
commitf484e9699d9d18e578493dc0f9924ce2b56a42d9 (patch)
treee2db4cd992158c86c8eb236144652b3ebac8cbed /src/runtime/asm_arm64.s
parent5411953df50ce83ee8e23ca33a8a16335ad95cf2 (diff)
downloadgo-f484e9699d9d18e578493dc0f9924ce2b56a42d9.tar.gz
go-f484e9699d9d18e578493dc0f9924ce2b56a42d9.zip
runtime: use all 64 bits of hash seed on arm64
Fixes #33960 Change-Id: I4f8cf65dcf4140a97e7b368572b31c171c453316 Reviewed-on: https://go-review.googlesource.com/c/go/+/192498 Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com>
Diffstat (limited to 'src/runtime/asm_arm64.s')
-rw-r--r--src/runtime/asm_arm64.s10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/runtime/asm_arm64.s b/src/runtime/asm_arm64.s
index 21ea519d64..0be06d124e 100644
--- a/src/runtime/asm_arm64.s
+++ b/src/runtime/asm_arm64.s
@@ -504,7 +504,7 @@ TEXT runtime·memhash(SB),NOSPLIT|NOFRAME,$0-32
BEQ noaes
MOVD p+0(FP), R0
MOVD s+16(FP), R1
- MOVWU h+8(FP), R3
+ MOVD h+8(FP), R3
MOVD $ret+24(FP), R2
B aeshashbody<>(SB)
noaes:
@@ -517,20 +517,20 @@ TEXT runtime·strhash(SB),NOSPLIT|NOFRAME,$0-24
BEQ noaes
MOVD p+0(FP), R10 // string pointer
LDP (R10), (R0, R1) //string data/ length
- MOVWU h+8(FP), R3
+ MOVD h+8(FP), R3
MOVD $ret+16(FP), R2 // return adddress
B aeshashbody<>(SB)
noaes:
B runtime·strhashFallback(SB)
// R0: data
-// R1: length (maximum 32 bits)
+// R1: length
// R2: address to put return value
// R3: seed data
TEXT aeshashbody<>(SB),NOSPLIT|NOFRAME,$0
VEOR V30.B16, V30.B16, V30.B16
- VMOV R3, V30.S[0]
- VMOV R1, V30.S[1] // load length into seed
+ VMOV R3, V30.D[0]
+ VMOV R1, V30.D[1] // load length into seed
MOVD $runtime·aeskeysched+0(SB), R4
VLD1.P 16(R4), [V0.B16]