X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=include%2Fasm-sh%2Fbyteorder.h;h=4c13e61175632c3dc8f5a60712dda405eb177b66;hb=e2bf3cae515090fefe28329e71230dfe7ab873b1;hp=0eb9904b6545be3be0b7a99c6b258c25828fc2fa;hpb=c1f3ee120bb61045b1c0a3ead620d1d65af47130;p=linux-2.6 diff --git a/include/asm-sh/byteorder.h b/include/asm-sh/byteorder.h index 0eb9904b65..4c13e61175 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));