]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: fix fallback logic for aeshash on 32/64 bit
authorKeith Randall <khr@golang.org>
Thu, 13 Feb 2020 15:37:28 +0000 (07:37 -0800)
committerKeith Randall <khr@golang.org>
Thu, 13 Feb 2020 16:25:03 +0000 (16:25 +0000)
We were using the fallback hash unconditionally.  Oops.

Fixes #37212

Change-Id: Id37d4f5c08806fdda12a3148ba4dbc46676eeb54
Reviewed-on: https://go-review.googlesource.com/c/go/+/219337
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
src/runtime/asm_amd64.s

index ba673432c1508ee5d73c317ccf5906b0c4e050b8..c191599c28c58dfae0809ed68ab88584583a8fe8 100644 (file)
@@ -1244,7 +1244,6 @@ aesloop:
 TEXT runtime·memhash32(SB),NOSPLIT,$0-24
        CMPB    runtime·useAeshash(SB), $0
        JEQ     noaes
-       JMP     runtime·memhash32Fallback(SB)
        MOVQ    p+0(FP), AX     // ptr to data
        MOVQ    h+8(FP), X0     // seed
        PINSRD  $2, (AX), X0    // data
@@ -1260,7 +1259,6 @@ noaes:
 TEXT runtime·memhash64(SB),NOSPLIT,$0-24
        CMPB    runtime·useAeshash(SB), $0
        JEQ     noaes
-       JMP     runtime·memhash64Fallback(SB)
        MOVQ    p+0(FP), AX     // ptr to data
        MOVQ    h+8(FP), X0     // seed
        PINSRQ  $1, (AX), X0    // data