mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-26 11:53:53 -06:00
14 lines
444 B
C
14 lines
444 B
C
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
|
/* bits.h: Macros for dealing with bitmasks. */
|
|
|
|
#ifndef _LINUX_BITS_H
|
|
#define _LINUX_BITS_H
|
|
|
|
#define __GENMASK(h, l) (((~_UL(0)) << (l)) & (~_UL(0) >> (__BITS_PER_LONG - 1 - (h))))
|
|
|
|
#define __GENMASK_ULL(h, l) (((~_ULL(0)) << (l)) & (~_ULL(0) >> (__BITS_PER_LONG_LONG - 1 - (h))))
|
|
|
|
#define __GENMASK_U128(h, l) \
|
|
((_BIT128((h)) << 1) - (_BIT128(l)))
|
|
|
|
#endif /* _LINUX_BITS_H */
|