diff options
| author | 2026-03-23 05:10:40 +0000 | |
|---|---|---|
| committer | 2026-03-23 05:10:40 +0000 | |
| commit | a75e16740e1a185d523153d86badf9b2c2bcc12e (patch) | |
| tree | 2e6324ed0823c25f9b9a2135b4872c6a3624a921 /internal/cpu/cpu_amd64.s | |
| parent | refstore: Improve interfaces, errors, and make batch work (diff) | |
| signature | No signature | |
Vendor a minimal internal/cpu for AMD64 only v0.1.93
Diffstat (limited to 'internal/cpu/cpu_amd64.s')
| -rw-r--r-- | internal/cpu/cpu_amd64.s | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/internal/cpu/cpu_amd64.s b/internal/cpu/cpu_amd64.s new file mode 100644 index 00000000..250a34e2 --- /dev/null +++ b/internal/cpu/cpu_amd64.s @@ -0,0 +1,22 @@ +//go:build amd64 && !purego + +#include "textflag.h" + +// func cpuid(eaxArg, ecxArg uint32) (eax, ebx, ecx, edx uint32) +TEXT ·cpuid(SB), NOSPLIT, $0-24 + MOVL eaxArg+0(FP), AX + MOVL ecxArg+4(FP), CX + CPUID + MOVL AX, eax+8(FP) + MOVL BX, ebx+12(FP) + MOVL CX, ecx+16(FP) + MOVL DX, edx+20(FP) + RET + +// func xgetbv() (eax, edx uint32) +TEXT ·xgetbv(SB), NOSPLIT, $0-8 + MOVL $0, CX + XGETBV + MOVL AX, eax+0(FP) + MOVL DX, edx+4(FP) + RET |
