10#if !defined __X86INTRIN_H && !defined __IMMINTRIN_H
11#error "Never use <lzcntintrin.h> directly; include <x86intrin.h> instead."
14#ifndef __LZCNTINTRIN_H
15#define __LZCNTINTRIN_H
18#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("lzcnt")))
31#define __lzcnt16(X) __builtin_ia32_lzcnt_u16((unsigned short)(X))
48 return __builtin_ia32_lzcnt_u32(__X);
65 return __builtin_ia32_lzcnt_u32(__X);
81#define __lzcnt64(X) __builtin_ia32_lzcnt_u64((unsigned long long)(X))
96_lzcnt_u64(
unsigned long long __X)
98 return __builtin_ia32_lzcnt_u64(__X);
102#undef __DEFAULT_FN_ATTRS
static __inline__ unsigned int __DEFAULT_FN_ATTRS __lzcnt32(unsigned int __X)
Counts the number of leading zero bits in the operand.
static __inline__ unsigned int __DEFAULT_FN_ATTRS _lzcnt_u32(unsigned int __X)
Counts the number of leading zero bits in the operand.
#define __DEFAULT_FN_ATTRS