blob: 45eca517efb32180834f18be0163c8358df886a8 [file] [log] [blame]
Arnaldo Carvalho de Melobb970702016-07-12 11:12:18 -03001#ifndef __ASM_GENERIC_BITS_PER_LONG
2#define __ASM_GENERIC_BITS_PER_LONG
3
4#include <uapi/asm-generic/bitsperlong.h>
5
Arnaldo Carvalho de Melo2a00f022016-07-13 15:04:04 -03006#ifdef __SIZEOF_LONG__
Peter Zijlstrae81fcd42016-07-15 12:38:18 -03007#define BITS_PER_LONG (__CHAR_BIT__ * __SIZEOF_LONG__)
Arnaldo Carvalho de Melo2a00f022016-07-13 15:04:04 -03008#else
Peter Zijlstrae81fcd42016-07-15 12:38:18 -03009#define BITS_PER_LONG __WORDSIZE
Arnaldo Carvalho de Melo2a00f022016-07-13 15:04:04 -030010#endif
Arnaldo Carvalho de Melobb970702016-07-12 11:12:18 -030011
Arnaldo Carvalho de Melo2a00f022016-07-13 15:04:04 -030012#if BITS_PER_LONG != __BITS_PER_LONG
Arnaldo Carvalho de Melobb970702016-07-12 11:12:18 -030013#error Inconsistent word size. Check asm/bitsperlong.h
14#endif
15
16#ifndef BITS_PER_LONG_LONG
17#define BITS_PER_LONG_LONG 64
18#endif
19
20#endif /* __ASM_GENERIC_BITS_PER_LONG */