P99

◆ P99_HMASK

#define P99_HMASK (   N,
 
)    (P99_PASTE2(P00_MASK_, N)^P99_PASTE2(P00_MASK_, P99_MINUS(N, M)))

A mask for the higher M bits in an N bit word.

This is a generic implementation that should also work for the case that N is less than the width of unsigned, or in other words if the conversion rank of uintN_t is less than that for unsigned.

Precondition
N and M must evaluate to decimal constants by the preprocessor
N must be larger or equal than M
Remarks
this is only implemented for values N and M less than the width of uintmax_t.

Definition at line 1201 of file p99_int.h.