comparison libiram/bcopy_chunk32.S @ 0:75a11d740a02

initial import of gsm-fw from freecalypso-sw rev 1033:5ab737ac3ad7
author Mychaela Falconia <falcon@freecalypso.org>
date Thu, 09 Jun 2016 00:02:41 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:75a11d740a02
1 /*
2 * bcopy_32byte_chunks() takes the same arguments as BSD bcopy(),
3 * but works on large chunks, specifically:
4 *
5 * - both addresses must be 32-bit word-aligned;
6 * - the count must be a non-zero multiple of 32 bytes;
7 * - the source and destination memory regions must not overlap.
8 *
9 * Arguments:
10 *
11 * R0: source address (word-aligned)
12 * R1: destination address (ditto)
13 * R2: byte count (must be a multiple of 32)
14 */
15
16 .text
17 .code 32
18
19 .globl bcopy_32byte_chunks
20 bcopy_32byte_chunks:
21 stmfd sp!, {r4-r9}
22 1: ldmia r0!, {r3-r9,r12}
23 stmia r1!, {r3-r9,r12}
24 subs r2, r2, #0x20
25 bhi 1b
26 ldmfd sp!, {r4-r9}
27 bx lr