OLD | NEW |
| (Empty) |
1 #if defined(__x86_64__) | |
2 .text | |
3 | |
4 .globl OPENSSL_ia32_cpuid | |
5 .hidden OPENSSL_ia32_cpuid | |
6 .type OPENSSL_ia32_cpuid,@function | |
7 .align 16 | |
8 OPENSSL_ia32_cpuid: | |
9 | |
10 | |
11 movq %rdi,%rdi | |
12 movq %rbx,%r8 | |
13 | |
14 xorl %eax,%eax | |
15 movl %eax,8(%rdi) | |
16 cpuid | |
17 movl %eax,%r11d | |
18 | |
19 xorl %eax,%eax | |
20 cmpl $1970169159,%ebx | |
21 setne %al | |
22 movl %eax,%r9d | |
23 cmpl $1231384169,%edx | |
24 setne %al | |
25 orl %eax,%r9d | |
26 cmpl $1818588270,%ecx | |
27 setne %al | |
28 orl %eax,%r9d | |
29 jz .Lintel | |
30 | |
31 cmpl $1752462657,%ebx | |
32 setne %al | |
33 movl %eax,%r10d | |
34 cmpl $1769238117,%edx | |
35 setne %al | |
36 orl %eax,%r10d | |
37 cmpl $1145913699,%ecx | |
38 setne %al | |
39 orl %eax,%r10d | |
40 jnz .Lintel | |
41 | |
42 | |
43 | |
44 | |
45 movl $2147483648,%eax | |
46 cpuid | |
47 | |
48 | |
49 cmpl $2147483649,%eax | |
50 jb .Lintel | |
51 movl %eax,%r10d | |
52 movl $2147483649,%eax | |
53 cpuid | |
54 | |
55 | |
56 orl %ecx,%r9d | |
57 andl $2049,%r9d | |
58 | |
59 cmpl $2147483656,%r10d | |
60 jb .Lintel | |
61 | |
62 movl $2147483656,%eax | |
63 cpuid | |
64 | |
65 movzbq %cl,%r10 | |
66 incq %r10 | |
67 | |
68 movl $1,%eax | |
69 cpuid | |
70 | |
71 btl $28,%edx | |
72 jnc .Lgeneric | |
73 shrl $16,%ebx | |
74 cmpb %r10b,%bl | |
75 ja .Lgeneric | |
76 andl $4026531839,%edx | |
77 jmp .Lgeneric | |
78 | |
79 .Lintel: | |
80 cmpl $4,%r11d | |
81 movl $-1,%r10d | |
82 jb .Lnocacheinfo | |
83 | |
84 movl $4,%eax | |
85 movl $0,%ecx | |
86 cpuid | |
87 movl %eax,%r10d | |
88 shrl $14,%r10d | |
89 andl $4095,%r10d | |
90 | |
91 cmpl $7,%r11d | |
92 jb .Lnocacheinfo | |
93 | |
94 movl $7,%eax | |
95 xorl %ecx,%ecx | |
96 cpuid | |
97 movl %ebx,8(%rdi) | |
98 | |
99 .Lnocacheinfo: | |
100 movl $1,%eax | |
101 cpuid | |
102 | |
103 andl $3220176895,%edx | |
104 cmpl $0,%r9d | |
105 jne .Lnotintel | |
106 orl $1073741824,%edx | |
107 .Lnotintel: | |
108 btl $28,%edx | |
109 jnc .Lgeneric | |
110 andl $4026531839,%edx | |
111 cmpl $0,%r10d | |
112 je .Lgeneric | |
113 | |
114 orl $268435456,%edx | |
115 shrl $16,%ebx | |
116 cmpb $1,%bl | |
117 ja .Lgeneric | |
118 andl $4026531839,%edx | |
119 .Lgeneric: | |
120 andl $2048,%r9d | |
121 andl $4294965247,%ecx | |
122 orl %ecx,%r9d | |
123 | |
124 movl %edx,%r10d | |
125 btl $27,%r9d | |
126 jnc .Lclear_avx | |
127 xorl %ecx,%ecx | |
128 .byte 0x0f,0x01,0xd0 | |
129 andl $6,%eax | |
130 cmpl $6,%eax | |
131 je .Ldone | |
132 .Lclear_avx: | |
133 movl $4026525695,%eax | |
134 andl %eax,%r9d | |
135 andl $4294967263,8(%rdi) | |
136 .Ldone: | |
137 movl %r9d,4(%rdi) | |
138 movl %r10d,0(%rdi) | |
139 movq %r8,%rbx | |
140 .byte 0xf3,0xc3 | |
141 .size OPENSSL_ia32_cpuid,.-OPENSSL_ia32_cpuid | |
142 | |
143 #endif | |
OLD | NEW |