<html lang="en"> <head> <title>TILEPro 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="TILEPro_002dDependent.html#TILEPro_002dDependent" title="TILEPro-Dependent"> <link rel="prev" href="TILEPro-Options.html#TILEPro-Options" title="TILEPro Options"> <link rel="next" href="TILEPro-Directives.html#TILEPro-Directives" title="TILEPro 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="TILEPro-Syntax"></a> <p> Next: <a rel="next" accesskey="n" href="TILEPro-Directives.html#TILEPro-Directives">TILEPro Directives</a>, Previous: <a rel="previous" accesskey="p" href="TILEPro-Options.html#TILEPro-Options">TILEPro Options</a>, Up: <a rel="up" accesskey="u" href="TILEPro_002dDependent.html#TILEPro_002dDependent">TILEPro-Dependent</a> <hr> </div> <h4 class="subsection">9.46.2 Syntax</h4> <p><a name="index-TILEPro-syntax-2241"></a><a name="index-syntax_002c-TILEPro-2242"></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="TILEPro-Opcodes.html#TILEPro-Opcodes">TILEPro Opcodes</a>: Opcode Naming Conventions. <li><a accesskey="2" href="TILEPro-Registers.html#TILEPro-Registers">TILEPro Registers</a>: Register Naming. <li><a accesskey="3" href="TILEPro-Modifiers.html#TILEPro-Modifiers">TILEPro Modifiers</a>: Symbolic Operand Modifiers. </ul> </body></html>