1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 .text
19 .global memcpy
20 .type memcpy, @function
21memcpy:
22 mov r9, r11
23 andl r9, 3, COH
24 brne 1f
25
26
272: mov r9, r12
285: sub r10, 4
29 brlt 4f
30
313: ld.w r8, r11++
32 sub r10, 4
33 st.w r12++, r8
34 brge 3b
35
364: neg r10
37 reteq r9
38
39
40 lsl r10, 2
41 add pc, pc, r10
42 ld.ub r8, r11++
43 st.b r12++, r8
44 ld.ub r8, r11++
45 st.b r12++, r8
46 ld.ub r8, r11++
47 st.b r12++, r8
48 retal r9
49
50
511: sub r10, 4
52 movlt r9, r12
53 brlt 4b
54 add r10, r9
55 lsl r9, 2
56 add pc, pc, r9
57 ld.ub r8, r11++
58 st.b r12++, r8
59 ld.ub r8, r11++
60 st.b r12++, r8
61 ld.ub r8, r11++
62 st.b r12++, r8
63 mov r8, r12
64 add pc, pc, r9
65 sub r8, 1
66 nop
67 sub r8, 1
68 nop
69 sub r8, 1
70 nop
71 mov r9, r8
72 rjmp 5b
73