You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

cpu_gccgo_x86.go 795B

12345678910111213141516171819202122232425262728293031
  1. // Copyright 2018 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. //go:build (386 || amd64 || amd64p32) && gccgo
  5. package cpu
  6. //extern gccgoGetCpuidCount
  7. func gccgoGetCpuidCount(eaxArg, ecxArg uint32, eax, ebx, ecx, edx *uint32)
  8. func cpuid(eaxArg, ecxArg uint32) (eax, ebx, ecx, edx uint32) {
  9. var a, b, c, d uint32
  10. gccgoGetCpuidCount(eaxArg, ecxArg, &a, &b, &c, &d)
  11. return a, b, c, d
  12. }
  13. //extern gccgoXgetbv
  14. func gccgoXgetbv(eax, edx *uint32)
  15. func xgetbv() (eax, edx uint32) {
  16. var a, d uint32
  17. gccgoXgetbv(&a, &d)
  18. return a, d
  19. }
  20. // gccgo doesn't build on Darwin, per:
  21. // https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/gcc.rb#L76
  22. func darwinSupportsAVX512() bool {
  23. return false
  24. }