github.com/zebozhuang/go@v0.0.0-20200207033046-f8a98f6f5c5d/src/crypto/internal/cipherhw/asm_amd64.s (about)

     1  // Copyright 2016 The Go Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  // +build amd64,!gccgo,!appengine
     6  
     7  #include "textflag.h"
     8  
     9  // func hasAESNI() bool
    10  TEXT ·hasAESNI(SB),NOSPLIT,$0
    11  	XORQ AX, AX
    12  	INCL AX
    13  	CPUID
    14  	SHRQ $25, CX
    15  	ANDQ $1, CX
    16  	MOVB CX, ret+0(FP)
    17  	RET