aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/include
diff options
context:
space:
mode:
authorDavid Daney <ddaney@caviumnetworks.com>2010-07-23 21:41:41 -0400
committerRalf Baechle <ralf@linux-mips.org>2010-08-05 08:26:20 -0400
commitde6d5b555c1887b5b9b59854a45ebd4805fb4b39 (patch)
tree6f99e2f60a21a7ed4de851942ca4925b16ebb250 /arch/mips/include
parentca148125e6134de334b61822539d220794d8da18 (diff)
MIPS: uasm: Add drotr32 and uasm_i_drotr_safe.
Signed-off-by: David Daney <ddaney@caviumnetworks.com> To: linux-mips@linux-mips.org To: wim@iguana.be Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/1495/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/include')
-rw-r--r--arch/mips/include/asm/uasm.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/mips/include/asm/uasm.h b/arch/mips/include/asm/uasm.h
index 697e40c06497..3964b2e6c7d6 100644
--- a/arch/mips/include/asm/uasm.h
+++ b/arch/mips/include/asm/uasm.h
@@ -71,6 +71,7 @@ Ip_u2u1u3(_dsra);
71Ip_u2u1u3(_dsrl); 71Ip_u2u1u3(_dsrl);
72Ip_u2u1u3(_dsrl32); 72Ip_u2u1u3(_dsrl32);
73Ip_u2u1u3(_drotr); 73Ip_u2u1u3(_drotr);
74Ip_u2u1u3(_drotr32);
74Ip_u3u1u2(_dsubu); 75Ip_u3u1u2(_dsubu);
75Ip_0(_eret); 76Ip_0(_eret);
76Ip_u1(_j); 77Ip_u1(_j);
@@ -176,6 +177,15 @@ static inline void uasm_i_dsrl_safe(u32 **p, unsigned int a1,
176 uasm_i_dsrl32(p, a1, a2, a3 - 32); 177 uasm_i_dsrl32(p, a1, a2, a3 - 32);
177} 178}
178 179
180static inline void uasm_i_drotr_safe(u32 **p, unsigned int a1,
181 unsigned int a2, unsigned int a3)
182{
183 if (a3 < 32)
184 uasm_i_drotr(p, a1, a2, a3);
185 else
186 uasm_i_drotr32(p, a1, a2, a3 - 32);
187}
188
179static inline void uasm_i_dsll_safe(u32 **p, unsigned int a1, 189static inline void uasm_i_dsll_safe(u32 **p, unsigned int a1,
180 unsigned int a2, unsigned int a3) 190 unsigned int a2, unsigned int a3)
181{ 191{