byteswap.h 530 B

1234567891011121314151617181920212223
  1. /*
  2. * Copyright (C) 2013 Synopsys, Inc. (www.synopsys.com)
  3. *
  4. * Licensed under LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
  5. *
  6. */
  7. #ifndef _ASM_BITS_BYTESWAP_H
  8. #define _ASM_BITS_BYTESWAP_H 1
  9. #ifdef __Xswape /* gcc defined if -mswape is enabled */
  10. #define __bswap_non_constant_32(x) \
  11. __extension__ \
  12. ({ unsigned int __bswap_32_v = x; \
  13. __asm__ ("swape %0, %0" : "+r" (__bswap_32_v)); \
  14. __bswap_32_v; })
  15. #endif /* __Xswape */
  16. #endif /* _ASM_BITS_BYTESWAP_H */
  17. #include <bits/byteswap-common.h>