• Home
  • Raw
  • Download

Lines Matching +full:address +full:- +full:aligned

2  * arch/xtensa/lib/hal/memcopy.S -- Core HAL library functions
9 * Copyright (C) 2002 - 2012 Tensilica Inc.
24 * 32-bit load and store instructions (as required for these
34 * If source is aligned,
39 * This code tries to use fall-through branches for the common
40 * case of aligned source and destination and multiple
44 * a0/ return address
71 add a7, a3, a4 # a7 = end address for source
89 .Ldst1mod2: # dst is only byte aligned
95 addi a4, a4, -1
98 _bbci.l a5, 1, .Ldstaligned # if dst is now aligned, then
100 .Ldst2mod4: # dst 16-bit aligned
106 addi a4, a4, -2
110 j .Ldstaligned # dst is now aligned, return to main algorithm
121 .Ldstaligned: # return here from .Ldst?mod? once dst is aligned
124 movi a8, 3 # if source is not aligned,
127 * Destination and source are word-aligned, use word copy.
129 # copy 16 bytes per iteration for word-aligned dst and word-aligned src
189 * Destination is aligned, Source is unaligned
194 _beqz a4, .Ldone # avoid loading anything for zero-length copies
195 # copy 16 bytes per iteration for word-aligned dst and unaligned src
300 * 32-bit load and store instructions (as required for these
312 * a0/ return address
337 sub a7, a3, a4 # a7 = start address for source
340 addi a3, a3, -1
342 addi a5, a5, -1
356 .Lbackdst1mod2: # dst is only byte aligned
360 addi a3, a3, -1
362 addi a5, a5, -1
364 addi a4, a4, -1
365 _bbci.l a5, 1, .Lbackdstaligned # if dst is now aligned, then
367 .Lbackdst2mod4: # dst 16-bit aligned
370 addi a3, a3, -2
373 addi a5, a5, -2
376 addi a4, a4, -2
377 j .Lbackdstaligned # dst is now aligned,
395 .Lbackdstaligned: # return here from .Lbackdst?mod? once dst is aligned
398 movi a8, 3 # if source is not aligned,
401 * Destination and source are word-aligned, use word copy.
403 # copy 16 bytes per iteration for word-aligned dst and word-aligned src
412 addi a3, a3, -16
415 addi a5, a5, -16
428 addi a3, a3, -8
431 addi a5, a5, -8
441 addi a3, a3, -4
443 addi a5, a5, -4
450 addi a3, a3, -2
452 addi a5, a5, -2
458 addi a3, a3, -1
460 addi a5, a5, -1
465 * Destination is aligned, Source is unaligned
470 _beqz a4, .Lbackdone # avoid loading anything for zero-length copies
471 # copy 16 bytes per iteration for word-aligned dst and unaligned src
489 addi a3, a3, -16
492 addi a5, a5, -16
509 addi a3, a3, -8
512 addi a5, a5, -8
521 addi a3, a3, -4
523 addi a5, a5, -4
537 addi a3, a3, -2
540 addi a5, a5, -2
547 addi a3, a3, -1
548 addi a5, a5, -1