diff options
Diffstat (limited to 'hwpf/include/utils.H')
-rw-r--r-- | hwpf/include/utils.H | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/hwpf/include/utils.H b/hwpf/include/utils.H index 17635e18..71a666bc 100644 --- a/hwpf/include/utils.H +++ b/hwpf/include/utils.H @@ -49,10 +49,14 @@ #endif // __ASSEMBLER /// Create a multi-bit mask of \a n bits starting at bit \a b -#define BITS(b, n) ((ULL(0xffffffffffffffff) << (64 - (n))) >> (b)) +#ifndef BITS + #define BITS(b, n) ((ULL(0xffffffffffffffff) << (64 - (n))) >> (b)) +#endif /// Create a single bit mask at bit \a b -#define BIT(b) BITS((b), 1) +#ifndef BIT + #define BIT(b) BITS((b), 1) +#endif #ifdef _BIG_ENDIAN |