You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

102 lines
5.5 KiB
HTML

<html lang="en">
<head>
<title>Bundle directives - Using as</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Using as">
<meta name="generator" content="makeinfo 4.13">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Pseudo-Ops.html#Pseudo-Ops" title="Pseudo Ops">
<link rel="prev" href="Balign.html#Balign" title="Balign">
<link rel="next" href="Byte.html#Byte" title="Byte">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
This file documents the GNU Assembler "as".
Copyright (C) 1991-2015 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3
or any later version published by the Free Software Foundation;
with no Invariant Sections, with no Front-Cover Texts, and with no
Back-Cover Texts. A copy of the license is included in the
section entitled ``GNU Free Documentation License''.
-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<a name="Bundle-directives"></a>
<p>
Next:&nbsp;<a rel="next" accesskey="n" href="Byte.html#Byte">Byte</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="Balign.html#Balign">Balign</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="Pseudo-Ops.html#Pseudo-Ops">Pseudo Ops</a>
<hr>
</div>
<h3 class="section">7.8 Bundle directives</h3>
<h4 class="subsection">7.8.1 <code>.bundle_align_mode </code><var>abs-expr</var></h4>
<p><a name="index-g_t_0040code_007bbundle_005falign_005fmode_007d-directive-290"></a><a name="index-bundle-291"></a><a name="index-instruction-bundle-292"></a><a name="index-aligned-instruction-bundle-293"></a><code>.bundle_align_mode</code> enables or disables <dfn>aligned instruction
bundle</dfn> mode. In this mode, sequences of adjacent instructions are grouped
into fixed-sized <dfn>bundles</dfn>. 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
<code>.p2align</code> directive, see <a href="P2align.html#P2align">P2align</a>).
<p>For some targets, it's an ABI requirement that no instruction may span a
certain aligned boundary. A <dfn>bundle</dfn> is simply a sequence of
instructions that starts on an aligned boundary. For example, if
<var>abs-expr</var> is <code>5</code> 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, it's an error if any single
instruction's encoding is longer than the bundle size.
<h4 class="subsection">7.8.2 <code>.bundle_lock</code> and <code>.bundle_unlock</code></h4>
<p><a name="index-g_t_0040code_007bbundle_005flock_007d-directive-294"></a><a name="index-g_t_0040code_007bbundle_005funlock_007d-directive-295"></a>The <code>.bundle_lock</code> and directive <code>.bundle_unlock</code> directives
allow explicit control over instruction bundle padding. These directives
are only valid when <code>.bundle_align_mode</code> has been used to enable
aligned instruction bundle mode. It's an error if they appear when
<code>.bundle_align_mode</code> has not been used at all, or when the last
directive was <code>.bundle_align_mode&nbsp;0</code><!-- /@w -->.
<p><a name="index-bundle_002dlocked-296"></a>For some targets, it's 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 <code>.bundle_lock</code>
and <code>.bundle_unlock</code> directives define a <dfn>bundle-locked</dfn>
instruction sequence. For purposes of aligned instruction bundle mode, a
sequence starting with <code>.bundle_lock</code> and ending with
<code>.bundle_unlock</code> 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. It's an error if the sequence is longer than the
bundle size.
<p>For convenience when using <code>.bundle_lock</code> and <code>.bundle_unlock</code>
inside assembler macros (see <a href="Macro.html#Macro">Macro</a>), bundle-locked sequences may be
nested. That is, a second <code>.bundle_lock</code> directive before the next
<code>.bundle_unlock</code> directive has no effect except that it must be
matched by another closing <code>.bundle_unlock</code> so that there is the
same number of <code>.bundle_lock</code> and <code>.bundle_unlock</code> directives.
</body></html>