Lines Matching +full:left +full:- +full:aligned
1 /* SPDX-License-Identifier: GPL-2.0 */
13 * Copyright (C) 2000-2001 Hewlett-Packard Co
15 * David Mosberger-Tang <davidm@hpl.hp.com>
69 shr.u cnt=in2,3 // number of 8-byte words to copy
73 adds cnt=-1,cnt // br.ctop is repeat/until
103 (p[N-1])st8 [dst]=val[N-1],8
109 mov pr=saved_pr,-1
114 * Small (<16 bytes) unaligned copying is done via a simple byte-at-the-time
117 * issues, we want to avoid read-modify-write of entire words.
121 adds cnt=-1,in2 // br.ctop is repeat/until
147 (p[MEM_LAT-1])st1 [dst]=val[MEM_LAT-1],1
152 mov pr=saved_pr,-1
159 * sub-word copying until the destination is aligned, then we check
160 * if the source is also aligned. If so, we do a simple load/store-loop
161 * until there are less than 8 bytes left over and then we do the tail,
162 * by storing the last few bytes using sub-word copying. If the source
163 * is not aligned, we branch off to the non-congruent loop.
185 and t0=-8,src // t0 = src & ~7
190 sub t4=r0,dst // t4 = -dst
192 and src2=-8,src2 // src2 = (src + 7) & ~7
196 ld8 t1=[src2] // t1 = 1st source word if src is 8-byte aligned, 2nd otherwise
197 sub t3=64,t2 // t3 = 64-8*(src & 7)
206 adds src_end=-1,src_end
218 and src_end=-8,src_end // src_end = last word of source buffer
221 // At this point, dst is aligned to 8 bytes and there at least 16-7=9 bytes left to copy:
224 sub cnt=in2,cnt // cnt = number of bytes left to copy
227 and src2=-8,src // align source pointer
228 adds t4=.memcpy_loops-1b,t4
232 shr.u t2=cnt,3 // t2 = number of 8-byte words left to copy
233 shl cnt=cnt,3 // move bits 0-2 to 3-5
239 cmp.ne p6,p0=t0,r0 // is src aligned, too?
241 adds t2=-1,t2 // br.ctop is repeat/until
244 mov pr=cnt,0x38 // set (p5,p4,p3) to # of bytes last-word bytes to copy
260 // At this point, (p5,p4,p3) are set to the number of bytes left to copy (which is
271 mov pr=saved_pr,-1
280 (p[MEM_LAT+3]) shrp w[0]=val[MEM_LAT+3],val[MEM_LAT+4-index],shift; \
289 ld8 val[N-1]=[src_end]; /* load last word (may be same as val[N]) */ \
291 shrp t0=val[N-1],val[N-index],shift; \
294 COPY(0, 1) /* no point special casing this---it doesn't go any faster without shrp */