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.
105 lines
4.9 KiB
HTML
105 lines
4.9 KiB
HTML
4 years ago
|
<html lang="en">
|
||
|
<head>
|
||
|
<title>TILE-Gx Syntax - 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="TILE_002dGx_002dDependent.html#TILE_002dGx_002dDependent" title="TILE-Gx-Dependent">
|
||
|
<link rel="prev" href="TILE_002dGx-Options.html#TILE_002dGx-Options" title="TILE-Gx Options">
|
||
|
<link rel="next" href="TILE_002dGx-Directives.html#TILE_002dGx-Directives" title="TILE-Gx Directives">
|
||
|
<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="TILE-Gx-Syntax"></a>
|
||
|
<a name="TILE_002dGx-Syntax"></a>
|
||
|
<p>
|
||
|
Next: <a rel="next" accesskey="n" href="TILE_002dGx-Directives.html#TILE_002dGx-Directives">TILE-Gx Directives</a>,
|
||
|
Previous: <a rel="previous" accesskey="p" href="TILE_002dGx-Options.html#TILE_002dGx-Options">TILE-Gx Options</a>,
|
||
|
Up: <a rel="up" accesskey="u" href="TILE_002dGx_002dDependent.html#TILE_002dGx_002dDependent">TILE-Gx-Dependent</a>
|
||
|
<hr>
|
||
|
</div>
|
||
|
|
||
|
<h4 class="subsection">9.45.2 Syntax</h4>
|
||
|
|
||
|
<p><a name="index-TILE_002dGx-syntax-2227"></a><a name="index-syntax_002c-TILE_002dGx-2228"></a>
|
||
|
Block comments are delimited by ‘<samp><span class="samp">/*</span></samp>’ and ‘<samp><span class="samp">*/</span></samp>’. End of line
|
||
|
comments may be introduced by ‘<samp><span class="samp">#</span></samp>’.
|
||
|
|
||
|
<p>Instructions consist of a leading opcode or macro name followed by
|
||
|
whitespace and an optional comma-separated list of operands:
|
||
|
|
||
|
<pre class="smallexample"> <var>opcode</var> [<var>operand</var>, ...]
|
||
|
</pre>
|
||
|
<p>Instructions must be separated by a newline or semicolon.
|
||
|
|
||
|
<p>There are two ways to write code: either write naked instructions,
|
||
|
which the assembler is free to combine into VLIW bundles, or specify
|
||
|
the VLIW bundles explicitly.
|
||
|
|
||
|
<p>Bundles are specified using curly braces:
|
||
|
|
||
|
<pre class="smallexample"> { <var>add</var> r3,r4,r5 ; <var>add</var> r7,r8,r9 ; <var>lw</var> r10,r11 }
|
||
|
</pre>
|
||
|
<p>A bundle can span multiple lines. If you want to put multiple
|
||
|
instructions on a line, whether in a bundle or not, you need to
|
||
|
separate them with semicolons as in this example.
|
||
|
|
||
|
<p>A bundle may contain one or more instructions, up to the limit
|
||
|
specified by the ISA (currently three). If fewer instructions are
|
||
|
specified than the hardware supports in a bundle, the assembler
|
||
|
inserts <code>fnop</code> instructions automatically.
|
||
|
|
||
|
<p>The assembler will prefer to preserve the ordering of instructions
|
||
|
within the bundle, putting the first instruction in a lower-numbered
|
||
|
pipeline than the next one, etc. This fact, combined with the
|
||
|
optional use of explicit <code>fnop</code> or <code>nop</code> instructions,
|
||
|
allows precise control over which pipeline executes each instruction.
|
||
|
|
||
|
<p>If the instructions cannot be bundled in the listed order, the
|
||
|
assembler will automatically try to find a valid pipeline
|
||
|
assignment. If there is no way to bundle the instructions together,
|
||
|
the assembler reports an error.
|
||
|
|
||
|
<p>The assembler does not yet auto-bundle (automatically combine multiple
|
||
|
instructions into one bundle), but it reserves the right to do so in
|
||
|
the future. If you want to force an instruction to run by itself, put
|
||
|
it in a bundle explicitly with curly braces and use <code>nop</code>
|
||
|
instructions (not <code>fnop</code>) to fill the remaining pipeline slots in
|
||
|
that bundle.
|
||
|
|
||
|
<ul class="menu">
|
||
|
<li><a accesskey="1" href="TILE_002dGx-Opcodes.html#TILE_002dGx-Opcodes">TILE-Gx Opcodes</a>: Opcode Naming Conventions.
|
||
|
<li><a accesskey="2" href="TILE_002dGx-Registers.html#TILE_002dGx-Registers">TILE-Gx Registers</a>: Register Naming.
|
||
|
<li><a accesskey="3" href="TILE_002dGx-Modifiers.html#TILE_002dGx-Modifiers">TILE-Gx Modifiers</a>: Symbolic Operand Modifiers.
|
||
|
</ul>
|
||
|
|
||
|
</body></html>
|
||
|
|