aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-sh/byteorder.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-sh/byteorder.h')
-rw-r--r--include/asm-sh/byteorder.h15
1 files changed, 7 insertions, 8 deletions
diff --git a/include/asm-sh/byteorder.h b/include/asm-sh/byteorder.h
index 0eb9904b6545..4c13e6117563 100644
--- a/include/asm-sh/byteorder.h
+++ b/include/asm-sh/byteorder.h
@@ -11,13 +11,13 @@
11static inline __attribute_const__ __u32 ___arch__swab32(__u32 x) 11static inline __attribute_const__ __u32 ___arch__swab32(__u32 x)
12{ 12{
13 __asm__( 13 __asm__(
14#ifdef CONFIG_SUPERH32 14#ifdef __SH5__
15 "byterev %0, %0\n\t"
16 "shari %0, 32, %0"
17#else
15 "swap.b %0, %0\n\t" 18 "swap.b %0, %0\n\t"
16 "swap.w %0, %0\n\t" 19 "swap.w %0, %0\n\t"
17 "swap.b %0, %0" 20 "swap.b %0, %0"
18#else
19 "byterev %0, %0\n\t"
20 "shari %0, 32, %0"
21#endif 21#endif
22 : "=r" (x) 22 : "=r" (x)
23 : "0" (x)); 23 : "0" (x));
@@ -28,12 +28,11 @@ static inline __attribute_const__ __u32 ___arch__swab32(__u32 x)
28static inline __attribute_const__ __u16 ___arch__swab16(__u16 x) 28static inline __attribute_const__ __u16 ___arch__swab16(__u16 x)
29{ 29{
30 __asm__( 30 __asm__(
31#ifdef CONFIG_SUPERH32 31#ifdef __SH5__
32 "swap.b %0, %0"
33#else
34 "byterev %0, %0\n\t" 32 "byterev %0, %0\n\t"
35 "shari %0, 32, %0" 33 "shari %0, 32, %0"
36 34#else
35 "swap.b %0, %0"
37#endif 36#endif
38 : "=r" (x) 37 : "=r" (x)
39 : "0" (x)); 38 : "0" (x));