aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/asm-sh/byteorder.h15
-rw-r--r--include/asm-sh/posix_types.h6
2 files changed, 13 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));
diff --git a/include/asm-sh/posix_types.h b/include/asm-sh/posix_types.h
index 4b9d11c9fc77..4eeb723aee7e 100644
--- a/include/asm-sh/posix_types.h
+++ b/include/asm-sh/posix_types.h
@@ -4,4 +4,10 @@
4# else 4# else
5# include "posix_types_64.h" 5# include "posix_types_64.h"
6# endif 6# endif
7#else
8# ifdef __SH5__
9# include "posix_types_64.h"
10# else
11# include "posix_types_32.h"
12# endif
7#endif /* __KERNEL__ */ 13#endif /* __KERNEL__ */