Lines Matching +full:byte +full:- +full:len

1 /* SPDX-License-Identifier: GPL-2.0 */
11 * Copyright (C) 1998, 1999, 2001 Hewlett-Packard Co
22 #define len r33 macro
37 // - we check whether or not the buffer is small, i.e., less than 17
38 // in which case we do the byte by byte loop.
40 // - Otherwise we go progressively from 1 byte store to 8byte store in
41 // the head part, the body is a 16byte store loop and we finish we the
60 cmp.eq p6,p0=r0,len // check for zero length
65 adds tmp=-1,len // br.ctop is repeat/until
66 mov ret0=len // return value is length at this point
69 cmp.lt p6,p0=16,len // if len > 16 then long memset
83 adds len=-1,len // countdown length using len
87 // .Lexit4: comes from byte by byte loop
88 // len contains bytes left
90 mov ret0=len // faster than using ar.lc
99 // The use of len/len2 for countdown of the number of bytes left
106 EX( .Lexit3, (p6) st1 [buf]=r0,1 ) // 1-byte aligned
107 (p6) adds len=-1,len;; // sync because buf is modified
110 EX( .Lexit3, (p6) st2 [buf]=r0,2 ) // 2-byte aligned
111 (p6) adds len=-2,len;;
114 EX( .Lexit3, (p6) st4 [buf]=r0,4 ) // 4-byte aligned
115 (p6) adds len=-4,len;;
118 EX( .Lexit3, (p6) st8 [buf]=r0,8 ) // 8-byte aligned
119 (p6) adds len=-8,len;;
120 shr.u cnt=len,4 // number of 128-bit (2x64bit) words
123 adds tmp=-1,cnt
134 // we come into the loop only when we are 16-byte aligned.
140 // way would be to use ar.lc and derive how many byte were left by
150 ;; // needed to get len correct when error
152 adds len=-16,len
157 // tail correction based on len only
165 mov len2=len // for parallelization of error handling
166 mov len3=len
167 tbit.nz p6,p0=len,3
170 (p6) adds len3=-8,len2
171 tbit.nz p7,p6=len,2
174 (p7) adds len2=-4,len3
175 tbit.nz p6,p7=len,1
178 (p6) adds len3=-2,len2
179 tbit.nz p7,p6=len,0
181 EX( .Lexit2, (p7) st1 [buf]=r0 ) // only 1 byte left
191 // len contains bytes left
195 // if p6 -> coming from st8 or st2 : len2 contains what's left
196 // if p7 -> coming from st4 or st1 : len3 contains what's left
200 (p6) mov len=len2
201 (p7) mov len=len3
205 // len contains bytes left
208 mov ret0=len