> +/**
> + * Compress pointers into 32-bit offsets from base pointer.
> + *
> + * @note It is programmer's responsibility to ensure the resulting offsets
> fit
> + * into 32 bits. Alignment of the structures pointed to by the pointers
> allows
> + * us to drop bits from the offsets. This is co
> +#define BITS_REQUIRED_TO_STORE_VALUE(x) \
> + ((x) == 0 ? 1 : (sizeof(size_t) * CHAR_BIT - __builtin_clzl((size_t)x)))
> +
> +#define BIT_SHIFT_FROM_ALIGNMENT(x) ((x) == 0 ? 0 : __builtin_ctzl(x))
The two built-ins used are not available with MSVC.
Please see if you can find similar functio
2 matches
Mail list logo