1 /* SPDX-License-Identifier: GPL-2.0 */ 1 2 #ifndef __MIPS_ASM_BITREV_H__ 3 #define __MIPS_ASM_BITREV_H__ 4 5 #include <linux/swab.h> 6 7 static __always_inline __attribute_const__ u32 8 { 9 u32 ret; 10 11 asm("bitswap %0, %1" : "=r"(ret) : 12 return ret; 13 } 14 15 static __always_inline __attribute_const__ u16 16 { 17 u16 ret; 18 19 asm("bitswap %0, %1" : "=r"(ret) : 20 return ret; 21 } 22 23 static __always_inline __attribute_const__ u8 24 { 25 u8 ret; 26 27 asm("bitswap %0, %1" : "=r"(ret) : 28 return ret; 29 } 30 31 #endif /* __MIPS_ASM_BITREV_H__ */ 32
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.