annotate gsm-fw/libiram/bcopy_chunk32.S @ 941:6b0b2f6dbb20

gsm-fw/services/ffs/drv.c: AMD multi-bank flash driver fixed for Pirelli and future FreeCalypso hardware
author Mychaela Falconia <falcon@ivan.Harhan.ORG>
date Sun, 01 Nov 2015 00:07:09 +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_32byte_chunks() 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 works on large chunks, specifically:
cbc49d533b7d gsm-fw: new implementation of bzero() and some specialized bcopy variants
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
4 *
cbc49d533b7d gsm-fw: new implementation of bzero() and some specialized bcopy variants
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
5 * - both addresses must 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
6 * - the count must be a non-zero multiple of 32 bytes;
cbc49d533b7d gsm-fw: new implementation of bzero() and some specialized bcopy variants
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
7 * - the source and destination memory regions must not overlap.
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 * Arguments:
cbc49d533b7d gsm-fw: new implementation of bzero() and some specialized bcopy variants
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
10 *
cbc49d533b7d gsm-fw: new implementation of bzero() and some specialized bcopy variants
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
11 * 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
12 * 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
13 * R2: byte count (must be a multiple of 32)
cbc49d533b7d gsm-fw: new implementation of bzero() and some specialized bcopy variants
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
14 */
cbc49d533b7d gsm-fw: new implementation of bzero() and some specialized bcopy variants
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
15
cbc49d533b7d gsm-fw: new implementation of bzero() and some specialized bcopy variants
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
16 .text
cbc49d533b7d gsm-fw: new implementation of bzero() and some specialized bcopy variants
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
17 .code 32
cbc49d533b7d gsm-fw: new implementation of bzero() and some specialized bcopy variants
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
18
cbc49d533b7d gsm-fw: new implementation of bzero() and some specialized bcopy variants
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
19 .globl bcopy_32byte_chunks
cbc49d533b7d gsm-fw: new implementation of bzero() and some specialized bcopy variants
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
20 bcopy_32byte_chunks:
cbc49d533b7d gsm-fw: new implementation of bzero() and some specialized bcopy variants
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
21 stmfd sp!, {r4-r9}
cbc49d533b7d gsm-fw: new implementation of bzero() and some specialized bcopy variants
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
22 1: ldmia r0!, {r3-r9,r12}
cbc49d533b7d gsm-fw: new implementation of bzero() and some specialized bcopy variants
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
23 stmia r1!, {r3-r9,r12}
cbc49d533b7d gsm-fw: new implementation of bzero() and some specialized bcopy variants
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
24 subs r2, r2, #0x20
cbc49d533b7d gsm-fw: new implementation of bzero() and some specialized bcopy variants
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
25 bhi 1b
cbc49d533b7d gsm-fw: new implementation of bzero() and some specialized bcopy variants
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
26 ldmfd sp!, {r4-r9}
cbc49d533b7d gsm-fw: new implementation of bzero() and some specialized bcopy variants
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
27 bx lr