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.
196 lines
12 KiB
HTML
196 lines
12 KiB
HTML
<html lang="en">
|
|
<head>
|
|
<title>RX Options - Using the GNU Compiler Collection (GCC)</title>
|
|
<meta http-equiv="Content-Type" content="text/html">
|
|
<meta name="description" content="Using the GNU Compiler Collection (GCC)">
|
|
<meta name="generator" content="makeinfo 4.13">
|
|
<link title="Top" rel="start" href="index.html#Top">
|
|
<link rel="up" href="Submodel-Options.html#Submodel-Options" title="Submodel Options">
|
|
<link rel="prev" href="RS_002f6000-and-PowerPC-Options.html#RS_002f6000-and-PowerPC-Options" title="RS/6000 and PowerPC Options">
|
|
<link rel="next" href="S_002f390-and-zSeries-Options.html#S_002f390-and-zSeries-Options" title="S/390 and zSeries Options">
|
|
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
|
<!--
|
|
Copyright (C) 1988-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 the
|
|
Invariant Sections being ``Funding Free Software'', the Front-Cover
|
|
Texts being (a) (see below), and with the Back-Cover Texts being (b)
|
|
(see below). A copy of the license is included in the section entitled
|
|
``GNU Free Documentation License''.
|
|
|
|
(a) The FSF's Front-Cover Text is:
|
|
|
|
A GNU Manual
|
|
|
|
(b) The FSF's Back-Cover Text is:
|
|
|
|
You have freedom to copy and modify this GNU Manual, like GNU
|
|
software. Copies published by the Free Software Foundation raise
|
|
funds for GNU development.-->
|
|
<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="RX-Options"></a>
|
|
<p>
|
|
Next: <a rel="next" accesskey="n" href="S_002f390-and-zSeries-Options.html#S_002f390-and-zSeries-Options">S/390 and zSeries Options</a>,
|
|
Previous: <a rel="previous" accesskey="p" href="RS_002f6000-and-PowerPC-Options.html#RS_002f6000-and-PowerPC-Options">RS/6000 and PowerPC Options</a>,
|
|
Up: <a rel="up" accesskey="u" href="Submodel-Options.html#Submodel-Options">Submodel Options</a>
|
|
<hr>
|
|
</div>
|
|
|
|
<h4 class="subsection">3.17.38 RX Options</h4>
|
|
|
|
<p><a name="index-RX-Options-2370"></a>
|
|
These command-line options are defined for RX targets:
|
|
|
|
<dl>
|
|
<dt><code>-m64bit-doubles</code><dt><code>-m32bit-doubles</code><dd><a name="index-m64bit_002ddoubles-2371"></a><a name="index-m32bit_002ddoubles-2372"></a>Make the <code>double</code> data type be 64 bits (<samp><span class="option">-m64bit-doubles</span></samp>)
|
|
or 32 bits (<samp><span class="option">-m32bit-doubles</span></samp>) in size. The default is
|
|
<samp><span class="option">-m32bit-doubles</span></samp>. <em>Note</em> RX floating-point hardware only
|
|
works on 32-bit values, which is why the default is
|
|
<samp><span class="option">-m32bit-doubles</span></samp>.
|
|
|
|
<br><dt><code>-fpu</code><dt><code>-nofpu</code><dd><a name="index-fpu-2373"></a><a name="index-nofpu-2374"></a>Enables (<samp><span class="option">-fpu</span></samp>) or disables (<samp><span class="option">-nofpu</span></samp>) the use of RX
|
|
floating-point hardware. The default is enabled for the RX600
|
|
series and disabled for the RX200 series.
|
|
|
|
<p>Floating-point instructions are only generated for 32-bit floating-point
|
|
values, however, so the FPU hardware is not used for doubles if the
|
|
<samp><span class="option">-m64bit-doubles</span></samp> option is used.
|
|
|
|
<p><em>Note</em> If the <samp><span class="option">-fpu</span></samp> option is enabled then
|
|
<samp><span class="option">-funsafe-math-optimizations</span></samp> is also enabled automatically.
|
|
This is because the RX FPU instructions are themselves unsafe.
|
|
|
|
<br><dt><code>-mcpu=</code><var>name</var><dd><a name="index-mcpu-2375"></a>Selects the type of RX CPU to be targeted. Currently three types are
|
|
supported, the generic ‘<samp><span class="samp">RX600</span></samp>’ and ‘<samp><span class="samp">RX200</span></samp>’ series hardware and
|
|
the specific ‘<samp><span class="samp">RX610</span></samp>’ CPU. The default is ‘<samp><span class="samp">RX600</span></samp>’.
|
|
|
|
<p>The only difference between ‘<samp><span class="samp">RX600</span></samp>’ and ‘<samp><span class="samp">RX610</span></samp>’ is that the
|
|
‘<samp><span class="samp">RX610</span></samp>’ does not support the <code>MVTIPL</code> instruction.
|
|
|
|
<p>The ‘<samp><span class="samp">RX200</span></samp>’ series does not have a hardware floating-point unit
|
|
and so <samp><span class="option">-nofpu</span></samp> is enabled by default when this type is
|
|
selected.
|
|
|
|
<br><dt><code>-mbig-endian-data</code><dt><code>-mlittle-endian-data</code><dd><a name="index-mbig_002dendian_002ddata-2376"></a><a name="index-mlittle_002dendian_002ddata-2377"></a>Store data (but not code) in the big-endian format. The default is
|
|
<samp><span class="option">-mlittle-endian-data</span></samp>, i.e. to store data in the little-endian
|
|
format.
|
|
|
|
<br><dt><code>-msmall-data-limit=</code><var>N</var><dd><a name="index-msmall_002ddata_002dlimit-2378"></a>Specifies the maximum size in bytes of global and static variables
|
|
which can be placed into the small data area. Using the small data
|
|
area can lead to smaller and faster code, but the size of area is
|
|
limited and it is up to the programmer to ensure that the area does
|
|
not overflow. Also when the small data area is used one of the RX's
|
|
registers (usually <code>r13</code>) is reserved for use pointing to this
|
|
area, so it is no longer available for use by the compiler. This
|
|
could result in slower and/or larger code if variables are pushed onto
|
|
the stack instead of being held in this register.
|
|
|
|
<p>Note, common variables (variables that have not been initialized) and
|
|
constants are not placed into the small data area as they are assigned
|
|
to other sections in the output executable.
|
|
|
|
<p>The default value is zero, which disables this feature. Note, this
|
|
feature is not enabled by default with higher optimization levels
|
|
(<samp><span class="option">-O2</span></samp> etc) because of the potentially detrimental effects of
|
|
reserving a register. It is up to the programmer to experiment and
|
|
discover whether this feature is of benefit to their program. See the
|
|
description of the <samp><span class="option">-mpid</span></samp> option for a description of how the
|
|
actual register to hold the small data area pointer is chosen.
|
|
|
|
<br><dt><code>-msim</code><dt><code>-mno-sim</code><dd><a name="index-msim-2379"></a><a name="index-mno_002dsim-2380"></a>Use the simulator runtime. The default is to use the libgloss
|
|
board-specific runtime.
|
|
|
|
<br><dt><code>-mas100-syntax</code><dt><code>-mno-as100-syntax</code><dd><a name="index-mas100_002dsyntax-2381"></a><a name="index-mno_002das100_002dsyntax-2382"></a>When generating assembler output use a syntax that is compatible with
|
|
Renesas's AS100 assembler. This syntax can also be handled by the GAS
|
|
assembler, but it has some restrictions so it is not generated by default.
|
|
|
|
<br><dt><code>-mmax-constant-size=</code><var>N</var><dd><a name="index-mmax_002dconstant_002dsize-2383"></a>Specifies the maximum size, in bytes, of a constant that can be used as
|
|
an operand in a RX instruction. Although the RX instruction set does
|
|
allow constants of up to 4 bytes in length to be used in instructions,
|
|
a longer value equates to a longer instruction. Thus in some
|
|
circumstances it can be beneficial to restrict the size of constants
|
|
that are used in instructions. Constants that are too big are instead
|
|
placed into a constant pool and referenced via register indirection.
|
|
|
|
<p>The value <var>N</var> can be between 0 and 4. A value of 0 (the default)
|
|
or 4 means that constants of any size are allowed.
|
|
|
|
<br><dt><code>-mrelax</code><dd><a name="index-mrelax-2384"></a>Enable linker relaxation. Linker relaxation is a process whereby the
|
|
linker attempts to reduce the size of a program by finding shorter
|
|
versions of various instructions. Disabled by default.
|
|
|
|
<br><dt><code>-mint-register=</code><var>N</var><dd><a name="index-mint_002dregister-2385"></a>Specify the number of registers to reserve for fast interrupt handler
|
|
functions. The value <var>N</var> can be between 0 and 4. A value of 1
|
|
means that register <code>r13</code> is reserved for the exclusive use
|
|
of fast interrupt handlers. A value of 2 reserves <code>r13</code> and
|
|
<code>r12</code>. A value of 3 reserves <code>r13</code>, <code>r12</code> and
|
|
<code>r11</code>, and a value of 4 reserves <code>r13</code> through <code>r10</code>.
|
|
A value of 0, the default, does not reserve any registers.
|
|
|
|
<br><dt><code>-msave-acc-in-interrupts</code><dd><a name="index-msave_002dacc_002din_002dinterrupts-2386"></a>Specifies that interrupt handler functions should preserve the
|
|
accumulator register. This is only necessary if normal code might use
|
|
the accumulator register, for example because it performs 64-bit
|
|
multiplications. The default is to ignore the accumulator as this
|
|
makes the interrupt handlers faster.
|
|
|
|
<br><dt><code>-mpid</code><dt><code>-mno-pid</code><dd><a name="index-mpid-2387"></a><a name="index-mno_002dpid-2388"></a>Enables the generation of position independent data. When enabled any
|
|
access to constant data is done via an offset from a base address
|
|
held in a register. This allows the location of constant data to be
|
|
determined at run time without requiring the executable to be
|
|
relocated, which is a benefit to embedded applications with tight
|
|
memory constraints. Data that can be modified is not affected by this
|
|
option.
|
|
|
|
<p>Note, using this feature reserves a register, usually <code>r13</code>, for
|
|
the constant data base address. This can result in slower and/or
|
|
larger code, especially in complicated functions.
|
|
|
|
<p>The actual register chosen to hold the constant data base address
|
|
depends upon whether the <samp><span class="option">-msmall-data-limit</span></samp> and/or the
|
|
<samp><span class="option">-mint-register</span></samp> command-line options are enabled. Starting
|
|
with register <code>r13</code> and proceeding downwards, registers are
|
|
allocated first to satisfy the requirements of <samp><span class="option">-mint-register</span></samp>,
|
|
then <samp><span class="option">-mpid</span></samp> and finally <samp><span class="option">-msmall-data-limit</span></samp>. Thus it
|
|
is possible for the small data area register to be <code>r8</code> if both
|
|
<samp><span class="option">-mint-register=4</span></samp> and <samp><span class="option">-mpid</span></samp> are specified on the
|
|
command line.
|
|
|
|
<p>By default this feature is not enabled. The default can be restored
|
|
via the <samp><span class="option">-mno-pid</span></samp> command-line option.
|
|
|
|
<br><dt><code>-mno-warn-multiple-fast-interrupts</code><dt><code>-mwarn-multiple-fast-interrupts</code><dd><a name="index-mno_002dwarn_002dmultiple_002dfast_002dinterrupts-2389"></a><a name="index-mwarn_002dmultiple_002dfast_002dinterrupts-2390"></a>Prevents GCC from issuing a warning message if it finds more than one
|
|
fast interrupt handler when it is compiling a file. The default is to
|
|
issue a warning for each extra fast interrupt handler found, as the RX
|
|
only supports one such interrupt.
|
|
|
|
</dl>
|
|
|
|
<p><em>Note:</em> The generic GCC command-line option <samp><span class="option">-ffixed-</span><var>reg</var></samp>
|
|
has special significance to the RX port when used with the
|
|
<code>interrupt</code> function attribute. This attribute indicates a
|
|
function intended to process fast interrupts. GCC ensures
|
|
that it only uses the registers <code>r10</code>, <code>r11</code>, <code>r12</code>
|
|
and/or <code>r13</code> and only provided that the normal use of the
|
|
corresponding registers have been restricted via the
|
|
<samp><span class="option">-ffixed-</span><var>reg</var></samp> or <samp><span class="option">-mint-register</span></samp> command-line
|
|
options.
|
|
|
|
</body></html>
|
|
|