diff options
author | Rutger Broekhoff | 2023-12-29 21:31:53 +0100 |
---|---|---|
committer | Rutger Broekhoff | 2023-12-29 21:31:53 +0100 |
commit | 404aeae4545d2426c089a5f8d5e82dae56f5212b (patch) | |
tree | 2d84e00af272b39fc04f3795ae06bc48970e57b5 /vendor/github.com/klauspost/cpuid/v2/cpuid_386.s | |
parent | 209d8b0187ed025dec9ac149ebcced3462877bff (diff) | |
download | gitolfs3-404aeae4545d2426c089a5f8d5e82dae56f5212b.tar.gz gitolfs3-404aeae4545d2426c089a5f8d5e82dae56f5212b.zip |
Make Nix builds work
Diffstat (limited to 'vendor/github.com/klauspost/cpuid/v2/cpuid_386.s')
-rw-r--r-- | vendor/github.com/klauspost/cpuid/v2/cpuid_386.s | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/vendor/github.com/klauspost/cpuid/v2/cpuid_386.s b/vendor/github.com/klauspost/cpuid/v2/cpuid_386.s new file mode 100644 index 0000000..8587c3a --- /dev/null +++ b/vendor/github.com/klauspost/cpuid/v2/cpuid_386.s | |||
@@ -0,0 +1,47 @@ | |||
1 | // Copyright (c) 2015 Klaus Post, released under MIT License. See LICENSE file. | ||
2 | |||
3 | //+build 386,!gccgo,!noasm,!appengine | ||
4 | |||
5 | // func asmCpuid(op uint32) (eax, ebx, ecx, edx uint32) | ||
6 | TEXT ·asmCpuid(SB), 7, $0 | ||
7 | XORL CX, CX | ||
8 | MOVL op+0(FP), AX | ||
9 | CPUID | ||
10 | MOVL AX, eax+4(FP) | ||
11 | MOVL BX, ebx+8(FP) | ||
12 | MOVL CX, ecx+12(FP) | ||
13 | MOVL DX, edx+16(FP) | ||
14 | RET | ||
15 | |||
16 | // func asmCpuidex(op, op2 uint32) (eax, ebx, ecx, edx uint32) | ||
17 | TEXT ·asmCpuidex(SB), 7, $0 | ||
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 | ||
26 | |||
27 | // func xgetbv(index uint32) (eax, edx uint32) | ||
28 | TEXT ·asmXgetbv(SB), 7, $0 | ||
29 | MOVL index+0(FP), CX | ||
30 | BYTE $0x0f; BYTE $0x01; BYTE $0xd0 // XGETBV | ||
31 | MOVL AX, eax+4(FP) | ||
32 | MOVL DX, edx+8(FP) | ||
33 | RET | ||
34 | |||
35 | // func asmRdtscpAsm() (eax, ebx, ecx, edx uint32) | ||
36 | TEXT ·asmRdtscpAsm(SB), 7, $0 | ||
37 | BYTE $0x0F; BYTE $0x01; BYTE $0xF9 // RDTSCP | ||
38 | MOVL AX, eax+0(FP) | ||
39 | MOVL BX, ebx+4(FP) | ||
40 | MOVL CX, ecx+8(FP) | ||
41 | MOVL DX, edx+12(FP) | ||
42 | RET | ||
43 | |||
44 | // func asmDarwinHasAVX512() bool | ||
45 | TEXT ·asmDarwinHasAVX512(SB), 7, $0 | ||
46 | MOVL $0, eax+0(FP) | ||
47 | RET | ||