]> Cypherpunks repositories - gostls13.git/commit
x/crypto/chacha20poly1305: fix detection of BMI on AMD64
authorLion Yang <lion@aosc.xyz>
Wed, 4 Jan 2017 22:25:59 +0000 (06:25 +0800)
committerIan Lance Taylor <iant@golang.org>
Thu, 5 Jan 2017 17:50:56 +0000 (17:50 +0000)
commitb820ef5c33c1b508c7b0df8827b6f13c9480acea
treebc26cf9150ec949afe490a11b5095cc11f3117f7
parenta2b615d5270f0bc2ee1dfcdd7849bdd05ee76a14
x/crypto/chacha20poly1305: fix detection of BMI on AMD64

This change uses runtime.support_bmi2 as an additional condition
to examine the usability of AVX2 version algorithm, fixes
the crash on the platfrom which supports AVX2 but not support BMI2.

Fixes #18512

Change-Id: I408c0844ae2eb242dacf70cb9e8cec1b8f3bd941
Reviewed-on: https://go-review.googlesource.com/34851
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/vendor/golang_org/x/crypto/chacha20poly1305/chacha20poly1305_amd64.s