⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 xtensa-options.html

📁 gcc手册
💻 HTML
字号:
<html lang="en">

<head>

<title>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.3">

<link href="http://www.gnu.org/software/texinfo/" rel="generator-home">

<!--

Copyright &copy; 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998,

1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.



   <p>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 "GNU General Public License" and "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".



   <p>(a) The FSF's Front-Cover Text is:



   <p>A GNU Manual



   <p>(b) The FSF's Back-Cover Text is:



   <p>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.-->

</head>

<body>

<div class="node">

<p>

Node:<a name="Xtensa%20Options">Xtensa Options</a>,

Next:<a rel="next" accesskey="n" href="FRV-Options.html#FRV%20Options">FRV Options</a>,

Previous:<a rel="previous" accesskey="p" href="Xstormy16-Options.html#Xstormy16%20Options">Xstormy16 Options</a>,

Up:<a rel="up" accesskey="u" href="Submodel-Options.html#Submodel%20Options">Submodel Options</a>

<hr><br>

</div>



<h4 class="subsection">Xtensa Options</h4>



   <p>The Xtensa architecture is designed to support many different

configurations.  The compiler's default options can be set to match a

particular Xtensa configuration by copying a configuration file into the

GCC sources when building GCC.  The options below may be used to

override the default options.



     <dl>

<dt><code>-mbig-endian</code>

     <dd><dt><code>-mlittle-endian</code>

     <dd>Specify big-endian or little-endian byte ordering for the target Xtensa

processor.



     <br><dt><code>-mdensity</code>

     <dd><dt><code>-mno-density</code>

     <dd>Enable or disable use of the optional Xtensa code density instructions.



     <br><dt><code>-mmac16</code>

     <dd><dt><code>-mno-mac16</code>

     <dd>Enable or disable use of the Xtensa MAC16 option.  When enabled, GCC

will generate MAC16 instructions from standard C code, with the

limitation that it will use neither the MR register file nor any

instruction that operates on the MR registers.  When this option is

disabled, GCC will translate 16-bit multiply/accumulate operations to a

combination of core instructions and library calls, depending on whether

any other multiplier options are enabled.



     <br><dt><code>-mmul16</code>

     <dd><dt><code>-mno-mul16</code>

     <dd>Enable or disable use of the 16-bit integer multiplier option.  When

enabled, the compiler will generate 16-bit multiply instructions for

multiplications of 16 bits or smaller in standard C code.  When this

option is disabled, the compiler will either use 32-bit multiply or

MAC16 instructions if they are available or generate library calls to

perform the multiply operations using shifts and adds.



     <br><dt><code>-mmul32</code>

     <dd><dt><code>-mno-mul32</code>

     <dd>Enable or disable use of the 32-bit integer multiplier option.  When

enabled, the compiler will generate 32-bit multiply instructions for

multiplications of 32 bits or smaller in standard C code.  When this

option is disabled, the compiler will generate library calls to perform

the multiply operations using either shifts and adds or 16-bit multiply

instructions if they are available.



     <br><dt><code>-mnsa</code>

     <dd><dt><code>-mno-nsa</code>

     <dd>Enable or disable use of the optional normalization shift amount

(<code>NSA</code>) instructions to implement the built-in <code>ffs</code> function.



     <br><dt><code>-mminmax</code>

     <dd><dt><code>-mno-minmax</code>

     <dd>Enable or disable use of the optional minimum and maximum value

instructions.



     <br><dt><code>-msext</code>

     <dd><dt><code>-mno-sext</code>

     <dd>Enable or disable use of the optional sign extend (<code>SEXT</code>)

instruction.



     <br><dt><code>-mbooleans</code>

     <dd><dt><code>-mno-booleans</code>

     <dd>Enable or disable support for the boolean register file used by Xtensa

coprocessors.  This is not typically useful by itself but may be

required for other options that make use of the boolean registers (e.g.,

the floating-point option).



     <br><dt><code>-mhard-float</code>

     <dd><dt><code>-msoft-float</code>

     <dd>Enable or disable use of the floating-point option.  When enabled, GCC

generates floating-point instructions for 32-bit <code>float</code>

operations.  When this option is disabled, GCC generates library calls

to emulate 32-bit floating-point operations using integer instructions. 

Regardless of this option, 64-bit <code>double</code> operations are always

emulated with calls to library functions.



     <br><dt><code>-mfused-madd</code>

     <dd><dt><code>-mno-fused-madd</code>

     <dd>Enable or disable use of fused multiply/add and multiply/subtract

instructions in the floating-point option.  This has no effect if the

floating-point option is not also enabled.  Disabling fused multiply/add

and multiply/subtract instructions forces the compiler to use separate

instructions for the multiply and add/subtract operations.  This may be

desirable in some cases where strict IEEE 754-compliant results are

required: the fused multiply add/subtract instructions do not round the

intermediate result, thereby producing results with <em>more</em> bits of

precision than specified by the IEEE standard.  Disabling fused multiply

add/subtract instructions also ensures that the program output is not

sensitive to the compiler's ability to combine multiply and add/subtract

operations.



     <br><dt><code>-mserialize-volatile</code>

     <dd><dt><code>-mno-serialize-volatile</code>

     <dd>When this option is enabled, GCC inserts <code>MEMW</code> instructions before

<code>volatile</code> memory references to guarantee sequential consistency. 

The default is <code>-mserialize-volatile</code>.  Use

<code>-mno-serialize-volatile</code> to omit the <code>MEMW</code> instructions.



     <br><dt><code>-mtext-section-literals</code>

     <dd><dt><code>-mno-text-section-literals</code>

     <dd>Control the treatment of literal pools.  The default is

<code>-mno-text-section-literals</code>, which places literals in a separate

section in the output file.  This allows the literal pool to be placed

in a data RAM/ROM, and it also allows the linker to combine literal

pools from separate object files to remove redundant literals and

improve code size.  With <code>-mtext-section-literals</code>, the literals

are interspersed in the text section in order to keep them as close as

possible to their references.  This may be necessary for large assembly

files.



     <br><dt><code>-mtarget-align</code>

     <dd><dt><code>-mno-target-align</code>

     <dd>When this option is enabled, GCC instructs the assembler to

automatically align instructions to reduce branch penalties at the

expense of some code density.  The assembler attempts to widen density

instructions to align branch targets and the instructions following call

instructions.  If there are not enough preceding safe density

instructions to align a target, no widening will be performed.  The

default is <code>-mtarget-align</code>.  These options do not affect the

treatment of auto-aligned instructions like <code>LOOP</code>, which the

assembler will always align, either by widening density instructions or

by inserting no-op instructions.



     <br><dt><code>-mlongcalls</code>

     <dd><dt><code>-mno-longcalls</code>

     <dd>When this option is enabled, GCC instructs the assembler to translate

direct calls to indirect calls unless it can determine that the target

of a direct call is in the range allowed by the call instruction.  This

translation typically occurs for calls to functions in other source

files.  Specifically, the assembler translates a direct <code>CALL</code>

instruction into an <code>L32R</code> followed by a <code>CALLX</code> instruction. 

The default is <code>-mno-longcalls</code>.  This option should be used in

programs where the call target can potentially be out of range.  This

option is implemented in the assembler, not the compiler, so the

assembly code generated by GCC will still show direct call

instructions--look at the disassembled object code to see the actual

instructions.  Note that the assembler will use an indirect call for

every cross-file call, not just those that really will be out of range. 

</dl>



   </body></html>



⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -