annotate gsm-fw/libiram/bcopy_words.S @ 1023:cd6002e3aefb

doc/Freerunner-Howto: apparently some people still use SHR, so mention it too
author Mychaela Falconia <falcon@ivan.Harhan.ORG>
date Tue, 03 May 2016 13:48:39 +0000
parents cbc49d533b7d
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
860
cbc49d533b7d gsm-fw: new implementation of bzero() and some specialized bcopy variants
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1 /*
cbc49d533b7d gsm-fw: new implementation of bzero() and some specialized bcopy variants
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2 * bcopy_aligned_words() takes the same arguments as BSD bcopy(),
cbc49d533b7d gsm-fw: new implementation of bzero() and some specialized bcopy variants
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
3 * but requires both addresses and the count to be 32-bit word-aligned,
cbc49d533b7d gsm-fw: new implementation of bzero() and some specialized bcopy variants
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
4 * and assumes that the source and destination memory regions
cbc49d533b7d gsm-fw: new implementation of bzero() and some specialized bcopy variants
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
5 * do not overlap. Furthermore, the count is expected to be non-zero.
cbc49d533b7d gsm-fw: new implementation of bzero() and some specialized bcopy variants
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
6 *
cbc49d533b7d gsm-fw: new implementation of bzero() and some specialized bcopy variants
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
7 * Arguments:
cbc49d533b7d gsm-fw: new implementation of bzero() and some specialized bcopy variants
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
8 *
cbc49d533b7d gsm-fw: new implementation of bzero() and some specialized bcopy variants
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
9 * R0: source address (word-aligned)
cbc49d533b7d gsm-fw: new implementation of bzero() and some specialized bcopy variants
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
10 * R1: destination address (ditto)
cbc49d533b7d gsm-fw: new implementation of bzero() and some specialized bcopy variants
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
11 * R2: byte count (must be a multiple of 4)
cbc49d533b7d gsm-fw: new implementation of bzero() and some specialized bcopy variants
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
12 */
cbc49d533b7d gsm-fw: new implementation of bzero() and some specialized bcopy variants
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
13
cbc49d533b7d gsm-fw: new implementation of bzero() and some specialized bcopy variants
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
14 .text
cbc49d533b7d gsm-fw: new implementation of bzero() and some specialized bcopy variants
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
15 .code 32
cbc49d533b7d gsm-fw: new implementation of bzero() and some specialized bcopy variants
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
16
cbc49d533b7d gsm-fw: new implementation of bzero() and some specialized bcopy variants
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
17 .globl bcopy_aligned_words
cbc49d533b7d gsm-fw: new implementation of bzero() and some specialized bcopy variants
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
18 bcopy_aligned_words:
cbc49d533b7d gsm-fw: new implementation of bzero() and some specialized bcopy variants
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
19 1: ldr r3, [r0], #4
cbc49d533b7d gsm-fw: new implementation of bzero() and some specialized bcopy variants
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
20 str r3, [r1], #4
cbc49d533b7d gsm-fw: new implementation of bzero() and some specialized bcopy variants
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
21 subs r2, r2, #4
cbc49d533b7d gsm-fw: new implementation of bzero() and some specialized bcopy variants
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
22 bhi 1b
cbc49d533b7d gsm-fw: new implementation of bzero() and some specialized bcopy variants
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
23 bx lr