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 @@
static inline __attribute_const__ __u32 ___arch__swab32(__u32 x)
{
__asm__(
-#ifdef CONFIG_SUPERH32
+#ifdef __SH5__
+ "byterev %0, %0\n\t"
+ "shari %0, 32, %0"
+#else
"swap.b %0, %0\n\t"
"swap.w %0, %0\n\t"
"swap.b %0, %0"
-#else
- "byterev %0, %0\n\t"
- "shari %0, 32, %0"
#endif
: "=r" (x)
: "0" (x));
@@ -28,12 +28,11 @@ static inline __attribute_const__ __u32 ___arch__swab32(__u32 x)
static inline __attribute_const__ __u16 ___arch__swab16(__u16 x)
{
__asm__(
-#ifdef CONFIG_SUPERH32
- "swap.b %0, %0"
-#else
+#ifdef __SH5__
"byterev %0, %0\n\t"
"shari %0, 32, %0"
-
+#else
+ "swap.b %0, %0"
#endif
: "=r" (x)
: "0" (x));