XenevaOS
Loading...
Searching...
No Matches
XenevaOS
BaseHdr
asm-generic
bitops
__bitrev.h
Go to the documentation of this file.
1
/*
2
* DCL asm-generic/bitops/__bitrev.h -- generic___bitrev{8,16,32}.
3
*
4
* linux/bitrev.h takes its #else branch (CONFIG_HAVE_ARCH_BITREVERSE is
5
* off) and aliases these names. clang's bit-reversal builtins are exact
6
* and constant-fold, matching the tables mainline ships.
7
*/
8
#ifndef _DCL_ASM_GENERIC_BITOPS___BITREV_H
9
#define _DCL_ASM_GENERIC_BITOPS___BITREV_H
10
11
#include <
linux/types.h
>
12
13
static
inline
u8
generic___bitrev8(
u8
byte
)
14
{
15
return
(
u8
)__builtin_bitreverse8(
byte
);
16
}
17
18
static
inline
u16
generic___bitrev16(
u16
word)
19
{
20
return
(
u16
)__builtin_bitreverse16(word);
21
}
22
23
static
inline
u32
generic___bitrev32(
u32
word)
24
{
25
return
__builtin_bitreverse32(word);
26
}
27
28
#endif
/* _DCL_ASM_GENERIC_BITOPS___BITREV_H */
types.h
u8
uint8_t u8
Definition
kernel.h:14
u16
uint16_t u16
Definition
kernel.h:15
u32
uint32_t u32
Definition
kernel.h:16
Generated by
1.9.8