]> Cypherpunks repositories - gostls13.git/commit
crypto/sha512: fix checkAVX2
authorDavid du Colombier <0intro@gmail.com>
Tue, 28 Feb 2017 13:20:44 +0000 (14:20 +0100)
committerRuss Cox <rsc@golang.org>
Tue, 28 Feb 2017 13:38:39 +0000 (13:38 +0000)
commita38a2d02d5c26adb34ec18b495a1d698517c1735
tree81f35c71d2f5bfe4e1ee74885f87c44a8896482a
parenta8f07310e3a08910dde2b7e9550848ec400753ad
crypto/sha512: fix checkAVX2

The checkAVX2 test doesn't appear to be correct,
because it always returns the value of support_bmi2,
even if the value of support_avx2 is false.

Consequently, checkAVX2 always returns true, as long
as BMI2 is supported, even if AVX2 is not supported.

We change checkAVX2 to return false when support_avx2
is false.

Fixes #19316.

Change-Id: I2ec9dfaa09f4b54c4a03d60efef891b955d60578
Reviewed-on: https://go-review.googlesource.com/37590
Run-TryBot: David du Colombier <0intro@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
src/crypto/sha512/sha512block_amd64.s