toolchain/share/doc/as.html/VAX_002dbranch.html

132 lines
6.0 KiB
HTML
Raw Permalink Normal View History

2024-01-10 05:24:32 +00:00
<html lang="en">
<head>
<title>VAX-branch - 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="Vax_002dDependent.html#Vax_002dDependent" title="Vax-Dependent">
<link rel="prev" href="VAX_002dopcodes.html#VAX_002dopcodes" title="VAX-opcodes">
<link rel="next" href="VAX_002doperands.html#VAX_002doperands" title="VAX-operands">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
This file documents the GNU Assembler "as".
Copyright (C) 1991-2019 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="VAX-branch"></a>
<a name="VAX_002dbranch"></a>
<p>
Next:&nbsp;<a rel="next" accesskey="n" href="VAX_002doperands.html#VAX_002doperands">VAX-operands</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="VAX_002dopcodes.html#VAX_002dopcodes">VAX-opcodes</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="Vax_002dDependent.html#Vax_002dDependent">Vax-Dependent</a>
<hr>
</div>
<h4 class="subsection">9.50.5 VAX Branch Improvement</h4>
<p><a name="index-VAX-branch-improvement-2510"></a><a name="index-branch-improvement_002c-VAX-2511"></a><a name="index-pseudo_002dops-for-branch_002c-VAX-2512"></a>Certain pseudo opcodes are permitted. They are for branch
instructions. They expand to the shortest branch instruction that
reaches the target. Generally these mnemonics are made by
substituting &lsquo;<samp><span class="samp">j</span></samp>&rsquo; for &lsquo;<samp><span class="samp">b</span></samp>&rsquo; at the start of a DEC mnemonic.
This feature is included both for compatibility and to help
compilers. If you do not need this feature, avoid these
opcodes. Here are the mnemonics, and the code they can expand into.
<dl>
<dt><code>jbsb</code><dd>&lsquo;<samp><span class="samp">Jsb</span></samp>&rsquo; is already an instruction mnemonic, so we chose &lsquo;<samp><span class="samp">jbsb</span></samp>&rsquo;.
<dl>
<dt>(byte displacement)<dd><kbd>bsbb ...</kbd>
<br><dt>(word displacement)<dd><kbd>bsbw ...</kbd>
<br><dt>(long displacement)<dd><kbd>jsb ...</kbd>
</dl>
<br><dt><code>jbr</code><dt><code>jr</code><dd>Unconditional branch.
<dl>
<dt>(byte displacement)<dd><kbd>brb ...</kbd>
<br><dt>(word displacement)<dd><kbd>brw ...</kbd>
<br><dt>(long displacement)<dd><kbd>jmp ...</kbd>
</dl>
<br><dt><code>j</code><var>COND</var><dd><var>COND</var> may be any one of the conditional branches
<code>neq</code>, <code>nequ</code>, <code>eql</code>, <code>eqlu</code>, <code>gtr</code>,
<code>geq</code>, <code>lss</code>, <code>gtru</code>, <code>lequ</code>, <code>vc</code>, <code>vs</code>,
<code>gequ</code>, <code>cc</code>, <code>lssu</code>, <code>cs</code>.
<var>COND</var> may also be one of the bit tests
<code>bs</code>, <code>bc</code>, <code>bss</code>, <code>bcs</code>, <code>bsc</code>, <code>bcc</code>,
<code>bssi</code>, <code>bcci</code>, <code>lbs</code>, <code>lbc</code>.
<var>NOTCOND</var> is the opposite condition to <var>COND</var>.
<dl>
<dt>(byte displacement)<dd><kbd>b</kbd><var>COND</var><kbd> ...</kbd>
<br><dt>(word displacement)<dd><kbd>b</kbd><var>NOTCOND</var><kbd> foo ; brw ... ; foo:</kbd>
<br><dt>(long displacement)<dd><kbd>b</kbd><var>NOTCOND</var><kbd> foo ; jmp ... ; foo:</kbd>
</dl>
<br><dt><code>jacb</code><var>X</var><dd><var>X</var> may be one of <code>b d f g h l w</code>.
<dl>
<dt>(word displacement)<dd><var>OPCODE</var><kbd> ...</kbd>
<br><dt>(long displacement)<dd>
<pre class="example"> <var>OPCODE</var> ..., foo ;
brb bar ;
foo: jmp ... ;
bar:
</pre>
</dl>
<br><dt><code>jaob</code><var>YYY</var><dd><var>YYY</var> may be one of <code>lss leq</code>.
<br><dt><code>jsob</code><var>ZZZ</var><dd><var>ZZZ</var> may be one of <code>geq gtr</code>.
<dl>
<dt>(byte displacement)<dd><var>OPCODE</var><kbd> ...</kbd>
<br><dt>(word displacement)<dd>
<pre class="example"> <var>OPCODE</var> ..., foo ;
brb bar ;
foo: brw <var>destination</var> ;
bar:
</pre>
<br><dt>(long displacement)<dd>
<pre class="example"> <var>OPCODE</var> ..., foo ;
brb bar ;
foo: jmp <var>destination</var> ;
bar:
</pre>
</dl>
<br><dt><code>aobleq</code><dt><code>aoblss</code><dt><code>sobgeq</code><dt><code>sobgtr</code><dd>
<dl>
<dt>(byte displacement)<dd><var>OPCODE</var><kbd> ...</kbd>
<br><dt>(word displacement)<dd>
<pre class="example"> <var>OPCODE</var> ..., foo ;
brb bar ;
foo: brw <var>destination</var> ;
bar:
</pre>
<br><dt>(long displacement)<dd>
<pre class="example"> <var>OPCODE</var> ..., foo ;
brb bar ;
foo: jmp <var>destination</var> ;
bar:
</pre>
</dl>
</dl>
</body></html>