asm_amd64.s 354 B

1234567891011121314151617
  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. // +build amd64,!gccgo,!appengine
  5. #include "textflag.h"
  6. // func hasAESNI() bool
  7. TEXT ·hasAESNI(SB),NOSPLIT,$0
  8. XORQ AX, AX
  9. INCL AX
  10. CPUID
  11. SHRQ $25, CX
  12. ANDQ $1, CX
  13. MOVB CX, ret+0(FP)
  14. RET