1*8d67ca89SAndroid Build Coastguard Worker/* 2*8d67ca89SAndroid Build Coastguard WorkerCopyright (c) 2014, Intel Corporation 3*8d67ca89SAndroid Build Coastguard WorkerAll rights reserved. 4*8d67ca89SAndroid Build Coastguard Worker 5*8d67ca89SAndroid Build Coastguard WorkerRedistribution and use in source and binary forms, with or without 6*8d67ca89SAndroid Build Coastguard Workermodification, are permitted provided that the following conditions are met: 7*8d67ca89SAndroid Build Coastguard Worker 8*8d67ca89SAndroid Build Coastguard Worker * Redistributions of source code must retain the above copyright notice, 9*8d67ca89SAndroid Build Coastguard Worker * this list of conditions and the following disclaimer. 10*8d67ca89SAndroid Build Coastguard Worker 11*8d67ca89SAndroid Build Coastguard Worker * Redistributions in binary form must reproduce the above copyright notice, 12*8d67ca89SAndroid Build Coastguard Worker * this list of conditions and the following disclaimer in the documentation 13*8d67ca89SAndroid Build Coastguard Worker * and/or other materials provided with the distribution. 14*8d67ca89SAndroid Build Coastguard Worker 15*8d67ca89SAndroid Build Coastguard Worker * Neither the name of Intel Corporation nor the names of its contributors 16*8d67ca89SAndroid Build Coastguard Worker * may be used to endorse or promote products derived from this software 17*8d67ca89SAndroid Build Coastguard Worker * without specific prior written permission. 18*8d67ca89SAndroid Build Coastguard Worker 19*8d67ca89SAndroid Build Coastguard WorkerTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 20*8d67ca89SAndroid Build Coastguard WorkerANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 21*8d67ca89SAndroid Build Coastguard WorkerWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22*8d67ca89SAndroid Build Coastguard WorkerDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 23*8d67ca89SAndroid Build Coastguard WorkerANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 24*8d67ca89SAndroid Build Coastguard Worker(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 25*8d67ca89SAndroid Build Coastguard WorkerLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 26*8d67ca89SAndroid Build Coastguard WorkerANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27*8d67ca89SAndroid Build Coastguard Worker(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 28*8d67ca89SAndroid Build Coastguard WorkerSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29*8d67ca89SAndroid Build Coastguard Worker*/ 30*8d67ca89SAndroid Build Coastguard Worker 31*8d67ca89SAndroid Build Coastguard Worker#ifndef USE_AS_STRCAT 32*8d67ca89SAndroid Build Coastguard Worker 33*8d67ca89SAndroid Build Coastguard Worker# ifndef STRCPY 34*8d67ca89SAndroid Build Coastguard Worker# define STRCPY strcpy 35*8d67ca89SAndroid Build Coastguard Worker# endif 36*8d67ca89SAndroid Build Coastguard Worker 37*8d67ca89SAndroid Build Coastguard Worker# ifndef L 38*8d67ca89SAndroid Build Coastguard Worker# define L(label) .L##label 39*8d67ca89SAndroid Build Coastguard Worker# endif 40*8d67ca89SAndroid Build Coastguard Worker 41*8d67ca89SAndroid Build Coastguard Worker# ifndef cfi_startproc 42*8d67ca89SAndroid Build Coastguard Worker# define cfi_startproc .cfi_startproc 43*8d67ca89SAndroid Build Coastguard Worker# endif 44*8d67ca89SAndroid Build Coastguard Worker 45*8d67ca89SAndroid Build Coastguard Worker# ifndef cfi_endproc 46*8d67ca89SAndroid Build Coastguard Worker# define cfi_endproc .cfi_endproc 47*8d67ca89SAndroid Build Coastguard Worker# endif 48*8d67ca89SAndroid Build Coastguard Worker 49*8d67ca89SAndroid Build Coastguard Worker# ifndef ENTRY 50*8d67ca89SAndroid Build Coastguard Worker# define ENTRY(name) \ 51*8d67ca89SAndroid Build Coastguard Worker .type name, @function; \ 52*8d67ca89SAndroid Build Coastguard Worker .globl name; \ 53*8d67ca89SAndroid Build Coastguard Worker .p2align 4; \ 54*8d67ca89SAndroid Build Coastguard Workername: \ 55*8d67ca89SAndroid Build Coastguard Worker cfi_startproc 56*8d67ca89SAndroid Build Coastguard Worker# endif 57*8d67ca89SAndroid Build Coastguard Worker 58*8d67ca89SAndroid Build Coastguard Worker# ifndef END 59*8d67ca89SAndroid Build Coastguard Worker# define END(name) \ 60*8d67ca89SAndroid Build Coastguard Worker cfi_endproc; \ 61*8d67ca89SAndroid Build Coastguard Worker .size name, .-name 62*8d67ca89SAndroid Build Coastguard Worker# endif 63*8d67ca89SAndroid Build Coastguard Worker 64*8d67ca89SAndroid Build Coastguard Worker#endif 65*8d67ca89SAndroid Build Coastguard Worker 66*8d67ca89SAndroid Build Coastguard Worker#define JMPTBL(I, B) I - B 67*8d67ca89SAndroid Build Coastguard Worker#define BRANCH_TO_JMPTBL_ENTRY(TABLE, INDEX, SCALE) \ 68*8d67ca89SAndroid Build Coastguard Worker lea TABLE(%rip), %r11; \ 69*8d67ca89SAndroid Build Coastguard Worker movslq (%r11, INDEX, SCALE), %rcx; \ 70*8d67ca89SAndroid Build Coastguard Worker lea (%r11, %rcx), %rcx; \ 71*8d67ca89SAndroid Build Coastguard Worker jmp *%rcx 72*8d67ca89SAndroid Build Coastguard Worker 73*8d67ca89SAndroid Build Coastguard Worker#ifndef USE_AS_STRCAT 74*8d67ca89SAndroid Build Coastguard Worker 75*8d67ca89SAndroid Build Coastguard Worker# define RETURN ret 76*8d67ca89SAndroid Build Coastguard Worker 77*8d67ca89SAndroid Build Coastguard Worker.text 78*8d67ca89SAndroid Build Coastguard WorkerENTRY (STRCPY) 79*8d67ca89SAndroid Build Coastguard Worker# ifdef USE_AS_STRNCPY 80*8d67ca89SAndroid Build Coastguard Worker mov %rdx, %r8 81*8d67ca89SAndroid Build Coastguard Worker test %r8, %r8 82*8d67ca89SAndroid Build Coastguard Worker jz L(ExitZero) 83*8d67ca89SAndroid Build Coastguard Worker# endif 84*8d67ca89SAndroid Build Coastguard Worker mov %rsi, %rcx 85*8d67ca89SAndroid Build Coastguard Worker# ifndef USE_AS_STPCPY 86*8d67ca89SAndroid Build Coastguard Worker mov %rdi, %rax /* save result */ 87*8d67ca89SAndroid Build Coastguard Worker# endif 88*8d67ca89SAndroid Build Coastguard Worker 89*8d67ca89SAndroid Build Coastguard Worker#endif 90*8d67ca89SAndroid Build Coastguard Worker and $63, %rcx 91*8d67ca89SAndroid Build Coastguard Worker cmp $32, %rcx 92*8d67ca89SAndroid Build Coastguard Worker jbe L(SourceStringAlignmentLess32) 93*8d67ca89SAndroid Build Coastguard Worker 94*8d67ca89SAndroid Build Coastguard Worker and $-16, %rsi 95*8d67ca89SAndroid Build Coastguard Worker and $15, %rcx 96*8d67ca89SAndroid Build Coastguard Worker pxor %xmm0, %xmm0 97*8d67ca89SAndroid Build Coastguard Worker pxor %xmm1, %xmm1 98*8d67ca89SAndroid Build Coastguard Worker 99*8d67ca89SAndroid Build Coastguard Worker pcmpeqb (%rsi), %xmm1 100*8d67ca89SAndroid Build Coastguard Worker pmovmskb %xmm1, %rdx 101*8d67ca89SAndroid Build Coastguard Worker shr %cl, %rdx 102*8d67ca89SAndroid Build Coastguard Worker#ifdef USE_AS_STRNCPY 103*8d67ca89SAndroid Build Coastguard Worker# if defined USE_AS_STPCPY || defined USE_AS_STRCAT 104*8d67ca89SAndroid Build Coastguard Worker mov $16, %r10 105*8d67ca89SAndroid Build Coastguard Worker sub %rcx, %r10 106*8d67ca89SAndroid Build Coastguard Worker cmp %r10, %r8 107*8d67ca89SAndroid Build Coastguard Worker# else 108*8d67ca89SAndroid Build Coastguard Worker mov $17, %r10 109*8d67ca89SAndroid Build Coastguard Worker sub %rcx, %r10 110*8d67ca89SAndroid Build Coastguard Worker cmp %r10, %r8 111*8d67ca89SAndroid Build Coastguard Worker# endif 112*8d67ca89SAndroid Build Coastguard Worker jbe L(CopyFrom1To16BytesTailCase2OrCase3) 113*8d67ca89SAndroid Build Coastguard Worker#endif 114*8d67ca89SAndroid Build Coastguard Worker test %rdx, %rdx 115*8d67ca89SAndroid Build Coastguard Worker jnz L(CopyFrom1To16BytesTail) 116*8d67ca89SAndroid Build Coastguard Worker 117*8d67ca89SAndroid Build Coastguard Worker pcmpeqb 16(%rsi), %xmm0 118*8d67ca89SAndroid Build Coastguard Worker pmovmskb %xmm0, %rdx 119*8d67ca89SAndroid Build Coastguard Worker#ifdef USE_AS_STRNCPY 120*8d67ca89SAndroid Build Coastguard Worker add $16, %r10 121*8d67ca89SAndroid Build Coastguard Worker cmp %r10, %r8 122*8d67ca89SAndroid Build Coastguard Worker jbe L(CopyFrom1To32BytesCase2OrCase3) 123*8d67ca89SAndroid Build Coastguard Worker#endif 124*8d67ca89SAndroid Build Coastguard Worker test %rdx, %rdx 125*8d67ca89SAndroid Build Coastguard Worker jnz L(CopyFrom1To32Bytes) 126*8d67ca89SAndroid Build Coastguard Worker 127*8d67ca89SAndroid Build Coastguard Worker movdqu (%rsi, %rcx), %xmm1 /* copy 16 bytes */ 128*8d67ca89SAndroid Build Coastguard Worker movdqu %xmm1, (%rdi) 129*8d67ca89SAndroid Build Coastguard Worker 130*8d67ca89SAndroid Build Coastguard Worker/* If source adress alignment != destination adress alignment */ 131*8d67ca89SAndroid Build Coastguard Worker .p2align 4 132*8d67ca89SAndroid Build Coastguard WorkerL(Unalign16Both): 133*8d67ca89SAndroid Build Coastguard Worker sub %rcx, %rdi 134*8d67ca89SAndroid Build Coastguard Worker#ifdef USE_AS_STRNCPY 135*8d67ca89SAndroid Build Coastguard Worker add %rcx, %r8 136*8d67ca89SAndroid Build Coastguard Worker#endif 137*8d67ca89SAndroid Build Coastguard Worker mov $16, %rcx 138*8d67ca89SAndroid Build Coastguard Worker movdqa (%rsi, %rcx), %xmm1 139*8d67ca89SAndroid Build Coastguard Worker movaps 16(%rsi, %rcx), %xmm2 140*8d67ca89SAndroid Build Coastguard Worker movdqu %xmm1, (%rdi, %rcx) 141*8d67ca89SAndroid Build Coastguard Worker pcmpeqb %xmm2, %xmm0 142*8d67ca89SAndroid Build Coastguard Worker pmovmskb %xmm0, %rdx 143*8d67ca89SAndroid Build Coastguard Worker add $16, %rcx 144*8d67ca89SAndroid Build Coastguard Worker#ifdef USE_AS_STRNCPY 145*8d67ca89SAndroid Build Coastguard Worker sub $48, %r8 146*8d67ca89SAndroid Build Coastguard Worker jbe L(CopyFrom1To16BytesCase2OrCase3) 147*8d67ca89SAndroid Build Coastguard Worker#endif 148*8d67ca89SAndroid Build Coastguard Worker test %rdx, %rdx 149*8d67ca89SAndroid Build Coastguard Worker#if defined USE_AS_STRNCPY && !defined USE_AS_STRCAT 150*8d67ca89SAndroid Build Coastguard Worker jnz L(CopyFrom1To16BytesUnalignedXmm2) 151*8d67ca89SAndroid Build Coastguard Worker#else 152*8d67ca89SAndroid Build Coastguard Worker jnz L(CopyFrom1To16Bytes) 153*8d67ca89SAndroid Build Coastguard Worker#endif 154*8d67ca89SAndroid Build Coastguard Worker 155*8d67ca89SAndroid Build Coastguard Worker movaps 16(%rsi, %rcx), %xmm3 156*8d67ca89SAndroid Build Coastguard Worker movdqu %xmm2, (%rdi, %rcx) 157*8d67ca89SAndroid Build Coastguard Worker pcmpeqb %xmm3, %xmm0 158*8d67ca89SAndroid Build Coastguard Worker pmovmskb %xmm0, %rdx 159*8d67ca89SAndroid Build Coastguard Worker add $16, %rcx 160*8d67ca89SAndroid Build Coastguard Worker#ifdef USE_AS_STRNCPY 161*8d67ca89SAndroid Build Coastguard Worker sub $16, %r8 162*8d67ca89SAndroid Build Coastguard Worker jbe L(CopyFrom1To16BytesCase2OrCase3) 163*8d67ca89SAndroid Build Coastguard Worker#endif 164*8d67ca89SAndroid Build Coastguard Worker test %rdx, %rdx 165*8d67ca89SAndroid Build Coastguard Worker#if defined USE_AS_STRNCPY && !defined USE_AS_STRCAT 166*8d67ca89SAndroid Build Coastguard Worker jnz L(CopyFrom1To16BytesUnalignedXmm3) 167*8d67ca89SAndroid Build Coastguard Worker#else 168*8d67ca89SAndroid Build Coastguard Worker jnz L(CopyFrom1To16Bytes) 169*8d67ca89SAndroid Build Coastguard Worker#endif 170*8d67ca89SAndroid Build Coastguard Worker 171*8d67ca89SAndroid Build Coastguard Worker movaps 16(%rsi, %rcx), %xmm4 172*8d67ca89SAndroid Build Coastguard Worker movdqu %xmm3, (%rdi, %rcx) 173*8d67ca89SAndroid Build Coastguard Worker pcmpeqb %xmm4, %xmm0 174*8d67ca89SAndroid Build Coastguard Worker pmovmskb %xmm0, %rdx 175*8d67ca89SAndroid Build Coastguard Worker add $16, %rcx 176*8d67ca89SAndroid Build Coastguard Worker#ifdef USE_AS_STRNCPY 177*8d67ca89SAndroid Build Coastguard Worker sub $16, %r8 178*8d67ca89SAndroid Build Coastguard Worker jbe L(CopyFrom1To16BytesCase2OrCase3) 179*8d67ca89SAndroid Build Coastguard Worker#endif 180*8d67ca89SAndroid Build Coastguard Worker test %rdx, %rdx 181*8d67ca89SAndroid Build Coastguard Worker#if defined USE_AS_STRNCPY && !defined USE_AS_STRCAT 182*8d67ca89SAndroid Build Coastguard Worker jnz L(CopyFrom1To16BytesUnalignedXmm4) 183*8d67ca89SAndroid Build Coastguard Worker#else 184*8d67ca89SAndroid Build Coastguard Worker jnz L(CopyFrom1To16Bytes) 185*8d67ca89SAndroid Build Coastguard Worker#endif 186*8d67ca89SAndroid Build Coastguard Worker 187*8d67ca89SAndroid Build Coastguard Worker movaps 16(%rsi, %rcx), %xmm1 188*8d67ca89SAndroid Build Coastguard Worker movdqu %xmm4, (%rdi, %rcx) 189*8d67ca89SAndroid Build Coastguard Worker pcmpeqb %xmm1, %xmm0 190*8d67ca89SAndroid Build Coastguard Worker pmovmskb %xmm0, %rdx 191*8d67ca89SAndroid Build Coastguard Worker add $16, %rcx 192*8d67ca89SAndroid Build Coastguard Worker#ifdef USE_AS_STRNCPY 193*8d67ca89SAndroid Build Coastguard Worker sub $16, %r8 194*8d67ca89SAndroid Build Coastguard Worker jbe L(CopyFrom1To16BytesCase2OrCase3) 195*8d67ca89SAndroid Build Coastguard Worker#endif 196*8d67ca89SAndroid Build Coastguard Worker test %rdx, %rdx 197*8d67ca89SAndroid Build Coastguard Worker#if defined USE_AS_STRNCPY && !defined USE_AS_STRCAT 198*8d67ca89SAndroid Build Coastguard Worker jnz L(CopyFrom1To16BytesUnalignedXmm1) 199*8d67ca89SAndroid Build Coastguard Worker#else 200*8d67ca89SAndroid Build Coastguard Worker jnz L(CopyFrom1To16Bytes) 201*8d67ca89SAndroid Build Coastguard Worker#endif 202*8d67ca89SAndroid Build Coastguard Worker 203*8d67ca89SAndroid Build Coastguard Worker movaps 16(%rsi, %rcx), %xmm2 204*8d67ca89SAndroid Build Coastguard Worker movdqu %xmm1, (%rdi, %rcx) 205*8d67ca89SAndroid Build Coastguard Worker pcmpeqb %xmm2, %xmm0 206*8d67ca89SAndroid Build Coastguard Worker pmovmskb %xmm0, %rdx 207*8d67ca89SAndroid Build Coastguard Worker add $16, %rcx 208*8d67ca89SAndroid Build Coastguard Worker#ifdef USE_AS_STRNCPY 209*8d67ca89SAndroid Build Coastguard Worker sub $16, %r8 210*8d67ca89SAndroid Build Coastguard Worker jbe L(CopyFrom1To16BytesCase2OrCase3) 211*8d67ca89SAndroid Build Coastguard Worker#endif 212*8d67ca89SAndroid Build Coastguard Worker test %rdx, %rdx 213*8d67ca89SAndroid Build Coastguard Worker#if defined USE_AS_STRNCPY && !defined USE_AS_STRCAT 214*8d67ca89SAndroid Build Coastguard Worker jnz L(CopyFrom1To16BytesUnalignedXmm2) 215*8d67ca89SAndroid Build Coastguard Worker#else 216*8d67ca89SAndroid Build Coastguard Worker jnz L(CopyFrom1To16Bytes) 217*8d67ca89SAndroid Build Coastguard Worker#endif 218*8d67ca89SAndroid Build Coastguard Worker 219*8d67ca89SAndroid Build Coastguard Worker movaps 16(%rsi, %rcx), %xmm3 220*8d67ca89SAndroid Build Coastguard Worker movdqu %xmm2, (%rdi, %rcx) 221*8d67ca89SAndroid Build Coastguard Worker pcmpeqb %xmm3, %xmm0 222*8d67ca89SAndroid Build Coastguard Worker pmovmskb %xmm0, %rdx 223*8d67ca89SAndroid Build Coastguard Worker add $16, %rcx 224*8d67ca89SAndroid Build Coastguard Worker#ifdef USE_AS_STRNCPY 225*8d67ca89SAndroid Build Coastguard Worker sub $16, %r8 226*8d67ca89SAndroid Build Coastguard Worker jbe L(CopyFrom1To16BytesCase2OrCase3) 227*8d67ca89SAndroid Build Coastguard Worker#endif 228*8d67ca89SAndroid Build Coastguard Worker test %rdx, %rdx 229*8d67ca89SAndroid Build Coastguard Worker#if defined USE_AS_STRNCPY && !defined USE_AS_STRCAT 230*8d67ca89SAndroid Build Coastguard Worker jnz L(CopyFrom1To16BytesUnalignedXmm3) 231*8d67ca89SAndroid Build Coastguard Worker#else 232*8d67ca89SAndroid Build Coastguard Worker jnz L(CopyFrom1To16Bytes) 233*8d67ca89SAndroid Build Coastguard Worker#endif 234*8d67ca89SAndroid Build Coastguard Worker 235*8d67ca89SAndroid Build Coastguard Worker movdqu %xmm3, (%rdi, %rcx) 236*8d67ca89SAndroid Build Coastguard Worker mov %rsi, %rdx 237*8d67ca89SAndroid Build Coastguard Worker lea 16(%rsi, %rcx), %rsi 238*8d67ca89SAndroid Build Coastguard Worker and $-0x40, %rsi 239*8d67ca89SAndroid Build Coastguard Worker sub %rsi, %rdx 240*8d67ca89SAndroid Build Coastguard Worker sub %rdx, %rdi 241*8d67ca89SAndroid Build Coastguard Worker#ifdef USE_AS_STRNCPY 242*8d67ca89SAndroid Build Coastguard Worker lea 128(%r8, %rdx), %r8 243*8d67ca89SAndroid Build Coastguard Worker#endif 244*8d67ca89SAndroid Build Coastguard WorkerL(Unaligned64Loop): 245*8d67ca89SAndroid Build Coastguard Worker movaps (%rsi), %xmm2 246*8d67ca89SAndroid Build Coastguard Worker movaps %xmm2, %xmm4 247*8d67ca89SAndroid Build Coastguard Worker movaps 16(%rsi), %xmm5 248*8d67ca89SAndroid Build Coastguard Worker movaps 32(%rsi), %xmm3 249*8d67ca89SAndroid Build Coastguard Worker movaps %xmm3, %xmm6 250*8d67ca89SAndroid Build Coastguard Worker movaps 48(%rsi), %xmm7 251*8d67ca89SAndroid Build Coastguard Worker pminub %xmm5, %xmm2 252*8d67ca89SAndroid Build Coastguard Worker pminub %xmm7, %xmm3 253*8d67ca89SAndroid Build Coastguard Worker pminub %xmm2, %xmm3 254*8d67ca89SAndroid Build Coastguard Worker pcmpeqb %xmm0, %xmm3 255*8d67ca89SAndroid Build Coastguard Worker pmovmskb %xmm3, %rdx 256*8d67ca89SAndroid Build Coastguard Worker#ifdef USE_AS_STRNCPY 257*8d67ca89SAndroid Build Coastguard Worker sub $64, %r8 258*8d67ca89SAndroid Build Coastguard Worker jbe L(UnalignedLeaveCase2OrCase3) 259*8d67ca89SAndroid Build Coastguard Worker#endif 260*8d67ca89SAndroid Build Coastguard Worker test %rdx, %rdx 261*8d67ca89SAndroid Build Coastguard Worker jnz L(Unaligned64Leave) 262*8d67ca89SAndroid Build Coastguard Worker 263*8d67ca89SAndroid Build Coastguard WorkerL(Unaligned64Loop_start): 264*8d67ca89SAndroid Build Coastguard Worker add $64, %rdi 265*8d67ca89SAndroid Build Coastguard Worker add $64, %rsi 266*8d67ca89SAndroid Build Coastguard Worker movdqu %xmm4, -64(%rdi) 267*8d67ca89SAndroid Build Coastguard Worker movaps (%rsi), %xmm2 268*8d67ca89SAndroid Build Coastguard Worker movdqa %xmm2, %xmm4 269*8d67ca89SAndroid Build Coastguard Worker movdqu %xmm5, -48(%rdi) 270*8d67ca89SAndroid Build Coastguard Worker movaps 16(%rsi), %xmm5 271*8d67ca89SAndroid Build Coastguard Worker pminub %xmm5, %xmm2 272*8d67ca89SAndroid Build Coastguard Worker movaps 32(%rsi), %xmm3 273*8d67ca89SAndroid Build Coastguard Worker movdqu %xmm6, -32(%rdi) 274*8d67ca89SAndroid Build Coastguard Worker movaps %xmm3, %xmm6 275*8d67ca89SAndroid Build Coastguard Worker movdqu %xmm7, -16(%rdi) 276*8d67ca89SAndroid Build Coastguard Worker movaps 48(%rsi), %xmm7 277*8d67ca89SAndroid Build Coastguard Worker pminub %xmm7, %xmm3 278*8d67ca89SAndroid Build Coastguard Worker pminub %xmm2, %xmm3 279*8d67ca89SAndroid Build Coastguard Worker pcmpeqb %xmm0, %xmm3 280*8d67ca89SAndroid Build Coastguard Worker pmovmskb %xmm3, %rdx 281*8d67ca89SAndroid Build Coastguard Worker#ifdef USE_AS_STRNCPY 282*8d67ca89SAndroid Build Coastguard Worker sub $64, %r8 283*8d67ca89SAndroid Build Coastguard Worker jbe L(UnalignedLeaveCase2OrCase3) 284*8d67ca89SAndroid Build Coastguard Worker#endif 285*8d67ca89SAndroid Build Coastguard Worker test %rdx, %rdx 286*8d67ca89SAndroid Build Coastguard Worker jz L(Unaligned64Loop_start) 287*8d67ca89SAndroid Build Coastguard Worker 288*8d67ca89SAndroid Build Coastguard WorkerL(Unaligned64Leave): 289*8d67ca89SAndroid Build Coastguard Worker pxor %xmm1, %xmm1 290*8d67ca89SAndroid Build Coastguard Worker 291*8d67ca89SAndroid Build Coastguard Worker pcmpeqb %xmm4, %xmm0 292*8d67ca89SAndroid Build Coastguard Worker pcmpeqb %xmm5, %xmm1 293*8d67ca89SAndroid Build Coastguard Worker pmovmskb %xmm0, %rdx 294*8d67ca89SAndroid Build Coastguard Worker pmovmskb %xmm1, %rcx 295*8d67ca89SAndroid Build Coastguard Worker test %rdx, %rdx 296*8d67ca89SAndroid Build Coastguard Worker jnz L(CopyFrom1To16BytesUnaligned_0) 297*8d67ca89SAndroid Build Coastguard Worker test %rcx, %rcx 298*8d67ca89SAndroid Build Coastguard Worker jnz L(CopyFrom1To16BytesUnaligned_16) 299*8d67ca89SAndroid Build Coastguard Worker 300*8d67ca89SAndroid Build Coastguard Worker pcmpeqb %xmm6, %xmm0 301*8d67ca89SAndroid Build Coastguard Worker pcmpeqb %xmm7, %xmm1 302*8d67ca89SAndroid Build Coastguard Worker pmovmskb %xmm0, %rdx 303*8d67ca89SAndroid Build Coastguard Worker pmovmskb %xmm1, %rcx 304*8d67ca89SAndroid Build Coastguard Worker test %rdx, %rdx 305*8d67ca89SAndroid Build Coastguard Worker jnz L(CopyFrom1To16BytesUnaligned_32) 306*8d67ca89SAndroid Build Coastguard Worker 307*8d67ca89SAndroid Build Coastguard Worker bsf %rcx, %rdx 308*8d67ca89SAndroid Build Coastguard Worker movdqu %xmm4, (%rdi) 309*8d67ca89SAndroid Build Coastguard Worker movdqu %xmm5, 16(%rdi) 310*8d67ca89SAndroid Build Coastguard Worker movdqu %xmm6, 32(%rdi) 311*8d67ca89SAndroid Build Coastguard Worker#if defined USE_AS_STRNCPY && !defined USE_AS_STRCAT 312*8d67ca89SAndroid Build Coastguard Worker# ifdef USE_AS_STPCPY 313*8d67ca89SAndroid Build Coastguard Worker lea 48(%rdi, %rdx), %rax 314*8d67ca89SAndroid Build Coastguard Worker# endif 315*8d67ca89SAndroid Build Coastguard Worker movdqu %xmm7, 48(%rdi) 316*8d67ca89SAndroid Build Coastguard Worker add $15, %r8 317*8d67ca89SAndroid Build Coastguard Worker sub %rdx, %r8 318*8d67ca89SAndroid Build Coastguard Worker lea 49(%rdi, %rdx), %rdi 319*8d67ca89SAndroid Build Coastguard Worker jmp L(StrncpyFillTailWithZero) 320*8d67ca89SAndroid Build Coastguard Worker#else 321*8d67ca89SAndroid Build Coastguard Worker add $48, %rsi 322*8d67ca89SAndroid Build Coastguard Worker add $48, %rdi 323*8d67ca89SAndroid Build Coastguard Worker BRANCH_TO_JMPTBL_ENTRY (L(ExitTable), %rdx, 4) 324*8d67ca89SAndroid Build Coastguard Worker#endif 325*8d67ca89SAndroid Build Coastguard Worker 326*8d67ca89SAndroid Build Coastguard Worker/* If source adress alignment == destination adress alignment */ 327*8d67ca89SAndroid Build Coastguard Worker 328*8d67ca89SAndroid Build Coastguard WorkerL(SourceStringAlignmentLess32): 329*8d67ca89SAndroid Build Coastguard Worker pxor %xmm0, %xmm0 330*8d67ca89SAndroid Build Coastguard Worker movdqu (%rsi), %xmm1 331*8d67ca89SAndroid Build Coastguard Worker movdqu 16(%rsi), %xmm2 332*8d67ca89SAndroid Build Coastguard Worker pcmpeqb %xmm1, %xmm0 333*8d67ca89SAndroid Build Coastguard Worker pmovmskb %xmm0, %rdx 334*8d67ca89SAndroid Build Coastguard Worker 335*8d67ca89SAndroid Build Coastguard Worker#ifdef USE_AS_STRNCPY 336*8d67ca89SAndroid Build Coastguard Worker# if defined USE_AS_STPCPY || defined USE_AS_STRCAT 337*8d67ca89SAndroid Build Coastguard Worker cmp $16, %r8 338*8d67ca89SAndroid Build Coastguard Worker# else 339*8d67ca89SAndroid Build Coastguard Worker cmp $17, %r8 340*8d67ca89SAndroid Build Coastguard Worker# endif 341*8d67ca89SAndroid Build Coastguard Worker jbe L(CopyFrom1To16BytesTail1Case2OrCase3) 342*8d67ca89SAndroid Build Coastguard Worker#endif 343*8d67ca89SAndroid Build Coastguard Worker test %rdx, %rdx 344*8d67ca89SAndroid Build Coastguard Worker jnz L(CopyFrom1To16BytesTail1) 345*8d67ca89SAndroid Build Coastguard Worker 346*8d67ca89SAndroid Build Coastguard Worker pcmpeqb %xmm2, %xmm0 347*8d67ca89SAndroid Build Coastguard Worker movdqu %xmm1, (%rdi) 348*8d67ca89SAndroid Build Coastguard Worker pmovmskb %xmm0, %rdx 349*8d67ca89SAndroid Build Coastguard Worker 350*8d67ca89SAndroid Build Coastguard Worker#ifdef USE_AS_STRNCPY 351*8d67ca89SAndroid Build Coastguard Worker# if defined USE_AS_STPCPY || defined USE_AS_STRCAT 352*8d67ca89SAndroid Build Coastguard Worker cmp $32, %r8 353*8d67ca89SAndroid Build Coastguard Worker# else 354*8d67ca89SAndroid Build Coastguard Worker cmp $33, %r8 355*8d67ca89SAndroid Build Coastguard Worker# endif 356*8d67ca89SAndroid Build Coastguard Worker jbe L(CopyFrom1To32Bytes1Case2OrCase3) 357*8d67ca89SAndroid Build Coastguard Worker#endif 358*8d67ca89SAndroid Build Coastguard Worker test %rdx, %rdx 359*8d67ca89SAndroid Build Coastguard Worker jnz L(CopyFrom1To32Bytes1) 360*8d67ca89SAndroid Build Coastguard Worker 361*8d67ca89SAndroid Build Coastguard Worker and $15, %rcx 362*8d67ca89SAndroid Build Coastguard Worker and $-16, %rsi 363*8d67ca89SAndroid Build Coastguard Worker 364*8d67ca89SAndroid Build Coastguard Worker jmp L(Unalign16Both) 365*8d67ca89SAndroid Build Coastguard Worker 366*8d67ca89SAndroid Build Coastguard Worker/*------End of main part with loops---------------------*/ 367*8d67ca89SAndroid Build Coastguard Worker 368*8d67ca89SAndroid Build Coastguard Worker/* Case1 */ 369*8d67ca89SAndroid Build Coastguard Worker 370*8d67ca89SAndroid Build Coastguard Worker#if (!defined USE_AS_STRNCPY) || (defined USE_AS_STRCAT) 371*8d67ca89SAndroid Build Coastguard Worker .p2align 4 372*8d67ca89SAndroid Build Coastguard WorkerL(CopyFrom1To16Bytes): 373*8d67ca89SAndroid Build Coastguard Worker add %rcx, %rdi 374*8d67ca89SAndroid Build Coastguard Worker add %rcx, %rsi 375*8d67ca89SAndroid Build Coastguard Worker bsf %rdx, %rdx 376*8d67ca89SAndroid Build Coastguard Worker BRANCH_TO_JMPTBL_ENTRY (L(ExitTable), %rdx, 4) 377*8d67ca89SAndroid Build Coastguard Worker#endif 378*8d67ca89SAndroid Build Coastguard Worker .p2align 4 379*8d67ca89SAndroid Build Coastguard WorkerL(CopyFrom1To16BytesTail): 380*8d67ca89SAndroid Build Coastguard Worker add %rcx, %rsi 381*8d67ca89SAndroid Build Coastguard Worker bsf %rdx, %rdx 382*8d67ca89SAndroid Build Coastguard Worker BRANCH_TO_JMPTBL_ENTRY (L(ExitTable), %rdx, 4) 383*8d67ca89SAndroid Build Coastguard Worker 384*8d67ca89SAndroid Build Coastguard Worker .p2align 4 385*8d67ca89SAndroid Build Coastguard WorkerL(CopyFrom1To32Bytes1): 386*8d67ca89SAndroid Build Coastguard Worker add $16, %rsi 387*8d67ca89SAndroid Build Coastguard Worker add $16, %rdi 388*8d67ca89SAndroid Build Coastguard Worker#if defined USE_AS_STRNCPY && !defined USE_AS_STRCAT 389*8d67ca89SAndroid Build Coastguard Worker sub $16, %r8 390*8d67ca89SAndroid Build Coastguard Worker#endif 391*8d67ca89SAndroid Build Coastguard WorkerL(CopyFrom1To16BytesTail1): 392*8d67ca89SAndroid Build Coastguard Worker bsf %rdx, %rdx 393*8d67ca89SAndroid Build Coastguard Worker BRANCH_TO_JMPTBL_ENTRY (L(ExitTable), %rdx, 4) 394*8d67ca89SAndroid Build Coastguard Worker 395*8d67ca89SAndroid Build Coastguard Worker .p2align 4 396*8d67ca89SAndroid Build Coastguard WorkerL(CopyFrom1To32Bytes): 397*8d67ca89SAndroid Build Coastguard Worker bsf %rdx, %rdx 398*8d67ca89SAndroid Build Coastguard Worker add %rcx, %rsi 399*8d67ca89SAndroid Build Coastguard Worker add $16, %rdx 400*8d67ca89SAndroid Build Coastguard Worker sub %rcx, %rdx 401*8d67ca89SAndroid Build Coastguard Worker BRANCH_TO_JMPTBL_ENTRY (L(ExitTable), %rdx, 4) 402*8d67ca89SAndroid Build Coastguard Worker 403*8d67ca89SAndroid Build Coastguard Worker .p2align 4 404*8d67ca89SAndroid Build Coastguard WorkerL(CopyFrom1To16BytesUnaligned_0): 405*8d67ca89SAndroid Build Coastguard Worker bsf %rdx, %rdx 406*8d67ca89SAndroid Build Coastguard Worker#if defined USE_AS_STRNCPY && !defined USE_AS_STRCAT 407*8d67ca89SAndroid Build Coastguard Worker# ifdef USE_AS_STPCPY 408*8d67ca89SAndroid Build Coastguard Worker lea (%rdi, %rdx), %rax 409*8d67ca89SAndroid Build Coastguard Worker# endif 410*8d67ca89SAndroid Build Coastguard Worker movdqu %xmm4, (%rdi) 411*8d67ca89SAndroid Build Coastguard Worker add $63, %r8 412*8d67ca89SAndroid Build Coastguard Worker sub %rdx, %r8 413*8d67ca89SAndroid Build Coastguard Worker lea 1(%rdi, %rdx), %rdi 414*8d67ca89SAndroid Build Coastguard Worker jmp L(StrncpyFillTailWithZero) 415*8d67ca89SAndroid Build Coastguard Worker#else 416*8d67ca89SAndroid Build Coastguard Worker BRANCH_TO_JMPTBL_ENTRY (L(ExitTable), %rdx, 4) 417*8d67ca89SAndroid Build Coastguard Worker#endif 418*8d67ca89SAndroid Build Coastguard Worker 419*8d67ca89SAndroid Build Coastguard Worker .p2align 4 420*8d67ca89SAndroid Build Coastguard WorkerL(CopyFrom1To16BytesUnaligned_16): 421*8d67ca89SAndroid Build Coastguard Worker bsf %rcx, %rdx 422*8d67ca89SAndroid Build Coastguard Worker movdqu %xmm4, (%rdi) 423*8d67ca89SAndroid Build Coastguard Worker#if defined USE_AS_STRNCPY && !defined USE_AS_STRCAT 424*8d67ca89SAndroid Build Coastguard Worker# ifdef USE_AS_STPCPY 425*8d67ca89SAndroid Build Coastguard Worker lea 16(%rdi, %rdx), %rax 426*8d67ca89SAndroid Build Coastguard Worker# endif 427*8d67ca89SAndroid Build Coastguard Worker movdqu %xmm5, 16(%rdi) 428*8d67ca89SAndroid Build Coastguard Worker add $47, %r8 429*8d67ca89SAndroid Build Coastguard Worker sub %rdx, %r8 430*8d67ca89SAndroid Build Coastguard Worker lea 17(%rdi, %rdx), %rdi 431*8d67ca89SAndroid Build Coastguard Worker jmp L(StrncpyFillTailWithZero) 432*8d67ca89SAndroid Build Coastguard Worker#else 433*8d67ca89SAndroid Build Coastguard Worker add $16, %rsi 434*8d67ca89SAndroid Build Coastguard Worker add $16, %rdi 435*8d67ca89SAndroid Build Coastguard Worker BRANCH_TO_JMPTBL_ENTRY (L(ExitTable), %rdx, 4) 436*8d67ca89SAndroid Build Coastguard Worker#endif 437*8d67ca89SAndroid Build Coastguard Worker 438*8d67ca89SAndroid Build Coastguard Worker .p2align 4 439*8d67ca89SAndroid Build Coastguard WorkerL(CopyFrom1To16BytesUnaligned_32): 440*8d67ca89SAndroid Build Coastguard Worker bsf %rdx, %rdx 441*8d67ca89SAndroid Build Coastguard Worker movdqu %xmm4, (%rdi) 442*8d67ca89SAndroid Build Coastguard Worker movdqu %xmm5, 16(%rdi) 443*8d67ca89SAndroid Build Coastguard Worker#if defined USE_AS_STRNCPY && !defined USE_AS_STRCAT 444*8d67ca89SAndroid Build Coastguard Worker# ifdef USE_AS_STPCPY 445*8d67ca89SAndroid Build Coastguard Worker lea 32(%rdi, %rdx), %rax 446*8d67ca89SAndroid Build Coastguard Worker# endif 447*8d67ca89SAndroid Build Coastguard Worker movdqu %xmm6, 32(%rdi) 448*8d67ca89SAndroid Build Coastguard Worker add $31, %r8 449*8d67ca89SAndroid Build Coastguard Worker sub %rdx, %r8 450*8d67ca89SAndroid Build Coastguard Worker lea 33(%rdi, %rdx), %rdi 451*8d67ca89SAndroid Build Coastguard Worker jmp L(StrncpyFillTailWithZero) 452*8d67ca89SAndroid Build Coastguard Worker#else 453*8d67ca89SAndroid Build Coastguard Worker add $32, %rsi 454*8d67ca89SAndroid Build Coastguard Worker add $32, %rdi 455*8d67ca89SAndroid Build Coastguard Worker BRANCH_TO_JMPTBL_ENTRY (L(ExitTable), %rdx, 4) 456*8d67ca89SAndroid Build Coastguard Worker#endif 457*8d67ca89SAndroid Build Coastguard Worker 458*8d67ca89SAndroid Build Coastguard Worker#ifdef USE_AS_STRNCPY 459*8d67ca89SAndroid Build Coastguard Worker# ifndef USE_AS_STRCAT 460*8d67ca89SAndroid Build Coastguard Worker .p2align 4 461*8d67ca89SAndroid Build Coastguard WorkerL(CopyFrom1To16BytesUnalignedXmm6): 462*8d67ca89SAndroid Build Coastguard Worker movdqu %xmm6, (%rdi, %rcx) 463*8d67ca89SAndroid Build Coastguard Worker jmp L(CopyFrom1To16BytesXmmExit) 464*8d67ca89SAndroid Build Coastguard Worker 465*8d67ca89SAndroid Build Coastguard Worker .p2align 4 466*8d67ca89SAndroid Build Coastguard WorkerL(CopyFrom1To16BytesUnalignedXmm5): 467*8d67ca89SAndroid Build Coastguard Worker movdqu %xmm5, (%rdi, %rcx) 468*8d67ca89SAndroid Build Coastguard Worker jmp L(CopyFrom1To16BytesXmmExit) 469*8d67ca89SAndroid Build Coastguard Worker 470*8d67ca89SAndroid Build Coastguard Worker .p2align 4 471*8d67ca89SAndroid Build Coastguard WorkerL(CopyFrom1To16BytesUnalignedXmm4): 472*8d67ca89SAndroid Build Coastguard Worker movdqu %xmm4, (%rdi, %rcx) 473*8d67ca89SAndroid Build Coastguard Worker jmp L(CopyFrom1To16BytesXmmExit) 474*8d67ca89SAndroid Build Coastguard Worker 475*8d67ca89SAndroid Build Coastguard Worker .p2align 4 476*8d67ca89SAndroid Build Coastguard WorkerL(CopyFrom1To16BytesUnalignedXmm3): 477*8d67ca89SAndroid Build Coastguard Worker movdqu %xmm3, (%rdi, %rcx) 478*8d67ca89SAndroid Build Coastguard Worker jmp L(CopyFrom1To16BytesXmmExit) 479*8d67ca89SAndroid Build Coastguard Worker 480*8d67ca89SAndroid Build Coastguard Worker .p2align 4 481*8d67ca89SAndroid Build Coastguard WorkerL(CopyFrom1To16BytesUnalignedXmm1): 482*8d67ca89SAndroid Build Coastguard Worker movdqu %xmm1, (%rdi, %rcx) 483*8d67ca89SAndroid Build Coastguard Worker jmp L(CopyFrom1To16BytesXmmExit) 484*8d67ca89SAndroid Build Coastguard Worker# endif 485*8d67ca89SAndroid Build Coastguard Worker 486*8d67ca89SAndroid Build Coastguard Worker .p2align 4 487*8d67ca89SAndroid Build Coastguard WorkerL(CopyFrom1To16BytesExit): 488*8d67ca89SAndroid Build Coastguard Worker BRANCH_TO_JMPTBL_ENTRY (L(ExitTable), %rdx, 4) 489*8d67ca89SAndroid Build Coastguard Worker 490*8d67ca89SAndroid Build Coastguard Worker/* Case2 */ 491*8d67ca89SAndroid Build Coastguard Worker 492*8d67ca89SAndroid Build Coastguard Worker .p2align 4 493*8d67ca89SAndroid Build Coastguard WorkerL(CopyFrom1To16BytesCase2): 494*8d67ca89SAndroid Build Coastguard Worker add $16, %r8 495*8d67ca89SAndroid Build Coastguard Worker add %rcx, %rdi 496*8d67ca89SAndroid Build Coastguard Worker add %rcx, %rsi 497*8d67ca89SAndroid Build Coastguard Worker bsf %rdx, %rdx 498*8d67ca89SAndroid Build Coastguard Worker cmp %r8, %rdx 499*8d67ca89SAndroid Build Coastguard Worker jb L(CopyFrom1To16BytesExit) 500*8d67ca89SAndroid Build Coastguard Worker BRANCH_TO_JMPTBL_ENTRY (L(ExitStrncpyTable), %r8, 4) 501*8d67ca89SAndroid Build Coastguard Worker 502*8d67ca89SAndroid Build Coastguard Worker .p2align 4 503*8d67ca89SAndroid Build Coastguard WorkerL(CopyFrom1To32BytesCase2): 504*8d67ca89SAndroid Build Coastguard Worker add %rcx, %rsi 505*8d67ca89SAndroid Build Coastguard Worker bsf %rdx, %rdx 506*8d67ca89SAndroid Build Coastguard Worker add $16, %rdx 507*8d67ca89SAndroid Build Coastguard Worker sub %rcx, %rdx 508*8d67ca89SAndroid Build Coastguard Worker cmp %r8, %rdx 509*8d67ca89SAndroid Build Coastguard Worker jb L(CopyFrom1To16BytesExit) 510*8d67ca89SAndroid Build Coastguard Worker BRANCH_TO_JMPTBL_ENTRY (L(ExitStrncpyTable), %r8, 4) 511*8d67ca89SAndroid Build Coastguard Worker 512*8d67ca89SAndroid Build Coastguard WorkerL(CopyFrom1To16BytesTailCase2): 513*8d67ca89SAndroid Build Coastguard Worker add %rcx, %rsi 514*8d67ca89SAndroid Build Coastguard Worker bsf %rdx, %rdx 515*8d67ca89SAndroid Build Coastguard Worker cmp %r8, %rdx 516*8d67ca89SAndroid Build Coastguard Worker jb L(CopyFrom1To16BytesExit) 517*8d67ca89SAndroid Build Coastguard Worker BRANCH_TO_JMPTBL_ENTRY (L(ExitStrncpyTable), %r8, 4) 518*8d67ca89SAndroid Build Coastguard Worker 519*8d67ca89SAndroid Build Coastguard WorkerL(CopyFrom1To16BytesTail1Case2): 520*8d67ca89SAndroid Build Coastguard Worker bsf %rdx, %rdx 521*8d67ca89SAndroid Build Coastguard Worker cmp %r8, %rdx 522*8d67ca89SAndroid Build Coastguard Worker jb L(CopyFrom1To16BytesExit) 523*8d67ca89SAndroid Build Coastguard Worker BRANCH_TO_JMPTBL_ENTRY (L(ExitStrncpyTable), %r8, 4) 524*8d67ca89SAndroid Build Coastguard Worker 525*8d67ca89SAndroid Build Coastguard Worker/* Case2 or Case3, Case3 */ 526*8d67ca89SAndroid Build Coastguard Worker 527*8d67ca89SAndroid Build Coastguard Worker .p2align 4 528*8d67ca89SAndroid Build Coastguard WorkerL(CopyFrom1To16BytesCase2OrCase3): 529*8d67ca89SAndroid Build Coastguard Worker test %rdx, %rdx 530*8d67ca89SAndroid Build Coastguard Worker jnz L(CopyFrom1To16BytesCase2) 531*8d67ca89SAndroid Build Coastguard WorkerL(CopyFrom1To16BytesCase3): 532*8d67ca89SAndroid Build Coastguard Worker add $16, %r8 533*8d67ca89SAndroid Build Coastguard Worker add %rcx, %rdi 534*8d67ca89SAndroid Build Coastguard Worker add %rcx, %rsi 535*8d67ca89SAndroid Build Coastguard Worker BRANCH_TO_JMPTBL_ENTRY (L(ExitStrncpyTable), %r8, 4) 536*8d67ca89SAndroid Build Coastguard Worker 537*8d67ca89SAndroid Build Coastguard Worker .p2align 4 538*8d67ca89SAndroid Build Coastguard WorkerL(CopyFrom1To32BytesCase2OrCase3): 539*8d67ca89SAndroid Build Coastguard Worker test %rdx, %rdx 540*8d67ca89SAndroid Build Coastguard Worker jnz L(CopyFrom1To32BytesCase2) 541*8d67ca89SAndroid Build Coastguard Worker add %rcx, %rsi 542*8d67ca89SAndroid Build Coastguard Worker BRANCH_TO_JMPTBL_ENTRY (L(ExitStrncpyTable), %r8, 4) 543*8d67ca89SAndroid Build Coastguard Worker 544*8d67ca89SAndroid Build Coastguard Worker .p2align 4 545*8d67ca89SAndroid Build Coastguard WorkerL(CopyFrom1To16BytesTailCase2OrCase3): 546*8d67ca89SAndroid Build Coastguard Worker test %rdx, %rdx 547*8d67ca89SAndroid Build Coastguard Worker jnz L(CopyFrom1To16BytesTailCase2) 548*8d67ca89SAndroid Build Coastguard Worker add %rcx, %rsi 549*8d67ca89SAndroid Build Coastguard Worker BRANCH_TO_JMPTBL_ENTRY (L(ExitStrncpyTable), %r8, 4) 550*8d67ca89SAndroid Build Coastguard Worker 551*8d67ca89SAndroid Build Coastguard Worker .p2align 4 552*8d67ca89SAndroid Build Coastguard WorkerL(CopyFrom1To32Bytes1Case2OrCase3): 553*8d67ca89SAndroid Build Coastguard Worker add $16, %rdi 554*8d67ca89SAndroid Build Coastguard Worker add $16, %rsi 555*8d67ca89SAndroid Build Coastguard Worker sub $16, %r8 556*8d67ca89SAndroid Build Coastguard WorkerL(CopyFrom1To16BytesTail1Case2OrCase3): 557*8d67ca89SAndroid Build Coastguard Worker test %rdx, %rdx 558*8d67ca89SAndroid Build Coastguard Worker jnz L(CopyFrom1To16BytesTail1Case2) 559*8d67ca89SAndroid Build Coastguard Worker BRANCH_TO_JMPTBL_ENTRY (L(ExitStrncpyTable), %r8, 4) 560*8d67ca89SAndroid Build Coastguard Worker 561*8d67ca89SAndroid Build Coastguard Worker#endif 562*8d67ca89SAndroid Build Coastguard Worker 563*8d67ca89SAndroid Build Coastguard Worker/*------------End labels regarding with copying 1-16 bytes--and 1-32 bytes----*/ 564*8d67ca89SAndroid Build Coastguard Worker 565*8d67ca89SAndroid Build Coastguard Worker .p2align 4 566*8d67ca89SAndroid Build Coastguard WorkerL(Exit1): 567*8d67ca89SAndroid Build Coastguard Worker mov %dh, (%rdi) 568*8d67ca89SAndroid Build Coastguard Worker#ifdef USE_AS_STPCPY 569*8d67ca89SAndroid Build Coastguard Worker lea (%rdi), %rax 570*8d67ca89SAndroid Build Coastguard Worker#endif 571*8d67ca89SAndroid Build Coastguard Worker#if defined USE_AS_STRNCPY && !defined USE_AS_STRCAT 572*8d67ca89SAndroid Build Coastguard Worker sub $1, %r8 573*8d67ca89SAndroid Build Coastguard Worker lea 1(%rdi), %rdi 574*8d67ca89SAndroid Build Coastguard Worker jnz L(StrncpyFillTailWithZero) 575*8d67ca89SAndroid Build Coastguard Worker#endif 576*8d67ca89SAndroid Build Coastguard Worker RETURN 577*8d67ca89SAndroid Build Coastguard Worker 578*8d67ca89SAndroid Build Coastguard Worker .p2align 4 579*8d67ca89SAndroid Build Coastguard WorkerL(Exit2): 580*8d67ca89SAndroid Build Coastguard Worker mov (%rsi), %dx 581*8d67ca89SAndroid Build Coastguard Worker mov %dx, (%rdi) 582*8d67ca89SAndroid Build Coastguard Worker#ifdef USE_AS_STPCPY 583*8d67ca89SAndroid Build Coastguard Worker lea 1(%rdi), %rax 584*8d67ca89SAndroid Build Coastguard Worker#endif 585*8d67ca89SAndroid Build Coastguard Worker#if defined USE_AS_STRNCPY && !defined USE_AS_STRCAT 586*8d67ca89SAndroid Build Coastguard Worker sub $2, %r8 587*8d67ca89SAndroid Build Coastguard Worker lea 2(%rdi), %rdi 588*8d67ca89SAndroid Build Coastguard Worker jnz L(StrncpyFillTailWithZero) 589*8d67ca89SAndroid Build Coastguard Worker#endif 590*8d67ca89SAndroid Build Coastguard Worker RETURN 591*8d67ca89SAndroid Build Coastguard Worker 592*8d67ca89SAndroid Build Coastguard Worker .p2align 4 593*8d67ca89SAndroid Build Coastguard WorkerL(Exit3): 594*8d67ca89SAndroid Build Coastguard Worker mov (%rsi), %cx 595*8d67ca89SAndroid Build Coastguard Worker mov %cx, (%rdi) 596*8d67ca89SAndroid Build Coastguard Worker mov %dh, 2(%rdi) 597*8d67ca89SAndroid Build Coastguard Worker#ifdef USE_AS_STPCPY 598*8d67ca89SAndroid Build Coastguard Worker lea 2(%rdi), %rax 599*8d67ca89SAndroid Build Coastguard Worker#endif 600*8d67ca89SAndroid Build Coastguard Worker#if defined USE_AS_STRNCPY && !defined USE_AS_STRCAT 601*8d67ca89SAndroid Build Coastguard Worker sub $3, %r8 602*8d67ca89SAndroid Build Coastguard Worker lea 3(%rdi), %rdi 603*8d67ca89SAndroid Build Coastguard Worker jnz L(StrncpyFillTailWithZero) 604*8d67ca89SAndroid Build Coastguard Worker#endif 605*8d67ca89SAndroid Build Coastguard Worker RETURN 606*8d67ca89SAndroid Build Coastguard Worker 607*8d67ca89SAndroid Build Coastguard Worker .p2align 4 608*8d67ca89SAndroid Build Coastguard WorkerL(Exit4): 609*8d67ca89SAndroid Build Coastguard Worker mov (%rsi), %edx 610*8d67ca89SAndroid Build Coastguard Worker mov %edx, (%rdi) 611*8d67ca89SAndroid Build Coastguard Worker#ifdef USE_AS_STPCPY 612*8d67ca89SAndroid Build Coastguard Worker lea 3(%rdi), %rax 613*8d67ca89SAndroid Build Coastguard Worker#endif 614*8d67ca89SAndroid Build Coastguard Worker#if defined USE_AS_STRNCPY && !defined USE_AS_STRCAT 615*8d67ca89SAndroid Build Coastguard Worker sub $4, %r8 616*8d67ca89SAndroid Build Coastguard Worker lea 4(%rdi), %rdi 617*8d67ca89SAndroid Build Coastguard Worker jnz L(StrncpyFillTailWithZero) 618*8d67ca89SAndroid Build Coastguard Worker#endif 619*8d67ca89SAndroid Build Coastguard Worker RETURN 620*8d67ca89SAndroid Build Coastguard Worker 621*8d67ca89SAndroid Build Coastguard Worker .p2align 4 622*8d67ca89SAndroid Build Coastguard WorkerL(Exit5): 623*8d67ca89SAndroid Build Coastguard Worker mov (%rsi), %ecx 624*8d67ca89SAndroid Build Coastguard Worker mov %dh, 4(%rdi) 625*8d67ca89SAndroid Build Coastguard Worker mov %ecx, (%rdi) 626*8d67ca89SAndroid Build Coastguard Worker#ifdef USE_AS_STPCPY 627*8d67ca89SAndroid Build Coastguard Worker lea 4(%rdi), %rax 628*8d67ca89SAndroid Build Coastguard Worker#endif 629*8d67ca89SAndroid Build Coastguard Worker#if defined USE_AS_STRNCPY && !defined USE_AS_STRCAT 630*8d67ca89SAndroid Build Coastguard Worker sub $5, %r8 631*8d67ca89SAndroid Build Coastguard Worker lea 5(%rdi), %rdi 632*8d67ca89SAndroid Build Coastguard Worker jnz L(StrncpyFillTailWithZero) 633*8d67ca89SAndroid Build Coastguard Worker#endif 634*8d67ca89SAndroid Build Coastguard Worker RETURN 635*8d67ca89SAndroid Build Coastguard Worker 636*8d67ca89SAndroid Build Coastguard Worker .p2align 4 637*8d67ca89SAndroid Build Coastguard WorkerL(Exit6): 638*8d67ca89SAndroid Build Coastguard Worker mov (%rsi), %ecx 639*8d67ca89SAndroid Build Coastguard Worker mov 4(%rsi), %dx 640*8d67ca89SAndroid Build Coastguard Worker mov %ecx, (%rdi) 641*8d67ca89SAndroid Build Coastguard Worker mov %dx, 4(%rdi) 642*8d67ca89SAndroid Build Coastguard Worker#ifdef USE_AS_STPCPY 643*8d67ca89SAndroid Build Coastguard Worker lea 5(%rdi), %rax 644*8d67ca89SAndroid Build Coastguard Worker#endif 645*8d67ca89SAndroid Build Coastguard Worker#if defined USE_AS_STRNCPY && !defined USE_AS_STRCAT 646*8d67ca89SAndroid Build Coastguard Worker sub $6, %r8 647*8d67ca89SAndroid Build Coastguard Worker lea 6(%rdi), %rdi 648*8d67ca89SAndroid Build Coastguard Worker jnz L(StrncpyFillTailWithZero) 649*8d67ca89SAndroid Build Coastguard Worker#endif 650*8d67ca89SAndroid Build Coastguard Worker RETURN 651*8d67ca89SAndroid Build Coastguard Worker 652*8d67ca89SAndroid Build Coastguard Worker .p2align 4 653*8d67ca89SAndroid Build Coastguard WorkerL(Exit7): 654*8d67ca89SAndroid Build Coastguard Worker mov (%rsi), %ecx 655*8d67ca89SAndroid Build Coastguard Worker mov 3(%rsi), %edx 656*8d67ca89SAndroid Build Coastguard Worker mov %ecx, (%rdi) 657*8d67ca89SAndroid Build Coastguard Worker mov %edx, 3(%rdi) 658*8d67ca89SAndroid Build Coastguard Worker#ifdef USE_AS_STPCPY 659*8d67ca89SAndroid Build Coastguard Worker lea 6(%rdi), %rax 660*8d67ca89SAndroid Build Coastguard Worker#endif 661*8d67ca89SAndroid Build Coastguard Worker#if defined USE_AS_STRNCPY && !defined USE_AS_STRCAT 662*8d67ca89SAndroid Build Coastguard Worker sub $7, %r8 663*8d67ca89SAndroid Build Coastguard Worker lea 7(%rdi), %rdi 664*8d67ca89SAndroid Build Coastguard Worker jnz L(StrncpyFillTailWithZero) 665*8d67ca89SAndroid Build Coastguard Worker#endif 666*8d67ca89SAndroid Build Coastguard Worker RETURN 667*8d67ca89SAndroid Build Coastguard Worker 668*8d67ca89SAndroid Build Coastguard Worker .p2align 4 669*8d67ca89SAndroid Build Coastguard WorkerL(Exit8): 670*8d67ca89SAndroid Build Coastguard Worker mov (%rsi), %rdx 671*8d67ca89SAndroid Build Coastguard Worker mov %rdx, (%rdi) 672*8d67ca89SAndroid Build Coastguard Worker#ifdef USE_AS_STPCPY 673*8d67ca89SAndroid Build Coastguard Worker lea 7(%rdi), %rax 674*8d67ca89SAndroid Build Coastguard Worker#endif 675*8d67ca89SAndroid Build Coastguard Worker#if defined USE_AS_STRNCPY && !defined USE_AS_STRCAT 676*8d67ca89SAndroid Build Coastguard Worker sub $8, %r8 677*8d67ca89SAndroid Build Coastguard Worker lea 8(%rdi), %rdi 678*8d67ca89SAndroid Build Coastguard Worker jnz L(StrncpyFillTailWithZero) 679*8d67ca89SAndroid Build Coastguard Worker#endif 680*8d67ca89SAndroid Build Coastguard Worker RETURN 681*8d67ca89SAndroid Build Coastguard Worker 682*8d67ca89SAndroid Build Coastguard Worker .p2align 4 683*8d67ca89SAndroid Build Coastguard WorkerL(Exit9): 684*8d67ca89SAndroid Build Coastguard Worker mov (%rsi), %rcx 685*8d67ca89SAndroid Build Coastguard Worker mov %dh, 8(%rdi) 686*8d67ca89SAndroid Build Coastguard Worker mov %rcx, (%rdi) 687*8d67ca89SAndroid Build Coastguard Worker#ifdef USE_AS_STPCPY 688*8d67ca89SAndroid Build Coastguard Worker lea 8(%rdi), %rax 689*8d67ca89SAndroid Build Coastguard Worker#endif 690*8d67ca89SAndroid Build Coastguard Worker#if defined USE_AS_STRNCPY && !defined USE_AS_STRCAT 691*8d67ca89SAndroid Build Coastguard Worker sub $9, %r8 692*8d67ca89SAndroid Build Coastguard Worker lea 9(%rdi), %rdi 693*8d67ca89SAndroid Build Coastguard Worker jnz L(StrncpyFillTailWithZero) 694*8d67ca89SAndroid Build Coastguard Worker#endif 695*8d67ca89SAndroid Build Coastguard Worker RETURN 696*8d67ca89SAndroid Build Coastguard Worker 697*8d67ca89SAndroid Build Coastguard Worker .p2align 4 698*8d67ca89SAndroid Build Coastguard WorkerL(Exit10): 699*8d67ca89SAndroid Build Coastguard Worker mov (%rsi), %rcx 700*8d67ca89SAndroid Build Coastguard Worker mov 8(%rsi), %dx 701*8d67ca89SAndroid Build Coastguard Worker mov %rcx, (%rdi) 702*8d67ca89SAndroid Build Coastguard Worker mov %dx, 8(%rdi) 703*8d67ca89SAndroid Build Coastguard Worker#ifdef USE_AS_STPCPY 704*8d67ca89SAndroid Build Coastguard Worker lea 9(%rdi), %rax 705*8d67ca89SAndroid Build Coastguard Worker#endif 706*8d67ca89SAndroid Build Coastguard Worker#if defined USE_AS_STRNCPY && !defined USE_AS_STRCAT 707*8d67ca89SAndroid Build Coastguard Worker sub $10, %r8 708*8d67ca89SAndroid Build Coastguard Worker lea 10(%rdi), %rdi 709*8d67ca89SAndroid Build Coastguard Worker jnz L(StrncpyFillTailWithZero) 710*8d67ca89SAndroid Build Coastguard Worker#endif 711*8d67ca89SAndroid Build Coastguard Worker RETURN 712*8d67ca89SAndroid Build Coastguard Worker 713*8d67ca89SAndroid Build Coastguard Worker .p2align 4 714*8d67ca89SAndroid Build Coastguard WorkerL(Exit11): 715*8d67ca89SAndroid Build Coastguard Worker mov (%rsi), %rcx 716*8d67ca89SAndroid Build Coastguard Worker mov 7(%rsi), %edx 717*8d67ca89SAndroid Build Coastguard Worker mov %rcx, (%rdi) 718*8d67ca89SAndroid Build Coastguard Worker mov %edx, 7(%rdi) 719*8d67ca89SAndroid Build Coastguard Worker#ifdef USE_AS_STPCPY 720*8d67ca89SAndroid Build Coastguard Worker lea 10(%rdi), %rax 721*8d67ca89SAndroid Build Coastguard Worker#endif 722*8d67ca89SAndroid Build Coastguard Worker#if defined USE_AS_STRNCPY && !defined USE_AS_STRCAT 723*8d67ca89SAndroid Build Coastguard Worker sub $11, %r8 724*8d67ca89SAndroid Build Coastguard Worker lea 11(%rdi), %rdi 725*8d67ca89SAndroid Build Coastguard Worker jnz L(StrncpyFillTailWithZero) 726*8d67ca89SAndroid Build Coastguard Worker#endif 727*8d67ca89SAndroid Build Coastguard Worker RETURN 728*8d67ca89SAndroid Build Coastguard Worker 729*8d67ca89SAndroid Build Coastguard Worker .p2align 4 730*8d67ca89SAndroid Build Coastguard WorkerL(Exit12): 731*8d67ca89SAndroid Build Coastguard Worker mov (%rsi), %rcx 732*8d67ca89SAndroid Build Coastguard Worker mov 8(%rsi), %edx 733*8d67ca89SAndroid Build Coastguard Worker mov %rcx, (%rdi) 734*8d67ca89SAndroid Build Coastguard Worker mov %edx, 8(%rdi) 735*8d67ca89SAndroid Build Coastguard Worker#ifdef USE_AS_STPCPY 736*8d67ca89SAndroid Build Coastguard Worker lea 11(%rdi), %rax 737*8d67ca89SAndroid Build Coastguard Worker#endif 738*8d67ca89SAndroid Build Coastguard Worker#if defined USE_AS_STRNCPY && !defined USE_AS_STRCAT 739*8d67ca89SAndroid Build Coastguard Worker sub $12, %r8 740*8d67ca89SAndroid Build Coastguard Worker lea 12(%rdi), %rdi 741*8d67ca89SAndroid Build Coastguard Worker jnz L(StrncpyFillTailWithZero) 742*8d67ca89SAndroid Build Coastguard Worker#endif 743*8d67ca89SAndroid Build Coastguard Worker RETURN 744*8d67ca89SAndroid Build Coastguard Worker 745*8d67ca89SAndroid Build Coastguard Worker .p2align 4 746*8d67ca89SAndroid Build Coastguard WorkerL(Exit13): 747*8d67ca89SAndroid Build Coastguard Worker mov (%rsi), %rcx 748*8d67ca89SAndroid Build Coastguard Worker mov 5(%rsi), %rdx 749*8d67ca89SAndroid Build Coastguard Worker mov %rcx, (%rdi) 750*8d67ca89SAndroid Build Coastguard Worker mov %rdx, 5(%rdi) 751*8d67ca89SAndroid Build Coastguard Worker#ifdef USE_AS_STPCPY 752*8d67ca89SAndroid Build Coastguard Worker lea 12(%rdi), %rax 753*8d67ca89SAndroid Build Coastguard Worker#endif 754*8d67ca89SAndroid Build Coastguard Worker#if defined USE_AS_STRNCPY && !defined USE_AS_STRCAT 755*8d67ca89SAndroid Build Coastguard Worker sub $13, %r8 756*8d67ca89SAndroid Build Coastguard Worker lea 13(%rdi), %rdi 757*8d67ca89SAndroid Build Coastguard Worker jnz L(StrncpyFillTailWithZero) 758*8d67ca89SAndroid Build Coastguard Worker#endif 759*8d67ca89SAndroid Build Coastguard Worker RETURN 760*8d67ca89SAndroid Build Coastguard Worker 761*8d67ca89SAndroid Build Coastguard Worker .p2align 4 762*8d67ca89SAndroid Build Coastguard WorkerL(Exit14): 763*8d67ca89SAndroid Build Coastguard Worker mov (%rsi), %rcx 764*8d67ca89SAndroid Build Coastguard Worker mov 6(%rsi), %rdx 765*8d67ca89SAndroid Build Coastguard Worker mov %rcx, (%rdi) 766*8d67ca89SAndroid Build Coastguard Worker mov %rdx, 6(%rdi) 767*8d67ca89SAndroid Build Coastguard Worker#ifdef USE_AS_STPCPY 768*8d67ca89SAndroid Build Coastguard Worker lea 13(%rdi), %rax 769*8d67ca89SAndroid Build Coastguard Worker#endif 770*8d67ca89SAndroid Build Coastguard Worker#if defined USE_AS_STRNCPY && !defined USE_AS_STRCAT 771*8d67ca89SAndroid Build Coastguard Worker sub $14, %r8 772*8d67ca89SAndroid Build Coastguard Worker lea 14(%rdi), %rdi 773*8d67ca89SAndroid Build Coastguard Worker jnz L(StrncpyFillTailWithZero) 774*8d67ca89SAndroid Build Coastguard Worker#endif 775*8d67ca89SAndroid Build Coastguard Worker RETURN 776*8d67ca89SAndroid Build Coastguard Worker 777*8d67ca89SAndroid Build Coastguard Worker .p2align 4 778*8d67ca89SAndroid Build Coastguard WorkerL(Exit15): 779*8d67ca89SAndroid Build Coastguard Worker mov (%rsi), %rcx 780*8d67ca89SAndroid Build Coastguard Worker mov 7(%rsi), %rdx 781*8d67ca89SAndroid Build Coastguard Worker mov %rcx, (%rdi) 782*8d67ca89SAndroid Build Coastguard Worker mov %rdx, 7(%rdi) 783*8d67ca89SAndroid Build Coastguard Worker#ifdef USE_AS_STPCPY 784*8d67ca89SAndroid Build Coastguard Worker lea 14(%rdi), %rax 785*8d67ca89SAndroid Build Coastguard Worker#endif 786*8d67ca89SAndroid Build Coastguard Worker#if defined USE_AS_STRNCPY && !defined USE_AS_STRCAT 787*8d67ca89SAndroid Build Coastguard Worker sub $15, %r8 788*8d67ca89SAndroid Build Coastguard Worker lea 15(%rdi), %rdi 789*8d67ca89SAndroid Build Coastguard Worker jnz L(StrncpyFillTailWithZero) 790*8d67ca89SAndroid Build Coastguard Worker#endif 791*8d67ca89SAndroid Build Coastguard Worker RETURN 792*8d67ca89SAndroid Build Coastguard Worker 793*8d67ca89SAndroid Build Coastguard Worker .p2align 4 794*8d67ca89SAndroid Build Coastguard WorkerL(Exit16): 795*8d67ca89SAndroid Build Coastguard Worker movdqu (%rsi), %xmm0 796*8d67ca89SAndroid Build Coastguard Worker movdqu %xmm0, (%rdi) 797*8d67ca89SAndroid Build Coastguard Worker#ifdef USE_AS_STPCPY 798*8d67ca89SAndroid Build Coastguard Worker lea 15(%rdi), %rax 799*8d67ca89SAndroid Build Coastguard Worker#endif 800*8d67ca89SAndroid Build Coastguard Worker#if defined USE_AS_STRNCPY && !defined USE_AS_STRCAT 801*8d67ca89SAndroid Build Coastguard Worker sub $16, %r8 802*8d67ca89SAndroid Build Coastguard Worker lea 16(%rdi), %rdi 803*8d67ca89SAndroid Build Coastguard Worker jnz L(StrncpyFillTailWithZero) 804*8d67ca89SAndroid Build Coastguard Worker#endif 805*8d67ca89SAndroid Build Coastguard Worker RETURN 806*8d67ca89SAndroid Build Coastguard Worker 807*8d67ca89SAndroid Build Coastguard Worker .p2align 4 808*8d67ca89SAndroid Build Coastguard WorkerL(Exit17): 809*8d67ca89SAndroid Build Coastguard Worker movdqu (%rsi), %xmm0 810*8d67ca89SAndroid Build Coastguard Worker movdqu %xmm0, (%rdi) 811*8d67ca89SAndroid Build Coastguard Worker mov %dh, 16(%rdi) 812*8d67ca89SAndroid Build Coastguard Worker#ifdef USE_AS_STPCPY 813*8d67ca89SAndroid Build Coastguard Worker lea 16(%rdi), %rax 814*8d67ca89SAndroid Build Coastguard Worker#endif 815*8d67ca89SAndroid Build Coastguard Worker#if defined USE_AS_STRNCPY && !defined USE_AS_STRCAT 816*8d67ca89SAndroid Build Coastguard Worker sub $17, %r8 817*8d67ca89SAndroid Build Coastguard Worker lea 17(%rdi), %rdi 818*8d67ca89SAndroid Build Coastguard Worker jnz L(StrncpyFillTailWithZero) 819*8d67ca89SAndroid Build Coastguard Worker#endif 820*8d67ca89SAndroid Build Coastguard Worker RETURN 821*8d67ca89SAndroid Build Coastguard Worker 822*8d67ca89SAndroid Build Coastguard Worker .p2align 4 823*8d67ca89SAndroid Build Coastguard WorkerL(Exit18): 824*8d67ca89SAndroid Build Coastguard Worker movdqu (%rsi), %xmm0 825*8d67ca89SAndroid Build Coastguard Worker mov 16(%rsi), %cx 826*8d67ca89SAndroid Build Coastguard Worker movdqu %xmm0, (%rdi) 827*8d67ca89SAndroid Build Coastguard Worker mov %cx, 16(%rdi) 828*8d67ca89SAndroid Build Coastguard Worker#ifdef USE_AS_STPCPY 829*8d67ca89SAndroid Build Coastguard Worker lea 17(%rdi), %rax 830*8d67ca89SAndroid Build Coastguard Worker#endif 831*8d67ca89SAndroid Build Coastguard Worker#if defined USE_AS_STRNCPY && !defined USE_AS_STRCAT 832*8d67ca89SAndroid Build Coastguard Worker sub $18, %r8 833*8d67ca89SAndroid Build Coastguard Worker lea 18(%rdi), %rdi 834*8d67ca89SAndroid Build Coastguard Worker jnz L(StrncpyFillTailWithZero) 835*8d67ca89SAndroid Build Coastguard Worker#endif 836*8d67ca89SAndroid Build Coastguard Worker RETURN 837*8d67ca89SAndroid Build Coastguard Worker 838*8d67ca89SAndroid Build Coastguard Worker .p2align 4 839*8d67ca89SAndroid Build Coastguard WorkerL(Exit19): 840*8d67ca89SAndroid Build Coastguard Worker movdqu (%rsi), %xmm0 841*8d67ca89SAndroid Build Coastguard Worker mov 15(%rsi), %ecx 842*8d67ca89SAndroid Build Coastguard Worker movdqu %xmm0, (%rdi) 843*8d67ca89SAndroid Build Coastguard Worker mov %ecx, 15(%rdi) 844*8d67ca89SAndroid Build Coastguard Worker#ifdef USE_AS_STPCPY 845*8d67ca89SAndroid Build Coastguard Worker lea 18(%rdi), %rax 846*8d67ca89SAndroid Build Coastguard Worker#endif 847*8d67ca89SAndroid Build Coastguard Worker#if defined USE_AS_STRNCPY && !defined USE_AS_STRCAT 848*8d67ca89SAndroid Build Coastguard Worker sub $19, %r8 849*8d67ca89SAndroid Build Coastguard Worker lea 19(%rdi), %rdi 850*8d67ca89SAndroid Build Coastguard Worker jnz L(StrncpyFillTailWithZero) 851*8d67ca89SAndroid Build Coastguard Worker#endif 852*8d67ca89SAndroid Build Coastguard Worker RETURN 853*8d67ca89SAndroid Build Coastguard Worker 854*8d67ca89SAndroid Build Coastguard Worker .p2align 4 855*8d67ca89SAndroid Build Coastguard WorkerL(Exit20): 856*8d67ca89SAndroid Build Coastguard Worker movdqu (%rsi), %xmm0 857*8d67ca89SAndroid Build Coastguard Worker mov 16(%rsi), %ecx 858*8d67ca89SAndroid Build Coastguard Worker movdqu %xmm0, (%rdi) 859*8d67ca89SAndroid Build Coastguard Worker mov %ecx, 16(%rdi) 860*8d67ca89SAndroid Build Coastguard Worker#ifdef USE_AS_STPCPY 861*8d67ca89SAndroid Build Coastguard Worker lea 19(%rdi), %rax 862*8d67ca89SAndroid Build Coastguard Worker#endif 863*8d67ca89SAndroid Build Coastguard Worker#if defined USE_AS_STRNCPY && !defined USE_AS_STRCAT 864*8d67ca89SAndroid Build Coastguard Worker sub $20, %r8 865*8d67ca89SAndroid Build Coastguard Worker lea 20(%rdi), %rdi 866*8d67ca89SAndroid Build Coastguard Worker jnz L(StrncpyFillTailWithZero) 867*8d67ca89SAndroid Build Coastguard Worker#endif 868*8d67ca89SAndroid Build Coastguard Worker RETURN 869*8d67ca89SAndroid Build Coastguard Worker 870*8d67ca89SAndroid Build Coastguard Worker .p2align 4 871*8d67ca89SAndroid Build Coastguard WorkerL(Exit21): 872*8d67ca89SAndroid Build Coastguard Worker movdqu (%rsi), %xmm0 873*8d67ca89SAndroid Build Coastguard Worker mov 16(%rsi), %ecx 874*8d67ca89SAndroid Build Coastguard Worker movdqu %xmm0, (%rdi) 875*8d67ca89SAndroid Build Coastguard Worker mov %ecx, 16(%rdi) 876*8d67ca89SAndroid Build Coastguard Worker mov %dh, 20(%rdi) 877*8d67ca89SAndroid Build Coastguard Worker#ifdef USE_AS_STPCPY 878*8d67ca89SAndroid Build Coastguard Worker lea 20(%rdi), %rax 879*8d67ca89SAndroid Build Coastguard Worker#endif 880*8d67ca89SAndroid Build Coastguard Worker#if defined USE_AS_STRNCPY && !defined USE_AS_STRCAT 881*8d67ca89SAndroid Build Coastguard Worker sub $21, %r8 882*8d67ca89SAndroid Build Coastguard Worker lea 21(%rdi), %rdi 883*8d67ca89SAndroid Build Coastguard Worker jnz L(StrncpyFillTailWithZero) 884*8d67ca89SAndroid Build Coastguard Worker#endif 885*8d67ca89SAndroid Build Coastguard Worker RETURN 886*8d67ca89SAndroid Build Coastguard Worker 887*8d67ca89SAndroid Build Coastguard Worker .p2align 4 888*8d67ca89SAndroid Build Coastguard WorkerL(Exit22): 889*8d67ca89SAndroid Build Coastguard Worker movdqu (%rsi), %xmm0 890*8d67ca89SAndroid Build Coastguard Worker mov 14(%rsi), %rcx 891*8d67ca89SAndroid Build Coastguard Worker movdqu %xmm0, (%rdi) 892*8d67ca89SAndroid Build Coastguard Worker mov %rcx, 14(%rdi) 893*8d67ca89SAndroid Build Coastguard Worker#ifdef USE_AS_STPCPY 894*8d67ca89SAndroid Build Coastguard Worker lea 21(%rdi), %rax 895*8d67ca89SAndroid Build Coastguard Worker#endif 896*8d67ca89SAndroid Build Coastguard Worker#if defined USE_AS_STRNCPY && !defined USE_AS_STRCAT 897*8d67ca89SAndroid Build Coastguard Worker sub $22, %r8 898*8d67ca89SAndroid Build Coastguard Worker lea 22(%rdi), %rdi 899*8d67ca89SAndroid Build Coastguard Worker jnz L(StrncpyFillTailWithZero) 900*8d67ca89SAndroid Build Coastguard Worker#endif 901*8d67ca89SAndroid Build Coastguard Worker RETURN 902*8d67ca89SAndroid Build Coastguard Worker 903*8d67ca89SAndroid Build Coastguard Worker .p2align 4 904*8d67ca89SAndroid Build Coastguard WorkerL(Exit23): 905*8d67ca89SAndroid Build Coastguard Worker movdqu (%rsi), %xmm0 906*8d67ca89SAndroid Build Coastguard Worker mov 15(%rsi), %rcx 907*8d67ca89SAndroid Build Coastguard Worker movdqu %xmm0, (%rdi) 908*8d67ca89SAndroid Build Coastguard Worker mov %rcx, 15(%rdi) 909*8d67ca89SAndroid Build Coastguard Worker#ifdef USE_AS_STPCPY 910*8d67ca89SAndroid Build Coastguard Worker lea 22(%rdi), %rax 911*8d67ca89SAndroid Build Coastguard Worker#endif 912*8d67ca89SAndroid Build Coastguard Worker#if defined USE_AS_STRNCPY && !defined USE_AS_STRCAT 913*8d67ca89SAndroid Build Coastguard Worker sub $23, %r8 914*8d67ca89SAndroid Build Coastguard Worker lea 23(%rdi), %rdi 915*8d67ca89SAndroid Build Coastguard Worker jnz L(StrncpyFillTailWithZero) 916*8d67ca89SAndroid Build Coastguard Worker#endif 917*8d67ca89SAndroid Build Coastguard Worker RETURN 918*8d67ca89SAndroid Build Coastguard Worker 919*8d67ca89SAndroid Build Coastguard Worker .p2align 4 920*8d67ca89SAndroid Build Coastguard WorkerL(Exit24): 921*8d67ca89SAndroid Build Coastguard Worker movdqu (%rsi), %xmm0 922*8d67ca89SAndroid Build Coastguard Worker mov 16(%rsi), %rcx 923*8d67ca89SAndroid Build Coastguard Worker movdqu %xmm0, (%rdi) 924*8d67ca89SAndroid Build Coastguard Worker mov %rcx, 16(%rdi) 925*8d67ca89SAndroid Build Coastguard Worker#ifdef USE_AS_STPCPY 926*8d67ca89SAndroid Build Coastguard Worker lea 23(%rdi), %rax 927*8d67ca89SAndroid Build Coastguard Worker#endif 928*8d67ca89SAndroid Build Coastguard Worker#if defined USE_AS_STRNCPY && !defined USE_AS_STRCAT 929*8d67ca89SAndroid Build Coastguard Worker sub $24, %r8 930*8d67ca89SAndroid Build Coastguard Worker lea 24(%rdi), %rdi 931*8d67ca89SAndroid Build Coastguard Worker jnz L(StrncpyFillTailWithZero) 932*8d67ca89SAndroid Build Coastguard Worker#endif 933*8d67ca89SAndroid Build Coastguard Worker RETURN 934*8d67ca89SAndroid Build Coastguard Worker 935*8d67ca89SAndroid Build Coastguard Worker .p2align 4 936*8d67ca89SAndroid Build Coastguard WorkerL(Exit25): 937*8d67ca89SAndroid Build Coastguard Worker movdqu (%rsi), %xmm0 938*8d67ca89SAndroid Build Coastguard Worker mov 16(%rsi), %rcx 939*8d67ca89SAndroid Build Coastguard Worker movdqu %xmm0, (%rdi) 940*8d67ca89SAndroid Build Coastguard Worker mov %rcx, 16(%rdi) 941*8d67ca89SAndroid Build Coastguard Worker mov %dh, 24(%rdi) 942*8d67ca89SAndroid Build Coastguard Worker#ifdef USE_AS_STPCPY 943*8d67ca89SAndroid Build Coastguard Worker lea 24(%rdi), %rax 944*8d67ca89SAndroid Build Coastguard Worker#endif 945*8d67ca89SAndroid Build Coastguard Worker#if defined USE_AS_STRNCPY && !defined USE_AS_STRCAT 946*8d67ca89SAndroid Build Coastguard Worker sub $25, %r8 947*8d67ca89SAndroid Build Coastguard Worker lea 25(%rdi), %rdi 948*8d67ca89SAndroid Build Coastguard Worker jnz L(StrncpyFillTailWithZero) 949*8d67ca89SAndroid Build Coastguard Worker#endif 950*8d67ca89SAndroid Build Coastguard Worker RETURN 951*8d67ca89SAndroid Build Coastguard Worker 952*8d67ca89SAndroid Build Coastguard Worker .p2align 4 953*8d67ca89SAndroid Build Coastguard WorkerL(Exit26): 954*8d67ca89SAndroid Build Coastguard Worker movdqu (%rsi), %xmm0 955*8d67ca89SAndroid Build Coastguard Worker mov 16(%rsi), %rdx 956*8d67ca89SAndroid Build Coastguard Worker mov 24(%rsi), %cx 957*8d67ca89SAndroid Build Coastguard Worker movdqu %xmm0, (%rdi) 958*8d67ca89SAndroid Build Coastguard Worker mov %rdx, 16(%rdi) 959*8d67ca89SAndroid Build Coastguard Worker mov %cx, 24(%rdi) 960*8d67ca89SAndroid Build Coastguard Worker#ifdef USE_AS_STPCPY 961*8d67ca89SAndroid Build Coastguard Worker lea 25(%rdi), %rax 962*8d67ca89SAndroid Build Coastguard Worker#endif 963*8d67ca89SAndroid Build Coastguard Worker#if defined USE_AS_STRNCPY && !defined USE_AS_STRCAT 964*8d67ca89SAndroid Build Coastguard Worker sub $26, %r8 965*8d67ca89SAndroid Build Coastguard Worker lea 26(%rdi), %rdi 966*8d67ca89SAndroid Build Coastguard Worker jnz L(StrncpyFillTailWithZero) 967*8d67ca89SAndroid Build Coastguard Worker#endif 968*8d67ca89SAndroid Build Coastguard Worker RETURN 969*8d67ca89SAndroid Build Coastguard Worker 970*8d67ca89SAndroid Build Coastguard Worker .p2align 4 971*8d67ca89SAndroid Build Coastguard WorkerL(Exit27): 972*8d67ca89SAndroid Build Coastguard Worker movdqu (%rsi), %xmm0 973*8d67ca89SAndroid Build Coastguard Worker mov 16(%rsi), %rdx 974*8d67ca89SAndroid Build Coastguard Worker mov 23(%rsi), %ecx 975*8d67ca89SAndroid Build Coastguard Worker movdqu %xmm0, (%rdi) 976*8d67ca89SAndroid Build Coastguard Worker mov %rdx, 16(%rdi) 977*8d67ca89SAndroid Build Coastguard Worker mov %ecx, 23(%rdi) 978*8d67ca89SAndroid Build Coastguard Worker#ifdef USE_AS_STPCPY 979*8d67ca89SAndroid Build Coastguard Worker lea 26(%rdi), %rax 980*8d67ca89SAndroid Build Coastguard Worker#endif 981*8d67ca89SAndroid Build Coastguard Worker#if defined USE_AS_STRNCPY && !defined USE_AS_STRCAT 982*8d67ca89SAndroid Build Coastguard Worker sub $27, %r8 983*8d67ca89SAndroid Build Coastguard Worker lea 27(%rdi), %rdi 984*8d67ca89SAndroid Build Coastguard Worker jnz L(StrncpyFillTailWithZero) 985*8d67ca89SAndroid Build Coastguard Worker#endif 986*8d67ca89SAndroid Build Coastguard Worker RETURN 987*8d67ca89SAndroid Build Coastguard Worker 988*8d67ca89SAndroid Build Coastguard Worker .p2align 4 989*8d67ca89SAndroid Build Coastguard WorkerL(Exit28): 990*8d67ca89SAndroid Build Coastguard Worker movdqu (%rsi), %xmm0 991*8d67ca89SAndroid Build Coastguard Worker mov 16(%rsi), %rdx 992*8d67ca89SAndroid Build Coastguard Worker mov 24(%rsi), %ecx 993*8d67ca89SAndroid Build Coastguard Worker movdqu %xmm0, (%rdi) 994*8d67ca89SAndroid Build Coastguard Worker mov %rdx, 16(%rdi) 995*8d67ca89SAndroid Build Coastguard Worker mov %ecx, 24(%rdi) 996*8d67ca89SAndroid Build Coastguard Worker#ifdef USE_AS_STPCPY 997*8d67ca89SAndroid Build Coastguard Worker lea 27(%rdi), %rax 998*8d67ca89SAndroid Build Coastguard Worker#endif 999*8d67ca89SAndroid Build Coastguard Worker#if defined USE_AS_STRNCPY && !defined USE_AS_STRCAT 1000*8d67ca89SAndroid Build Coastguard Worker sub $28, %r8 1001*8d67ca89SAndroid Build Coastguard Worker lea 28(%rdi), %rdi 1002*8d67ca89SAndroid Build Coastguard Worker jnz L(StrncpyFillTailWithZero) 1003*8d67ca89SAndroid Build Coastguard Worker#endif 1004*8d67ca89SAndroid Build Coastguard Worker RETURN 1005*8d67ca89SAndroid Build Coastguard Worker 1006*8d67ca89SAndroid Build Coastguard Worker .p2align 4 1007*8d67ca89SAndroid Build Coastguard WorkerL(Exit29): 1008*8d67ca89SAndroid Build Coastguard Worker movdqu (%rsi), %xmm0 1009*8d67ca89SAndroid Build Coastguard Worker movdqu 13(%rsi), %xmm2 1010*8d67ca89SAndroid Build Coastguard Worker movdqu %xmm0, (%rdi) 1011*8d67ca89SAndroid Build Coastguard Worker movdqu %xmm2, 13(%rdi) 1012*8d67ca89SAndroid Build Coastguard Worker#ifdef USE_AS_STPCPY 1013*8d67ca89SAndroid Build Coastguard Worker lea 28(%rdi), %rax 1014*8d67ca89SAndroid Build Coastguard Worker#endif 1015*8d67ca89SAndroid Build Coastguard Worker#if defined USE_AS_STRNCPY && !defined USE_AS_STRCAT 1016*8d67ca89SAndroid Build Coastguard Worker sub $29, %r8 1017*8d67ca89SAndroid Build Coastguard Worker lea 29(%rdi), %rdi 1018*8d67ca89SAndroid Build Coastguard Worker jnz L(StrncpyFillTailWithZero) 1019*8d67ca89SAndroid Build Coastguard Worker#endif 1020*8d67ca89SAndroid Build Coastguard Worker RETURN 1021*8d67ca89SAndroid Build Coastguard Worker 1022*8d67ca89SAndroid Build Coastguard Worker .p2align 4 1023*8d67ca89SAndroid Build Coastguard WorkerL(Exit30): 1024*8d67ca89SAndroid Build Coastguard Worker movdqu (%rsi), %xmm0 1025*8d67ca89SAndroid Build Coastguard Worker movdqu 14(%rsi), %xmm2 1026*8d67ca89SAndroid Build Coastguard Worker movdqu %xmm0, (%rdi) 1027*8d67ca89SAndroid Build Coastguard Worker movdqu %xmm2, 14(%rdi) 1028*8d67ca89SAndroid Build Coastguard Worker#ifdef USE_AS_STPCPY 1029*8d67ca89SAndroid Build Coastguard Worker lea 29(%rdi), %rax 1030*8d67ca89SAndroid Build Coastguard Worker#endif 1031*8d67ca89SAndroid Build Coastguard Worker#if defined USE_AS_STRNCPY && !defined USE_AS_STRCAT 1032*8d67ca89SAndroid Build Coastguard Worker sub $30, %r8 1033*8d67ca89SAndroid Build Coastguard Worker lea 30(%rdi), %rdi 1034*8d67ca89SAndroid Build Coastguard Worker jnz L(StrncpyFillTailWithZero) 1035*8d67ca89SAndroid Build Coastguard Worker#endif 1036*8d67ca89SAndroid Build Coastguard Worker RETURN 1037*8d67ca89SAndroid Build Coastguard Worker 1038*8d67ca89SAndroid Build Coastguard Worker .p2align 4 1039*8d67ca89SAndroid Build Coastguard WorkerL(Exit31): 1040*8d67ca89SAndroid Build Coastguard Worker movdqu (%rsi), %xmm0 1041*8d67ca89SAndroid Build Coastguard Worker movdqu 15(%rsi), %xmm2 1042*8d67ca89SAndroid Build Coastguard Worker movdqu %xmm0, (%rdi) 1043*8d67ca89SAndroid Build Coastguard Worker movdqu %xmm2, 15(%rdi) 1044*8d67ca89SAndroid Build Coastguard Worker#ifdef USE_AS_STPCPY 1045*8d67ca89SAndroid Build Coastguard Worker lea 30(%rdi), %rax 1046*8d67ca89SAndroid Build Coastguard Worker#endif 1047*8d67ca89SAndroid Build Coastguard Worker#if defined USE_AS_STRNCPY && !defined USE_AS_STRCAT 1048*8d67ca89SAndroid Build Coastguard Worker sub $31, %r8 1049*8d67ca89SAndroid Build Coastguard Worker lea 31(%rdi), %rdi 1050*8d67ca89SAndroid Build Coastguard Worker jnz L(StrncpyFillTailWithZero) 1051*8d67ca89SAndroid Build Coastguard Worker#endif 1052*8d67ca89SAndroid Build Coastguard Worker RETURN 1053*8d67ca89SAndroid Build Coastguard Worker 1054*8d67ca89SAndroid Build Coastguard Worker .p2align 4 1055*8d67ca89SAndroid Build Coastguard WorkerL(Exit32): 1056*8d67ca89SAndroid Build Coastguard Worker movdqu (%rsi), %xmm0 1057*8d67ca89SAndroid Build Coastguard Worker movdqu 16(%rsi), %xmm2 1058*8d67ca89SAndroid Build Coastguard Worker movdqu %xmm0, (%rdi) 1059*8d67ca89SAndroid Build Coastguard Worker movdqu %xmm2, 16(%rdi) 1060*8d67ca89SAndroid Build Coastguard Worker#ifdef USE_AS_STPCPY 1061*8d67ca89SAndroid Build Coastguard Worker lea 31(%rdi), %rax 1062*8d67ca89SAndroid Build Coastguard Worker#endif 1063*8d67ca89SAndroid Build Coastguard Worker#if defined USE_AS_STRNCPY && !defined USE_AS_STRCAT 1064*8d67ca89SAndroid Build Coastguard Worker sub $32, %r8 1065*8d67ca89SAndroid Build Coastguard Worker lea 32(%rdi), %rdi 1066*8d67ca89SAndroid Build Coastguard Worker jnz L(StrncpyFillTailWithZero) 1067*8d67ca89SAndroid Build Coastguard Worker#endif 1068*8d67ca89SAndroid Build Coastguard Worker RETURN 1069*8d67ca89SAndroid Build Coastguard Worker 1070*8d67ca89SAndroid Build Coastguard Worker#ifdef USE_AS_STRNCPY 1071*8d67ca89SAndroid Build Coastguard Worker 1072*8d67ca89SAndroid Build Coastguard Worker .p2align 4 1073*8d67ca89SAndroid Build Coastguard WorkerL(StrncpyExit0): 1074*8d67ca89SAndroid Build Coastguard Worker#ifdef USE_AS_STPCPY 1075*8d67ca89SAndroid Build Coastguard Worker mov %rdi, %rax 1076*8d67ca89SAndroid Build Coastguard Worker#endif 1077*8d67ca89SAndroid Build Coastguard Worker#ifdef USE_AS_STRCAT 1078*8d67ca89SAndroid Build Coastguard Worker xor %ch, %ch 1079*8d67ca89SAndroid Build Coastguard Worker movb %ch, (%rdi) 1080*8d67ca89SAndroid Build Coastguard Worker#endif 1081*8d67ca89SAndroid Build Coastguard Worker RETURN 1082*8d67ca89SAndroid Build Coastguard Worker 1083*8d67ca89SAndroid Build Coastguard Worker .p2align 4 1084*8d67ca89SAndroid Build Coastguard WorkerL(StrncpyExit1): 1085*8d67ca89SAndroid Build Coastguard Worker mov (%rsi), %dl 1086*8d67ca89SAndroid Build Coastguard Worker mov %dl, (%rdi) 1087*8d67ca89SAndroid Build Coastguard Worker#ifdef USE_AS_STPCPY 1088*8d67ca89SAndroid Build Coastguard Worker lea 1(%rdi), %rax 1089*8d67ca89SAndroid Build Coastguard Worker#endif 1090*8d67ca89SAndroid Build Coastguard Worker#ifdef USE_AS_STRCAT 1091*8d67ca89SAndroid Build Coastguard Worker xor %ch, %ch 1092*8d67ca89SAndroid Build Coastguard Worker movb %ch, 1(%rdi) 1093*8d67ca89SAndroid Build Coastguard Worker#endif 1094*8d67ca89SAndroid Build Coastguard Worker RETURN 1095*8d67ca89SAndroid Build Coastguard Worker 1096*8d67ca89SAndroid Build Coastguard Worker .p2align 4 1097*8d67ca89SAndroid Build Coastguard WorkerL(StrncpyExit2): 1098*8d67ca89SAndroid Build Coastguard Worker mov (%rsi), %dx 1099*8d67ca89SAndroid Build Coastguard Worker mov %dx, (%rdi) 1100*8d67ca89SAndroid Build Coastguard Worker#ifdef USE_AS_STPCPY 1101*8d67ca89SAndroid Build Coastguard Worker lea 2(%rdi), %rax 1102*8d67ca89SAndroid Build Coastguard Worker#endif 1103*8d67ca89SAndroid Build Coastguard Worker#ifdef USE_AS_STRCAT 1104*8d67ca89SAndroid Build Coastguard Worker xor %ch, %ch 1105*8d67ca89SAndroid Build Coastguard Worker movb %ch, 2(%rdi) 1106*8d67ca89SAndroid Build Coastguard Worker#endif 1107*8d67ca89SAndroid Build Coastguard Worker RETURN 1108*8d67ca89SAndroid Build Coastguard Worker 1109*8d67ca89SAndroid Build Coastguard Worker .p2align 4 1110*8d67ca89SAndroid Build Coastguard WorkerL(StrncpyExit3): 1111*8d67ca89SAndroid Build Coastguard Worker mov (%rsi), %cx 1112*8d67ca89SAndroid Build Coastguard Worker mov 2(%rsi), %dl 1113*8d67ca89SAndroid Build Coastguard Worker mov %cx, (%rdi) 1114*8d67ca89SAndroid Build Coastguard Worker mov %dl, 2(%rdi) 1115*8d67ca89SAndroid Build Coastguard Worker#ifdef USE_AS_STPCPY 1116*8d67ca89SAndroid Build Coastguard Worker lea 3(%rdi), %rax 1117*8d67ca89SAndroid Build Coastguard Worker#endif 1118*8d67ca89SAndroid Build Coastguard Worker#ifdef USE_AS_STRCAT 1119*8d67ca89SAndroid Build Coastguard Worker xor %ch, %ch 1120*8d67ca89SAndroid Build Coastguard Worker movb %ch, 3(%rdi) 1121*8d67ca89SAndroid Build Coastguard Worker#endif 1122*8d67ca89SAndroid Build Coastguard Worker RETURN 1123*8d67ca89SAndroid Build Coastguard Worker 1124*8d67ca89SAndroid Build Coastguard Worker .p2align 4 1125*8d67ca89SAndroid Build Coastguard WorkerL(StrncpyExit4): 1126*8d67ca89SAndroid Build Coastguard Worker mov (%rsi), %edx 1127*8d67ca89SAndroid Build Coastguard Worker mov %edx, (%rdi) 1128*8d67ca89SAndroid Build Coastguard Worker#ifdef USE_AS_STPCPY 1129*8d67ca89SAndroid Build Coastguard Worker lea 4(%rdi), %rax 1130*8d67ca89SAndroid Build Coastguard Worker#endif 1131*8d67ca89SAndroid Build Coastguard Worker#ifdef USE_AS_STRCAT 1132*8d67ca89SAndroid Build Coastguard Worker xor %ch, %ch 1133*8d67ca89SAndroid Build Coastguard Worker movb %ch, 4(%rdi) 1134*8d67ca89SAndroid Build Coastguard Worker#endif 1135*8d67ca89SAndroid Build Coastguard Worker RETURN 1136*8d67ca89SAndroid Build Coastguard Worker 1137*8d67ca89SAndroid Build Coastguard Worker .p2align 4 1138*8d67ca89SAndroid Build Coastguard WorkerL(StrncpyExit5): 1139*8d67ca89SAndroid Build Coastguard Worker mov (%rsi), %ecx 1140*8d67ca89SAndroid Build Coastguard Worker mov 4(%rsi), %dl 1141*8d67ca89SAndroid Build Coastguard Worker mov %ecx, (%rdi) 1142*8d67ca89SAndroid Build Coastguard Worker mov %dl, 4(%rdi) 1143*8d67ca89SAndroid Build Coastguard Worker#ifdef USE_AS_STPCPY 1144*8d67ca89SAndroid Build Coastguard Worker lea 5(%rdi), %rax 1145*8d67ca89SAndroid Build Coastguard Worker#endif 1146*8d67ca89SAndroid Build Coastguard Worker#ifdef USE_AS_STRCAT 1147*8d67ca89SAndroid Build Coastguard Worker xor %ch, %ch 1148*8d67ca89SAndroid Build Coastguard Worker movb %ch, 5(%rdi) 1149*8d67ca89SAndroid Build Coastguard Worker#endif 1150*8d67ca89SAndroid Build Coastguard Worker RETURN 1151*8d67ca89SAndroid Build Coastguard Worker 1152*8d67ca89SAndroid Build Coastguard Worker .p2align 4 1153*8d67ca89SAndroid Build Coastguard WorkerL(StrncpyExit6): 1154*8d67ca89SAndroid Build Coastguard Worker mov (%rsi), %ecx 1155*8d67ca89SAndroid Build Coastguard Worker mov 4(%rsi), %dx 1156*8d67ca89SAndroid Build Coastguard Worker mov %ecx, (%rdi) 1157*8d67ca89SAndroid Build Coastguard Worker mov %dx, 4(%rdi) 1158*8d67ca89SAndroid Build Coastguard Worker#ifdef USE_AS_STPCPY 1159*8d67ca89SAndroid Build Coastguard Worker lea 6(%rdi), %rax 1160*8d67ca89SAndroid Build Coastguard Worker#endif 1161*8d67ca89SAndroid Build Coastguard Worker#ifdef USE_AS_STRCAT 1162*8d67ca89SAndroid Build Coastguard Worker xor %ch, %ch 1163*8d67ca89SAndroid Build Coastguard Worker movb %ch, 6(%rdi) 1164*8d67ca89SAndroid Build Coastguard Worker#endif 1165*8d67ca89SAndroid Build Coastguard Worker RETURN 1166*8d67ca89SAndroid Build Coastguard Worker 1167*8d67ca89SAndroid Build Coastguard Worker .p2align 4 1168*8d67ca89SAndroid Build Coastguard WorkerL(StrncpyExit7): 1169*8d67ca89SAndroid Build Coastguard Worker mov (%rsi), %ecx 1170*8d67ca89SAndroid Build Coastguard Worker mov 3(%rsi), %edx 1171*8d67ca89SAndroid Build Coastguard Worker mov %ecx, (%rdi) 1172*8d67ca89SAndroid Build Coastguard Worker mov %edx, 3(%rdi) 1173*8d67ca89SAndroid Build Coastguard Worker#ifdef USE_AS_STPCPY 1174*8d67ca89SAndroid Build Coastguard Worker lea 7(%rdi), %rax 1175*8d67ca89SAndroid Build Coastguard Worker#endif 1176*8d67ca89SAndroid Build Coastguard Worker#ifdef USE_AS_STRCAT 1177*8d67ca89SAndroid Build Coastguard Worker xor %ch, %ch 1178*8d67ca89SAndroid Build Coastguard Worker movb %ch, 7(%rdi) 1179*8d67ca89SAndroid Build Coastguard Worker#endif 1180*8d67ca89SAndroid Build Coastguard Worker RETURN 1181*8d67ca89SAndroid Build Coastguard Worker 1182*8d67ca89SAndroid Build Coastguard Worker .p2align 4 1183*8d67ca89SAndroid Build Coastguard WorkerL(StrncpyExit8): 1184*8d67ca89SAndroid Build Coastguard Worker mov (%rsi), %rdx 1185*8d67ca89SAndroid Build Coastguard Worker mov %rdx, (%rdi) 1186*8d67ca89SAndroid Build Coastguard Worker#ifdef USE_AS_STPCPY 1187*8d67ca89SAndroid Build Coastguard Worker lea 8(%rdi), %rax 1188*8d67ca89SAndroid Build Coastguard Worker#endif 1189*8d67ca89SAndroid Build Coastguard Worker#ifdef USE_AS_STRCAT 1190*8d67ca89SAndroid Build Coastguard Worker xor %ch, %ch 1191*8d67ca89SAndroid Build Coastguard Worker movb %ch, 8(%rdi) 1192*8d67ca89SAndroid Build Coastguard Worker#endif 1193*8d67ca89SAndroid Build Coastguard Worker RETURN 1194*8d67ca89SAndroid Build Coastguard Worker 1195*8d67ca89SAndroid Build Coastguard Worker .p2align 4 1196*8d67ca89SAndroid Build Coastguard WorkerL(StrncpyExit9): 1197*8d67ca89SAndroid Build Coastguard Worker mov (%rsi), %rcx 1198*8d67ca89SAndroid Build Coastguard Worker mov 8(%rsi), %dl 1199*8d67ca89SAndroid Build Coastguard Worker mov %rcx, (%rdi) 1200*8d67ca89SAndroid Build Coastguard Worker mov %dl, 8(%rdi) 1201*8d67ca89SAndroid Build Coastguard Worker#ifdef USE_AS_STPCPY 1202*8d67ca89SAndroid Build Coastguard Worker lea 9(%rdi), %rax 1203*8d67ca89SAndroid Build Coastguard Worker#endif 1204*8d67ca89SAndroid Build Coastguard Worker#ifdef USE_AS_STRCAT 1205*8d67ca89SAndroid Build Coastguard Worker xor %ch, %ch 1206*8d67ca89SAndroid Build Coastguard Worker movb %ch, 9(%rdi) 1207*8d67ca89SAndroid Build Coastguard Worker#endif 1208*8d67ca89SAndroid Build Coastguard Worker RETURN 1209*8d67ca89SAndroid Build Coastguard Worker 1210*8d67ca89SAndroid Build Coastguard Worker .p2align 4 1211*8d67ca89SAndroid Build Coastguard WorkerL(StrncpyExit10): 1212*8d67ca89SAndroid Build Coastguard Worker mov (%rsi), %rcx 1213*8d67ca89SAndroid Build Coastguard Worker mov 8(%rsi), %dx 1214*8d67ca89SAndroid Build Coastguard Worker mov %rcx, (%rdi) 1215*8d67ca89SAndroid Build Coastguard Worker mov %dx, 8(%rdi) 1216*8d67ca89SAndroid Build Coastguard Worker#ifdef USE_AS_STPCPY 1217*8d67ca89SAndroid Build Coastguard Worker lea 10(%rdi), %rax 1218*8d67ca89SAndroid Build Coastguard Worker#endif 1219*8d67ca89SAndroid Build Coastguard Worker#ifdef USE_AS_STRCAT 1220*8d67ca89SAndroid Build Coastguard Worker xor %ch, %ch 1221*8d67ca89SAndroid Build Coastguard Worker movb %ch, 10(%rdi) 1222*8d67ca89SAndroid Build Coastguard Worker#endif 1223*8d67ca89SAndroid Build Coastguard Worker RETURN 1224*8d67ca89SAndroid Build Coastguard Worker 1225*8d67ca89SAndroid Build Coastguard Worker .p2align 4 1226*8d67ca89SAndroid Build Coastguard WorkerL(StrncpyExit11): 1227*8d67ca89SAndroid Build Coastguard Worker mov (%rsi), %rcx 1228*8d67ca89SAndroid Build Coastguard Worker mov 7(%rsi), %edx 1229*8d67ca89SAndroid Build Coastguard Worker mov %rcx, (%rdi) 1230*8d67ca89SAndroid Build Coastguard Worker mov %edx, 7(%rdi) 1231*8d67ca89SAndroid Build Coastguard Worker#ifdef USE_AS_STPCPY 1232*8d67ca89SAndroid Build Coastguard Worker lea 11(%rdi), %rax 1233*8d67ca89SAndroid Build Coastguard Worker#endif 1234*8d67ca89SAndroid Build Coastguard Worker#ifdef USE_AS_STRCAT 1235*8d67ca89SAndroid Build Coastguard Worker xor %ch, %ch 1236*8d67ca89SAndroid Build Coastguard Worker movb %ch, 11(%rdi) 1237*8d67ca89SAndroid Build Coastguard Worker#endif 1238*8d67ca89SAndroid Build Coastguard Worker RETURN 1239*8d67ca89SAndroid Build Coastguard Worker 1240*8d67ca89SAndroid Build Coastguard Worker .p2align 4 1241*8d67ca89SAndroid Build Coastguard WorkerL(StrncpyExit12): 1242*8d67ca89SAndroid Build Coastguard Worker mov (%rsi), %rcx 1243*8d67ca89SAndroid Build Coastguard Worker mov 8(%rsi), %edx 1244*8d67ca89SAndroid Build Coastguard Worker mov %rcx, (%rdi) 1245*8d67ca89SAndroid Build Coastguard Worker mov %edx, 8(%rdi) 1246*8d67ca89SAndroid Build Coastguard Worker#ifdef USE_AS_STPCPY 1247*8d67ca89SAndroid Build Coastguard Worker lea 12(%rdi), %rax 1248*8d67ca89SAndroid Build Coastguard Worker#endif 1249*8d67ca89SAndroid Build Coastguard Worker#ifdef USE_AS_STRCAT 1250*8d67ca89SAndroid Build Coastguard Worker xor %ch, %ch 1251*8d67ca89SAndroid Build Coastguard Worker movb %ch, 12(%rdi) 1252*8d67ca89SAndroid Build Coastguard Worker#endif 1253*8d67ca89SAndroid Build Coastguard Worker RETURN 1254*8d67ca89SAndroid Build Coastguard Worker 1255*8d67ca89SAndroid Build Coastguard Worker .p2align 4 1256*8d67ca89SAndroid Build Coastguard WorkerL(StrncpyExit13): 1257*8d67ca89SAndroid Build Coastguard Worker mov (%rsi), %rcx 1258*8d67ca89SAndroid Build Coastguard Worker mov 5(%rsi), %rdx 1259*8d67ca89SAndroid Build Coastguard Worker mov %rcx, (%rdi) 1260*8d67ca89SAndroid Build Coastguard Worker mov %rdx, 5(%rdi) 1261*8d67ca89SAndroid Build Coastguard Worker#ifdef USE_AS_STPCPY 1262*8d67ca89SAndroid Build Coastguard Worker lea 13(%rdi), %rax 1263*8d67ca89SAndroid Build Coastguard Worker#endif 1264*8d67ca89SAndroid Build Coastguard Worker#ifdef USE_AS_STRCAT 1265*8d67ca89SAndroid Build Coastguard Worker xor %ch, %ch 1266*8d67ca89SAndroid Build Coastguard Worker movb %ch, 13(%rdi) 1267*8d67ca89SAndroid Build Coastguard Worker#endif 1268*8d67ca89SAndroid Build Coastguard Worker RETURN 1269*8d67ca89SAndroid Build Coastguard Worker 1270*8d67ca89SAndroid Build Coastguard Worker .p2align 4 1271*8d67ca89SAndroid Build Coastguard WorkerL(StrncpyExit14): 1272*8d67ca89SAndroid Build Coastguard Worker mov (%rsi), %rcx 1273*8d67ca89SAndroid Build Coastguard Worker mov 6(%rsi), %rdx 1274*8d67ca89SAndroid Build Coastguard Worker mov %rcx, (%rdi) 1275*8d67ca89SAndroid Build Coastguard Worker mov %rdx, 6(%rdi) 1276*8d67ca89SAndroid Build Coastguard Worker#ifdef USE_AS_STPCPY 1277*8d67ca89SAndroid Build Coastguard Worker lea 14(%rdi), %rax 1278*8d67ca89SAndroid Build Coastguard Worker#endif 1279*8d67ca89SAndroid Build Coastguard Worker#ifdef USE_AS_STRCAT 1280*8d67ca89SAndroid Build Coastguard Worker xor %ch, %ch 1281*8d67ca89SAndroid Build Coastguard Worker movb %ch, 14(%rdi) 1282*8d67ca89SAndroid Build Coastguard Worker#endif 1283*8d67ca89SAndroid Build Coastguard Worker RETURN 1284*8d67ca89SAndroid Build Coastguard Worker 1285*8d67ca89SAndroid Build Coastguard Worker .p2align 4 1286*8d67ca89SAndroid Build Coastguard WorkerL(StrncpyExit15): 1287*8d67ca89SAndroid Build Coastguard Worker mov (%rsi), %rcx 1288*8d67ca89SAndroid Build Coastguard Worker mov 7(%rsi), %rdx 1289*8d67ca89SAndroid Build Coastguard Worker mov %rcx, (%rdi) 1290*8d67ca89SAndroid Build Coastguard Worker mov %rdx, 7(%rdi) 1291*8d67ca89SAndroid Build Coastguard Worker#ifdef USE_AS_STPCPY 1292*8d67ca89SAndroid Build Coastguard Worker lea 15(%rdi), %rax 1293*8d67ca89SAndroid Build Coastguard Worker#endif 1294*8d67ca89SAndroid Build Coastguard Worker#ifdef USE_AS_STRCAT 1295*8d67ca89SAndroid Build Coastguard Worker xor %ch, %ch 1296*8d67ca89SAndroid Build Coastguard Worker movb %ch, 15(%rdi) 1297*8d67ca89SAndroid Build Coastguard Worker#endif 1298*8d67ca89SAndroid Build Coastguard Worker RETURN 1299*8d67ca89SAndroid Build Coastguard Worker 1300*8d67ca89SAndroid Build Coastguard Worker .p2align 4 1301*8d67ca89SAndroid Build Coastguard WorkerL(StrncpyExit16): 1302*8d67ca89SAndroid Build Coastguard Worker movdqu (%rsi), %xmm0 1303*8d67ca89SAndroid Build Coastguard Worker movdqu %xmm0, (%rdi) 1304*8d67ca89SAndroid Build Coastguard Worker#ifdef USE_AS_STPCPY 1305*8d67ca89SAndroid Build Coastguard Worker lea 16(%rdi), %rax 1306*8d67ca89SAndroid Build Coastguard Worker#endif 1307*8d67ca89SAndroid Build Coastguard Worker#ifdef USE_AS_STRCAT 1308*8d67ca89SAndroid Build Coastguard Worker xor %ch, %ch 1309*8d67ca89SAndroid Build Coastguard Worker movb %ch, 16(%rdi) 1310*8d67ca89SAndroid Build Coastguard Worker#endif 1311*8d67ca89SAndroid Build Coastguard Worker RETURN 1312*8d67ca89SAndroid Build Coastguard Worker 1313*8d67ca89SAndroid Build Coastguard Worker .p2align 4 1314*8d67ca89SAndroid Build Coastguard WorkerL(StrncpyExit17): 1315*8d67ca89SAndroid Build Coastguard Worker movdqu (%rsi), %xmm0 1316*8d67ca89SAndroid Build Coastguard Worker mov 16(%rsi), %cl 1317*8d67ca89SAndroid Build Coastguard Worker movdqu %xmm0, (%rdi) 1318*8d67ca89SAndroid Build Coastguard Worker mov %cl, 16(%rdi) 1319*8d67ca89SAndroid Build Coastguard Worker#ifdef USE_AS_STPCPY 1320*8d67ca89SAndroid Build Coastguard Worker lea 17(%rdi), %rax 1321*8d67ca89SAndroid Build Coastguard Worker#endif 1322*8d67ca89SAndroid Build Coastguard Worker#ifdef USE_AS_STRCAT 1323*8d67ca89SAndroid Build Coastguard Worker xor %ch, %ch 1324*8d67ca89SAndroid Build Coastguard Worker movb %ch, 17(%rdi) 1325*8d67ca89SAndroid Build Coastguard Worker#endif 1326*8d67ca89SAndroid Build Coastguard Worker RETURN 1327*8d67ca89SAndroid Build Coastguard Worker 1328*8d67ca89SAndroid Build Coastguard Worker .p2align 4 1329*8d67ca89SAndroid Build Coastguard WorkerL(StrncpyExit18): 1330*8d67ca89SAndroid Build Coastguard Worker movdqu (%rsi), %xmm0 1331*8d67ca89SAndroid Build Coastguard Worker mov 16(%rsi), %cx 1332*8d67ca89SAndroid Build Coastguard Worker movdqu %xmm0, (%rdi) 1333*8d67ca89SAndroid Build Coastguard Worker mov %cx, 16(%rdi) 1334*8d67ca89SAndroid Build Coastguard Worker#ifdef USE_AS_STPCPY 1335*8d67ca89SAndroid Build Coastguard Worker lea 18(%rdi), %rax 1336*8d67ca89SAndroid Build Coastguard Worker#endif 1337*8d67ca89SAndroid Build Coastguard Worker#ifdef USE_AS_STRCAT 1338*8d67ca89SAndroid Build Coastguard Worker xor %ch, %ch 1339*8d67ca89SAndroid Build Coastguard Worker movb %ch, 18(%rdi) 1340*8d67ca89SAndroid Build Coastguard Worker#endif 1341*8d67ca89SAndroid Build Coastguard Worker RETURN 1342*8d67ca89SAndroid Build Coastguard Worker 1343*8d67ca89SAndroid Build Coastguard Worker .p2align 4 1344*8d67ca89SAndroid Build Coastguard WorkerL(StrncpyExit19): 1345*8d67ca89SAndroid Build Coastguard Worker movdqu (%rsi), %xmm0 1346*8d67ca89SAndroid Build Coastguard Worker mov 15(%rsi), %ecx 1347*8d67ca89SAndroid Build Coastguard Worker movdqu %xmm0, (%rdi) 1348*8d67ca89SAndroid Build Coastguard Worker mov %ecx, 15(%rdi) 1349*8d67ca89SAndroid Build Coastguard Worker#ifdef USE_AS_STPCPY 1350*8d67ca89SAndroid Build Coastguard Worker lea 19(%rdi), %rax 1351*8d67ca89SAndroid Build Coastguard Worker#endif 1352*8d67ca89SAndroid Build Coastguard Worker#ifdef USE_AS_STRCAT 1353*8d67ca89SAndroid Build Coastguard Worker xor %ch, %ch 1354*8d67ca89SAndroid Build Coastguard Worker movb %ch, 19(%rdi) 1355*8d67ca89SAndroid Build Coastguard Worker#endif 1356*8d67ca89SAndroid Build Coastguard Worker RETURN 1357*8d67ca89SAndroid Build Coastguard Worker 1358*8d67ca89SAndroid Build Coastguard Worker .p2align 4 1359*8d67ca89SAndroid Build Coastguard WorkerL(StrncpyExit20): 1360*8d67ca89SAndroid Build Coastguard Worker movdqu (%rsi), %xmm0 1361*8d67ca89SAndroid Build Coastguard Worker mov 16(%rsi), %ecx 1362*8d67ca89SAndroid Build Coastguard Worker movdqu %xmm0, (%rdi) 1363*8d67ca89SAndroid Build Coastguard Worker mov %ecx, 16(%rdi) 1364*8d67ca89SAndroid Build Coastguard Worker#ifdef USE_AS_STPCPY 1365*8d67ca89SAndroid Build Coastguard Worker lea 20(%rdi), %rax 1366*8d67ca89SAndroid Build Coastguard Worker#endif 1367*8d67ca89SAndroid Build Coastguard Worker#ifdef USE_AS_STRCAT 1368*8d67ca89SAndroid Build Coastguard Worker xor %ch, %ch 1369*8d67ca89SAndroid Build Coastguard Worker movb %ch, 20(%rdi) 1370*8d67ca89SAndroid Build Coastguard Worker#endif 1371*8d67ca89SAndroid Build Coastguard Worker RETURN 1372*8d67ca89SAndroid Build Coastguard Worker 1373*8d67ca89SAndroid Build Coastguard Worker .p2align 4 1374*8d67ca89SAndroid Build Coastguard WorkerL(StrncpyExit21): 1375*8d67ca89SAndroid Build Coastguard Worker movdqu (%rsi), %xmm0 1376*8d67ca89SAndroid Build Coastguard Worker mov 16(%rsi), %ecx 1377*8d67ca89SAndroid Build Coastguard Worker mov 20(%rsi), %dl 1378*8d67ca89SAndroid Build Coastguard Worker movdqu %xmm0, (%rdi) 1379*8d67ca89SAndroid Build Coastguard Worker mov %ecx, 16(%rdi) 1380*8d67ca89SAndroid Build Coastguard Worker mov %dl, 20(%rdi) 1381*8d67ca89SAndroid Build Coastguard Worker#ifdef USE_AS_STPCPY 1382*8d67ca89SAndroid Build Coastguard Worker lea 21(%rdi), %rax 1383*8d67ca89SAndroid Build Coastguard Worker#endif 1384*8d67ca89SAndroid Build Coastguard Worker#ifdef USE_AS_STRCAT 1385*8d67ca89SAndroid Build Coastguard Worker xor %ch, %ch 1386*8d67ca89SAndroid Build Coastguard Worker movb %ch, 21(%rdi) 1387*8d67ca89SAndroid Build Coastguard Worker#endif 1388*8d67ca89SAndroid Build Coastguard Worker RETURN 1389*8d67ca89SAndroid Build Coastguard Worker 1390*8d67ca89SAndroid Build Coastguard Worker .p2align 4 1391*8d67ca89SAndroid Build Coastguard WorkerL(StrncpyExit22): 1392*8d67ca89SAndroid Build Coastguard Worker movdqu (%rsi), %xmm0 1393*8d67ca89SAndroid Build Coastguard Worker mov 14(%rsi), %rcx 1394*8d67ca89SAndroid Build Coastguard Worker movdqu %xmm0, (%rdi) 1395*8d67ca89SAndroid Build Coastguard Worker mov %rcx, 14(%rdi) 1396*8d67ca89SAndroid Build Coastguard Worker#ifdef USE_AS_STPCPY 1397*8d67ca89SAndroid Build Coastguard Worker lea 22(%rdi), %rax 1398*8d67ca89SAndroid Build Coastguard Worker#endif 1399*8d67ca89SAndroid Build Coastguard Worker#ifdef USE_AS_STRCAT 1400*8d67ca89SAndroid Build Coastguard Worker xor %ch, %ch 1401*8d67ca89SAndroid Build Coastguard Worker movb %ch, 22(%rdi) 1402*8d67ca89SAndroid Build Coastguard Worker#endif 1403*8d67ca89SAndroid Build Coastguard Worker RETURN 1404*8d67ca89SAndroid Build Coastguard Worker 1405*8d67ca89SAndroid Build Coastguard Worker .p2align 4 1406*8d67ca89SAndroid Build Coastguard WorkerL(StrncpyExit23): 1407*8d67ca89SAndroid Build Coastguard Worker movdqu (%rsi), %xmm0 1408*8d67ca89SAndroid Build Coastguard Worker mov 15(%rsi), %rcx 1409*8d67ca89SAndroid Build Coastguard Worker movdqu %xmm0, (%rdi) 1410*8d67ca89SAndroid Build Coastguard Worker mov %rcx, 15(%rdi) 1411*8d67ca89SAndroid Build Coastguard Worker#ifdef USE_AS_STPCPY 1412*8d67ca89SAndroid Build Coastguard Worker lea 23(%rdi), %rax 1413*8d67ca89SAndroid Build Coastguard Worker#endif 1414*8d67ca89SAndroid Build Coastguard Worker#ifdef USE_AS_STRCAT 1415*8d67ca89SAndroid Build Coastguard Worker xor %ch, %ch 1416*8d67ca89SAndroid Build Coastguard Worker movb %ch, 23(%rdi) 1417*8d67ca89SAndroid Build Coastguard Worker#endif 1418*8d67ca89SAndroid Build Coastguard Worker RETURN 1419*8d67ca89SAndroid Build Coastguard Worker 1420*8d67ca89SAndroid Build Coastguard Worker .p2align 4 1421*8d67ca89SAndroid Build Coastguard WorkerL(StrncpyExit24): 1422*8d67ca89SAndroid Build Coastguard Worker movdqu (%rsi), %xmm0 1423*8d67ca89SAndroid Build Coastguard Worker mov 16(%rsi), %rcx 1424*8d67ca89SAndroid Build Coastguard Worker movdqu %xmm0, (%rdi) 1425*8d67ca89SAndroid Build Coastguard Worker mov %rcx, 16(%rdi) 1426*8d67ca89SAndroid Build Coastguard Worker#ifdef USE_AS_STPCPY 1427*8d67ca89SAndroid Build Coastguard Worker lea 24(%rdi), %rax 1428*8d67ca89SAndroid Build Coastguard Worker#endif 1429*8d67ca89SAndroid Build Coastguard Worker#ifdef USE_AS_STRCAT 1430*8d67ca89SAndroid Build Coastguard Worker xor %ch, %ch 1431*8d67ca89SAndroid Build Coastguard Worker movb %ch, 24(%rdi) 1432*8d67ca89SAndroid Build Coastguard Worker#endif 1433*8d67ca89SAndroid Build Coastguard Worker RETURN 1434*8d67ca89SAndroid Build Coastguard Worker 1435*8d67ca89SAndroid Build Coastguard Worker .p2align 4 1436*8d67ca89SAndroid Build Coastguard WorkerL(StrncpyExit25): 1437*8d67ca89SAndroid Build Coastguard Worker movdqu (%rsi), %xmm0 1438*8d67ca89SAndroid Build Coastguard Worker mov 16(%rsi), %rdx 1439*8d67ca89SAndroid Build Coastguard Worker mov 24(%rsi), %cl 1440*8d67ca89SAndroid Build Coastguard Worker movdqu %xmm0, (%rdi) 1441*8d67ca89SAndroid Build Coastguard Worker mov %rdx, 16(%rdi) 1442*8d67ca89SAndroid Build Coastguard Worker mov %cl, 24(%rdi) 1443*8d67ca89SAndroid Build Coastguard Worker#ifdef USE_AS_STPCPY 1444*8d67ca89SAndroid Build Coastguard Worker lea 25(%rdi), %rax 1445*8d67ca89SAndroid Build Coastguard Worker#endif 1446*8d67ca89SAndroid Build Coastguard Worker#ifdef USE_AS_STRCAT 1447*8d67ca89SAndroid Build Coastguard Worker xor %ch, %ch 1448*8d67ca89SAndroid Build Coastguard Worker movb %ch, 25(%rdi) 1449*8d67ca89SAndroid Build Coastguard Worker#endif 1450*8d67ca89SAndroid Build Coastguard Worker RETURN 1451*8d67ca89SAndroid Build Coastguard Worker 1452*8d67ca89SAndroid Build Coastguard Worker .p2align 4 1453*8d67ca89SAndroid Build Coastguard WorkerL(StrncpyExit26): 1454*8d67ca89SAndroid Build Coastguard Worker movdqu (%rsi), %xmm0 1455*8d67ca89SAndroid Build Coastguard Worker mov 16(%rsi), %rdx 1456*8d67ca89SAndroid Build Coastguard Worker mov 24(%rsi), %cx 1457*8d67ca89SAndroid Build Coastguard Worker movdqu %xmm0, (%rdi) 1458*8d67ca89SAndroid Build Coastguard Worker mov %rdx, 16(%rdi) 1459*8d67ca89SAndroid Build Coastguard Worker mov %cx, 24(%rdi) 1460*8d67ca89SAndroid Build Coastguard Worker#ifdef USE_AS_STPCPY 1461*8d67ca89SAndroid Build Coastguard Worker lea 26(%rdi), %rax 1462*8d67ca89SAndroid Build Coastguard Worker#endif 1463*8d67ca89SAndroid Build Coastguard Worker#ifdef USE_AS_STRCAT 1464*8d67ca89SAndroid Build Coastguard Worker xor %ch, %ch 1465*8d67ca89SAndroid Build Coastguard Worker movb %ch, 26(%rdi) 1466*8d67ca89SAndroid Build Coastguard Worker#endif 1467*8d67ca89SAndroid Build Coastguard Worker RETURN 1468*8d67ca89SAndroid Build Coastguard Worker 1469*8d67ca89SAndroid Build Coastguard Worker .p2align 4 1470*8d67ca89SAndroid Build Coastguard WorkerL(StrncpyExit27): 1471*8d67ca89SAndroid Build Coastguard Worker movdqu (%rsi), %xmm0 1472*8d67ca89SAndroid Build Coastguard Worker mov 16(%rsi), %rdx 1473*8d67ca89SAndroid Build Coastguard Worker mov 23(%rsi), %ecx 1474*8d67ca89SAndroid Build Coastguard Worker movdqu %xmm0, (%rdi) 1475*8d67ca89SAndroid Build Coastguard Worker mov %rdx, 16(%rdi) 1476*8d67ca89SAndroid Build Coastguard Worker mov %ecx, 23(%rdi) 1477*8d67ca89SAndroid Build Coastguard Worker#ifdef USE_AS_STPCPY 1478*8d67ca89SAndroid Build Coastguard Worker lea 27(%rdi), %rax 1479*8d67ca89SAndroid Build Coastguard Worker#endif 1480*8d67ca89SAndroid Build Coastguard Worker#ifdef USE_AS_STRCAT 1481*8d67ca89SAndroid Build Coastguard Worker xor %ch, %ch 1482*8d67ca89SAndroid Build Coastguard Worker movb %ch, 27(%rdi) 1483*8d67ca89SAndroid Build Coastguard Worker#endif 1484*8d67ca89SAndroid Build Coastguard Worker RETURN 1485*8d67ca89SAndroid Build Coastguard Worker 1486*8d67ca89SAndroid Build Coastguard Worker .p2align 4 1487*8d67ca89SAndroid Build Coastguard WorkerL(StrncpyExit28): 1488*8d67ca89SAndroid Build Coastguard Worker movdqu (%rsi), %xmm0 1489*8d67ca89SAndroid Build Coastguard Worker mov 16(%rsi), %rdx 1490*8d67ca89SAndroid Build Coastguard Worker mov 24(%rsi), %ecx 1491*8d67ca89SAndroid Build Coastguard Worker movdqu %xmm0, (%rdi) 1492*8d67ca89SAndroid Build Coastguard Worker mov %rdx, 16(%rdi) 1493*8d67ca89SAndroid Build Coastguard Worker mov %ecx, 24(%rdi) 1494*8d67ca89SAndroid Build Coastguard Worker#ifdef USE_AS_STPCPY 1495*8d67ca89SAndroid Build Coastguard Worker lea 28(%rdi), %rax 1496*8d67ca89SAndroid Build Coastguard Worker#endif 1497*8d67ca89SAndroid Build Coastguard Worker#ifdef USE_AS_STRCAT 1498*8d67ca89SAndroid Build Coastguard Worker xor %ch, %ch 1499*8d67ca89SAndroid Build Coastguard Worker movb %ch, 28(%rdi) 1500*8d67ca89SAndroid Build Coastguard Worker#endif 1501*8d67ca89SAndroid Build Coastguard Worker RETURN 1502*8d67ca89SAndroid Build Coastguard Worker 1503*8d67ca89SAndroid Build Coastguard Worker .p2align 4 1504*8d67ca89SAndroid Build Coastguard WorkerL(StrncpyExit29): 1505*8d67ca89SAndroid Build Coastguard Worker movdqu (%rsi), %xmm0 1506*8d67ca89SAndroid Build Coastguard Worker movdqu 13(%rsi), %xmm2 1507*8d67ca89SAndroid Build Coastguard Worker movdqu %xmm0, (%rdi) 1508*8d67ca89SAndroid Build Coastguard Worker movdqu %xmm2, 13(%rdi) 1509*8d67ca89SAndroid Build Coastguard Worker#ifdef USE_AS_STPCPY 1510*8d67ca89SAndroid Build Coastguard Worker lea 29(%rdi), %rax 1511*8d67ca89SAndroid Build Coastguard Worker#endif 1512*8d67ca89SAndroid Build Coastguard Worker#ifdef USE_AS_STRCAT 1513*8d67ca89SAndroid Build Coastguard Worker xor %ch, %ch 1514*8d67ca89SAndroid Build Coastguard Worker movb %ch, 29(%rdi) 1515*8d67ca89SAndroid Build Coastguard Worker#endif 1516*8d67ca89SAndroid Build Coastguard Worker RETURN 1517*8d67ca89SAndroid Build Coastguard Worker 1518*8d67ca89SAndroid Build Coastguard Worker .p2align 4 1519*8d67ca89SAndroid Build Coastguard WorkerL(StrncpyExit30): 1520*8d67ca89SAndroid Build Coastguard Worker movdqu (%rsi), %xmm0 1521*8d67ca89SAndroid Build Coastguard Worker movdqu 14(%rsi), %xmm2 1522*8d67ca89SAndroid Build Coastguard Worker movdqu %xmm0, (%rdi) 1523*8d67ca89SAndroid Build Coastguard Worker movdqu %xmm2, 14(%rdi) 1524*8d67ca89SAndroid Build Coastguard Worker#ifdef USE_AS_STPCPY 1525*8d67ca89SAndroid Build Coastguard Worker lea 30(%rdi), %rax 1526*8d67ca89SAndroid Build Coastguard Worker#endif 1527*8d67ca89SAndroid Build Coastguard Worker#ifdef USE_AS_STRCAT 1528*8d67ca89SAndroid Build Coastguard Worker xor %ch, %ch 1529*8d67ca89SAndroid Build Coastguard Worker movb %ch, 30(%rdi) 1530*8d67ca89SAndroid Build Coastguard Worker#endif 1531*8d67ca89SAndroid Build Coastguard Worker RETURN 1532*8d67ca89SAndroid Build Coastguard Worker 1533*8d67ca89SAndroid Build Coastguard Worker .p2align 4 1534*8d67ca89SAndroid Build Coastguard WorkerL(StrncpyExit31): 1535*8d67ca89SAndroid Build Coastguard Worker movdqu (%rsi), %xmm0 1536*8d67ca89SAndroid Build Coastguard Worker movdqu 15(%rsi), %xmm2 1537*8d67ca89SAndroid Build Coastguard Worker movdqu %xmm0, (%rdi) 1538*8d67ca89SAndroid Build Coastguard Worker movdqu %xmm2, 15(%rdi) 1539*8d67ca89SAndroid Build Coastguard Worker#ifdef USE_AS_STPCPY 1540*8d67ca89SAndroid Build Coastguard Worker lea 31(%rdi), %rax 1541*8d67ca89SAndroid Build Coastguard Worker#endif 1542*8d67ca89SAndroid Build Coastguard Worker#ifdef USE_AS_STRCAT 1543*8d67ca89SAndroid Build Coastguard Worker xor %ch, %ch 1544*8d67ca89SAndroid Build Coastguard Worker movb %ch, 31(%rdi) 1545*8d67ca89SAndroid Build Coastguard Worker#endif 1546*8d67ca89SAndroid Build Coastguard Worker RETURN 1547*8d67ca89SAndroid Build Coastguard Worker 1548*8d67ca89SAndroid Build Coastguard Worker .p2align 4 1549*8d67ca89SAndroid Build Coastguard WorkerL(StrncpyExit32): 1550*8d67ca89SAndroid Build Coastguard Worker movdqu (%rsi), %xmm0 1551*8d67ca89SAndroid Build Coastguard Worker movdqu 16(%rsi), %xmm2 1552*8d67ca89SAndroid Build Coastguard Worker movdqu %xmm0, (%rdi) 1553*8d67ca89SAndroid Build Coastguard Worker movdqu %xmm2, 16(%rdi) 1554*8d67ca89SAndroid Build Coastguard Worker#ifdef USE_AS_STPCPY 1555*8d67ca89SAndroid Build Coastguard Worker lea 32(%rdi), %rax 1556*8d67ca89SAndroid Build Coastguard Worker#endif 1557*8d67ca89SAndroid Build Coastguard Worker#ifdef USE_AS_STRCAT 1558*8d67ca89SAndroid Build Coastguard Worker xor %ch, %ch 1559*8d67ca89SAndroid Build Coastguard Worker movb %ch, 32(%rdi) 1560*8d67ca89SAndroid Build Coastguard Worker#endif 1561*8d67ca89SAndroid Build Coastguard Worker RETURN 1562*8d67ca89SAndroid Build Coastguard Worker 1563*8d67ca89SAndroid Build Coastguard Worker .p2align 4 1564*8d67ca89SAndroid Build Coastguard WorkerL(StrncpyExit33): 1565*8d67ca89SAndroid Build Coastguard Worker movdqu (%rsi), %xmm0 1566*8d67ca89SAndroid Build Coastguard Worker movdqu 16(%rsi), %xmm2 1567*8d67ca89SAndroid Build Coastguard Worker mov 32(%rsi), %cl 1568*8d67ca89SAndroid Build Coastguard Worker movdqu %xmm0, (%rdi) 1569*8d67ca89SAndroid Build Coastguard Worker movdqu %xmm2, 16(%rdi) 1570*8d67ca89SAndroid Build Coastguard Worker mov %cl, 32(%rdi) 1571*8d67ca89SAndroid Build Coastguard Worker#ifdef USE_AS_STRCAT 1572*8d67ca89SAndroid Build Coastguard Worker xor %ch, %ch 1573*8d67ca89SAndroid Build Coastguard Worker movb %ch, 33(%rdi) 1574*8d67ca89SAndroid Build Coastguard Worker#endif 1575*8d67ca89SAndroid Build Coastguard Worker RETURN 1576*8d67ca89SAndroid Build Coastguard Worker 1577*8d67ca89SAndroid Build Coastguard Worker#ifndef USE_AS_STRCAT 1578*8d67ca89SAndroid Build Coastguard Worker 1579*8d67ca89SAndroid Build Coastguard Worker .p2align 4 1580*8d67ca89SAndroid Build Coastguard WorkerL(Fill0): 1581*8d67ca89SAndroid Build Coastguard Worker RETURN 1582*8d67ca89SAndroid Build Coastguard Worker 1583*8d67ca89SAndroid Build Coastguard Worker .p2align 4 1584*8d67ca89SAndroid Build Coastguard WorkerL(Fill1): 1585*8d67ca89SAndroid Build Coastguard Worker mov %dl, (%rdi) 1586*8d67ca89SAndroid Build Coastguard Worker RETURN 1587*8d67ca89SAndroid Build Coastguard Worker 1588*8d67ca89SAndroid Build Coastguard Worker .p2align 4 1589*8d67ca89SAndroid Build Coastguard WorkerL(Fill2): 1590*8d67ca89SAndroid Build Coastguard Worker mov %dx, (%rdi) 1591*8d67ca89SAndroid Build Coastguard Worker RETURN 1592*8d67ca89SAndroid Build Coastguard Worker 1593*8d67ca89SAndroid Build Coastguard Worker .p2align 4 1594*8d67ca89SAndroid Build Coastguard WorkerL(Fill3): 1595*8d67ca89SAndroid Build Coastguard Worker mov %edx, -1(%rdi) 1596*8d67ca89SAndroid Build Coastguard Worker RETURN 1597*8d67ca89SAndroid Build Coastguard Worker 1598*8d67ca89SAndroid Build Coastguard Worker .p2align 4 1599*8d67ca89SAndroid Build Coastguard WorkerL(Fill4): 1600*8d67ca89SAndroid Build Coastguard Worker mov %edx, (%rdi) 1601*8d67ca89SAndroid Build Coastguard Worker RETURN 1602*8d67ca89SAndroid Build Coastguard Worker 1603*8d67ca89SAndroid Build Coastguard Worker .p2align 4 1604*8d67ca89SAndroid Build Coastguard WorkerL(Fill5): 1605*8d67ca89SAndroid Build Coastguard Worker mov %edx, (%rdi) 1606*8d67ca89SAndroid Build Coastguard Worker mov %dl, 4(%rdi) 1607*8d67ca89SAndroid Build Coastguard Worker RETURN 1608*8d67ca89SAndroid Build Coastguard Worker 1609*8d67ca89SAndroid Build Coastguard Worker .p2align 4 1610*8d67ca89SAndroid Build Coastguard WorkerL(Fill6): 1611*8d67ca89SAndroid Build Coastguard Worker mov %edx, (%rdi) 1612*8d67ca89SAndroid Build Coastguard Worker mov %dx, 4(%rdi) 1613*8d67ca89SAndroid Build Coastguard Worker RETURN 1614*8d67ca89SAndroid Build Coastguard Worker 1615*8d67ca89SAndroid Build Coastguard Worker .p2align 4 1616*8d67ca89SAndroid Build Coastguard WorkerL(Fill7): 1617*8d67ca89SAndroid Build Coastguard Worker mov %rdx, -1(%rdi) 1618*8d67ca89SAndroid Build Coastguard Worker RETURN 1619*8d67ca89SAndroid Build Coastguard Worker 1620*8d67ca89SAndroid Build Coastguard Worker .p2align 4 1621*8d67ca89SAndroid Build Coastguard WorkerL(Fill8): 1622*8d67ca89SAndroid Build Coastguard Worker mov %rdx, (%rdi) 1623*8d67ca89SAndroid Build Coastguard Worker RETURN 1624*8d67ca89SAndroid Build Coastguard Worker 1625*8d67ca89SAndroid Build Coastguard Worker .p2align 4 1626*8d67ca89SAndroid Build Coastguard WorkerL(Fill9): 1627*8d67ca89SAndroid Build Coastguard Worker mov %rdx, (%rdi) 1628*8d67ca89SAndroid Build Coastguard Worker mov %dl, 8(%rdi) 1629*8d67ca89SAndroid Build Coastguard Worker RETURN 1630*8d67ca89SAndroid Build Coastguard Worker 1631*8d67ca89SAndroid Build Coastguard Worker .p2align 4 1632*8d67ca89SAndroid Build Coastguard WorkerL(Fill10): 1633*8d67ca89SAndroid Build Coastguard Worker mov %rdx, (%rdi) 1634*8d67ca89SAndroid Build Coastguard Worker mov %dx, 8(%rdi) 1635*8d67ca89SAndroid Build Coastguard Worker RETURN 1636*8d67ca89SAndroid Build Coastguard Worker 1637*8d67ca89SAndroid Build Coastguard Worker .p2align 4 1638*8d67ca89SAndroid Build Coastguard WorkerL(Fill11): 1639*8d67ca89SAndroid Build Coastguard Worker mov %rdx, (%rdi) 1640*8d67ca89SAndroid Build Coastguard Worker mov %edx, 7(%rdi) 1641*8d67ca89SAndroid Build Coastguard Worker RETURN 1642*8d67ca89SAndroid Build Coastguard Worker 1643*8d67ca89SAndroid Build Coastguard Worker .p2align 4 1644*8d67ca89SAndroid Build Coastguard WorkerL(Fill12): 1645*8d67ca89SAndroid Build Coastguard Worker mov %rdx, (%rdi) 1646*8d67ca89SAndroid Build Coastguard Worker mov %edx, 8(%rdi) 1647*8d67ca89SAndroid Build Coastguard Worker RETURN 1648*8d67ca89SAndroid Build Coastguard Worker 1649*8d67ca89SAndroid Build Coastguard Worker .p2align 4 1650*8d67ca89SAndroid Build Coastguard WorkerL(Fill13): 1651*8d67ca89SAndroid Build Coastguard Worker mov %rdx, (%rdi) 1652*8d67ca89SAndroid Build Coastguard Worker mov %rdx, 5(%rdi) 1653*8d67ca89SAndroid Build Coastguard Worker RETURN 1654*8d67ca89SAndroid Build Coastguard Worker 1655*8d67ca89SAndroid Build Coastguard Worker .p2align 4 1656*8d67ca89SAndroid Build Coastguard WorkerL(Fill14): 1657*8d67ca89SAndroid Build Coastguard Worker mov %rdx, (%rdi) 1658*8d67ca89SAndroid Build Coastguard Worker mov %rdx, 6(%rdi) 1659*8d67ca89SAndroid Build Coastguard Worker RETURN 1660*8d67ca89SAndroid Build Coastguard Worker 1661*8d67ca89SAndroid Build Coastguard Worker .p2align 4 1662*8d67ca89SAndroid Build Coastguard WorkerL(Fill15): 1663*8d67ca89SAndroid Build Coastguard Worker movdqu %xmm0, -1(%rdi) 1664*8d67ca89SAndroid Build Coastguard Worker RETURN 1665*8d67ca89SAndroid Build Coastguard Worker 1666*8d67ca89SAndroid Build Coastguard Worker .p2align 4 1667*8d67ca89SAndroid Build Coastguard WorkerL(Fill16): 1668*8d67ca89SAndroid Build Coastguard Worker movdqu %xmm0, (%rdi) 1669*8d67ca89SAndroid Build Coastguard Worker RETURN 1670*8d67ca89SAndroid Build Coastguard Worker 1671*8d67ca89SAndroid Build Coastguard Worker .p2align 4 1672*8d67ca89SAndroid Build Coastguard WorkerL(CopyFrom1To16BytesUnalignedXmm2): 1673*8d67ca89SAndroid Build Coastguard Worker movdqu %xmm2, (%rdi, %rcx) 1674*8d67ca89SAndroid Build Coastguard Worker 1675*8d67ca89SAndroid Build Coastguard Worker .p2align 4 1676*8d67ca89SAndroid Build Coastguard WorkerL(CopyFrom1To16BytesXmmExit): 1677*8d67ca89SAndroid Build Coastguard Worker bsf %rdx, %rdx 1678*8d67ca89SAndroid Build Coastguard Worker add $15, %r8 1679*8d67ca89SAndroid Build Coastguard Worker add %rcx, %rdi 1680*8d67ca89SAndroid Build Coastguard Worker#ifdef USE_AS_STPCPY 1681*8d67ca89SAndroid Build Coastguard Worker lea (%rdi, %rdx), %rax 1682*8d67ca89SAndroid Build Coastguard Worker#endif 1683*8d67ca89SAndroid Build Coastguard Worker sub %rdx, %r8 1684*8d67ca89SAndroid Build Coastguard Worker lea 1(%rdi, %rdx), %rdi 1685*8d67ca89SAndroid Build Coastguard Worker 1686*8d67ca89SAndroid Build Coastguard Worker .p2align 4 1687*8d67ca89SAndroid Build Coastguard WorkerL(StrncpyFillTailWithZero): 1688*8d67ca89SAndroid Build Coastguard Worker pxor %xmm0, %xmm0 1689*8d67ca89SAndroid Build Coastguard Worker xor %rdx, %rdx 1690*8d67ca89SAndroid Build Coastguard Worker sub $16, %r8 1691*8d67ca89SAndroid Build Coastguard Worker jbe L(StrncpyFillExit) 1692*8d67ca89SAndroid Build Coastguard Worker 1693*8d67ca89SAndroid Build Coastguard Worker movdqu %xmm0, (%rdi) 1694*8d67ca89SAndroid Build Coastguard Worker add $16, %rdi 1695*8d67ca89SAndroid Build Coastguard Worker 1696*8d67ca89SAndroid Build Coastguard Worker mov %rdi, %rsi 1697*8d67ca89SAndroid Build Coastguard Worker and $0xf, %rsi 1698*8d67ca89SAndroid Build Coastguard Worker sub %rsi, %rdi 1699*8d67ca89SAndroid Build Coastguard Worker add %rsi, %r8 1700*8d67ca89SAndroid Build Coastguard Worker sub $64, %r8 1701*8d67ca89SAndroid Build Coastguard Worker jb L(StrncpyFillLess64) 1702*8d67ca89SAndroid Build Coastguard Worker 1703*8d67ca89SAndroid Build Coastguard WorkerL(StrncpyFillLoopMovdqa): 1704*8d67ca89SAndroid Build Coastguard Worker movdqa %xmm0, (%rdi) 1705*8d67ca89SAndroid Build Coastguard Worker movdqa %xmm0, 16(%rdi) 1706*8d67ca89SAndroid Build Coastguard Worker movdqa %xmm0, 32(%rdi) 1707*8d67ca89SAndroid Build Coastguard Worker movdqa %xmm0, 48(%rdi) 1708*8d67ca89SAndroid Build Coastguard Worker add $64, %rdi 1709*8d67ca89SAndroid Build Coastguard Worker sub $64, %r8 1710*8d67ca89SAndroid Build Coastguard Worker jae L(StrncpyFillLoopMovdqa) 1711*8d67ca89SAndroid Build Coastguard Worker 1712*8d67ca89SAndroid Build Coastguard WorkerL(StrncpyFillLess64): 1713*8d67ca89SAndroid Build Coastguard Worker add $32, %r8 1714*8d67ca89SAndroid Build Coastguard Worker jl L(StrncpyFillLess32) 1715*8d67ca89SAndroid Build Coastguard Worker movdqa %xmm0, (%rdi) 1716*8d67ca89SAndroid Build Coastguard Worker movdqa %xmm0, 16(%rdi) 1717*8d67ca89SAndroid Build Coastguard Worker add $32, %rdi 1718*8d67ca89SAndroid Build Coastguard Worker sub $16, %r8 1719*8d67ca89SAndroid Build Coastguard Worker jl L(StrncpyFillExit) 1720*8d67ca89SAndroid Build Coastguard Worker movdqa %xmm0, (%rdi) 1721*8d67ca89SAndroid Build Coastguard Worker add $16, %rdi 1722*8d67ca89SAndroid Build Coastguard Worker BRANCH_TO_JMPTBL_ENTRY (L(FillTable), %r8, 4) 1723*8d67ca89SAndroid Build Coastguard Worker 1724*8d67ca89SAndroid Build Coastguard WorkerL(StrncpyFillLess32): 1725*8d67ca89SAndroid Build Coastguard Worker add $16, %r8 1726*8d67ca89SAndroid Build Coastguard Worker jl L(StrncpyFillExit) 1727*8d67ca89SAndroid Build Coastguard Worker movdqa %xmm0, (%rdi) 1728*8d67ca89SAndroid Build Coastguard Worker add $16, %rdi 1729*8d67ca89SAndroid Build Coastguard Worker BRANCH_TO_JMPTBL_ENTRY (L(FillTable), %r8, 4) 1730*8d67ca89SAndroid Build Coastguard Worker 1731*8d67ca89SAndroid Build Coastguard WorkerL(StrncpyFillExit): 1732*8d67ca89SAndroid Build Coastguard Worker add $16, %r8 1733*8d67ca89SAndroid Build Coastguard Worker BRANCH_TO_JMPTBL_ENTRY (L(FillTable), %r8, 4) 1734*8d67ca89SAndroid Build Coastguard Worker 1735*8d67ca89SAndroid Build Coastguard Worker/* end of ifndef USE_AS_STRCAT */ 1736*8d67ca89SAndroid Build Coastguard Worker#endif 1737*8d67ca89SAndroid Build Coastguard Worker 1738*8d67ca89SAndroid Build Coastguard Worker .p2align 4 1739*8d67ca89SAndroid Build Coastguard WorkerL(UnalignedLeaveCase2OrCase3): 1740*8d67ca89SAndroid Build Coastguard Worker test %rdx, %rdx 1741*8d67ca89SAndroid Build Coastguard Worker jnz L(Unaligned64LeaveCase2) 1742*8d67ca89SAndroid Build Coastguard WorkerL(Unaligned64LeaveCase3): 1743*8d67ca89SAndroid Build Coastguard Worker lea 64(%r8), %rcx 1744*8d67ca89SAndroid Build Coastguard Worker and $-16, %rcx 1745*8d67ca89SAndroid Build Coastguard Worker add $48, %r8 1746*8d67ca89SAndroid Build Coastguard Worker jl L(CopyFrom1To16BytesCase3) 1747*8d67ca89SAndroid Build Coastguard Worker movdqu %xmm4, (%rdi) 1748*8d67ca89SAndroid Build Coastguard Worker sub $16, %r8 1749*8d67ca89SAndroid Build Coastguard Worker jb L(CopyFrom1To16BytesCase3) 1750*8d67ca89SAndroid Build Coastguard Worker movdqu %xmm5, 16(%rdi) 1751*8d67ca89SAndroid Build Coastguard Worker sub $16, %r8 1752*8d67ca89SAndroid Build Coastguard Worker jb L(CopyFrom1To16BytesCase3) 1753*8d67ca89SAndroid Build Coastguard Worker movdqu %xmm6, 32(%rdi) 1754*8d67ca89SAndroid Build Coastguard Worker sub $16, %r8 1755*8d67ca89SAndroid Build Coastguard Worker jb L(CopyFrom1To16BytesCase3) 1756*8d67ca89SAndroid Build Coastguard Worker movdqu %xmm7, 48(%rdi) 1757*8d67ca89SAndroid Build Coastguard Worker#ifdef USE_AS_STPCPY 1758*8d67ca89SAndroid Build Coastguard Worker lea 64(%rdi), %rax 1759*8d67ca89SAndroid Build Coastguard Worker#endif 1760*8d67ca89SAndroid Build Coastguard Worker#ifdef USE_AS_STRCAT 1761*8d67ca89SAndroid Build Coastguard Worker xor %ch, %ch 1762*8d67ca89SAndroid Build Coastguard Worker movb %ch, 64(%rdi) 1763*8d67ca89SAndroid Build Coastguard Worker#endif 1764*8d67ca89SAndroid Build Coastguard Worker RETURN 1765*8d67ca89SAndroid Build Coastguard Worker 1766*8d67ca89SAndroid Build Coastguard Worker .p2align 4 1767*8d67ca89SAndroid Build Coastguard WorkerL(Unaligned64LeaveCase2): 1768*8d67ca89SAndroid Build Coastguard Worker xor %rcx, %rcx 1769*8d67ca89SAndroid Build Coastguard Worker pcmpeqb %xmm4, %xmm0 1770*8d67ca89SAndroid Build Coastguard Worker pmovmskb %xmm0, %rdx 1771*8d67ca89SAndroid Build Coastguard Worker add $48, %r8 1772*8d67ca89SAndroid Build Coastguard Worker jle L(CopyFrom1To16BytesCase2OrCase3) 1773*8d67ca89SAndroid Build Coastguard Worker test %rdx, %rdx 1774*8d67ca89SAndroid Build Coastguard Worker#ifndef USE_AS_STRCAT 1775*8d67ca89SAndroid Build Coastguard Worker jnz L(CopyFrom1To16BytesUnalignedXmm4) 1776*8d67ca89SAndroid Build Coastguard Worker#else 1777*8d67ca89SAndroid Build Coastguard Worker jnz L(CopyFrom1To16Bytes) 1778*8d67ca89SAndroid Build Coastguard Worker#endif 1779*8d67ca89SAndroid Build Coastguard Worker pcmpeqb %xmm5, %xmm0 1780*8d67ca89SAndroid Build Coastguard Worker pmovmskb %xmm0, %rdx 1781*8d67ca89SAndroid Build Coastguard Worker movdqu %xmm4, (%rdi) 1782*8d67ca89SAndroid Build Coastguard Worker add $16, %rcx 1783*8d67ca89SAndroid Build Coastguard Worker sub $16, %r8 1784*8d67ca89SAndroid Build Coastguard Worker jbe L(CopyFrom1To16BytesCase2OrCase3) 1785*8d67ca89SAndroid Build Coastguard Worker test %rdx, %rdx 1786*8d67ca89SAndroid Build Coastguard Worker#ifndef USE_AS_STRCAT 1787*8d67ca89SAndroid Build Coastguard Worker jnz L(CopyFrom1To16BytesUnalignedXmm5) 1788*8d67ca89SAndroid Build Coastguard Worker#else 1789*8d67ca89SAndroid Build Coastguard Worker jnz L(CopyFrom1To16Bytes) 1790*8d67ca89SAndroid Build Coastguard Worker#endif 1791*8d67ca89SAndroid Build Coastguard Worker 1792*8d67ca89SAndroid Build Coastguard Worker pcmpeqb %xmm6, %xmm0 1793*8d67ca89SAndroid Build Coastguard Worker pmovmskb %xmm0, %rdx 1794*8d67ca89SAndroid Build Coastguard Worker movdqu %xmm5, 16(%rdi) 1795*8d67ca89SAndroid Build Coastguard Worker add $16, %rcx 1796*8d67ca89SAndroid Build Coastguard Worker sub $16, %r8 1797*8d67ca89SAndroid Build Coastguard Worker jbe L(CopyFrom1To16BytesCase2OrCase3) 1798*8d67ca89SAndroid Build Coastguard Worker test %rdx, %rdx 1799*8d67ca89SAndroid Build Coastguard Worker#ifndef USE_AS_STRCAT 1800*8d67ca89SAndroid Build Coastguard Worker jnz L(CopyFrom1To16BytesUnalignedXmm6) 1801*8d67ca89SAndroid Build Coastguard Worker#else 1802*8d67ca89SAndroid Build Coastguard Worker jnz L(CopyFrom1To16Bytes) 1803*8d67ca89SAndroid Build Coastguard Worker#endif 1804*8d67ca89SAndroid Build Coastguard Worker 1805*8d67ca89SAndroid Build Coastguard Worker pcmpeqb %xmm7, %xmm0 1806*8d67ca89SAndroid Build Coastguard Worker pmovmskb %xmm0, %rdx 1807*8d67ca89SAndroid Build Coastguard Worker movdqu %xmm6, 32(%rdi) 1808*8d67ca89SAndroid Build Coastguard Worker lea 16(%rdi, %rcx), %rdi 1809*8d67ca89SAndroid Build Coastguard Worker lea 16(%rsi, %rcx), %rsi 1810*8d67ca89SAndroid Build Coastguard Worker bsf %rdx, %rdx 1811*8d67ca89SAndroid Build Coastguard Worker cmp %r8, %rdx 1812*8d67ca89SAndroid Build Coastguard Worker jb L(CopyFrom1To16BytesExit) 1813*8d67ca89SAndroid Build Coastguard Worker BRANCH_TO_JMPTBL_ENTRY (L(ExitStrncpyTable), %r8, 4) 1814*8d67ca89SAndroid Build Coastguard Worker 1815*8d67ca89SAndroid Build Coastguard Worker .p2align 4 1816*8d67ca89SAndroid Build Coastguard WorkerL(ExitZero): 1817*8d67ca89SAndroid Build Coastguard Worker#ifndef USE_AS_STRCAT 1818*8d67ca89SAndroid Build Coastguard Worker mov %rdi, %rax 1819*8d67ca89SAndroid Build Coastguard Worker#endif 1820*8d67ca89SAndroid Build Coastguard Worker RETURN 1821*8d67ca89SAndroid Build Coastguard Worker 1822*8d67ca89SAndroid Build Coastguard Worker#endif 1823*8d67ca89SAndroid Build Coastguard Worker 1824*8d67ca89SAndroid Build Coastguard Worker#ifndef USE_AS_STRCAT 1825*8d67ca89SAndroid Build Coastguard WorkerEND (STRCPY) 1826*8d67ca89SAndroid Build Coastguard Worker#else 1827*8d67ca89SAndroid Build Coastguard WorkerEND (STRCAT) 1828*8d67ca89SAndroid Build Coastguard Worker#endif 1829*8d67ca89SAndroid Build Coastguard Worker .p2align 4 1830*8d67ca89SAndroid Build Coastguard Worker .section .rodata 1831*8d67ca89SAndroid Build Coastguard WorkerL(ExitTable): 1832*8d67ca89SAndroid Build Coastguard Worker .int JMPTBL(L(Exit1), L(ExitTable)) 1833*8d67ca89SAndroid Build Coastguard Worker .int JMPTBL(L(Exit2), L(ExitTable)) 1834*8d67ca89SAndroid Build Coastguard Worker .int JMPTBL(L(Exit3), L(ExitTable)) 1835*8d67ca89SAndroid Build Coastguard Worker .int JMPTBL(L(Exit4), L(ExitTable)) 1836*8d67ca89SAndroid Build Coastguard Worker .int JMPTBL(L(Exit5), L(ExitTable)) 1837*8d67ca89SAndroid Build Coastguard Worker .int JMPTBL(L(Exit6), L(ExitTable)) 1838*8d67ca89SAndroid Build Coastguard Worker .int JMPTBL(L(Exit7), L(ExitTable)) 1839*8d67ca89SAndroid Build Coastguard Worker .int JMPTBL(L(Exit8), L(ExitTable)) 1840*8d67ca89SAndroid Build Coastguard Worker .int JMPTBL(L(Exit9), L(ExitTable)) 1841*8d67ca89SAndroid Build Coastguard Worker .int JMPTBL(L(Exit10), L(ExitTable)) 1842*8d67ca89SAndroid Build Coastguard Worker .int JMPTBL(L(Exit11), L(ExitTable)) 1843*8d67ca89SAndroid Build Coastguard Worker .int JMPTBL(L(Exit12), L(ExitTable)) 1844*8d67ca89SAndroid Build Coastguard Worker .int JMPTBL(L(Exit13), L(ExitTable)) 1845*8d67ca89SAndroid Build Coastguard Worker .int JMPTBL(L(Exit14), L(ExitTable)) 1846*8d67ca89SAndroid Build Coastguard Worker .int JMPTBL(L(Exit15), L(ExitTable)) 1847*8d67ca89SAndroid Build Coastguard Worker .int JMPTBL(L(Exit16), L(ExitTable)) 1848*8d67ca89SAndroid Build Coastguard Worker .int JMPTBL(L(Exit17), L(ExitTable)) 1849*8d67ca89SAndroid Build Coastguard Worker .int JMPTBL(L(Exit18), L(ExitTable)) 1850*8d67ca89SAndroid Build Coastguard Worker .int JMPTBL(L(Exit19), L(ExitTable)) 1851*8d67ca89SAndroid Build Coastguard Worker .int JMPTBL(L(Exit20), L(ExitTable)) 1852*8d67ca89SAndroid Build Coastguard Worker .int JMPTBL(L(Exit21), L(ExitTable)) 1853*8d67ca89SAndroid Build Coastguard Worker .int JMPTBL(L(Exit22), L(ExitTable)) 1854*8d67ca89SAndroid Build Coastguard Worker .int JMPTBL(L(Exit23), L(ExitTable)) 1855*8d67ca89SAndroid Build Coastguard Worker .int JMPTBL(L(Exit24), L(ExitTable)) 1856*8d67ca89SAndroid Build Coastguard Worker .int JMPTBL(L(Exit25), L(ExitTable)) 1857*8d67ca89SAndroid Build Coastguard Worker .int JMPTBL(L(Exit26), L(ExitTable)) 1858*8d67ca89SAndroid Build Coastguard Worker .int JMPTBL(L(Exit27), L(ExitTable)) 1859*8d67ca89SAndroid Build Coastguard Worker .int JMPTBL(L(Exit28), L(ExitTable)) 1860*8d67ca89SAndroid Build Coastguard Worker .int JMPTBL(L(Exit29), L(ExitTable)) 1861*8d67ca89SAndroid Build Coastguard Worker .int JMPTBL(L(Exit30), L(ExitTable)) 1862*8d67ca89SAndroid Build Coastguard Worker .int JMPTBL(L(Exit31), L(ExitTable)) 1863*8d67ca89SAndroid Build Coastguard Worker .int JMPTBL(L(Exit32), L(ExitTable)) 1864*8d67ca89SAndroid Build Coastguard Worker#ifdef USE_AS_STRNCPY 1865*8d67ca89SAndroid Build Coastguard WorkerL(ExitStrncpyTable): 1866*8d67ca89SAndroid Build Coastguard Worker .int JMPTBL(L(StrncpyExit0), L(ExitStrncpyTable)) 1867*8d67ca89SAndroid Build Coastguard Worker .int JMPTBL(L(StrncpyExit1), L(ExitStrncpyTable)) 1868*8d67ca89SAndroid Build Coastguard Worker .int JMPTBL(L(StrncpyExit2), L(ExitStrncpyTable)) 1869*8d67ca89SAndroid Build Coastguard Worker .int JMPTBL(L(StrncpyExit3), L(ExitStrncpyTable)) 1870*8d67ca89SAndroid Build Coastguard Worker .int JMPTBL(L(StrncpyExit4), L(ExitStrncpyTable)) 1871*8d67ca89SAndroid Build Coastguard Worker .int JMPTBL(L(StrncpyExit5), L(ExitStrncpyTable)) 1872*8d67ca89SAndroid Build Coastguard Worker .int JMPTBL(L(StrncpyExit6), L(ExitStrncpyTable)) 1873*8d67ca89SAndroid Build Coastguard Worker .int JMPTBL(L(StrncpyExit7), L(ExitStrncpyTable)) 1874*8d67ca89SAndroid Build Coastguard Worker .int JMPTBL(L(StrncpyExit8), L(ExitStrncpyTable)) 1875*8d67ca89SAndroid Build Coastguard Worker .int JMPTBL(L(StrncpyExit9), L(ExitStrncpyTable)) 1876*8d67ca89SAndroid Build Coastguard Worker .int JMPTBL(L(StrncpyExit10), L(ExitStrncpyTable)) 1877*8d67ca89SAndroid Build Coastguard Worker .int JMPTBL(L(StrncpyExit11), L(ExitStrncpyTable)) 1878*8d67ca89SAndroid Build Coastguard Worker .int JMPTBL(L(StrncpyExit12), L(ExitStrncpyTable)) 1879*8d67ca89SAndroid Build Coastguard Worker .int JMPTBL(L(StrncpyExit13), L(ExitStrncpyTable)) 1880*8d67ca89SAndroid Build Coastguard Worker .int JMPTBL(L(StrncpyExit14), L(ExitStrncpyTable)) 1881*8d67ca89SAndroid Build Coastguard Worker .int JMPTBL(L(StrncpyExit15), L(ExitStrncpyTable)) 1882*8d67ca89SAndroid Build Coastguard Worker .int JMPTBL(L(StrncpyExit16), L(ExitStrncpyTable)) 1883*8d67ca89SAndroid Build Coastguard Worker .int JMPTBL(L(StrncpyExit17), L(ExitStrncpyTable)) 1884*8d67ca89SAndroid Build Coastguard Worker .int JMPTBL(L(StrncpyExit18), L(ExitStrncpyTable)) 1885*8d67ca89SAndroid Build Coastguard Worker .int JMPTBL(L(StrncpyExit19), L(ExitStrncpyTable)) 1886*8d67ca89SAndroid Build Coastguard Worker .int JMPTBL(L(StrncpyExit20), L(ExitStrncpyTable)) 1887*8d67ca89SAndroid Build Coastguard Worker .int JMPTBL(L(StrncpyExit21), L(ExitStrncpyTable)) 1888*8d67ca89SAndroid Build Coastguard Worker .int JMPTBL(L(StrncpyExit22), L(ExitStrncpyTable)) 1889*8d67ca89SAndroid Build Coastguard Worker .int JMPTBL(L(StrncpyExit23), L(ExitStrncpyTable)) 1890*8d67ca89SAndroid Build Coastguard Worker .int JMPTBL(L(StrncpyExit24), L(ExitStrncpyTable)) 1891*8d67ca89SAndroid Build Coastguard Worker .int JMPTBL(L(StrncpyExit25), L(ExitStrncpyTable)) 1892*8d67ca89SAndroid Build Coastguard Worker .int JMPTBL(L(StrncpyExit26), L(ExitStrncpyTable)) 1893*8d67ca89SAndroid Build Coastguard Worker .int JMPTBL(L(StrncpyExit27), L(ExitStrncpyTable)) 1894*8d67ca89SAndroid Build Coastguard Worker .int JMPTBL(L(StrncpyExit28), L(ExitStrncpyTable)) 1895*8d67ca89SAndroid Build Coastguard Worker .int JMPTBL(L(StrncpyExit29), L(ExitStrncpyTable)) 1896*8d67ca89SAndroid Build Coastguard Worker .int JMPTBL(L(StrncpyExit30), L(ExitStrncpyTable)) 1897*8d67ca89SAndroid Build Coastguard Worker .int JMPTBL(L(StrncpyExit31), L(ExitStrncpyTable)) 1898*8d67ca89SAndroid Build Coastguard Worker .int JMPTBL(L(StrncpyExit32), L(ExitStrncpyTable)) 1899*8d67ca89SAndroid Build Coastguard Worker .int JMPTBL(L(StrncpyExit33), L(ExitStrncpyTable)) 1900*8d67ca89SAndroid Build Coastguard Worker# ifndef USE_AS_STRCAT 1901*8d67ca89SAndroid Build Coastguard Worker .p2align 4 1902*8d67ca89SAndroid Build Coastguard WorkerL(FillTable): 1903*8d67ca89SAndroid Build Coastguard Worker .int JMPTBL(L(Fill0), L(FillTable)) 1904*8d67ca89SAndroid Build Coastguard Worker .int JMPTBL(L(Fill1), L(FillTable)) 1905*8d67ca89SAndroid Build Coastguard Worker .int JMPTBL(L(Fill2), L(FillTable)) 1906*8d67ca89SAndroid Build Coastguard Worker .int JMPTBL(L(Fill3), L(FillTable)) 1907*8d67ca89SAndroid Build Coastguard Worker .int JMPTBL(L(Fill4), L(FillTable)) 1908*8d67ca89SAndroid Build Coastguard Worker .int JMPTBL(L(Fill5), L(FillTable)) 1909*8d67ca89SAndroid Build Coastguard Worker .int JMPTBL(L(Fill6), L(FillTable)) 1910*8d67ca89SAndroid Build Coastguard Worker .int JMPTBL(L(Fill7), L(FillTable)) 1911*8d67ca89SAndroid Build Coastguard Worker .int JMPTBL(L(Fill8), L(FillTable)) 1912*8d67ca89SAndroid Build Coastguard Worker .int JMPTBL(L(Fill9), L(FillTable)) 1913*8d67ca89SAndroid Build Coastguard Worker .int JMPTBL(L(Fill10), L(FillTable)) 1914*8d67ca89SAndroid Build Coastguard Worker .int JMPTBL(L(Fill11), L(FillTable)) 1915*8d67ca89SAndroid Build Coastguard Worker .int JMPTBL(L(Fill12), L(FillTable)) 1916*8d67ca89SAndroid Build Coastguard Worker .int JMPTBL(L(Fill13), L(FillTable)) 1917*8d67ca89SAndroid Build Coastguard Worker .int JMPTBL(L(Fill14), L(FillTable)) 1918*8d67ca89SAndroid Build Coastguard Worker .int JMPTBL(L(Fill15), L(FillTable)) 1919*8d67ca89SAndroid Build Coastguard Worker .int JMPTBL(L(Fill16), L(FillTable)) 1920*8d67ca89SAndroid Build Coastguard Worker# endif 1921*8d67ca89SAndroid Build Coastguard Worker#endif 1922