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.
107 lines
5.9 KiB
HTML
107 lines
5.9 KiB
HTML
4 years ago
|
<html lang="en">
|
||
|
<head>
|
||
|
<title>D30V-Chars - 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="D30V_002dSyntax.html#D30V_002dSyntax" title="D30V-Syntax">
|
||
|
<link rel="prev" href="D30V_002dSubs.html#D30V_002dSubs" title="D30V-Subs">
|
||
|
<link rel="next" href="D30V_002dGuarded.html#D30V_002dGuarded" title="D30V-Guarded">
|
||
|
<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="D30V-Chars"></a>
|
||
|
<a name="D30V_002dChars"></a>
|
||
|
<p>
|
||
|
Next: <a rel="next" accesskey="n" href="D30V_002dGuarded.html#D30V_002dGuarded">D30V-Guarded</a>,
|
||
|
Previous: <a rel="previous" accesskey="p" href="D30V_002dSubs.html#D30V_002dSubs">D30V-Subs</a>,
|
||
|
Up: <a rel="up" accesskey="u" href="D30V_002dSyntax.html#D30V_002dSyntax">D30V-Syntax</a>
|
||
|
<hr>
|
||
|
</div>
|
||
|
|
||
|
<h5 class="subsubsection">9.10.2.3 Special Characters</h5>
|
||
|
|
||
|
<p><a name="index-line-comment-character_002c-D30V-914"></a><a name="index-D30V-line-comment-character-915"></a>A semicolon (‘<samp><span class="samp">;</span></samp>’) can be used anywhere on a line to start a
|
||
|
comment that extends to the end of the line.
|
||
|
|
||
|
<p>If a ‘<samp><span class="samp">#</span></samp>’ appears as the first character of a line, the whole line
|
||
|
is treated as a comment, but in this case the line could also be a
|
||
|
logical line number directive (see <a href="Comments.html#Comments">Comments</a>) or a preprocessor
|
||
|
control command (see <a href="Preprocessing.html#Preprocessing">Preprocessing</a>).
|
||
|
|
||
|
<p><a name="index-sub_002dinstruction-ordering_002c-D30V-916"></a><a name="index-D30V-sub_002dinstruction-ordering-917"></a>Sub-instructions may be executed in order, in reverse-order, or in parallel.
|
||
|
Instructions listed in the standard one-per-line format will be executed
|
||
|
sequentially unless you use the ‘<samp><span class="samp">-O</span></samp>’ option.
|
||
|
|
||
|
<p>To specify the executing order, use the following symbols:
|
||
|
<dl>
|
||
|
<dt>‘<samp><span class="samp">-></span></samp>’<dd>Sequential with instruction on the left first.
|
||
|
|
||
|
<br><dt>‘<samp><span class="samp"><-</span></samp>’<dd>Sequential with instruction on the right first.
|
||
|
|
||
|
<br><dt>‘<samp><span class="samp">||</span></samp>’<dd>Parallel
|
||
|
</dl>
|
||
|
|
||
|
<p>The D30V syntax allows either one instruction per line, one instruction per line with
|
||
|
the execution symbol, or two instructions per line. For example
|
||
|
<dl>
|
||
|
<dt><code>abs r2,r3 -> abs r4,r5</code><dd>Execute these sequentially. The instruction on the right is in the right
|
||
|
container and is executed second.
|
||
|
|
||
|
<br><dt><code>abs r2,r3 <- abs r4,r5</code><dd>Execute these reverse-sequentially. The instruction on the right is in the right
|
||
|
container, and is executed first.
|
||
|
|
||
|
<br><dt><code>abs r2,r3 || abs r4,r5</code><dd>Execute these in parallel.
|
||
|
|
||
|
<br><dt><code>ldw r2,@(r3,r4) ||</code><dt><code>mulx r6,r8,r9</code><dd>Two-line format. Execute these in parallel.
|
||
|
|
||
|
<br><dt><code>mulx a0,r8,r9</code><dt><code>stw r2,@(r3,r4)</code><dd>Two-line format. Execute these sequentially unless ‘<samp><span class="samp">-O</span></samp>’ option is
|
||
|
used. If the ‘<samp><span class="samp">-O</span></samp>’ option is used, the assembler will determine if
|
||
|
the instructions could be done in parallel (the above two instructions
|
||
|
can be done in parallel), and if so, emit them as parallel instructions.
|
||
|
The assembler will put them in the proper containers. In the above
|
||
|
example, the assembler will put the ‘<samp><span class="samp">stw</span></samp>’ instruction in left
|
||
|
container and the ‘<samp><span class="samp">mulx</span></samp>’ instruction in the right container.
|
||
|
|
||
|
<br><dt><code>stw r2,@(r3,r4) -></code><dt><code>mulx a0,r8,r9</code><dd>Two-line format. Execute the ‘<samp><span class="samp">stw</span></samp>’ instruction followed by the
|
||
|
‘<samp><span class="samp">mulx</span></samp>’ instruction sequentially. The first instruction goes in the
|
||
|
left container and the second instruction goes into right container.
|
||
|
The assembler will give an error if the machine ordering constraints are
|
||
|
violated.
|
||
|
|
||
|
<br><dt><code>stw r2,@(r3,r4) <-</code><dt><code>mulx a0,r8,r9</code><dd>Same as previous example, except that the ‘<samp><span class="samp">mulx</span></samp>’ instruction is
|
||
|
executed before the ‘<samp><span class="samp">stw</span></samp>’ instruction.
|
||
|
</dl>
|
||
|
|
||
|
<p><a name="index-symbol-names_002c-_0040samp_007b_0024_007d-in-918"></a><a name="index-g_t_0040code_007b_0024_007d-in-symbol-names-919"></a>Since ‘<samp><span class="samp">$</span></samp>’ has no special meaning, you may use it in symbol names.
|
||
|
|
||
|
</body></html>
|
||
|
|