5.7.7.7 Align-jumps Option

The -falign-jumps=n option aligns branch targets, where the targets can only be reached by jumping, to the next power of two greater than n. For instance, -falign-jumps=32 aligns targets to the next 32-byte boundary; -falign-jumps=24 aligns targets to the next 32-byte boundary but only if this can be done by skipping no more than 23 bytes.

The -fno-align-jumps form of this option is equivalent to -falign-jumps=1, which implies that the target is not aligned. If n is not specified or is zero, , a default of alignment of 1 byte is used, which implies that the target is not aligned. If n is not a power of 2, the alignment value is rounded up.

For instance, -falign-jumps=32 aligns targets to the next 32-byte boundary; -falign-jumps=24 aligns targets to the next 32-byte boundary but only if this can be done by skipping no more than 23 bytes.

This option is automatically enabled at optimization levels -O2 and -O3.

If the alignment values specified by -falign-labels is greater than that specified with this option, then its value is used to align jumps instead.