gitee.com/quant1x/gox@v1.21.2/devices/cpuid_amd64.s (about) 1 //+build amd64,!gccgo,!noasm,!appengine 2 3 #include "textflag.h" 4 5 // func asmCpuid(op uint32) (eax, ebx, ecx, edx uint32) 6 TEXT ·asmCpuid(SB), NOSPLIT, $0-24 7 XORQ CX, CX 8 MOVL op+0(FP), AX 9 CPUID 10 MOVL AX, eax+8(FP) 11 MOVL BX, ebx+12(FP) 12 MOVL CX, ecx+16(FP) 13 MOVL DX, edx+20(FP) 14 RET 15 16 // func asmCpuidex(op, op2 uint32) (eax, ebx, ecx, edx uint32) 17 TEXT ·asmCpuidex(SB), NOSPLIT, $0-24 18 MOVL op+0(FP), AX 19 MOVL op2+4(FP), CX 20 CPUID 21 MOVL AX, eax+8(FP) 22 MOVL BX, ebx+12(FP) 23 MOVL CX, ecx+16(FP) 24 MOVL DX, edx+20(FP) 25 RET