FreeCalypso > hg > freecalypso-citrine
diff libiram/bcopy_chunk32.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 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libiram/bcopy_chunk32.S Thu Jun 09 00:02:41 2016 +0000 @@ -0,0 +1,27 @@ +/* + * bcopy_32byte_chunks() takes the same arguments as BSD bcopy(), + * but works on large chunks, specifically: + * + * - both addresses must be 32-bit word-aligned; + * - the count must be a non-zero multiple of 32 bytes; + * - the source and destination memory regions must not overlap. + * + * Arguments: + * + * R0: source address (word-aligned) + * R1: destination address (ditto) + * R2: byte count (must be a multiple of 32) + */ + + .text + .code 32 + + .globl bcopy_32byte_chunks +bcopy_32byte_chunks: + stmfd sp!, {r4-r9} +1: ldmia r0!, {r3-r9,r12} + stmia r1!, {r3-r9,r12} + subs r2, r2, #0x20 + bhi 1b + ldmfd sp!, {r4-r9} + bx lr