Xtensa-Options.html 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208
  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-2017 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 5.2, http://www.gnu.org/software/texinfo/ -->
  18. <head>
  19. <title>Using the GNU Compiler Collection (GCC): Xtensa Options</title>
  20. <meta name="description" content="Using the GNU Compiler Collection (GCC): Xtensa Options">
  21. <meta name="keywords" content="Using the GNU Compiler Collection (GCC): Xtensa Options">
  22. <meta name="resource-type" content="document">
  23. <meta name="distribution" content="global">
  24. <meta name="Generator" content="makeinfo">
  25. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  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.smallquotation {font-size: smaller}
  36. div.display {margin-left: 3.2em}
  37. div.example {margin-left: 3.2em}
  38. div.indentedblock {margin-left: 3.2em}
  39. div.lisp {margin-left: 3.2em}
  40. div.smalldisplay {margin-left: 3.2em}
  41. div.smallexample {margin-left: 3.2em}
  42. div.smallindentedblock {margin-left: 3.2em; font-size: smaller}
  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.nocodebreak {white-space:nowrap}
  54. span.nolinebreak {white-space:nowrap}
  55. span.roman {font-family:serif; font-weight:normal}
  56. span.sansserif {font-family:sans-serif; font-weight:normal}
  57. ul.no-bullet {list-style: none}
  58. -->
  59. </style>
  60. </head>
  61. <body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
  62. <a name="Xtensa-Options"></a>
  63. <div class="header">
  64. <p>
  65. 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>
  66. </div>
  67. <hr>
  68. <a name="Xtensa-Options-1"></a>
  69. <h4 class="subsection">3.18.58 Xtensa Options</h4>
  70. <a name="index-Xtensa-Options"></a>
  71. <p>These options are supported for Xtensa targets:
  72. </p>
  73. <dl compact="compact">
  74. <dt><code>-mconst16</code></dt>
  75. <dt><code>-mno-const16</code></dt>
  76. <dd><a name="index-mconst16"></a>
  77. <a name="index-mno_002dconst16"></a>
  78. <p>Enable or disable use of <code>CONST16</code> instructions for loading
  79. constant values. The <code>CONST16</code> instruction is currently not a
  80. standard option from Tensilica. When enabled, <code>CONST16</code>
  81. instructions are always used in place of the standard <code>L32R</code>
  82. instructions. The use of <code>CONST16</code> is enabled by default only if
  83. the <code>L32R</code> instruction is not available.
  84. </p>
  85. </dd>
  86. <dt><code>-mfused-madd</code></dt>
  87. <dt><code>-mno-fused-madd</code></dt>
  88. <dd><a name="index-mfused_002dmadd-5"></a>
  89. <a name="index-mno_002dfused_002dmadd-5"></a>
  90. <p>Enable or disable use of fused multiply/add and multiply/subtract
  91. instructions in the floating-point option. This has no effect if the
  92. floating-point option is not also enabled. Disabling fused multiply/add
  93. and multiply/subtract instructions forces the compiler to use separate
  94. instructions for the multiply and add/subtract operations. This may be
  95. desirable in some cases where strict IEEE 754-compliant results are
  96. required: the fused multiply add/subtract instructions do not round the
  97. intermediate result, thereby producing results with <em>more</em> bits of
  98. precision than specified by the IEEE standard. Disabling fused multiply
  99. add/subtract instructions also ensures that the program output is not
  100. sensitive to the compiler&rsquo;s ability to combine multiply and add/subtract
  101. operations.
  102. </p>
  103. </dd>
  104. <dt><code>-mserialize-volatile</code></dt>
  105. <dt><code>-mno-serialize-volatile</code></dt>
  106. <dd><a name="index-mserialize_002dvolatile"></a>
  107. <a name="index-mno_002dserialize_002dvolatile"></a>
  108. <p>When this option is enabled, GCC inserts <code>MEMW</code> instructions before
  109. <code>volatile</code> memory references to guarantee sequential consistency.
  110. The default is <samp>-mserialize-volatile</samp>. Use
  111. <samp>-mno-serialize-volatile</samp> to omit the <code>MEMW</code> instructions.
  112. </p>
  113. </dd>
  114. <dt><code>-mforce-no-pic</code></dt>
  115. <dd><a name="index-mforce_002dno_002dpic"></a>
  116. <p>For targets, like GNU/Linux, where all user-mode Xtensa code must be
  117. position-independent code (PIC), this option disables PIC for compiling
  118. kernel code.
  119. </p>
  120. </dd>
  121. <dt><code>-mtext-section-literals</code></dt>
  122. <dt><code>-mno-text-section-literals</code></dt>
  123. <dd><a name="index-mtext_002dsection_002dliterals"></a>
  124. <a name="index-mno_002dtext_002dsection_002dliterals"></a>
  125. <p>These options control the treatment of literal pools. The default is
  126. <samp>-mno-text-section-literals</samp>, which places literals in a separate
  127. section in the output file. This allows the literal pool to be placed
  128. in a data RAM/ROM, and it also allows the linker to combine literal
  129. pools from separate object files to remove redundant literals and
  130. improve code size. With <samp>-mtext-section-literals</samp>, the literals
  131. are interspersed in the text section in order to keep them as close as
  132. possible to their references. This may be necessary for large assembly
  133. files. Literals for each function are placed right before that function.
  134. </p>
  135. </dd>
  136. <dt><code>-mauto-litpools</code></dt>
  137. <dt><code>-mno-auto-litpools</code></dt>
  138. <dd><a name="index-mauto_002dlitpools"></a>
  139. <a name="index-mno_002dauto_002dlitpools"></a>
  140. <p>These options control the treatment of literal pools. The default is
  141. <samp>-mno-auto-litpools</samp>, which places literals in a separate
  142. section in the output file unless <samp>-mtext-section-literals</samp> is
  143. used. With <samp>-mauto-litpools</samp> the literals are interspersed in
  144. the text section by the assembler. Compiler does not produce explicit
  145. <code>.literal</code> directives and loads literals into registers with
  146. <code>MOVI</code> instructions instead of <code>L32R</code> to let the assembler
  147. do relaxation and place literals as necessary. This option allows
  148. assembler to create several literal pools per function and assemble
  149. very big functions, which may not be possible with
  150. <samp>-mtext-section-literals</samp>.
  151. </p>
  152. </dd>
  153. <dt><code>-mtarget-align</code></dt>
  154. <dt><code>-mno-target-align</code></dt>
  155. <dd><a name="index-mtarget_002dalign"></a>
  156. <a name="index-mno_002dtarget_002dalign"></a>
  157. <p>When this option is enabled, GCC instructs the assembler to
  158. automatically align instructions to reduce branch penalties at the
  159. expense of some code density. The assembler attempts to widen density
  160. instructions to align branch targets and the instructions following call
  161. instructions. If there are not enough preceding safe density
  162. instructions to align a target, no widening is performed. The
  163. default is <samp>-mtarget-align</samp>. These options do not affect the
  164. treatment of auto-aligned instructions like <code>LOOP</code>, which the
  165. assembler always aligns, either by widening density instructions or
  166. by inserting NOP instructions.
  167. </p>
  168. </dd>
  169. <dt><code>-mlongcalls</code></dt>
  170. <dt><code>-mno-longcalls</code></dt>
  171. <dd><a name="index-mlongcalls"></a>
  172. <a name="index-mno_002dlongcalls"></a>
  173. <p>When this option is enabled, GCC instructs the assembler to translate
  174. direct calls to indirect calls unless it can determine that the target
  175. of a direct call is in the range allowed by the call instruction. This
  176. translation typically occurs for calls to functions in other source
  177. files. Specifically, the assembler translates a direct <code>CALL</code>
  178. instruction into an <code>L32R</code> followed by a <code>CALLX</code> instruction.
  179. The default is <samp>-mno-longcalls</samp>. This option should be used in
  180. programs where the call target can potentially be out of range. This
  181. option is implemented in the assembler, not the compiler, so the
  182. assembly code generated by GCC still shows direct call
  183. instructions&mdash;look at the disassembled object code to see the actual
  184. instructions. Note that the assembler uses an indirect call for
  185. every cross-file call, not just those that really are out of range.
  186. </p></dd>
  187. </dl>
  188. <hr>
  189. <div class="header">
  190. <p>
  191. 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>
  192. </div>
  193. </body>
  194. </html>