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 628B

1234567891011121314151617181920212223242526
  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. // +build 386 amd64 amd64p32
  5. // +build gccgo
  6. package cpu
  7. //extern gccgoGetCpuidCount
  8. func gccgoGetCpuidCount(eaxArg, ecxArg uint32, eax, ebx, ecx, edx *uint32)
  9. func cpuid(eaxArg, ecxArg uint32) (eax, ebx, ecx, edx uint32) {
  10. var a, b, c, d uint32
  11. gccgoGetCpuidCount(eaxArg, ecxArg, &a, &b, &c, &d)
  12. return a, b, c, d
  13. }
  14. //extern gccgoXgetbv
  15. func gccgoXgetbv(eax, edx *uint32)
  16. func xgetbv() (eax, edx uint32) {
  17. var a, d uint32
  18. gccgoXgetbv(&a, &d)
  19. return a, d
  20. }