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.

27 lines
602 B

  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. #include "textflag.h"
  7. // func cpuid(eaxArg, ecxArg uint32) (eax, ebx, ecx, edx uint32)
  8. TEXT ·cpuid(SB), NOSPLIT, $0-24
  9. MOVL eaxArg+0(FP), AX
  10. MOVL ecxArg+4(FP), CX
  11. CPUID
  12. MOVL AX, eax+8(FP)
  13. MOVL BX, ebx+12(FP)
  14. MOVL CX, ecx+16(FP)
  15. MOVL DX, edx+20(FP)
  16. RET
  17. // func xgetbv() (eax, edx uint32)
  18. TEXT ·xgetbv(SB),NOSPLIT,$0-8
  19. MOVL $0, CX
  20. XGETBV
  21. MOVL AX, eax+0(FP)
  22. MOVL DX, edx+4(FP)
  23. RET