VirtualBox

source: vbox/trunk/src/libs/openssl-3.0.9/crypto/genasm-elf/x86-mont.S@ 100942

Last change on this file since 100942 was 97372, checked in by vboxsync, 2 years ago

libs: Switch to openssl-3.0.7, bugref:10317

File size: 6.6 KB
Line 
1.text
2.globl bn_mul_mont
3.type bn_mul_mont,@function
4.align 16
5bn_mul_mont:
6.L_bn_mul_mont_begin:
7 #ifdef __CET__
8
9.byte 243,15,30,251
10 #endif
11
12 pushl %ebp
13 pushl %ebx
14 pushl %esi
15 pushl %edi
16 xorl %eax,%eax
17 movl 40(%esp),%edi
18 cmpl $4,%edi
19 jl .L000just_leave
20 leal 20(%esp),%esi
21 leal 24(%esp),%edx
22 addl $2,%edi
23 negl %edi
24 leal -32(%esp,%edi,4),%ebp
25 negl %edi
26 movl %ebp,%eax
27 subl %edx,%eax
28 andl $2047,%eax
29 subl %eax,%ebp
30 xorl %ebp,%edx
31 andl $2048,%edx
32 xorl $2048,%edx
33 subl %edx,%ebp
34 andl $-64,%ebp
35 movl %esp,%eax
36 subl %ebp,%eax
37 andl $-4096,%eax
38 movl %esp,%edx
39 leal (%ebp,%eax,1),%esp
40 movl (%esp),%eax
41 cmpl %ebp,%esp
42 ja .L001page_walk
43 jmp .L002page_walk_done
44.align 16
45.L001page_walk:
46 leal -4096(%esp),%esp
47 movl (%esp),%eax
48 cmpl %ebp,%esp
49 ja .L001page_walk
50.L002page_walk_done:
51 movl (%esi),%eax
52 movl 4(%esi),%ebx
53 movl 8(%esi),%ecx
54 movl 12(%esi),%ebp
55 movl 16(%esi),%esi
56 movl (%esi),%esi
57 movl %eax,4(%esp)
58 movl %ebx,8(%esp)
59 movl %ecx,12(%esp)
60 movl %ebp,16(%esp)
61 movl %esi,20(%esp)
62 leal -3(%edi),%ebx
63 movl %edx,24(%esp)
64 movl 8(%esp),%esi
65 leal 1(%ebx),%ebp
66 movl 12(%esp),%edi
67 xorl %ecx,%ecx
68 movl %esi,%edx
69 andl $1,%ebp
70 subl %edi,%edx
71 leal 4(%edi,%ebx,4),%eax
72 orl %edx,%ebp
73 movl (%edi),%edi
74 jz .L003bn_sqr_mont
75 movl %eax,28(%esp)
76 movl (%esi),%eax
77 xorl %edx,%edx
78.align 16
79.L004mull:
80 movl %edx,%ebp
81 mull %edi
82 addl %eax,%ebp
83 leal 1(%ecx),%ecx
84 adcl $0,%edx
85 movl (%esi,%ecx,4),%eax
86 cmpl %ebx,%ecx
87 movl %ebp,28(%esp,%ecx,4)
88 jl .L004mull
89 movl %edx,%ebp
90 mull %edi
91 movl 20(%esp),%edi
92 addl %ebp,%eax
93 movl 16(%esp),%esi
94 adcl $0,%edx
95 imull 32(%esp),%edi
96 movl %eax,32(%esp,%ebx,4)
97 xorl %ecx,%ecx
98 movl %edx,36(%esp,%ebx,4)
99 movl %ecx,40(%esp,%ebx,4)
100 movl (%esi),%eax
101 mull %edi
102 addl 32(%esp),%eax
103 movl 4(%esi),%eax
104 adcl $0,%edx
105 incl %ecx
106 jmp .L0052ndmadd
107.align 16
108.L0061stmadd:
109 movl %edx,%ebp
110 mull %edi
111 addl 32(%esp,%ecx,4),%ebp
112 leal 1(%ecx),%ecx
113 adcl $0,%edx
114 addl %eax,%ebp
115 movl (%esi,%ecx,4),%eax
116 adcl $0,%edx
117 cmpl %ebx,%ecx
118 movl %ebp,28(%esp,%ecx,4)
119 jl .L0061stmadd
120 movl %edx,%ebp
121 mull %edi
122 addl 32(%esp,%ebx,4),%eax
123 movl 20(%esp),%edi
124 adcl $0,%edx
125 movl 16(%esp),%esi
126 addl %eax,%ebp
127 adcl $0,%edx
128 imull 32(%esp),%edi
129 xorl %ecx,%ecx
130 addl 36(%esp,%ebx,4),%edx
131 movl %ebp,32(%esp,%ebx,4)
132 adcl $0,%ecx
133 movl (%esi),%eax
134 movl %edx,36(%esp,%ebx,4)
135 movl %ecx,40(%esp,%ebx,4)
136 mull %edi
137 addl 32(%esp),%eax
138 movl 4(%esi),%eax
139 adcl $0,%edx
140 movl $1,%ecx
141.align 16
142.L0052ndmadd:
143 movl %edx,%ebp
144 mull %edi
145 addl 32(%esp,%ecx,4),%ebp
146 leal 1(%ecx),%ecx
147 adcl $0,%edx
148 addl %eax,%ebp
149 movl (%esi,%ecx,4),%eax
150 adcl $0,%edx
151 cmpl %ebx,%ecx
152 movl %ebp,24(%esp,%ecx,4)
153 jl .L0052ndmadd
154 movl %edx,%ebp
155 mull %edi
156 addl 32(%esp,%ebx,4),%ebp
157 adcl $0,%edx
158 addl %eax,%ebp
159 adcl $0,%edx
160 movl %ebp,28(%esp,%ebx,4)
161 xorl %eax,%eax
162 movl 12(%esp),%ecx
163 addl 36(%esp,%ebx,4),%edx
164 adcl 40(%esp,%ebx,4),%eax
165 leal 4(%ecx),%ecx
166 movl %edx,32(%esp,%ebx,4)
167 cmpl 28(%esp),%ecx
168 movl %eax,36(%esp,%ebx,4)
169 je .L007common_tail
170 movl (%ecx),%edi
171 movl 8(%esp),%esi
172 movl %ecx,12(%esp)
173 xorl %ecx,%ecx
174 xorl %edx,%edx
175 movl (%esi),%eax
176 jmp .L0061stmadd
177.align 16
178.L003bn_sqr_mont:
179 movl %ebx,(%esp)
180 movl %ecx,12(%esp)
181 movl %edi,%eax
182 mull %edi
183 movl %eax,32(%esp)
184 movl %edx,%ebx
185 shrl $1,%edx
186 andl $1,%ebx
187 incl %ecx
188.align 16
189.L008sqr:
190 movl (%esi,%ecx,4),%eax
191 movl %edx,%ebp
192 mull %edi
193 addl %ebp,%eax
194 leal 1(%ecx),%ecx
195 adcl $0,%edx
196 leal (%ebx,%eax,2),%ebp
197 shrl $31,%eax
198 cmpl (%esp),%ecx
199 movl %eax,%ebx
200 movl %ebp,28(%esp,%ecx,4)
201 jl .L008sqr
202 movl (%esi,%ecx,4),%eax
203 movl %edx,%ebp
204 mull %edi
205 addl %ebp,%eax
206 movl 20(%esp),%edi
207 adcl $0,%edx
208 movl 16(%esp),%esi
209 leal (%ebx,%eax,2),%ebp
210 imull 32(%esp),%edi
211 shrl $31,%eax
212 movl %ebp,32(%esp,%ecx,4)
213 leal (%eax,%edx,2),%ebp
214 movl (%esi),%eax
215 shrl $31,%edx
216 movl %ebp,36(%esp,%ecx,4)
217 movl %edx,40(%esp,%ecx,4)
218 mull %edi
219 addl 32(%esp),%eax
220 movl %ecx,%ebx
221 adcl $0,%edx
222 movl 4(%esi),%eax
223 movl $1,%ecx
224.align 16
225.L0093rdmadd:
226 movl %edx,%ebp
227 mull %edi
228 addl 32(%esp,%ecx,4),%ebp
229 adcl $0,%edx
230 addl %eax,%ebp
231 movl 4(%esi,%ecx,4),%eax
232 adcl $0,%edx
233 movl %ebp,28(%esp,%ecx,4)
234 movl %edx,%ebp
235 mull %edi
236 addl 36(%esp,%ecx,4),%ebp
237 leal 2(%ecx),%ecx
238 adcl $0,%edx
239 addl %eax,%ebp
240 movl (%esi,%ecx,4),%eax
241 adcl $0,%edx
242 cmpl %ebx,%ecx
243 movl %ebp,24(%esp,%ecx,4)
244 jl .L0093rdmadd
245 movl %edx,%ebp
246 mull %edi
247 addl 32(%esp,%ebx,4),%ebp
248 adcl $0,%edx
249 addl %eax,%ebp
250 adcl $0,%edx
251 movl %ebp,28(%esp,%ebx,4)
252 movl 12(%esp),%ecx
253 xorl %eax,%eax
254 movl 8(%esp),%esi
255 addl 36(%esp,%ebx,4),%edx
256 adcl 40(%esp,%ebx,4),%eax
257 movl %edx,32(%esp,%ebx,4)
258 cmpl %ebx,%ecx
259 movl %eax,36(%esp,%ebx,4)
260 je .L007common_tail
261 movl 4(%esi,%ecx,4),%edi
262 leal 1(%ecx),%ecx
263 movl %edi,%eax
264 movl %ecx,12(%esp)
265 mull %edi
266 addl 32(%esp,%ecx,4),%eax
267 adcl $0,%edx
268 movl %eax,32(%esp,%ecx,4)
269 xorl %ebp,%ebp
270 cmpl %ebx,%ecx
271 leal 1(%ecx),%ecx
272 je .L010sqrlast
273 movl %edx,%ebx
274 shrl $1,%edx
275 andl $1,%ebx
276.align 16
277.L011sqradd:
278 movl (%esi,%ecx,4),%eax
279 movl %edx,%ebp
280 mull %edi
281 addl %ebp,%eax
282 leal (%eax,%eax,1),%ebp
283 adcl $0,%edx
284 shrl $31,%eax
285 addl 32(%esp,%ecx,4),%ebp
286 leal 1(%ecx),%ecx
287 adcl $0,%eax
288 addl %ebx,%ebp
289 adcl $0,%eax
290 cmpl (%esp),%ecx
291 movl %ebp,28(%esp,%ecx,4)
292 movl %eax,%ebx
293 jle .L011sqradd
294 movl %edx,%ebp
295 addl %edx,%edx
296 shrl $31,%ebp
297 addl %ebx,%edx
298 adcl $0,%ebp
299.L010sqrlast:
300 movl 20(%esp),%edi
301 movl 16(%esp),%esi
302 imull 32(%esp),%edi
303 addl 32(%esp,%ecx,4),%edx
304 movl (%esi),%eax
305 adcl $0,%ebp
306 movl %edx,32(%esp,%ecx,4)
307 movl %ebp,36(%esp,%ecx,4)
308 mull %edi
309 addl 32(%esp),%eax
310 leal -1(%ecx),%ebx
311 adcl $0,%edx
312 movl $1,%ecx
313 movl 4(%esi),%eax
314 jmp .L0093rdmadd
315.align 16
316.L007common_tail:
317 movl 16(%esp),%ebp
318 movl 4(%esp),%edi
319 leal 32(%esp),%esi
320 movl (%esi),%eax
321 movl %ebx,%ecx
322 xorl %edx,%edx
323.align 16
324.L012sub:
325 sbbl (%ebp,%edx,4),%eax
326 movl %eax,(%edi,%edx,4)
327 decl %ecx
328 movl 4(%esi,%edx,4),%eax
329 leal 1(%edx),%edx
330 jge .L012sub
331 sbbl $0,%eax
332 movl $-1,%edx
333 xorl %eax,%edx
334 jmp .L013copy
335.align 16
336.L013copy:
337 movl 32(%esp,%ebx,4),%esi
338 movl (%edi,%ebx,4),%ebp
339 movl %ecx,32(%esp,%ebx,4)
340 andl %eax,%esi
341 andl %edx,%ebp
342 orl %esi,%ebp
343 movl %ebp,(%edi,%ebx,4)
344 decl %ebx
345 jge .L013copy
346 movl 24(%esp),%esp
347 movl $1,%eax
348.L000just_leave:
349 popl %edi
350 popl %esi
351 popl %ebx
352 popl %ebp
353 ret
354.size bn_mul_mont,.-.L_bn_mul_mont_begin
355.byte 77,111,110,116,103,111,109,101,114,121,32,77,117,108,116,105
356.byte 112,108,105,99,97,116,105,111,110,32,102,111,114,32,120,56
357.byte 54,44,32,67,82,89,80,84,79,71,65,77,83,32,98,121
358.byte 32,60,97,112,112,114,111,64,111,112,101,110,115,115,108,46
359.byte 111,114,103,62,0
360
361 .section ".note.gnu.property", "a"
362 .p2align 2
363 .long 1f - 0f
364 .long 4f - 1f
365 .long 5
3660:
367 .asciz "GNU"
3681:
369 .p2align 2
370 .long 0xc0000002
371 .long 3f - 2f
3722:
373 .long 3
3743:
375 .p2align 2
3764:
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette