diff options
-rw-r--r-- | arch/mips/include/asm/uasm.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/arch/mips/include/asm/uasm.h b/arch/mips/include/asm/uasm.h index 11a8b5252549..697e40c06497 100644 --- a/arch/mips/include/asm/uasm.h +++ b/arch/mips/include/asm/uasm.h | |||
@@ -167,6 +167,24 @@ static inline void __cpuinit uasm_l##lb(struct uasm_label **lab, u32 *addr) \ | |||
167 | #define uasm_i_ssnop(buf) uasm_i_sll(buf, 0, 0, 1) | 167 | #define uasm_i_ssnop(buf) uasm_i_sll(buf, 0, 0, 1) |
168 | #define uasm_i_ehb(buf) uasm_i_sll(buf, 0, 0, 3) | 168 | #define uasm_i_ehb(buf) uasm_i_sll(buf, 0, 0, 3) |
169 | 169 | ||
170 | static inline void uasm_i_dsrl_safe(u32 **p, unsigned int a1, | ||
171 | unsigned int a2, unsigned int a3) | ||
172 | { | ||
173 | if (a3 < 32) | ||
174 | uasm_i_dsrl(p, a1, a2, a3); | ||
175 | else | ||
176 | uasm_i_dsrl32(p, a1, a2, a3 - 32); | ||
177 | } | ||
178 | |||
179 | static inline void uasm_i_dsll_safe(u32 **p, unsigned int a1, | ||
180 | unsigned int a2, unsigned int a3) | ||
181 | { | ||
182 | if (a3 < 32) | ||
183 | uasm_i_dsll(p, a1, a2, a3); | ||
184 | else | ||
185 | uasm_i_dsll32(p, a1, a2, a3 - 32); | ||
186 | } | ||
187 | |||
170 | /* Handle relocations. */ | 188 | /* Handle relocations. */ |
171 | struct uasm_reloc { | 189 | struct uasm_reloc { |
172 | u32 *addr; | 190 | u32 *addr; |