1 | .text
|
---|
2 | .align 64
|
---|
3 | .globl poly1305_init
|
---|
4 | .type poly1305_init,@function
|
---|
5 | .align 16
|
---|
6 | poly1305_init:
|
---|
7 | .L_poly1305_init_begin:
|
---|
8 | #ifdef __CET__
|
---|
9 |
|
---|
10 | .byte 243,15,30,251
|
---|
11 | #endif
|
---|
12 |
|
---|
13 | pushl %ebp
|
---|
14 | pushl %ebx
|
---|
15 | pushl %esi
|
---|
16 | pushl %edi
|
---|
17 | movl 20(%esp),%edi
|
---|
18 | movl 24(%esp),%esi
|
---|
19 | movl 28(%esp),%ebp
|
---|
20 | xorl %eax,%eax
|
---|
21 | movl %eax,(%edi)
|
---|
22 | movl %eax,4(%edi)
|
---|
23 | movl %eax,8(%edi)
|
---|
24 | movl %eax,12(%edi)
|
---|
25 | movl %eax,16(%edi)
|
---|
26 | movl %eax,20(%edi)
|
---|
27 | cmpl $0,%esi
|
---|
28 | je .L000nokey
|
---|
29 | movl (%esi),%eax
|
---|
30 | movl 4(%esi),%ebx
|
---|
31 | movl 8(%esi),%ecx
|
---|
32 | movl 12(%esi),%edx
|
---|
33 | andl $268435455,%eax
|
---|
34 | andl $268435452,%ebx
|
---|
35 | andl $268435452,%ecx
|
---|
36 | andl $268435452,%edx
|
---|
37 | movl %eax,24(%edi)
|
---|
38 | movl %ebx,28(%edi)
|
---|
39 | movl %ecx,32(%edi)
|
---|
40 | movl %edx,36(%edi)
|
---|
41 | movl $0,%eax
|
---|
42 | .L000nokey:
|
---|
43 | popl %edi
|
---|
44 | popl %esi
|
---|
45 | popl %ebx
|
---|
46 | popl %ebp
|
---|
47 | ret
|
---|
48 | .size poly1305_init,.-.L_poly1305_init_begin
|
---|
49 | .globl poly1305_blocks
|
---|
50 | .type poly1305_blocks,@function
|
---|
51 | .align 16
|
---|
52 | poly1305_blocks:
|
---|
53 | .L_poly1305_blocks_begin:
|
---|
54 | #ifdef __CET__
|
---|
55 |
|
---|
56 | .byte 243,15,30,251
|
---|
57 | #endif
|
---|
58 |
|
---|
59 | pushl %ebp
|
---|
60 | pushl %ebx
|
---|
61 | pushl %esi
|
---|
62 | pushl %edi
|
---|
63 | movl 20(%esp),%edi
|
---|
64 | movl 24(%esp),%esi
|
---|
65 | movl 28(%esp),%ecx
|
---|
66 | .L001enter_blocks:
|
---|
67 | andl $-15,%ecx
|
---|
68 | jz .L002nodata
|
---|
69 | subl $64,%esp
|
---|
70 | movl 24(%edi),%eax
|
---|
71 | movl 28(%edi),%ebx
|
---|
72 | leal (%esi,%ecx,1),%ebp
|
---|
73 | movl 32(%edi),%ecx
|
---|
74 | movl 36(%edi),%edx
|
---|
75 | movl %ebp,92(%esp)
|
---|
76 | movl %esi,%ebp
|
---|
77 | movl %eax,36(%esp)
|
---|
78 | movl %ebx,%eax
|
---|
79 | shrl $2,%eax
|
---|
80 | movl %ebx,40(%esp)
|
---|
81 | addl %ebx,%eax
|
---|
82 | movl %ecx,%ebx
|
---|
83 | shrl $2,%ebx
|
---|
84 | movl %ecx,44(%esp)
|
---|
85 | addl %ecx,%ebx
|
---|
86 | movl %edx,%ecx
|
---|
87 | shrl $2,%ecx
|
---|
88 | movl %edx,48(%esp)
|
---|
89 | addl %edx,%ecx
|
---|
90 | movl %eax,52(%esp)
|
---|
91 | movl %ebx,56(%esp)
|
---|
92 | movl %ecx,60(%esp)
|
---|
93 | movl (%edi),%eax
|
---|
94 | movl 4(%edi),%ebx
|
---|
95 | movl 8(%edi),%ecx
|
---|
96 | movl 12(%edi),%esi
|
---|
97 | movl 16(%edi),%edi
|
---|
98 | jmp .L003loop
|
---|
99 | .align 32
|
---|
100 | .L003loop:
|
---|
101 | addl (%ebp),%eax
|
---|
102 | adcl 4(%ebp),%ebx
|
---|
103 | adcl 8(%ebp),%ecx
|
---|
104 | adcl 12(%ebp),%esi
|
---|
105 | leal 16(%ebp),%ebp
|
---|
106 | adcl 96(%esp),%edi
|
---|
107 | movl %eax,(%esp)
|
---|
108 | movl %esi,12(%esp)
|
---|
109 | mull 36(%esp)
|
---|
110 | movl %edi,16(%esp)
|
---|
111 | movl %eax,%edi
|
---|
112 | movl %ebx,%eax
|
---|
113 | movl %edx,%esi
|
---|
114 | mull 60(%esp)
|
---|
115 | addl %eax,%edi
|
---|
116 | movl %ecx,%eax
|
---|
117 | adcl %edx,%esi
|
---|
118 | mull 56(%esp)
|
---|
119 | addl %eax,%edi
|
---|
120 | movl 12(%esp),%eax
|
---|
121 | adcl %edx,%esi
|
---|
122 | mull 52(%esp)
|
---|
123 | addl %eax,%edi
|
---|
124 | movl (%esp),%eax
|
---|
125 | adcl %edx,%esi
|
---|
126 | mull 40(%esp)
|
---|
127 | movl %edi,20(%esp)
|
---|
128 | xorl %edi,%edi
|
---|
129 | addl %eax,%esi
|
---|
130 | movl %ebx,%eax
|
---|
131 | adcl %edx,%edi
|
---|
132 | mull 36(%esp)
|
---|
133 | addl %eax,%esi
|
---|
134 | movl %ecx,%eax
|
---|
135 | adcl %edx,%edi
|
---|
136 | mull 60(%esp)
|
---|
137 | addl %eax,%esi
|
---|
138 | movl 12(%esp),%eax
|
---|
139 | adcl %edx,%edi
|
---|
140 | mull 56(%esp)
|
---|
141 | addl %eax,%esi
|
---|
142 | movl 16(%esp),%eax
|
---|
143 | adcl %edx,%edi
|
---|
144 | imull 52(%esp),%eax
|
---|
145 | addl %eax,%esi
|
---|
146 | movl (%esp),%eax
|
---|
147 | adcl $0,%edi
|
---|
148 | mull 44(%esp)
|
---|
149 | movl %esi,24(%esp)
|
---|
150 | xorl %esi,%esi
|
---|
151 | addl %eax,%edi
|
---|
152 | movl %ebx,%eax
|
---|
153 | adcl %edx,%esi
|
---|
154 | mull 40(%esp)
|
---|
155 | addl %eax,%edi
|
---|
156 | movl %ecx,%eax
|
---|
157 | adcl %edx,%esi
|
---|
158 | mull 36(%esp)
|
---|
159 | addl %eax,%edi
|
---|
160 | movl 12(%esp),%eax
|
---|
161 | adcl %edx,%esi
|
---|
162 | mull 60(%esp)
|
---|
163 | addl %eax,%edi
|
---|
164 | movl 16(%esp),%eax
|
---|
165 | adcl %edx,%esi
|
---|
166 | imull 56(%esp),%eax
|
---|
167 | addl %eax,%edi
|
---|
168 | movl (%esp),%eax
|
---|
169 | adcl $0,%esi
|
---|
170 | mull 48(%esp)
|
---|
171 | movl %edi,28(%esp)
|
---|
172 | xorl %edi,%edi
|
---|
173 | addl %eax,%esi
|
---|
174 | movl %ebx,%eax
|
---|
175 | adcl %edx,%edi
|
---|
176 | mull 44(%esp)
|
---|
177 | addl %eax,%esi
|
---|
178 | movl %ecx,%eax
|
---|
179 | adcl %edx,%edi
|
---|
180 | mull 40(%esp)
|
---|
181 | addl %eax,%esi
|
---|
182 | movl 12(%esp),%eax
|
---|
183 | adcl %edx,%edi
|
---|
184 | mull 36(%esp)
|
---|
185 | addl %eax,%esi
|
---|
186 | movl 16(%esp),%ecx
|
---|
187 | adcl %edx,%edi
|
---|
188 | movl %ecx,%edx
|
---|
189 | imull 60(%esp),%ecx
|
---|
190 | addl %ecx,%esi
|
---|
191 | movl 20(%esp),%eax
|
---|
192 | adcl $0,%edi
|
---|
193 | imull 36(%esp),%edx
|
---|
194 | addl %edi,%edx
|
---|
195 | movl 24(%esp),%ebx
|
---|
196 | movl 28(%esp),%ecx
|
---|
197 | movl %edx,%edi
|
---|
198 | shrl $2,%edx
|
---|
199 | andl $3,%edi
|
---|
200 | leal (%edx,%edx,4),%edx
|
---|
201 | addl %edx,%eax
|
---|
202 | adcl $0,%ebx
|
---|
203 | adcl $0,%ecx
|
---|
204 | adcl $0,%esi
|
---|
205 | adcl $0,%edi
|
---|
206 | cmpl 92(%esp),%ebp
|
---|
207 | jne .L003loop
|
---|
208 | movl 84(%esp),%edx
|
---|
209 | addl $64,%esp
|
---|
210 | movl %eax,(%edx)
|
---|
211 | movl %ebx,4(%edx)
|
---|
212 | movl %ecx,8(%edx)
|
---|
213 | movl %esi,12(%edx)
|
---|
214 | movl %edi,16(%edx)
|
---|
215 | .L002nodata:
|
---|
216 | popl %edi
|
---|
217 | popl %esi
|
---|
218 | popl %ebx
|
---|
219 | popl %ebp
|
---|
220 | ret
|
---|
221 | .size poly1305_blocks,.-.L_poly1305_blocks_begin
|
---|
222 | .globl poly1305_emit
|
---|
223 | .type poly1305_emit,@function
|
---|
224 | .align 16
|
---|
225 | poly1305_emit:
|
---|
226 | .L_poly1305_emit_begin:
|
---|
227 | #ifdef __CET__
|
---|
228 |
|
---|
229 | .byte 243,15,30,251
|
---|
230 | #endif
|
---|
231 |
|
---|
232 | pushl %ebp
|
---|
233 | pushl %ebx
|
---|
234 | pushl %esi
|
---|
235 | pushl %edi
|
---|
236 | movl 20(%esp),%ebp
|
---|
237 | .L004enter_emit:
|
---|
238 | movl 24(%esp),%edi
|
---|
239 | movl (%ebp),%eax
|
---|
240 | movl 4(%ebp),%ebx
|
---|
241 | movl 8(%ebp),%ecx
|
---|
242 | movl 12(%ebp),%edx
|
---|
243 | movl 16(%ebp),%esi
|
---|
244 | addl $5,%eax
|
---|
245 | adcl $0,%ebx
|
---|
246 | adcl $0,%ecx
|
---|
247 | adcl $0,%edx
|
---|
248 | adcl $0,%esi
|
---|
249 | shrl $2,%esi
|
---|
250 | negl %esi
|
---|
251 | andl %esi,%eax
|
---|
252 | andl %esi,%ebx
|
---|
253 | andl %esi,%ecx
|
---|
254 | andl %esi,%edx
|
---|
255 | movl %eax,(%edi)
|
---|
256 | movl %ebx,4(%edi)
|
---|
257 | movl %ecx,8(%edi)
|
---|
258 | movl %edx,12(%edi)
|
---|
259 | notl %esi
|
---|
260 | movl (%ebp),%eax
|
---|
261 | movl 4(%ebp),%ebx
|
---|
262 | movl 8(%ebp),%ecx
|
---|
263 | movl 12(%ebp),%edx
|
---|
264 | movl 28(%esp),%ebp
|
---|
265 | andl %esi,%eax
|
---|
266 | andl %esi,%ebx
|
---|
267 | andl %esi,%ecx
|
---|
268 | andl %esi,%edx
|
---|
269 | orl (%edi),%eax
|
---|
270 | orl 4(%edi),%ebx
|
---|
271 | orl 8(%edi),%ecx
|
---|
272 | orl 12(%edi),%edx
|
---|
273 | addl (%ebp),%eax
|
---|
274 | adcl 4(%ebp),%ebx
|
---|
275 | adcl 8(%ebp),%ecx
|
---|
276 | adcl 12(%ebp),%edx
|
---|
277 | movl %eax,(%edi)
|
---|
278 | movl %ebx,4(%edi)
|
---|
279 | movl %ecx,8(%edi)
|
---|
280 | movl %edx,12(%edi)
|
---|
281 | popl %edi
|
---|
282 | popl %esi
|
---|
283 | popl %ebx
|
---|
284 | popl %ebp
|
---|
285 | ret
|
---|
286 | .size poly1305_emit,.-.L_poly1305_emit_begin
|
---|
287 | .byte 80,111,108,121,49,51,48,53,32,102,111,114,32,120,56,54
|
---|
288 | .byte 44,32,67,82,89,80,84,79,71,65,77,83,32,98,121,32
|
---|
289 | .byte 60,97,112,112,114,111,64,111,112,101,110,115,115,108,46,111
|
---|
290 | .byte 114,103,62,0
|
---|
291 | .align 4
|
---|
292 |
|
---|
293 | .section ".note.gnu.property", "a"
|
---|
294 | .p2align 2
|
---|
295 | .long 1f - 0f
|
---|
296 | .long 4f - 1f
|
---|
297 | .long 5
|
---|
298 | 0:
|
---|
299 | .asciz "GNU"
|
---|
300 | 1:
|
---|
301 | .p2align 2
|
---|
302 | .long 0xc0000002
|
---|
303 | .long 3f - 2f
|
---|
304 | 2:
|
---|
305 | .long 3
|
---|
306 | 3:
|
---|
307 | .p2align 2
|
---|
308 | 4:
|
---|