1
2
3
4
5
6
7
8
9
10 #include <linux/linkage.h>
11 #include <asm/assembler.h>
12 #include <asm/unwind.h>
13
14 #define LDR1W_SHIFT 0
15 #define STR1W_SHIFT 0
16
17 .macro ldr1w ptr reg abort
18 W(ldr) \reg, [\ptr], #4
19 .endm
20
21 .macro ldr4w ptr reg1 reg2 reg3 reg4 abort
22 ldmia \ptr!, {\reg1, \reg2, \reg3, \reg4}
23 .endm
24
25 .macro ldr8w ptr reg1 reg2 reg3 reg4 reg5 reg6 reg7 reg8 abort
26 ldmia \ptr!, {\reg1, \reg2, \reg3, \reg4, \reg5, \reg6, \reg7, \reg8}
27 .endm
28
29 .macro ldr1b ptr reg cond=al abort
30 ldrb\cond \reg, [\ptr], #1
31 .endm
32
33 .macro str1w ptr reg abort
34 W(str) \reg, [\ptr], #4
35 .endm
36
37 .macro str8w ptr reg1 reg2 reg3 reg4 reg5 reg6 reg7 reg8 abort
38 stmia \ptr!, {\reg1, \reg2, \reg3, \reg4, \reg5, \reg6, \reg7, \reg8}
39 .endm
40
41 .macro str1b ptr reg cond=al abort
42 strb\cond \reg, [\ptr], #1
43 .endm
44
45 .macro enter reg1 reg2
46 stmdb sp!, {r0, \reg1, \reg2}
47 .endm
48
49 .macro usave reg1 reg2
50 UNWIND( .save {r0, \reg1, \reg2} )
51 .endm
52
53 .macro exit reg1 reg2
54 ldmfd sp!, {r0, \reg1, \reg2}
55 .endm
56
57 .text
58
59
60
61 ENTRY(mmiocpy)
62 ENTRY(memcpy)
63
64 #include "copy_template.S"
65
66 ENDPROC(memcpy)
67 ENDPROC(mmiocpy)