1<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> 2<html> 3<!-- This file documents the GNU Assembler "as". 4 5Copyright (C) 1991-2021 Free Software Foundation, Inc. 6 7Permission is granted to copy, distribute and/or modify this document 8under the terms of the GNU Free Documentation License, Version 1.3 9or any later version published by the Free Software Foundation; 10with no Invariant Sections, with no Front-Cover Texts, and with no 11Back-Cover Texts. A copy of the license is included in the 12section entitled "GNU Free Documentation License". 13 --> 14<!-- Created by GNU Texinfo 5.1, http://www.gnu.org/software/texinfo/ --> 15<head> 16<title>Using as: Bundle directives</title> 17 18<meta name="description" content="Using as: Bundle directives"> 19<meta name="keywords" content="Using as: Bundle directives"> 20<meta name="resource-type" content="document"> 21<meta name="distribution" content="global"> 22<meta name="Generator" content="makeinfo"> 23<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 24<link href="index.html#Top" rel="start" title="Top"> 25<link href="AS-Index.html#AS-Index" rel="index" title="AS Index"> 26<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents"> 27<link href="Pseudo-Ops.html#Pseudo-Ops" rel="up" title="Pseudo Ops"> 28<link href="Byte.html#Byte" rel="next" title="Byte"> 29<link href="Balign.html#Balign" rel="previous" title="Balign"> 30<style type="text/css"> 31<!-- 32a.summary-letter {text-decoration: none} 33blockquote.smallquotation {font-size: smaller} 34div.display {margin-left: 3.2em} 35div.example {margin-left: 3.2em} 36div.indentedblock {margin-left: 3.2em} 37div.lisp {margin-left: 3.2em} 38div.smalldisplay {margin-left: 3.2em} 39div.smallexample {margin-left: 3.2em} 40div.smallindentedblock {margin-left: 3.2em; font-size: smaller} 41div.smalllisp {margin-left: 3.2em} 42kbd {font-style:oblique} 43pre.display {font-family: inherit} 44pre.format {font-family: inherit} 45pre.menu-comment {font-family: serif} 46pre.menu-preformatted {font-family: serif} 47pre.smalldisplay {font-family: inherit; font-size: smaller} 48pre.smallexample {font-size: smaller} 49pre.smallformat {font-family: inherit; font-size: smaller} 50pre.smalllisp {font-size: smaller} 51span.nocodebreak {white-space:nowrap} 52span.nolinebreak {white-space:nowrap} 53span.roman {font-family:serif; font-weight:normal} 54span.sansserif {font-family:sans-serif; font-weight:normal} 55ul.no-bullet {list-style: none} 56--> 57</style> 58 59 60</head> 61 62<body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000"> 63<a name="Bundle-directives"></a> 64<div class="header"> 65<p> 66Next: <a href="Byte.html#Byte" accesskey="n" rel="next">Byte</a>, Previous: <a href="Balign.html#Balign" accesskey="p" rel="previous">Balign</a>, Up: <a href="Pseudo-Ops.html#Pseudo-Ops" accesskey="u" rel="up">Pseudo Ops</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="AS-Index.html#AS-Index" title="Index" rel="index">Index</a>]</p> 67</div> 68<hr> 69<a name="Bundle-directives-1"></a> 70<h3 class="section">7.9 Bundle directives</h3> 71<a name="g_t_002ebundle_005falign_005fmode-abs_002dexpr"></a> 72<h4 class="subsection">7.9.1 <code>.bundle_align_mode <var>abs-expr</var></code></h4> 73<a name="index-bundle_005falign_005fmode-directive"></a> 74<a name="index-bundle"></a> 75<a name="index-instruction-bundle"></a> 76<a name="index-aligned-instruction-bundle"></a> 77<p><code>.bundle_align_mode</code> enables or disables <em>aligned instruction 78bundle</em> mode. In this mode, sequences of adjacent instructions are grouped 79into fixed-sized <em>bundles</em>. If the argument is zero, this mode is 80disabled (which is the default state). If the argument it not zero, it 81gives the size of an instruction bundle as a power of two (as for the 82<code>.p2align</code> directive, see <a href="P2align.html#P2align">P2align</a>). 83</p> 84<p>For some targets, it’s an ABI requirement that no instruction may span a 85certain aligned boundary. A <em>bundle</em> is simply a sequence of 86instructions that starts on an aligned boundary. For example, if 87<var>abs-expr</var> is <code>5</code> then the bundle size is 32, so each aligned 88chunk of 32 bytes is a bundle. When aligned instruction bundle mode is in 89effect, no single instruction may span a boundary between bundles. If an 90instruction would start too close to the end of a bundle for the length of 91that particular instruction to fit within the bundle, then the space at the 92end of that bundle is filled with no-op instructions so the instruction 93starts in the next bundle. As a corollary, it’s an error if any single 94instruction’s encoding is longer than the bundle size. 95</p> 96<a name="g_t_002ebundle_005flock-and-_002ebundle_005funlock"></a> 97<h4 class="subsection">7.9.2 <code>.bundle_lock</code> and <code>.bundle_unlock</code></h4> 98<a name="index-bundle_005flock-directive"></a> 99<a name="index-bundle_005funlock-directive"></a> 100<p>The <code>.bundle_lock</code> and directive <code>.bundle_unlock</code> directives 101allow explicit control over instruction bundle padding. These directives 102are only valid when <code>.bundle_align_mode</code> has been used to enable 103aligned instruction bundle mode. It’s an error if they appear when 104<code>.bundle_align_mode</code> has not been used at all, or when the last 105directive was <code><span class="nolinebreak">.bundle_align_mode</span> 0</code><!-- /@w -->. 106</p> 107<a name="index-bundle_002dlocked"></a> 108<p>For some targets, it’s an ABI requirement that certain instructions may 109appear only as part of specified permissible sequences of multiple 110instructions, all within the same bundle. A pair of <code>.bundle_lock</code> 111and <code>.bundle_unlock</code> directives define a <em>bundle-locked</em> 112instruction sequence. For purposes of aligned instruction bundle mode, a 113sequence starting with <code>.bundle_lock</code> and ending with 114<code>.bundle_unlock</code> is treated as a single instruction. That is, the 115entire sequence must fit into a single bundle and may not span a bundle 116boundary. If necessary, no-op instructions will be inserted before the 117first instruction of the sequence so that the whole sequence starts on an 118aligned bundle boundary. It’s an error if the sequence is longer than the 119bundle size. 120</p> 121<p>For convenience when using <code>.bundle_lock</code> and <code>.bundle_unlock</code> 122inside assembler macros (see <a href="Macro.html#Macro">Macro</a>), bundle-locked sequences may be 123nested. That is, a second <code>.bundle_lock</code> directive before the next 124<code>.bundle_unlock</code> directive has no effect except that it must be 125matched by another closing <code>.bundle_unlock</code> so that there is the 126same number of <code>.bundle_lock</code> and <code>.bundle_unlock</code> directives. 127</p> 128<hr> 129<div class="header"> 130<p> 131Next: <a href="Byte.html#Byte" accesskey="n" rel="next">Byte</a>, Previous: <a href="Balign.html#Balign" accesskey="p" rel="previous">Balign</a>, Up: <a href="Pseudo-Ops.html#Pseudo-Ops" accesskey="u" rel="up">Pseudo Ops</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="AS-Index.html#AS-Index" title="Index" rel="index">Index</a>]</p> 132</div> 133 134 135 136</body> 137</html> 138