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 8 #ifndef _ASM_BITS_BYTESWAP_H 9 #define _ASM_BITS_BYTESWAP_H 1 10 11 #ifdef __Xswape /* gcc defined if -mswape is enabled */ 12 13 #define __bswap_non_constant_32(x) \ 14 __extension__ \ 15 ({ unsigned int __bswap_32_v = x; \ 16 __asm__ ("swape %0, %0" : "+r" (__bswap_32_v)); \ 17 __bswap_32_v; }) 18 19 #endif /* __Xswape */ 20 21 #endif /* _ASM_BITS_BYTESWAP_H */ 22 23 #include <bits/byteswap-common.h> 24