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 */
85 rlwinm r0,r5,32-2,2,31
107 rlwinm. r7,r5,32-3,3,31 /* r7 = r5 >> 3 */
110 beq 3f /* if less than 8 bytes to do */
111 andi. r0,r6,3 /* get dest word aligned */
114 andi. r0,r4,3 /* check src word aligned too */
139 andi. r7,r7,3 /* will source be word-aligned too? */
141 bne 3b /* do byte-by-byte if not */
149 rlwinm. r7,r5,32-3,3,31
154 .globl backwards_memcpy
156 rlwinm. r7,r5,32-3,3,31 /* r7 = r5 >> 3 */
193 rlwinm. r7,r5,32-3,3,31
213 * Flush the dcache and invalidate the icache for a range of addresses.
215 * flush_cache(addr, len)
219 addi 4,4,0x1f /* len = (len + 0x1f) / 0x20 */