3 @ Memory converters for different modes
4 @ (c) Copyright 2007, Grazvydas "notaz" Ignotas
7 @ r10 is tmp, io1 is lsb halfword, io2 is msb
8 @ | 0 1 | 2 3 | -> | 0 2 | 1 3 | (little endian)
9 .macro _conv_reg io1 io2
10 mov r10, \io2, lsl #16
11 and \io2, \io2, r11, lsl #16
12 orr \io2, \io2, \io1, lsr #16
16 mov \io2, \io2, ror #16
17 mov r10, \io1, lsl #16
18 orr r10, r10, \io2, lsr #16
19 mov \io1, \io1, lsr #16
20 orr \io1, \io1, \io2, lsl #16
21 mov \io2, r10, ror #16
29 add r1, r0, #0x60000 @ m1M_b1
30 add r0, r0, #0x40000 @ m1M_b0
34 orr r11, r11, r11, lsl #8
35 mov r12, #(0x40000/8/4)
44 stmdb r0!,{r3,r5,r7,r9}
45 stmdb r1!,{r4,r6,r8,lr}
56 add r1, r0, #0x40000 @ m1M_b1
57 add r0, r0, #0x20000 @ m1M_b0
60 orr r11, r11, r11, lsl #8
61 mov r12, #(0x40000/8/4)
64 ldmia r0!,{r3,r5,r7,r9}
65 ldmia r1!,{r4,r6,r8,lr}