Work around old buggy program which cannot cope with memcpy semantics.
[glibc.git] / sysdeps / x86_64 / multiarch / memcpy-ssse3.S
blob9a878d35ff9173f411260966cf05a8eb538f929d
1 /* memcpy with SSSE3
2    Copyright (C) 2010 Free Software Foundation, Inc.
3    Contributed by Intel Corporation.
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 #if !defined NOT_IN_libc \
24     && (defined SHARED \
25         || defined USE_AS_MEMMOVE \
26         || !defined USE_MULTIARCH)
28 #include "asm-syntax.h"
30 #ifndef MEMCPY
31 # define MEMCPY         __memcpy_ssse3
32 # define MEMCPY_CHK     __memcpy_chk_ssse3
33 #endif
35 #ifndef ALIGN
36 # define ALIGN(n)       .p2align n
37 #endif
39 #define JMPTBL(I, B)    I - B
41 /* Branch to an entry in a jump table.  TABLE is a jump table with
42    relative offsets.  INDEX is a register contains the index into the
43    jump table.  SCALE is the scale of INDEX.  */
44 #define BRANCH_TO_JMPTBL_ENTRY(TABLE, INDEX, SCALE)             \
45   lea           TABLE(%rip), %r11;                              \
46   movslq        (%r11, INDEX, SCALE), INDEX;                    \
47   lea           (%r11, INDEX), INDEX;                           \
48   jmp           *INDEX;                                         \
49   ud2
51         .section .text.ssse3,"ax",@progbits
52 #if defined SHARED && !defined NOT_IN_libc
53 ENTRY (MEMCPY_CHK)
54         cmpq    %rdx, %rcx
55         jb      HIDDEN_JUMPTARGET (__chk_fail)
56 END (MEMCPY_CHK)
57 #endif
59 ENTRY (MEMCPY)
60         mov     %rdi, %rax
61 #ifdef USE_AS_MEMPCPY
62         add     %rdx, %rax
63 #endif
65 #ifdef USE_AS_MEMMOVE
66         cmp     %rsi, %rdi
67         jb      L(copy_forward)
68         je      L(write_0bytes)
69         cmp     $79, %rdx
70         jbe     L(copy_forward)
71         jmp     L(copy_backward)
72 L(copy_forward):
73 #endif
74         cmp     $79, %rdx
75         lea     L(table_less_80bytes)(%rip), %r11
76         ja      L(80bytesormore)
77         movslq  (%r11, %rdx, 4), %r9
78         add     %rdx, %rsi
79         add     %rdx, %rdi
80         add     %r11, %r9
81         jmp     *%r9
82         ud2
84         ALIGN (4)
85 L(80bytesormore):
86 #ifndef USE_AS_MEMMOVE
87         cmp     %dil, %sil
88         jle     L(copy_backward)
89 #endif
91         movdqu  (%rsi), %xmm0
92         mov     %rdi, %rcx
93         and     $-16, %rdi
94         add     $16, %rdi
95         mov     %rcx, %r8
96         sub     %rdi, %rcx
97         add     %rcx, %rdx
98         sub     %rcx, %rsi
100 #ifdef SHARED_CACHE_SIZE_HALF
101         mov     $SHARED_CACHE_SIZE_HALF, %rcx
102 #else
103         mov     __x86_64_shared_cache_size_half(%rip), %rcx
104 #endif
105         cmp     %rcx, %rdx
106         mov     %rsi, %r9
107         ja      L(large_page_fwd)
108         and     $0xf, %r9
109         jz      L(shl_0)
110 #ifdef DATA_CACHE_SIZE_HALF
111         mov     $DATA_CACHE_SIZE_HALF, %rcx
112 #else
113         mov     __x86_64_data_cache_size_half(%rip), %rcx
114 #endif
115         BRANCH_TO_JMPTBL_ENTRY (L(shl_table), %r9, 4)
117         ALIGN (4)
118 L(copy_backward):
119         movdqu  -16(%rsi, %rdx), %xmm0
120         add     %rdx, %rsi
121         lea     -16(%rdi, %rdx), %r8
122         add     %rdx, %rdi
124         mov     %rdi, %rcx
125         and     $0xf, %rcx
126         xor     %rcx, %rdi
127         sub     %rcx, %rdx
128         sub     %rcx, %rsi
130 #ifdef SHARED_CACHE_SIZE_HALF
131         mov     $SHARED_CACHE_SIZE_HALF, %rcx
132 #else
133         mov     __x86_64_shared_cache_size_half(%rip), %rcx
134 #endif
136         cmp     %rcx, %rdx
137         mov     %rsi, %r9
138         ja      L(large_page_bwd)
139         and     $0xf, %r9
140         jz      L(shl_0_bwd)
141 #ifdef DATA_CACHE_SIZE_HALF
142         mov     $DATA_CACHE_SIZE_HALF, %rcx
143 #else
144         mov     __x86_64_data_cache_size_half(%rip), %rcx
145 #endif
146         BRANCH_TO_JMPTBL_ENTRY (L(shl_table_bwd), %r9, 4)
148         ALIGN (4)
149 L(shl_0):
150         sub     $16, %rdx
151         movdqa  (%rsi), %xmm1
152         add     $16, %rsi
153         movdqa  %xmm1, (%rdi)
154         add     $16, %rdi
155         cmp     $128, %rdx
156         movdqu  %xmm0, (%r8)
157         ja      L(shl_0_gobble)
158         cmp     $64, %rdx
159         jb      L(shl_0_less_64bytes)
160         movaps  (%rsi), %xmm4
161         movaps  16(%rsi), %xmm1
162         movaps  32(%rsi), %xmm2
163         movaps  48(%rsi), %xmm3
164         movaps  %xmm4, (%rdi)
165         movaps  %xmm1, 16(%rdi)
166         movaps  %xmm2, 32(%rdi)
167         movaps  %xmm3, 48(%rdi)
168         sub     $64, %rdx
169         add     $64, %rsi
170         add     $64, %rdi
171 L(shl_0_less_64bytes):
172         add     %rdx, %rsi
173         add     %rdx, %rdi
174         BRANCH_TO_JMPTBL_ENTRY (L(table_less_80bytes), %rdx, 4)
176         ALIGN (4)
177 L(shl_0_gobble):
178 #ifdef DATA_CACHE_SIZE_HALF
179         cmp     $DATA_CACHE_SIZE_HALF, %rdx
180 #else
181         cmp     __x86_64_data_cache_size_half(%rip), %rdx
182 #endif
183         lea     -128(%rdx), %rdx
184         jae     L(shl_0_gobble_mem_loop)
185 L(shl_0_gobble_cache_loop):
186         movdqa  (%rsi), %xmm4
187         movaps  0x10(%rsi), %xmm1
188         movaps  0x20(%rsi), %xmm2
189         movaps  0x30(%rsi), %xmm3
191         movdqa  %xmm4, (%rdi)
192         movaps  %xmm1, 0x10(%rdi)
193         movaps  %xmm2, 0x20(%rdi)
194         movaps  %xmm3, 0x30(%rdi)
196         sub     $128, %rdx
197         movaps  0x40(%rsi), %xmm4
198         movaps  0x50(%rsi), %xmm5
199         movaps  0x60(%rsi), %xmm6
200         movaps  0x70(%rsi), %xmm7
201         lea     0x80(%rsi), %rsi
202         movaps  %xmm4, 0x40(%rdi)
203         movaps  %xmm5, 0x50(%rdi)
204         movaps  %xmm6, 0x60(%rdi)
205         movaps  %xmm7, 0x70(%rdi)
206         lea     0x80(%rdi), %rdi
208         jae     L(shl_0_gobble_cache_loop)
209         cmp     $-0x40, %rdx
210         lea     0x80(%rdx), %rdx
211         jl      L(shl_0_cache_less_64bytes)
213         movdqa  (%rsi), %xmm4
214         sub     $0x40, %rdx
215         movdqa  0x10(%rsi), %xmm1
217         movdqa  %xmm4, (%rdi)
218         movdqa  %xmm1, 0x10(%rdi)
220         movdqa  0x20(%rsi), %xmm4
221         movdqa  0x30(%rsi), %xmm1
222         add     $0x40, %rsi
224         movdqa  %xmm4, 0x20(%rdi)
225         movdqa  %xmm1, 0x30(%rdi)
226         add     $0x40, %rdi
227 L(shl_0_cache_less_64bytes):
228         add     %rdx, %rsi
229         add     %rdx, %rdi
230         BRANCH_TO_JMPTBL_ENTRY (L(table_less_80bytes), %rdx, 4)
232         ALIGN (4)
233 L(shl_0_gobble_mem_loop):
234         prefetcht0 0x1c0(%rsi)
235         prefetcht0 0x280(%rsi)
237         movdqa  (%rsi), %xmm0
238         movdqa  0x10(%rsi), %xmm1
239         movdqa  0x20(%rsi), %xmm2
240         movdqa  0x30(%rsi), %xmm3
241         movdqa  0x40(%rsi), %xmm4
242         movdqa  0x50(%rsi), %xmm5
243         movdqa  0x60(%rsi), %xmm6
244         movdqa  0x70(%rsi), %xmm7
245         lea     0x80(%rsi), %rsi
246         sub     $0x80, %rdx
247         movdqa  %xmm0, (%rdi)
248         movdqa  %xmm1, 0x10(%rdi)
249         movdqa  %xmm2, 0x20(%rdi)
250         movdqa  %xmm3, 0x30(%rdi)
251         movdqa  %xmm4, 0x40(%rdi)
252         movdqa  %xmm5, 0x50(%rdi)
253         movdqa  %xmm6, 0x60(%rdi)
254         movdqa  %xmm7, 0x70(%rdi)
255         lea     0x80(%rdi), %rdi
257         jae     L(shl_0_gobble_mem_loop)
258         cmp     $-0x40, %rdx
259         lea     0x80(%rdx), %rdx
260         jl      L(shl_0_mem_less_64bytes)
262         movdqa  (%rsi), %xmm0
263         sub     $0x40, %rdx
264         movdqa  0x10(%rsi), %xmm1
266         movdqa  %xmm0, (%rdi)
267         movdqa  %xmm1, 0x10(%rdi)
269         movdqa  0x20(%rsi), %xmm0
270         movdqa  0x30(%rsi), %xmm1
271         add     $0x40, %rsi
273         movdqa  %xmm0, 0x20(%rdi)
274         movdqa  %xmm1, 0x30(%rdi)
275         add     $0x40, %rdi
276 L(shl_0_mem_less_64bytes):
277         cmp     $0x20, %rdx
278         jb      L(shl_0_mem_less_32bytes)
279         movdqa  (%rsi), %xmm0
280         sub     $0x20, %rdx
281         movdqa  0x10(%rsi), %xmm1
282         add     $0x20, %rsi
283         movdqa  %xmm0, (%rdi)
284         movdqa  %xmm1, 0x10(%rdi)
285         add     $0x20, %rdi
286 L(shl_0_mem_less_32bytes):
287         add     %rdx, %rdi
288         add     %rdx, %rsi
289         BRANCH_TO_JMPTBL_ENTRY (L(table_less_80bytes), %rdx, 4)
291         ALIGN (4)
292 L(shl_0_bwd):
293         sub     $16, %rdx
294         movdqa  -0x10(%rsi), %xmm1
295         sub     $16, %rsi
296         movdqa  %xmm1, -0x10(%rdi)
297         sub     $16, %rdi
298         cmp     $0x80, %rdx
299         movdqu  %xmm0, (%r8)
300         ja      L(shl_0_gobble_bwd)
301         cmp     $64, %rdx
302         jb      L(shl_0_less_64bytes_bwd)
303         movaps  -0x10(%rsi), %xmm0
304         movaps  -0x20(%rsi), %xmm1
305         movaps  -0x30(%rsi), %xmm2
306         movaps  -0x40(%rsi), %xmm3
307         movaps  %xmm0, -0x10(%rdi)
308         movaps  %xmm1, -0x20(%rdi)
309         movaps  %xmm2, -0x30(%rdi)
310         movaps  %xmm3, -0x40(%rdi)
311         sub     $64, %rdx
312         sub     $0x40, %rsi
313         sub     $0x40, %rdi
314 L(shl_0_less_64bytes_bwd):
315         BRANCH_TO_JMPTBL_ENTRY (L(table_less_80bytes), %rdx, 4)
317         ALIGN (4)
318 L(shl_0_gobble_bwd):
319 #ifdef DATA_CACHE_SIZE_HALF
320         cmp     $DATA_CACHE_SIZE_HALF, %rdx
321 #else
322         cmp     __x86_64_data_cache_size_half(%rip), %rdx
323 #endif
324         lea     -128(%rdx), %rdx
325         jae     L(shl_0_gobble_mem_bwd_loop)
326 L(shl_0_gobble_bwd_loop):
327         movdqa  -0x10(%rsi), %xmm0
328         movaps  -0x20(%rsi), %xmm1
329         movaps  -0x30(%rsi), %xmm2
330         movaps  -0x40(%rsi), %xmm3
332         movdqa  %xmm0, -0x10(%rdi)
333         movaps  %xmm1, -0x20(%rdi)
334         movaps  %xmm2, -0x30(%rdi)
335         movaps  %xmm3, -0x40(%rdi)
337         sub     $0x80, %rdx
338         movaps  -0x50(%rsi), %xmm4
339         movaps  -0x60(%rsi), %xmm5
340         movaps  -0x70(%rsi), %xmm6
341         movaps  -0x80(%rsi), %xmm7
342         lea     -0x80(%rsi), %rsi
343         movaps  %xmm4, -0x50(%rdi)
344         movaps  %xmm5, -0x60(%rdi)
345         movaps  %xmm6, -0x70(%rdi)
346         movaps  %xmm7, -0x80(%rdi)
347         lea     -0x80(%rdi), %rdi
349         jae     L(shl_0_gobble_bwd_loop)
350         cmp     $-0x40, %rdx
351         lea     0x80(%rdx), %rdx
352         jl      L(shl_0_gobble_bwd_less_64bytes)
354         movdqa  -0x10(%rsi), %xmm0
355         sub     $0x40, %rdx
356         movdqa  -0x20(%rsi), %xmm1
358         movdqa  %xmm0, -0x10(%rdi)
359         movdqa  %xmm1, -0x20(%rdi)
361         movdqa  -0x30(%rsi), %xmm0
362         movdqa  -0x40(%rsi), %xmm1
363         sub     $0x40, %rsi
365         movdqa  %xmm0, -0x30(%rdi)
366         movdqa  %xmm1, -0x40(%rdi)
367         sub     $0x40, %rdi
368 L(shl_0_gobble_bwd_less_64bytes):
369         BRANCH_TO_JMPTBL_ENTRY (L(table_less_80bytes), %rdx, 4)
371         ALIGN (4)
372 L(shl_0_gobble_mem_bwd_loop):
373         prefetcht0 -0x1c0(%rsi)
374         prefetcht0 -0x280(%rsi)
375         movdqa  -0x10(%rsi), %xmm0
376         movdqa  -0x20(%rsi), %xmm1
377         movdqa  -0x30(%rsi), %xmm2
378         movdqa  -0x40(%rsi), %xmm3
379         movdqa  -0x50(%rsi), %xmm4
380         movdqa  -0x60(%rsi), %xmm5
381         movdqa  -0x70(%rsi), %xmm6
382         movdqa  -0x80(%rsi), %xmm7
383         lea     -0x80(%rsi), %rsi
384         sub     $0x80, %rdx
385         movdqa  %xmm0, -0x10(%rdi)
386         movdqa  %xmm1, -0x20(%rdi)
387         movdqa  %xmm2, -0x30(%rdi)
388         movdqa  %xmm3, -0x40(%rdi)
389         movdqa  %xmm4, -0x50(%rdi)
390         movdqa  %xmm5, -0x60(%rdi)
391         movdqa  %xmm6, -0x70(%rdi)
392         movdqa  %xmm7, -0x80(%rdi)
393         lea     -0x80(%rdi), %rdi
395         jae     L(shl_0_gobble_mem_bwd_loop)
396         cmp     $-0x40, %rdx
397         lea     0x80(%rdx), %rdx
398         jl      L(shl_0_mem_bwd_less_64bytes)
400         movdqa  -0x10(%rsi), %xmm0
401         sub     $0x40, %rdx
402         movdqa  -0x20(%rsi), %xmm1
404         movdqa  %xmm0, -0x10(%rdi)
405         movdqa  %xmm1, -0x20(%rdi)
407         movdqa  -0x30(%rsi), %xmm0
408         movdqa  -0x40(%rsi), %xmm1
409         sub     $0x40, %rsi
411         movdqa  %xmm0, -0x30(%rdi)
412         movdqa  %xmm1, -0x40(%rdi)
413         sub     $0x40, %rdi
414 L(shl_0_mem_bwd_less_64bytes):
415         cmp     $0x20, %rdx
416         jb      L(shl_0_mem_bwd_less_32bytes)
417         movdqa  -0x10(%rsi), %xmm0
418         sub     $0x20, %rdx
419         movdqa  -0x20(%rsi), %xmm1
420         sub     $0x20, %rsi
421         movdqa  %xmm0, -0x10(%rdi)
422         movdqa  %xmm1, -0x20(%rdi)
423         sub     $0x20, %rdi
424 L(shl_0_mem_bwd_less_32bytes):
425         BRANCH_TO_JMPTBL_ENTRY (L(table_less_80bytes), %rdx, 4)
427         ALIGN (4)
428 L(shl_1):
429         lea     (L(shl_1_loop_L1)-L(shl_1))(%r9), %r9
430         cmp     %rcx, %rdx
431         movaps  -0x01(%rsi), %xmm1
432         jb      L(L1_fwd)
433         lea     (L(shl_1_loop_L2)-L(shl_1_loop_L1))(%r9), %r9
434 L(L1_fwd):
435         lea     -64(%rdx), %rdx
436         jmp     *%r9
437         ud2
438 L(shl_1_loop_L2):
439         prefetchnta 0x1c0(%rsi)
440 L(shl_1_loop_L1):
441         sub     $64, %rdx
442         movaps  0x0f(%rsi), %xmm2
443         movaps  0x1f(%rsi), %xmm3
444         movaps  0x2f(%rsi), %xmm4
445         movaps  0x3f(%rsi), %xmm5
446         movdqa  %xmm5, %xmm6
447         palignr $1, %xmm4, %xmm5
448         lea     64(%rsi), %rsi
449         palignr $1, %xmm3, %xmm4
450         palignr $1, %xmm2, %xmm3
451         lea     64(%rdi), %rdi
452         palignr $1, %xmm1, %xmm2
453         movdqa  %xmm6, %xmm1
454         movdqa  %xmm2, -0x40(%rdi)
455         movaps  %xmm3, -0x30(%rdi)
456         jb      L(shl_1_end)
457         movaps  %xmm4, -0x20(%rdi)
458         movaps  %xmm5, -0x10(%rdi)
459         jmp     *%r9
460         ud2
461 L(shl_1_end):
462         movaps  %xmm4, -0x20(%rdi)
463         lea     64(%rdx), %rdx
464         movaps  %xmm5, -0x10(%rdi)
465         add     %rdx, %rdi
466         movdqu  %xmm0, (%r8)
467         add     %rdx, %rsi
468         BRANCH_TO_JMPTBL_ENTRY(L(table_less_80bytes), %rdx, 4)
470         ALIGN (4)
471 L(shl_1_bwd):
472         lea     (L(shl_1_bwd_loop_L1)-L(shl_1_bwd))(%r9), %r9
473         cmp     %rcx, %rdx
474         movaps  -0x01(%rsi), %xmm1
475         jb      L(L1_bwd)
476         lea     (L(shl_1_bwd_loop_L2)-L(shl_1_bwd_loop_L1))(%r9), %r9
477 L(L1_bwd):
478         lea     -64(%rdx), %rdx
479         jmp     *%r9
480         ud2
481 L(shl_1_bwd_loop_L2):
482         prefetchnta -0x1c0(%rsi)
483 L(shl_1_bwd_loop_L1):
484         movaps  -0x11(%rsi), %xmm2
485         sub     $0x40, %rdx
486         movaps  -0x21(%rsi), %xmm3
487         movaps  -0x31(%rsi), %xmm4
488         movaps  -0x41(%rsi), %xmm5
489         lea     -0x40(%rsi), %rsi
490         palignr $1, %xmm2, %xmm1
491         palignr $1, %xmm3, %xmm2
492         palignr $1, %xmm4, %xmm3
493         palignr $1, %xmm5, %xmm4
495         movaps  %xmm1, -0x10(%rdi)
496         movaps  %xmm5, %xmm1
498         movaps  %xmm2, -0x20(%rdi)
499         lea     -0x40(%rdi), %rdi
501         movaps  %xmm3, 0x10(%rdi)
502         jb      L(shl_1_bwd_end)
503         movaps  %xmm4, (%rdi)
504         jmp     *%r9
505         ud2
506 L(shl_1_bwd_end):
507         movaps  %xmm4, (%rdi)
508         lea     64(%rdx), %rdx
509         movdqu  %xmm0, (%r8)
510         BRANCH_TO_JMPTBL_ENTRY(L(table_less_80bytes), %rdx, 4)
512         ALIGN (4)
513 L(shl_2):
514         lea     (L(shl_2_loop_L1)-L(shl_2))(%r9), %r9
515         cmp     %rcx, %rdx
516         movaps  -0x02(%rsi), %xmm1
517         jb      L(L2_fwd)
518         lea     (L(shl_2_loop_L2)-L(shl_2_loop_L1))(%r9), %r9
519 L(L2_fwd):
520         lea     -64(%rdx), %rdx
521         jmp     *%r9
522         ud2
523 L(shl_2_loop_L2):
524         prefetchnta 0x1c0(%rsi)
525 L(shl_2_loop_L1):
526         sub     $64, %rdx
527         movaps  0x0e(%rsi), %xmm2
528         movaps  0x1e(%rsi), %xmm3
529         movaps  0x2e(%rsi), %xmm4
530         movaps  0x3e(%rsi), %xmm5
531         movdqa  %xmm5, %xmm6
532         palignr $2, %xmm4, %xmm5
533         lea     64(%rsi), %rsi
534         palignr $2, %xmm3, %xmm4
535         palignr $2, %xmm2, %xmm3
536         lea     64(%rdi), %rdi
537         palignr $2, %xmm1, %xmm2
538         movdqa  %xmm6, %xmm1
539         movdqa  %xmm2, -0x40(%rdi)
540         movaps  %xmm3, -0x30(%rdi)
541         jb      L(shl_2_end)
542         movaps  %xmm4, -0x20(%rdi)
543         movaps  %xmm5, -0x10(%rdi)
544         jmp     *%r9
545         ud2
546 L(shl_2_end):
547         movaps  %xmm4, -0x20(%rdi)
548         lea     64(%rdx), %rdx
549         movaps  %xmm5, -0x10(%rdi)
550         add     %rdx, %rdi
551         movdqu  %xmm0, (%r8)
552         add     %rdx, %rsi
553         BRANCH_TO_JMPTBL_ENTRY(L(table_less_80bytes), %rdx, 4)
555         ALIGN (4)
556 L(shl_2_bwd):
557         lea     (L(shl_2_bwd_loop_L1)-L(shl_2_bwd))(%r9), %r9
558         cmp     %rcx, %rdx
559         movaps  -0x02(%rsi), %xmm1
560         jb      L(L2_bwd)
561         lea     (L(shl_2_bwd_loop_L2)-L(shl_2_bwd_loop_L1))(%r9), %r9
562 L(L2_bwd):
563         lea     -64(%rdx), %rdx
564         jmp     *%r9
565         ud2
566 L(shl_2_bwd_loop_L2):
567         prefetchnta -0x1c0(%rsi)
568 L(shl_2_bwd_loop_L1):
569         movaps  -0x12(%rsi), %xmm2
570         sub     $0x40, %rdx
571         movaps  -0x22(%rsi), %xmm3
572         movaps  -0x32(%rsi), %xmm4
573         movaps  -0x42(%rsi), %xmm5
574         lea     -0x40(%rsi), %rsi
575         palignr $2, %xmm2, %xmm1
576         palignr $2, %xmm3, %xmm2
577         palignr $2, %xmm4, %xmm3
578         palignr $2, %xmm5, %xmm4
580         movaps  %xmm1, -0x10(%rdi)
581         movaps  %xmm5, %xmm1
583         movaps  %xmm2, -0x20(%rdi)
584         lea     -0x40(%rdi), %rdi
586         movaps  %xmm3, 0x10(%rdi)
587         jb      L(shl_2_bwd_end)
588         movaps  %xmm4, (%rdi)
589         jmp     *%r9
590         ud2
591 L(shl_2_bwd_end):
592         movaps  %xmm4, (%rdi)
593         lea     64(%rdx), %rdx
594         movdqu  %xmm0, (%r8)
595         BRANCH_TO_JMPTBL_ENTRY(L(table_less_80bytes), %rdx, 4)
597         ALIGN (4)
598 L(shl_3):
599         lea     (L(shl_3_loop_L1)-L(shl_3))(%r9), %r9
600         cmp     %rcx, %rdx
601         movaps  -0x03(%rsi), %xmm1
602         jb      L(L3_fwd)
603         lea     (L(shl_3_loop_L2)-L(shl_3_loop_L1))(%r9), %r9
604 L(L3_fwd):
605         lea     -64(%rdx), %rdx
606         jmp     *%r9
607         ud2
608 L(shl_3_loop_L2):
609         prefetchnta 0x1c0(%rsi)
610 L(shl_3_loop_L1):
611         sub     $64, %rdx
612         movaps  0x0d(%rsi), %xmm2
613         movaps  0x1d(%rsi), %xmm3
614         movaps  0x2d(%rsi), %xmm4
615         movaps  0x3d(%rsi), %xmm5
616         movdqa  %xmm5, %xmm6
617         palignr $3, %xmm4, %xmm5
618         lea     64(%rsi), %rsi
619         palignr $3, %xmm3, %xmm4
620         palignr $3, %xmm2, %xmm3
621         lea     64(%rdi), %rdi
622         palignr $3, %xmm1, %xmm2
623         movdqa  %xmm6, %xmm1
624         movdqa  %xmm2, -0x40(%rdi)
625         movaps  %xmm3, -0x30(%rdi)
626         jb      L(shl_3_end)
627         movaps  %xmm4, -0x20(%rdi)
628         movaps  %xmm5, -0x10(%rdi)
629         jmp     *%r9
630         ud2
631 L(shl_3_end):
632         movaps  %xmm4, -0x20(%rdi)
633         lea     64(%rdx), %rdx
634         movaps  %xmm5, -0x10(%rdi)
635         add     %rdx, %rdi
636         movdqu  %xmm0, (%r8)
637         add     %rdx, %rsi
638         BRANCH_TO_JMPTBL_ENTRY(L(table_less_80bytes), %rdx, 4)
640         ALIGN (4)
641 L(shl_3_bwd):
642         lea     (L(shl_3_bwd_loop_L1)-L(shl_3_bwd))(%r9), %r9
643         cmp     %rcx, %rdx
644         movaps  -0x03(%rsi), %xmm1
645         jb      L(L3_bwd)
646         lea     (L(shl_3_bwd_loop_L2)-L(shl_3_bwd_loop_L1))(%r9), %r9
647 L(L3_bwd):
648         lea     -64(%rdx), %rdx
649         jmp     *%r9
650         ud2
651 L(shl_3_bwd_loop_L2):
652         prefetchnta -0x1c0(%rsi)
653 L(shl_3_bwd_loop_L1):
654         movaps  -0x13(%rsi), %xmm2
655         sub     $0x40, %rdx
656         movaps  -0x23(%rsi), %xmm3
657         movaps  -0x33(%rsi), %xmm4
658         movaps  -0x43(%rsi), %xmm5
659         lea     -0x40(%rsi), %rsi
660         palignr $3, %xmm2, %xmm1
661         palignr $3, %xmm3, %xmm2
662         palignr $3, %xmm4, %xmm3
663         palignr $3, %xmm5, %xmm4
665         movaps  %xmm1, -0x10(%rdi)
666         movaps  %xmm5, %xmm1
668         movaps  %xmm2, -0x20(%rdi)
669         lea     -0x40(%rdi), %rdi
671         movaps  %xmm3, 0x10(%rdi)
672         jb      L(shl_3_bwd_end)
673         movaps  %xmm4, (%rdi)
674         jmp     *%r9
675         ud2
676 L(shl_3_bwd_end):
677         movaps  %xmm4, (%rdi)
678         lea     64(%rdx), %rdx
679         movdqu  %xmm0, (%r8)
680         BRANCH_TO_JMPTBL_ENTRY(L(table_less_80bytes), %rdx, 4)
682         ALIGN (4)
683 L(shl_4):
684         lea     (L(shl_4_loop_L1)-L(shl_4))(%r9), %r9
685         cmp     %rcx, %rdx
686         movaps  -0x04(%rsi), %xmm1
687         jb      L(L4_fwd)
688         lea     (L(shl_4_loop_L2)-L(shl_4_loop_L1))(%r9), %r9
689 L(L4_fwd):
690         lea     -64(%rdx), %rdx
691         jmp     *%r9
692         ud2
693 L(shl_4_loop_L2):
694         prefetchnta 0x1c0(%rsi)
695 L(shl_4_loop_L1):
696         sub     $64, %rdx
697         movaps  0x0c(%rsi), %xmm2
698         movaps  0x1c(%rsi), %xmm3
699         movaps  0x2c(%rsi), %xmm4
700         movaps  0x3c(%rsi), %xmm5
701         movdqa  %xmm5, %xmm6
702         palignr $4, %xmm4, %xmm5
703         lea     64(%rsi), %rsi
704         palignr $4, %xmm3, %xmm4
705         palignr $4, %xmm2, %xmm3
706         lea     64(%rdi), %rdi
707         palignr $4, %xmm1, %xmm2
708         movdqa  %xmm6, %xmm1
709         movdqa  %xmm2, -0x40(%rdi)
710         movaps  %xmm3, -0x30(%rdi)
711         jb      L(shl_4_end)
712         movaps  %xmm4, -0x20(%rdi)
713         movaps  %xmm5, -0x10(%rdi)
714         jmp     *%r9
715         ud2
716 L(shl_4_end):
717         movaps  %xmm4, -0x20(%rdi)
718         lea     64(%rdx), %rdx
719         movaps  %xmm5, -0x10(%rdi)
720         add     %rdx, %rdi
721         movdqu  %xmm0, (%r8)
722         add     %rdx, %rsi
723         BRANCH_TO_JMPTBL_ENTRY(L(table_less_80bytes), %rdx, 4)
725         ALIGN (4)
726 L(shl_4_bwd):
727         lea     (L(shl_4_bwd_loop_L1)-L(shl_4_bwd))(%r9), %r9
728         cmp     %rcx, %rdx
729         movaps  -0x04(%rsi), %xmm1
730         jb      L(L4_bwd)
731         lea     (L(shl_4_bwd_loop_L2)-L(shl_4_bwd_loop_L1))(%r9), %r9
732 L(L4_bwd):
733         lea     -64(%rdx), %rdx
734         jmp     *%r9
735         ud2
736 L(shl_4_bwd_loop_L2):
737         prefetchnta -0x1c0(%rsi)
738 L(shl_4_bwd_loop_L1):
739         movaps  -0x14(%rsi), %xmm2
740         sub     $0x40, %rdx
741         movaps  -0x24(%rsi), %xmm3
742         movaps  -0x34(%rsi), %xmm4
743         movaps  -0x44(%rsi), %xmm5
744         lea     -0x40(%rsi), %rsi
745         palignr $4, %xmm2, %xmm1
746         palignr $4, %xmm3, %xmm2
747         palignr $4, %xmm4, %xmm3
748         palignr $4, %xmm5, %xmm4
750         movaps  %xmm1, -0x10(%rdi)
751         movaps  %xmm5, %xmm1
753         movaps  %xmm2, -0x20(%rdi)
754         lea     -0x40(%rdi), %rdi
756         movaps  %xmm3, 0x10(%rdi)
757         jb      L(shl_4_bwd_end)
758         movaps  %xmm4, (%rdi)
759         jmp     *%r9
760         ud2
761 L(shl_4_bwd_end):
762         movaps  %xmm4, (%rdi)
763         lea     64(%rdx), %rdx
764         movdqu  %xmm0, (%r8)
765         BRANCH_TO_JMPTBL_ENTRY(L(table_less_80bytes), %rdx, 4)
767         ALIGN (4)
768 L(shl_5):
769         lea     (L(shl_5_loop_L1)-L(shl_5))(%r9), %r9
770         cmp     %rcx, %rdx
771         movaps  -0x05(%rsi), %xmm1
772         jb      L(L5_fwd)
773         lea     (L(shl_5_loop_L2)-L(shl_5_loop_L1))(%r9), %r9
774 L(L5_fwd):
775         lea     -64(%rdx), %rdx
776         jmp     *%r9
777         ud2
778 L(shl_5_loop_L2):
779         prefetchnta 0x1c0(%rsi)
780 L(shl_5_loop_L1):
781         sub     $64, %rdx
782         movaps  0x0b(%rsi), %xmm2
783         movaps  0x1b(%rsi), %xmm3
784         movaps  0x2b(%rsi), %xmm4
785         movaps  0x3b(%rsi), %xmm5
786         movdqa  %xmm5, %xmm6
787         palignr $5, %xmm4, %xmm5
788         lea     64(%rsi), %rsi
789         palignr $5, %xmm3, %xmm4
790         palignr $5, %xmm2, %xmm3
791         lea     64(%rdi), %rdi
792         palignr $5, %xmm1, %xmm2
793         movdqa  %xmm6, %xmm1
794         movdqa  %xmm2, -0x40(%rdi)
795         movaps  %xmm3, -0x30(%rdi)
796         jb      L(shl_5_end)
797         movaps  %xmm4, -0x20(%rdi)
798         movaps  %xmm5, -0x10(%rdi)
799         jmp     *%r9
800         ud2
801 L(shl_5_end):
802         movaps  %xmm4, -0x20(%rdi)
803         lea     64(%rdx), %rdx
804         movaps  %xmm5, -0x10(%rdi)
805         add     %rdx, %rdi
806         movdqu  %xmm0, (%r8)
807         add     %rdx, %rsi
808         BRANCH_TO_JMPTBL_ENTRY(L(table_less_80bytes), %rdx, 4)
810         ALIGN (4)
811 L(shl_5_bwd):
812         lea     (L(shl_5_bwd_loop_L1)-L(shl_5_bwd))(%r9), %r9
813         cmp     %rcx, %rdx
814         movaps  -0x05(%rsi), %xmm1
815         jb      L(L5_bwd)
816         lea     (L(shl_5_bwd_loop_L2)-L(shl_5_bwd_loop_L1))(%r9), %r9
817 L(L5_bwd):
818         lea     -64(%rdx), %rdx
819         jmp     *%r9
820         ud2
821 L(shl_5_bwd_loop_L2):
822         prefetchnta -0x1c0(%rsi)
823 L(shl_5_bwd_loop_L1):
824         movaps  -0x15(%rsi), %xmm2
825         sub     $0x40, %rdx
826         movaps  -0x25(%rsi), %xmm3
827         movaps  -0x35(%rsi), %xmm4
828         movaps  -0x45(%rsi), %xmm5
829         lea     -0x40(%rsi), %rsi
830         palignr $5, %xmm2, %xmm1
831         palignr $5, %xmm3, %xmm2
832         palignr $5, %xmm4, %xmm3
833         palignr $5, %xmm5, %xmm4
835         movaps  %xmm1, -0x10(%rdi)
836         movaps  %xmm5, %xmm1
838         movaps  %xmm2, -0x20(%rdi)
839         lea     -0x40(%rdi), %rdi
841         movaps  %xmm3, 0x10(%rdi)
842         jb      L(shl_5_bwd_end)
843         movaps  %xmm4, (%rdi)
844         jmp     *%r9
845         ud2
846 L(shl_5_bwd_end):
847         movaps  %xmm4, (%rdi)
848         lea     64(%rdx), %rdx
849         movdqu  %xmm0, (%r8)
850         BRANCH_TO_JMPTBL_ENTRY(L(table_less_80bytes), %rdx, 4)
852         ALIGN (4)
853 L(shl_6):
854         lea     (L(shl_6_loop_L1)-L(shl_6))(%r9), %r9
855         cmp     %rcx, %rdx
856         movaps  -0x06(%rsi), %xmm1
857         jb      L(L6_fwd)
858         lea     (L(shl_6_loop_L2)-L(shl_6_loop_L1))(%r9), %r9
859 L(L6_fwd):
860         lea     -64(%rdx), %rdx
861         jmp     *%r9
862         ud2
863 L(shl_6_loop_L2):
864         prefetchnta 0x1c0(%rsi)
865 L(shl_6_loop_L1):
866         sub     $64, %rdx
867         movaps  0x0a(%rsi), %xmm2
868         movaps  0x1a(%rsi), %xmm3
869         movaps  0x2a(%rsi), %xmm4
870         movaps  0x3a(%rsi), %xmm5
871         movdqa  %xmm5, %xmm6
872         palignr $6, %xmm4, %xmm5
873         lea     64(%rsi), %rsi
874         palignr $6, %xmm3, %xmm4
875         palignr $6, %xmm2, %xmm3
876         lea     64(%rdi), %rdi
877         palignr $6, %xmm1, %xmm2
878         movdqa  %xmm6, %xmm1
879         movdqa  %xmm2, -0x40(%rdi)
880         movaps  %xmm3, -0x30(%rdi)
881         jb      L(shl_6_end)
882         movaps  %xmm4, -0x20(%rdi)
883         movaps  %xmm5, -0x10(%rdi)
884         jmp     *%r9
885         ud2
886 L(shl_6_end):
887         movaps  %xmm4, -0x20(%rdi)
888         lea     64(%rdx), %rdx
889         movaps  %xmm5, -0x10(%rdi)
890         add     %rdx, %rdi
891         movdqu  %xmm0, (%r8)
892         add     %rdx, %rsi
893         BRANCH_TO_JMPTBL_ENTRY(L(table_less_80bytes), %rdx, 4)
895         ALIGN (4)
896 L(shl_6_bwd):
897         lea     (L(shl_6_bwd_loop_L1)-L(shl_6_bwd))(%r9), %r9
898         cmp     %rcx, %rdx
899         movaps  -0x06(%rsi), %xmm1
900         jb      L(L6_bwd)
901         lea     (L(shl_6_bwd_loop_L2)-L(shl_6_bwd_loop_L1))(%r9), %r9
902 L(L6_bwd):
903         lea     -64(%rdx), %rdx
904         jmp     *%r9
905         ud2
906 L(shl_6_bwd_loop_L2):
907         prefetchnta -0x1c0(%rsi)
908 L(shl_6_bwd_loop_L1):
909         movaps  -0x16(%rsi), %xmm2
910         sub     $0x40, %rdx
911         movaps  -0x26(%rsi), %xmm3
912         movaps  -0x36(%rsi), %xmm4
913         movaps  -0x46(%rsi), %xmm5
914         lea     -0x40(%rsi), %rsi
915         palignr $6, %xmm2, %xmm1
916         palignr $6, %xmm3, %xmm2
917         palignr $6, %xmm4, %xmm3
918         palignr $6, %xmm5, %xmm4
920         movaps  %xmm1, -0x10(%rdi)
921         movaps  %xmm5, %xmm1
923         movaps  %xmm2, -0x20(%rdi)
924         lea     -0x40(%rdi), %rdi
926         movaps  %xmm3, 0x10(%rdi)
927         jb      L(shl_6_bwd_end)
928         movaps  %xmm4, (%rdi)
929         jmp     *%r9
930         ud2
931 L(shl_6_bwd_end):
932         movaps  %xmm4, (%rdi)
933         lea     64(%rdx), %rdx
934         movdqu  %xmm0, (%r8)
935         BRANCH_TO_JMPTBL_ENTRY(L(table_less_80bytes), %rdx, 4)
937         ALIGN (4)
938 L(shl_7):
939         lea     (L(shl_7_loop_L1)-L(shl_7))(%r9), %r9
940         cmp     %rcx, %rdx
941         movaps  -0x07(%rsi), %xmm1
942         jb      L(L7_fwd)
943         lea     (L(shl_7_loop_L2)-L(shl_7_loop_L1))(%r9), %r9
944 L(L7_fwd):
945         lea     -64(%rdx), %rdx
946         jmp     *%r9
947         ud2
948 L(shl_7_loop_L2):
949         prefetchnta 0x1c0(%rsi)
950 L(shl_7_loop_L1):
951         sub     $64, %rdx
952         movaps  0x09(%rsi), %xmm2
953         movaps  0x19(%rsi), %xmm3
954         movaps  0x29(%rsi), %xmm4
955         movaps  0x39(%rsi), %xmm5
956         movdqa  %xmm5, %xmm6
957         palignr $7, %xmm4, %xmm5
958         lea     64(%rsi), %rsi
959         palignr $7, %xmm3, %xmm4
960         palignr $7, %xmm2, %xmm3
961         lea     64(%rdi), %rdi
962         palignr $7, %xmm1, %xmm2
963         movdqa  %xmm6, %xmm1
964         movdqa  %xmm2, -0x40(%rdi)
965         movaps  %xmm3, -0x30(%rdi)
966         jb      L(shl_7_end)
967         movaps  %xmm4, -0x20(%rdi)
968         movaps  %xmm5, -0x10(%rdi)
969         jmp     *%r9
970         ud2
971 L(shl_7_end):
972         movaps  %xmm4, -0x20(%rdi)
973         lea     64(%rdx), %rdx
974         movaps  %xmm5, -0x10(%rdi)
975         add     %rdx, %rdi
976         movdqu  %xmm0, (%r8)
977         add     %rdx, %rsi
978         BRANCH_TO_JMPTBL_ENTRY(L(table_less_80bytes), %rdx, 4)
980         ALIGN (4)
981 L(shl_7_bwd):
982         lea     (L(shl_7_bwd_loop_L1)-L(shl_7_bwd))(%r9), %r9
983         cmp     %rcx, %rdx
984         movaps  -0x07(%rsi), %xmm1
985         jb      L(L7_bwd)
986         lea     (L(shl_7_bwd_loop_L2)-L(shl_7_bwd_loop_L1))(%r9), %r9
987 L(L7_bwd):
988         lea     -64(%rdx), %rdx
989         jmp     *%r9
990         ud2
991 L(shl_7_bwd_loop_L2):
992         prefetchnta -0x1c0(%rsi)
993 L(shl_7_bwd_loop_L1):
994         movaps  -0x17(%rsi), %xmm2
995         sub     $0x40, %rdx
996         movaps  -0x27(%rsi), %xmm3
997         movaps  -0x37(%rsi), %xmm4
998         movaps  -0x47(%rsi), %xmm5
999         lea     -0x40(%rsi), %rsi
1000         palignr $7, %xmm2, %xmm1
1001         palignr $7, %xmm3, %xmm2
1002         palignr $7, %xmm4, %xmm3
1003         palignr $7, %xmm5, %xmm4
1005         movaps  %xmm1, -0x10(%rdi)
1006         movaps  %xmm5, %xmm1
1008         movaps  %xmm2, -0x20(%rdi)
1009         lea     -0x40(%rdi), %rdi
1011         movaps  %xmm3, 0x10(%rdi)
1012         jb      L(shl_7_bwd_end)
1013         movaps  %xmm4, (%rdi)
1014         jmp     *%r9
1015         ud2
1016 L(shl_7_bwd_end):
1017         movaps  %xmm4, (%rdi)
1018         lea     64(%rdx), %rdx
1019         movdqu  %xmm0, (%r8)
1020         BRANCH_TO_JMPTBL_ENTRY(L(table_less_80bytes), %rdx, 4)
1022         ALIGN (4)
1023 L(shl_8):
1024         lea     (L(shl_8_loop_L1)-L(shl_8))(%r9), %r9
1025         cmp     %rcx, %rdx
1026         movaps  -0x08(%rsi), %xmm1
1027         jb      L(L8_fwd)
1028         lea     (L(shl_8_loop_L2)-L(shl_8_loop_L1))(%r9), %r9
1029 L(L8_fwd):
1030         lea     -64(%rdx), %rdx
1031         jmp     *%r9
1032 L(shl_8_loop_L2):
1033         prefetchnta 0x1c0(%rsi)
1034 L(shl_8_loop_L1):
1035         sub     $64, %rdx
1036         movaps  0x08(%rsi), %xmm2
1037         movaps  0x18(%rsi), %xmm3
1038         movaps  0x28(%rsi), %xmm4
1039         movaps  0x38(%rsi), %xmm5
1040         movdqa  %xmm5, %xmm6
1041         palignr $8, %xmm4, %xmm5
1042         lea     64(%rsi), %rsi
1043         palignr $8, %xmm3, %xmm4
1044         palignr $8, %xmm2, %xmm3
1045         lea     64(%rdi), %rdi
1046         palignr $8, %xmm1, %xmm2
1047         movdqa  %xmm6, %xmm1
1048         movdqa  %xmm2, -0x40(%rdi)
1049         movaps  %xmm3, -0x30(%rdi)
1050         jb      L(shl_8_end)
1051         movaps  %xmm4, -0x20(%rdi)
1052         movaps  %xmm5, -0x10(%rdi)
1053         jmp     *%r9
1054         ud2
1055         ALIGN (4)
1056 L(shl_8_end):
1057         lea     64(%rdx), %rdx
1058         movaps  %xmm4, -0x20(%rdi)
1059         add     %rdx, %rsi
1060         movaps  %xmm5, -0x10(%rdi)
1061         add     %rdx, %rdi
1062         movdqu  %xmm0, (%r8)
1063         BRANCH_TO_JMPTBL_ENTRY(L(table_less_80bytes), %rdx, 4)
1065         ALIGN (4)
1066 L(shl_8_bwd):
1067         lea     (L(shl_8_bwd_loop_L1)-L(shl_8_bwd))(%r9), %r9
1068         cmp     %rcx, %rdx
1069         movaps  -0x08(%rsi), %xmm1
1070         jb      L(L8_bwd)
1071         lea     (L(shl_8_bwd_loop_L2)-L(shl_8_bwd_loop_L1))(%r9), %r9
1072 L(L8_bwd):
1073         lea     -64(%rdx), %rdx
1074         jmp     *%r9
1075         ud2
1076 L(shl_8_bwd_loop_L2):
1077         prefetchnta -0x1c0(%rsi)
1078 L(shl_8_bwd_loop_L1):
1079         movaps  -0x18(%rsi), %xmm2
1080         sub     $0x40, %rdx
1081         movaps  -0x28(%rsi), %xmm3
1082         movaps  -0x38(%rsi), %xmm4
1083         movaps  -0x48(%rsi), %xmm5
1084         lea     -0x40(%rsi), %rsi
1085         palignr $8, %xmm2, %xmm1
1086         palignr $8, %xmm3, %xmm2
1087         palignr $8, %xmm4, %xmm3
1088         palignr $8, %xmm5, %xmm4
1090         movaps  %xmm1, -0x10(%rdi)
1091         movaps  %xmm5, %xmm1
1093         movaps  %xmm2, -0x20(%rdi)
1094         lea     -0x40(%rdi), %rdi
1096         movaps  %xmm3, 0x10(%rdi)
1097         jb      L(shl_8_bwd_end)
1098         movaps  %xmm4, (%rdi)
1099         jmp     *%r9
1100         ud2
1101 L(shl_8_bwd_end):
1102         movaps  %xmm4, (%rdi)
1103         lea     64(%rdx), %rdx
1104         movdqu  %xmm0, (%r8)
1105         BRANCH_TO_JMPTBL_ENTRY(L(table_less_80bytes), %rdx, 4)
1107         ALIGN (4)
1108 L(shl_9):
1109         lea     (L(shl_9_loop_L1)-L(shl_9))(%r9), %r9
1110         cmp     %rcx, %rdx
1111         movaps  -0x09(%rsi), %xmm1
1112         jb      L(L9_fwd)
1113         lea     (L(shl_9_loop_L2)-L(shl_9_loop_L1))(%r9), %r9
1114 L(L9_fwd):
1115         lea     -64(%rdx), %rdx
1116         jmp     *%r9
1117         ud2
1118 L(shl_9_loop_L2):
1119         prefetchnta 0x1c0(%rsi)
1120 L(shl_9_loop_L1):
1121         sub     $64, %rdx
1122         movaps  0x07(%rsi), %xmm2
1123         movaps  0x17(%rsi), %xmm3
1124         movaps  0x27(%rsi), %xmm4
1125         movaps  0x37(%rsi), %xmm5
1126         movdqa  %xmm5, %xmm6
1127         palignr $9, %xmm4, %xmm5
1128         lea     64(%rsi), %rsi
1129         palignr $9, %xmm3, %xmm4
1130         palignr $9, %xmm2, %xmm3
1131         lea     64(%rdi), %rdi
1132         palignr $9, %xmm1, %xmm2
1133         movdqa  %xmm6, %xmm1
1134         movdqa  %xmm2, -0x40(%rdi)
1135         movaps  %xmm3, -0x30(%rdi)
1136         jb      L(shl_9_end)
1137         movaps  %xmm4, -0x20(%rdi)
1138         movaps  %xmm5, -0x10(%rdi)
1139         jmp     *%r9
1140         ud2
1141 L(shl_9_end):
1142         movaps  %xmm4, -0x20(%rdi)
1143         lea     64(%rdx), %rdx
1144         movaps  %xmm5, -0x10(%rdi)
1145         add     %rdx, %rdi
1146         movdqu  %xmm0, (%r8)
1147         add     %rdx, %rsi
1148         BRANCH_TO_JMPTBL_ENTRY(L(table_less_80bytes), %rdx, 4)
1150         ALIGN (4)
1151 L(shl_9_bwd):
1152         lea     (L(shl_9_bwd_loop_L1)-L(shl_9_bwd))(%r9), %r9
1153         cmp     %rcx, %rdx
1154         movaps  -0x09(%rsi), %xmm1
1155         jb      L(L9_bwd)
1156         lea     (L(shl_9_bwd_loop_L2)-L(shl_9_bwd_loop_L1))(%r9), %r9
1157 L(L9_bwd):
1158         lea     -64(%rdx), %rdx
1159         jmp     *%r9
1160         ud2
1161 L(shl_9_bwd_loop_L2):
1162         prefetchnta -0x1c0(%rsi)
1163 L(shl_9_bwd_loop_L1):
1164         movaps  -0x19(%rsi), %xmm2
1165         sub     $0x40, %rdx
1166         movaps  -0x29(%rsi), %xmm3
1167         movaps  -0x39(%rsi), %xmm4
1168         movaps  -0x49(%rsi), %xmm5
1169         lea     -0x40(%rsi), %rsi
1170         palignr $9, %xmm2, %xmm1
1171         palignr $9, %xmm3, %xmm2
1172         palignr $9, %xmm4, %xmm3
1173         palignr $9, %xmm5, %xmm4
1175         movaps  %xmm1, -0x10(%rdi)
1176         movaps  %xmm5, %xmm1
1178         movaps  %xmm2, -0x20(%rdi)
1179         lea     -0x40(%rdi), %rdi
1181         movaps  %xmm3, 0x10(%rdi)
1182         jb      L(shl_9_bwd_end)
1183         movaps  %xmm4, (%rdi)
1184         jmp     *%r9
1185         ud2
1186 L(shl_9_bwd_end):
1187         movaps  %xmm4, (%rdi)
1188         lea     64(%rdx), %rdx
1189         movdqu  %xmm0, (%r8)
1190         BRANCH_TO_JMPTBL_ENTRY(L(table_less_80bytes), %rdx, 4)
1192         ALIGN (4)
1193 L(shl_10):
1194         lea     (L(shl_10_loop_L1)-L(shl_10))(%r9), %r9
1195         cmp     %rcx, %rdx
1196         movaps  -0x0a(%rsi), %xmm1
1197         jb      L(L10_fwd)
1198         lea     (L(shl_10_loop_L2)-L(shl_10_loop_L1))(%r9), %r9
1199 L(L10_fwd):
1200         lea     -64(%rdx), %rdx
1201         jmp     *%r9
1202         ud2
1203 L(shl_10_loop_L2):
1204         prefetchnta 0x1c0(%rsi)
1205 L(shl_10_loop_L1):
1206         sub     $64, %rdx
1207         movaps  0x06(%rsi), %xmm2
1208         movaps  0x16(%rsi), %xmm3
1209         movaps  0x26(%rsi), %xmm4
1210         movaps  0x36(%rsi), %xmm5
1211         movdqa  %xmm5, %xmm6
1212         palignr $10, %xmm4, %xmm5
1213         lea     64(%rsi), %rsi
1214         palignr $10, %xmm3, %xmm4
1215         palignr $10, %xmm2, %xmm3
1216         lea     64(%rdi), %rdi
1217         palignr $10, %xmm1, %xmm2
1218         movdqa  %xmm6, %xmm1
1219         movdqa  %xmm2, -0x40(%rdi)
1220         movaps  %xmm3, -0x30(%rdi)
1221         jb      L(shl_10_end)
1222         movaps  %xmm4, -0x20(%rdi)
1223         movaps  %xmm5, -0x10(%rdi)
1224         jmp     *%r9
1225         ud2
1226 L(shl_10_end):
1227         movaps  %xmm4, -0x20(%rdi)
1228         lea     64(%rdx), %rdx
1229         movaps  %xmm5, -0x10(%rdi)
1230         add     %rdx, %rdi
1231         movdqu  %xmm0, (%r8)
1232         add     %rdx, %rsi
1233         BRANCH_TO_JMPTBL_ENTRY(L(table_less_80bytes), %rdx, 4)
1235         ALIGN (4)
1236 L(shl_10_bwd):
1237         lea     (L(shl_10_bwd_loop_L1)-L(shl_10_bwd))(%r9), %r9
1238         cmp     %rcx, %rdx
1239         movaps  -0x0a(%rsi), %xmm1
1240         jb      L(L10_bwd)
1241         lea     (L(shl_10_bwd_loop_L2)-L(shl_10_bwd_loop_L1))(%r9), %r9
1242 L(L10_bwd):
1243         lea     -64(%rdx), %rdx
1244         jmp     *%r9
1245         ud2
1246 L(shl_10_bwd_loop_L2):
1247         prefetchnta -0x1c0(%rsi)
1248 L(shl_10_bwd_loop_L1):
1249         movaps  -0x1a(%rsi), %xmm2
1250         sub     $0x40, %rdx
1251         movaps  -0x2a(%rsi), %xmm3
1252         movaps  -0x3a(%rsi), %xmm4
1253         movaps  -0x4a(%rsi), %xmm5
1254         lea     -0x40(%rsi), %rsi
1255         palignr $10, %xmm2, %xmm1
1256         palignr $10, %xmm3, %xmm2
1257         palignr $10, %xmm4, %xmm3
1258         palignr $10, %xmm5, %xmm4
1260         movaps  %xmm1, -0x10(%rdi)
1261         movaps  %xmm5, %xmm1
1263         movaps  %xmm2, -0x20(%rdi)
1264         lea     -0x40(%rdi), %rdi
1266         movaps  %xmm3, 0x10(%rdi)
1267         jb      L(shl_10_bwd_end)
1268         movaps  %xmm4, (%rdi)
1269         jmp     *%r9
1270         ud2
1271 L(shl_10_bwd_end):
1272         movaps  %xmm4, (%rdi)
1273         lea     64(%rdx), %rdx
1274         movdqu  %xmm0, (%r8)
1275         BRANCH_TO_JMPTBL_ENTRY(L(table_less_80bytes), %rdx, 4)
1277         ALIGN (4)
1278 L(shl_11):
1279         lea     (L(shl_11_loop_L1)-L(shl_11))(%r9), %r9
1280         cmp     %rcx, %rdx
1281         movaps  -0x0b(%rsi), %xmm1
1282         jb      L(L11_fwd)
1283         lea     (L(shl_11_loop_L2)-L(shl_11_loop_L1))(%r9), %r9
1284 L(L11_fwd):
1285         lea     -64(%rdx), %rdx
1286         jmp     *%r9
1287         ud2
1288 L(shl_11_loop_L2):
1289         prefetchnta 0x1c0(%rsi)
1290 L(shl_11_loop_L1):
1291         sub     $64, %rdx
1292         movaps  0x05(%rsi), %xmm2
1293         movaps  0x15(%rsi), %xmm3
1294         movaps  0x25(%rsi), %xmm4
1295         movaps  0x35(%rsi), %xmm5
1296         movdqa  %xmm5, %xmm6
1297         palignr $11, %xmm4, %xmm5
1298         lea     64(%rsi), %rsi
1299         palignr $11, %xmm3, %xmm4
1300         palignr $11, %xmm2, %xmm3
1301         lea     64(%rdi), %rdi
1302         palignr $11, %xmm1, %xmm2
1303         movdqa  %xmm6, %xmm1
1304         movdqa  %xmm2, -0x40(%rdi)
1305         movaps  %xmm3, -0x30(%rdi)
1306         jb      L(shl_11_end)
1307         movaps  %xmm4, -0x20(%rdi)
1308         movaps  %xmm5, -0x10(%rdi)
1309         jmp     *%r9
1310         ud2
1311 L(shl_11_end):
1312         movaps  %xmm4, -0x20(%rdi)
1313         lea     64(%rdx), %rdx
1314         movaps  %xmm5, -0x10(%rdi)
1315         add     %rdx, %rdi
1316         movdqu  %xmm0, (%r8)
1317         add     %rdx, %rsi
1318         BRANCH_TO_JMPTBL_ENTRY(L(table_less_80bytes), %rdx, 4)
1320         ALIGN (4)
1321 L(shl_11_bwd):
1322         lea     (L(shl_11_bwd_loop_L1)-L(shl_11_bwd))(%r9), %r9
1323         cmp     %rcx, %rdx
1324         movaps  -0x0b(%rsi), %xmm1
1325         jb      L(L11_bwd)
1326         lea     (L(shl_11_bwd_loop_L2)-L(shl_11_bwd_loop_L1))(%r9), %r9
1327 L(L11_bwd):
1328         lea     -64(%rdx), %rdx
1329         jmp     *%r9
1330         ud2
1331 L(shl_11_bwd_loop_L2):
1332         prefetchnta -0x1c0(%rsi)
1333 L(shl_11_bwd_loop_L1):
1334         movaps  -0x1b(%rsi), %xmm2
1335         sub     $0x40, %rdx
1336         movaps  -0x2b(%rsi), %xmm3
1337         movaps  -0x3b(%rsi), %xmm4
1338         movaps  -0x4b(%rsi), %xmm5
1339         lea     -0x40(%rsi), %rsi
1340         palignr $11, %xmm2, %xmm1
1341         palignr $11, %xmm3, %xmm2
1342         palignr $11, %xmm4, %xmm3
1343         palignr $11, %xmm5, %xmm4
1345         movaps  %xmm1, -0x10(%rdi)
1346         movaps  %xmm5, %xmm1
1348         movaps  %xmm2, -0x20(%rdi)
1349         lea     -0x40(%rdi), %rdi
1351         movaps  %xmm3, 0x10(%rdi)
1352         jb      L(shl_11_bwd_end)
1353         movaps  %xmm4, (%rdi)
1354         jmp     *%r9
1355         ud2
1356 L(shl_11_bwd_end):
1357         movaps  %xmm4, (%rdi)
1358         lea     64(%rdx), %rdx
1359         movdqu  %xmm0, (%r8)
1360         BRANCH_TO_JMPTBL_ENTRY(L(table_less_80bytes), %rdx, 4)
1362         ALIGN (4)
1363 L(shl_12):
1364         lea     (L(shl_12_loop_L1)-L(shl_12))(%r9), %r9
1365         cmp     %rcx, %rdx
1366         movaps  -0x0c(%rsi), %xmm1
1367         jb      L(L12_fwd)
1368         lea     (L(shl_12_loop_L2)-L(shl_12_loop_L1))(%r9), %r9
1369 L(L12_fwd):
1370         lea     -64(%rdx), %rdx
1371         jmp     *%r9
1372         ud2
1373 L(shl_12_loop_L2):
1374         prefetchnta 0x1c0(%rsi)
1375 L(shl_12_loop_L1):
1376         sub     $64, %rdx
1377         movaps  0x04(%rsi), %xmm2
1378         movaps  0x14(%rsi), %xmm3
1379         movaps  0x24(%rsi), %xmm4
1380         movaps  0x34(%rsi), %xmm5
1381         movdqa  %xmm5, %xmm6
1382         palignr $12, %xmm4, %xmm5
1383         lea     64(%rsi), %rsi
1384         palignr $12, %xmm3, %xmm4
1385         palignr $12, %xmm2, %xmm3
1386         lea     64(%rdi), %rdi
1387         palignr $12, %xmm1, %xmm2
1388         movdqa  %xmm6, %xmm1
1389         movdqa  %xmm2, -0x40(%rdi)
1390         movaps  %xmm3, -0x30(%rdi)
1391         jb      L(shl_12_end)
1392         movaps  %xmm4, -0x20(%rdi)
1393         movaps  %xmm5, -0x10(%rdi)
1394         jmp     *%r9
1395         ud2
1396 L(shl_12_end):
1397         movaps  %xmm4, -0x20(%rdi)
1398         lea     64(%rdx), %rdx
1399         movaps  %xmm5, -0x10(%rdi)
1400         add     %rdx, %rdi
1401         movdqu  %xmm0, (%r8)
1402         add     %rdx, %rsi
1403         BRANCH_TO_JMPTBL_ENTRY(L(table_less_80bytes), %rdx, 4)
1405         ALIGN (4)
1406 L(shl_12_bwd):
1407         lea     (L(shl_12_bwd_loop_L1)-L(shl_12_bwd))(%r9), %r9
1408         cmp     %rcx, %rdx
1409         movaps  -0x0c(%rsi), %xmm1
1410         jb      L(L12_bwd)
1411         lea     (L(shl_12_bwd_loop_L2)-L(shl_12_bwd_loop_L1))(%r9), %r9
1412 L(L12_bwd):
1413         lea     -64(%rdx), %rdx
1414         jmp     *%r9
1415         ud2
1416 L(shl_12_bwd_loop_L2):
1417         prefetchnta -0x1c0(%rsi)
1418 L(shl_12_bwd_loop_L1):
1419         movaps  -0x1c(%rsi), %xmm2
1420         sub     $0x40, %rdx
1421         movaps  -0x2c(%rsi), %xmm3
1422         movaps  -0x3c(%rsi), %xmm4
1423         movaps  -0x4c(%rsi), %xmm5
1424         lea     -0x40(%rsi), %rsi
1425         palignr $12, %xmm2, %xmm1
1426         palignr $12, %xmm3, %xmm2
1427         palignr $12, %xmm4, %xmm3
1428         palignr $12, %xmm5, %xmm4
1430         movaps  %xmm1, -0x10(%rdi)
1431         movaps  %xmm5, %xmm1
1433         movaps  %xmm2, -0x20(%rdi)
1434         lea     -0x40(%rdi), %rdi
1436         movaps  %xmm3, 0x10(%rdi)
1437         jb      L(shl_12_bwd_end)
1438         movaps  %xmm4, (%rdi)
1439         jmp     *%r9
1440         ud2
1441 L(shl_12_bwd_end):
1442         movaps  %xmm4, (%rdi)
1443         lea     64(%rdx), %rdx
1444         movdqu  %xmm0, (%r8)
1445         BRANCH_TO_JMPTBL_ENTRY(L(table_less_80bytes), %rdx, 4)
1447         ALIGN (4)
1448 L(shl_13):
1449         lea     (L(shl_13_loop_L1)-L(shl_13))(%r9), %r9
1450         cmp     %rcx, %rdx
1451         movaps  -0x0d(%rsi), %xmm1
1452         jb      L(L13_fwd)
1453         lea     (L(shl_13_loop_L2)-L(shl_13_loop_L1))(%r9), %r9
1454 L(L13_fwd):
1455         lea     -64(%rdx), %rdx
1456         jmp     *%r9
1457         ud2
1458 L(shl_13_loop_L2):
1459         prefetchnta 0x1c0(%rsi)
1460 L(shl_13_loop_L1):
1461         sub     $64, %rdx
1462         movaps  0x03(%rsi), %xmm2
1463         movaps  0x13(%rsi), %xmm3
1464         movaps  0x23(%rsi), %xmm4
1465         movaps  0x33(%rsi), %xmm5
1466         movdqa  %xmm5, %xmm6
1467         palignr $13, %xmm4, %xmm5
1468         lea     64(%rsi), %rsi
1469         palignr $13, %xmm3, %xmm4
1470         palignr $13, %xmm2, %xmm3
1471         lea     64(%rdi), %rdi
1472         palignr $13, %xmm1, %xmm2
1473         movdqa  %xmm6, %xmm1
1474         movdqa  %xmm2, -0x40(%rdi)
1475         movaps  %xmm3, -0x30(%rdi)
1476         jb      L(shl_13_end)
1477         movaps  %xmm4, -0x20(%rdi)
1478         movaps  %xmm5, -0x10(%rdi)
1479         jmp     *%r9
1480         ud2
1481 L(shl_13_end):
1482         movaps  %xmm4, -0x20(%rdi)
1483         lea     64(%rdx), %rdx
1484         movaps  %xmm5, -0x10(%rdi)
1485         add     %rdx, %rdi
1486         movdqu  %xmm0, (%r8)
1487         add     %rdx, %rsi
1488         BRANCH_TO_JMPTBL_ENTRY(L(table_less_80bytes), %rdx, 4)
1490         ALIGN (4)
1491 L(shl_13_bwd):
1492         lea     (L(shl_13_bwd_loop_L1)-L(shl_13_bwd))(%r9), %r9
1493         cmp     %rcx, %rdx
1494         movaps  -0x0d(%rsi), %xmm1
1495         jb      L(L13_bwd)
1496         lea     (L(shl_13_bwd_loop_L2)-L(shl_13_bwd_loop_L1))(%r9), %r9
1497 L(L13_bwd):
1498         lea     -64(%rdx), %rdx
1499         jmp     *%r9
1500         ud2
1501 L(shl_13_bwd_loop_L2):
1502         prefetchnta -0x1c0(%rsi)
1503 L(shl_13_bwd_loop_L1):
1504         movaps  -0x1d(%rsi), %xmm2
1505         sub     $0x40, %rdx
1506         movaps  -0x2d(%rsi), %xmm3
1507         movaps  -0x3d(%rsi), %xmm4
1508         movaps  -0x4d(%rsi), %xmm5
1509         lea     -0x40(%rsi), %rsi
1510         palignr $13, %xmm2, %xmm1
1511         palignr $13, %xmm3, %xmm2
1512         palignr $13, %xmm4, %xmm3
1513         palignr $13, %xmm5, %xmm4
1515         movaps  %xmm1, -0x10(%rdi)
1516         movaps  %xmm5, %xmm1
1518         movaps  %xmm2, -0x20(%rdi)
1519         lea     -0x40(%rdi), %rdi
1521         movaps  %xmm3, 0x10(%rdi)
1522         jb      L(shl_13_bwd_end)
1523         movaps  %xmm4, (%rdi)
1524         jmp     *%r9
1525         ud2
1526 L(shl_13_bwd_end):
1527         movaps  %xmm4, (%rdi)
1528         lea     64(%rdx), %rdx
1529         movdqu  %xmm0, (%r8)
1530         BRANCH_TO_JMPTBL_ENTRY(L(table_less_80bytes), %rdx, 4)
1532         ALIGN (4)
1533 L(shl_14):
1534         lea     (L(shl_14_loop_L1)-L(shl_14))(%r9), %r9
1535         cmp     %rcx, %rdx
1536         movaps  -0x0e(%rsi), %xmm1
1537         jb      L(L14_fwd)
1538         lea     (L(shl_14_loop_L2)-L(shl_14_loop_L1))(%r9), %r9
1539 L(L14_fwd):
1540         lea     -64(%rdx), %rdx
1541         jmp     *%r9
1542         ud2
1543 L(shl_14_loop_L2):
1544         prefetchnta 0x1c0(%rsi)
1545 L(shl_14_loop_L1):
1546         sub     $64, %rdx
1547         movaps  0x02(%rsi), %xmm2
1548         movaps  0x12(%rsi), %xmm3
1549         movaps  0x22(%rsi), %xmm4
1550         movaps  0x32(%rsi), %xmm5
1551         movdqa  %xmm5, %xmm6
1552         palignr $14, %xmm4, %xmm5
1553         lea     64(%rsi), %rsi
1554         palignr $14, %xmm3, %xmm4
1555         palignr $14, %xmm2, %xmm3
1556         lea     64(%rdi), %rdi
1557         palignr $14, %xmm1, %xmm2
1558         movdqa  %xmm6, %xmm1
1559         movdqa  %xmm2, -0x40(%rdi)
1560         movaps  %xmm3, -0x30(%rdi)
1561         jb      L(shl_14_end)
1562         movaps  %xmm4, -0x20(%rdi)
1563         movaps  %xmm5, -0x10(%rdi)
1564         jmp     *%r9
1565         ud2
1566 L(shl_14_end):
1567         movaps  %xmm4, -0x20(%rdi)
1568         lea     64(%rdx), %rdx
1569         movaps  %xmm5, -0x10(%rdi)
1570         add     %rdx, %rdi
1571         movdqu  %xmm0, (%r8)
1572         add     %rdx, %rsi
1573         BRANCH_TO_JMPTBL_ENTRY(L(table_less_80bytes), %rdx, 4)
1575         ALIGN (4)
1576 L(shl_14_bwd):
1577         lea     (L(shl_14_bwd_loop_L1)-L(shl_14_bwd))(%r9), %r9
1578         cmp     %rcx, %rdx
1579         movaps  -0x0e(%rsi), %xmm1
1580         jb      L(L14_bwd)
1581         lea     (L(shl_14_bwd_loop_L2)-L(shl_14_bwd_loop_L1))(%r9), %r9
1582 L(L14_bwd):
1583         lea     -64(%rdx), %rdx
1584         jmp     *%r9
1585         ud2
1586 L(shl_14_bwd_loop_L2):
1587         prefetchnta -0x1c0(%rsi)
1588 L(shl_14_bwd_loop_L1):
1589         movaps  -0x1e(%rsi), %xmm2
1590         sub     $0x40, %rdx
1591         movaps  -0x2e(%rsi), %xmm3
1592         movaps  -0x3e(%rsi), %xmm4
1593         movaps  -0x4e(%rsi), %xmm5
1594         lea     -0x40(%rsi), %rsi
1595         palignr $14, %xmm2, %xmm1
1596         palignr $14, %xmm3, %xmm2
1597         palignr $14, %xmm4, %xmm3
1598         palignr $14, %xmm5, %xmm4
1600         movaps  %xmm1, -0x10(%rdi)
1601         movaps  %xmm5, %xmm1
1603         movaps  %xmm2, -0x20(%rdi)
1604         lea     -0x40(%rdi), %rdi
1606         movaps  %xmm3, 0x10(%rdi)
1607         jb      L(shl_14_bwd_end)
1608         movaps  %xmm4, (%rdi)
1609         jmp     *%r9
1610         ud2
1611 L(shl_14_bwd_end):
1612         movaps  %xmm4, (%rdi)
1613         lea     64(%rdx), %rdx
1614         movdqu  %xmm0, (%r8)
1615         BRANCH_TO_JMPTBL_ENTRY(L(table_less_80bytes), %rdx, 4)
1617         ALIGN (4)
1618 L(shl_15):
1619         lea     (L(shl_15_loop_L1)-L(shl_15))(%r9), %r9
1620         cmp     %rcx, %rdx
1621         movaps  -0x0f(%rsi), %xmm1
1622         jb      L(L15_fwd)
1623         lea     (L(shl_15_loop_L2)-L(shl_15_loop_L1))(%r9), %r9
1624 L(L15_fwd):
1625         lea     -64(%rdx), %rdx
1626         jmp     *%r9
1627         ud2
1628 L(shl_15_loop_L2):
1629         prefetchnta 0x1c0(%rsi)
1630 L(shl_15_loop_L1):
1631         sub     $64, %rdx
1632         movaps  0x01(%rsi), %xmm2
1633         movaps  0x11(%rsi), %xmm3
1634         movaps  0x21(%rsi), %xmm4
1635         movaps  0x31(%rsi), %xmm5
1636         movdqa  %xmm5, %xmm6
1637         palignr $15, %xmm4, %xmm5
1638         lea     64(%rsi), %rsi
1639         palignr $15, %xmm3, %xmm4
1640         palignr $15, %xmm2, %xmm3
1641         lea     64(%rdi), %rdi
1642         palignr $15, %xmm1, %xmm2
1643         movdqa  %xmm6, %xmm1
1644         movdqa  %xmm2, -0x40(%rdi)
1645         movaps  %xmm3, -0x30(%rdi)
1646         jb      L(shl_15_end)
1647         movaps  %xmm4, -0x20(%rdi)
1648         movaps  %xmm5, -0x10(%rdi)
1649         jmp     *%r9
1650         ud2
1651 L(shl_15_end):
1652         movaps  %xmm4, -0x20(%rdi)
1653         lea     64(%rdx), %rdx
1654         movaps  %xmm5, -0x10(%rdi)
1655         add     %rdx, %rdi
1656         movdqu  %xmm0, (%r8)
1657         add     %rdx, %rsi
1658         BRANCH_TO_JMPTBL_ENTRY(L(table_less_80bytes), %rdx, 4)
1660         ALIGN (4)
1661 L(shl_15_bwd):
1662         lea     (L(shl_15_bwd_loop_L1)-L(shl_15_bwd))(%r9), %r9
1663         cmp     %rcx, %rdx
1664         movaps  -0x0f(%rsi), %xmm1
1665         jb      L(L15_bwd)
1666         lea     (L(shl_15_bwd_loop_L2)-L(shl_15_bwd_loop_L1))(%r9), %r9
1667 L(L15_bwd):
1668         lea     -64(%rdx), %rdx
1669         jmp     *%r9
1670         ud2
1671 L(shl_15_bwd_loop_L2):
1672         prefetchnta -0x1c0(%rsi)
1673 L(shl_15_bwd_loop_L1):
1674         movaps  -0x1f(%rsi), %xmm2
1675         sub     $0x40, %rdx
1676         movaps  -0x2f(%rsi), %xmm3
1677         movaps  -0x3f(%rsi), %xmm4
1678         movaps  -0x4f(%rsi), %xmm5
1679         lea     -0x40(%rsi), %rsi
1680         palignr $15, %xmm2, %xmm1
1681         palignr $15, %xmm3, %xmm2
1682         palignr $15, %xmm4, %xmm3
1683         palignr $15, %xmm5, %xmm4
1685         movaps  %xmm1, -0x10(%rdi)
1686         movaps  %xmm5, %xmm1
1688         movaps  %xmm2, -0x20(%rdi)
1689         lea     -0x40(%rdi), %rdi
1691         movaps  %xmm3, 0x10(%rdi)
1692         jb      L(shl_15_bwd_end)
1693         movaps  %xmm4, (%rdi)
1694         jmp     *%r9
1695         ud2
1696 L(shl_15_bwd_end):
1697         movaps  %xmm4, (%rdi)
1698         lea     64(%rdx), %rdx
1699         movdqu  %xmm0, (%r8)
1700         BRANCH_TO_JMPTBL_ENTRY(L(table_less_80bytes), %rdx, 4)
1702         ALIGN (4)
1703 L(write_72bytes):
1704         movdqu  -72(%rsi), %xmm0
1705         movdqu  -56(%rsi), %xmm1
1706         mov     -40(%rsi), %r8
1707         mov     -32(%rsi), %r9
1708         mov     -24(%rsi), %r10
1709         mov     -16(%rsi), %r11
1710         mov     -8(%rsi), %rcx
1711         movdqu   %xmm0, -72(%rdi)
1712         movdqu   %xmm1, -56(%rdi)
1713         mov      %r8, -40(%rdi)
1714         mov      %r9, -32(%rdi)
1715         mov      %r10, -24(%rdi)
1716         mov      %r11, -16(%rdi)
1717         mov      %rcx, -8(%rdi)
1718         ret
1720         ALIGN (4)
1721 L(write_64bytes):
1722         movdqu  -64(%rsi), %xmm0
1723         mov     -48(%rsi), %rcx
1724         mov     -40(%rsi), %r8
1725         mov     -32(%rsi), %r9
1726         mov     -24(%rsi), %r10
1727         mov     -16(%rsi), %r11
1728         mov     -8(%rsi), %rdx
1729         movdqu   %xmm0, -64(%rdi)
1730         mov      %rcx, -48(%rdi)
1731         mov      %r8, -40(%rdi)
1732         mov      %r9, -32(%rdi)
1733         mov      %r10, -24(%rdi)
1734         mov      %r11, -16(%rdi)
1735         mov      %rdx, -8(%rdi)
1736         ret
1738         ALIGN (4)
1739 L(write_56bytes):
1740         movdqu  -56(%rsi), %xmm0
1741         mov     -40(%rsi), %r8
1742         mov     -32(%rsi), %r9
1743         mov     -24(%rsi), %r10
1744         mov     -16(%rsi), %r11
1745         mov     -8(%rsi), %rcx
1746         movdqu   %xmm0, -56(%rdi)
1747         mov      %r8, -40(%rdi)
1748         mov      %r9, -32(%rdi)
1749         mov      %r10, -24(%rdi)
1750         mov      %r11, -16(%rdi)
1751         mov      %rcx, -8(%rdi)
1752         ret
1754         ALIGN (4)
1755 L(write_48bytes):
1756         mov     -48(%rsi), %rcx
1757         mov     -40(%rsi), %r8
1758         mov     -32(%rsi), %r9
1759         mov     -24(%rsi), %r10
1760         mov     -16(%rsi), %r11
1761         mov     -8(%rsi), %rdx
1762         mov      %rcx, -48(%rdi)
1763         mov      %r8, -40(%rdi)
1764         mov      %r9, -32(%rdi)
1765         mov      %r10, -24(%rdi)
1766         mov      %r11, -16(%rdi)
1767         mov      %rdx, -8(%rdi)
1768         ret
1770         ALIGN (4)
1771 L(write_40bytes):
1772         mov     -40(%rsi), %r8
1773         mov     -32(%rsi), %r9
1774         mov     -24(%rsi), %r10
1775         mov     -16(%rsi), %r11
1776         mov     -8(%rsi), %rdx
1777         mov      %r8, -40(%rdi)
1778         mov      %r9, -32(%rdi)
1779         mov      %r10, -24(%rdi)
1780         mov      %r11, -16(%rdi)
1781         mov      %rdx, -8(%rdi)
1782         ret
1784         ALIGN (4)
1785 L(write_32bytes):
1786         mov     -32(%rsi), %r9
1787         mov     -24(%rsi), %r10
1788         mov     -16(%rsi), %r11
1789         mov     -8(%rsi), %rdx
1790         mov      %r9, -32(%rdi)
1791         mov      %r10, -24(%rdi)
1792         mov      %r11, -16(%rdi)
1793         mov      %rdx, -8(%rdi)
1794         ret
1796         ALIGN (4)
1797 L(write_24bytes):
1798         mov     -24(%rsi), %r10
1799         mov     -16(%rsi), %r11
1800         mov     -8(%rsi), %rdx
1801         mov      %r10, -24(%rdi)
1802         mov      %r11, -16(%rdi)
1803         mov      %rdx, -8(%rdi)
1804         ret
1806         ALIGN (4)
1807 L(write_16bytes):
1808         mov     -16(%rsi), %r11
1809         mov     -8(%rsi), %rdx
1810         mov      %r11, -16(%rdi)
1811         mov      %rdx, -8(%rdi)
1812         ret
1814         ALIGN (4)
1815 L(write_8bytes):
1816         mov     -8(%rsi), %rdx
1817         mov      %rdx, -8(%rdi)
1818 L(write_0bytes):
1819         ret
1821         ALIGN (4)
1822 L(write_73bytes):
1823         movdqu  -73(%rsi), %xmm0
1824         movdqu  -57(%rsi), %xmm1
1825         mov     -41(%rsi), %rcx
1826         mov     -33(%rsi), %r9
1827         mov     -25(%rsi), %r10
1828         mov     -17(%rsi), %r11
1829         mov     -9(%rsi), %r8
1830         mov     -4(%rsi), %edx
1831         movdqu   %xmm0, -73(%rdi)
1832         movdqu   %xmm1, -57(%rdi)
1833         mov      %rcx, -41(%rdi)
1834         mov      %r9, -33(%rdi)
1835         mov      %r10, -25(%rdi)
1836         mov      %r11, -17(%rdi)
1837         mov      %r8, -9(%rdi)
1838         mov      %edx, -4(%rdi)
1839         ret
1841         ALIGN (4)
1842 L(write_65bytes):
1843         movdqu  -65(%rsi), %xmm0
1844         movdqu  -49(%rsi), %xmm1
1845         mov     -33(%rsi), %r9
1846         mov     -25(%rsi), %r10
1847         mov     -17(%rsi), %r11
1848         mov     -9(%rsi), %rcx
1849         mov     -4(%rsi), %edx
1850         movdqu   %xmm0, -65(%rdi)
1851         movdqu   %xmm1, -49(%rdi)
1852         mov      %r9, -33(%rdi)
1853         mov      %r10, -25(%rdi)
1854         mov      %r11, -17(%rdi)
1855         mov      %rcx, -9(%rdi)
1856         mov      %edx, -4(%rdi)
1857         ret
1859         ALIGN (4)
1860 L(write_57bytes):
1861         movdqu  -57(%rsi), %xmm0
1862         mov     -41(%rsi), %r8
1863         mov     -33(%rsi), %r9
1864         mov     -25(%rsi), %r10
1865         mov     -17(%rsi), %r11
1866         mov     -9(%rsi), %rcx
1867         mov     -4(%rsi), %edx
1868         movdqu   %xmm0, -57(%rdi)
1869         mov      %r8, -41(%rdi)
1870         mov      %r9, -33(%rdi)
1871         mov      %r10, -25(%rdi)
1872         mov      %r11, -17(%rdi)
1873         mov      %rcx, -9(%rdi)
1874         mov      %edx, -4(%rdi)
1875         ret
1877         ALIGN (4)
1878 L(write_49bytes):
1879         movdqu  -49(%rsi), %xmm0
1880         mov     -33(%rsi), %r9
1881         mov     -25(%rsi), %r10
1882         mov     -17(%rsi), %r11
1883         mov     -9(%rsi), %rcx
1884         mov     -4(%rsi), %edx
1885         movdqu   %xmm0, -49(%rdi)
1886         mov      %r9, -33(%rdi)
1887         mov      %r10, -25(%rdi)
1888         mov      %r11, -17(%rdi)
1889         mov      %rcx, -9(%rdi)
1890         mov      %edx, -4(%rdi)
1891         ret
1893         ALIGN (4)
1894 L(write_41bytes):
1895         mov     -41(%rsi), %r8
1896         mov     -33(%rsi), %r9
1897         mov     -25(%rsi), %r10
1898         mov     -17(%rsi), %r11
1899         mov     -9(%rsi), %rcx
1900         mov     -1(%rsi), %dl
1901         mov      %r8, -41(%rdi)
1902         mov      %r9, -33(%rdi)
1903         mov      %r10, -25(%rdi)
1904         mov      %r11, -17(%rdi)
1905         mov      %rcx, -9(%rdi)
1906         mov      %dl, -1(%rdi)
1907         ret
1909         ALIGN (4)
1910 L(write_33bytes):
1911         mov     -33(%rsi), %r9
1912         mov     -25(%rsi), %r10
1913         mov     -17(%rsi), %r11
1914         mov     -9(%rsi), %rcx
1915         mov     -1(%rsi), %dl
1916         mov      %r9, -33(%rdi)
1917         mov      %r10, -25(%rdi)
1918         mov      %r11, -17(%rdi)
1919         mov      %rcx, -9(%rdi)
1920         mov      %dl, -1(%rdi)
1921         ret
1923         ALIGN (4)
1924 L(write_25bytes):
1925         mov     -25(%rsi), %r10
1926         mov     -17(%rsi), %r11
1927         mov     -9(%rsi), %rcx
1928         mov     -1(%rsi), %dl
1929         mov      %r10, -25(%rdi)
1930         mov      %r11, -17(%rdi)
1931         mov      %rcx, -9(%rdi)
1932         mov      %dl, -1(%rdi)
1933         ret
1935         ALIGN (4)
1936 L(write_17bytes):
1937         mov     -17(%rsi), %r11
1938         mov     -9(%rsi), %rcx
1939         mov     -4(%rsi), %edx
1940         mov      %r11, -17(%rdi)
1941         mov      %rcx, -9(%rdi)
1942         mov      %edx, -4(%rdi)
1943         ret
1945         ALIGN (4)
1946 L(write_9bytes):
1947         mov     -9(%rsi), %rcx
1948         mov     -4(%rsi), %edx
1949         mov      %rcx, -9(%rdi)
1950         mov      %edx, -4(%rdi)
1951         ret
1953         ALIGN (4)
1954 L(write_1bytes):
1955         mov     -1(%rsi), %dl
1956         mov      %dl, -1(%rdi)
1957         ret
1959         ALIGN (4)
1960 L(write_74bytes):
1961         movdqu  -74(%rsi), %xmm0
1962         movdqu  -58(%rsi), %xmm1
1963         mov     -42(%rsi), %r8
1964         mov     -34(%rsi), %r9
1965         mov     -26(%rsi), %r10
1966         mov     -18(%rsi), %r11
1967         mov     -10(%rsi), %rcx
1968         mov     -4(%rsi), %edx
1969         movdqu   %xmm0, -74(%rdi)
1970         movdqu   %xmm1, -58(%rdi)
1971         mov      %r8, -42(%rdi)
1972         mov      %r9, -34(%rdi)
1973         mov      %r10, -26(%rdi)
1974         mov      %r11, -18(%rdi)
1975         mov      %rcx, -10(%rdi)
1976         mov      %edx, -4(%rdi)
1977         ret
1979         ALIGN (4)
1980 L(write_66bytes):
1981         movdqu  -66(%rsi), %xmm0
1982         movdqu  -50(%rsi), %xmm1
1983         mov     -42(%rsi), %r8
1984         mov     -34(%rsi), %r9
1985         mov     -26(%rsi), %r10
1986         mov     -18(%rsi), %r11
1987         mov     -10(%rsi), %rcx
1988         mov     -4(%rsi), %edx
1989         movdqu   %xmm0, -66(%rdi)
1990         movdqu   %xmm1, -50(%rdi)
1991         mov      %r8, -42(%rdi)
1992         mov      %r9, -34(%rdi)
1993         mov      %r10, -26(%rdi)
1994         mov      %r11, -18(%rdi)
1995         mov      %rcx, -10(%rdi)
1996         mov      %edx, -4(%rdi)
1997         ret
1999         ALIGN (4)
2000 L(write_58bytes):
2001         movdqu  -58(%rsi), %xmm1
2002         mov     -42(%rsi), %r8
2003         mov     -34(%rsi), %r9
2004         mov     -26(%rsi), %r10
2005         mov     -18(%rsi), %r11
2006         mov     -10(%rsi), %rcx
2007         mov     -4(%rsi), %edx
2008         movdqu   %xmm1, -58(%rdi)
2009         mov      %r8, -42(%rdi)
2010         mov      %r9, -34(%rdi)
2011         mov      %r10, -26(%rdi)
2012         mov      %r11, -18(%rdi)
2013         mov      %rcx, -10(%rdi)
2014         mov      %edx, -4(%rdi)
2015         ret
2017         ALIGN (4)
2018 L(write_50bytes):
2019         movdqu  -50(%rsi), %xmm0
2020         mov     -34(%rsi), %r9
2021         mov     -26(%rsi), %r10
2022         mov     -18(%rsi), %r11
2023         mov     -10(%rsi), %rcx
2024         mov     -4(%rsi), %edx
2025         movdqu   %xmm0, -50(%rdi)
2026         mov      %r9, -34(%rdi)
2027         mov      %r10, -26(%rdi)
2028         mov      %r11, -18(%rdi)
2029         mov      %rcx, -10(%rdi)
2030         mov      %edx, -4(%rdi)
2031         ret
2033         ALIGN (4)
2034 L(write_42bytes):
2035         mov     -42(%rsi), %r8
2036         mov     -34(%rsi), %r9
2037         mov     -26(%rsi), %r10
2038         mov     -18(%rsi), %r11
2039         mov     -10(%rsi), %rcx
2040         mov     -4(%rsi), %edx
2041         mov      %r8, -42(%rdi)
2042         mov      %r9, -34(%rdi)
2043         mov      %r10, -26(%rdi)
2044         mov      %r11, -18(%rdi)
2045         mov      %rcx, -10(%rdi)
2046         mov      %edx, -4(%rdi)
2047         ret
2049         ALIGN (4)
2050 L(write_34bytes):
2051         mov     -34(%rsi), %r9
2052         mov     -26(%rsi), %r10
2053         mov     -18(%rsi), %r11
2054         mov     -10(%rsi), %rcx
2055         mov     -4(%rsi), %edx
2056         mov      %r9, -34(%rdi)
2057         mov      %r10, -26(%rdi)
2058         mov      %r11, -18(%rdi)
2059         mov      %rcx, -10(%rdi)
2060         mov      %edx, -4(%rdi)
2061         ret
2063         ALIGN (4)
2064 L(write_26bytes):
2065         mov     -26(%rsi), %r10
2066         mov     -18(%rsi), %r11
2067         mov     -10(%rsi), %rcx
2068         mov     -4(%rsi), %edx
2069         mov      %r10, -26(%rdi)
2070         mov      %r11, -18(%rdi)
2071         mov      %rcx, -10(%rdi)
2072         mov      %edx, -4(%rdi)
2073         ret
2075         ALIGN (4)
2076 L(write_18bytes):
2077         mov     -18(%rsi), %r11
2078         mov     -10(%rsi), %rcx
2079         mov     -4(%rsi), %edx
2080         mov      %r11, -18(%rdi)
2081         mov      %rcx, -10(%rdi)
2082         mov      %edx, -4(%rdi)
2083         ret
2085         ALIGN (4)
2086 L(write_10bytes):
2087         mov     -10(%rsi), %rcx
2088         mov     -4(%rsi), %edx
2089         mov      %rcx, -10(%rdi)
2090         mov      %edx, -4(%rdi)
2091         ret
2093         ALIGN (4)
2094 L(write_2bytes):
2095         mov     -2(%rsi), %dx
2096         mov      %dx, -2(%rdi)
2097         ret
2099         ALIGN (4)
2100 L(write_75bytes):
2101         movdqu  -75(%rsi), %xmm0
2102         movdqu  -59(%rsi), %xmm1
2103         mov     -43(%rsi), %r8
2104         mov     -35(%rsi), %r9
2105         mov     -27(%rsi), %r10
2106         mov     -19(%rsi), %r11
2107         mov     -11(%rsi), %rcx
2108         mov     -4(%rsi), %edx
2109         movdqu   %xmm0, -75(%rdi)
2110         movdqu   %xmm1, -59(%rdi)
2111         mov      %r8, -43(%rdi)
2112         mov      %r9, -35(%rdi)
2113         mov      %r10, -27(%rdi)
2114         mov      %r11, -19(%rdi)
2115         mov      %rcx, -11(%rdi)
2116         mov      %edx, -4(%rdi)
2117         ret
2119         ALIGN (4)
2120 L(write_67bytes):
2121         movdqu  -67(%rsi), %xmm0
2122         movdqu  -59(%rsi), %xmm1
2123         mov     -43(%rsi), %r8
2124         mov     -35(%rsi), %r9
2125         mov     -27(%rsi), %r10
2126         mov     -19(%rsi), %r11
2127         mov     -11(%rsi), %rcx
2128         mov     -4(%rsi), %edx
2129         movdqu   %xmm0, -67(%rdi)
2130         movdqu   %xmm1, -59(%rdi)
2131         mov      %r8, -43(%rdi)
2132         mov      %r9, -35(%rdi)
2133         mov      %r10, -27(%rdi)
2134         mov      %r11, -19(%rdi)
2135         mov      %rcx, -11(%rdi)
2136         mov      %edx, -4(%rdi)
2137         ret
2139         ALIGN (4)
2140 L(write_59bytes):
2141         movdqu  -59(%rsi), %xmm0
2142         mov     -43(%rsi), %r8
2143         mov     -35(%rsi), %r9
2144         mov     -27(%rsi), %r10
2145         mov     -19(%rsi), %r11
2146         mov     -11(%rsi), %rcx
2147         mov     -4(%rsi), %edx
2148         movdqu   %xmm0, -59(%rdi)
2149         mov      %r8, -43(%rdi)
2150         mov      %r9, -35(%rdi)
2151         mov      %r10, -27(%rdi)
2152         mov      %r11, -19(%rdi)
2153         mov      %rcx, -11(%rdi)
2154         mov      %edx, -4(%rdi)
2155         ret
2157         ALIGN (4)
2158 L(write_51bytes):
2159         movdqu  -51(%rsi), %xmm0
2160         mov     -35(%rsi), %r9
2161         mov     -27(%rsi), %r10
2162         mov     -19(%rsi), %r11
2163         mov     -11(%rsi), %rcx
2164         mov     -4(%rsi), %edx
2165         movdqu   %xmm0, -51(%rdi)
2166         mov      %r9, -35(%rdi)
2167         mov      %r10, -27(%rdi)
2168         mov      %r11, -19(%rdi)
2169         mov      %rcx, -11(%rdi)
2170         mov      %edx, -4(%rdi)
2171         ret
2173         ALIGN (4)
2174 L(write_43bytes):
2175         mov     -43(%rsi), %r8
2176         mov     -35(%rsi), %r9
2177         mov     -27(%rsi), %r10
2178         mov     -19(%rsi), %r11
2179         mov     -11(%rsi), %rcx
2180         mov     -4(%rsi), %edx
2181         mov      %r8, -43(%rdi)
2182         mov      %r9, -35(%rdi)
2183         mov      %r10, -27(%rdi)
2184         mov      %r11, -19(%rdi)
2185         mov      %rcx, -11(%rdi)
2186         mov      %edx, -4(%rdi)
2187         ret
2189         ALIGN (4)
2190 L(write_35bytes):
2191         mov     -35(%rsi), %r9
2192         mov     -27(%rsi), %r10
2193         mov     -19(%rsi), %r11
2194         mov     -11(%rsi), %rcx
2195         mov     -4(%rsi), %edx
2196         mov      %r9, -35(%rdi)
2197         mov      %r10, -27(%rdi)
2198         mov      %r11, -19(%rdi)
2199         mov      %rcx, -11(%rdi)
2200         mov      %edx, -4(%rdi)
2201         ret
2203         ALIGN (4)
2204 L(write_27bytes):
2205         mov     -27(%rsi), %r10
2206         mov     -19(%rsi), %r11
2207         mov     -11(%rsi), %rcx
2208         mov     -4(%rsi), %edx
2209         mov      %r10, -27(%rdi)
2210         mov      %r11, -19(%rdi)
2211         mov      %rcx, -11(%rdi)
2212         mov      %edx, -4(%rdi)
2213         ret
2215         ALIGN (4)
2216 L(write_19bytes):
2217         mov     -19(%rsi), %r11
2218         mov     -11(%rsi), %rcx
2219         mov     -4(%rsi), %edx
2220         mov      %r11, -19(%rdi)
2221         mov      %rcx, -11(%rdi)
2222         mov      %edx, -4(%rdi)
2223         ret
2225         ALIGN (4)
2226 L(write_11bytes):
2227         mov     -11(%rsi), %rcx
2228         mov     -4(%rsi), %edx
2229         mov      %rcx, -11(%rdi)
2230         mov      %edx, -4(%rdi)
2231         ret
2233         ALIGN (4)
2234 L(write_3bytes):
2235         mov     -3(%rsi), %dx
2236         mov     -2(%rsi), %cx
2237         mov      %dx, -3(%rdi)
2238         mov      %cx, -2(%rdi)
2239         ret
2241         ALIGN (4)
2242 L(write_76bytes):
2243         movdqu  -76(%rsi), %xmm0
2244         movdqu  -60(%rsi), %xmm1
2245         mov     -44(%rsi), %r8
2246         mov     -36(%rsi), %r9
2247         mov     -28(%rsi), %r10
2248         mov     -20(%rsi), %r11
2249         mov     -12(%rsi), %rcx
2250         mov     -4(%rsi), %edx
2251         movdqu   %xmm0, -76(%rdi)
2252         movdqu   %xmm1, -60(%rdi)
2253         mov      %r8, -44(%rdi)
2254         mov      %r9, -36(%rdi)
2255         mov      %r10, -28(%rdi)
2256         mov      %r11, -20(%rdi)
2257         mov      %rcx, -12(%rdi)
2258         mov      %edx, -4(%rdi)
2259         ret
2261         ALIGN (4)
2262 L(write_68bytes):
2263         movdqu  -68(%rsi), %xmm0
2264         movdqu  -52(%rsi), %xmm1
2265         mov     -36(%rsi), %r9
2266         mov     -28(%rsi), %r10
2267         mov     -20(%rsi), %r11
2268         mov     -12(%rsi), %rcx
2269         mov     -4(%rsi), %edx
2270         movdqu   %xmm0, -68(%rdi)
2271         movdqu   %xmm1, -52(%rdi)
2272         mov      %r9, -36(%rdi)
2273         mov      %r10, -28(%rdi)
2274         mov      %r11, -20(%rdi)
2275         mov      %rcx, -12(%rdi)
2276         mov      %edx, -4(%rdi)
2277         ret
2279         ALIGN (4)
2280 L(write_60bytes):
2281         movdqu  -60(%rsi), %xmm0
2282         mov     -44(%rsi), %r8
2283         mov     -36(%rsi), %r9
2284         mov     -28(%rsi), %r10
2285         mov     -20(%rsi), %r11
2286         mov     -12(%rsi), %rcx
2287         mov     -4(%rsi), %edx
2288         movdqu   %xmm0, -60(%rdi)
2289         mov      %r8, -44(%rdi)
2290         mov      %r9, -36(%rdi)
2291         mov      %r10, -28(%rdi)
2292         mov      %r11, -20(%rdi)
2293         mov      %rcx, -12(%rdi)
2294         mov      %edx, -4(%rdi)
2295         ret
2297         ALIGN (4)
2298 L(write_52bytes):
2299         movdqu  -52(%rsi), %xmm0
2300         mov     -36(%rsi), %r9
2301         mov     -28(%rsi), %r10
2302         mov     -20(%rsi), %r11
2303         mov     -12(%rsi), %rcx
2304         mov     -4(%rsi), %edx
2305         movdqu   %xmm0, -52(%rdi)
2306         mov      %r9, -36(%rdi)
2307         mov      %r10, -28(%rdi)
2308         mov      %r11, -20(%rdi)
2309         mov      %rcx, -12(%rdi)
2310         mov      %edx, -4(%rdi)
2311         ret
2313         ALIGN (4)
2314 L(write_44bytes):
2315         mov     -44(%rsi), %r8
2316         mov     -36(%rsi), %r9
2317         mov     -28(%rsi), %r10
2318         mov     -20(%rsi), %r11
2319         mov     -12(%rsi), %rcx
2320         mov     -4(%rsi), %edx
2321         mov      %r8, -44(%rdi)
2322         mov      %r9, -36(%rdi)
2323         mov      %r10, -28(%rdi)
2324         mov      %r11, -20(%rdi)
2325         mov      %rcx, -12(%rdi)
2326         mov      %edx, -4(%rdi)
2327         ret
2329         ALIGN (4)
2330 L(write_36bytes):
2331         mov     -36(%rsi), %r9
2332         mov     -28(%rsi), %r10
2333         mov     -20(%rsi), %r11
2334         mov     -12(%rsi), %rcx
2335         mov     -4(%rsi), %edx
2336         mov      %r9, -36(%rdi)
2337         mov      %r10, -28(%rdi)
2338         mov      %r11, -20(%rdi)
2339         mov      %rcx, -12(%rdi)
2340         mov      %edx, -4(%rdi)
2341         ret
2343         ALIGN (4)
2344 L(write_28bytes):
2345         mov     -28(%rsi), %r10
2346         mov     -20(%rsi), %r11
2347         mov     -12(%rsi), %rcx
2348         mov     -4(%rsi), %edx
2349         mov      %r10, -28(%rdi)
2350         mov      %r11, -20(%rdi)
2351         mov      %rcx, -12(%rdi)
2352         mov      %edx, -4(%rdi)
2353         ret
2355         ALIGN (4)
2356 L(write_20bytes):
2357         mov     -20(%rsi), %r11
2358         mov     -12(%rsi), %rcx
2359         mov     -4(%rsi), %edx
2360         mov      %r11, -20(%rdi)
2361         mov      %rcx, -12(%rdi)
2362         mov      %edx, -4(%rdi)
2363         ret
2365         ALIGN (4)
2366 L(write_12bytes):
2367         mov     -12(%rsi), %rcx
2368         mov     -4(%rsi), %edx
2369         mov      %rcx, -12(%rdi)
2370         mov      %edx, -4(%rdi)
2371         ret
2373         ALIGN (4)
2374 L(write_4bytes):
2375         mov     -4(%rsi), %edx
2376         mov      %edx, -4(%rdi)
2377         ret
2379         ALIGN (4)
2380 L(write_77bytes):
2381         movdqu  -77(%rsi), %xmm0
2382         movdqu  -61(%rsi), %xmm1
2383         mov     -45(%rsi), %r8
2384         mov     -37(%rsi), %r9
2385         mov     -29(%rsi), %r10
2386         mov     -21(%rsi), %r11
2387         mov     -13(%rsi), %rcx
2388         mov     -8(%rsi), %rdx
2389         movdqu   %xmm0, -77(%rdi)
2390         movdqu   %xmm1, -61(%rdi)
2391         mov      %r8, -45(%rdi)
2392         mov      %r9, -37(%rdi)
2393         mov      %r10, -29(%rdi)
2394         mov      %r11, -21(%rdi)
2395         mov      %rcx, -13(%rdi)
2396         mov      %rdx, -8(%rdi)
2397         ret
2399         ALIGN (4)
2400 L(write_69bytes):
2401         movdqu  -69(%rsi), %xmm0
2402         movdqu  -53(%rsi), %xmm1
2403         mov     -37(%rsi), %r9
2404         mov     -29(%rsi), %r10
2405         mov     -21(%rsi), %r11
2406         mov     -13(%rsi), %rcx
2407         mov     -8(%rsi), %rdx
2408         movdqu   %xmm0, -69(%rdi)
2409         movdqu   %xmm1, -53(%rdi)
2410         mov      %r9, -37(%rdi)
2411         mov      %r10, -29(%rdi)
2412         mov      %r11, -21(%rdi)
2413         mov      %rcx, -13(%rdi)
2414         mov      %rdx, -8(%rdi)
2415         ret
2417         ALIGN (4)
2418 L(write_61bytes):
2419         movdqu  -61(%rsi), %xmm0
2420         mov     -45(%rsi), %r8
2421         mov     -37(%rsi), %r9
2422         mov     -29(%rsi), %r10
2423         mov     -21(%rsi), %r11
2424         mov     -13(%rsi), %rcx
2425         mov     -8(%rsi), %rdx
2426         movdqu   %xmm0, -61(%rdi)
2427         mov      %r8, -45(%rdi)
2428         mov      %r9, -37(%rdi)
2429         mov      %r10, -29(%rdi)
2430         mov      %r11, -21(%rdi)
2431         mov      %rcx, -13(%rdi)
2432         mov      %rdx, -8(%rdi)
2433         ret
2435         ALIGN (4)
2436 L(write_53bytes):
2437         movdqu  -53(%rsi), %xmm0
2438         mov     -45(%rsi), %r8
2439         mov     -37(%rsi), %r9
2440         mov     -29(%rsi), %r10
2441         mov     -21(%rsi), %r11
2442         mov     -13(%rsi), %rcx
2443         mov     -8(%rsi), %rdx
2444         movdqu   %xmm0, -53(%rdi)
2445         mov      %r9, -37(%rdi)
2446         mov      %r10, -29(%rdi)
2447         mov      %r11, -21(%rdi)
2448         mov      %rcx, -13(%rdi)
2449         mov      %rdx, -8(%rdi)
2450         ret
2452         ALIGN (4)
2453 L(write_45bytes):
2454         mov     -45(%rsi), %r8
2455         mov     -37(%rsi), %r9
2456         mov     -29(%rsi), %r10
2457         mov     -21(%rsi), %r11
2458         mov     -13(%rsi), %rcx
2459         mov     -8(%rsi), %rdx
2460         mov      %r8, -45(%rdi)
2461         mov      %r9, -37(%rdi)
2462         mov      %r10, -29(%rdi)
2463         mov      %r11, -21(%rdi)
2464         mov      %rcx, -13(%rdi)
2465         mov      %rdx, -8(%rdi)
2466         ret
2468         ALIGN (4)
2469 L(write_37bytes):
2470         mov     -37(%rsi), %r9
2471         mov     -29(%rsi), %r10
2472         mov     -21(%rsi), %r11
2473         mov     -13(%rsi), %rcx
2474         mov     -8(%rsi), %rdx
2475         mov      %r9, -37(%rdi)
2476         mov      %r10, -29(%rdi)
2477         mov      %r11, -21(%rdi)
2478         mov      %rcx, -13(%rdi)
2479         mov      %rdx, -8(%rdi)
2480         ret
2482         ALIGN (4)
2483 L(write_29bytes):
2484         mov     -29(%rsi), %r10
2485         mov     -21(%rsi), %r11
2486         mov     -13(%rsi), %rcx
2487         mov     -8(%rsi), %rdx
2488         mov      %r10, -29(%rdi)
2489         mov      %r11, -21(%rdi)
2490         mov      %rcx, -13(%rdi)
2491         mov      %rdx, -8(%rdi)
2492         ret
2494         ALIGN (4)
2495 L(write_21bytes):
2496         mov     -21(%rsi), %r11
2497         mov     -13(%rsi), %rcx
2498         mov     -8(%rsi), %rdx
2499         mov      %r11, -21(%rdi)
2500         mov      %rcx, -13(%rdi)
2501         mov      %rdx, -8(%rdi)
2502         ret
2504         ALIGN (4)
2505 L(write_13bytes):
2506         mov     -13(%rsi), %rcx
2507         mov     -8(%rsi), %rdx
2508         mov      %rcx, -13(%rdi)
2509         mov      %rdx, -8(%rdi)
2510         ret
2512         ALIGN (4)
2513 L(write_5bytes):
2514         mov     -5(%rsi), %edx
2515         mov     -4(%rsi), %ecx
2516         mov      %edx, -5(%rdi)
2517         mov      %ecx, -4(%rdi)
2518         ret
2520         ALIGN (4)
2521 L(write_78bytes):
2522         movdqu  -78(%rsi), %xmm0
2523         movdqu  -62(%rsi), %xmm1
2524         mov     -46(%rsi), %r8
2525         mov     -38(%rsi), %r9
2526         mov     -30(%rsi), %r10
2527         mov     -22(%rsi), %r11
2528         mov     -14(%rsi), %rcx
2529         mov     -8(%rsi), %rdx
2530         movdqu   %xmm0, -78(%rdi)
2531         movdqu   %xmm1, -62(%rdi)
2532         mov      %r8, -46(%rdi)
2533         mov      %r9, -38(%rdi)
2534         mov      %r10, -30(%rdi)
2535         mov      %r11, -22(%rdi)
2536         mov      %rcx, -14(%rdi)
2537         mov      %rdx, -8(%rdi)
2538         ret
2540         ALIGN (4)
2541 L(write_70bytes):
2542         movdqu  -70(%rsi), %xmm0
2543         movdqu  -54(%rsi), %xmm1
2544         mov     -38(%rsi), %r9
2545         mov     -30(%rsi), %r10
2546         mov     -22(%rsi), %r11
2547         mov     -14(%rsi), %rcx
2548         mov     -8(%rsi), %rdx
2549         movdqu   %xmm0, -70(%rdi)
2550         movdqu   %xmm1, -54(%rdi)
2551         mov      %r9, -38(%rdi)
2552         mov      %r10, -30(%rdi)
2553         mov      %r11, -22(%rdi)
2554         mov      %rcx, -14(%rdi)
2555         mov      %rdx, -8(%rdi)
2556         ret
2558         ALIGN (4)
2559 L(write_62bytes):
2560         movdqu  -62(%rsi), %xmm0
2561         mov     -46(%rsi), %r8
2562         mov     -38(%rsi), %r9
2563         mov     -30(%rsi), %r10
2564         mov     -22(%rsi), %r11
2565         mov     -14(%rsi), %rcx
2566         mov     -8(%rsi), %rdx
2567         movdqu   %xmm0, -62(%rdi)
2568         mov      %r8, -46(%rdi)
2569         mov      %r9, -38(%rdi)
2570         mov      %r10, -30(%rdi)
2571         mov      %r11, -22(%rdi)
2572         mov      %rcx, -14(%rdi)
2573         mov      %rdx, -8(%rdi)
2574         ret
2576         ALIGN (4)
2577 L(write_54bytes):
2578         movdqu  -54(%rsi), %xmm0
2579         mov     -38(%rsi), %r9
2580         mov     -30(%rsi), %r10
2581         mov     -22(%rsi), %r11
2582         mov     -14(%rsi), %rcx
2583         mov     -8(%rsi), %rdx
2584         movdqu   %xmm0, -54(%rdi)
2585         mov      %r9, -38(%rdi)
2586         mov      %r10, -30(%rdi)
2587         mov      %r11, -22(%rdi)
2588         mov      %rcx, -14(%rdi)
2589         mov      %rdx, -8(%rdi)
2590         ret
2592         ALIGN (4)
2593 L(write_46bytes):
2594         mov     -46(%rsi), %r8
2595         mov     -38(%rsi), %r9
2596         mov     -30(%rsi), %r10
2597         mov     -22(%rsi), %r11
2598         mov     -14(%rsi), %rcx
2599         mov     -8(%rsi), %rdx
2600         mov      %r8, -46(%rdi)
2601         mov      %r9, -38(%rdi)
2602         mov      %r10, -30(%rdi)
2603         mov      %r11, -22(%rdi)
2604         mov      %rcx, -14(%rdi)
2605         mov      %rdx, -8(%rdi)
2606         ret
2608         ALIGN (4)
2609 L(write_38bytes):
2610         mov     -38(%rsi), %r9
2611         mov     -30(%rsi), %r10
2612         mov     -22(%rsi), %r11
2613         mov     -14(%rsi), %rcx
2614         mov     -8(%rsi), %rdx
2615         mov      %r9, -38(%rdi)
2616         mov      %r10, -30(%rdi)
2617         mov      %r11, -22(%rdi)
2618         mov      %rcx, -14(%rdi)
2619         mov      %rdx, -8(%rdi)
2620         ret
2622         ALIGN (4)
2623 L(write_30bytes):
2624         mov     -30(%rsi), %r10
2625         mov     -22(%rsi), %r11
2626         mov     -14(%rsi), %rcx
2627         mov     -8(%rsi), %rdx
2628         mov      %r10, -30(%rdi)
2629         mov      %r11, -22(%rdi)
2630         mov      %rcx, -14(%rdi)
2631         mov      %rdx, -8(%rdi)
2632         ret
2634         ALIGN (4)
2635 L(write_22bytes):
2636         mov     -22(%rsi), %r11
2637         mov     -14(%rsi), %rcx
2638         mov     -8(%rsi), %rdx
2639         mov      %r11, -22(%rdi)
2640         mov      %rcx, -14(%rdi)
2641         mov      %rdx, -8(%rdi)
2642         ret
2644         ALIGN (4)
2645 L(write_14bytes):
2646         mov     -14(%rsi), %rcx
2647         mov     -8(%rsi), %rdx
2648         mov      %rcx, -14(%rdi)
2649         mov      %rdx, -8(%rdi)
2650         ret
2652         ALIGN (4)
2653 L(write_6bytes):
2654         mov     -6(%rsi), %edx
2655         mov     -4(%rsi), %ecx
2656         mov      %edx, -6(%rdi)
2657         mov      %ecx, -4(%rdi)
2658         ret
2660         ALIGN (4)
2661 L(write_79bytes):
2662         movdqu  -79(%rsi), %xmm0
2663         movdqu  -63(%rsi), %xmm1
2664         mov     -47(%rsi), %r8
2665         mov     -39(%rsi), %r9
2666         mov     -31(%rsi), %r10
2667         mov     -23(%rsi), %r11
2668         mov     -15(%rsi), %rcx
2669         mov     -8(%rsi), %rdx
2670         movdqu   %xmm0, -79(%rdi)
2671         movdqu   %xmm1, -63(%rdi)
2672         mov      %r8, -47(%rdi)
2673         mov      %r9, -39(%rdi)
2674         mov      %r10, -31(%rdi)
2675         mov      %r11, -23(%rdi)
2676         mov      %rcx, -15(%rdi)
2677         mov      %rdx, -8(%rdi)
2678         ret
2680         ALIGN (4)
2681 L(write_71bytes):
2682         movdqu  -71(%rsi), %xmm0
2683         movdqu  -55(%rsi), %xmm1
2684         mov     -39(%rsi), %r9
2685         mov     -31(%rsi), %r10
2686         mov     -23(%rsi), %r11
2687         mov     -15(%rsi), %rcx
2688         mov     -8(%rsi), %rdx
2689         movdqu   %xmm0, -71(%rdi)
2690         movdqu   %xmm1, -55(%rdi)
2691         mov      %r9, -39(%rdi)
2692         mov      %r10, -31(%rdi)
2693         mov      %r11, -23(%rdi)
2694         mov      %rcx, -15(%rdi)
2695         mov      %rdx, -8(%rdi)
2696         ret
2698         ALIGN (4)
2699 L(write_63bytes):
2700         movdqu  -63(%rsi), %xmm0
2701         mov     -47(%rsi), %r8
2702         mov     -39(%rsi), %r9
2703         mov     -31(%rsi), %r10
2704         mov     -23(%rsi), %r11
2705         mov     -15(%rsi), %rcx
2706         mov     -8(%rsi), %rdx
2707         movdqu   %xmm0, -63(%rdi)
2708         mov      %r8, -47(%rdi)
2709         mov      %r9, -39(%rdi)
2710         mov      %r10, -31(%rdi)
2711         mov      %r11, -23(%rdi)
2712         mov      %rcx, -15(%rdi)
2713         mov      %rdx, -8(%rdi)
2714         ret
2716         ALIGN (4)
2717 L(write_55bytes):
2718         movdqu  -55(%rsi), %xmm0
2719         mov     -39(%rsi), %r9
2720         mov     -31(%rsi), %r10
2721         mov     -23(%rsi), %r11
2722         mov     -15(%rsi), %rcx
2723         mov     -8(%rsi), %rdx
2724         movdqu   %xmm0, -55(%rdi)
2725         mov      %r9, -39(%rdi)
2726         mov      %r10, -31(%rdi)
2727         mov      %r11, -23(%rdi)
2728         mov      %rcx, -15(%rdi)
2729         mov      %rdx, -8(%rdi)
2730         ret
2732         ALIGN (4)
2733 L(write_47bytes):
2734         mov     -47(%rsi), %r8
2735         mov     -39(%rsi), %r9
2736         mov     -31(%rsi), %r10
2737         mov     -23(%rsi), %r11
2738         mov     -15(%rsi), %rcx
2739         mov     -8(%rsi), %rdx
2740         mov      %r8, -47(%rdi)
2741         mov      %r9, -39(%rdi)
2742         mov      %r10, -31(%rdi)
2743         mov      %r11, -23(%rdi)
2744         mov      %rcx, -15(%rdi)
2745         mov      %rdx, -8(%rdi)
2746         ret
2748         ALIGN (4)
2749 L(write_39bytes):
2750         mov     -39(%rsi), %r9
2751         mov     -31(%rsi), %r10
2752         mov     -23(%rsi), %r11
2753         mov     -15(%rsi), %rcx
2754         mov     -8(%rsi), %rdx
2755         mov      %r9, -39(%rdi)
2756         mov      %r10, -31(%rdi)
2757         mov      %r11, -23(%rdi)
2758         mov      %rcx, -15(%rdi)
2759         mov      %rdx, -8(%rdi)
2760         ret
2762         ALIGN (4)
2763 L(write_31bytes):
2764         mov     -31(%rsi), %r10
2765         mov     -23(%rsi), %r11
2766         mov     -15(%rsi), %rcx
2767         mov     -8(%rsi), %rdx
2768         mov      %r10, -31(%rdi)
2769         mov      %r11, -23(%rdi)
2770         mov      %rcx, -15(%rdi)
2771         mov      %rdx, -8(%rdi)
2772         ret
2774         ALIGN (4)
2775 L(write_23bytes):
2776         mov     -23(%rsi), %r11
2777         mov     -15(%rsi), %rcx
2778         mov     -8(%rsi), %rdx
2779         mov      %r11, -23(%rdi)
2780         mov      %rcx, -15(%rdi)
2781         mov      %rdx, -8(%rdi)
2782         ret
2784         ALIGN (4)
2785 L(write_15bytes):
2786         mov     -15(%rsi), %rcx
2787         mov     -8(%rsi), %rdx
2788         mov      %rcx, -15(%rdi)
2789         mov      %rdx, -8(%rdi)
2790         ret
2792         ALIGN (4)
2793 L(write_7bytes):
2794         mov     -7(%rsi), %edx
2795         mov     -4(%rsi), %ecx
2796         mov      %edx, -7(%rdi)
2797         mov      %ecx, -4(%rdi)
2798         ret
2800         ALIGN (4)
2801 L(large_page_fwd):
2802         movdqu  (%rsi), %xmm1
2803         lea     16(%rsi), %rsi
2804         movdqu  %xmm0, (%r8)
2805         movntdq %xmm1, (%rdi)
2806         lea     16(%rdi), %rdi
2807         lea     -0x90(%rdx), %rdx
2808 #ifdef USE_AS_MEMMOVE
2809         mov     %rsi, %r9
2810         sub     %rdi, %r9
2811         cmp     %rdx, %r9
2812         jae     L(memmove_is_memcpy_fwd)
2813         shl     $2, %rcx
2814         cmp     %rcx, %rdx
2815         jb      L(ll_cache_copy_fwd_start)
2816 L(memmove_is_memcpy_fwd):
2817 #endif
2818 L(large_page_loop):
2819         movdqu  (%rsi), %xmm0
2820         movdqu  0x10(%rsi), %xmm1
2821         movdqu  0x20(%rsi), %xmm2
2822         movdqu  0x30(%rsi), %xmm3
2823         movdqu  0x40(%rsi), %xmm4
2824         movdqu  0x50(%rsi), %xmm5
2825         movdqu  0x60(%rsi), %xmm6
2826         movdqu  0x70(%rsi), %xmm7
2827         lea     0x80(%rsi), %rsi
2829         sub     $0x80, %rdx
2830         movntdq %xmm0, (%rdi)
2831         movntdq %xmm1, 0x10(%rdi)
2832         movntdq %xmm2, 0x20(%rdi)
2833         movntdq %xmm3, 0x30(%rdi)
2834         movntdq %xmm4, 0x40(%rdi)
2835         movntdq %xmm5, 0x50(%rdi)
2836         movntdq %xmm6, 0x60(%rdi)
2837         movntdq %xmm7, 0x70(%rdi)
2838         lea     0x80(%rdi), %rdi
2839         jae     L(large_page_loop)
2840         cmp     $-0x40, %rdx
2841         lea     0x80(%rdx), %rdx
2842         jl      L(large_page_less_64bytes)
2844         movdqu  (%rsi), %xmm0
2845         movdqu  0x10(%rsi), %xmm1
2846         movdqu  0x20(%rsi), %xmm2
2847         movdqu  0x30(%rsi), %xmm3
2848         lea     0x40(%rsi), %rsi
2850         movntdq %xmm0, (%rdi)
2851         movntdq %xmm1, 0x10(%rdi)
2852         movntdq %xmm2, 0x20(%rdi)
2853         movntdq %xmm3, 0x30(%rdi)
2854         lea     0x40(%rdi), %rdi
2855         sub     $0x40, %rdx
2856 L(large_page_less_64bytes):
2857         add     %rdx, %rsi
2858         add     %rdx, %rdi
2859         sfence
2860         BRANCH_TO_JMPTBL_ENTRY (L(table_less_80bytes), %rdx, 4)
2862 #ifdef USE_AS_MEMMOVE
2863         ALIGN (4)
2864 L(ll_cache_copy_fwd_start):
2865         prefetcht0 0x1c0(%rsi)
2866         prefetcht0 0x200(%rsi)
2867         movdqu  (%rsi), %xmm0
2868         movdqu  0x10(%rsi), %xmm1
2869         movdqu  0x20(%rsi), %xmm2
2870         movdqu  0x30(%rsi), %xmm3
2871         movdqu  0x40(%rsi), %xmm4
2872         movdqu  0x50(%rsi), %xmm5
2873         movdqu  0x60(%rsi), %xmm6
2874         movdqu  0x70(%rsi), %xmm7
2875         lea     0x80(%rsi), %rsi
2877         sub     $0x80, %rdx
2878         movaps  %xmm0, (%rdi)
2879         movaps  %xmm1, 0x10(%rdi)
2880         movaps  %xmm2, 0x20(%rdi)
2881         movaps  %xmm3, 0x30(%rdi)
2882         movaps  %xmm4, 0x40(%rdi)
2883         movaps  %xmm5, 0x50(%rdi)
2884         movaps  %xmm6, 0x60(%rdi)
2885         movaps  %xmm7, 0x70(%rdi)
2886         lea     0x80(%rdi), %rdi
2887         jae     L(ll_cache_copy_fwd_start)
2888         cmp     $-0x40, %rdx
2889         lea     0x80(%rdx), %rdx
2890         jl      L(large_page_ll_less_fwd_64bytes)
2892         movdqu  (%rsi), %xmm0
2893         movdqu  0x10(%rsi), %xmm1
2894         movdqu  0x20(%rsi), %xmm2
2895         movdqu  0x30(%rsi), %xmm3
2896         lea     0x40(%rsi), %rsi
2898         movaps  %xmm0, (%rdi)
2899         movaps  %xmm1, 0x10(%rdi)
2900         movaps  %xmm2, 0x20(%rdi)
2901         movaps  %xmm3, 0x30(%rdi)
2902         lea     0x40(%rdi), %rdi
2903         sub     $0x40, %rdx
2904 L(large_page_ll_less_fwd_64bytes):
2905         add     %rdx, %rsi
2906         add     %rdx, %rdi
2907         BRANCH_TO_JMPTBL_ENTRY (L(table_less_80bytes), %rdx, 4)
2909 #endif
2910         ALIGN (4)
2911 L(large_page_bwd):
2912         movdqu  -0x10(%rsi), %xmm1
2913         lea     -16(%rsi), %rsi
2914         movdqu  %xmm0, (%r8)
2915         movdqa  %xmm1, -0x10(%rdi)
2916         lea     -16(%rdi), %rdi
2917         lea     -0x90(%rdx), %rdx
2918 #ifdef USE_AS_MEMMOVE
2919         mov     %rdi, %r9
2920         sub     %rsi, %r9
2921         cmp     %rdx, %r9
2922         jae     L(memmove_is_memcpy_bwd)
2923         cmp     %rcx, %r9
2924         jb      L(ll_cache_copy_bwd_start)
2925 L(memmove_is_memcpy_bwd):
2926 #endif
2927 L(large_page_bwd_loop):
2928         movdqu  -0x10(%rsi), %xmm0
2929         movdqu  -0x20(%rsi), %xmm1
2930         movdqu  -0x30(%rsi), %xmm2
2931         movdqu  -0x40(%rsi), %xmm3
2932         movdqu  -0x50(%rsi), %xmm4
2933         movdqu  -0x60(%rsi), %xmm5
2934         movdqu  -0x70(%rsi), %xmm6
2935         movdqu  -0x80(%rsi), %xmm7
2936         lea     -0x80(%rsi), %rsi
2938         sub     $0x80, %rdx
2939         movntdq %xmm0, -0x10(%rdi)
2940         movntdq %xmm1, -0x20(%rdi)
2941         movntdq %xmm2, -0x30(%rdi)
2942         movntdq %xmm3, -0x40(%rdi)
2943         movntdq %xmm4, -0x50(%rdi)
2944         movntdq %xmm5, -0x60(%rdi)
2945         movntdq %xmm6, -0x70(%rdi)
2946         movntdq %xmm7, -0x80(%rdi)
2947         lea     -0x80(%rdi), %rdi
2948         jae     L(large_page_bwd_loop)
2949         cmp     $-0x40, %rdx
2950         lea     0x80(%rdx), %rdx
2951         jl      L(large_page_less_bwd_64bytes)
2953         movdqu  -0x10(%rsi), %xmm0
2954         movdqu  -0x20(%rsi), %xmm1
2955         movdqu  -0x30(%rsi), %xmm2
2956         movdqu  -0x40(%rsi), %xmm3
2957         lea     -0x40(%rsi), %rsi
2959         movntdq %xmm0, -0x10(%rdi)
2960         movntdq %xmm1, -0x20(%rdi)
2961         movntdq %xmm2, -0x30(%rdi)
2962         movntdq %xmm3, -0x40(%rdi)
2963         lea     -0x40(%rdi), %rdi
2964         sub     $0x40, %rdx
2965 L(large_page_less_bwd_64bytes):
2966         sfence
2967         BRANCH_TO_JMPTBL_ENTRY (L(table_less_80bytes), %rdx, 4)
2969 #ifdef USE_AS_MEMMOVE
2970         ALIGN (4)
2971 L(ll_cache_copy_bwd_start):
2972         prefetcht0 -0x1c0(%rsi)
2973         prefetcht0 -0x200(%rsi)
2974         movdqu  -0x10(%rsi), %xmm0
2975         movdqu  -0x20(%rsi), %xmm1
2976         movdqu  -0x30(%rsi), %xmm2
2977         movdqu  -0x40(%rsi), %xmm3
2978         movdqu  -0x50(%rsi), %xmm4
2979         movdqu  -0x60(%rsi), %xmm5
2980         movdqu  -0x70(%rsi), %xmm6
2981         movdqu  -0x80(%rsi), %xmm7
2982         lea     -0x80(%rsi), %rsi
2984         sub     $0x80, %rdx
2985         movaps  %xmm0, -0x10(%rdi)
2986         movaps  %xmm1, -0x20(%rdi)
2987         movaps  %xmm2, -0x30(%rdi)
2988         movaps  %xmm3, -0x40(%rdi)
2989         movaps  %xmm4, -0x50(%rdi)
2990         movaps  %xmm5, -0x60(%rdi)
2991         movaps  %xmm6, -0x70(%rdi)
2992         movaps  %xmm7, -0x80(%rdi)
2993         lea     -0x80(%rdi), %rdi
2994         jae     L(ll_cache_copy_bwd_start)
2995         cmp     $-0x40, %rdx
2996         lea     0x80(%rdx), %rdx
2997         jl      L(large_page_ll_less_bwd_64bytes)
2999         movdqu  -0x10(%rsi), %xmm0
3000         movdqu  -0x20(%rsi), %xmm1
3001         movdqu  -0x30(%rsi), %xmm2
3002         movdqu  -0x40(%rsi), %xmm3
3003         lea     -0x40(%rsi), %rsi
3005         movaps  %xmm0, -0x10(%rdi)
3006         movaps  %xmm1, -0x20(%rdi)
3007         movaps  %xmm2, -0x30(%rdi)
3008         movaps  %xmm3, -0x40(%rdi)
3009         lea     -0x40(%rdi), %rdi
3010         sub     $0x40, %rdx
3011 L(large_page_ll_less_bwd_64bytes):
3012         BRANCH_TO_JMPTBL_ENTRY (L(table_less_80bytes), %rdx, 4)
3013 #endif
3015 END (MEMCPY)
3017         .section .rodata.ssse3,"a",@progbits
3018         ALIGN (3)
3019 L(table_less_80bytes):
3020         .int    JMPTBL (L(write_0bytes), L(table_less_80bytes))
3021         .int    JMPTBL (L(write_1bytes), L(table_less_80bytes))
3022         .int    JMPTBL (L(write_2bytes), L(table_less_80bytes))
3023         .int    JMPTBL (L(write_3bytes), L(table_less_80bytes))
3024         .int    JMPTBL (L(write_4bytes), L(table_less_80bytes))
3025         .int    JMPTBL (L(write_5bytes), L(table_less_80bytes))
3026         .int    JMPTBL (L(write_6bytes), L(table_less_80bytes))
3027         .int    JMPTBL (L(write_7bytes), L(table_less_80bytes))
3028         .int    JMPTBL (L(write_8bytes), L(table_less_80bytes))
3029         .int    JMPTBL (L(write_9bytes), L(table_less_80bytes))
3030         .int    JMPTBL (L(write_10bytes), L(table_less_80bytes))
3031         .int    JMPTBL (L(write_11bytes), L(table_less_80bytes))
3032         .int    JMPTBL (L(write_12bytes), L(table_less_80bytes))
3033         .int    JMPTBL (L(write_13bytes), L(table_less_80bytes))
3034         .int    JMPTBL (L(write_14bytes), L(table_less_80bytes))
3035         .int    JMPTBL (L(write_15bytes), L(table_less_80bytes))
3036         .int    JMPTBL (L(write_16bytes), L(table_less_80bytes))
3037         .int    JMPTBL (L(write_17bytes), L(table_less_80bytes))
3038         .int    JMPTBL (L(write_18bytes), L(table_less_80bytes))
3039         .int    JMPTBL (L(write_19bytes), L(table_less_80bytes))
3040         .int    JMPTBL (L(write_20bytes), L(table_less_80bytes))
3041         .int    JMPTBL (L(write_21bytes), L(table_less_80bytes))
3042         .int    JMPTBL (L(write_22bytes), L(table_less_80bytes))
3043         .int    JMPTBL (L(write_23bytes), L(table_less_80bytes))
3044         .int    JMPTBL (L(write_24bytes), L(table_less_80bytes))
3045         .int    JMPTBL (L(write_25bytes), L(table_less_80bytes))
3046         .int    JMPTBL (L(write_26bytes), L(table_less_80bytes))
3047         .int    JMPTBL (L(write_27bytes), L(table_less_80bytes))
3048         .int    JMPTBL (L(write_28bytes), L(table_less_80bytes))
3049         .int    JMPTBL (L(write_29bytes), L(table_less_80bytes))
3050         .int    JMPTBL (L(write_30bytes), L(table_less_80bytes))
3051         .int    JMPTBL (L(write_31bytes), L(table_less_80bytes))
3052         .int    JMPTBL (L(write_32bytes), L(table_less_80bytes))
3053         .int    JMPTBL (L(write_33bytes), L(table_less_80bytes))
3054         .int    JMPTBL (L(write_34bytes), L(table_less_80bytes))
3055         .int    JMPTBL (L(write_35bytes), L(table_less_80bytes))
3056         .int    JMPTBL (L(write_36bytes), L(table_less_80bytes))
3057         .int    JMPTBL (L(write_37bytes), L(table_less_80bytes))
3058         .int    JMPTBL (L(write_38bytes), L(table_less_80bytes))
3059         .int    JMPTBL (L(write_39bytes), L(table_less_80bytes))
3060         .int    JMPTBL (L(write_40bytes), L(table_less_80bytes))
3061         .int    JMPTBL (L(write_41bytes), L(table_less_80bytes))
3062         .int    JMPTBL (L(write_42bytes), L(table_less_80bytes))
3063         .int    JMPTBL (L(write_43bytes), L(table_less_80bytes))
3064         .int    JMPTBL (L(write_44bytes), L(table_less_80bytes))
3065         .int    JMPTBL (L(write_45bytes), L(table_less_80bytes))
3066         .int    JMPTBL (L(write_46bytes), L(table_less_80bytes))
3067         .int    JMPTBL (L(write_47bytes), L(table_less_80bytes))
3068         .int    JMPTBL (L(write_48bytes), L(table_less_80bytes))
3069         .int    JMPTBL (L(write_49bytes), L(table_less_80bytes))
3070         .int    JMPTBL (L(write_50bytes), L(table_less_80bytes))
3071         .int    JMPTBL (L(write_51bytes), L(table_less_80bytes))
3072         .int    JMPTBL (L(write_52bytes), L(table_less_80bytes))
3073         .int    JMPTBL (L(write_53bytes), L(table_less_80bytes))
3074         .int    JMPTBL (L(write_54bytes), L(table_less_80bytes))
3075         .int    JMPTBL (L(write_55bytes), L(table_less_80bytes))
3076         .int    JMPTBL (L(write_56bytes), L(table_less_80bytes))
3077         .int    JMPTBL (L(write_57bytes), L(table_less_80bytes))
3078         .int    JMPTBL (L(write_58bytes), L(table_less_80bytes))
3079         .int    JMPTBL (L(write_59bytes), L(table_less_80bytes))
3080         .int    JMPTBL (L(write_60bytes), L(table_less_80bytes))
3081         .int    JMPTBL (L(write_61bytes), L(table_less_80bytes))
3082         .int    JMPTBL (L(write_62bytes), L(table_less_80bytes))
3083         .int    JMPTBL (L(write_63bytes), L(table_less_80bytes))
3084         .int    JMPTBL (L(write_64bytes), L(table_less_80bytes))
3085         .int    JMPTBL (L(write_65bytes), L(table_less_80bytes))
3086         .int    JMPTBL (L(write_66bytes), L(table_less_80bytes))
3087         .int    JMPTBL (L(write_67bytes), L(table_less_80bytes))
3088         .int    JMPTBL (L(write_68bytes), L(table_less_80bytes))
3089         .int    JMPTBL (L(write_69bytes), L(table_less_80bytes))
3090         .int    JMPTBL (L(write_70bytes), L(table_less_80bytes))
3091         .int    JMPTBL (L(write_71bytes), L(table_less_80bytes))
3092         .int    JMPTBL (L(write_72bytes), L(table_less_80bytes))
3093         .int    JMPTBL (L(write_73bytes), L(table_less_80bytes))
3094         .int    JMPTBL (L(write_74bytes), L(table_less_80bytes))
3095         .int    JMPTBL (L(write_75bytes), L(table_less_80bytes))
3096         .int    JMPTBL (L(write_76bytes), L(table_less_80bytes))
3097         .int    JMPTBL (L(write_77bytes), L(table_less_80bytes))
3098         .int    JMPTBL (L(write_78bytes), L(table_less_80bytes))
3099         .int    JMPTBL (L(write_79bytes), L(table_less_80bytes))
3101         ALIGN (3)
3102 L(shl_table):
3103         .int    JMPTBL (L(shl_0), L(shl_table))
3104         .int    JMPTBL (L(shl_1), L(shl_table))
3105         .int    JMPTBL (L(shl_2), L(shl_table))
3106         .int    JMPTBL (L(shl_3), L(shl_table))
3107         .int    JMPTBL (L(shl_4), L(shl_table))
3108         .int    JMPTBL (L(shl_5), L(shl_table))
3109         .int    JMPTBL (L(shl_6), L(shl_table))
3110         .int    JMPTBL (L(shl_7), L(shl_table))
3111         .int    JMPTBL (L(shl_8), L(shl_table))
3112         .int    JMPTBL (L(shl_9), L(shl_table))
3113         .int    JMPTBL (L(shl_10), L(shl_table))
3114         .int    JMPTBL (L(shl_11), L(shl_table))
3115         .int    JMPTBL (L(shl_12), L(shl_table))
3116         .int    JMPTBL (L(shl_13), L(shl_table))
3117         .int    JMPTBL (L(shl_14), L(shl_table))
3118         .int    JMPTBL (L(shl_15), L(shl_table))
3120         ALIGN (3)
3121 L(shl_table_bwd):
3122         .int    JMPTBL (L(shl_0_bwd), L(shl_table_bwd))
3123         .int    JMPTBL (L(shl_1_bwd), L(shl_table_bwd))
3124         .int    JMPTBL (L(shl_2_bwd), L(shl_table_bwd))
3125         .int    JMPTBL (L(shl_3_bwd), L(shl_table_bwd))
3126         .int    JMPTBL (L(shl_4_bwd), L(shl_table_bwd))
3127         .int    JMPTBL (L(shl_5_bwd), L(shl_table_bwd))
3128         .int    JMPTBL (L(shl_6_bwd), L(shl_table_bwd))
3129         .int    JMPTBL (L(shl_7_bwd), L(shl_table_bwd))
3130         .int    JMPTBL (L(shl_8_bwd), L(shl_table_bwd))
3131         .int    JMPTBL (L(shl_9_bwd), L(shl_table_bwd))
3132         .int    JMPTBL (L(shl_10_bwd), L(shl_table_bwd))
3133         .int    JMPTBL (L(shl_11_bwd), L(shl_table_bwd))
3134         .int    JMPTBL (L(shl_12_bwd), L(shl_table_bwd))
3135         .int    JMPTBL (L(shl_13_bwd), L(shl_table_bwd))
3136         .int    JMPTBL (L(shl_14_bwd), L(shl_table_bwd))
3137         .int    JMPTBL (L(shl_15_bwd), L(shl_table_bwd))
3139 #endif