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.

118 lines
6.6 KiB
HTML

<html lang="en">
<head>
<title>Options-i960 - 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="i960_002dDependent.html#i960_002dDependent" title="i960-Dependent">
<link rel="next" href="Floating-Point_002di960.html#Floating-Point_002di960" title="Floating Point-i960">
<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="Options-i960"></a>
<a name="Options_002di960"></a>
<p>
Next:&nbsp;<a rel="next" accesskey="n" href="Floating-Point_002di960.html#Floating-Point_002di960">Floating Point-i960</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="i960_002dDependent.html#i960_002dDependent">i960-Dependent</a>
<hr>
</div>
<h4 class="subsection">9.17.1 i960 Command-line Options</h4>
<p><a name="index-i960-options-1178"></a><a name="index-options_002c-i960-1179"></a>
<a name="index-i960-architecture-options-1180"></a>
<a name="index-architecture-options_002c-i960-1181"></a>
<a name="index-g_t_0040code_007b_002dA_007d-options_002c-i960-1182"></a>
<dl><dt><code>-ACA | -ACA_A | -ACB | -ACC | -AKA | -AKB | -AKC | -AMC</code><dd>Select the 80960 architecture. Instructions or features not supported
by the selected architecture cause fatal errors.
<p>&lsquo;<samp><span class="samp">-ACA</span></samp>&rsquo; is equivalent to &lsquo;<samp><span class="samp">-ACA_A</span></samp>&rsquo;; &lsquo;<samp><span class="samp">-AKC</span></samp>&rsquo; is equivalent to
&lsquo;<samp><span class="samp">-AMC</span></samp>&rsquo;. Synonyms are provided for compatibility with other tools.
<p>If you do not specify any of these options, <code>as</code> generates code
for any instruction or feature that is supported by <em>some</em> version of the
960 (even if this means mixing architectures!). In principle,
<code>as</code> attempts to deduce the minimal sufficient processor type if
none is specified; depending on the object code format, the processor type may
be recorded in the object file. If it is critical that the <code>as</code>
output match a specific architecture, specify that architecture explicitly.
<p><a name="index-g_t_0040code_007b_002db_007d-option_002c-i960-1183"></a><a name="index-branch-recording_002c-i960-1184"></a><a name="index-i960-branch-recording-1185"></a><br><dt><code>-b</code><dd>Add code to collect information about conditional branches taken, for
later optimization using branch prediction bits. (The conditional branch
instructions have branch prediction bits in the CA, CB, and CC
architectures.) If <var>BR</var> represents a conditional branch instruction,
the following represents the code generated by the assembler when
&lsquo;<samp><span class="samp">-b</span></samp>&rsquo; is specified:
<pre class="smallexample"> call <var>increment routine</var>
.word 0 # pre-counter
Label: <var>BR</var>
call <var>increment routine</var>
.word 0 # post-counter
</pre>
<p>The counter following a branch records the number of times that branch
was <em>not</em> taken; the difference between the two counters is the
number of times the branch <em>was</em> taken.
<p><a name="index-g_t_0040code_007bgbr960_007d_002c-i960-postprocessor-1186"></a><a name="index-branch-statistics-table_002c-i960-1187"></a>A table of every such <code>Label</code> is also generated, so that the
external postprocessor <code>gbr960</code> (supplied by Intel) can locate all
the counters. This table is always labeled &lsquo;<samp><span class="samp">__BRANCH_TABLE__</span></samp>&rsquo;;
this is a local symbol to permit collecting statistics for many separate
object files. The table is word aligned, and begins with a two-word
header. The first word, initialized to 0, is used in maintaining linked
lists of branch tables. The second word is a count of the number of
entries in the table, which follow immediately: each is a word, pointing
to one of the labels illustrated above.
<!-- TEXI2ROFF-KILL -->
<!-- END TEXI2ROFF-KILL -->
<p>The first word of the header is used to locate multiple branch tables,
since each object file may contain one. Normally the links are
maintained with a call to an initialization routine, placed at the
beginning of each function in the file. The <span class="sc">gnu</span> C compiler
generates these calls automatically when you give it a &lsquo;<samp><span class="samp">-b</span></samp>&rsquo; option.
For further details, see the documentation of &lsquo;<samp><span class="samp">gbr960</span></samp>&rsquo;.
<p><a name="index-g_t_0040code_007b_002dno_002drelax_007d-option_002c-i960-1188"></a><br><dt><code>-no-relax</code><dd>Normally, Compare-and-Branch instructions with targets that require
displacements greater than 13 bits (or that have external targets) are
replaced with the corresponding compare (or &lsquo;<samp><span class="samp">chkbit</span></samp>&rsquo;) and branch
instructions. You can use the &lsquo;<samp><span class="samp">-no-relax</span></samp>&rsquo; option to specify that
<code>as</code> should generate errors instead, if the target displacement
is larger than 13 bits.
<p>This option does not affect the Compare-and-Jump instructions; the code
emitted for them is <em>always</em> adjusted when necessary (depending on
displacement size), regardless of whether you use &lsquo;<samp><span class="samp">-no-relax</span></samp>&rsquo;.
</dl>
</body></html>