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_x86.s 600B

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