Bundle-directives.html 7.1 KB

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