3 @ Generic memory routines.
4 @ (c) Copyright 2007, Grazvydas "notaz" Ignotas
7 .global memcpy16 @ unsigned short *dest, unsigned short *src, int count
45 @ 0x12345678 -> 0x34127856
46 @ r4=temp, lr=0x00ff00ff
49 and \reg, lr, \reg, lsr #8
50 orr \reg, \reg, r4, lsl #8
54 @ dest must be halfword aligned, src can be unaligned
55 .global memcpy16bswap @ unsigned short *dest, void *src, int count
59 bne mcp16bs_cant_align2
63 bne mcp16bs_cant_align
69 orr r3, r3, r3, lsl #16
76 orr lr, lr, lr, lsl #16
104 orr r3, r3, r3, lsl #16
107 bne mcp16bs_cant_align
118 bne mcp16bs_cant_align2
123 .global memcpy32 @ int *dest, int *src, int count
132 ldmia r1!, {r3,r4,r12,lr}
134 stmia r0!, {r3,r4,r12,lr}
146 ldmneia r1!, {r3,r12}
148 stmneia r0!, {r3,r12}
153 .global memset32 @ int *dest, int c, int count
167 stmia r0!, {r1,r3,r12,lr}