FreeCalypso > hg > freecalypso-sw
comparison gsm-fw/libiram/bcopy_words.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_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 |