diff options
Diffstat (limited to 'arch/mips/include/asm/asm.h')
-rw-r--r-- | arch/mips/include/asm/asm.h | 98 |
1 files changed, 49 insertions, 49 deletions
diff --git a/arch/mips/include/asm/asm.h b/arch/mips/include/asm/asm.h index 608cfcfbb3ea..164a21e65b42 100644 --- a/arch/mips/include/asm/asm.h +++ b/arch/mips/include/asm/asm.h | |||
@@ -33,12 +33,12 @@ | |||
33 | * Not used for the kernel but here seems to be the right place. | 33 | * Not used for the kernel but here seems to be the right place. |
34 | */ | 34 | */ |
35 | #ifdef __PIC__ | 35 | #ifdef __PIC__ |
36 | #define CPRESTORE(register) \ | 36 | #define CPRESTORE(register) \ |
37 | .cprestore register | 37 | .cprestore register |
38 | #define CPADD(register) \ | 38 | #define CPADD(register) \ |
39 | .cpadd register | 39 | .cpadd register |
40 | #define CPLOAD(register) \ | 40 | #define CPLOAD(register) \ |
41 | .cpload register | 41 | .cpload register |
42 | #else | 42 | #else |
43 | #define CPRESTORE(register) | 43 | #define CPRESTORE(register) |
44 | #define CPADD(register) | 44 | #define CPADD(register) |
@@ -48,35 +48,35 @@ | |||
48 | /* | 48 | /* |
49 | * LEAF - declare leaf routine | 49 | * LEAF - declare leaf routine |
50 | */ | 50 | */ |
51 | #define LEAF(symbol) \ | 51 | #define LEAF(symbol) \ |
52 | .globl symbol; \ | 52 | .globl symbol; \ |
53 | .align 2; \ | 53 | .align 2; \ |
54 | .type symbol, @function; \ | 54 | .type symbol, @function; \ |
55 | .ent symbol, 0; \ | 55 | .ent symbol, 0; \ |
56 | symbol: .frame sp, 0, ra | 56 | symbol: .frame sp, 0, ra |
57 | 57 | ||
58 | /* | 58 | /* |
59 | * NESTED - declare nested routine entry point | 59 | * NESTED - declare nested routine entry point |
60 | */ | 60 | */ |
61 | #define NESTED(symbol, framesize, rpc) \ | 61 | #define NESTED(symbol, framesize, rpc) \ |
62 | .globl symbol; \ | 62 | .globl symbol; \ |
63 | .align 2; \ | 63 | .align 2; \ |
64 | .type symbol, @function; \ | 64 | .type symbol, @function; \ |
65 | .ent symbol, 0; \ | 65 | .ent symbol, 0; \ |
66 | symbol: .frame sp, framesize, rpc | 66 | symbol: .frame sp, framesize, rpc |
67 | 67 | ||
68 | /* | 68 | /* |
69 | * END - mark end of function | 69 | * END - mark end of function |
70 | */ | 70 | */ |
71 | #define END(function) \ | 71 | #define END(function) \ |
72 | .end function; \ | 72 | .end function; \ |
73 | .size function, .-function | 73 | .size function, .-function |
74 | 74 | ||
75 | /* | 75 | /* |
76 | * EXPORT - export definition of symbol | 76 | * EXPORT - export definition of symbol |
77 | */ | 77 | */ |
78 | #define EXPORT(symbol) \ | 78 | #define EXPORT(symbol) \ |
79 | .globl symbol; \ | 79 | .globl symbol; \ |
80 | symbol: | 80 | symbol: |
81 | 81 | ||
82 | /* | 82 | /* |
@@ -90,16 +90,16 @@ symbol: | |||
90 | /* | 90 | /* |
91 | * ABS - export absolute symbol | 91 | * ABS - export absolute symbol |
92 | */ | 92 | */ |
93 | #define ABS(symbol,value) \ | 93 | #define ABS(symbol,value) \ |
94 | .globl symbol; \ | 94 | .globl symbol; \ |
95 | symbol = value | 95 | symbol = value |
96 | 96 | ||
97 | #define PANIC(msg) \ | 97 | #define PANIC(msg) \ |
98 | .set push; \ | 98 | .set push; \ |
99 | .set reorder; \ | 99 | .set reorder; \ |
100 | PTR_LA a0, 8f; \ | 100 | PTR_LA a0, 8f; \ |
101 | jal panic; \ | 101 | jal panic; \ |
102 | 9: b 9b; \ | 102 | 9: b 9b; \ |
103 | .set pop; \ | 103 | .set pop; \ |
104 | TEXT(msg) | 104 | TEXT(msg) |
105 | 105 | ||
@@ -107,31 +107,31 @@ symbol = value | |||
107 | * Print formatted string | 107 | * Print formatted string |
108 | */ | 108 | */ |
109 | #ifdef CONFIG_PRINTK | 109 | #ifdef CONFIG_PRINTK |
110 | #define PRINT(string) \ | 110 | #define PRINT(string) \ |
111 | .set push; \ | 111 | .set push; \ |
112 | .set reorder; \ | 112 | .set reorder; \ |
113 | PTR_LA a0, 8f; \ | 113 | PTR_LA a0, 8f; \ |
114 | jal printk; \ | 114 | jal printk; \ |
115 | .set pop; \ | 115 | .set pop; \ |
116 | TEXT(string) | 116 | TEXT(string) |
117 | #else | 117 | #else |
118 | #define PRINT(string) | 118 | #define PRINT(string) |
119 | #endif | 119 | #endif |
120 | 120 | ||
121 | #define TEXT(msg) \ | 121 | #define TEXT(msg) \ |
122 | .pushsection .data; \ | 122 | .pushsection .data; \ |
123 | 8: .asciiz msg; \ | 123 | 8: .asciiz msg; \ |
124 | .popsection; | 124 | .popsection; |
125 | 125 | ||
126 | /* | 126 | /* |
127 | * Build text tables | 127 | * Build text tables |
128 | */ | 128 | */ |
129 | #define TTABLE(string) \ | 129 | #define TTABLE(string) \ |
130 | .pushsection .text; \ | 130 | .pushsection .text; \ |
131 | .word 1f; \ | 131 | .word 1f; \ |
132 | .popsection \ | 132 | .popsection \ |
133 | .pushsection .data; \ | 133 | .pushsection .data; \ |
134 | 1: .asciiz string; \ | 134 | 1: .asciiz string; \ |
135 | .popsection | 135 | .popsection |
136 | 136 | ||
137 | /* | 137 | /* |
@@ -143,13 +143,13 @@ symbol = value | |||
143 | */ | 143 | */ |
144 | #ifdef CONFIG_CPU_HAS_PREFETCH | 144 | #ifdef CONFIG_CPU_HAS_PREFETCH |
145 | 145 | ||
146 | #define PREF(hint,addr) \ | 146 | #define PREF(hint,addr) \ |
147 | .set push; \ | 147 | .set push; \ |
148 | .set mips4; \ | 148 | .set mips4; \ |
149 | pref hint, addr; \ | 149 | pref hint, addr; \ |
150 | .set pop | 150 | .set pop |
151 | 151 | ||
152 | #define PREFX(hint,addr) \ | 152 | #define PREFX(hint,addr) \ |
153 | .set push; \ | 153 | .set push; \ |
154 | .set mips4; \ | 154 | .set mips4; \ |
155 | prefx hint, addr; \ | 155 | prefx hint, addr; \ |
@@ -166,42 +166,42 @@ symbol = value | |||
166 | * MIPS ISA IV/V movn/movz instructions and equivalents for older CPUs. | 166 | * MIPS ISA IV/V movn/movz instructions and equivalents for older CPUs. |
167 | */ | 167 | */ |
168 | #if (_MIPS_ISA == _MIPS_ISA_MIPS1) | 168 | #if (_MIPS_ISA == _MIPS_ISA_MIPS1) |
169 | #define MOVN(rd, rs, rt) \ | 169 | #define MOVN(rd, rs, rt) \ |
170 | .set push; \ | 170 | .set push; \ |
171 | .set reorder; \ | 171 | .set reorder; \ |
172 | beqz rt, 9f; \ | 172 | beqz rt, 9f; \ |
173 | move rd, rs; \ | 173 | move rd, rs; \ |
174 | .set pop; \ | 174 | .set pop; \ |
175 | 9: | 175 | 9: |
176 | #define MOVZ(rd, rs, rt) \ | 176 | #define MOVZ(rd, rs, rt) \ |
177 | .set push; \ | 177 | .set push; \ |
178 | .set reorder; \ | 178 | .set reorder; \ |
179 | bnez rt, 9f; \ | 179 | bnez rt, 9f; \ |
180 | move rd, rs; \ | 180 | move rd, rs; \ |
181 | .set pop; \ | 181 | .set pop; \ |
182 | 9: | 182 | 9: |
183 | #endif /* _MIPS_ISA == _MIPS_ISA_MIPS1 */ | 183 | #endif /* _MIPS_ISA == _MIPS_ISA_MIPS1 */ |
184 | #if (_MIPS_ISA == _MIPS_ISA_MIPS2) || (_MIPS_ISA == _MIPS_ISA_MIPS3) | 184 | #if (_MIPS_ISA == _MIPS_ISA_MIPS2) || (_MIPS_ISA == _MIPS_ISA_MIPS3) |
185 | #define MOVN(rd, rs, rt) \ | 185 | #define MOVN(rd, rs, rt) \ |
186 | .set push; \ | 186 | .set push; \ |
187 | .set noreorder; \ | 187 | .set noreorder; \ |
188 | bnezl rt, 9f; \ | 188 | bnezl rt, 9f; \ |
189 | move rd, rs; \ | 189 | move rd, rs; \ |
190 | .set pop; \ | 190 | .set pop; \ |
191 | 9: | 191 | 9: |
192 | #define MOVZ(rd, rs, rt) \ | 192 | #define MOVZ(rd, rs, rt) \ |
193 | .set push; \ | 193 | .set push; \ |
194 | .set noreorder; \ | 194 | .set noreorder; \ |
195 | beqzl rt, 9f; \ | 195 | beqzl rt, 9f; \ |
196 | move rd, rs; \ | 196 | move rd, rs; \ |
197 | .set pop; \ | 197 | .set pop; \ |
198 | 9: | 198 | 9: |
199 | #endif /* (_MIPS_ISA == _MIPS_ISA_MIPS2) || (_MIPS_ISA == _MIPS_ISA_MIPS3) */ | 199 | #endif /* (_MIPS_ISA == _MIPS_ISA_MIPS2) || (_MIPS_ISA == _MIPS_ISA_MIPS3) */ |
200 | #if (_MIPS_ISA == _MIPS_ISA_MIPS4 ) || (_MIPS_ISA == _MIPS_ISA_MIPS5) || \ | 200 | #if (_MIPS_ISA == _MIPS_ISA_MIPS4 ) || (_MIPS_ISA == _MIPS_ISA_MIPS5) || \ |
201 | (_MIPS_ISA == _MIPS_ISA_MIPS32) || (_MIPS_ISA == _MIPS_ISA_MIPS64) | 201 | (_MIPS_ISA == _MIPS_ISA_MIPS32) || (_MIPS_ISA == _MIPS_ISA_MIPS64) |
202 | #define MOVN(rd, rs, rt) \ | 202 | #define MOVN(rd, rs, rt) \ |
203 | movn rd, rs, rt | 203 | movn rd, rs, rt |
204 | #define MOVZ(rd, rs, rt) \ | 204 | #define MOVZ(rd, rs, rt) \ |
205 | movz rd, rs, rt | 205 | movz rd, rs, rt |
206 | #endif /* MIPS IV, MIPS V, MIPS32 or MIPS64 */ | 206 | #endif /* MIPS IV, MIPS V, MIPS32 or MIPS64 */ |
207 | 207 | ||