2 * Copyright (C) Paul Mackerras 1997.
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version
7 * 2 of the License, or (at your option) any later version.
9 * NOTE: this code runs in 32 bit mode and is packaged as ELF32.
35 bdnzf 2,1b /* dec ctr, branch if ctr != 0 && !cr0.eq */
109 rlwinm r0,r5,32-2,2,31
131 rlwinm. r7,r5,32-3,3,31 /* r7 = r5 >> 3 */
134 beq 3f /* if less than 8 bytes to do */
135 andi. r0,r6,3 /* get dest word aligned */
138 andi. r0,r4,3 /* check src word aligned too */
163 andi. r7,r7,3 /* will source be word-aligned too? */
165 bne 3b /* do byte-by-byte if not */
173 rlwinm. r7,r5,32-3,3,31
178 .globl backwards_memcpy
180 rlwinm. r7,r5,32-3,3,31 /* r7 = r5 >> 3 */
217 rlwinm. r7,r5,32-3,3,31
250 * Flush the dcache and invalidate the icache for a range of addresses.
252 * flush_cache(addr, len)
256 addi 4,4,0x1f /* len = (len + 0x1f) / 0x20 */