toolchain/share/doc/as.html/CRIS_002dOpts.html

127 lines
8.4 KiB
HTML
Raw Normal View History

2024-01-10 05:24:32 +00:00
<html lang="en">
<head>
<title>CRIS-Opts - 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="CRIS_002dDependent.html#CRIS_002dDependent" title="CRIS-Dependent">
<link rel="next" href="CRIS_002dExpand.html#CRIS_002dExpand" title="CRIS-Expand">
<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="CRIS-Opts"></a>
<a name="CRIS_002dOpts"></a>
<p>
Next:&nbsp;<a rel="next" accesskey="n" href="CRIS_002dExpand.html#CRIS_002dExpand">CRIS-Expand</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="CRIS_002dDependent.html#CRIS_002dDependent">CRIS-Dependent</a>
<hr>
</div>
<h4 class="subsection">9.9.1 Command-line Options</h4>
<p><a name="index-options_002c-CRIS-879"></a><a name="index-CRIS-options-880"></a>The CRIS version of <code>as</code> has these
machine-dependent command-line options.
<p><a name="index-g_t_0040option_007b_002d_002demulation_003dcriself_007d-command_002dline-option_002c-CRIS-881"></a><a name="index-g_t_0040option_007b_002d_002demulation_003dcrisaout_007d-command_002dline-option_002c-CRIS-882"></a><a name="index-CRIS-_0040option_007b_002d_002demulation_003dcriself_007d-command_002dline-option-883"></a><a name="index-CRIS-_0040option_007b_002d_002demulation_003dcrisaout_007d-command_002dline-option-884"></a>
The format of the generated object files can be either ELF or
a.out, specified by the command-line options
<samp><span class="option">--emulation=crisaout</span></samp> and <samp><span class="option">--emulation=criself</span></samp>.
The default is ELF (criself), unless <code>as</code> has been
configured specifically for a.out by using the configuration
name <code>cris-axis-aout</code>.
<p><a name="index-g_t_0040option_007b_002d_002dunderscore_007d-command_002dline-option_002c-CRIS-885"></a><a name="index-g_t_0040option_007b_002d_002dno_002dunderscore_007d-command_002dline-option_002c-CRIS-886"></a><a name="index-CRIS-_0040option_007b_002d_002dunderscore_007d-command_002dline-option-887"></a><a name="index-CRIS-_0040option_007b_002d_002dno_002dunderscore_007d-command_002dline-option-888"></a>There are two different link-incompatible ELF object file
variants for CRIS, for use in environments where symbols are
expected to be prefixed by a leading &lsquo;<samp><span class="samp">_</span></samp>&rsquo; character and for
environments without such a symbol prefix. The variant used for
GNU/Linux port has no symbol prefix. Which variant to produce
is specified by either of the options <samp><span class="option">--underscore</span></samp> and
<samp><span class="option">--no-underscore</span></samp>. The default is <samp><span class="option">--underscore</span></samp>.
Since symbols in CRIS a.out objects are expected to have a
&lsquo;<samp><span class="samp">_</span></samp>&rsquo; prefix, specifying <samp><span class="option">--no-underscore</span></samp> when
generating a.out objects is an error. Besides the object format
difference, the effect of this option is to parse register names
differently (see <a href="crisnous.html#crisnous">crisnous</a>). The <samp><span class="option">--no-underscore</span></samp>
option makes a &lsquo;<samp><span class="samp">$</span></samp>&rsquo; register prefix mandatory.
<p><a name="index-g_t_0040option_007b_002d_002dpic_007d-command_002dline-option_002c-CRIS-889"></a><a name="index-CRIS-_0040option_007b_002d_002dpic_007d-command_002dline-option-890"></a><a name="index-Position_002dindependent-code_002c-CRIS-891"></a><a name="index-CRIS-position_002dindependent-code-892"></a>The option <samp><span class="option">--pic</span></samp> must be passed to <code>as</code> in
order to recognize the symbol syntax used for ELF (SVR4 PIC)
position-independent-code (see <a href="crispic.html#crispic">crispic</a>). This will also
affect expansion of instructions. The expansion with
<samp><span class="option">--pic</span></samp> will use PC-relative rather than (slightly
faster) absolute addresses in those expansions. This option is only
valid when generating ELF format object files.
<p><a name="index-g_t_0040option_007b_002d_002dmarch_003d_0040var_007barchitecture_007d_007d-command_002dline-option_002c-CRIS-893"></a><a name="index-CRIS-_0040option_007b_002d_002dmarch_003d_0040var_007barchitecture_007d_007d-command_002dline-option-894"></a><a name="index-Architecture-variant-option_002c-CRIS-895"></a><a name="index-CRIS-architecture-variant-option-896"></a>The option <samp><span class="option">--march=</span><var>architecture</var></samp>
<a name="march_002doption"></a>specifies the recognized instruction set
and recognized register names. It also controls the
architecture type of the object file. Valid values for
<var>architecture</var> are:
<dl>
<dt><code>v0_v10</code><dd>All instructions and register names for any architecture variant
in the set v0<small class="dots">...</small>v10 are recognized. This is the
default if the target is configured as cris-*.
<br><dt><code>v10</code><dd>Only instructions and register names for CRIS v10 (as found in
ETRAX 100 LX) are recognized. This is the default if the target
is configured as crisv10-*.
<br><dt><code>v32</code><dd>Only instructions and register names for CRIS v32 (code name
Guinness) are recognized. This is the default if the target is
configured as crisv32-*. This value implies
<samp><span class="option">--no-mul-bug-abort</span></samp>. (A subsequent
<samp><span class="option">--mul-bug-abort</span></samp> will turn it back on.)
<br><dt><code>common_v10_v32</code><dd>Only instructions with register names and addressing modes with
opcodes common to the v10 and v32 are recognized.
</dl>
<p><a name="index-g_t_0040option_007b_002dN_007d-command_002dline-option_002c-CRIS-897"></a><a name="index-CRIS-_0040option_007b_002dN_007d-command_002dline-option-898"></a>When <samp><span class="option">-N</span></samp> is specified, <code>as</code> will emit a
warning when a 16-bit branch instruction is expanded into a
32-bit multiple-instruction construct (see <a href="CRIS_002dExpand.html#CRIS_002dExpand">CRIS-Expand</a>).
<p><a name="index-g_t_0040option_007b_002d_002dno_002dmul_002dbug_002dabort_007d-command_002dline-option_002c-CRIS-899"></a><a name="index-g_t_0040option_007b_002d_002dmul_002dbug_002dabort_007d-command_002dline-option_002c-CRIS-900"></a><a name="index-CRIS-_0040option_007b_002d_002dno_002dmul_002dbug_002dabort_007d-command_002dline-option-901"></a><a name="index-CRIS-_0040option_007b_002d_002dmul_002dbug_002dabort_007d-command_002dline-option-902"></a>
Some versions of the CRIS v10, for example in the Etrax 100 LX,
contain a bug that causes destabilizing memory accesses when a
multiply instruction is executed with certain values in the
first operand just before a cache-miss. When the
<samp><span class="option">--mul-bug-abort</span></samp> command-line option is active (the
default value), <code>as</code> will refuse to assemble a file
containing a multiply instruction at a dangerous offset, one
that could be the last on a cache-line, or is in a section with
insufficient alignment. This placement checking does not catch
any case where the multiply instruction is dangerously placed
because it is located in a delay-slot. The
<samp><span class="option">--mul-bug-abort</span></samp> command-line option turns off the
checking.
</body></html>