X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=include%2Fasm-sh%2Fbyteorder.h;h=4c13e61175632c3dc8f5a60712dda405eb177b66;hb=ffd8211fb18e1052b2d9eded629cc3c0b872d06a;hp=0eb9904b6545be3be0b7a99c6b258c25828fc2fa;hpb=bd45ac0c5daae35e7c71138172e63df5cf644cf6;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));