byteorder.h 563 B

123456789101112131415161718192021222324252627
  1. #ifndef _M68KNOMMU_BYTEORDER_H
  2. #define _M68KNOMMU_BYTEORDER_H
  3. #include <linux/types.h>
  4. #if defined(__GNUC__) && !defined(__STRICT_ANSI__) || defined(__KERNEL__)
  5. # define __BYTEORDER_HAS_U64__
  6. # define __SWAB_64_THRU_32__
  7. #endif
  8. #if defined (__mcfisaaplus__) || defined (__mcfisac__)
  9. static inline __attribute_const__ __u32 ___arch__swab32(__u32 val)
  10. {
  11. asm(
  12. "byterev %0"
  13. : "=d" (val)
  14. : "0" (val)
  15. );
  16. return val;
  17. }
  18. #define __arch__swab32(x) ___arch__swab32(x)
  19. #endif
  20. #include <linux/byteorder/big_endian.h>
  21. #endif /* _M68KNOMMU_BYTEORDER_H */