Fuad Tabba | 77c0d54 | 2020-09-23 15:16:37 +0100 | [diff] [blame^] | 1 | <html lang="en"> |
| 2 | <head> |
| 3 | <title>Bundle directives - Using as</title> |
| 4 | <meta http-equiv="Content-Type" content="text/html"> |
| 5 | <meta name="description" content="Using as"> |
| 6 | <meta name="generator" content="makeinfo 4.13"> |
| 7 | <link title="Top" rel="start" href="index.html#Top"> |
| 8 | <link rel="up" href="Pseudo-Ops.html#Pseudo-Ops" title="Pseudo Ops"> |
| 9 | <link rel="prev" href="Balign.html#Balign" title="Balign"> |
| 10 | <link rel="next" href="Byte.html#Byte" title="Byte"> |
| 11 | <link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage"> |
| 12 | <!-- |
| 13 | This file documents the GNU Assembler "as". |
| 14 | |
| 15 | Copyright (C) 1991-2019 Free Software Foundation, Inc. |
| 16 | |
| 17 | Permission is granted to copy, distribute and/or modify this document |
| 18 | under the terms of the GNU Free Documentation License, Version 1.3 |
| 19 | or any later version published by the Free Software Foundation; |
| 20 | with no Invariant Sections, with no Front-Cover Texts, and with no |
| 21 | Back-Cover Texts. A copy of the license is included in the |
| 22 | section entitled ``GNU Free Documentation License''. |
| 23 | |
| 24 | --> |
| 25 | <meta http-equiv="Content-Style-Type" content="text/css"> |
| 26 | <style type="text/css"><!-- |
| 27 | pre.display { font-family:inherit } |
| 28 | pre.format { font-family:inherit } |
| 29 | pre.smalldisplay { font-family:inherit; font-size:smaller } |
| 30 | pre.smallformat { font-family:inherit; font-size:smaller } |
| 31 | pre.smallexample { font-size:smaller } |
| 32 | pre.smalllisp { font-size:smaller } |
| 33 | span.sc { font-variant:small-caps } |
| 34 | span.roman { font-family:serif; font-weight:normal; } |
| 35 | span.sansserif { font-family:sans-serif; font-weight:normal; } |
| 36 | --></style> |
| 37 | </head> |
| 38 | <body> |
| 39 | <div class="node"> |
| 40 | <a name="Bundle-directives"></a> |
| 41 | <p> |
| 42 | Next: <a rel="next" accesskey="n" href="Byte.html#Byte">Byte</a>, |
| 43 | Previous: <a rel="previous" accesskey="p" href="Balign.html#Balign">Balign</a>, |
| 44 | Up: <a rel="up" accesskey="u" href="Pseudo-Ops.html#Pseudo-Ops">Pseudo Ops</a> |
| 45 | <hr> |
| 46 | </div> |
| 47 | |
| 48 | <h3 class="section">7.8 Bundle directives</h3> |
| 49 | |
| 50 | <h4 class="subsection">7.8.1 <code>.bundle_align_mode </code><var>abs-expr</var></h4> |
| 51 | |
| 52 | <p><a name="index-g_t_0040code_007bbundle_005falign_005fmode_007d-directive-292"></a><a name="index-bundle-293"></a><a name="index-instruction-bundle-294"></a><a name="index-aligned-instruction-bundle-295"></a><code>.bundle_align_mode</code> enables or disables <dfn>aligned instruction |
| 53 | bundle</dfn> mode. In this mode, sequences of adjacent instructions are grouped |
| 54 | into fixed-sized <dfn>bundles</dfn>. If the argument is zero, this mode is |
| 55 | disabled (which is the default state). If the argument it not zero, it |
| 56 | gives the size of an instruction bundle as a power of two (as for the |
| 57 | <code>.p2align</code> directive, see <a href="P2align.html#P2align">P2align</a>). |
| 58 | |
| 59 | <p>For some targets, it's an ABI requirement that no instruction may span a |
| 60 | certain aligned boundary. A <dfn>bundle</dfn> is simply a sequence of |
| 61 | instructions that starts on an aligned boundary. For example, if |
| 62 | <var>abs-expr</var> is <code>5</code> then the bundle size is 32, so each aligned |
| 63 | chunk of 32 bytes is a bundle. When aligned instruction bundle mode is in |
| 64 | effect, no single instruction may span a boundary between bundles. If an |
| 65 | instruction would start too close to the end of a bundle for the length of |
| 66 | that particular instruction to fit within the bundle, then the space at the |
| 67 | end of that bundle is filled with no-op instructions so the instruction |
| 68 | starts in the next bundle. As a corollary, it's an error if any single |
| 69 | instruction's encoding is longer than the bundle size. |
| 70 | |
| 71 | <h4 class="subsection">7.8.2 <code>.bundle_lock</code> and <code>.bundle_unlock</code></h4> |
| 72 | |
| 73 | <p><a name="index-g_t_0040code_007bbundle_005flock_007d-directive-296"></a><a name="index-g_t_0040code_007bbundle_005funlock_007d-directive-297"></a>The <code>.bundle_lock</code> and directive <code>.bundle_unlock</code> directives |
| 74 | allow explicit control over instruction bundle padding. These directives |
| 75 | are only valid when <code>.bundle_align_mode</code> has been used to enable |
| 76 | aligned instruction bundle mode. It's an error if they appear when |
| 77 | <code>.bundle_align_mode</code> has not been used at all, or when the last |
| 78 | directive was <code>.bundle_align_mode 0</code><!-- /@w -->. |
| 79 | |
| 80 | <p><a name="index-bundle_002dlocked-298"></a>For some targets, it's an ABI requirement that certain instructions may |
| 81 | appear only as part of specified permissible sequences of multiple |
| 82 | instructions, all within the same bundle. A pair of <code>.bundle_lock</code> |
| 83 | and <code>.bundle_unlock</code> directives define a <dfn>bundle-locked</dfn> |
| 84 | instruction sequence. For purposes of aligned instruction bundle mode, a |
| 85 | sequence starting with <code>.bundle_lock</code> and ending with |
| 86 | <code>.bundle_unlock</code> is treated as a single instruction. That is, the |
| 87 | entire sequence must fit into a single bundle and may not span a bundle |
| 88 | boundary. If necessary, no-op instructions will be inserted before the |
| 89 | first instruction of the sequence so that the whole sequence starts on an |
| 90 | aligned bundle boundary. It's an error if the sequence is longer than the |
| 91 | bundle size. |
| 92 | |
| 93 | <p>For convenience when using <code>.bundle_lock</code> and <code>.bundle_unlock</code> |
| 94 | inside assembler macros (see <a href="Macro.html#Macro">Macro</a>), bundle-locked sequences may be |
| 95 | nested. That is, a second <code>.bundle_lock</code> directive before the next |
| 96 | <code>.bundle_unlock</code> directive has no effect except that it must be |
| 97 | matched by another closing <code>.bundle_unlock</code> so that there is the |
| 98 | same number of <code>.bundle_lock</code> and <code>.bundle_unlock</code> directives. |
| 99 | |
| 100 | </body></html> |
| 101 | |