comparison gsm-fw/libiram/bcopy_chunk32.S @ 860:cbc49d533b7d

gsm-fw: new implementation of bzero() and some specialized bcopy variants
author Space Falcon <falcon@ivan.Harhan.ORG>
date Sun, 03 May 2015 04:11:41 +0000
parents
children
comparison
equal deleted inserted replaced
859:d32dff865575 860:cbc49d533b7d
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