• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# This file is generated from a similarly-named Perl script in the BoringSSL
2# source tree. Do not edit by hand.
3
4#if defined(__i386__)
5#if defined(BORINGSSL_PREFIX)
6#include <boringssl_prefix_symbols_asm.h>
7#endif
8.text
9.align	64
10.L_vpaes_consts:
11.long	218628480,235210255,168496130,67568393
12.long	252381056,17041926,33884169,51187212
13.long	252645135,252645135,252645135,252645135
14.long	1512730624,3266504856,1377990664,3401244816
15.long	830229760,1275146365,2969422977,3447763452
16.long	3411033600,2979783055,338359620,2782886510
17.long	4209124096,907596821,221174255,1006095553
18.long	191964160,3799684038,3164090317,1589111125
19.long	182528256,1777043520,2877432650,3265356744
20.long	1874708224,3503451415,3305285752,363511674
21.long	1606117888,3487855781,1093350906,2384367825
22.long	197121,67569157,134941193,202313229
23.long	67569157,134941193,202313229,197121
24.long	134941193,202313229,197121,67569157
25.long	202313229,197121,67569157,134941193
26.long	33619971,100992007,168364043,235736079
27.long	235736079,33619971,100992007,168364043
28.long	168364043,235736079,33619971,100992007
29.long	100992007,168364043,235736079,33619971
30.long	50462976,117835012,185207048,252579084
31.long	252314880,51251460,117574920,184942860
32.long	184682752,252054788,50987272,118359308
33.long	118099200,185467140,251790600,50727180
34.long	2946363062,528716217,1300004225,1881839624
35.long	1532713819,1532713819,1532713819,1532713819
36.long	3602276352,4288629033,3737020424,4153884961
37.long	1354558464,32357713,2958822624,3775749553
38.long	1201988352,132424512,1572796698,503232858
39.long	2213177600,1597421020,4103937655,675398315
40.byte	86,101,99,116,111,114,32,80,101,114,109,117,116,97,116,105
41.byte	111,110,32,65,69,83,32,102,111,114,32,120,56,54,47,83
42.byte	83,83,69,51,44,32,77,105,107,101,32,72,97,109,98,117
43.byte	114,103,32,40,83,116,97,110,102,111,114,100,32,85,110,105
44.byte	118,101,114,115,105,116,121,41,0
45.align	64
46.hidden	_vpaes_preheat
47.type	_vpaes_preheat,@function
48.align	16
49_vpaes_preheat:
50	addl	(%esp),%ebp
51	movdqa	-48(%ebp),%xmm7
52	movdqa	-16(%ebp),%xmm6
53	ret
54.size	_vpaes_preheat,.-_vpaes_preheat
55.hidden	_vpaes_encrypt_core
56.type	_vpaes_encrypt_core,@function
57.align	16
58_vpaes_encrypt_core:
59	movl	$16,%ecx
60	movl	240(%edx),%eax
61	movdqa	%xmm6,%xmm1
62	movdqa	(%ebp),%xmm2
63	pandn	%xmm0,%xmm1
64	pand	%xmm6,%xmm0
65	movdqu	(%edx),%xmm5
66.byte	102,15,56,0,208
67	movdqa	16(%ebp),%xmm0
68	pxor	%xmm5,%xmm2
69	psrld	$4,%xmm1
70	addl	$16,%edx
71.byte	102,15,56,0,193
72	leal	192(%ebp),%ebx
73	pxor	%xmm2,%xmm0
74	jmp	.L000enc_entry
75.align	16
76.L001enc_loop:
77	movdqa	32(%ebp),%xmm4
78	movdqa	48(%ebp),%xmm0
79.byte	102,15,56,0,226
80.byte	102,15,56,0,195
81	pxor	%xmm5,%xmm4
82	movdqa	64(%ebp),%xmm5
83	pxor	%xmm4,%xmm0
84	movdqa	-64(%ebx,%ecx,1),%xmm1
85.byte	102,15,56,0,234
86	movdqa	80(%ebp),%xmm2
87	movdqa	(%ebx,%ecx,1),%xmm4
88.byte	102,15,56,0,211
89	movdqa	%xmm0,%xmm3
90	pxor	%xmm5,%xmm2
91.byte	102,15,56,0,193
92	addl	$16,%edx
93	pxor	%xmm2,%xmm0
94.byte	102,15,56,0,220
95	addl	$16,%ecx
96	pxor	%xmm0,%xmm3
97.byte	102,15,56,0,193
98	andl	$48,%ecx
99	subl	$1,%eax
100	pxor	%xmm3,%xmm0
101.L000enc_entry:
102	movdqa	%xmm6,%xmm1
103	movdqa	-32(%ebp),%xmm5
104	pandn	%xmm0,%xmm1
105	psrld	$4,%xmm1
106	pand	%xmm6,%xmm0
107.byte	102,15,56,0,232
108	movdqa	%xmm7,%xmm3
109	pxor	%xmm1,%xmm0
110.byte	102,15,56,0,217
111	movdqa	%xmm7,%xmm4
112	pxor	%xmm5,%xmm3
113.byte	102,15,56,0,224
114	movdqa	%xmm7,%xmm2
115	pxor	%xmm5,%xmm4
116.byte	102,15,56,0,211
117	movdqa	%xmm7,%xmm3
118	pxor	%xmm0,%xmm2
119.byte	102,15,56,0,220
120	movdqu	(%edx),%xmm5
121	pxor	%xmm1,%xmm3
122	jnz	.L001enc_loop
123	movdqa	96(%ebp),%xmm4
124	movdqa	112(%ebp),%xmm0
125.byte	102,15,56,0,226
126	pxor	%xmm5,%xmm4
127.byte	102,15,56,0,195
128	movdqa	64(%ebx,%ecx,1),%xmm1
129	pxor	%xmm4,%xmm0
130.byte	102,15,56,0,193
131	ret
132.size	_vpaes_encrypt_core,.-_vpaes_encrypt_core
133.hidden	_vpaes_schedule_core
134.type	_vpaes_schedule_core,@function
135.align	16
136_vpaes_schedule_core:
137	addl	(%esp),%ebp
138	movdqu	(%esi),%xmm0
139	movdqa	320(%ebp),%xmm2
140	movdqa	%xmm0,%xmm3
141	leal	(%ebp),%ebx
142	movdqa	%xmm2,4(%esp)
143	call	_vpaes_schedule_transform
144	movdqa	%xmm0,%xmm7
145	testl	%edi,%edi
146	jnz	.L002schedule_am_decrypting
147	movdqu	%xmm0,(%edx)
148	jmp	.L003schedule_go
149.L002schedule_am_decrypting:
150	movdqa	256(%ebp,%ecx,1),%xmm1
151.byte	102,15,56,0,217
152	movdqu	%xmm3,(%edx)
153	xorl	$48,%ecx
154.L003schedule_go:
155	cmpl	$192,%eax
156	ja	.L004schedule_256
157.L005schedule_128:
158	movl	$10,%eax
159.L006loop_schedule_128:
160	call	_vpaes_schedule_round
161	decl	%eax
162	jz	.L007schedule_mangle_last
163	call	_vpaes_schedule_mangle
164	jmp	.L006loop_schedule_128
165.align	16
166.L004schedule_256:
167	movdqu	16(%esi),%xmm0
168	call	_vpaes_schedule_transform
169	movl	$7,%eax
170.L008loop_schedule_256:
171	call	_vpaes_schedule_mangle
172	movdqa	%xmm0,%xmm6
173	call	_vpaes_schedule_round
174	decl	%eax
175	jz	.L007schedule_mangle_last
176	call	_vpaes_schedule_mangle
177	pshufd	$255,%xmm0,%xmm0
178	movdqa	%xmm7,20(%esp)
179	movdqa	%xmm6,%xmm7
180	call	.L_vpaes_schedule_low_round
181	movdqa	20(%esp),%xmm7
182	jmp	.L008loop_schedule_256
183.align	16
184.L007schedule_mangle_last:
185	leal	384(%ebp),%ebx
186	testl	%edi,%edi
187	jnz	.L009schedule_mangle_last_dec
188	movdqa	256(%ebp,%ecx,1),%xmm1
189.byte	102,15,56,0,193
190	leal	352(%ebp),%ebx
191	addl	$32,%edx
192.L009schedule_mangle_last_dec:
193	addl	$-16,%edx
194	pxor	336(%ebp),%xmm0
195	call	_vpaes_schedule_transform
196	movdqu	%xmm0,(%edx)
197	pxor	%xmm0,%xmm0
198	pxor	%xmm1,%xmm1
199	pxor	%xmm2,%xmm2
200	pxor	%xmm3,%xmm3
201	pxor	%xmm4,%xmm4
202	pxor	%xmm5,%xmm5
203	pxor	%xmm6,%xmm6
204	pxor	%xmm7,%xmm7
205	ret
206.size	_vpaes_schedule_core,.-_vpaes_schedule_core
207.hidden	_vpaes_schedule_round
208.type	_vpaes_schedule_round,@function
209.align	16
210_vpaes_schedule_round:
211	movdqa	8(%esp),%xmm2
212	pxor	%xmm1,%xmm1
213.byte	102,15,58,15,202,15
214.byte	102,15,58,15,210,15
215	pxor	%xmm1,%xmm7
216	pshufd	$255,%xmm0,%xmm0
217.byte	102,15,58,15,192,1
218	movdqa	%xmm2,8(%esp)
219.L_vpaes_schedule_low_round:
220	movdqa	%xmm7,%xmm1
221	pslldq	$4,%xmm7
222	pxor	%xmm1,%xmm7
223	movdqa	%xmm7,%xmm1
224	pslldq	$8,%xmm7
225	pxor	%xmm1,%xmm7
226	pxor	336(%ebp),%xmm7
227	movdqa	-16(%ebp),%xmm4
228	movdqa	-48(%ebp),%xmm5
229	movdqa	%xmm4,%xmm1
230	pandn	%xmm0,%xmm1
231	psrld	$4,%xmm1
232	pand	%xmm4,%xmm0
233	movdqa	-32(%ebp),%xmm2
234.byte	102,15,56,0,208
235	pxor	%xmm1,%xmm0
236	movdqa	%xmm5,%xmm3
237.byte	102,15,56,0,217
238	pxor	%xmm2,%xmm3
239	movdqa	%xmm5,%xmm4
240.byte	102,15,56,0,224
241	pxor	%xmm2,%xmm4
242	movdqa	%xmm5,%xmm2
243.byte	102,15,56,0,211
244	pxor	%xmm0,%xmm2
245	movdqa	%xmm5,%xmm3
246.byte	102,15,56,0,220
247	pxor	%xmm1,%xmm3
248	movdqa	32(%ebp),%xmm4
249.byte	102,15,56,0,226
250	movdqa	48(%ebp),%xmm0
251.byte	102,15,56,0,195
252	pxor	%xmm4,%xmm0
253	pxor	%xmm7,%xmm0
254	movdqa	%xmm0,%xmm7
255	ret
256.size	_vpaes_schedule_round,.-_vpaes_schedule_round
257.hidden	_vpaes_schedule_transform
258.type	_vpaes_schedule_transform,@function
259.align	16
260_vpaes_schedule_transform:
261	movdqa	-16(%ebp),%xmm2
262	movdqa	%xmm2,%xmm1
263	pandn	%xmm0,%xmm1
264	psrld	$4,%xmm1
265	pand	%xmm2,%xmm0
266	movdqa	(%ebx),%xmm2
267.byte	102,15,56,0,208
268	movdqa	16(%ebx),%xmm0
269.byte	102,15,56,0,193
270	pxor	%xmm2,%xmm0
271	ret
272.size	_vpaes_schedule_transform,.-_vpaes_schedule_transform
273.hidden	_vpaes_schedule_mangle
274.type	_vpaes_schedule_mangle,@function
275.align	16
276_vpaes_schedule_mangle:
277	movdqa	%xmm0,%xmm4
278	movdqa	128(%ebp),%xmm5
279	testl	%edi,%edi
280	jnz	.L010schedule_mangle_dec
281	addl	$16,%edx
282	pxor	336(%ebp),%xmm4
283.byte	102,15,56,0,229
284	movdqa	%xmm4,%xmm3
285.byte	102,15,56,0,229
286	pxor	%xmm4,%xmm3
287.byte	102,15,56,0,229
288	pxor	%xmm4,%xmm3
289	jmp	.L011schedule_mangle_both
290.align	16
291.L010schedule_mangle_dec:
292	movdqa	-16(%ebp),%xmm2
293	leal	(%ebp),%esi
294	movdqa	%xmm2,%xmm1
295	pandn	%xmm4,%xmm1
296	psrld	$4,%xmm1
297	pand	%xmm2,%xmm4
298	movdqa	(%esi),%xmm2
299.byte	102,15,56,0,212
300	movdqa	16(%esi),%xmm3
301.byte	102,15,56,0,217
302	pxor	%xmm2,%xmm3
303.byte	102,15,56,0,221
304	movdqa	32(%esi),%xmm2
305.byte	102,15,56,0,212
306	pxor	%xmm3,%xmm2
307	movdqa	48(%esi),%xmm3
308.byte	102,15,56,0,217
309	pxor	%xmm2,%xmm3
310.byte	102,15,56,0,221
311	movdqa	64(%esi),%xmm2
312.byte	102,15,56,0,212
313	pxor	%xmm3,%xmm2
314	movdqa	80(%esi),%xmm3
315.byte	102,15,56,0,217
316	pxor	%xmm2,%xmm3
317.byte	102,15,56,0,221
318	movdqa	96(%esi),%xmm2
319.byte	102,15,56,0,212
320	pxor	%xmm3,%xmm2
321	movdqa	112(%esi),%xmm3
322.byte	102,15,56,0,217
323	pxor	%xmm2,%xmm3
324	addl	$-16,%edx
325.L011schedule_mangle_both:
326	movdqa	256(%ebp,%ecx,1),%xmm1
327.byte	102,15,56,0,217
328	addl	$-16,%ecx
329	andl	$48,%ecx
330	movdqu	%xmm3,(%edx)
331	ret
332.size	_vpaes_schedule_mangle,.-_vpaes_schedule_mangle
333.globl	GFp_vpaes_set_encrypt_key
334.hidden	GFp_vpaes_set_encrypt_key
335.type	GFp_vpaes_set_encrypt_key,@function
336.align	16
337GFp_vpaes_set_encrypt_key:
338.L_GFp_vpaes_set_encrypt_key_begin:
339	pushl	%ebp
340	pushl	%ebx
341	pushl	%esi
342	pushl	%edi
343	movl	20(%esp),%esi
344	leal	-56(%esp),%ebx
345	movl	24(%esp),%eax
346	andl	$-16,%ebx
347	movl	28(%esp),%edx
348	xchgl	%esp,%ebx
349	movl	%ebx,48(%esp)
350	movl	%eax,%ebx
351	shrl	$5,%ebx
352	addl	$5,%ebx
353	movl	%ebx,240(%edx)
354	movl	$48,%ecx
355	movl	$0,%edi
356	leal	.L_vpaes_consts+0x30-.L012pic_point,%ebp
357	call	_vpaes_schedule_core
358.L012pic_point:
359	movl	48(%esp),%esp
360	xorl	%eax,%eax
361	popl	%edi
362	popl	%esi
363	popl	%ebx
364	popl	%ebp
365	ret
366.size	GFp_vpaes_set_encrypt_key,.-.L_GFp_vpaes_set_encrypt_key_begin
367.globl	GFp_vpaes_encrypt
368.hidden	GFp_vpaes_encrypt
369.type	GFp_vpaes_encrypt,@function
370.align	16
371GFp_vpaes_encrypt:
372.L_GFp_vpaes_encrypt_begin:
373	pushl	%ebp
374	pushl	%ebx
375	pushl	%esi
376	pushl	%edi
377	leal	.L_vpaes_consts+0x30-.L013pic_point,%ebp
378	call	_vpaes_preheat
379.L013pic_point:
380	movl	20(%esp),%esi
381	leal	-56(%esp),%ebx
382	movl	24(%esp),%edi
383	andl	$-16,%ebx
384	movl	28(%esp),%edx
385	xchgl	%esp,%ebx
386	movl	%ebx,48(%esp)
387	movdqu	(%esi),%xmm0
388	call	_vpaes_encrypt_core
389	movdqu	%xmm0,(%edi)
390	movl	48(%esp),%esp
391	popl	%edi
392	popl	%esi
393	popl	%ebx
394	popl	%ebp
395	ret
396.size	GFp_vpaes_encrypt,.-.L_GFp_vpaes_encrypt_begin
397#endif
398.section	.note.GNU-stack,"",@progbits
399