byteorder.h 404 B

1234567891011121314151617181920
  1. #ifndef _ASM_CRIS_ARCH_BYTEORDER_H
  2. #define _ASM_CRIS_ARCH_BYTEORDER_H
  3. #include <asm/types.h>
  4. extern __inline__ __const__ __u32
  5. ___arch__swab32(__u32 x)
  6. {
  7. __asm__ __volatile__ ("swapwb %0" : "=r" (x) : "0" (x));
  8. return (x);
  9. }
  10. extern __inline__ __const__ __u16
  11. ___arch__swab16(__u16 x)
  12. {
  13. __asm__ __volatile__ ("swapb %0" : "=r" (x) : "0" (x));
  14. return (x);
  15. }
  16. #endif /* _ASM_CRIS_ARCH_BYTEORDER_H */