Lines Matching +full:8 +full:- +full:byte

1 /*-
4 * SPDX-License-Expression: BSD-2-Clause
29 * This stpcpy implementation copies a byte at a time until the
31 * words until it finds a word containing a zero byte, and finally
36 * it is still faster than either byte copies or the overhead of
65 addq $8,%rdi
69 addq $8,%rsi
80 testb %dl,%dl /* 1st byte == 0? */
84 shrq $8,%rdx
86 testb %dl,%dl /* 2nd byte == 0? */
90 shrq $8,%rdx
92 testb %dl,%dl /* 3rd byte == 0? */
96 shrq $8,%rdx
98 testb %dl,%dl /* 4th byte == 0? */
102 shrq $8,%rdx
104 testb %dl,%dl /* 5th byte == 0? */
108 shrq $8,%rdx
110 testb %dl,%dl /* 6th byte == 0? */
114 shrq $8,%rdx
116 testb %dl,%dl /* 7th byte == 0? */
120 shrq $8,%rdx
123 testb %dl,%dl /* 8th byte == 0? */
136 and $~0xf, %rsi # align source to 16 byte
140 pcmpeqb %xmm1, %xmm0 # NUL byte present?
149 pcmpeqb %xmm0, %xmm1 # NUL byte present?
162 pcmpeqb %xmm2, %xmm1 # NUL byte present?
170 pcmpeqb %xmm0, %xmm1 # NUL byte present?
178 # (behaves as bsf on pre-x86-64-v3 CPUs)
179 add %rsi, %rax # point to NUL byte
180 movdqu -15(%rax), %xmm0 # last 16 bytes of string
181 movdqu %xmm0, -15(%rax, %rdi, 1) # copied to destination
182 add %rdi, %rax # point to destination's NUL byte
192 .Lrunt: lea 1(%rax), %edi # string length including NUL byte
194 add %rdx, %rax # point to NUL byte
196 /* transfer 16--32 bytes */
200 movdqu -16(%rsi, %rdi, 1), %xmm0 # load last 16 bytes
202 movdqu %xmm0, -15(%rax) # store last 16 bytes
205 /* transfer 8--15 bytes */
206 .L0815: cmp $8, %edi
209 mov (%rsi), %rcx # load first 8 bytes
210 mov -8(%rsi, %rdi, 1), %rdi # load last 8 bytes
212 mov %rdi, -7(%rax) # dito
215 /* transfer 4--7 bytes */
220 mov -4(%rsi, %rdi, 1), %edi
222 mov %edi, -3(%rax)
225 /* transfer 2--3 bytes */
232 /* transfer 0 bytes (last byte is always NUL) */
233 .L0101: movb $0, (%rax) # store terminating NUL byte
237 .section .note.GNU-stack,"",%progbits