From 7efbae5d109cb7a2dbc362886213f73c4c55dede Mon Sep 17 00:00:00 2001 From: Adam Langley Date: Thu, 1 Dec 2016 10:23:41 -0800 Subject: [PATCH] x/crypto/blake2b: SSE4.1 is bit 19, not 15. I missed this in the initial review but this will cause blake2b to SIGILL on, at least, some Atom chips. Fixes golang/go#18113. Change-Id: I0c16319df71f3ce4a38411ad4c4e9d3871fd9533 Reviewed-on: https://go-review.googlesource.com/33830 Run-TryBot: Adam Langley TryBot-Result: Gobot Gobot Reviewed-by: Brad Fitzpatrick --- blake2b/blake2b_amd64.s | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blake2b/blake2b_amd64.s b/blake2b/blake2b_amd64.s index 3017cf0..7a876ba 100644 --- a/blake2b/blake2b_amd64.s +++ b/blake2b/blake2b_amd64.s @@ -269,7 +269,7 @@ noinc: TEXT ·supportSSE4(SB), 4, $0-1 MOVL $1, AX CPUID - SHRL $15, CX // Bit 15 indicates SSE4 support + SHRL $19, CX // Bit 19 indicates SSE4 support ANDL $1, CX // CX != 0 if support SSE4 MOVB CX, ret+0(FP) RET