| <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| <html> |
| <!-- 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. --> |
| <!-- Created by GNU Texinfo 5.2, http://www.gnu.org/software/texinfo/ --> |
| <head> |
| <title>Using the GNU Compiler Collection (GCC): SPU Options</title> |
| |
| <meta name="description" content="Using the GNU Compiler Collection (GCC): SPU Options"> |
| <meta name="keywords" content="Using the GNU Compiler Collection (GCC): SPU Options"> |
| <meta name="resource-type" content="document"> |
| <meta name="distribution" content="global"> |
| <meta name="Generator" content="makeinfo"> |
| <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
| <link href="index.html#Top" rel="start" title="Top"> |
| <link href="Option-Index.html#Option-Index" rel="index" title="Option Index"> |
| <link href="index.html#SEC_Contents" rel="contents" title="Table of Contents"> |
| <link href="Submodel-Options.html#Submodel-Options" rel="up" title="Submodel Options"> |
| <link href="System-V-Options.html#System-V-Options" rel="next" title="System V Options"> |
| <link href="SPARC-Options.html#SPARC-Options" rel="prev" title="SPARC Options"> |
| <style type="text/css"> |
| <!-- |
| a.summary-letter {text-decoration: none} |
| blockquote.smallquotation {font-size: smaller} |
| div.display {margin-left: 3.2em} |
| div.example {margin-left: 3.2em} |
| div.indentedblock {margin-left: 3.2em} |
| div.lisp {margin-left: 3.2em} |
| div.smalldisplay {margin-left: 3.2em} |
| div.smallexample {margin-left: 3.2em} |
| div.smallindentedblock {margin-left: 3.2em; font-size: smaller} |
| div.smalllisp {margin-left: 3.2em} |
| kbd {font-style:oblique} |
| pre.display {font-family: inherit} |
| pre.format {font-family: inherit} |
| pre.menu-comment {font-family: serif} |
| pre.menu-preformatted {font-family: serif} |
| pre.smalldisplay {font-family: inherit; font-size: smaller} |
| pre.smallexample {font-size: smaller} |
| pre.smallformat {font-family: inherit; font-size: smaller} |
| pre.smalllisp {font-size: smaller} |
| span.nocodebreak {white-space:nowrap} |
| span.nolinebreak {white-space:nowrap} |
| span.roman {font-family:serif; font-weight:normal} |
| span.sansserif {font-family:sans-serif; font-weight:normal} |
| ul.no-bullet {list-style: none} |
| --> |
| </style> |
| |
| |
| </head> |
| |
| <body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000"> |
| <a name="SPU-Options"></a> |
| <div class="header"> |
| <p> |
| Next: <a href="System-V-Options.html#System-V-Options" accesskey="n" rel="next">System V Options</a>, Previous: <a href="SPARC-Options.html#SPARC-Options" accesskey="p" rel="prev">SPARC Options</a>, Up: <a href="Submodel-Options.html#Submodel-Options" accesskey="u" rel="up">Submodel Options</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Option-Index.html#Option-Index" title="Index" rel="index">Index</a>]</p> |
| </div> |
| <hr> |
| <a name="SPU-Options-1"></a> |
| <h4 class="subsection">3.17.45 SPU Options</h4> |
| <a name="index-SPU-options"></a> |
| |
| <p>These ‘<samp>-m</samp>’ options are supported on the SPU: |
| </p> |
| <dl compact="compact"> |
| <dt><code>-mwarn-reloc</code></dt> |
| <dt><code>-merror-reloc</code></dt> |
| <dd><a name="index-mwarn_002dreloc"></a> |
| <a name="index-merror_002dreloc"></a> |
| |
| <p>The loader for SPU does not handle dynamic relocations. By default, GCC |
| gives an error when it generates code that requires a dynamic |
| relocation. <samp>-mno-error-reloc</samp> disables the error, |
| <samp>-mwarn-reloc</samp> generates a warning instead. |
| </p> |
| </dd> |
| <dt><code>-msafe-dma</code></dt> |
| <dt><code>-munsafe-dma</code></dt> |
| <dd><a name="index-msafe_002ddma"></a> |
| <a name="index-munsafe_002ddma"></a> |
| |
| <p>Instructions that initiate or test completion of DMA must not be |
| reordered with respect to loads and stores of the memory that is being |
| accessed. |
| With <samp>-munsafe-dma</samp> you must use the <code>volatile</code> keyword to protect |
| memory accesses, but that can lead to inefficient code in places where the |
| memory is known to not change. Rather than mark the memory as volatile, |
| you can use <samp>-msafe-dma</samp> to tell the compiler to treat |
| the DMA instructions as potentially affecting all memory. |
| </p> |
| </dd> |
| <dt><code>-mbranch-hints</code></dt> |
| <dd><a name="index-mbranch_002dhints"></a> |
| |
| <p>By default, GCC generates a branch hint instruction to avoid |
| pipeline stalls for always-taken or probably-taken branches. A hint |
| is not generated closer than 8 instructions away from its branch. |
| There is little reason to disable them, except for debugging purposes, |
| or to make an object a little bit smaller. |
| </p> |
| </dd> |
| <dt><code>-msmall-mem</code></dt> |
| <dt><code>-mlarge-mem</code></dt> |
| <dd><a name="index-msmall_002dmem"></a> |
| <a name="index-mlarge_002dmem"></a> |
| |
| <p>By default, GCC generates code assuming that addresses are never larger |
| than 18 bits. With <samp>-mlarge-mem</samp> code is generated that assumes |
| a full 32-bit address. |
| </p> |
| </dd> |
| <dt><code>-mstdmain</code></dt> |
| <dd><a name="index-mstdmain"></a> |
| |
| <p>By default, GCC links against startup code that assumes the SPU-style |
| main function interface (which has an unconventional parameter list). |
| With <samp>-mstdmain</samp>, GCC links your program against startup |
| code that assumes a C99-style interface to <code>main</code>, including a |
| local copy of <code>argv</code> strings. |
| </p> |
| </dd> |
| <dt><code>-mfixed-range=<var>register-range</var></code></dt> |
| <dd><a name="index-mfixed_002drange-3"></a> |
| <p>Generate code treating the given register range as fixed registers. |
| A fixed register is one that the register allocator cannot use. This is |
| useful when compiling kernel code. A register range is specified as |
| two registers separated by a dash. Multiple register ranges can be |
| specified separated by a comma. |
| </p> |
| </dd> |
| <dt><code>-mea32</code></dt> |
| <dt><code>-mea64</code></dt> |
| <dd><a name="index-mea32"></a> |
| <a name="index-mea64"></a> |
| <p>Compile code assuming that pointers to the PPU address space accessed |
| via the <code>__ea</code> named address space qualifier are either 32 or 64 |
| bits wide. The default is 32 bits. As this is an ABI-changing option, |
| all object code in an executable must be compiled with the same setting. |
| </p> |
| </dd> |
| <dt><code>-maddress-space-conversion</code></dt> |
| <dt><code>-mno-address-space-conversion</code></dt> |
| <dd><a name="index-maddress_002dspace_002dconversion"></a> |
| <a name="index-mno_002daddress_002dspace_002dconversion"></a> |
| <p>Allow/disallow treating the <code>__ea</code> address space as superset |
| of the generic address space. This enables explicit type casts |
| between <code>__ea</code> and generic pointer as well as implicit |
| conversions of generic pointers to <code>__ea</code> pointers. The |
| default is to allow address space pointer conversions. |
| </p> |
| </dd> |
| <dt><code>-mcache-size=<var>cache-size</var></code></dt> |
| <dd><a name="index-mcache_002dsize"></a> |
| <p>This option controls the version of libgcc that the compiler links to an |
| executable and selects a software-managed cache for accessing variables |
| in the <code>__ea</code> address space with a particular cache size. Possible |
| options for <var>cache-size</var> are ‘<samp>8</samp>’, ‘<samp>16</samp>’, ‘<samp>32</samp>’, ‘<samp>64</samp>’ |
| and ‘<samp>128</samp>’. The default cache size is 64KB. |
| </p> |
| </dd> |
| <dt><code>-matomic-updates</code></dt> |
| <dt><code>-mno-atomic-updates</code></dt> |
| <dd><a name="index-matomic_002dupdates"></a> |
| <a name="index-mno_002datomic_002dupdates"></a> |
| <p>This option controls the version of libgcc that the compiler links to an |
| executable and selects whether atomic updates to the software-managed |
| cache of PPU-side variables are used. If you use atomic updates, changes |
| to a PPU variable from SPU code using the <code>__ea</code> named address space |
| qualifier do not interfere with changes to other PPU variables residing |
| in the same cache line from PPU code. If you do not use atomic updates, |
| such interference may occur; however, writing back cache lines is |
| more efficient. The default behavior is to use atomic updates. |
| </p> |
| </dd> |
| <dt><code>-mdual-nops</code></dt> |
| <dt><code>-mdual-nops=<var>n</var></code></dt> |
| <dd><a name="index-mdual_002dnops"></a> |
| <p>By default, GCC inserts nops to increase dual issue when it expects |
| it to increase performance. <var>n</var> can be a value from 0 to 10. A |
| smaller <var>n</var> inserts fewer nops. 10 is the default, 0 is the |
| same as <samp>-mno-dual-nops</samp>. Disabled with <samp>-Os</samp>. |
| </p> |
| </dd> |
| <dt><code>-mhint-max-nops=<var>n</var></code></dt> |
| <dd><a name="index-mhint_002dmax_002dnops"></a> |
| <p>Maximum number of nops to insert for a branch hint. A branch hint must |
| be at least 8 instructions away from the branch it is affecting. GCC |
| inserts up to <var>n</var> nops to enforce this, otherwise it does not |
| generate the branch hint. |
| </p> |
| </dd> |
| <dt><code>-mhint-max-distance=<var>n</var></code></dt> |
| <dd><a name="index-mhint_002dmax_002ddistance"></a> |
| <p>The encoding of the branch hint instruction limits the hint to be within |
| 256 instructions of the branch it is affecting. By default, GCC makes |
| sure it is within 125. |
| </p> |
| </dd> |
| <dt><code>-msafe-hints</code></dt> |
| <dd><a name="index-msafe_002dhints"></a> |
| <p>Work around a hardware bug that causes the SPU to stall indefinitely. |
| By default, GCC inserts the <code>hbrp</code> instruction to make sure |
| this stall won’t happen. |
| </p> |
| </dd> |
| </dl> |
| |
| <hr> |
| <div class="header"> |
| <p> |
| Next: <a href="System-V-Options.html#System-V-Options" accesskey="n" rel="next">System V Options</a>, Previous: <a href="SPARC-Options.html#SPARC-Options" accesskey="p" rel="prev">SPARC Options</a>, Up: <a href="Submodel-Options.html#Submodel-Options" accesskey="u" rel="up">Submodel Options</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Option-Index.html#Option-Index" title="Index" rel="index">Index</a>]</p> |
| </div> |
| |
| |
| |
| </body> |
| </html> |