No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

1286 líneas
55KB

  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>MIPS Options (Using the GNU Compiler Collection (GCC))</title>
  21. <meta name="description" content="MIPS Options (Using the GNU Compiler Collection (GCC))">
  22. <meta name="keywords" content="MIPS 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="MMIX-Options.html#MMIX-Options" rel="next" title="MMIX Options">
  31. <link href="MicroBlaze-Options.html#MicroBlaze-Options" rel="prev" title="MicroBlaze 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="MIPS-Options"></a>
  62. <div class="header">
  63. <p>
  64. Next: <a href="MMIX-Options.html#MMIX-Options" accesskey="n" rel="next">MMIX Options</a>, Previous: <a href="MicroBlaze-Options.html#MicroBlaze-Options" accesskey="p" rel="prev">MicroBlaze 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="MIPS-Options-1"></a>
  68. <h4 class="subsection">3.19.29 MIPS Options</h4>
  69. <a name="index-MIPS-options"></a>
  70. <dl compact="compact">
  71. <dt><code>-EB</code></dt>
  72. <dd><a name="index-EB-2"></a>
  73. <p>Generate big-endian code.
  74. </p>
  75. </dd>
  76. <dt><code>-EL</code></dt>
  77. <dd><a name="index-EL-2"></a>
  78. <p>Generate little-endian code. This is the default for &lsquo;<samp>mips*el-*-*</samp>&rsquo;
  79. configurations.
  80. </p>
  81. </dd>
  82. <dt><code>-march=<var>arch</var></code></dt>
  83. <dd><a name="index-march-8"></a>
  84. <p>Generate code that runs on <var>arch</var>, which can be the name of a
  85. generic MIPS ISA, or the name of a particular processor.
  86. The ISA names are:
  87. &lsquo;<samp>mips1</samp>&rsquo;, &lsquo;<samp>mips2</samp>&rsquo;, &lsquo;<samp>mips3</samp>&rsquo;, &lsquo;<samp>mips4</samp>&rsquo;,
  88. &lsquo;<samp>mips32</samp>&rsquo;, &lsquo;<samp>mips32r2</samp>&rsquo;, &lsquo;<samp>mips32r3</samp>&rsquo;, &lsquo;<samp>mips32r5</samp>&rsquo;,
  89. &lsquo;<samp>mips32r6</samp>&rsquo;, &lsquo;<samp>mips64</samp>&rsquo;, &lsquo;<samp>mips64r2</samp>&rsquo;, &lsquo;<samp>mips64r3</samp>&rsquo;,
  90. &lsquo;<samp>mips64r5</samp>&rsquo; and &lsquo;<samp>mips64r6</samp>&rsquo;.
  91. The processor names are:
  92. &lsquo;<samp>4kc</samp>&rsquo;, &lsquo;<samp>4km</samp>&rsquo;, &lsquo;<samp>4kp</samp>&rsquo;, &lsquo;<samp>4ksc</samp>&rsquo;,
  93. &lsquo;<samp>4kec</samp>&rsquo;, &lsquo;<samp>4kem</samp>&rsquo;, &lsquo;<samp>4kep</samp>&rsquo;, &lsquo;<samp>4ksd</samp>&rsquo;,
  94. &lsquo;<samp>5kc</samp>&rsquo;, &lsquo;<samp>5kf</samp>&rsquo;,
  95. &lsquo;<samp>20kc</samp>&rsquo;,
  96. &lsquo;<samp>24kc</samp>&rsquo;, &lsquo;<samp>24kf2_1</samp>&rsquo;, &lsquo;<samp>24kf1_1</samp>&rsquo;,
  97. &lsquo;<samp>24kec</samp>&rsquo;, &lsquo;<samp>24kef2_1</samp>&rsquo;, &lsquo;<samp>24kef1_1</samp>&rsquo;,
  98. &lsquo;<samp>34kc</samp>&rsquo;, &lsquo;<samp>34kf2_1</samp>&rsquo;, &lsquo;<samp>34kf1_1</samp>&rsquo;, &lsquo;<samp>34kn</samp>&rsquo;,
  99. &lsquo;<samp>74kc</samp>&rsquo;, &lsquo;<samp>74kf2_1</samp>&rsquo;, &lsquo;<samp>74kf1_1</samp>&rsquo;, &lsquo;<samp>74kf3_2</samp>&rsquo;,
  100. &lsquo;<samp>1004kc</samp>&rsquo;, &lsquo;<samp>1004kf2_1</samp>&rsquo;, &lsquo;<samp>1004kf1_1</samp>&rsquo;,
  101. &lsquo;<samp>i6400</samp>&rsquo;, &lsquo;<samp>i6500</samp>&rsquo;,
  102. &lsquo;<samp>interaptiv</samp>&rsquo;,
  103. &lsquo;<samp>loongson2e</samp>&rsquo;, &lsquo;<samp>loongson2f</samp>&rsquo;, &lsquo;<samp>loongson3a</samp>&rsquo;, &lsquo;<samp>gs464</samp>&rsquo;,
  104. &lsquo;<samp>gs464e</samp>&rsquo;, &lsquo;<samp>gs264e</samp>&rsquo;,
  105. &lsquo;<samp>m4k</samp>&rsquo;,
  106. &lsquo;<samp>m14k</samp>&rsquo;, &lsquo;<samp>m14kc</samp>&rsquo;, &lsquo;<samp>m14ke</samp>&rsquo;, &lsquo;<samp>m14kec</samp>&rsquo;,
  107. &lsquo;<samp>m5100</samp>&rsquo;, &lsquo;<samp>m5101</samp>&rsquo;,
  108. &lsquo;<samp>octeon</samp>&rsquo;, &lsquo;<samp>octeon+</samp>&rsquo;, &lsquo;<samp>octeon2</samp>&rsquo;, &lsquo;<samp>octeon3</samp>&rsquo;,
  109. &lsquo;<samp>orion</samp>&rsquo;,
  110. &lsquo;<samp>p5600</samp>&rsquo;, &lsquo;<samp>p6600</samp>&rsquo;,
  111. &lsquo;<samp>r2000</samp>&rsquo;, &lsquo;<samp>r3000</samp>&rsquo;, &lsquo;<samp>r3900</samp>&rsquo;, &lsquo;<samp>r4000</samp>&rsquo;, &lsquo;<samp>r4400</samp>&rsquo;,
  112. &lsquo;<samp>r4600</samp>&rsquo;, &lsquo;<samp>r4650</samp>&rsquo;, &lsquo;<samp>r4700</samp>&rsquo;, &lsquo;<samp>r5900</samp>&rsquo;,
  113. &lsquo;<samp>r6000</samp>&rsquo;, &lsquo;<samp>r8000</samp>&rsquo;,
  114. &lsquo;<samp>rm7000</samp>&rsquo;, &lsquo;<samp>rm9000</samp>&rsquo;,
  115. &lsquo;<samp>r10000</samp>&rsquo;, &lsquo;<samp>r12000</samp>&rsquo;, &lsquo;<samp>r14000</samp>&rsquo;, &lsquo;<samp>r16000</samp>&rsquo;,
  116. &lsquo;<samp>sb1</samp>&rsquo;,
  117. &lsquo;<samp>sr71000</samp>&rsquo;,
  118. &lsquo;<samp>vr4100</samp>&rsquo;, &lsquo;<samp>vr4111</samp>&rsquo;, &lsquo;<samp>vr4120</samp>&rsquo;, &lsquo;<samp>vr4130</samp>&rsquo;, &lsquo;<samp>vr4300</samp>&rsquo;,
  119. &lsquo;<samp>vr5000</samp>&rsquo;, &lsquo;<samp>vr5400</samp>&rsquo;, &lsquo;<samp>vr5500</samp>&rsquo;,
  120. &lsquo;<samp>xlr</samp>&rsquo; and &lsquo;<samp>xlp</samp>&rsquo;.
  121. The special value &lsquo;<samp>from-abi</samp>&rsquo; selects the
  122. most compatible architecture for the selected ABI (that is,
  123. &lsquo;<samp>mips1</samp>&rsquo; for 32-bit ABIs and &lsquo;<samp>mips3</samp>&rsquo; for 64-bit ABIs).
  124. </p>
  125. <p>The native Linux/GNU toolchain also supports the value &lsquo;<samp>native</samp>&rsquo;,
  126. which selects the best architecture option for the host processor.
  127. <samp>-march=native</samp> has no effect if GCC does not recognize
  128. the processor.
  129. </p>
  130. <p>In processor names, a final &lsquo;<samp>000</samp>&rsquo; can be abbreviated as &lsquo;<samp>k</samp>&rsquo;
  131. (for example, <samp>-march=r2k</samp>). Prefixes are optional, and
  132. &lsquo;<samp>vr</samp>&rsquo; may be written &lsquo;<samp>r</samp>&rsquo;.
  133. </p>
  134. <p>Names of the form &lsquo;<samp><var>n</var>f2_1</samp>&rsquo; refer to processors with
  135. FPUs clocked at half the rate of the core, names of the form
  136. &lsquo;<samp><var>n</var>f1_1</samp>&rsquo; refer to processors with FPUs clocked at the same
  137. rate as the core, and names of the form &lsquo;<samp><var>n</var>f3_2</samp>&rsquo; refer to
  138. processors with FPUs clocked a ratio of 3:2 with respect to the core.
  139. For compatibility reasons, &lsquo;<samp><var>n</var>f</samp>&rsquo; is accepted as a synonym
  140. for &lsquo;<samp><var>n</var>f2_1</samp>&rsquo; while &lsquo;<samp><var>n</var>x</samp>&rsquo; and &lsquo;<samp><var>b</var>fx</samp>&rsquo; are
  141. accepted as synonyms for &lsquo;<samp><var>n</var>f1_1</samp>&rsquo;.
  142. </p>
  143. <p>GCC defines two macros based on the value of this option. The first
  144. is <code>_MIPS_ARCH</code>, which gives the name of target architecture, as
  145. a string. The second has the form <code>_MIPS_ARCH_<var>foo</var></code>,
  146. where <var>foo</var> is the capitalized value of <code>_MIPS_ARCH</code>.
  147. For example, <samp>-march=r2000</samp> sets <code>_MIPS_ARCH</code>
  148. to <code>&quot;r2000&quot;</code> and defines the macro <code>_MIPS_ARCH_R2000</code>.
  149. </p>
  150. <p>Note that the <code>_MIPS_ARCH</code> macro uses the processor names given
  151. above. In other words, it has the full prefix and does not
  152. abbreviate &lsquo;<samp>000</samp>&rsquo; as &lsquo;<samp>k</samp>&rsquo;. In the case of &lsquo;<samp>from-abi</samp>&rsquo;,
  153. the macro names the resolved architecture (either <code>&quot;mips1&quot;</code> or
  154. <code>&quot;mips3&quot;</code>). It names the default architecture when no
  155. <samp>-march</samp> option is given.
  156. </p>
  157. </dd>
  158. <dt><code>-mtune=<var>arch</var></code></dt>
  159. <dd><a name="index-mtune-9"></a>
  160. <p>Optimize for <var>arch</var>. Among other things, this option controls
  161. the way instructions are scheduled, and the perceived cost of arithmetic
  162. operations. The list of <var>arch</var> values is the same as for
  163. <samp>-march</samp>.
  164. </p>
  165. <p>When this option is not used, GCC optimizes for the processor
  166. specified by <samp>-march</samp>. By using <samp>-march</samp> and
  167. <samp>-mtune</samp> together, it is possible to generate code that
  168. runs on a family of processors, but optimize the code for one
  169. particular member of that family.
  170. </p>
  171. <p><samp>-mtune</samp> defines the macros <code>_MIPS_TUNE</code> and
  172. <code>_MIPS_TUNE_<var>foo</var></code>, which work in the same way as the
  173. <samp>-march</samp> ones described above.
  174. </p>
  175. </dd>
  176. <dt><code>-mips1</code></dt>
  177. <dd><a name="index-mips1"></a>
  178. <p>Equivalent to <samp>-march=mips1</samp>.
  179. </p>
  180. </dd>
  181. <dt><code>-mips2</code></dt>
  182. <dd><a name="index-mips2"></a>
  183. <p>Equivalent to <samp>-march=mips2</samp>.
  184. </p>
  185. </dd>
  186. <dt><code>-mips3</code></dt>
  187. <dd><a name="index-mips3"></a>
  188. <p>Equivalent to <samp>-march=mips3</samp>.
  189. </p>
  190. </dd>
  191. <dt><code>-mips4</code></dt>
  192. <dd><a name="index-mips4"></a>
  193. <p>Equivalent to <samp>-march=mips4</samp>.
  194. </p>
  195. </dd>
  196. <dt><code>-mips32</code></dt>
  197. <dd><a name="index-mips32"></a>
  198. <p>Equivalent to <samp>-march=mips32</samp>.
  199. </p>
  200. </dd>
  201. <dt><code>-mips32r3</code></dt>
  202. <dd><a name="index-mips32r3"></a>
  203. <p>Equivalent to <samp>-march=mips32r3</samp>.
  204. </p>
  205. </dd>
  206. <dt><code>-mips32r5</code></dt>
  207. <dd><a name="index-mips32r5"></a>
  208. <p>Equivalent to <samp>-march=mips32r5</samp>.
  209. </p>
  210. </dd>
  211. <dt><code>-mips32r6</code></dt>
  212. <dd><a name="index-mips32r6"></a>
  213. <p>Equivalent to <samp>-march=mips32r6</samp>.
  214. </p>
  215. </dd>
  216. <dt><code>-mips64</code></dt>
  217. <dd><a name="index-mips64"></a>
  218. <p>Equivalent to <samp>-march=mips64</samp>.
  219. </p>
  220. </dd>
  221. <dt><code>-mips64r2</code></dt>
  222. <dd><a name="index-mips64r2"></a>
  223. <p>Equivalent to <samp>-march=mips64r2</samp>.
  224. </p>
  225. </dd>
  226. <dt><code>-mips64r3</code></dt>
  227. <dd><a name="index-mips64r3"></a>
  228. <p>Equivalent to <samp>-march=mips64r3</samp>.
  229. </p>
  230. </dd>
  231. <dt><code>-mips64r5</code></dt>
  232. <dd><a name="index-mips64r5"></a>
  233. <p>Equivalent to <samp>-march=mips64r5</samp>.
  234. </p>
  235. </dd>
  236. <dt><code>-mips64r6</code></dt>
  237. <dd><a name="index-mips64r6"></a>
  238. <p>Equivalent to <samp>-march=mips64r6</samp>.
  239. </p>
  240. </dd>
  241. <dt><code>-mips16</code></dt>
  242. <dt><code>-mno-mips16</code></dt>
  243. <dd><a name="index-mips16"></a>
  244. <a name="index-mno_002dmips16"></a>
  245. <p>Generate (do not generate) MIPS16 code. If GCC is targeting a
  246. MIPS32 or MIPS64 architecture, it makes use of the MIPS16e ASE.
  247. </p>
  248. <p>MIPS16 code generation can also be controlled on a per-function basis
  249. by means of <code>mips16</code> and <code>nomips16</code> attributes.
  250. See <a href="Function-Attributes.html#Function-Attributes">Function Attributes</a>, for more information.
  251. </p>
  252. </dd>
  253. <dt><code>-mflip-mips16</code></dt>
  254. <dd><a name="index-mflip_002dmips16"></a>
  255. <p>Generate MIPS16 code on alternating functions. This option is provided
  256. for regression testing of mixed MIPS16/non-MIPS16 code generation, and is
  257. not intended for ordinary use in compiling user code.
  258. </p>
  259. </dd>
  260. <dt><code>-minterlink-compressed</code></dt>
  261. <dt><code>-mno-interlink-compressed</code></dt>
  262. <dd><a name="index-minterlink_002dcompressed"></a>
  263. <a name="index-mno_002dinterlink_002dcompressed"></a>
  264. <p>Require (do not require) that code using the standard (uncompressed) MIPS ISA
  265. be link-compatible with MIPS16 and microMIPS code, and vice versa.
  266. </p>
  267. <p>For example, code using the standard ISA encoding cannot jump directly
  268. to MIPS16 or microMIPS code; it must either use a call or an indirect jump.
  269. <samp>-minterlink-compressed</samp> therefore disables direct jumps unless GCC
  270. knows that the target of the jump is not compressed.
  271. </p>
  272. </dd>
  273. <dt><code>-minterlink-mips16</code></dt>
  274. <dt><code>-mno-interlink-mips16</code></dt>
  275. <dd><a name="index-minterlink_002dmips16"></a>
  276. <a name="index-mno_002dinterlink_002dmips16"></a>
  277. <p>Aliases of <samp>-minterlink-compressed</samp> and
  278. <samp>-mno-interlink-compressed</samp>. These options predate the microMIPS ASE
  279. and are retained for backwards compatibility.
  280. </p>
  281. </dd>
  282. <dt><code>-mabi=32</code></dt>
  283. <dt><code>-mabi=o64</code></dt>
  284. <dt><code>-mabi=n32</code></dt>
  285. <dt><code>-mabi=64</code></dt>
  286. <dt><code>-mabi=eabi</code></dt>
  287. <dd><a name="index-mabi_003d32"></a>
  288. <a name="index-mabi_003do64"></a>
  289. <a name="index-mabi_003dn32"></a>
  290. <a name="index-mabi_003d64"></a>
  291. <a name="index-mabi_003deabi"></a>
  292. <p>Generate code for the given ABI.
  293. </p>
  294. <p>Note that the EABI has a 32-bit and a 64-bit variant. GCC normally
  295. generates 64-bit code when you select a 64-bit architecture, but you
  296. can use <samp>-mgp32</samp> to get 32-bit code instead.
  297. </p>
  298. <p>For information about the O64 ABI, see
  299. <a href="http://gcc.gnu.org/projects/mipso64-abi.html">http://gcc.gnu.org/projects/mipso64-abi.html</a>.
  300. </p>
  301. <p>GCC supports a variant of the o32 ABI in which floating-point registers
  302. are 64 rather than 32 bits wide. You can select this combination with
  303. <samp>-mabi=32</samp> <samp>-mfp64</samp>. This ABI relies on the <code>mthc1</code>
  304. and <code>mfhc1</code> instructions and is therefore only supported for
  305. MIPS32R2, MIPS32R3 and MIPS32R5 processors.
  306. </p>
  307. <p>The register assignments for arguments and return values remain the
  308. same, but each scalar value is passed in a single 64-bit register
  309. rather than a pair of 32-bit registers. For example, scalar
  310. floating-point values are returned in &lsquo;<samp>$f0</samp>&rsquo; only, not a
  311. &lsquo;<samp>$f0</samp>&rsquo;/&lsquo;<samp>$f1</samp>&rsquo; pair. The set of call-saved registers also
  312. remains the same in that the even-numbered double-precision registers
  313. are saved.
  314. </p>
  315. <p>Two additional variants of the o32 ABI are supported to enable
  316. a transition from 32-bit to 64-bit registers. These are FPXX
  317. (<samp>-mfpxx</samp>) and FP64A (<samp>-mfp64</samp> <samp>-mno-odd-spreg</samp>).
  318. The FPXX extension mandates that all code must execute correctly
  319. when run using 32-bit or 64-bit registers. The code can be interlinked
  320. with either FP32 or FP64, but not both.
  321. The FP64A extension is similar to the FP64 extension but forbids the
  322. use of odd-numbered single-precision registers. This can be used
  323. in conjunction with the <code>FRE</code> mode of FPUs in MIPS32R5
  324. processors and allows both FP32 and FP64A code to interlink and
  325. run in the same process without changing FPU modes.
  326. </p>
  327. </dd>
  328. <dt><code>-mabicalls</code></dt>
  329. <dt><code>-mno-abicalls</code></dt>
  330. <dd><a name="index-mabicalls"></a>
  331. <a name="index-mno_002dabicalls"></a>
  332. <p>Generate (do not generate) code that is suitable for SVR4-style
  333. dynamic objects. <samp>-mabicalls</samp> is the default for SVR4-based
  334. systems.
  335. </p>
  336. </dd>
  337. <dt><code>-mshared</code></dt>
  338. <dt><code>-mno-shared</code></dt>
  339. <dd><p>Generate (do not generate) code that is fully position-independent,
  340. and that can therefore be linked into shared libraries. This option
  341. only affects <samp>-mabicalls</samp>.
  342. </p>
  343. <p>All <samp>-mabicalls</samp> code has traditionally been position-independent,
  344. regardless of options like <samp>-fPIC</samp> and <samp>-fpic</samp>. However,
  345. as an extension, the GNU toolchain allows executables to use absolute
  346. accesses for locally-binding symbols. It can also use shorter GP
  347. initialization sequences and generate direct calls to locally-defined
  348. functions. This mode is selected by <samp>-mno-shared</samp>.
  349. </p>
  350. <p><samp>-mno-shared</samp> depends on binutils 2.16 or higher and generates
  351. objects that can only be linked by the GNU linker. However, the option
  352. does not affect the ABI of the final executable; it only affects the ABI
  353. of relocatable objects. Using <samp>-mno-shared</samp> generally makes
  354. executables both smaller and quicker.
  355. </p>
  356. <p><samp>-mshared</samp> is the default.
  357. </p>
  358. </dd>
  359. <dt><code>-mplt</code></dt>
  360. <dt><code>-mno-plt</code></dt>
  361. <dd><a name="index-mplt"></a>
  362. <a name="index-mno_002dplt"></a>
  363. <p>Assume (do not assume) that the static and dynamic linkers
  364. support PLTs and copy relocations. This option only affects
  365. <samp>-mno-shared -mabicalls</samp>. For the n64 ABI, this option
  366. has no effect without <samp>-msym32</samp>.
  367. </p>
  368. <p>You can make <samp>-mplt</samp> the default by configuring
  369. GCC with <samp>--with-mips-plt</samp>. The default is
  370. <samp>-mno-plt</samp> otherwise.
  371. </p>
  372. </dd>
  373. <dt><code>-mxgot</code></dt>
  374. <dt><code>-mno-xgot</code></dt>
  375. <dd><a name="index-mxgot-1"></a>
  376. <a name="index-mno_002dxgot-1"></a>
  377. <p>Lift (do not lift) the usual restrictions on the size of the global
  378. offset table.
  379. </p>
  380. <p>GCC normally uses a single instruction to load values from the GOT.
  381. While this is relatively efficient, it only works if the GOT
  382. is smaller than about 64k. Anything larger causes the linker
  383. to report an error such as:
  384. </p>
  385. <a name="index-relocation-truncated-to-fit-_0028MIPS_0029"></a>
  386. <div class="smallexample">
  387. <pre class="smallexample">relocation truncated to fit: R_MIPS_GOT16 foobar
  388. </pre></div>
  389. <p>If this happens, you should recompile your code with <samp>-mxgot</samp>.
  390. This works with very large GOTs, although the code is also
  391. less efficient, since it takes three instructions to fetch the
  392. value of a global symbol.
  393. </p>
  394. <p>Note that some linkers can create multiple GOTs. If you have such a
  395. linker, you should only need to use <samp>-mxgot</samp> when a single object
  396. file accesses more than 64k&rsquo;s worth of GOT entries. Very few do.
  397. </p>
  398. <p>These options have no effect unless GCC is generating position
  399. independent code.
  400. </p>
  401. </dd>
  402. <dt><code>-mgp32</code></dt>
  403. <dd><a name="index-mgp32"></a>
  404. <p>Assume that general-purpose registers are 32 bits wide.
  405. </p>
  406. </dd>
  407. <dt><code>-mgp64</code></dt>
  408. <dd><a name="index-mgp64"></a>
  409. <p>Assume that general-purpose registers are 64 bits wide.
  410. </p>
  411. </dd>
  412. <dt><code>-mfp32</code></dt>
  413. <dd><a name="index-mfp32"></a>
  414. <p>Assume that floating-point registers are 32 bits wide.
  415. </p>
  416. </dd>
  417. <dt><code>-mfp64</code></dt>
  418. <dd><a name="index-mfp64"></a>
  419. <p>Assume that floating-point registers are 64 bits wide.
  420. </p>
  421. </dd>
  422. <dt><code>-mfpxx</code></dt>
  423. <dd><a name="index-mfpxx"></a>
  424. <p>Do not assume the width of floating-point registers.
  425. </p>
  426. </dd>
  427. <dt><code>-mhard-float</code></dt>
  428. <dd><a name="index-mhard_002dfloat-4"></a>
  429. <p>Use floating-point coprocessor instructions.
  430. </p>
  431. </dd>
  432. <dt><code>-msoft-float</code></dt>
  433. <dd><a name="index-msoft_002dfloat-7"></a>
  434. <p>Do not use floating-point coprocessor instructions. Implement
  435. floating-point calculations using library calls instead.
  436. </p>
  437. </dd>
  438. <dt><code>-mno-float</code></dt>
  439. <dd><a name="index-mno_002dfloat"></a>
  440. <p>Equivalent to <samp>-msoft-float</samp>, but additionally asserts that the
  441. program being compiled does not perform any floating-point operations.
  442. This option is presently supported only by some bare-metal MIPS
  443. configurations, where it may select a special set of libraries
  444. that lack all floating-point support (including, for example, the
  445. floating-point <code>printf</code> formats).
  446. If code compiled with <samp>-mno-float</samp> accidentally contains
  447. floating-point operations, it is likely to suffer a link-time
  448. or run-time failure.
  449. </p>
  450. </dd>
  451. <dt><code>-msingle-float</code></dt>
  452. <dd><a name="index-msingle_002dfloat"></a>
  453. <p>Assume that the floating-point coprocessor only supports single-precision
  454. operations.
  455. </p>
  456. </dd>
  457. <dt><code>-mdouble-float</code></dt>
  458. <dd><a name="index-mdouble_002dfloat-1"></a>
  459. <p>Assume that the floating-point coprocessor supports double-precision
  460. operations. This is the default.
  461. </p>
  462. </dd>
  463. <dt><code>-modd-spreg</code></dt>
  464. <dt><code>-mno-odd-spreg</code></dt>
  465. <dd><a name="index-modd_002dspreg"></a>
  466. <a name="index-mno_002dodd_002dspreg"></a>
  467. <p>Enable the use of odd-numbered single-precision floating-point registers
  468. for the o32 ABI. This is the default for processors that are known to
  469. support these registers. When using the o32 FPXX ABI, <samp>-mno-odd-spreg</samp>
  470. is set by default.
  471. </p>
  472. </dd>
  473. <dt><code>-mabs=2008</code></dt>
  474. <dt><code>-mabs=legacy</code></dt>
  475. <dd><a name="index-mabs_003d2008"></a>
  476. <a name="index-mabs_003dlegacy"></a>
  477. <p>These options control the treatment of the special not-a-number (NaN)
  478. IEEE 754 floating-point data with the <code>abs.<i>fmt</i></code> and
  479. <code>neg.<i>fmt</i></code> machine instructions.
  480. </p>
  481. <p>By default or when <samp>-mabs=legacy</samp> is used the legacy
  482. treatment is selected. In this case these instructions are considered
  483. arithmetic and avoided where correct operation is required and the
  484. input operand might be a NaN. A longer sequence of instructions that
  485. manipulate the sign bit of floating-point datum manually is used
  486. instead unless the <samp>-ffinite-math-only</samp> option has also been
  487. specified.
  488. </p>
  489. <p>The <samp>-mabs=2008</samp> option selects the IEEE 754-2008 treatment. In
  490. this case these instructions are considered non-arithmetic and therefore
  491. operating correctly in all cases, including in particular where the
  492. input operand is a NaN. These instructions are therefore always used
  493. for the respective operations.
  494. </p>
  495. </dd>
  496. <dt><code>-mnan=2008</code></dt>
  497. <dt><code>-mnan=legacy</code></dt>
  498. <dd><a name="index-mnan_003d2008"></a>
  499. <a name="index-mnan_003dlegacy"></a>
  500. <p>These options control the encoding of the special not-a-number (NaN)
  501. IEEE 754 floating-point data.
  502. </p>
  503. <p>The <samp>-mnan=legacy</samp> option selects the legacy encoding. In this
  504. case quiet NaNs (qNaNs) are denoted by the first bit of their trailing
  505. significand field being 0, whereas signaling NaNs (sNaNs) are denoted
  506. by the first bit of their trailing significand field being 1.
  507. </p>
  508. <p>The <samp>-mnan=2008</samp> option selects the IEEE 754-2008 encoding. In
  509. this case qNaNs are denoted by the first bit of their trailing
  510. significand field being 1, whereas sNaNs are denoted by the first bit of
  511. their trailing significand field being 0.
  512. </p>
  513. <p>The default is <samp>-mnan=legacy</samp> unless GCC has been configured with
  514. <samp>--with-nan=2008</samp>.
  515. </p>
  516. </dd>
  517. <dt><code>-mllsc</code></dt>
  518. <dt><code>-mno-llsc</code></dt>
  519. <dd><a name="index-mllsc"></a>
  520. <a name="index-mno_002dllsc"></a>
  521. <p>Use (do not use) &lsquo;<samp>ll</samp>&rsquo;, &lsquo;<samp>sc</samp>&rsquo;, and &lsquo;<samp>sync</samp>&rsquo; instructions to
  522. implement atomic memory built-in functions. When neither option is
  523. specified, GCC uses the instructions if the target architecture
  524. supports them.
  525. </p>
  526. <p><samp>-mllsc</samp> is useful if the runtime environment can emulate the
  527. instructions and <samp>-mno-llsc</samp> can be useful when compiling for
  528. nonstandard ISAs. You can make either option the default by
  529. configuring GCC with <samp>--with-llsc</samp> and <samp>--without-llsc</samp>
  530. respectively. <samp>--with-llsc</samp> is the default for some
  531. configurations; see the installation documentation for details.
  532. </p>
  533. </dd>
  534. <dt><code>-mdsp</code></dt>
  535. <dt><code>-mno-dsp</code></dt>
  536. <dd><a name="index-mdsp-1"></a>
  537. <a name="index-mno_002ddsp"></a>
  538. <p>Use (do not use) revision 1 of the MIPS DSP ASE.
  539. See <a href="MIPS-DSP-Built_002din-Functions.html#MIPS-DSP-Built_002din-Functions">MIPS DSP Built-in Functions</a>. This option defines the
  540. preprocessor macro <code>__mips_dsp</code>. It also defines
  541. <code>__mips_dsp_rev</code> to 1.
  542. </p>
  543. </dd>
  544. <dt><code>-mdspr2</code></dt>
  545. <dt><code>-mno-dspr2</code></dt>
  546. <dd><a name="index-mdspr2"></a>
  547. <a name="index-mno_002ddspr2"></a>
  548. <p>Use (do not use) revision 2 of the MIPS DSP ASE.
  549. See <a href="MIPS-DSP-Built_002din-Functions.html#MIPS-DSP-Built_002din-Functions">MIPS DSP Built-in Functions</a>. This option defines the
  550. preprocessor macros <code>__mips_dsp</code> and <code>__mips_dspr2</code>.
  551. It also defines <code>__mips_dsp_rev</code> to 2.
  552. </p>
  553. </dd>
  554. <dt><code>-msmartmips</code></dt>
  555. <dt><code>-mno-smartmips</code></dt>
  556. <dd><a name="index-msmartmips"></a>
  557. <a name="index-mno_002dsmartmips"></a>
  558. <p>Use (do not use) the MIPS SmartMIPS ASE.
  559. </p>
  560. </dd>
  561. <dt><code>-mpaired-single</code></dt>
  562. <dt><code>-mno-paired-single</code></dt>
  563. <dd><a name="index-mpaired_002dsingle"></a>
  564. <a name="index-mno_002dpaired_002dsingle"></a>
  565. <p>Use (do not use) paired-single floating-point instructions.
  566. See <a href="MIPS-Paired_002dSingle-Support.html#MIPS-Paired_002dSingle-Support">MIPS Paired-Single Support</a>. This option requires
  567. hardware floating-point support to be enabled.
  568. </p>
  569. </dd>
  570. <dt><code>-mdmx</code></dt>
  571. <dt><code>-mno-mdmx</code></dt>
  572. <dd><a name="index-mdmx"></a>
  573. <a name="index-mno_002dmdmx"></a>
  574. <p>Use (do not use) MIPS Digital Media Extension instructions.
  575. This option can only be used when generating 64-bit code and requires
  576. hardware floating-point support to be enabled.
  577. </p>
  578. </dd>
  579. <dt><code>-mips3d</code></dt>
  580. <dt><code>-mno-mips3d</code></dt>
  581. <dd><a name="index-mips3d"></a>
  582. <a name="index-mno_002dmips3d"></a>
  583. <p>Use (do not use) the MIPS-3D ASE. See <a href="MIPS_002d3D-Built_002din-Functions.html#MIPS_002d3D-Built_002din-Functions">MIPS-3D Built-in Functions</a>.
  584. The option <samp>-mips3d</samp> implies <samp>-mpaired-single</samp>.
  585. </p>
  586. </dd>
  587. <dt><code>-mmicromips</code></dt>
  588. <dt><code>-mno-micromips</code></dt>
  589. <dd><a name="index-mmicromips"></a>
  590. <a name="index-mno_002dmmicromips"></a>
  591. <p>Generate (do not generate) microMIPS code.
  592. </p>
  593. <p>MicroMIPS code generation can also be controlled on a per-function basis
  594. by means of <code>micromips</code> and <code>nomicromips</code> attributes.
  595. See <a href="Function-Attributes.html#Function-Attributes">Function Attributes</a>, for more information.
  596. </p>
  597. </dd>
  598. <dt><code>-mmt</code></dt>
  599. <dt><code>-mno-mt</code></dt>
  600. <dd><a name="index-mmt"></a>
  601. <a name="index-mno_002dmt"></a>
  602. <p>Use (do not use) MT Multithreading instructions.
  603. </p>
  604. </dd>
  605. <dt><code>-mmcu</code></dt>
  606. <dt><code>-mno-mcu</code></dt>
  607. <dd><a name="index-mmcu-1"></a>
  608. <a name="index-mno_002dmcu"></a>
  609. <p>Use (do not use) the MIPS MCU ASE instructions.
  610. </p>
  611. </dd>
  612. <dt><code>-meva</code></dt>
  613. <dt><code>-mno-eva</code></dt>
  614. <dd><a name="index-meva"></a>
  615. <a name="index-mno_002deva"></a>
  616. <p>Use (do not use) the MIPS Enhanced Virtual Addressing instructions.
  617. </p>
  618. </dd>
  619. <dt><code>-mvirt</code></dt>
  620. <dt><code>-mno-virt</code></dt>
  621. <dd><a name="index-mvirt"></a>
  622. <a name="index-mno_002dvirt"></a>
  623. <p>Use (do not use) the MIPS Virtualization (VZ) instructions.
  624. </p>
  625. </dd>
  626. <dt><code>-mxpa</code></dt>
  627. <dt><code>-mno-xpa</code></dt>
  628. <dd><a name="index-mxpa"></a>
  629. <a name="index-mno_002dxpa"></a>
  630. <p>Use (do not use) the MIPS eXtended Physical Address (XPA) instructions.
  631. </p>
  632. </dd>
  633. <dt><code>-mcrc</code></dt>
  634. <dt><code>-mno-crc</code></dt>
  635. <dd><a name="index-mcrc"></a>
  636. <a name="index-mno_002dcrc"></a>
  637. <p>Use (do not use) the MIPS Cyclic Redundancy Check (CRC) instructions.
  638. </p>
  639. </dd>
  640. <dt><code>-mginv</code></dt>
  641. <dt><code>-mno-ginv</code></dt>
  642. <dd><a name="index-mginv"></a>
  643. <a name="index-mno_002dginv"></a>
  644. <p>Use (do not use) the MIPS Global INValidate (GINV) instructions.
  645. </p>
  646. </dd>
  647. <dt><code>-mloongson-mmi</code></dt>
  648. <dt><code>-mno-loongson-mmi</code></dt>
  649. <dd><a name="index-mloongson_002dmmi"></a>
  650. <a name="index-mno_002dloongson_002dmmi"></a>
  651. <p>Use (do not use) the MIPS Loongson MultiMedia extensions Instructions (MMI).
  652. </p>
  653. </dd>
  654. <dt><code>-mloongson-ext</code></dt>
  655. <dt><code>-mno-loongson-ext</code></dt>
  656. <dd><a name="index-mloongson_002dext"></a>
  657. <a name="index-mno_002dloongson_002dext"></a>
  658. <p>Use (do not use) the MIPS Loongson EXTensions (EXT) instructions.
  659. </p>
  660. </dd>
  661. <dt><code>-mloongson-ext2</code></dt>
  662. <dt><code>-mno-loongson-ext2</code></dt>
  663. <dd><a name="index-mloongson_002dext2"></a>
  664. <a name="index-mno_002dloongson_002dext2"></a>
  665. <p>Use (do not use) the MIPS Loongson EXTensions r2 (EXT2) instructions.
  666. </p>
  667. </dd>
  668. <dt><code>-mlong64</code></dt>
  669. <dd><a name="index-mlong64"></a>
  670. <p>Force <code>long</code> types to be 64 bits wide. See <samp>-mlong32</samp> for
  671. an explanation of the default and the way that the pointer size is
  672. determined.
  673. </p>
  674. </dd>
  675. <dt><code>-mlong32</code></dt>
  676. <dd><a name="index-mlong32"></a>
  677. <p>Force <code>long</code>, <code>int</code>, and pointer types to be 32 bits wide.
  678. </p>
  679. <p>The default size of <code>int</code>s, <code>long</code>s and pointers depends on
  680. the ABI. All the supported ABIs use 32-bit <code>int</code>s. The n64 ABI
  681. uses 64-bit <code>long</code>s, as does the 64-bit EABI; the others use
  682. 32-bit <code>long</code>s. Pointers are the same size as <code>long</code>s,
  683. or the same size as integer registers, whichever is smaller.
  684. </p>
  685. </dd>
  686. <dt><code>-msym32</code></dt>
  687. <dt><code>-mno-sym32</code></dt>
  688. <dd><a name="index-msym32"></a>
  689. <a name="index-mno_002dsym32"></a>
  690. <p>Assume (do not assume) that all symbols have 32-bit values, regardless
  691. of the selected ABI. This option is useful in combination with
  692. <samp>-mabi=64</samp> and <samp>-mno-abicalls</samp> because it allows GCC
  693. to generate shorter and faster references to symbolic addresses.
  694. </p>
  695. </dd>
  696. <dt><code>-G <var>num</var></code></dt>
  697. <dd><a name="index-G-2"></a>
  698. <p>Put definitions of externally-visible data in a small data section
  699. if that data is no bigger than <var>num</var> bytes. GCC can then generate
  700. more efficient accesses to the data; see <samp>-mgpopt</samp> for details.
  701. </p>
  702. <p>The default <samp>-G</samp> option depends on the configuration.
  703. </p>
  704. </dd>
  705. <dt><code>-mlocal-sdata</code></dt>
  706. <dt><code>-mno-local-sdata</code></dt>
  707. <dd><a name="index-mlocal_002dsdata"></a>
  708. <a name="index-mno_002dlocal_002dsdata"></a>
  709. <p>Extend (do not extend) the <samp>-G</samp> behavior to local data too,
  710. such as to static variables in C. <samp>-mlocal-sdata</samp> is the
  711. default for all configurations.
  712. </p>
  713. <p>If the linker complains that an application is using too much small data,
  714. you might want to try rebuilding the less performance-critical parts with
  715. <samp>-mno-local-sdata</samp>. You might also want to build large
  716. libraries with <samp>-mno-local-sdata</samp>, so that the libraries leave
  717. more room for the main program.
  718. </p>
  719. </dd>
  720. <dt><code>-mextern-sdata</code></dt>
  721. <dt><code>-mno-extern-sdata</code></dt>
  722. <dd><a name="index-mextern_002dsdata"></a>
  723. <a name="index-mno_002dextern_002dsdata"></a>
  724. <p>Assume (do not assume) that externally-defined data is in
  725. a small data section if the size of that data is within the <samp>-G</samp> limit.
  726. <samp>-mextern-sdata</samp> is the default for all configurations.
  727. </p>
  728. <p>If you compile a module <var>Mod</var> with <samp>-mextern-sdata</samp> <samp>-G
  729. <var>num</var></samp> <samp>-mgpopt</samp>, and <var>Mod</var> references a variable <var>Var</var>
  730. that is no bigger than <var>num</var> bytes, you must make sure that <var>Var</var>
  731. is placed in a small data section. If <var>Var</var> is defined by another
  732. module, you must either compile that module with a high-enough
  733. <samp>-G</samp> setting or attach a <code>section</code> attribute to <var>Var</var>&rsquo;s
  734. definition. If <var>Var</var> is common, you must link the application
  735. with a high-enough <samp>-G</samp> setting.
  736. </p>
  737. <p>The easiest way of satisfying these restrictions is to compile
  738. and link every module with the same <samp>-G</samp> option. However,
  739. you may wish to build a library that supports several different
  740. small data limits. You can do this by compiling the library with
  741. the highest supported <samp>-G</samp> setting and additionally using
  742. <samp>-mno-extern-sdata</samp> to stop the library from making assumptions
  743. about externally-defined data.
  744. </p>
  745. </dd>
  746. <dt><code>-mgpopt</code></dt>
  747. <dt><code>-mno-gpopt</code></dt>
  748. <dd><a name="index-mgpopt"></a>
  749. <a name="index-mno_002dgpopt"></a>
  750. <p>Use (do not use) GP-relative accesses for symbols that are known to be
  751. in a small data section; see <samp>-G</samp>, <samp>-mlocal-sdata</samp> and
  752. <samp>-mextern-sdata</samp>. <samp>-mgpopt</samp> is the default for all
  753. configurations.
  754. </p>
  755. <p><samp>-mno-gpopt</samp> is useful for cases where the <code>$gp</code> register
  756. might not hold the value of <code>_gp</code>. For example, if the code is
  757. part of a library that might be used in a boot monitor, programs that
  758. call boot monitor routines pass an unknown value in <code>$gp</code>.
  759. (In such situations, the boot monitor itself is usually compiled
  760. with <samp>-G0</samp>.)
  761. </p>
  762. <p><samp>-mno-gpopt</samp> implies <samp>-mno-local-sdata</samp> and
  763. <samp>-mno-extern-sdata</samp>.
  764. </p>
  765. </dd>
  766. <dt><code>-membedded-data</code></dt>
  767. <dt><code>-mno-embedded-data</code></dt>
  768. <dd><a name="index-membedded_002ddata"></a>
  769. <a name="index-mno_002dembedded_002ddata"></a>
  770. <p>Allocate variables to the read-only data section first if possible, then
  771. next in the small data section if possible, otherwise in data. This gives
  772. slightly slower code than the default, but reduces the amount of RAM required
  773. when executing, and thus may be preferred for some embedded systems.
  774. </p>
  775. </dd>
  776. <dt><code>-muninit-const-in-rodata</code></dt>
  777. <dt><code>-mno-uninit-const-in-rodata</code></dt>
  778. <dd><a name="index-muninit_002dconst_002din_002drodata"></a>
  779. <a name="index-mno_002duninit_002dconst_002din_002drodata"></a>
  780. <p>Put uninitialized <code>const</code> variables in the read-only data section.
  781. This option is only meaningful in conjunction with <samp>-membedded-data</samp>.
  782. </p>
  783. </dd>
  784. <dt><code>-mcode-readable=<var>setting</var></code></dt>
  785. <dd><a name="index-mcode_002dreadable"></a>
  786. <p>Specify whether GCC may generate code that reads from executable sections.
  787. There are three possible settings:
  788. </p>
  789. <dl compact="compact">
  790. <dt><code>-mcode-readable=yes</code></dt>
  791. <dd><p>Instructions may freely access executable sections. This is the
  792. default setting.
  793. </p>
  794. </dd>
  795. <dt><code>-mcode-readable=pcrel</code></dt>
  796. <dd><p>MIPS16 PC-relative load instructions can access executable sections,
  797. but other instructions must not do so. This option is useful on 4KSc
  798. and 4KSd processors when the code TLBs have the Read Inhibit bit set.
  799. It is also useful on processors that can be configured to have a dual
  800. instruction/data SRAM interface and that, like the M4K, automatically
  801. redirect PC-relative loads to the instruction RAM.
  802. </p>
  803. </dd>
  804. <dt><code>-mcode-readable=no</code></dt>
  805. <dd><p>Instructions must not access executable sections. This option can be
  806. useful on targets that are configured to have a dual instruction/data
  807. SRAM interface but that (unlike the M4K) do not automatically redirect
  808. PC-relative loads to the instruction RAM.
  809. </p></dd>
  810. </dl>
  811. </dd>
  812. <dt><code>-msplit-addresses</code></dt>
  813. <dt><code>-mno-split-addresses</code></dt>
  814. <dd><a name="index-msplit_002daddresses"></a>
  815. <a name="index-mno_002dsplit_002daddresses"></a>
  816. <p>Enable (disable) use of the <code>%hi()</code> and <code>%lo()</code> assembler
  817. relocation operators. This option has been superseded by
  818. <samp>-mexplicit-relocs</samp> but is retained for backwards compatibility.
  819. </p>
  820. </dd>
  821. <dt><code>-mexplicit-relocs</code></dt>
  822. <dt><code>-mno-explicit-relocs</code></dt>
  823. <dd><a name="index-mexplicit_002drelocs-1"></a>
  824. <a name="index-mno_002dexplicit_002drelocs-1"></a>
  825. <p>Use (do not use) assembler relocation operators when dealing with symbolic
  826. addresses. The alternative, selected by <samp>-mno-explicit-relocs</samp>,
  827. is to use assembler macros instead.
  828. </p>
  829. <p><samp>-mexplicit-relocs</samp> is the default if GCC was configured
  830. to use an assembler that supports relocation operators.
  831. </p>
  832. </dd>
  833. <dt><code>-mcheck-zero-division</code></dt>
  834. <dt><code>-mno-check-zero-division</code></dt>
  835. <dd><a name="index-mcheck_002dzero_002ddivision"></a>
  836. <a name="index-mno_002dcheck_002dzero_002ddivision"></a>
  837. <p>Trap (do not trap) on integer division by zero.
  838. </p>
  839. <p>The default is <samp>-mcheck-zero-division</samp>.
  840. </p>
  841. </dd>
  842. <dt><code>-mdivide-traps</code></dt>
  843. <dt><code>-mdivide-breaks</code></dt>
  844. <dd><a name="index-mdivide_002dtraps"></a>
  845. <a name="index-mdivide_002dbreaks"></a>
  846. <p>MIPS systems check for division by zero by generating either a
  847. conditional trap or a break instruction. Using traps results in
  848. smaller code, but is only supported on MIPS II and later. Also, some
  849. versions of the Linux kernel have a bug that prevents trap from
  850. generating the proper signal (<code>SIGFPE</code>). Use <samp>-mdivide-traps</samp> to
  851. allow conditional traps on architectures that support them and
  852. <samp>-mdivide-breaks</samp> to force the use of breaks.
  853. </p>
  854. <p>The default is usually <samp>-mdivide-traps</samp>, but this can be
  855. overridden at configure time using <samp>--with-divide=breaks</samp>.
  856. Divide-by-zero checks can be completely disabled using
  857. <samp>-mno-check-zero-division</samp>.
  858. </p>
  859. </dd>
  860. <dt><code>-mload-store-pairs</code></dt>
  861. <dt><code>-mno-load-store-pairs</code></dt>
  862. <dd><a name="index-mload_002dstore_002dpairs"></a>
  863. <a name="index-mno_002dload_002dstore_002dpairs"></a>
  864. <p>Enable (disable) an optimization that pairs consecutive load or store
  865. instructions to enable load/store bonding. This option is enabled by
  866. default but only takes effect when the selected architecture is known
  867. to support bonding.
  868. </p>
  869. </dd>
  870. <dt><code>-mmemcpy</code></dt>
  871. <dt><code>-mno-memcpy</code></dt>
  872. <dd><a name="index-mmemcpy-1"></a>
  873. <a name="index-mno_002dmemcpy"></a>
  874. <p>Force (do not force) the use of <code>memcpy</code> for non-trivial block
  875. moves. The default is <samp>-mno-memcpy</samp>, which allows GCC to inline
  876. most constant-sized copies.
  877. </p>
  878. </dd>
  879. <dt><code>-mlong-calls</code></dt>
  880. <dt><code>-mno-long-calls</code></dt>
  881. <dd><a name="index-mlong_002dcalls-6"></a>
  882. <a name="index-mno_002dlong_002dcalls-3"></a>
  883. <p>Disable (do not disable) use of the <code>jal</code> instruction. Calling
  884. functions using <code>jal</code> is more efficient but requires the caller
  885. and callee to be in the same 256 megabyte segment.
  886. </p>
  887. <p>This option has no effect on abicalls code. The default is
  888. <samp>-mno-long-calls</samp>.
  889. </p>
  890. </dd>
  891. <dt><code>-mmad</code></dt>
  892. <dt><code>-mno-mad</code></dt>
  893. <dd><a name="index-mmad"></a>
  894. <a name="index-mno_002dmad"></a>
  895. <p>Enable (disable) use of the <code>mad</code>, <code>madu</code> and <code>mul</code>
  896. instructions, as provided by the R4650 ISA.
  897. </p>
  898. </dd>
  899. <dt><code>-mimadd</code></dt>
  900. <dt><code>-mno-imadd</code></dt>
  901. <dd><a name="index-mimadd"></a>
  902. <a name="index-mno_002dimadd"></a>
  903. <p>Enable (disable) use of the <code>madd</code> and <code>msub</code> integer
  904. instructions. The default is <samp>-mimadd</samp> on architectures
  905. that support <code>madd</code> and <code>msub</code> except for the 74k
  906. architecture where it was found to generate slower code.
  907. </p>
  908. </dd>
  909. <dt><code>-mfused-madd</code></dt>
  910. <dt><code>-mno-fused-madd</code></dt>
  911. <dd><a name="index-mfused_002dmadd-1"></a>
  912. <a name="index-mno_002dfused_002dmadd-1"></a>
  913. <p>Enable (disable) use of the floating-point multiply-accumulate
  914. instructions, when they are available. The default is
  915. <samp>-mfused-madd</samp>.
  916. </p>
  917. <p>On the R8000 CPU when multiply-accumulate instructions are used,
  918. the intermediate product is calculated to infinite precision
  919. and is not subject to the FCSR Flush to Zero bit. This may be
  920. undesirable in some circumstances. On other processors the result
  921. is numerically identical to the equivalent computation using
  922. separate multiply, add, subtract and negate instructions.
  923. </p>
  924. </dd>
  925. <dt><code>-nocpp</code></dt>
  926. <dd><a name="index-nocpp"></a>
  927. <p>Tell the MIPS assembler to not run its preprocessor over user
  928. assembler files (with a &lsquo;<samp>.s</samp>&rsquo; suffix) when assembling them.
  929. </p>
  930. </dd>
  931. <dt><code>-mfix-24k</code></dt>
  932. <dt><code>-mno-fix-24k</code></dt>
  933. <dd><a name="index-mfix_002d24k"></a>
  934. <a name="index-mno_002dfix_002d24k"></a>
  935. <p>Work around the 24K E48 (lost data on stores during refill) errata.
  936. The workarounds are implemented by the assembler rather than by GCC.
  937. </p>
  938. </dd>
  939. <dt><code>-mfix-r4000</code></dt>
  940. <dt><code>-mno-fix-r4000</code></dt>
  941. <dd><a name="index-mfix_002dr4000"></a>
  942. <a name="index-mno_002dfix_002dr4000"></a>
  943. <p>Work around certain R4000 CPU errata:
  944. </p><ul class="no-bullet">
  945. <li>- A double-word or a variable shift may give an incorrect result if executed
  946. immediately after starting an integer division.
  947. </li><li>- A double-word or a variable shift may give an incorrect result if executed
  948. while an integer multiplication is in progress.
  949. </li><li>- An integer division may give an incorrect result if started in a delay slot
  950. of a taken branch or a jump.
  951. </li></ul>
  952. </dd>
  953. <dt><code>-mfix-r4400</code></dt>
  954. <dt><code>-mno-fix-r4400</code></dt>
  955. <dd><a name="index-mfix_002dr4400"></a>
  956. <a name="index-mno_002dfix_002dr4400"></a>
  957. <p>Work around certain R4400 CPU errata:
  958. </p><ul class="no-bullet">
  959. <li>- A double-word or a variable shift may give an incorrect result if executed
  960. immediately after starting an integer division.
  961. </li></ul>
  962. </dd>
  963. <dt><code>-mfix-r10000</code></dt>
  964. <dt><code>-mno-fix-r10000</code></dt>
  965. <dd><a name="index-mfix_002dr10000"></a>
  966. <a name="index-mno_002dfix_002dr10000"></a>
  967. <p>Work around certain R10000 errata:
  968. </p><ul class="no-bullet">
  969. <li>- <code>ll</code>/<code>sc</code> sequences may not behave atomically on revisions
  970. prior to 3.0. They may deadlock on revisions 2.6 and earlier.
  971. </li></ul>
  972. <p>This option can only be used if the target architecture supports
  973. branch-likely instructions. <samp>-mfix-r10000</samp> is the default when
  974. <samp>-march=r10000</samp> is used; <samp>-mno-fix-r10000</samp> is the default
  975. otherwise.
  976. </p>
  977. </dd>
  978. <dt><code>-mfix-r5900</code></dt>
  979. <dt><code>-mno-fix-r5900</code></dt>
  980. <dd><a name="index-mfix_002dr5900"></a>
  981. <p>Do not attempt to schedule the preceding instruction into the delay slot
  982. of a branch instruction placed at the end of a short loop of six
  983. instructions or fewer and always schedule a <code>nop</code> instruction there
  984. instead. The short loop bug under certain conditions causes loops to
  985. execute only once or twice, due to a hardware bug in the R5900 chip. The
  986. workaround is implemented by the assembler rather than by GCC.
  987. </p>
  988. </dd>
  989. <dt><code>-mfix-rm7000</code></dt>
  990. <dt><code>-mno-fix-rm7000</code></dt>
  991. <dd><a name="index-mfix_002drm7000"></a>
  992. <p>Work around the RM7000 <code>dmult</code>/<code>dmultu</code> errata. The
  993. workarounds are implemented by the assembler rather than by GCC.
  994. </p>
  995. </dd>
  996. <dt><code>-mfix-vr4120</code></dt>
  997. <dt><code>-mno-fix-vr4120</code></dt>
  998. <dd><a name="index-mfix_002dvr4120"></a>
  999. <p>Work around certain VR4120 errata:
  1000. </p><ul class="no-bullet">
  1001. <li>- <code>dmultu</code> does not always produce the correct result.
  1002. </li><li>- <code>div</code> and <code>ddiv</code> do not always produce the correct result if one
  1003. of the operands is negative.
  1004. </li></ul>
  1005. <p>The workarounds for the division errata rely on special functions in
  1006. <samp>libgcc.a</samp>. At present, these functions are only provided by
  1007. the <code>mips64vr*-elf</code> configurations.
  1008. </p>
  1009. <p>Other VR4120 errata require a NOP to be inserted between certain pairs of
  1010. instructions. These errata are handled by the assembler, not by GCC itself.
  1011. </p>
  1012. </dd>
  1013. <dt><code>-mfix-vr4130</code></dt>
  1014. <dd><a name="index-mfix_002dvr4130"></a>
  1015. <p>Work around the VR4130 <code>mflo</code>/<code>mfhi</code> errata. The
  1016. workarounds are implemented by the assembler rather than by GCC,
  1017. although GCC avoids using <code>mflo</code> and <code>mfhi</code> if the
  1018. VR4130 <code>macc</code>, <code>macchi</code>, <code>dmacc</code> and <code>dmacchi</code>
  1019. instructions are available instead.
  1020. </p>
  1021. </dd>
  1022. <dt><code>-mfix-sb1</code></dt>
  1023. <dt><code>-mno-fix-sb1</code></dt>
  1024. <dd><a name="index-mfix_002dsb1"></a>
  1025. <p>Work around certain SB-1 CPU core errata.
  1026. (This flag currently works around the SB-1 revision 2
  1027. &ldquo;F1&rdquo; and &ldquo;F2&rdquo; floating-point errata.)
  1028. </p>
  1029. </dd>
  1030. <dt><code>-mr10k-cache-barrier=<var>setting</var></code></dt>
  1031. <dd><a name="index-mr10k_002dcache_002dbarrier"></a>
  1032. <p>Specify whether GCC should insert cache barriers to avoid the
  1033. side effects of speculation on R10K processors.
  1034. </p>
  1035. <p>In common with many processors, the R10K tries to predict the outcome
  1036. of a conditional branch and speculatively executes instructions from
  1037. the &ldquo;taken&rdquo; branch. It later aborts these instructions if the
  1038. predicted outcome is wrong. However, on the R10K, even aborted
  1039. instructions can have side effects.
  1040. </p>
  1041. <p>This problem only affects kernel stores and, depending on the system,
  1042. kernel loads. As an example, a speculatively-executed store may load
  1043. the target memory into cache and mark the cache line as dirty, even if
  1044. the store itself is later aborted. If a DMA operation writes to the
  1045. same area of memory before the &ldquo;dirty&rdquo; line is flushed, the cached
  1046. data overwrites the DMA-ed data. See the R10K processor manual
  1047. for a full description, including other potential problems.
  1048. </p>
  1049. <p>One workaround is to insert cache barrier instructions before every memory
  1050. access that might be speculatively executed and that might have side
  1051. effects even if aborted. <samp>-mr10k-cache-barrier=<var>setting</var></samp>
  1052. controls GCC&rsquo;s implementation of this workaround. It assumes that
  1053. aborted accesses to any byte in the following regions does not have
  1054. side effects:
  1055. </p>
  1056. <ol>
  1057. <li> the memory occupied by the current function&rsquo;s stack frame;
  1058. </li><li> the memory occupied by an incoming stack argument;
  1059. </li><li> the memory occupied by an object with a link-time-constant address.
  1060. </li></ol>
  1061. <p>It is the kernel&rsquo;s responsibility to ensure that speculative
  1062. accesses to these regions are indeed safe.
  1063. </p>
  1064. <p>If the input program contains a function declaration such as:
  1065. </p>
  1066. <div class="smallexample">
  1067. <pre class="smallexample">void foo (void);
  1068. </pre></div>
  1069. <p>then the implementation of <code>foo</code> must allow <code>j foo</code> and
  1070. <code>jal foo</code> to be executed speculatively. GCC honors this
  1071. restriction for functions it compiles itself. It expects non-GCC
  1072. functions (such as hand-written assembly code) to do the same.
  1073. </p>
  1074. <p>The option has three forms:
  1075. </p>
  1076. <dl compact="compact">
  1077. <dt><code>-mr10k-cache-barrier=load-store</code></dt>
  1078. <dd><p>Insert a cache barrier before a load or store that might be
  1079. speculatively executed and that might have side effects even
  1080. if aborted.
  1081. </p>
  1082. </dd>
  1083. <dt><code>-mr10k-cache-barrier=store</code></dt>
  1084. <dd><p>Insert a cache barrier before a store that might be speculatively
  1085. executed and that might have side effects even if aborted.
  1086. </p>
  1087. </dd>
  1088. <dt><code>-mr10k-cache-barrier=none</code></dt>
  1089. <dd><p>Disable the insertion of cache barriers. This is the default setting.
  1090. </p></dd>
  1091. </dl>
  1092. </dd>
  1093. <dt><code>-mflush-func=<var>func</var></code></dt>
  1094. <dt><code>-mno-flush-func</code></dt>
  1095. <dd><a name="index-mflush_002dfunc"></a>
  1096. <p>Specifies the function to call to flush the I and D caches, or to not
  1097. call any such function. If called, the function must take the same
  1098. arguments as the common <code>_flush_func</code>, that is, the address of the
  1099. memory range for which the cache is being flushed, the size of the
  1100. memory range, and the number 3 (to flush both caches). The default
  1101. depends on the target GCC was configured for, but commonly is either
  1102. <code>_flush_func</code> or <code>__cpu_flush</code>.
  1103. </p>
  1104. </dd>
  1105. <dt><code>mbranch-cost=<var>num</var></code></dt>
  1106. <dd><a name="index-mbranch_002dcost-2"></a>
  1107. <p>Set the cost of branches to roughly <var>num</var> &ldquo;simple&rdquo; instructions.
  1108. This cost is only a heuristic and is not guaranteed to produce
  1109. consistent results across releases. A zero cost redundantly selects
  1110. the default, which is based on the <samp>-mtune</samp> setting.
  1111. </p>
  1112. </dd>
  1113. <dt><code>-mbranch-likely</code></dt>
  1114. <dt><code>-mno-branch-likely</code></dt>
  1115. <dd><a name="index-mbranch_002dlikely"></a>
  1116. <a name="index-mno_002dbranch_002dlikely"></a>
  1117. <p>Enable or disable use of Branch Likely instructions, regardless of the
  1118. default for the selected architecture. By default, Branch Likely
  1119. instructions may be generated if they are supported by the selected
  1120. architecture. An exception is for the MIPS32 and MIPS64 architectures
  1121. and processors that implement those architectures; for those, Branch
  1122. Likely instructions are not be generated by default because the MIPS32
  1123. and MIPS64 architectures specifically deprecate their use.
  1124. </p>
  1125. </dd>
  1126. <dt><code>-mcompact-branches=never</code></dt>
  1127. <dt><code>-mcompact-branches=optimal</code></dt>
  1128. <dt><code>-mcompact-branches=always</code></dt>
  1129. <dd><a name="index-mcompact_002dbranches_003dnever"></a>
  1130. <a name="index-mcompact_002dbranches_003doptimal"></a>
  1131. <a name="index-mcompact_002dbranches_003dalways"></a>
  1132. <p>These options control which form of branches will be generated. The
  1133. default is <samp>-mcompact-branches=optimal</samp>.
  1134. </p>
  1135. <p>The <samp>-mcompact-branches=never</samp> option ensures that compact branch
  1136. instructions will never be generated.
  1137. </p>
  1138. <p>The <samp>-mcompact-branches=always</samp> option ensures that a compact
  1139. branch instruction will be generated if available. If a compact branch
  1140. instruction is not available, a delay slot form of the branch will be
  1141. used instead.
  1142. </p>
  1143. <p>This option is supported from MIPS Release 6 onwards.
  1144. </p>
  1145. <p>The <samp>-mcompact-branches=optimal</samp> option will cause a delay slot
  1146. branch to be used if one is available in the current ISA and the delay
  1147. slot is successfully filled. If the delay slot is not filled, a compact
  1148. branch will be chosen if one is available.
  1149. </p>
  1150. </dd>
  1151. <dt><code>-mfp-exceptions</code></dt>
  1152. <dt><code>-mno-fp-exceptions</code></dt>
  1153. <dd><a name="index-mfp_002dexceptions"></a>
  1154. <p>Specifies whether FP exceptions are enabled. This affects how
  1155. FP instructions are scheduled for some processors.
  1156. The default is that FP exceptions are
  1157. enabled.
  1158. </p>
  1159. <p>For instance, on the SB-1, if FP exceptions are disabled, and we are emitting
  1160. 64-bit code, then we can use both FP pipes. Otherwise, we can only use one
  1161. FP pipe.
  1162. </p>
  1163. </dd>
  1164. <dt><code>-mvr4130-align</code></dt>
  1165. <dt><code>-mno-vr4130-align</code></dt>
  1166. <dd><a name="index-mvr4130_002dalign"></a>
  1167. <p>The VR4130 pipeline is two-way superscalar, but can only issue two
  1168. instructions together if the first one is 8-byte aligned. When this
  1169. option is enabled, GCC aligns pairs of instructions that it
  1170. thinks should execute in parallel.
  1171. </p>
  1172. <p>This option only has an effect when optimizing for the VR4130.
  1173. It normally makes code faster, but at the expense of making it bigger.
  1174. It is enabled by default at optimization level <samp>-O3</samp>.
  1175. </p>
  1176. </dd>
  1177. <dt><code>-msynci</code></dt>
  1178. <dt><code>-mno-synci</code></dt>
  1179. <dd><a name="index-msynci"></a>
  1180. <p>Enable (disable) generation of <code>synci</code> instructions on
  1181. architectures that support it. The <code>synci</code> instructions (if
  1182. enabled) are generated when <code>__builtin___clear_cache</code> is
  1183. compiled.
  1184. </p>
  1185. <p>This option defaults to <samp>-mno-synci</samp>, but the default can be
  1186. overridden by configuring GCC with <samp>--with-synci</samp>.
  1187. </p>
  1188. <p>When compiling code for single processor systems, it is generally safe
  1189. to use <code>synci</code>. However, on many multi-core (SMP) systems, it
  1190. does not invalidate the instruction caches on all cores and may lead
  1191. to undefined behavior.
  1192. </p>
  1193. </dd>
  1194. <dt><code>-mrelax-pic-calls</code></dt>
  1195. <dt><code>-mno-relax-pic-calls</code></dt>
  1196. <dd><a name="index-mrelax_002dpic_002dcalls"></a>
  1197. <p>Try to turn PIC calls that are normally dispatched via register
  1198. <code>$25</code> into direct calls. This is only possible if the linker can
  1199. resolve the destination at link time and if the destination is within
  1200. range for a direct call.
  1201. </p>
  1202. <p><samp>-mrelax-pic-calls</samp> is the default if GCC was configured to use
  1203. an assembler and a linker that support the <code>.reloc</code> assembly
  1204. directive and <samp>-mexplicit-relocs</samp> is in effect. With
  1205. <samp>-mno-explicit-relocs</samp>, this optimization can be performed by the
  1206. assembler and the linker alone without help from the compiler.
  1207. </p>
  1208. </dd>
  1209. <dt><code>-mmcount-ra-address</code></dt>
  1210. <dt><code>-mno-mcount-ra-address</code></dt>
  1211. <dd><a name="index-mmcount_002dra_002daddress"></a>
  1212. <a name="index-mno_002dmcount_002dra_002daddress"></a>
  1213. <p>Emit (do not emit) code that allows <code>_mcount</code> to modify the
  1214. calling function&rsquo;s return address. When enabled, this option extends
  1215. the usual <code>_mcount</code> interface with a new <var>ra-address</var>
  1216. parameter, which has type <code>intptr_t *</code> and is passed in register
  1217. <code>$12</code>. <code>_mcount</code> can then modify the return address by
  1218. doing both of the following:
  1219. </p><ul>
  1220. <li> Returning the new address in register <code>$31</code>.
  1221. </li><li> Storing the new address in <code>*<var>ra-address</var></code>,
  1222. if <var>ra-address</var> is nonnull.
  1223. </li></ul>
  1224. <p>The default is <samp>-mno-mcount-ra-address</samp>.
  1225. </p>
  1226. </dd>
  1227. <dt><code>-mframe-header-opt</code></dt>
  1228. <dt><code>-mno-frame-header-opt</code></dt>
  1229. <dd><a name="index-mframe_002dheader_002dopt"></a>
  1230. <p>Enable (disable) frame header optimization in the o32 ABI. When using the
  1231. o32 ABI, calling functions will allocate 16 bytes on the stack for the called
  1232. function to write out register arguments. When enabled, this optimization
  1233. will suppress the allocation of the frame header if it can be determined that
  1234. it is unused.
  1235. </p>
  1236. <p>This optimization is off by default at all optimization levels.
  1237. </p>
  1238. </dd>
  1239. <dt><code>-mlxc1-sxc1</code></dt>
  1240. <dt><code>-mno-lxc1-sxc1</code></dt>
  1241. <dd><a name="index-mlxc1_002dsxc1"></a>
  1242. <p>When applicable, enable (disable) the generation of <code>lwxc1</code>,
  1243. <code>swxc1</code>, <code>ldxc1</code>, <code>sdxc1</code> instructions. Enabled by default.
  1244. </p>
  1245. </dd>
  1246. <dt><code>-mmadd4</code></dt>
  1247. <dt><code>-mno-madd4</code></dt>
  1248. <dd><a name="index-mmadd4"></a>
  1249. <p>When applicable, enable (disable) the generation of 4-operand <code>madd.s</code>,
  1250. <code>madd.d</code> and related instructions. Enabled by default.
  1251. </p>
  1252. </dd>
  1253. </dl>
  1254. <hr>
  1255. <div class="header">
  1256. <p>
  1257. Next: <a href="MMIX-Options.html#MMIX-Options" accesskey="n" rel="next">MMIX Options</a>, Previous: <a href="MicroBlaze-Options.html#MicroBlaze-Options" accesskey="p" rel="prev">MicroBlaze 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>
  1258. </div>
  1259. </body>
  1260. </html>