.bundle_align_mode enables or disables aligned instruction bundle mode. In this mode, sequences of adjacent instructions are grouped into fixed-sized bundles. If the argument is zero, this mode is disabled (which is the default state). If the argument it not zero, it gives the size of an instruction bundle as a power of two (as for the
.p2align directive, see P2align).
For some targets, its an ABI requirement that no instruction may span a certain aligned boundary. A bundle is simply a sequence of instructions that starts on an aligned boundary. For example, if abs-expr is
5 then the bundle size is 32, so each aligned chunk of 32 bytes is a bundle. When aligned instruction bundle mode is in effect, no single instruction may span a boundary between bundles. If an instruction would start too close to the end of a bundle for the length of that particular instruction to fit within the bundle, then the space at the end of that bundle is filled with no-op instructions so the instruction starts in the next bundle. As a corollary, its an error if any single instructions encoding is longer than the bundle size.
.bundle_lock and directive
.bundle_unlock directives allow explicit control over instruction bundle padding. These directives are only valid when
.bundle_align_mode has been used to enable aligned instruction bundle mode. Its an error if they appear when
.bundle_align_mode has not been used at all, or when the last directive was
For some targets, its an ABI requirement that certain instructions may appear only as part of specified permissible sequences of multiple instructions, all within the same bundle. A pair of
.bundle_unlock directives define a bundle-locked instruction sequence. For purposes of aligned instruction bundle mode, a sequence starting with
.bundle_lock and ending with
.bundle_unlock is treated as a single instruction. That is, the entire sequence must fit into a single bundle and may not span a bundle boundary. If necessary, no-op instructions will be inserted before the first instruction of the sequence so that the whole sequence starts on an aligned bundle boundary. Its an error if the sequence is longer than the bundle size.
For convenience when using
.bundle_unlock inside assembler macros (see Macro), bundle-locked sequences may be nested. That is, a second
.bundle_lock directive before the next
.bundle_unlock directive has no effect except that it must be matched by another closing
.bundle_unlock so that there is the same number of