Lines Matching refs:src

8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
31 * (dstsize being the size of the string buffer dst) from src
32 * to dst, truncating src if necessary. The result is always
33 * null-terminated. The function returns strlen(src). Buffer
36 * if (strlcpy(dst, src, dstsize) >= dstsize)
64 add %i1, %i2, %i3 ! src = src + n
65 andcc %i1, 7, %i4 ! src dword aligned ?
68 sub %i4, 8, %i4 ! bytes until src aligned
71 ldub [%i3 + %g4], %l1 ! src[]
72 andcc %l1, 0xff, %g0 ! end of src reached (null byte) ?
73 stub %l1, [%i2 + %g4] ! dst[] = src[]
76 addcc %g4, 1, %g4 ! src++, dst++, n--
78 addcc %i4, 1, %i4 ! src aligned now?
103 ldx [%i3 + %g4], %l1 ! src dword
104 addcc %g4, 8, %g4 ! n += 8, src += 8, dst += 8
112 ! n has not expired, but src is at the end. we need to push out the
113 ! remaining src bytes. Since strlen(dts) == strlen(src), we can
163 ! processing of this last src word, we are done. Otherwise continue
164 ! to scan src until we hit the end, and compute strlen from the
165 ! difference between the pointer past the last byte of src and the
166 ! original pointer to the start of src
171 add %i3, %g4, %i3 ! we want a single src pointer here
174 andcc %g1, 0xff, %g0 ! end of src reached ?
181 andcc %g1, 0xff, %g0 ! end of src reached ?
188 andcc %g1, 0xff, %g0 ! end of src reached ?
195 andcc %g1, 0xff, %g0 ! end of src reached ?
202 andcc %g1, 0xff, %g0 ! end of src reached ?
209 andcc %g1, 0xff, %g0 ! end of src reached ?
216 andcc %g1, 0xff, %g0 ! end of src reached ?
221 andcc %l1, 0xff, %g0 ! end of src reached ?
232 ! here: %i1 points to src start
233 ! %i3 points is current src ptr (8-byte aligned)
236 ldx [%i3], %l1 ! src dword
242 add %i3, 8, %i3 ! src += 8
250 add %i3, 1, %i3 ! src++
253 sub %i3, %i1, %i0 ! len = src - orig src
259 ldx [%i3 + %g4], %l1 ! x = src[]
260 addcc %g4, 8, %g4 ! src += 8, dst += 8
265 bnz,pn %ncc, .zerobyte ! end of src found, may need to pad
277 ldx [%i3 + %g4], %l1 ! x = src[]
278 addcc %g4, 8, %g4 ! src += 8, dst += 8
295 ldx [%i3 + %g4], %l1 ! x = src[]
296 addcc %g4, 8, %g4 ! src += 8, dst += 8
313 ldx [%i3 + %g4], %l1 ! x = src[]
314 addcc %g4, 8, %g4 ! src += 8, dst += 8
327 ! null termination of dst, then scan src until end foudn for
328 ! determination of strlen(src)
330 ! here: %i3 points to current src byte
347 andcc %i3, 7, %g0 ! src dword aligned?
349 ldx [%i3], %l1 ! src dword
350 ldub [%i3], %l1 ! load src byte
351 andcc %l1, 0xff, %g0 ! end of src reached?
353 add %i3, 1, %i3 ! src++
354 sub %i3, %i1, %i0 ! len = src - orig src