You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

208 lines
10.0KB

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <html>
  3. <!-- Copyright (C) 1988-2020 Free Software Foundation, Inc.
  4. Permission is granted to copy, distribute and/or modify this document
  5. under the terms of the GNU Free Documentation License, Version 1.3 or
  6. any later version published by the Free Software Foundation; with the
  7. Invariant Sections being "Funding Free Software", the Front-Cover
  8. Texts being (a) (see below), and with the Back-Cover Texts being (b)
  9. (see below). A copy of the license is included in the section entitled
  10. "GNU Free Documentation License".
  11. (a) The FSF's Front-Cover Text is:
  12. A GNU Manual
  13. (b) The FSF's Back-Cover Text is:
  14. You have freedom to copy and modify this GNU Manual, like GNU
  15. software. Copies published by the Free Software Foundation raise
  16. funds for GNU development. -->
  17. <!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ -->
  18. <head>
  19. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  20. <title>Xtensa Options (Using the GNU Compiler Collection (GCC))</title>
  21. <meta name="description" content="Xtensa Options (Using the GNU Compiler Collection (GCC))">
  22. <meta name="keywords" content="Xtensa Options (Using the GNU Compiler Collection (GCC))">
  23. <meta name="resource-type" content="document">
  24. <meta name="distribution" content="global">
  25. <meta name="Generator" content="makeinfo">
  26. <link href="index.html#Top" rel="start" title="Top">
  27. <link href="Option-Index.html#Option-Index" rel="index" title="Option Index">
  28. <link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
  29. <link href="Submodel-Options.html#Submodel-Options" rel="up" title="Submodel Options">
  30. <link href="zSeries-Options.html#zSeries-Options" rel="next" title="zSeries Options">
  31. <link href="Xstormy16-Options.html#Xstormy16-Options" rel="prev" title="Xstormy16 Options">
  32. <style type="text/css">
  33. <!--
  34. a.summary-letter {text-decoration: none}
  35. blockquote.indentedblock {margin-right: 0em}
  36. blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
  37. blockquote.smallquotation {font-size: smaller}
  38. div.display {margin-left: 3.2em}
  39. div.example {margin-left: 3.2em}
  40. div.lisp {margin-left: 3.2em}
  41. div.smalldisplay {margin-left: 3.2em}
  42. div.smallexample {margin-left: 3.2em}
  43. div.smalllisp {margin-left: 3.2em}
  44. kbd {font-style: oblique}
  45. pre.display {font-family: inherit}
  46. pre.format {font-family: inherit}
  47. pre.menu-comment {font-family: serif}
  48. pre.menu-preformatted {font-family: serif}
  49. pre.smalldisplay {font-family: inherit; font-size: smaller}
  50. pre.smallexample {font-size: smaller}
  51. pre.smallformat {font-family: inherit; font-size: smaller}
  52. pre.smalllisp {font-size: smaller}
  53. span.nolinebreak {white-space: nowrap}
  54. span.roman {font-family: initial; font-weight: normal}
  55. span.sansserif {font-family: sans-serif; font-weight: normal}
  56. ul.no-bullet {list-style: none}
  57. -->
  58. </style>
  59. </head>
  60. <body lang="en">
  61. <a name="Xtensa-Options"></a>
  62. <div class="header">
  63. <p>
  64. Next: <a href="zSeries-Options.html#zSeries-Options" accesskey="n" rel="next">zSeries Options</a>, Previous: <a href="Xstormy16-Options.html#Xstormy16-Options" accesskey="p" rel="prev">Xstormy16 Options</a>, Up: <a href="Submodel-Options.html#Submodel-Options" accesskey="u" rel="up">Submodel Options</a> &nbsp; [<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>
  65. </div>
  66. <hr>
  67. <a name="Xtensa-Options-1"></a>
  68. <h4 class="subsection">3.19.62 Xtensa Options</h4>
  69. <a name="index-Xtensa-Options"></a>
  70. <p>These options are supported for Xtensa targets:
  71. </p>
  72. <dl compact="compact">
  73. <dt><code>-mconst16</code></dt>
  74. <dt><code>-mno-const16</code></dt>
  75. <dd><a name="index-mconst16"></a>
  76. <a name="index-mno_002dconst16"></a>
  77. <p>Enable or disable use of <code>CONST16</code> instructions for loading
  78. constant values. The <code>CONST16</code> instruction is currently not a
  79. standard option from Tensilica. When enabled, <code>CONST16</code>
  80. instructions are always used in place of the standard <code>L32R</code>
  81. instructions. The use of <code>CONST16</code> is enabled by default only if
  82. the <code>L32R</code> instruction is not available.
  83. </p>
  84. </dd>
  85. <dt><code>-mfused-madd</code></dt>
  86. <dt><code>-mno-fused-madd</code></dt>
  87. <dd><a name="index-mfused_002dmadd-5"></a>
  88. <a name="index-mno_002dfused_002dmadd-5"></a>
  89. <p>Enable or disable use of fused multiply/add and multiply/subtract
  90. instructions in the floating-point option. This has no effect if the
  91. floating-point option is not also enabled. Disabling fused multiply/add
  92. and multiply/subtract instructions forces the compiler to use separate
  93. instructions for the multiply and add/subtract operations. This may be
  94. desirable in some cases where strict IEEE 754-compliant results are
  95. required: the fused multiply add/subtract instructions do not round the
  96. intermediate result, thereby producing results with <em>more</em> bits of
  97. precision than specified by the IEEE standard. Disabling fused multiply
  98. add/subtract instructions also ensures that the program output is not
  99. sensitive to the compiler&rsquo;s ability to combine multiply and add/subtract
  100. operations.
  101. </p>
  102. </dd>
  103. <dt><code>-mserialize-volatile</code></dt>
  104. <dt><code>-mno-serialize-volatile</code></dt>
  105. <dd><a name="index-mserialize_002dvolatile"></a>
  106. <a name="index-mno_002dserialize_002dvolatile"></a>
  107. <p>When this option is enabled, GCC inserts <code>MEMW</code> instructions before
  108. <code>volatile</code> memory references to guarantee sequential consistency.
  109. The default is <samp>-mserialize-volatile</samp>. Use
  110. <samp>-mno-serialize-volatile</samp> to omit the <code>MEMW</code> instructions.
  111. </p>
  112. </dd>
  113. <dt><code>-mforce-no-pic</code></dt>
  114. <dd><a name="index-mforce_002dno_002dpic"></a>
  115. <p>For targets, like GNU/Linux, where all user-mode Xtensa code must be
  116. position-independent code (PIC), this option disables PIC for compiling
  117. kernel code.
  118. </p>
  119. </dd>
  120. <dt><code>-mtext-section-literals</code></dt>
  121. <dt><code>-mno-text-section-literals</code></dt>
  122. <dd><a name="index-mtext_002dsection_002dliterals"></a>
  123. <a name="index-mno_002dtext_002dsection_002dliterals"></a>
  124. <p>These options control the treatment of literal pools. The default is
  125. <samp>-mno-text-section-literals</samp>, which places literals in a separate
  126. section in the output file. This allows the literal pool to be placed
  127. in a data RAM/ROM, and it also allows the linker to combine literal
  128. pools from separate object files to remove redundant literals and
  129. improve code size. With <samp>-mtext-section-literals</samp>, the literals
  130. are interspersed in the text section in order to keep them as close as
  131. possible to their references. This may be necessary for large assembly
  132. files. Literals for each function are placed right before that function.
  133. </p>
  134. </dd>
  135. <dt><code>-mauto-litpools</code></dt>
  136. <dt><code>-mno-auto-litpools</code></dt>
  137. <dd><a name="index-mauto_002dlitpools"></a>
  138. <a name="index-mno_002dauto_002dlitpools"></a>
  139. <p>These options control the treatment of literal pools. The default is
  140. <samp>-mno-auto-litpools</samp>, which places literals in a separate
  141. section in the output file unless <samp>-mtext-section-literals</samp> is
  142. used. With <samp>-mauto-litpools</samp> the literals are interspersed in
  143. the text section by the assembler. Compiler does not produce explicit
  144. <code>.literal</code> directives and loads literals into registers with
  145. <code>MOVI</code> instructions instead of <code>L32R</code> to let the assembler
  146. do relaxation and place literals as necessary. This option allows
  147. assembler to create several literal pools per function and assemble
  148. very big functions, which may not be possible with
  149. <samp>-mtext-section-literals</samp>.
  150. </p>
  151. </dd>
  152. <dt><code>-mtarget-align</code></dt>
  153. <dt><code>-mno-target-align</code></dt>
  154. <dd><a name="index-mtarget_002dalign"></a>
  155. <a name="index-mno_002dtarget_002dalign"></a>
  156. <p>When this option is enabled, GCC instructs the assembler to
  157. automatically align instructions to reduce branch penalties at the
  158. expense of some code density. The assembler attempts to widen density
  159. instructions to align branch targets and the instructions following call
  160. instructions. If there are not enough preceding safe density
  161. instructions to align a target, no widening is performed. The
  162. default is <samp>-mtarget-align</samp>. These options do not affect the
  163. treatment of auto-aligned instructions like <code>LOOP</code>, which the
  164. assembler always aligns, either by widening density instructions or
  165. by inserting NOP instructions.
  166. </p>
  167. </dd>
  168. <dt><code>-mlongcalls</code></dt>
  169. <dt><code>-mno-longcalls</code></dt>
  170. <dd><a name="index-mlongcalls"></a>
  171. <a name="index-mno_002dlongcalls"></a>
  172. <p>When this option is enabled, GCC instructs the assembler to translate
  173. direct calls to indirect calls unless it can determine that the target
  174. of a direct call is in the range allowed by the call instruction. This
  175. translation typically occurs for calls to functions in other source
  176. files. Specifically, the assembler translates a direct <code>CALL</code>
  177. instruction into an <code>L32R</code> followed by a <code>CALLX</code> instruction.
  178. The default is <samp>-mno-longcalls</samp>. This option should be used in
  179. programs where the call target can potentially be out of range. This
  180. option is implemented in the assembler, not the compiler, so the
  181. assembly code generated by GCC still shows direct call
  182. instructions&mdash;look at the disassembled object code to see the actual
  183. instructions. Note that the assembler uses an indirect call for
  184. every cross-file call, not just those that really are out of range.
  185. </p></dd>
  186. </dl>
  187. <hr>
  188. <div class="header">
  189. <p>
  190. Next: <a href="zSeries-Options.html#zSeries-Options" accesskey="n" rel="next">zSeries Options</a>, Previous: <a href="Xstormy16-Options.html#Xstormy16-Options" accesskey="p" rel="prev">Xstormy16 Options</a>, Up: <a href="Submodel-Options.html#Submodel-Options" accesskey="u" rel="up">Submodel Options</a> &nbsp; [<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>
  191. </div>
  192. </body>
  193. </html>