Fix missing dependencies and ensure correct CPPFLAGS.
[glibc.git] / sysdeps / x86_64 / memset.S
blobf6eb71fc7e65949165f51e2e3ff47f3493cf3f71
1 /* memset/bzero -- set memory area to CH/0
2    Optimized version for x86-64.
3    Copyright (C) 2002-2005, 2007, 2008 Free Software Foundation, Inc.
4    This file is part of the GNU C Library.
6    The GNU C Library is free software; you can redistribute it and/or
7    modify it under the terms of the GNU Lesser General Public
8    License as published by the Free Software Foundation; either
9    version 2.1 of the License, or (at your option) any later version.
11    The GNU C Library is distributed in the hope that it will be useful,
12    but WITHOUT ANY WARRANTY; without even the implied warranty of
13    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14    Lesser General Public License for more details.
16    You should have received a copy of the GNU Lesser General Public
17    License along with the GNU C Library; if not, write to the Free
18    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
19    02111-1307 USA.  */
21 #include <sysdep.h>
23 #define __STOS_LOWER_BOUNDARY   $8192
24 #define __STOS_UPPER_BOUNDARY   $65536
26         .text
27 #if !defined NOT_IN_libc && !defined USE_MULTIARCH
28 ENTRY(__bzero)
29         mov     %rsi,%rdx       /* Adjust parameter.  */
30         xorl    %esi,%esi       /* Fill with 0s.  */
31         jmp     L(memset_entry)
32 END(__bzero)
33 weak_alias (__bzero, bzero)
34 #endif
36 #if defined PIC && !defined NOT_IN_libc
37 ENTRY_CHK (__memset_chk)
38         cmpq    %rdx, %rcx
39         jb      HIDDEN_JUMPTARGET (__chk_fail)
40 END_CHK (__memset_chk)
41 #endif
42 ENTRY (memset)
43 L(memset_entry):
44         cmp    $0x1,%rdx
45         mov    %rdi,%rax        /* memset returns the dest address.  */
46         jne    L(ck2)
47         mov    %sil,(%rdi)
48         retq
49 L(ck2):
50         mov    $0x101010101010101,%r9
51         mov    %rdx,%r8
52         movzbq %sil,%rdx
53         imul   %r9,%rdx
54 L(now_dw_aligned):
55         cmp    $0x90,%r8
56         jg     L(ck_mem_ops_method)
57 L(now_dw_aligned_small):
58         add    %r8,%rdi
59 #ifndef PIC
60         lea    L(setPxQx)(%rip),%r11
61         jmpq   *(%r11,%r8,8)
62 #else
63         lea    L(Got0)(%rip),%r11
64         lea    L(setPxQx)(%rip),%rcx
65         movswq (%rcx,%r8,2),%rcx
66         lea    (%rcx,%r11,1),%r11
67         jmpq   *%r11
68 #endif
70 L(Got0):
71         retq
73         .pushsection .rodata
74         .balign     16
75 #ifndef PIC
76 L(setPxQx):
77         .quad       L(Got0), L(P1Q0), L(P2Q0), L(P3Q0)
78         .quad       L(P4Q0), L(P5Q0), L(P6Q0), L(P7Q0)
79         .quad       L(P0Q1), L(P1Q1), L(P2Q1), L(P3Q1)
80         .quad       L(P4Q1), L(P5Q1), L(P6Q1), L(P7Q1)
81         .quad       L(P0Q2), L(P1Q2), L(P2Q2), L(P3Q2)
82         .quad       L(P4Q2), L(P5Q2), L(P6Q2), L(P7Q2)
83         .quad       L(P0Q3), L(P1Q3), L(P2Q3), L(P3Q3)
84         .quad       L(P4Q3), L(P5Q3), L(P6Q3), L(P7Q3)
85         .quad       L(P0Q4), L(P1Q4), L(P2Q4), L(P3Q4)
86         .quad       L(P4Q4), L(P5Q4), L(P6Q4), L(P7Q4)
87         .quad       L(P0Q5), L(P1Q5), L(P2Q5), L(P3Q5)
88         .quad       L(P4Q5), L(P5Q5), L(P6Q5), L(P7Q5)
89         .quad       L(P0Q6), L(P1Q6), L(P2Q6), L(P3Q6)
90         .quad       L(P4Q6), L(P5Q6), L(P6Q6), L(P7Q6)
91         .quad       L(P0Q7), L(P1Q7), L(P2Q7), L(P3Q7)
92         .quad       L(P4Q7), L(P5Q7), L(P6Q7), L(P7Q7)
93         .quad       L(P0Q8), L(P1Q8), L(P2Q8), L(P3Q8)
94         .quad       L(P4Q8), L(P5Q8), L(P6Q8), L(P7Q8)
95         .quad       L(P0Q9), L(P1Q9), L(P2Q9), L(P3Q9)
96         .quad       L(P4Q9), L(P5Q9), L(P6Q9), L(P7Q9)
97         .quad       L(P0QA), L(P1QA), L(P2QA), L(P3QA)
98         .quad       L(P4QA), L(P5QA), L(P6QA), L(P7QA)
99         .quad       L(P0QB), L(P1QB), L(P2QB), L(P3QB)
100         .quad       L(P4QB), L(P5QB), L(P6QB), L(P7QB)
101         .quad       L(P0QC), L(P1QC), L(P2QC), L(P3QC)
102         .quad       L(P4QC), L(P5QC), L(P6QC), L(P7QC)
103         .quad       L(P0QD), L(P1QD), L(P2QD), L(P3QD)
104         .quad       L(P4QD), L(P5QD), L(P6QD), L(P7QD)
105         .quad       L(P0QE), L(P1QE), L(P2QE), L(P3QE)
106         .quad       L(P4QE), L(P5QE), L(P6QE), L(P7QE)
107         .quad       L(P0QF), L(P1QF), L(P2QF), L(P3QF)
108         .quad       L(P4QF), L(P5QF), L(P6QF), L(P7QF)
109         .quad       L(P0QG), L(P1QG), L(P2QG), L(P3QG)
110         .quad       L(P4QG), L(P5QG), L(P6QG), L(P7QG)
111         .quad       L(P0QH), L(P1QH), L(P2QH), L(P3QH)
112         .quad       L(P4QH), L(P5QH), L(P6QH), L(P7QH)
113         .quad       L(P0QI)
114 # ifdef USE_EXTRA_TABLE
115         .quad       L(P1QI), L(P2QI), L(P3QI), L(P4QI)
116         .quad       L(P5QI), L(P6QI), L(P7QI)
117 # endif
118 #else
119 L(setPxQx):
120         .short     L(Got0)-L(Got0)
121         .short     L(P1Q0)-L(Got0)
122         .short     L(P2Q0)-L(Got0)
123         .short     L(P3Q0)-L(Got0)
124         .short     L(P4Q0)-L(Got0)
125         .short     L(P5Q0)-L(Got0)
126         .short     L(P6Q0)-L(Got0)
127         .short     L(P7Q0)-L(Got0)
129         .short     L(P0Q1)-L(Got0)
130         .short     L(P1Q1)-L(Got0)
131         .short     L(P2Q1)-L(Got0)
132         .short     L(P3Q1)-L(Got0)
133         .short     L(P4Q1)-L(Got0)
134         .short     L(P5Q1)-L(Got0)
135         .short     L(P6Q1)-L(Got0)
136         .short     L(P7Q1)-L(Got0)
138         .short     L(P0Q2)-L(Got0)
139         .short     L(P1Q2)-L(Got0)
140         .short     L(P2Q2)-L(Got0)
141         .short     L(P3Q2)-L(Got0)
142         .short     L(P4Q2)-L(Got0)
143         .short     L(P5Q2)-L(Got0)
144         .short     L(P6Q2)-L(Got0)
145         .short     L(P7Q2)-L(Got0)
147         .short     L(P0Q3)-L(Got0)
148         .short     L(P1Q3)-L(Got0)
149         .short     L(P2Q3)-L(Got0)
150         .short     L(P3Q3)-L(Got0)
151         .short     L(P4Q3)-L(Got0)
152         .short     L(P5Q3)-L(Got0)
153         .short     L(P6Q3)-L(Got0)
154         .short     L(P7Q3)-L(Got0)
156         .short     L(P0Q4)-L(Got0)
157         .short     L(P1Q4)-L(Got0)
158         .short     L(P2Q4)-L(Got0)
159         .short     L(P3Q4)-L(Got0)
160         .short     L(P4Q4)-L(Got0)
161         .short     L(P5Q4)-L(Got0)
162         .short     L(P6Q4)-L(Got0)
163         .short     L(P7Q4)-L(Got0)
165         .short     L(P0Q5)-L(Got0)
166         .short     L(P1Q5)-L(Got0)
167         .short     L(P2Q5)-L(Got0)
168         .short     L(P3Q5)-L(Got0)
169         .short     L(P4Q5)-L(Got0)
170         .short     L(P5Q5)-L(Got0)
171         .short     L(P6Q5)-L(Got0)
172         .short     L(P7Q5)-L(Got0)
174         .short     L(P0Q6)-L(Got0)
175         .short     L(P1Q6)-L(Got0)
176         .short     L(P2Q6)-L(Got0)
177         .short     L(P3Q6)-L(Got0)
178         .short     L(P4Q6)-L(Got0)
179         .short     L(P5Q6)-L(Got0)
180         .short     L(P6Q6)-L(Got0)
181         .short     L(P7Q6)-L(Got0)
183         .short     L(P0Q7)-L(Got0)
184         .short     L(P1Q7)-L(Got0)
185         .short     L(P2Q7)-L(Got0)
186         .short     L(P3Q7)-L(Got0)
187         .short     L(P4Q7)-L(Got0)
188         .short     L(P5Q7)-L(Got0)
189         .short     L(P6Q7)-L(Got0)
190         .short     L(P7Q7)-L(Got0)
192         .short     L(P0Q8)-L(Got0)
193         .short     L(P1Q8)-L(Got0)
194         .short     L(P2Q8)-L(Got0)
195         .short     L(P3Q8)-L(Got0)
196         .short     L(P4Q8)-L(Got0)
197         .short     L(P5Q8)-L(Got0)
198         .short     L(P6Q8)-L(Got0)
199         .short     L(P7Q8)-L(Got0)
201         .short     L(P0Q9)-L(Got0)
202         .short     L(P1Q9)-L(Got0)
203         .short     L(P2Q9)-L(Got0)
204         .short     L(P3Q9)-L(Got0)
205         .short     L(P4Q9)-L(Got0)
206         .short     L(P5Q9)-L(Got0)
207         .short     L(P6Q9)-L(Got0)
208         .short     L(P7Q9)-L(Got0)
210         .short     L(P0QA)-L(Got0)
211         .short     L(P1QA)-L(Got0)
212         .short     L(P2QA)-L(Got0)
213         .short     L(P3QA)-L(Got0)
214         .short     L(P4QA)-L(Got0)
215         .short     L(P5QA)-L(Got0)
216         .short     L(P6QA)-L(Got0)
217         .short     L(P7QA)-L(Got0)
219         .short     L(P0QB)-L(Got0)
220         .short     L(P1QB)-L(Got0)
221         .short     L(P2QB)-L(Got0)
222         .short     L(P3QB)-L(Got0)
223         .short     L(P4QB)-L(Got0)
224         .short     L(P5QB)-L(Got0)
225         .short     L(P6QB)-L(Got0)
226         .short     L(P7QB)-L(Got0)
228         .short     L(P0QC)-L(Got0)
229         .short     L(P1QC)-L(Got0)
230         .short     L(P2QC)-L(Got0)
231         .short     L(P3QC)-L(Got0)
232         .short     L(P4QC)-L(Got0)
233         .short     L(P5QC)-L(Got0)
234         .short     L(P6QC)-L(Got0)
235         .short     L(P7QC)-L(Got0)
237         .short     L(P0QD)-L(Got0)
238         .short     L(P1QD)-L(Got0)
239         .short     L(P2QD)-L(Got0)
240         .short     L(P3QD)-L(Got0)
241         .short     L(P4QD)-L(Got0)
242         .short     L(P5QD)-L(Got0)
243         .short     L(P6QD)-L(Got0)
244         .short     L(P7QD)-L(Got0)
246         .short     L(P0QE)-L(Got0)
247         .short     L(P1QE)-L(Got0)
248         .short     L(P2QE)-L(Got0)
249         .short     L(P3QE)-L(Got0)
250         .short     L(P4QE)-L(Got0)
251         .short     L(P5QE)-L(Got0)
252         .short     L(P6QE)-L(Got0)
253         .short     L(P7QE)-L(Got0)
255         .short     L(P0QF)-L(Got0)
256         .short     L(P1QF)-L(Got0)
257         .short     L(P2QF)-L(Got0)
258         .short     L(P3QF)-L(Got0)
259         .short     L(P4QF)-L(Got0)
260         .short     L(P5QF)-L(Got0)
261         .short     L(P6QF)-L(Got0)
262         .short     L(P7QF)-L(Got0)
264         .short     L(P0QG)-L(Got0)
265         .short     L(P1QG)-L(Got0)
266         .short     L(P2QG)-L(Got0)
267         .short     L(P3QG)-L(Got0)
268         .short     L(P4QG)-L(Got0)
269         .short     L(P5QG)-L(Got0)
270         .short     L(P6QG)-L(Got0)
271         .short     L(P7QG)-L(Got0)
273         .short     L(P0QH)-L(Got0)
274         .short     L(P1QH)-L(Got0)
275         .short     L(P2QH)-L(Got0)
276         .short     L(P3QH)-L(Got0)
277         .short     L(P4QH)-L(Got0)
278         .short     L(P5QH)-L(Got0)
279         .short     L(P6QH)-L(Got0)
280         .short     L(P7QH)-L(Got0)
282         .short     L(P0QI)-L(Got0)
283 # ifdef USE_EXTRA_TABLE
284         .short     L(P1QI)-L(Got0)
285         .short     L(P2QI)-L(Got0)
286         .short     L(P3QI)-L(Got0)
287         .short     L(P4QI)-L(Got0)
288         .short     L(P5QI)-L(Got0)
289         .short     L(P6QI)-L(Got0)
290         .short     L(P7QI)-L(Got0)
291 # endif
292 #endif
293         .popsection
295         .balign     16
296 #ifdef USE_EXTRA_TABLE
297 L(P1QI): mov    %rdx,-0x91(%rdi)
298 #endif
299 L(P1QH): mov    %rdx,-0x89(%rdi)
300 L(P1QG): mov    %rdx,-0x81(%rdi)
301 #                  .balign     16
302 L(P1QF): mov    %rdx,-0x79(%rdi)
303 L(P1QE): mov    %rdx,-0x71(%rdi)
304 L(P1QD): mov    %rdx,-0x69(%rdi)
305 L(P1QC): mov    %rdx,-0x61(%rdi)
306 L(P1QB): mov    %rdx,-0x59(%rdi)
307 L(P1QA): mov    %rdx,-0x51(%rdi)
308 L(P1Q9): mov    %rdx,-0x49(%rdi)
309 L(P1Q8): mov    %rdx,-0x41(%rdi)
310 L(P1Q7): mov    %rdx,-0x39(%rdi)
311 L(P1Q6): mov    %rdx,-0x31(%rdi)
312 L(P1Q5): mov    %rdx,-0x29(%rdi)
313 L(P1Q4): mov    %rdx,-0x21(%rdi)
314 L(P1Q3): mov    %rdx,-0x19(%rdi)
315 L(P1Q2): mov    %rdx,-0x11(%rdi)
316 L(P1Q1): mov    %rdx,-0x9(%rdi)
317 L(P1Q0): mov    %dl,-0x1(%rdi)
318                 retq
320         .balign     16
321 L(P0QI): mov    %rdx,-0x90(%rdi)
322 L(P0QH): mov    %rdx,-0x88(%rdi)
323 #                  .balign     16
324 L(P0QG): mov    %rdx,-0x80(%rdi)
325 L(P0QF): mov    %rdx,-0x78(%rdi)
326 L(P0QE): mov    %rdx,-0x70(%rdi)
327 L(P0QD): mov    %rdx,-0x68(%rdi)
328 L(P0QC): mov    %rdx,-0x60(%rdi)
329 L(P0QB): mov    %rdx,-0x58(%rdi)
330 L(P0QA): mov    %rdx,-0x50(%rdi)
331 L(P0Q9): mov    %rdx,-0x48(%rdi)
332 L(P0Q8): mov    %rdx,-0x40(%rdi)
333 L(P0Q7): mov    %rdx,-0x38(%rdi)
334 L(P0Q6): mov    %rdx,-0x30(%rdi)
335 L(P0Q5): mov    %rdx,-0x28(%rdi)
336 L(P0Q4): mov    %rdx,-0x20(%rdi)
337 L(P0Q3): mov    %rdx,-0x18(%rdi)
338 L(P0Q2): mov    %rdx,-0x10(%rdi)
339 L(P0Q1): mov    %rdx,-0x8(%rdi)
340 L(P0Q0): retq
343         .balign     16
344 #ifdef USE_EXTRA_TABLE
345 L(P2QI): mov    %rdx,-0x92(%rdi)
346 #endif
347 L(P2QH): mov    %rdx,-0x8a(%rdi)
348 L(P2QG): mov    %rdx,-0x82(%rdi)
349 #                  .balign     16
350 L(P2QF): mov    %rdx,-0x7a(%rdi)
351 L(P2QE): mov    %rdx,-0x72(%rdi)
352 L(P2QD): mov    %rdx,-0x6a(%rdi)
353 L(P2QC): mov    %rdx,-0x62(%rdi)
354 L(P2QB): mov    %rdx,-0x5a(%rdi)
355 L(P2QA): mov    %rdx,-0x52(%rdi)
356 L(P2Q9): mov    %rdx,-0x4a(%rdi)
357 L(P2Q8): mov    %rdx,-0x42(%rdi)
358 L(P2Q7): mov    %rdx,-0x3a(%rdi)
359 L(P2Q6): mov    %rdx,-0x32(%rdi)
360 L(P2Q5): mov    %rdx,-0x2a(%rdi)
361 L(P2Q4): mov    %rdx,-0x22(%rdi)
362 L(P2Q3): mov    %rdx,-0x1a(%rdi)
363 L(P2Q2): mov    %rdx,-0x12(%rdi)
364 L(P2Q1): mov    %rdx,-0xa(%rdi)
365 L(P2Q0): mov    %dx,-0x2(%rdi)
366                 retq
368         .balign     16
369 #ifdef USE_EXTRA_TABLE
370 L(P3QI): mov    %rdx,-0x93(%rdi)
371 #endif
372 L(P3QH): mov    %rdx,-0x8b(%rdi)
373 L(P3QG): mov    %rdx,-0x83(%rdi)
374 #                  .balign     16
375 L(P3QF): mov    %rdx,-0x7b(%rdi)
376 L(P3QE): mov    %rdx,-0x73(%rdi)
377 L(P3QD): mov    %rdx,-0x6b(%rdi)
378 L(P3QC): mov    %rdx,-0x63(%rdi)
379 L(P3QB): mov    %rdx,-0x5b(%rdi)
380 L(P3QA): mov    %rdx,-0x53(%rdi)
381 L(P3Q9): mov    %rdx,-0x4b(%rdi)
382 L(P3Q8): mov    %rdx,-0x43(%rdi)
383 L(P3Q7): mov    %rdx,-0x3b(%rdi)
384 L(P3Q6): mov    %rdx,-0x33(%rdi)
385 L(P3Q5): mov    %rdx,-0x2b(%rdi)
386 L(P3Q4): mov    %rdx,-0x23(%rdi)
387 L(P3Q3): mov    %rdx,-0x1b(%rdi)
388 L(P3Q2): mov    %rdx,-0x13(%rdi)
389 L(P3Q1): mov    %rdx,-0xb(%rdi)
390 L(P3Q0): mov    %dx,-0x3(%rdi)
391                 mov    %dl,-0x1(%rdi)
392                 retq
394         .balign     16
395 #ifdef USE_EXTRA_TABLE
396 L(P4QI): mov    %rdx,-0x94(%rdi)
397 #endif
398 L(P4QH): mov    %rdx,-0x8c(%rdi)
399 L(P4QG): mov    %rdx,-0x84(%rdi)
400 #                  .balign     16
401 L(P4QF): mov    %rdx,-0x7c(%rdi)
402 L(P4QE): mov    %rdx,-0x74(%rdi)
403 L(P4QD): mov    %rdx,-0x6c(%rdi)
404 L(P4QC): mov    %rdx,-0x64(%rdi)
405 L(P4QB): mov    %rdx,-0x5c(%rdi)
406 L(P4QA): mov    %rdx,-0x54(%rdi)
407 L(P4Q9): mov    %rdx,-0x4c(%rdi)
408 L(P4Q8): mov    %rdx,-0x44(%rdi)
409 L(P4Q7): mov    %rdx,-0x3c(%rdi)
410 L(P4Q6): mov    %rdx,-0x34(%rdi)
411 L(P4Q5): mov    %rdx,-0x2c(%rdi)
412 L(P4Q4): mov    %rdx,-0x24(%rdi)
413 L(P4Q3): mov    %rdx,-0x1c(%rdi)
414 L(P4Q2): mov    %rdx,-0x14(%rdi)
415 L(P4Q1): mov    %rdx,-0xc(%rdi)
416 L(P4Q0): mov    %edx,-0x4(%rdi)
417                 retq
419         .balign     16
420 #if defined(USE_EXTRA_TABLE)
421 L(P5QI): mov    %rdx,-0x95(%rdi)
422 #endif
423 L(P5QH): mov    %rdx,-0x8d(%rdi)
424 L(P5QG): mov    %rdx,-0x85(%rdi)
425 #                  .balign     16
426 L(P5QF): mov    %rdx,-0x7d(%rdi)
427 L(P5QE): mov    %rdx,-0x75(%rdi)
428 L(P5QD): mov    %rdx,-0x6d(%rdi)
429 L(P5QC): mov    %rdx,-0x65(%rdi)
430 L(P5QB): mov    %rdx,-0x5d(%rdi)
431 L(P5QA): mov    %rdx,-0x55(%rdi)
432 L(P5Q9): mov    %rdx,-0x4d(%rdi)
433 L(P5Q8): mov    %rdx,-0x45(%rdi)
434 L(P5Q7): mov    %rdx,-0x3d(%rdi)
435 L(P5Q6): mov    %rdx,-0x35(%rdi)
436 L(P5Q5): mov    %rdx,-0x2d(%rdi)
437 L(P5Q4): mov    %rdx,-0x25(%rdi)
438 L(P5Q3): mov    %rdx,-0x1d(%rdi)
439 L(P5Q2): mov    %rdx,-0x15(%rdi)
440 L(P5Q1): mov    %rdx,-0xd(%rdi)
441 L(P5Q0): mov    %edx,-0x5(%rdi)
442                 mov    %dl,-0x1(%rdi)
443                 retq
445         .balign     16
446 #ifdef USE_EXTRA_TABLE
447 L(P6QI): mov    %rdx,-0x96(%rdi)
448 #endif
449 L(P6QH): mov    %rdx,-0x8e(%rdi)
450 L(P6QG): mov    %rdx,-0x86(%rdi)
451 #                  .balign     16
452 L(P6QF): mov    %rdx,-0x7e(%rdi)
453 L(P6QE): mov    %rdx,-0x76(%rdi)
454 L(P6QD): mov    %rdx,-0x6e(%rdi)
455 L(P6QC): mov    %rdx,-0x66(%rdi)
456 L(P6QB): mov    %rdx,-0x5e(%rdi)
457 L(P6QA): mov    %rdx,-0x56(%rdi)
458 L(P6Q9): mov    %rdx,-0x4e(%rdi)
459 L(P6Q8): mov    %rdx,-0x46(%rdi)
460 L(P6Q7): mov    %rdx,-0x3e(%rdi)
461 L(P6Q6): mov    %rdx,-0x36(%rdi)
462 L(P6Q5): mov    %rdx,-0x2e(%rdi)
463 L(P6Q4): mov    %rdx,-0x26(%rdi)
464 L(P6Q3): mov    %rdx,-0x1e(%rdi)
465 L(P6Q2): mov    %rdx,-0x16(%rdi)
466 L(P6Q1): mov    %rdx,-0xe(%rdi)
467 L(P6Q0): mov    %edx,-0x6(%rdi)
468                 mov    %dx,-0x2(%rdi)
469                 retq
471         .balign     16
472 #ifdef USE_EXTRA_TABLE
473 L(P7QI): mov    %rdx,-0x97(%rdi)
474 #endif
475 L(P7QH): mov    %rdx,-0x8f(%rdi)
476 L(P7QG): mov    %rdx,-0x87(%rdi)
477 #                  .balign     16
478 L(P7QF): mov    %rdx,-0x7f(%rdi)
479 L(P7QE): mov    %rdx,-0x77(%rdi)
480 L(P7QD): mov    %rdx,-0x6f(%rdi)
481 L(P7QC): mov    %rdx,-0x67(%rdi)
482 L(P7QB): mov    %rdx,-0x5f(%rdi)
483 L(P7QA): mov    %rdx,-0x57(%rdi)
484 L(P7Q9): mov    %rdx,-0x4f(%rdi)
485 L(P7Q8): mov    %rdx,-0x47(%rdi)
486 L(P7Q7): mov    %rdx,-0x3f(%rdi)
487 L(P7Q6): mov    %rdx,-0x37(%rdi)
488 L(P7Q5): mov    %rdx,-0x2f(%rdi)
489 L(P7Q4): mov    %rdx,-0x27(%rdi)
490 L(P7Q3): mov    %rdx,-0x1f(%rdi)
491 L(P7Q2): mov    %rdx,-0x17(%rdi)
492 L(P7Q1): mov    %rdx,-0xf(%rdi)
493 L(P7Q0): mov    %edx,-0x7(%rdi)
494                 mov    %dx,-0x3(%rdi)
495                 mov    %dl,-0x1(%rdi)
496                 retq
498         .balign     16
499 L(ck_mem_ops_method):
501 # align to 16 byte boundary first
502         #test $0xf,%rdi
503         #jz L(aligned_now)
504         mov    $0x10,%r10
505         mov    %rdi,%r9
506         and    $0xf,%r9
507         sub    %r9,%r10
508         and    $0xf,%r10
509         add    %r10,%rdi
510         sub    %r10,%r8
511 #ifndef PIC
512         lea    L(AliPxQx)(%rip),%r11
513         jmpq   *(%r11,%r10,8)
514 #else
515         lea    L(aligned_now)(%rip), %r11
516         lea    L(AliPxQx)(%rip),%rcx
517         movswq (%rcx,%r10,2),%rcx
518         lea    (%rcx,%r11,1),%r11
519         jmpq   *%r11
520 #endif
522         .pushsection .rodata
523         .balign     16
524 #ifndef PIC
525 L(AliPxQx):
526         .quad       L(aligned_now), L(A1Q0), L(A2Q0), L(A3Q0)
527         .quad       L(A4Q0), L(A5Q0), L(A6Q0), L(A7Q0)
528         .quad       L(A0Q1), L(A1Q1), L(A2Q1), L(A3Q1)
529         .quad       L(A4Q1), L(A5Q1), L(A6Q1), L(A7Q1)
530 #else
531 L(AliPxQx):
532         .short     L(aligned_now)-L(aligned_now)
533         .short     L(A1Q0)-L(aligned_now)
534         .short     L(A2Q0)-L(aligned_now)
535         .short     L(A3Q0)-L(aligned_now)
536         .short     L(A4Q0)-L(aligned_now)
537         .short     L(A5Q0)-L(aligned_now)
538         .short     L(A6Q0)-L(aligned_now)
539         .short     L(A7Q0)-L(aligned_now)
541         .short     L(A0Q1)-L(aligned_now)
542         .short     L(A1Q1)-L(aligned_now)
543         .short     L(A2Q1)-L(aligned_now)
544         .short     L(A3Q1)-L(aligned_now)
545         .short     L(A4Q1)-L(aligned_now)
546         .short     L(A5Q1)-L(aligned_now)
547         .short     L(A6Q1)-L(aligned_now)
548         .short     L(A7Q1)-L(aligned_now)
549 #endif
550         .popsection
552         .balign     16
553 L(A5Q1):    mov    %dl,-0xd(%rdi)
554 L(A4Q1):    mov    %edx,-0xc(%rdi)
555 L(A0Q1):    mov    %rdx,-0x8(%rdi)
556 L(A0Q0):    jmp     L(aligned_now)
558         .balign     16
559 L(A1Q1):   mov    %dl,-0x9(%rdi)
560         mov    %rdx,-0x8(%rdi)
561         jmp    L(aligned_now)
563         .balign     16
564 L(A1Q0):   mov    %dl,-0x1(%rdi)
565         jmp    L(aligned_now)
567         .balign     16
568 L(A3Q1):    mov    %dl,-0xb(%rdi)
569 L(A2Q1):    mov    %dx,-0xa(%rdi)
570         mov    %rdx,-0x8(%rdi)
571         jmp    L(aligned_now)
573         .balign     16
574 L(A3Q0):    mov    %dl,-0x3(%rdi)
575 L(A2Q0):    mov    %dx,-0x2(%rdi)
576         jmp    L(aligned_now)
578         .balign     16
579 L(A5Q0):    mov    %dl,-0x5(%rdi)
580 L(A4Q0):    mov    %edx,-0x4(%rdi)
581         jmp    L(aligned_now)
583         .balign     16
584 L(A7Q1):    mov    %dl,-0xf(%rdi)
585 L(A6Q1):    mov    %dx,-0xe(%rdi)
586         mov    %edx,-0xc(%rdi)
587         mov    %rdx,-0x8(%rdi)
588         jmp    L(aligned_now)
590         .balign     16
591 L(A7Q0):    mov    %dl,-0x7(%rdi)
592 L(A6Q0):    mov    %dx,-0x6(%rdi)
593         mov    %edx,-0x4(%rdi)
595 #ifndef USE_MULTIARCH
596         jmp    L(aligned_now)
598 L(SSE_pre):
599 #endif
600 #if !defined USE_MULTIARCH || defined USE_SSE2
601          # fill RegXMM0 with the pattern
602          movd   %rdx,%xmm0
603          punpcklqdq %xmm0,%xmm0
605          cmp    $0xb0,%r8 # 176
606          jge    L(byte32sse2_pre)
608          add    %r8,%rdi
609 #ifndef PIC
610          lea    L(SSExDx)(%rip),%r9
611          jmpq   *(%r9,%r8,8)
612 #else
613          lea    L(SSE0Q0)(%rip),%r9
614          lea    L(SSExDx)(%rip),%rcx
615          movswq (%rcx,%r8,2),%rcx
616          lea    (%rcx,%r9,1),%r9
617          jmpq   *%r9
618 #endif
620 L(SSE0QB):  movdqa %xmm0,-0xb0(%rdi)
621 L(SSE0QA):  movdqa %xmm0,-0xa0(%rdi)
622 L(SSE0Q9):  movdqa %xmm0,-0x90(%rdi)
623 L(SSE0Q8):  movdqa %xmm0,-0x80(%rdi)
624 L(SSE0Q7):  movdqa %xmm0,-0x70(%rdi)
625 L(SSE0Q6):  movdqa %xmm0,-0x60(%rdi)
626 L(SSE0Q5):  movdqa %xmm0,-0x50(%rdi)
627 L(SSE0Q4):  movdqa %xmm0,-0x40(%rdi)
628 L(SSE0Q3):  movdqa %xmm0,-0x30(%rdi)
629 L(SSE0Q2):  movdqa %xmm0,-0x20(%rdi)
630 L(SSE0Q1):  movdqa %xmm0,-0x10(%rdi)
631 L(SSE0Q0):  retq
633 L(SSE1QB):  movdqa %xmm0,-0xb1(%rdi)
634 L(SSE1QA):  movdqa %xmm0,-0xa1(%rdi)
635 L(SSE1Q9):  movdqa %xmm0,-0x91(%rdi)
636 L(SSE1Q8):  movdqa %xmm0,-0x81(%rdi)
637 L(SSE1Q7):  movdqa %xmm0,-0x71(%rdi)
638 L(SSE1Q6):  movdqa %xmm0,-0x61(%rdi)
639 L(SSE1Q5):  movdqa %xmm0,-0x51(%rdi)
640 L(SSE1Q4):  movdqa %xmm0,-0x41(%rdi)
641 L(SSE1Q3):  movdqa %xmm0,-0x31(%rdi)
642 L(SSE1Q2):  movdqa %xmm0,-0x21(%rdi)
643 L(SSE1Q1):  movdqa %xmm0,-0x11(%rdi)
644 L(SSE1Q0):  mov    %dl,-0x1(%rdi)
645         retq
647 L(SSE2QB):  movdqa %xmm0,-0xb2(%rdi)
648 L(SSE2QA):  movdqa %xmm0,-0xa2(%rdi)
649 L(SSE2Q9):  movdqa %xmm0,-0x92(%rdi)
650 L(SSE2Q8):  movdqa %xmm0,-0x82(%rdi)
651 L(SSE2Q7):  movdqa %xmm0,-0x72(%rdi)
652 L(SSE2Q6):  movdqa %xmm0,-0x62(%rdi)
653 L(SSE2Q5):  movdqa %xmm0,-0x52(%rdi)
654 L(SSE2Q4):  movdqa %xmm0,-0x42(%rdi)
655 L(SSE2Q3):  movdqa %xmm0,-0x32(%rdi)
656 L(SSE2Q2):  movdqa %xmm0,-0x22(%rdi)
657 L(SSE2Q1):  movdqa %xmm0,-0x12(%rdi)
658 L(SSE2Q0):  mov    %dx,-0x2(%rdi)
659         retq
661 L(SSE3QB):  movdqa %xmm0,-0xb3(%rdi)
662 L(SSE3QA):  movdqa %xmm0,-0xa3(%rdi)
663 L(SSE3Q9):  movdqa %xmm0,-0x93(%rdi)
664 L(SSE3Q8):  movdqa %xmm0,-0x83(%rdi)
665 L(SSE3Q7):  movdqa %xmm0,-0x73(%rdi)
666 L(SSE3Q6):  movdqa %xmm0,-0x63(%rdi)
667 L(SSE3Q5):  movdqa %xmm0,-0x53(%rdi)
668 L(SSE3Q4):  movdqa %xmm0,-0x43(%rdi)
669 L(SSE3Q3):  movdqa %xmm0,-0x33(%rdi)
670 L(SSE3Q2):  movdqa %xmm0,-0x23(%rdi)
671 L(SSE3Q1):  movdqa %xmm0,-0x13(%rdi)
672 L(SSE3Q0):  mov    %dx,-0x3(%rdi)
673         mov    %dl,-0x1(%rdi)
674         retq
676 L(SSE4QB):  movdqa %xmm0,-0xb4(%rdi)
677 L(SSE4QA):  movdqa %xmm0,-0xa4(%rdi)
678 L(SSE4Q9):  movdqa %xmm0,-0x94(%rdi)
679 L(SSE4Q8):  movdqa %xmm0,-0x84(%rdi)
680 L(SSE4Q7):  movdqa %xmm0,-0x74(%rdi)
681 L(SSE4Q6):  movdqa %xmm0,-0x64(%rdi)
682 L(SSE4Q5):  movdqa %xmm0,-0x54(%rdi)
683 L(SSE4Q4):  movdqa %xmm0,-0x44(%rdi)
684 L(SSE4Q3):  movdqa %xmm0,-0x34(%rdi)
685 L(SSE4Q2):  movdqa %xmm0,-0x24(%rdi)
686 L(SSE4Q1):  movdqa %xmm0,-0x14(%rdi)
687 L(SSE4Q0):  mov    %edx,-0x4(%rdi)
688         retq
690 L(SSE5QB):  movdqa %xmm0,-0xb5(%rdi)
691 L(SSE5QA):  movdqa %xmm0,-0xa5(%rdi)
692 L(SSE5Q9):  movdqa %xmm0,-0x95(%rdi)
693 L(SSE5Q8):  movdqa %xmm0,-0x85(%rdi)
694 L(SSE5Q7):  movdqa %xmm0,-0x75(%rdi)
695 L(SSE5Q6):  movdqa %xmm0,-0x65(%rdi)
696 L(SSE5Q5):  movdqa %xmm0,-0x55(%rdi)
697 L(SSE5Q4):  movdqa %xmm0,-0x45(%rdi)
698 L(SSE5Q3):  movdqa %xmm0,-0x35(%rdi)
699 L(SSE5Q2):  movdqa %xmm0,-0x25(%rdi)
700 L(SSE5Q1):  movdqa %xmm0,-0x15(%rdi)
701 L(SSE5Q0):  mov    %edx,-0x5(%rdi)
702         mov    %dl,-0x1(%rdi)
703         retq
706 L(SSE6QB):  movdqa %xmm0,-0xb6(%rdi)
707 L(SSE6QA):  movdqa %xmm0,-0xa6(%rdi)
708 L(SSE6Q9):  movdqa %xmm0,-0x96(%rdi)
709 L(SSE6Q8):  movdqa %xmm0,-0x86(%rdi)
710 L(SSE6Q7):  movdqa %xmm0,-0x76(%rdi)
711 L(SSE6Q6):  movdqa %xmm0,-0x66(%rdi)
712 L(SSE6Q5):  movdqa %xmm0,-0x56(%rdi)
713 L(SSE6Q4):  movdqa %xmm0,-0x46(%rdi)
714 L(SSE6Q3):  movdqa %xmm0,-0x36(%rdi)
715 L(SSE6Q2):  movdqa %xmm0,-0x26(%rdi)
716 L(SSE6Q1):  movdqa %xmm0,-0x16(%rdi)
717 L(SSE6Q0):  mov    %edx,-0x6(%rdi)
718         mov    %dx,-0x2(%rdi)
719         retq
721 L(SSE7QB):  movdqa %xmm0,-0xb7(%rdi)
722 L(SSE7QA):  movdqa %xmm0,-0xa7(%rdi)
723 L(SSE7Q9):  movdqa %xmm0,-0x97(%rdi)
724 L(SSE7Q8):  movdqa %xmm0,-0x87(%rdi)
725 L(SSE7Q7):  movdqa %xmm0,-0x77(%rdi)
726 L(SSE7Q6):  movdqa %xmm0,-0x67(%rdi)
727 L(SSE7Q5):  movdqa %xmm0,-0x57(%rdi)
728 L(SSE7Q4):  movdqa %xmm0,-0x47(%rdi)
729 L(SSE7Q3):  movdqa %xmm0,-0x37(%rdi)
730 L(SSE7Q2):  movdqa %xmm0,-0x27(%rdi)
731 L(SSE7Q1):  movdqa %xmm0,-0x17(%rdi)
732 L(SSE7Q0):  mov    %edx,-0x7(%rdi)
733         mov    %dx,-0x3(%rdi)
734         mov    %dl,-0x1(%rdi)
735         retq
737 L(SSE8QB):  movdqa %xmm0,-0xb8(%rdi)
738 L(SSE8QA):  movdqa %xmm0,-0xa8(%rdi)
739 L(SSE8Q9):  movdqa %xmm0,-0x98(%rdi)
740 L(SSE8Q8):  movdqa %xmm0,-0x88(%rdi)
741 L(SSE8Q7):  movdqa %xmm0,-0x78(%rdi)
742 L(SSE8Q6):  movdqa %xmm0,-0x68(%rdi)
743 L(SSE8Q5):  movdqa %xmm0,-0x58(%rdi)
744 L(SSE8Q4):  movdqa %xmm0,-0x48(%rdi)
745 L(SSE8Q3):  movdqa %xmm0,-0x38(%rdi)
746 L(SSE8Q2):  movdqa %xmm0,-0x28(%rdi)
747 L(SSE8Q1):  movdqa %xmm0,-0x18(%rdi)
748 L(SSE8Q0):  mov    %rdx,-0x8(%rdi)
749         retq
751 L(SSE9QB):  movdqa %xmm0,-0xb9(%rdi)
752 L(SSE9QA):  movdqa %xmm0,-0xa9(%rdi)
753 L(SSE9Q9):  movdqa %xmm0,-0x99(%rdi)
754 L(SSE9Q8):  movdqa %xmm0,-0x89(%rdi)
755 L(SSE9Q7):  movdqa %xmm0,-0x79(%rdi)
756 L(SSE9Q6):  movdqa %xmm0,-0x69(%rdi)
757 L(SSE9Q5):  movdqa %xmm0,-0x59(%rdi)
758 L(SSE9Q4):  movdqa %xmm0,-0x49(%rdi)
759 L(SSE9Q3):  movdqa %xmm0,-0x39(%rdi)
760 L(SSE9Q2):  movdqa %xmm0,-0x29(%rdi)
761 L(SSE9Q1):  movdqa %xmm0,-0x19(%rdi)
762 L(SSE9Q0):  mov    %rdx,-0x9(%rdi)
763         mov    %dl,-0x1(%rdi)
764         retq
766 L(SSE10QB): movdqa %xmm0,-0xba(%rdi)
767 L(SSE10QA): movdqa %xmm0,-0xaa(%rdi)
768 L(SSE10Q9): movdqa %xmm0,-0x9a(%rdi)
769 L(SSE10Q8): movdqa %xmm0,-0x8a(%rdi)
770 L(SSE10Q7): movdqa %xmm0,-0x7a(%rdi)
771 L(SSE10Q6): movdqa %xmm0,-0x6a(%rdi)
772 L(SSE10Q5): movdqa %xmm0,-0x5a(%rdi)
773 L(SSE10Q4): movdqa %xmm0,-0x4a(%rdi)
774 L(SSE10Q3): movdqa %xmm0,-0x3a(%rdi)
775 L(SSE10Q2): movdqa %xmm0,-0x2a(%rdi)
776 L(SSE10Q1): movdqa %xmm0,-0x1a(%rdi)
777 L(SSE10Q0): mov    %rdx,-0xa(%rdi)
778         mov    %dx,-0x2(%rdi)
779         retq
781 L(SSE11QB): movdqa %xmm0,-0xbb(%rdi)
782 L(SSE11QA): movdqa %xmm0,-0xab(%rdi)
783 L(SSE11Q9): movdqa %xmm0,-0x9b(%rdi)
784 L(SSE11Q8): movdqa %xmm0,-0x8b(%rdi)
785 L(SSE11Q7): movdqa %xmm0,-0x7b(%rdi)
786 L(SSE11Q6): movdqa %xmm0,-0x6b(%rdi)
787 L(SSE11Q5): movdqa %xmm0,-0x5b(%rdi)
788 L(SSE11Q4): movdqa %xmm0,-0x4b(%rdi)
789 L(SSE11Q3): movdqa %xmm0,-0x3b(%rdi)
790 L(SSE11Q2): movdqa %xmm0,-0x2b(%rdi)
791 L(SSE11Q1): movdqa %xmm0,-0x1b(%rdi)
792 L(SSE11Q0): mov    %rdx,-0xb(%rdi)
793         mov    %dx,-0x3(%rdi)
794         mov    %dl,-0x1(%rdi)
795         retq
797 L(SSE12QB): movdqa %xmm0,-0xbc(%rdi)
798 L(SSE12QA): movdqa %xmm0,-0xac(%rdi)
799 L(SSE12Q9): movdqa %xmm0,-0x9c(%rdi)
800 L(SSE12Q8): movdqa %xmm0,-0x8c(%rdi)
801 L(SSE12Q7): movdqa %xmm0,-0x7c(%rdi)
802 L(SSE12Q6): movdqa %xmm0,-0x6c(%rdi)
803 L(SSE12Q5): movdqa %xmm0,-0x5c(%rdi)
804 L(SSE12Q4): movdqa %xmm0,-0x4c(%rdi)
805 L(SSE12Q3): movdqa %xmm0,-0x3c(%rdi)
806 L(SSE12Q2): movdqa %xmm0,-0x2c(%rdi)
807 L(SSE12Q1): movdqa %xmm0,-0x1c(%rdi)
808 L(SSE12Q0): mov    %rdx,-0xc(%rdi)
809         mov    %edx,-0x4(%rdi)
810         retq
812 L(SSE13QB): movdqa %xmm0,-0xbd(%rdi)
813 L(SSE13QA): movdqa %xmm0,-0xad(%rdi)
814 L(SSE13Q9): movdqa %xmm0,-0x9d(%rdi)
815 L(SSE13Q8): movdqa %xmm0,-0x8d(%rdi)
816 L(SSE13Q7): movdqa %xmm0,-0x7d(%rdi)
817 L(SSE13Q6): movdqa %xmm0,-0x6d(%rdi)
818 L(SSE13Q5): movdqa %xmm0,-0x5d(%rdi)
819 L(SSE13Q4): movdqa %xmm0,-0x4d(%rdi)
820 L(SSE13Q3): movdqa %xmm0,-0x3d(%rdi)
821 L(SSE13Q2): movdqa %xmm0,-0x2d(%rdi)
822 L(SSE13Q1): movdqa %xmm0,-0x1d(%rdi)
823 L(SSE13Q0): mov    %rdx,-0xd(%rdi)
824         mov    %edx,-0x5(%rdi)
825         mov    %dl,-0x1(%rdi)
826         retq
828 L(SSE14QB): movdqa %xmm0,-0xbe(%rdi)
829 L(SSE14QA): movdqa %xmm0,-0xae(%rdi)
830 L(SSE14Q9): movdqa %xmm0,-0x9e(%rdi)
831 L(SSE14Q8): movdqa %xmm0,-0x8e(%rdi)
832 L(SSE14Q7): movdqa %xmm0,-0x7e(%rdi)
833 L(SSE14Q6): movdqa %xmm0,-0x6e(%rdi)
834 L(SSE14Q5): movdqa %xmm0,-0x5e(%rdi)
835 L(SSE14Q4): movdqa %xmm0,-0x4e(%rdi)
836 L(SSE14Q3): movdqa %xmm0,-0x3e(%rdi)
837 L(SSE14Q2): movdqa %xmm0,-0x2e(%rdi)
838 L(SSE14Q1): movdqa %xmm0,-0x1e(%rdi)
839 L(SSE14Q0): mov    %rdx,-0xe(%rdi)
840         mov    %edx,-0x6(%rdi)
841         mov    %dx,-0x2(%rdi)
842         retq
844 L(SSE15QB): movdqa %xmm0,-0xbf(%rdi)
845 L(SSE15QA): movdqa %xmm0,-0xaf(%rdi)
846 L(SSE15Q9): movdqa %xmm0,-0x9f(%rdi)
847 L(SSE15Q8): movdqa %xmm0,-0x8f(%rdi)
848 L(SSE15Q7): movdqa %xmm0,-0x7f(%rdi)
849 L(SSE15Q6): movdqa %xmm0,-0x6f(%rdi)
850 L(SSE15Q5): movdqa %xmm0,-0x5f(%rdi)
851 L(SSE15Q4): movdqa %xmm0,-0x4f(%rdi)
852 L(SSE15Q3): movdqa %xmm0,-0x3f(%rdi)
853 L(SSE15Q2): movdqa %xmm0,-0x2f(%rdi)
854 L(SSE15Q1): movdqa %xmm0,-0x1f(%rdi)
855 L(SSE15Q0): mov    %rdx,-0xf(%rdi)
856         mov    %edx,-0x7(%rdi)
857         mov    %dx,-0x3(%rdi)
858         mov    %dl,-0x1(%rdi)
859         retq
861         .balign     16
862 L(byte32sse2_pre):
864         mov    __x86_64_shared_cache_size(%rip),%r9d  # The largest cache size
865         cmp    %r9,%r8
866         jg     L(sse2_nt_move_pre)
867         #jmp    L(byte32sse2)
868         .balign     16
869 L(byte32sse2):
870         lea    -0x80(%r8),%r8 # 128
871         cmp    $0x80,%r8   # 128
872         movdqa %xmm0,(%rdi)
873         movdqa %xmm0,0x10(%rdi)
874         movdqa %xmm0,0x20(%rdi)
875         movdqa %xmm0,0x30(%rdi)
876         movdqa %xmm0,0x40(%rdi)
877         movdqa %xmm0,0x50(%rdi)
878         movdqa %xmm0,0x60(%rdi)
879         movdqa %xmm0,0x70(%rdi)
881         lea    0x80(%rdi),%rdi
882         jge    L(byte32sse2)
883         add    %r8,%rdi
884 #ifndef PIC
885         lea    L(SSExDx)(%rip),%r11
886         jmpq   *(%r11,%r8,8)
887 #else
888         lea    L(SSE0Q0)(%rip),%r11
889         lea    L(SSExDx)(%rip),%rcx
890         movswq (%rcx,%r8,2),%rcx
891         lea    (%rcx,%r11,1),%r11
892         jmpq   *%r11
893 #endif
895         .balign     16
896 L(sse2_nt_move_pre):
897         cmp    $0x0,%r9
898         je     L(byte32sse2)
899         jmp    L(sse2_nt_move)
901         .balign     16
902 L(sse2_nt_move):
903         lea    -0x80(%r8),%r8
904         cmp    $0x80,%r8
906         movntdq %xmm0,(%rdi)
907         movntdq %xmm0,0x10(%rdi)
908         movntdq %xmm0,0x20(%rdi)
909         movntdq %xmm0,0x30(%rdi)
910         movntdq %xmm0,0x40(%rdi)
911         movntdq %xmm0,0x50(%rdi)
912         movntdq %xmm0,0x60(%rdi)
913         movntdq %xmm0,0x70(%rdi)
915         lea    0x80(%rdi),%rdi
916         jge    L(sse2_nt_move)
917         sfence
918         add    %r8,%rdi
919 #ifndef PIC
920         lea    L(SSExDx)(%rip),%r11
921         jmpq   *(%r11,%r8,8)
922 #else
923         lea    L(SSE0Q0)(%rip),%r11
924         lea    L(SSExDx)(%rip),%rcx
925         movswq (%rcx,%r8,2),%rcx
926         lea   (%rcx,%r11,1),%r11
927         jmpq   *%r11
928 #endif
930         .pushsection .rodata
931         .balign     16
932 #ifndef PIC
933 L(SSExDx):
934         .quad       L(SSE0Q0), L(SSE1Q0), L(SSE2Q0), L(SSE3Q0)
935         .quad       L(SSE4Q0), L(SSE5Q0), L(SSE6Q0), L(SSE7Q0)
936         .quad       L(SSE8Q0), L(SSE9Q0), L(SSE10Q0), L(SSE11Q0)
937         .quad       L(SSE12Q0), L(SSE13Q0), L(SSE14Q0), L(SSE15Q0)
938         .quad       L(SSE0Q1), L(SSE1Q1), L(SSE2Q1), L(SSE3Q1)
939         .quad       L(SSE4Q1), L(SSE5Q1), L(SSE6Q1), L(SSE7Q1)
940         .quad       L(SSE8Q1), L(SSE9Q1), L(SSE10Q1), L(SSE11Q1)
941         .quad       L(SSE12Q1), L(SSE13Q1), L(SSE14Q1), L(SSE15Q1)
942         .quad       L(SSE0Q2), L(SSE1Q2), L(SSE2Q2), L(SSE3Q2)
943         .quad       L(SSE4Q2), L(SSE5Q2), L(SSE6Q2), L(SSE7Q2)
944         .quad       L(SSE8Q2), L(SSE9Q2), L(SSE10Q2), L(SSE11Q2)
945         .quad       L(SSE12Q2), L(SSE13Q2), L(SSE14Q2), L(SSE15Q2)
946         .quad       L(SSE0Q3), L(SSE1Q3), L(SSE2Q3), L(SSE3Q3)
947         .quad       L(SSE4Q3), L(SSE5Q3), L(SSE6Q3), L(SSE7Q3)
948         .quad       L(SSE8Q3), L(SSE9Q3), L(SSE10Q3), L(SSE11Q3)
949         .quad       L(SSE12Q3), L(SSE13Q3), L(SSE14Q3), L(SSE15Q3)
950         .quad       L(SSE0Q4), L(SSE1Q4), L(SSE2Q4), L(SSE3Q4)
951         .quad       L(SSE4Q4), L(SSE5Q4), L(SSE6Q4), L(SSE7Q4)
952         .quad       L(SSE8Q4), L(SSE9Q4), L(SSE10Q4), L(SSE11Q4)
953         .quad       L(SSE12Q4), L(SSE13Q4), L(SSE14Q4), L(SSE15Q4)
954         .quad       L(SSE0Q5), L(SSE1Q5), L(SSE2Q5), L(SSE3Q5)
955         .quad       L(SSE4Q5), L(SSE5Q5), L(SSE6Q5), L(SSE7Q5)
956         .quad       L(SSE8Q5), L(SSE9Q5), L(SSE10Q5), L(SSE11Q5)
957         .quad       L(SSE12Q5), L(SSE13Q5), L(SSE14Q5), L(SSE15Q5)
958         .quad       L(SSE0Q6), L(SSE1Q6), L(SSE2Q6), L(SSE3Q6)
959         .quad       L(SSE4Q6), L(SSE5Q6), L(SSE6Q6), L(SSE7Q6)
960         .quad       L(SSE8Q6), L(SSE9Q6), L(SSE10Q6), L(SSE11Q6)
961         .quad       L(SSE12Q6), L(SSE13Q6), L(SSE14Q6), L(SSE15Q6)
962         .quad       L(SSE0Q7), L(SSE1Q7), L(SSE2Q7), L(SSE3Q7)
963         .quad       L(SSE4Q7), L(SSE5Q7), L(SSE6Q7), L(SSE7Q7)
964         .quad       L(SSE8Q7), L(SSE9Q7), L(SSE10Q7), L(SSE11Q7)
965         .quad       L(SSE12Q7), L(SSE13Q7), L(SSE14Q7), L(SSE15Q7)
966         .quad       L(SSE0Q8), L(SSE1Q8), L(SSE2Q8), L(SSE3Q8)
967         .quad       L(SSE4Q8), L(SSE5Q8), L(SSE6Q8), L(SSE7Q8)
968         .quad       L(SSE8Q8), L(SSE9Q8), L(SSE10Q8), L(SSE11Q8)
969         .quad       L(SSE12Q8), L(SSE13Q8), L(SSE14Q8), L(SSE15Q8)
970         .quad       L(SSE0Q9), L(SSE1Q9), L(SSE2Q9), L(SSE3Q9)
971         .quad       L(SSE4Q9), L(SSE5Q9), L(SSE6Q9), L(SSE7Q9)
972         .quad       L(SSE8Q9), L(SSE9Q9), L(SSE10Q9), L(SSE11Q9)
973         .quad       L(SSE12Q9), L(SSE13Q9), L(SSE14Q9), L(SSE15Q9)
974         .quad       L(SSE0QA), L(SSE1QA), L(SSE2QA), L(SSE3QA)
975         .quad       L(SSE4QA), L(SSE5QA), L(SSE6QA), L(SSE7QA)
976         .quad       L(SSE8QA), L(SSE9QA), L(SSE10QA), L(SSE11QA)
977         .quad       L(SSE12QA), L(SSE13QA), L(SSE14QA), L(SSE15QA)
978         .quad       L(SSE0QB), L(SSE1QB), L(SSE2QB), L(SSE3QB)
979         .quad       L(SSE4QB), L(SSE5QB), L(SSE6QB), L(SSE7QB)
980         .quad       L(SSE8QB), L(SSE9QB), L(SSE10QB), L(SSE11QB)
981         .quad       L(SSE12QB), L(SSE13QB), L(SSE14QB), L(SSE15QB)
982 #else
983 L(SSExDx):
984         .short     L(SSE0Q0) -L(SSE0Q0)
985         .short     L(SSE1Q0) -L(SSE0Q0)
986         .short     L(SSE2Q0) -L(SSE0Q0)
987         .short     L(SSE3Q0) -L(SSE0Q0)
988         .short     L(SSE4Q0) -L(SSE0Q0)
989         .short     L(SSE5Q0) -L(SSE0Q0)
990         .short     L(SSE6Q0) -L(SSE0Q0)
991         .short     L(SSE7Q0) -L(SSE0Q0)
993         .short     L(SSE8Q0) -L(SSE0Q0)
994         .short     L(SSE9Q0) -L(SSE0Q0)
995         .short     L(SSE10Q0)-L(SSE0Q0)
996         .short     L(SSE11Q0)-L(SSE0Q0)
997         .short     L(SSE12Q0)-L(SSE0Q0)
998         .short     L(SSE13Q0)-L(SSE0Q0)
999         .short     L(SSE14Q0)-L(SSE0Q0)
1000         .short     L(SSE15Q0)-L(SSE0Q0)
1002         .short     L(SSE0Q1) -L(SSE0Q0)
1003         .short     L(SSE1Q1) -L(SSE0Q0)
1004         .short     L(SSE2Q1) -L(SSE0Q0)
1005         .short     L(SSE3Q1) -L(SSE0Q0)
1006         .short     L(SSE4Q1) -L(SSE0Q0)
1007         .short     L(SSE5Q1) -L(SSE0Q0)
1008         .short     L(SSE6Q1) -L(SSE0Q0)
1009         .short     L(SSE7Q1) -L(SSE0Q0)
1011         .short     L(SSE8Q1) -L(SSE0Q0)
1012         .short     L(SSE9Q1) -L(SSE0Q0)
1013         .short     L(SSE10Q1)-L(SSE0Q0)
1014         .short     L(SSE11Q1)-L(SSE0Q0)
1015         .short     L(SSE12Q1)-L(SSE0Q0)
1016         .short     L(SSE13Q1)-L(SSE0Q0)
1017         .short     L(SSE14Q1)-L(SSE0Q0)
1018         .short     L(SSE15Q1)-L(SSE0Q0)
1020         .short     L(SSE0Q2) -L(SSE0Q0)
1021         .short     L(SSE1Q2) -L(SSE0Q0)
1022         .short     L(SSE2Q2) -L(SSE0Q0)
1023         .short     L(SSE3Q2) -L(SSE0Q0)
1024         .short     L(SSE4Q2) -L(SSE0Q0)
1025         .short     L(SSE5Q2) -L(SSE0Q0)
1026         .short     L(SSE6Q2) -L(SSE0Q0)
1027         .short     L(SSE7Q2) -L(SSE0Q0)
1029         .short     L(SSE8Q2) -L(SSE0Q0)
1030         .short     L(SSE9Q2) -L(SSE0Q0)
1031         .short     L(SSE10Q2)-L(SSE0Q0)
1032         .short     L(SSE11Q2)-L(SSE0Q0)
1033         .short     L(SSE12Q2)-L(SSE0Q0)
1034         .short     L(SSE13Q2)-L(SSE0Q0)
1035         .short     L(SSE14Q2)-L(SSE0Q0)
1036         .short     L(SSE15Q2)-L(SSE0Q0)
1038         .short     L(SSE0Q3) -L(SSE0Q0)
1039         .short     L(SSE1Q3) -L(SSE0Q0)
1040         .short     L(SSE2Q3) -L(SSE0Q0)
1041         .short     L(SSE3Q3) -L(SSE0Q0)
1042         .short     L(SSE4Q3) -L(SSE0Q0)
1043         .short     L(SSE5Q3) -L(SSE0Q0)
1044         .short     L(SSE6Q3) -L(SSE0Q0)
1045         .short     L(SSE7Q3) -L(SSE0Q0)
1047         .short     L(SSE8Q3) -L(SSE0Q0)
1048         .short     L(SSE9Q3) -L(SSE0Q0)
1049         .short     L(SSE10Q3)-L(SSE0Q0)
1050         .short     L(SSE11Q3)-L(SSE0Q0)
1051         .short     L(SSE12Q3)-L(SSE0Q0)
1052         .short     L(SSE13Q3)-L(SSE0Q0)
1053         .short     L(SSE14Q3)-L(SSE0Q0)
1054         .short     L(SSE15Q3)-L(SSE0Q0)
1056         .short     L(SSE0Q4) -L(SSE0Q0)
1057         .short     L(SSE1Q4) -L(SSE0Q0)
1058         .short     L(SSE2Q4) -L(SSE0Q0)
1059         .short     L(SSE3Q4) -L(SSE0Q0)
1060         .short     L(SSE4Q4) -L(SSE0Q0)
1061         .short     L(SSE5Q4) -L(SSE0Q0)
1062         .short     L(SSE6Q4) -L(SSE0Q0)
1063         .short     L(SSE7Q4) -L(SSE0Q0)
1065         .short     L(SSE8Q4) -L(SSE0Q0)
1066         .short     L(SSE9Q4) -L(SSE0Q0)
1067         .short     L(SSE10Q4)-L(SSE0Q0)
1068         .short     L(SSE11Q4)-L(SSE0Q0)
1069         .short     L(SSE12Q4)-L(SSE0Q0)
1070         .short     L(SSE13Q4)-L(SSE0Q0)
1071         .short     L(SSE14Q4)-L(SSE0Q0)
1072         .short     L(SSE15Q4)-L(SSE0Q0)
1074         .short     L(SSE0Q5) -L(SSE0Q0)
1075         .short     L(SSE1Q5) -L(SSE0Q0)
1076         .short     L(SSE2Q5) -L(SSE0Q0)
1077         .short     L(SSE3Q5) -L(SSE0Q0)
1078         .short     L(SSE4Q5) -L(SSE0Q0)
1079         .short     L(SSE5Q5) -L(SSE0Q0)
1080         .short     L(SSE6Q5) -L(SSE0Q0)
1081         .short     L(SSE7Q5) -L(SSE0Q0)
1083         .short     L(SSE8Q5) -L(SSE0Q0)
1084         .short     L(SSE9Q5) -L(SSE0Q0)
1085         .short     L(SSE10Q5)-L(SSE0Q0)
1086         .short     L(SSE11Q5)-L(SSE0Q0)
1087         .short     L(SSE12Q5)-L(SSE0Q0)
1088         .short     L(SSE13Q5)-L(SSE0Q0)
1089         .short     L(SSE14Q5)-L(SSE0Q0)
1090         .short     L(SSE15Q5)-L(SSE0Q0)
1092         .short     L(SSE0Q6) -L(SSE0Q0)
1093         .short     L(SSE1Q6) -L(SSE0Q0)
1094         .short     L(SSE2Q6) -L(SSE0Q0)
1095         .short     L(SSE3Q6) -L(SSE0Q0)
1096         .short     L(SSE4Q6) -L(SSE0Q0)
1097         .short     L(SSE5Q6) -L(SSE0Q0)
1098         .short     L(SSE6Q6) -L(SSE0Q0)
1099         .short     L(SSE7Q6) -L(SSE0Q0)
1101         .short     L(SSE8Q6) -L(SSE0Q0)
1102         .short     L(SSE9Q6) -L(SSE0Q0)
1103         .short     L(SSE10Q6)-L(SSE0Q0)
1104         .short     L(SSE11Q6)-L(SSE0Q0)
1105         .short     L(SSE12Q6)-L(SSE0Q0)
1106         .short     L(SSE13Q6)-L(SSE0Q0)
1107         .short     L(SSE14Q6)-L(SSE0Q0)
1108         .short     L(SSE15Q6)-L(SSE0Q0)
1110         .short     L(SSE0Q7) -L(SSE0Q0)
1111         .short     L(SSE1Q7) -L(SSE0Q0)
1112         .short     L(SSE2Q7) -L(SSE0Q0)
1113         .short     L(SSE3Q7) -L(SSE0Q0)
1114         .short     L(SSE4Q7) -L(SSE0Q0)
1115         .short     L(SSE5Q7) -L(SSE0Q0)
1116         .short     L(SSE6Q7) -L(SSE0Q0)
1117         .short     L(SSE7Q7) -L(SSE0Q0)
1119         .short     L(SSE8Q7) -L(SSE0Q0)
1120         .short     L(SSE9Q7) -L(SSE0Q0)
1121         .short     L(SSE10Q7)-L(SSE0Q0)
1122         .short     L(SSE11Q7)-L(SSE0Q0)
1123         .short     L(SSE12Q7)-L(SSE0Q0)
1124         .short     L(SSE13Q7)-L(SSE0Q0)
1125         .short     L(SSE14Q7)-L(SSE0Q0)
1126         .short     L(SSE15Q7)-L(SSE0Q0)
1128         .short     L(SSE0Q8) -L(SSE0Q0)
1129         .short     L(SSE1Q8) -L(SSE0Q0)
1130         .short     L(SSE2Q8) -L(SSE0Q0)
1131         .short     L(SSE3Q8) -L(SSE0Q0)
1132         .short     L(SSE4Q8) -L(SSE0Q0)
1133         .short     L(SSE5Q8) -L(SSE0Q0)
1134         .short     L(SSE6Q8) -L(SSE0Q0)
1135         .short     L(SSE7Q8) -L(SSE0Q0)
1137         .short     L(SSE8Q8) -L(SSE0Q0)
1138         .short     L(SSE9Q8) -L(SSE0Q0)
1139         .short     L(SSE10Q8)-L(SSE0Q0)
1140         .short     L(SSE11Q8)-L(SSE0Q0)
1141         .short     L(SSE12Q8)-L(SSE0Q0)
1142         .short     L(SSE13Q8)-L(SSE0Q0)
1143         .short     L(SSE14Q8)-L(SSE0Q0)
1144         .short     L(SSE15Q8)-L(SSE0Q0)
1146         .short     L(SSE0Q9) -L(SSE0Q0)
1147         .short     L(SSE1Q9) -L(SSE0Q0)
1148         .short     L(SSE2Q9) -L(SSE0Q0)
1149         .short     L(SSE3Q9) -L(SSE0Q0)
1150         .short     L(SSE4Q9) -L(SSE0Q0)
1151         .short     L(SSE5Q9) -L(SSE0Q0)
1152         .short     L(SSE6Q9) -L(SSE0Q0)
1153         .short     L(SSE7Q9) -L(SSE0Q0)
1155         .short     L(SSE8Q9) -L(SSE0Q0)
1156         .short     L(SSE9Q9) -L(SSE0Q0)
1157         .short     L(SSE10Q9)-L(SSE0Q0)
1158         .short     L(SSE11Q9)-L(SSE0Q0)
1159         .short     L(SSE12Q9)-L(SSE0Q0)
1160         .short     L(SSE13Q9)-L(SSE0Q0)
1161         .short     L(SSE14Q9)-L(SSE0Q0)
1162         .short     L(SSE15Q9)-L(SSE0Q0)
1164         .short     L(SSE0QA) -L(SSE0Q0)
1165         .short     L(SSE1QA) -L(SSE0Q0)
1166         .short     L(SSE2QA) -L(SSE0Q0)
1167         .short     L(SSE3QA) -L(SSE0Q0)
1168         .short     L(SSE4QA) -L(SSE0Q0)
1169         .short     L(SSE5QA) -L(SSE0Q0)
1170         .short     L(SSE6QA) -L(SSE0Q0)
1171         .short     L(SSE7QA) -L(SSE0Q0)
1173         .short     L(SSE8QA) -L(SSE0Q0)
1174         .short     L(SSE9QA) -L(SSE0Q0)
1175         .short     L(SSE10QA)-L(SSE0Q0)
1176         .short     L(SSE11QA)-L(SSE0Q0)
1177         .short     L(SSE12QA)-L(SSE0Q0)
1178         .short     L(SSE13QA)-L(SSE0Q0)
1179         .short     L(SSE14QA)-L(SSE0Q0)
1180         .short     L(SSE15QA)-L(SSE0Q0)
1182         .short     L(SSE0QB) -L(SSE0Q0)
1183         .short     L(SSE1QB) -L(SSE0Q0)
1184         .short     L(SSE2QB) -L(SSE0Q0)
1185         .short     L(SSE3QB) -L(SSE0Q0)
1186         .short     L(SSE4QB) -L(SSE0Q0)
1187         .short     L(SSE5QB) -L(SSE0Q0)
1188         .short     L(SSE6QB) -L(SSE0Q0)
1189         .short     L(SSE7QB) -L(SSE0Q0)
1191         .short     L(SSE8QB) -L(SSE0Q0)
1192         .short     L(SSE9QB) -L(SSE0Q0)
1193         .short     L(SSE10QB)-L(SSE0Q0)
1194         .short     L(SSE11QB)-L(SSE0Q0)
1195         .short     L(SSE12QB)-L(SSE0Q0)
1196         .short     L(SSE13QB)-L(SSE0Q0)
1197         .short     L(SSE14QB)-L(SSE0Q0)
1198         .short     L(SSE15QB)-L(SSE0Q0)
1199 #endif
1200         .popsection
1201 #endif /* !defined USE_MULTIARCH || defined USE_SSE2  */
1203         .balign     16
1204 L(aligned_now):
1206 #ifndef USE_MULTIARCH
1207          cmpl   $0x1,__x86_64_preferred_memory_instruction(%rip)
1208          jg     L(SSE_pre)
1209 #endif /* USE_MULTIARCH */
1211 L(8byte_move_try):
1212         cmpq    __STOS_LOWER_BOUNDARY,%r8
1213         jae     L(8byte_stos_try)
1215         .balign     16
1216 L(8byte_move):
1217         movq    %r8,%rcx
1218         shrq    $7,%rcx
1219         jz      L(8byte_move_skip)
1221         .p2align 4
1223 L(8byte_move_loop):
1224         decq    %rcx
1226         movq    %rdx,    (%rdi)
1227         movq    %rdx,  8 (%rdi)
1228         movq    %rdx, 16 (%rdi)
1229         movq    %rdx, 24 (%rdi)
1230         movq    %rdx, 32 (%rdi)
1231         movq    %rdx, 40 (%rdi)
1232         movq    %rdx, 48 (%rdi)
1233         movq    %rdx, 56 (%rdi)
1234         movq    %rdx, 64 (%rdi)
1235         movq    %rdx, 72 (%rdi)
1236         movq    %rdx, 80 (%rdi)
1237         movq    %rdx, 88 (%rdi)
1238         movq    %rdx, 96 (%rdi)
1239         movq    %rdx, 104 (%rdi)
1240         movq    %rdx, 112 (%rdi)
1241         movq    %rdx, 120 (%rdi)
1243         leaq    128 (%rdi),%rdi
1245         jnz     L(8byte_move_loop)
1247 L(8byte_move_skip):
1248         andl    $127,%r8d
1249         lea     (%rdi,%r8,1),%rdi
1251 #ifndef PIC
1252         lea     L(setPxQx)(%rip),%r11
1253         jmpq    *(%r11,%r8,8) # old scheme remained for nonPIC
1254 #else
1255         lea     L(Got0)(%rip),%r11
1256         lea     L(setPxQx)(%rip),%rcx
1257         movswq  (%rcx,%r8,2),%rcx
1258         lea     (%rcx,%r11,1),%r11
1259         jmpq    *%r11
1260 #endif
1262         .balign     16
1263 L(8byte_stos_try):
1264         mov    __x86_64_shared_cache_size(%rip),%r9d // ck largest cache size
1265         cmpq    %r8,%r9         // calculate the lesser of remaining
1266         cmovaq  %r8,%r9         // bytes and largest cache size
1267         jbe     L(8byte_stos)
1269 L(8byte_move_reuse_try):
1270         cmp     __STOS_UPPER_BOUNDARY,%r8
1271         jae     L(8byte_move)
1273         .balign     16
1274 L(8byte_stos):
1275         movq    %r9,%rcx
1276         andq    $-8,%r9
1278         shrq    $3,%rcx
1279         jz      L(8byte_stos_skip)
1281         xchgq   %rax,%rdx
1283         rep
1284         stosq
1286         xchgq   %rax,%rdx
1288 L(8byte_stos_skip):
1289         subq    %r9,%r8
1290         ja      L(8byte_nt_move)
1292         andl    $7,%r8d
1293         lea     (%rdi,%r8,1),%rdi
1294 #ifndef PIC
1295         lea     L(setPxQx)(%rip),%r11
1296         jmpq    *(%r11,%r8,8) # old scheme remained for nonPIC
1297 #else
1298         lea     L(Got0)(%rip),%r11
1299         lea     L(setPxQx)(%rip),%rcx
1300         movswq  (%rcx,%r8,2),%rcx
1301         lea     (%rcx,%r11,1),%r11
1302         jmpq    *%r11
1303 #endif
1305         .balign     16
1306 L(8byte_nt_move):
1307         movq    %r8,%rcx
1308         shrq    $7,%rcx
1309         jz      L(8byte_nt_move_skip)
1311         .balign     16
1312 L(8byte_nt_move_loop):
1313         decq    %rcx
1315         movntiq %rdx,     (%rdi)
1316         movntiq %rdx,   8 (%rdi)
1317         movntiq %rdx,  16 (%rdi)
1318         movntiq %rdx,  24 (%rdi)
1319         movntiq %rdx,  32 (%rdi)
1320         movntiq %rdx,  40 (%rdi)
1321         movntiq %rdx,  48 (%rdi)
1322         movntiq %rdx,  56 (%rdi)
1323         movntiq %rdx,  64 (%rdi)
1324         movntiq %rdx,  72 (%rdi)
1325         movntiq %rdx,  80 (%rdi)
1326         movntiq %rdx,  88 (%rdi)
1327         movntiq %rdx,  96 (%rdi)
1328         movntiq %rdx, 104 (%rdi)
1329         movntiq %rdx, 112 (%rdi)
1330         movntiq %rdx, 120 (%rdi)
1332         leaq    128 (%rdi),%rdi
1334         jnz     L(8byte_nt_move_loop)
1336         sfence
1338 L(8byte_nt_move_skip):
1339         andl    $127,%r8d
1341         lea     (%rdi,%r8,1),%rdi
1342 #ifndef PIC
1343         lea     L(setPxQx)(%rip),%r11
1344         jmpq    *(%r11,%r8,8) # old scheme remained for nonPIC
1345 #else
1346         lea     L(Got0)(%rip),%r11
1347         lea     L(setPxQx)(%rip),%rcx
1348         movswq  (%rcx,%r8,2),%rcx
1349         lea     (%rcx,%r11,1),%r11
1350         jmpq    *%r11
1351 #endif
1353 END (memset)
1354 libc_hidden_builtin_def (memset)
1356 #if defined PIC && !defined NOT_IN_libc && !defined USE_MULTIARCH
1357 strong_alias (__memset_chk, __memset_zero_constant_len_parameter)
1358         .section .gnu.warning.__memset_zero_constant_len_parameter
1359         .string "memset used with constant zero length parameter; this could be due to transposed parameters"
1360 #endif