OpenOCD
align.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define ALIGN_DOWN(x, a)   ((x) & ~((typeof(x))(a) - 1))
 
#define ALIGN_MASK(x, mask)
 
#define ALIGN_UP(x, a)   ALIGN_MASK(x, (typeof(x))(a) - 1)
 
#define IS_ALIGNED(x, a)   (((x) & ((typeof(x))(a) - 1)) == 0)
 
#define IS_PWR_OF_2(x)
 

Macro Definition Documentation

◆ ALIGN_DOWN

#define ALIGN_DOWN (   x,
 
)    ((x) & ~((typeof(x))(a) - 1))

Definition at line 21 of file align.h.

◆ ALIGN_MASK

#define ALIGN_MASK (   x,
  mask 
)
Value:
({ \
typeof(mask) _mask = (mask); \
((x) + _mask) & ~_mask; \
})
int mask
Definition: esirisc.c:1698

Definition at line 13 of file align.h.

◆ ALIGN_UP

#define ALIGN_UP (   x,
 
)    ALIGN_MASK(x, (typeof(x))(a) - 1)

Definition at line 20 of file align.h.

◆ IS_ALIGNED

#define IS_ALIGNED (   x,
 
)    (((x) & ((typeof(x))(a) - 1)) == 0)

Definition at line 22 of file align.h.

◆ IS_PWR_OF_2

#define IS_PWR_OF_2 (   x)
Value:
({ \
typeof(x) _x = (x); \
_x == 0 || (_x & (_x - 1)) == 0; \
})

Definition at line 24 of file align.h.