blob: 00d43be24ba993737450455e037ffab2111ec763 [file] [log] [blame]
<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, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
2008 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.2 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>
<link rel="stylesheet" type="text/css" href="../cs.css">
</head>
<body>
<div class="node">
<a name="RX-Options"></a>
<p>
Next:&nbsp;<a rel="next" accesskey="n" href="S_002f390-and-zSeries-Options.html#S_002f390-and-zSeries-Options">S/390 and zSeries Options</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="RS_002f6000-and-PowerPC-Options.html#RS_002f6000-and-PowerPC-Options">RS/6000 and PowerPC Options</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="Submodel-Options.html#Submodel-Options">Submodel Options</a>
<hr>
</div>
<h4 class="subsection">3.17.32 RX Options</h4>
<p><a name="index-RX-Options-1881"></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-1882"></a><a name="index-m32bit_002ddoubles-1883"></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-1884"></a><a name="index-nofpu-1885"></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 <var>RX600</var>
series and disabled for the <var>RX200</var> series.
<p>Floating point instructions will only be generated for 32-bit floating
point values however, so if the <samp><span class="option">-m64bit-doubles</span></samp> option is in
use then the FPU hardware will not be used for doubles.
<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><dt><code>-patch=</code><var>name</var><dd><a name="index-g_t_002dmcpu-1886"></a><a name="index-g_t_002dpatch-1887"></a>Selects the type of RX CPU to be targeted. Currently three types are
supported, the generic <var>RX600</var> and <var>RX200</var> series hardware and
the specific <var>RX610</var> cpu. The default is <var>RX600</var>.
<p>The only difference between <var>RX600</var> and <var>RX610</var> is that the
<var>RX610</var> does not support the <code>MVTIPL</code> instruction.
<p>The <var>RX200</var> 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-1888"></a><a name="index-mlittle_002dendian_002ddata-1889"></a>Store data (but not code) in the big-endian format. The default is
<samp><span class="option">-mlittle-endian-data</span></samp>, ie 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-1890"></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 (<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 which once could have been
held in <code>r13</code> are now pushed onto the stack.
<p>Note, common variables (variables which have not been initialised) 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 register <code>r13</code>. It is up to the programmer to
experiment and discover whether this feature is of benefit to their
program.
<br><dt><code>-msim</code><dt><code>-mno-sim</code><dd><a name="index-msim-1891"></a><a name="index-mno_002dsim-1892"></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-1893"></a><a name="index-mno_002das100_002dsyntax-1894"></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 generating it is not the
default option.
<br><dt><code>-mmax-constant-size=</code><var>N</var><dd><a name="index-mmax_002dconstant_002dsize-1895"></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-1896"></a>Enable linker relaxation. Linker relaxation is a process whereby the
linker will attempt 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-1897"></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> will be 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-1898"></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.
</dl>
<p><em>Note:</em> The generic GCC command line <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 will will ensure
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>