VAX_002dbranch.html 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214
  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: VAX-branch</title>
  15. <meta name="description" content="Using as: VAX-branch">
  16. <meta name="keywords" content="Using as: VAX-branch">
  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="Vax_002dDependent.html#Vax_002dDependent" rel="up" title="Vax-Dependent">
  25. <link href="VAX_002doperands.html#VAX_002doperands" rel="next" title="VAX-operands">
  26. <link href="VAX_002dopcodes.html#VAX_002dopcodes" rel="prev" title="VAX-opcodes">
  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="VAX_002dbranch"></a>
  58. <div class="header">
  59. <p>
  60. Next: <a href="VAX_002doperands.html#VAX_002doperands" accesskey="n" rel="next">VAX-operands</a>, Previous: <a href="VAX_002dopcodes.html#VAX_002dopcodes" accesskey="p" rel="prev">VAX-opcodes</a>, Up: <a href="Vax_002dDependent.html#Vax_002dDependent" accesskey="u" rel="up">Vax-Dependent</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="VAX-Branch-Improvement"></a>
  64. <h4 class="subsection">9.49.5 VAX Branch Improvement</h4>
  65. <a name="index-VAX-branch-improvement"></a>
  66. <a name="index-branch-improvement_002c-VAX"></a>
  67. <a name="index-pseudo_002dops-for-branch_002c-VAX"></a>
  68. <p>Certain pseudo opcodes are permitted. They are for branch
  69. instructions. They expand to the shortest branch instruction that
  70. reaches the target. Generally these mnemonics are made by
  71. substituting &lsquo;<samp>j</samp>&rsquo; for &lsquo;<samp>b</samp>&rsquo; at the start of a DEC mnemonic.
  72. This feature is included both for compatibility and to help
  73. compilers. If you do not need this feature, avoid these
  74. opcodes. Here are the mnemonics, and the code they can expand into.
  75. </p>
  76. <dl compact="compact">
  77. <dt><code>jbsb</code></dt>
  78. <dd><p>&lsquo;<samp>Jsb</samp>&rsquo; is already an instruction mnemonic, so we chose &lsquo;<samp>jbsb</samp>&rsquo;.
  79. </p><dl compact="compact">
  80. <dt>(byte displacement)</dt>
  81. <dd><p><kbd>bsbb &hellip;</kbd>
  82. </p></dd>
  83. <dt>(word displacement)</dt>
  84. <dd><p><kbd>bsbw &hellip;</kbd>
  85. </p></dd>
  86. <dt>(long displacement)</dt>
  87. <dd><p><kbd>jsb &hellip;</kbd>
  88. </p></dd>
  89. </dl>
  90. </dd>
  91. <dt><code>jbr</code></dt>
  92. <dt><code>jr</code></dt>
  93. <dd><p>Unconditional branch.
  94. </p><dl compact="compact">
  95. <dt>(byte displacement)</dt>
  96. <dd><p><kbd>brb &hellip;</kbd>
  97. </p></dd>
  98. <dt>(word displacement)</dt>
  99. <dd><p><kbd>brw &hellip;</kbd>
  100. </p></dd>
  101. <dt>(long displacement)</dt>
  102. <dd><p><kbd>jmp &hellip;</kbd>
  103. </p></dd>
  104. </dl>
  105. </dd>
  106. <dt><code>j<var>COND</var></code></dt>
  107. <dd><p><var>COND</var> may be any one of the conditional branches
  108. <code>neq</code>, <code>nequ</code>, <code>eql</code>, <code>eqlu</code>, <code>gtr</code>,
  109. <code>geq</code>, <code>lss</code>, <code>gtru</code>, <code>lequ</code>, <code>vc</code>, <code>vs</code>,
  110. <code>gequ</code>, <code>cc</code>, <code>lssu</code>, <code>cs</code>.
  111. <var>COND</var> may also be one of the bit tests
  112. <code>bs</code>, <code>bc</code>, <code>bss</code>, <code>bcs</code>, <code>bsc</code>, <code>bcc</code>,
  113. <code>bssi</code>, <code>bcci</code>, <code>lbs</code>, <code>lbc</code>.
  114. <var>NOTCOND</var> is the opposite condition to <var>COND</var>.
  115. </p><dl compact="compact">
  116. <dt>(byte displacement)</dt>
  117. <dd><p><kbd>b<var>COND</var> &hellip;</kbd>
  118. </p></dd>
  119. <dt>(word displacement)</dt>
  120. <dd><p><kbd>b<var>NOTCOND</var> foo ; brw &hellip; ; foo:</kbd>
  121. </p></dd>
  122. <dt>(long displacement)</dt>
  123. <dd><p><kbd>b<var>NOTCOND</var> foo ; jmp &hellip; ; foo:</kbd>
  124. </p></dd>
  125. </dl>
  126. </dd>
  127. <dt><code>jacb<var>X</var></code></dt>
  128. <dd><p><var>X</var> may be one of <code>b d f g h l w</code>.
  129. </p><dl compact="compact">
  130. <dt>(word displacement)</dt>
  131. <dd><p><kbd><var>OPCODE</var> &hellip;</kbd>
  132. </p></dd>
  133. <dt>(long displacement)</dt>
  134. <dd><div class="example">
  135. <pre class="example"><var>OPCODE</var> &hellip;, foo ;
  136. brb bar ;
  137. foo: jmp &hellip; ;
  138. bar:
  139. </pre></div>
  140. </dd>
  141. </dl>
  142. </dd>
  143. <dt><code>jaob<var>YYY</var></code></dt>
  144. <dd><p><var>YYY</var> may be one of <code>lss leq</code>.
  145. </p></dd>
  146. <dt><code>jsob<var>ZZZ</var></code></dt>
  147. <dd><p><var>ZZZ</var> may be one of <code>geq gtr</code>.
  148. </p><dl compact="compact">
  149. <dt>(byte displacement)</dt>
  150. <dd><p><kbd><var>OPCODE</var> &hellip;</kbd>
  151. </p></dd>
  152. <dt>(word displacement)</dt>
  153. <dd><div class="example">
  154. <pre class="example"><var>OPCODE</var> &hellip;, foo ;
  155. brb bar ;
  156. foo: brw <var>destination</var> ;
  157. bar:
  158. </pre></div>
  159. </dd>
  160. <dt>(long displacement)</dt>
  161. <dd><div class="example">
  162. <pre class="example"><var>OPCODE</var> &hellip;, foo ;
  163. brb bar ;
  164. foo: jmp <var>destination</var> ;
  165. bar:
  166. </pre></div>
  167. </dd>
  168. </dl>
  169. </dd>
  170. <dt><code>aobleq</code></dt>
  171. <dt><code>aoblss</code></dt>
  172. <dt><code>sobgeq</code></dt>
  173. <dt><code>sobgtr</code></dt>
  174. <dd><dl compact="compact">
  175. <dt>(byte displacement)</dt>
  176. <dd><p><kbd><var>OPCODE</var> &hellip;</kbd>
  177. </p></dd>
  178. <dt>(word displacement)</dt>
  179. <dd><div class="example">
  180. <pre class="example"><var>OPCODE</var> &hellip;, foo ;
  181. brb bar ;
  182. foo: brw <var>destination</var> ;
  183. bar:
  184. </pre></div>
  185. </dd>
  186. <dt>(long displacement)</dt>
  187. <dd><div class="example">
  188. <pre class="example"><var>OPCODE</var> &hellip;, foo ;
  189. brb bar ;
  190. foo: jmp <var>destination</var> ;
  191. bar:
  192. </pre></div>
  193. </dd>
  194. </dl>
  195. </dd>
  196. </dl>
  197. <hr>
  198. <div class="header">
  199. <p>
  200. Next: <a href="VAX_002doperands.html#VAX_002doperands" accesskey="n" rel="next">VAX-operands</a>, Previous: <a href="VAX_002dopcodes.html#VAX_002dopcodes" accesskey="p" rel="prev">VAX-opcodes</a>, Up: <a href="Vax_002dDependent.html#Vax_002dDependent" accesskey="u" rel="up">Vax-Dependent</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>
  201. </div>
  202. </body>
  203. </html>