comparison libiram/bcopy_words.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_aligned_words() takes the same arguments as BSD bcopy(),
3 * but requires both addresses and the count to be 32-bit word-aligned,
4 * and assumes that the source and destination memory regions
5 * do not overlap. Furthermore, the count is expected to be non-zero.
6 *
7 * Arguments:
8 *
9 * R0: source address (word-aligned)
10 * R1: destination address (ditto)
11 * R2: byte count (must be a multiple of 4)
12 */
13
14 .text
15 .code 32
16
17 .globl bcopy_aligned_words
18 bcopy_aligned_words:
19 1: ldr r3, [r0], #4
20 str r3, [r1], #4
21 subs r2, r2, #4
22 bhi 1b
23 bx lr