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.globl	_gcm_gmult_ssse3
10.private_extern	_gcm_gmult_ssse3
11.align	4
12_gcm_gmult_ssse3:
13L_gcm_gmult_ssse3_begin:
14	pushl	%ebp
15	pushl	%ebx
16	pushl	%esi
17	pushl	%edi
18	movl	20(%esp),%edi
19	movl	24(%esp),%esi
20	movdqu	(%edi),%xmm0
21	call	L000pic_point
22L000pic_point:
23	popl	%eax
24	movdqa	Lreverse_bytes-L000pic_point(%eax),%xmm7
25	movdqa	Llow4_mask-L000pic_point(%eax),%xmm2
26.byte	102,15,56,0,199
27	movdqa	%xmm2,%xmm1
28	pandn	%xmm0,%xmm1
29	psrld	$4,%xmm1
30	pand	%xmm2,%xmm0
31	pxor	%xmm2,%xmm2
32	pxor	%xmm3,%xmm3
33	movl	$5,%eax
34L001loop_row_1:
35	movdqa	(%esi),%xmm4
36	leal	16(%esi),%esi
37	movdqa	%xmm2,%xmm6
38.byte	102,15,58,15,243,1
39	movdqa	%xmm6,%xmm3
40	psrldq	$1,%xmm2
41	movdqa	%xmm4,%xmm5
42.byte	102,15,56,0,224
43.byte	102,15,56,0,233
44	pxor	%xmm5,%xmm2
45	movdqa	%xmm4,%xmm5
46	psllq	$60,%xmm5
47	movdqa	%xmm5,%xmm6
48	pslldq	$8,%xmm6
49	pxor	%xmm6,%xmm3
50	psrldq	$8,%xmm5
51	pxor	%xmm5,%xmm2
52	psrlq	$4,%xmm4
53	pxor	%xmm4,%xmm2
54	subl	$1,%eax
55	jnz	L001loop_row_1
56	pxor	%xmm3,%xmm2
57	psrlq	$1,%xmm3
58	pxor	%xmm3,%xmm2
59	psrlq	$1,%xmm3
60	pxor	%xmm3,%xmm2
61	psrlq	$5,%xmm3
62	pxor	%xmm3,%xmm2
63	pxor	%xmm3,%xmm3
64	movl	$5,%eax
65L002loop_row_2:
66	movdqa	(%esi),%xmm4
67	leal	16(%esi),%esi
68	movdqa	%xmm2,%xmm6
69.byte	102,15,58,15,243,1
70	movdqa	%xmm6,%xmm3
71	psrldq	$1,%xmm2
72	movdqa	%xmm4,%xmm5
73.byte	102,15,56,0,224
74.byte	102,15,56,0,233
75	pxor	%xmm5,%xmm2
76	movdqa	%xmm4,%xmm5
77	psllq	$60,%xmm5
78	movdqa	%xmm5,%xmm6
79	pslldq	$8,%xmm6
80	pxor	%xmm6,%xmm3
81	psrldq	$8,%xmm5
82	pxor	%xmm5,%xmm2
83	psrlq	$4,%xmm4
84	pxor	%xmm4,%xmm2
85	subl	$1,%eax
86	jnz	L002loop_row_2
87	pxor	%xmm3,%xmm2
88	psrlq	$1,%xmm3
89	pxor	%xmm3,%xmm2
90	psrlq	$1,%xmm3
91	pxor	%xmm3,%xmm2
92	psrlq	$5,%xmm3
93	pxor	%xmm3,%xmm2
94	pxor	%xmm3,%xmm3
95	movl	$6,%eax
96L003loop_row_3:
97	movdqa	(%esi),%xmm4
98	leal	16(%esi),%esi
99	movdqa	%xmm2,%xmm6
100.byte	102,15,58,15,243,1
101	movdqa	%xmm6,%xmm3
102	psrldq	$1,%xmm2
103	movdqa	%xmm4,%xmm5
104.byte	102,15,56,0,224
105.byte	102,15,56,0,233
106	pxor	%xmm5,%xmm2
107	movdqa	%xmm4,%xmm5
108	psllq	$60,%xmm5
109	movdqa	%xmm5,%xmm6
110	pslldq	$8,%xmm6
111	pxor	%xmm6,%xmm3
112	psrldq	$8,%xmm5
113	pxor	%xmm5,%xmm2
114	psrlq	$4,%xmm4
115	pxor	%xmm4,%xmm2
116	subl	$1,%eax
117	jnz	L003loop_row_3
118	pxor	%xmm3,%xmm2
119	psrlq	$1,%xmm3
120	pxor	%xmm3,%xmm2
121	psrlq	$1,%xmm3
122	pxor	%xmm3,%xmm2
123	psrlq	$5,%xmm3
124	pxor	%xmm3,%xmm2
125	pxor	%xmm3,%xmm3
126.byte	102,15,56,0,215
127	movdqu	%xmm2,(%edi)
128	pxor	%xmm0,%xmm0
129	pxor	%xmm1,%xmm1
130	pxor	%xmm2,%xmm2
131	pxor	%xmm3,%xmm3
132	pxor	%xmm4,%xmm4
133	pxor	%xmm5,%xmm5
134	pxor	%xmm6,%xmm6
135	popl	%edi
136	popl	%esi
137	popl	%ebx
138	popl	%ebp
139	ret
140.globl	_gcm_ghash_ssse3
141.private_extern	_gcm_ghash_ssse3
142.align	4
143_gcm_ghash_ssse3:
144L_gcm_ghash_ssse3_begin:
145	pushl	%ebp
146	pushl	%ebx
147	pushl	%esi
148	pushl	%edi
149	movl	20(%esp),%edi
150	movl	24(%esp),%esi
151	movl	28(%esp),%edx
152	movl	32(%esp),%ecx
153	movdqu	(%edi),%xmm0
154	call	L004pic_point
155L004pic_point:
156	popl	%ebx
157	movdqa	Lreverse_bytes-L004pic_point(%ebx),%xmm7
158	andl	$-16,%ecx
159.byte	102,15,56,0,199
160	pxor	%xmm3,%xmm3
161L005loop_ghash:
162	movdqa	Llow4_mask-L004pic_point(%ebx),%xmm2
163	movdqu	(%edx),%xmm1
164.byte	102,15,56,0,207
165	pxor	%xmm1,%xmm0
166	movdqa	%xmm2,%xmm1
167	pandn	%xmm0,%xmm1
168	psrld	$4,%xmm1
169	pand	%xmm2,%xmm0
170	pxor	%xmm2,%xmm2
171	movl	$5,%eax
172L006loop_row_4:
173	movdqa	(%esi),%xmm4
174	leal	16(%esi),%esi
175	movdqa	%xmm2,%xmm6
176.byte	102,15,58,15,243,1
177	movdqa	%xmm6,%xmm3
178	psrldq	$1,%xmm2
179	movdqa	%xmm4,%xmm5
180.byte	102,15,56,0,224
181.byte	102,15,56,0,233
182	pxor	%xmm5,%xmm2
183	movdqa	%xmm4,%xmm5
184	psllq	$60,%xmm5
185	movdqa	%xmm5,%xmm6
186	pslldq	$8,%xmm6
187	pxor	%xmm6,%xmm3
188	psrldq	$8,%xmm5
189	pxor	%xmm5,%xmm2
190	psrlq	$4,%xmm4
191	pxor	%xmm4,%xmm2
192	subl	$1,%eax
193	jnz	L006loop_row_4
194	pxor	%xmm3,%xmm2
195	psrlq	$1,%xmm3
196	pxor	%xmm3,%xmm2
197	psrlq	$1,%xmm3
198	pxor	%xmm3,%xmm2
199	psrlq	$5,%xmm3
200	pxor	%xmm3,%xmm2
201	pxor	%xmm3,%xmm3
202	movl	$5,%eax
203L007loop_row_5:
204	movdqa	(%esi),%xmm4
205	leal	16(%esi),%esi
206	movdqa	%xmm2,%xmm6
207.byte	102,15,58,15,243,1
208	movdqa	%xmm6,%xmm3
209	psrldq	$1,%xmm2
210	movdqa	%xmm4,%xmm5
211.byte	102,15,56,0,224
212.byte	102,15,56,0,233
213	pxor	%xmm5,%xmm2
214	movdqa	%xmm4,%xmm5
215	psllq	$60,%xmm5
216	movdqa	%xmm5,%xmm6
217	pslldq	$8,%xmm6
218	pxor	%xmm6,%xmm3
219	psrldq	$8,%xmm5
220	pxor	%xmm5,%xmm2
221	psrlq	$4,%xmm4
222	pxor	%xmm4,%xmm2
223	subl	$1,%eax
224	jnz	L007loop_row_5
225	pxor	%xmm3,%xmm2
226	psrlq	$1,%xmm3
227	pxor	%xmm3,%xmm2
228	psrlq	$1,%xmm3
229	pxor	%xmm3,%xmm2
230	psrlq	$5,%xmm3
231	pxor	%xmm3,%xmm2
232	pxor	%xmm3,%xmm3
233	movl	$6,%eax
234L008loop_row_6:
235	movdqa	(%esi),%xmm4
236	leal	16(%esi),%esi
237	movdqa	%xmm2,%xmm6
238.byte	102,15,58,15,243,1
239	movdqa	%xmm6,%xmm3
240	psrldq	$1,%xmm2
241	movdqa	%xmm4,%xmm5
242.byte	102,15,56,0,224
243.byte	102,15,56,0,233
244	pxor	%xmm5,%xmm2
245	movdqa	%xmm4,%xmm5
246	psllq	$60,%xmm5
247	movdqa	%xmm5,%xmm6
248	pslldq	$8,%xmm6
249	pxor	%xmm6,%xmm3
250	psrldq	$8,%xmm5
251	pxor	%xmm5,%xmm2
252	psrlq	$4,%xmm4
253	pxor	%xmm4,%xmm2
254	subl	$1,%eax
255	jnz	L008loop_row_6
256	pxor	%xmm3,%xmm2
257	psrlq	$1,%xmm3
258	pxor	%xmm3,%xmm2
259	psrlq	$1,%xmm3
260	pxor	%xmm3,%xmm2
261	psrlq	$5,%xmm3
262	pxor	%xmm3,%xmm2
263	pxor	%xmm3,%xmm3
264	movdqa	%xmm2,%xmm0
265	leal	-256(%esi),%esi
266	leal	16(%edx),%edx
267	subl	$16,%ecx
268	jnz	L005loop_ghash
269.byte	102,15,56,0,199
270	movdqu	%xmm0,(%edi)
271	pxor	%xmm0,%xmm0
272	pxor	%xmm1,%xmm1
273	pxor	%xmm2,%xmm2
274	pxor	%xmm3,%xmm3
275	pxor	%xmm4,%xmm4
276	pxor	%xmm5,%xmm5
277	pxor	%xmm6,%xmm6
278	popl	%edi
279	popl	%esi
280	popl	%ebx
281	popl	%ebp
282	ret
283.align	4,0x90
284Lreverse_bytes:
285.byte	15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0
286.align	4,0x90
287Llow4_mask:
288.long	252645135,252645135,252645135,252645135
289#endif
290