VirtualBox

source: vbox/trunk/src/libs/openssl-1.1.1f/crypto/genasm-elf/x86-mont.S@ 83531

Last change on this file since 83531 was 83531, checked in by vboxsync, 5 years ago

setting svn:sync-process=export for openssl-1.1.1f, all files except tests

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