VirtualBox

source: vbox/trunk/src/libs/openssl-3.1.4/crypto/genasm-macosx/x86-mont.S@ 103582

最後變更 在這個檔案從103582是 97372,由 vboxsync 提交於 2 年 前

libs: Switch to openssl-3.0.7, bugref:10317

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

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