SPARC-Options.html 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561
  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): SPARC Options</title>
  20. <meta name="description" content="Using the GNU Compiler Collection (GCC): SPARC Options">
  21. <meta name="keywords" content="Using the GNU Compiler Collection (GCC): SPARC 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="SPU-Options.html#SPU-Options" rel="next" title="SPU Options">
  31. <link href="Solaris-2-Options.html#Solaris-2-Options" rel="prev" title="Solaris 2 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="SPARC-Options"></a>
  63. <div class="header">
  64. <p>
  65. Next: <a href="SPU-Options.html#SPU-Options" accesskey="n" rel="next">SPU Options</a>, Previous: <a href="Solaris-2-Options.html#Solaris-2-Options" accesskey="p" rel="prev">Solaris 2 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="SPARC-Options-1"></a>
  69. <h4 class="subsection">3.18.45 SPARC Options</h4>
  70. <a name="index-SPARC-options"></a>
  71. <p>These &lsquo;<samp>-m</samp>&rsquo; options are supported on the SPARC:
  72. </p>
  73. <dl compact="compact">
  74. <dt><code>-mno-app-regs</code></dt>
  75. <dt><code>-mapp-regs</code></dt>
  76. <dd><a name="index-mno_002dapp_002dregs"></a>
  77. <a name="index-mapp_002dregs"></a>
  78. <p>Specify <samp>-mapp-regs</samp> to generate output using the global registers
  79. 2 through 4, which the SPARC SVR4 ABI reserves for applications. Like the
  80. global register 1, each global register 2 through 4 is then treated as an
  81. allocable register that is clobbered by function calls. This is the default.
  82. </p>
  83. <p>To be fully SVR4 ABI-compliant at the cost of some performance loss,
  84. specify <samp>-mno-app-regs</samp>. You should compile libraries and system
  85. software with this option.
  86. </p>
  87. </dd>
  88. <dt><code>-mflat</code></dt>
  89. <dt><code>-mno-flat</code></dt>
  90. <dd><a name="index-mflat"></a>
  91. <a name="index-mno_002dflat"></a>
  92. <p>With <samp>-mflat</samp>, the compiler does not generate save/restore instructions
  93. and uses a &ldquo;flat&rdquo; or single register window model. This model is compatible
  94. with the regular register window model. The local registers and the input
  95. registers (0&ndash;5) are still treated as &ldquo;call-saved&rdquo; registers and are
  96. saved on the stack as needed.
  97. </p>
  98. <p>With <samp>-mno-flat</samp> (the default), the compiler generates save/restore
  99. instructions (except for leaf functions). This is the normal operating mode.
  100. </p>
  101. </dd>
  102. <dt><code>-mfpu</code></dt>
  103. <dt><code>-mhard-float</code></dt>
  104. <dd><a name="index-mfpu-4"></a>
  105. <a name="index-mhard_002dfloat-6"></a>
  106. <p>Generate output containing floating-point instructions. This is the
  107. default.
  108. </p>
  109. </dd>
  110. <dt><code>-mno-fpu</code></dt>
  111. <dt><code>-msoft-float</code></dt>
  112. <dd><a name="index-mno_002dfpu"></a>
  113. <a name="index-msoft_002dfloat-10"></a>
  114. <p>Generate output containing library calls for floating point.
  115. <strong>Warning:</strong> the requisite libraries are not available for all SPARC
  116. targets. Normally the facilities of the machine&rsquo;s usual C compiler are
  117. used, but this cannot be done directly in cross-compilation. You must make
  118. your own arrangements to provide suitable library functions for
  119. cross-compilation. The embedded targets &lsquo;<samp>sparc-*-aout</samp>&rsquo; and
  120. &lsquo;<samp>sparclite-*-*</samp>&rsquo; do provide software floating-point support.
  121. </p>
  122. <p><samp>-msoft-float</samp> changes the calling convention in the output file;
  123. therefore, it is only useful if you compile <em>all</em> of a program with
  124. this option. In particular, you need to compile <samp>libgcc.a</samp>, the
  125. library that comes with GCC, with <samp>-msoft-float</samp> in order for
  126. this to work.
  127. </p>
  128. </dd>
  129. <dt><code>-mhard-quad-float</code></dt>
  130. <dd><a name="index-mhard_002dquad_002dfloat"></a>
  131. <p>Generate output containing quad-word (long double) floating-point
  132. instructions.
  133. </p>
  134. </dd>
  135. <dt><code>-msoft-quad-float</code></dt>
  136. <dd><a name="index-msoft_002dquad_002dfloat"></a>
  137. <p>Generate output containing library calls for quad-word (long double)
  138. floating-point instructions. The functions called are those specified
  139. in the SPARC ABI. This is the default.
  140. </p>
  141. <p>As of this writing, there are no SPARC implementations that have hardware
  142. support for the quad-word floating-point instructions. They all invoke
  143. a trap handler for one of these instructions, and then the trap handler
  144. emulates the effect of the instruction. Because of the trap handler overhead,
  145. this is much slower than calling the ABI library routines. Thus the
  146. <samp>-msoft-quad-float</samp> option is the default.
  147. </p>
  148. </dd>
  149. <dt><code>-mno-unaligned-doubles</code></dt>
  150. <dt><code>-munaligned-doubles</code></dt>
  151. <dd><a name="index-mno_002dunaligned_002ddoubles"></a>
  152. <a name="index-munaligned_002ddoubles"></a>
  153. <p>Assume that doubles have 8-byte alignment. This is the default.
  154. </p>
  155. <p>With <samp>-munaligned-doubles</samp>, GCC assumes that doubles have 8-byte
  156. alignment only if they are contained in another type, or if they have an
  157. absolute address. Otherwise, it assumes they have 4-byte alignment.
  158. Specifying this option avoids some rare compatibility problems with code
  159. generated by other compilers. It is not the default because it results
  160. in a performance loss, especially for floating-point code.
  161. </p>
  162. </dd>
  163. <dt><code>-muser-mode</code></dt>
  164. <dt><code>-mno-user-mode</code></dt>
  165. <dd><a name="index-muser_002dmode"></a>
  166. <a name="index-mno_002duser_002dmode"></a>
  167. <p>Do not generate code that can only run in supervisor mode. This is relevant
  168. only for the <code>casa</code> instruction emitted for the LEON3 processor. This
  169. is the default.
  170. </p>
  171. </dd>
  172. <dt><code>-mfaster-structs</code></dt>
  173. <dt><code>-mno-faster-structs</code></dt>
  174. <dd><a name="index-mfaster_002dstructs"></a>
  175. <a name="index-mno_002dfaster_002dstructs"></a>
  176. <p>With <samp>-mfaster-structs</samp>, the compiler assumes that structures
  177. should have 8-byte alignment. This enables the use of pairs of
  178. <code>ldd</code> and <code>std</code> instructions for copies in structure
  179. assignment, in place of twice as many <code>ld</code> and <code>st</code> pairs.
  180. However, the use of this changed alignment directly violates the SPARC
  181. ABI. Thus, it&rsquo;s intended only for use on targets where the developer
  182. acknowledges that their resulting code is not directly in line with
  183. the rules of the ABI.
  184. </p>
  185. </dd>
  186. <dt><code>-mstd-struct-return</code></dt>
  187. <dt><code>-mno-std-struct-return</code></dt>
  188. <dd><a name="index-mstd_002dstruct_002dreturn"></a>
  189. <a name="index-mno_002dstd_002dstruct_002dreturn"></a>
  190. <p>With <samp>-mstd-struct-return</samp>, the compiler generates checking code
  191. in functions returning structures or unions to detect size mismatches
  192. between the two sides of function calls, as per the 32-bit ABI.
  193. </p>
  194. <p>The default is <samp>-mno-std-struct-return</samp>. This option has no effect
  195. in 64-bit mode.
  196. </p>
  197. </dd>
  198. <dt><code>-mlra</code></dt>
  199. <dt><code>-mno-lra</code></dt>
  200. <dd><a name="index-mlra-3"></a>
  201. <a name="index-mno_002dlra"></a>
  202. <p>Enable Local Register Allocation. This is the default for SPARC since GCC 7
  203. so <samp>-mno-lra</samp> needs to be passed to get old Reload.
  204. </p>
  205. </dd>
  206. <dt><code>-mcpu=<var>cpu_type</var></code></dt>
  207. <dd><a name="index-mcpu-11"></a>
  208. <p>Set the instruction set, register set, and instruction scheduling parameters
  209. for machine type <var>cpu_type</var>. Supported values for <var>cpu_type</var> are
  210. &lsquo;<samp>v7</samp>&rsquo;, &lsquo;<samp>cypress</samp>&rsquo;, &lsquo;<samp>v8</samp>&rsquo;, &lsquo;<samp>supersparc</samp>&rsquo;, &lsquo;<samp>hypersparc</samp>&rsquo;,
  211. &lsquo;<samp>leon</samp>&rsquo;, &lsquo;<samp>leon3</samp>&rsquo;, &lsquo;<samp>leon3v7</samp>&rsquo;, &lsquo;<samp>sparclite</samp>&rsquo;, &lsquo;<samp>f930</samp>&rsquo;,
  212. &lsquo;<samp>f934</samp>&rsquo;, &lsquo;<samp>sparclite86x</samp>&rsquo;, &lsquo;<samp>sparclet</samp>&rsquo;, &lsquo;<samp>tsc701</samp>&rsquo;, &lsquo;<samp>v9</samp>&rsquo;,
  213. &lsquo;<samp>ultrasparc</samp>&rsquo;, &lsquo;<samp>ultrasparc3</samp>&rsquo;, &lsquo;<samp>niagara</samp>&rsquo;, &lsquo;<samp>niagara2</samp>&rsquo;,
  214. &lsquo;<samp>niagara3</samp>&rsquo;, &lsquo;<samp>niagara4</samp>&rsquo;, &lsquo;<samp>niagara7</samp>&rsquo; and &lsquo;<samp>m8</samp>&rsquo;.
  215. </p>
  216. <p>Native Solaris and GNU/Linux toolchains also support the value &lsquo;<samp>native</samp>&rsquo;,
  217. which selects the best architecture option for the host processor.
  218. <samp>-mcpu=native</samp> has no effect if GCC does not recognize
  219. the processor.
  220. </p>
  221. <p>Default instruction scheduling parameters are used for values that select
  222. an architecture and not an implementation. These are &lsquo;<samp>v7</samp>&rsquo;, &lsquo;<samp>v8</samp>&rsquo;,
  223. &lsquo;<samp>sparclite</samp>&rsquo;, &lsquo;<samp>sparclet</samp>&rsquo;, &lsquo;<samp>v9</samp>&rsquo;.
  224. </p>
  225. <p>Here is a list of each supported architecture and their supported
  226. implementations.
  227. </p>
  228. <dl compact="compact">
  229. <dt>v7</dt>
  230. <dd><p>cypress, leon3v7
  231. </p>
  232. </dd>
  233. <dt>v8</dt>
  234. <dd><p>supersparc, hypersparc, leon, leon3
  235. </p>
  236. </dd>
  237. <dt>sparclite</dt>
  238. <dd><p>f930, f934, sparclite86x
  239. </p>
  240. </dd>
  241. <dt>sparclet</dt>
  242. <dd><p>tsc701
  243. </p>
  244. </dd>
  245. <dt>v9</dt>
  246. <dd><p>ultrasparc, ultrasparc3, niagara, niagara2, niagara3, niagara4,
  247. niagara7, m8
  248. </p></dd>
  249. </dl>
  250. <p>By default (unless configured otherwise), GCC generates code for the V7
  251. variant of the SPARC architecture. With <samp>-mcpu=cypress</samp>, the compiler
  252. additionally optimizes it for the Cypress CY7C602 chip, as used in the
  253. SPARCStation/SPARCServer 3xx series. This is also appropriate for the older
  254. SPARCStation 1, 2, IPX etc.
  255. </p>
  256. <p>With <samp>-mcpu=v8</samp>, GCC generates code for the V8 variant of the SPARC
  257. architecture. The only difference from V7 code is that the compiler emits
  258. the integer multiply and integer divide instructions which exist in SPARC-V8
  259. but not in SPARC-V7. With <samp>-mcpu=supersparc</samp>, the compiler additionally
  260. optimizes it for the SuperSPARC chip, as used in the SPARCStation 10, 1000 and
  261. 2000 series.
  262. </p>
  263. <p>With <samp>-mcpu=sparclite</samp>, GCC generates code for the SPARClite variant of
  264. the SPARC architecture. This adds the integer multiply, integer divide step
  265. and scan (<code>ffs</code>) instructions which exist in SPARClite but not in SPARC-V7.
  266. With <samp>-mcpu=f930</samp>, the compiler additionally optimizes it for the
  267. Fujitsu MB86930 chip, which is the original SPARClite, with no FPU. With
  268. <samp>-mcpu=f934</samp>, the compiler additionally optimizes it for the Fujitsu
  269. MB86934 chip, which is the more recent SPARClite with FPU.
  270. </p>
  271. <p>With <samp>-mcpu=sparclet</samp>, GCC generates code for the SPARClet variant of
  272. the SPARC architecture. This adds the integer multiply, multiply/accumulate,
  273. integer divide step and scan (<code>ffs</code>) instructions which exist in SPARClet
  274. but not in SPARC-V7. With <samp>-mcpu=tsc701</samp>, the compiler additionally
  275. optimizes it for the TEMIC SPARClet chip.
  276. </p>
  277. <p>With <samp>-mcpu=v9</samp>, GCC generates code for the V9 variant of the SPARC
  278. architecture. This adds 64-bit integer and floating-point move instructions,
  279. 3 additional floating-point condition code registers and conditional move
  280. instructions. With <samp>-mcpu=ultrasparc</samp>, the compiler additionally
  281. optimizes it for the Sun UltraSPARC I/II/IIi chips. With
  282. <samp>-mcpu=ultrasparc3</samp>, the compiler additionally optimizes it for the
  283. Sun UltraSPARC III/III+/IIIi/IIIi+/IV/IV+ chips. With
  284. <samp>-mcpu=niagara</samp>, the compiler additionally optimizes it for
  285. Sun UltraSPARC T1 chips. With <samp>-mcpu=niagara2</samp>, the compiler
  286. additionally optimizes it for Sun UltraSPARC T2 chips. With
  287. <samp>-mcpu=niagara3</samp>, the compiler additionally optimizes it for Sun
  288. UltraSPARC T3 chips. With <samp>-mcpu=niagara4</samp>, the compiler
  289. additionally optimizes it for Sun UltraSPARC T4 chips. With
  290. <samp>-mcpu=niagara7</samp>, the compiler additionally optimizes it for
  291. Oracle SPARC M7 chips. With <samp>-mcpu=m8</samp>, the compiler
  292. additionally optimizes it for Oracle M8 chips.
  293. </p>
  294. </dd>
  295. <dt><code>-mtune=<var>cpu_type</var></code></dt>
  296. <dd><a name="index-mtune-13"></a>
  297. <p>Set the instruction scheduling parameters for machine type
  298. <var>cpu_type</var>, but do not set the instruction set or register set that the
  299. option <samp>-mcpu=<var>cpu_type</var></samp> does.
  300. </p>
  301. <p>The same values for <samp>-mcpu=<var>cpu_type</var></samp> can be used for
  302. <samp>-mtune=<var>cpu_type</var></samp>, but the only useful values are those
  303. that select a particular CPU implementation. Those are
  304. &lsquo;<samp>cypress</samp>&rsquo;, &lsquo;<samp>supersparc</samp>&rsquo;, &lsquo;<samp>hypersparc</samp>&rsquo;, &lsquo;<samp>leon</samp>&rsquo;,
  305. &lsquo;<samp>leon3</samp>&rsquo;, &lsquo;<samp>leon3v7</samp>&rsquo;, &lsquo;<samp>f930</samp>&rsquo;, &lsquo;<samp>f934</samp>&rsquo;,
  306. &lsquo;<samp>sparclite86x</samp>&rsquo;, &lsquo;<samp>tsc701</samp>&rsquo;, &lsquo;<samp>ultrasparc</samp>&rsquo;,
  307. &lsquo;<samp>ultrasparc3</samp>&rsquo;, &lsquo;<samp>niagara</samp>&rsquo;, &lsquo;<samp>niagara2</samp>&rsquo;, &lsquo;<samp>niagara3</samp>&rsquo;,
  308. &lsquo;<samp>niagara4</samp>&rsquo;, &lsquo;<samp>niagara7</samp>&rsquo; and &lsquo;<samp>m8</samp>&rsquo;. With native Solaris
  309. and GNU/Linux toolchains, &lsquo;<samp>native</samp>&rsquo; can also be used.
  310. </p>
  311. </dd>
  312. <dt><code>-mv8plus</code></dt>
  313. <dt><code>-mno-v8plus</code></dt>
  314. <dd><a name="index-mv8plus"></a>
  315. <a name="index-mno_002dv8plus"></a>
  316. <p>With <samp>-mv8plus</samp>, GCC generates code for the SPARC-V8+ ABI. The
  317. difference from the V8 ABI is that the global and out registers are
  318. considered 64 bits wide. This is enabled by default on Solaris in 32-bit
  319. mode for all SPARC-V9 processors.
  320. </p>
  321. </dd>
  322. <dt><code>-mvis</code></dt>
  323. <dt><code>-mno-vis</code></dt>
  324. <dd><a name="index-mvis"></a>
  325. <a name="index-mno_002dvis"></a>
  326. <p>With <samp>-mvis</samp>, GCC generates code that takes advantage of the UltraSPARC
  327. Visual Instruction Set extensions. The default is <samp>-mno-vis</samp>.
  328. </p>
  329. </dd>
  330. <dt><code>-mvis2</code></dt>
  331. <dt><code>-mno-vis2</code></dt>
  332. <dd><a name="index-mvis2"></a>
  333. <a name="index-mno_002dvis2"></a>
  334. <p>With <samp>-mvis2</samp>, GCC generates code that takes advantage of
  335. version 2.0 of the UltraSPARC Visual Instruction Set extensions. The
  336. default is <samp>-mvis2</samp> when targeting a cpu that supports such
  337. instructions, such as UltraSPARC-III and later. Setting <samp>-mvis2</samp>
  338. also sets <samp>-mvis</samp>.
  339. </p>
  340. </dd>
  341. <dt><code>-mvis3</code></dt>
  342. <dt><code>-mno-vis3</code></dt>
  343. <dd><a name="index-mvis3"></a>
  344. <a name="index-mno_002dvis3"></a>
  345. <p>With <samp>-mvis3</samp>, GCC generates code that takes advantage of
  346. version 3.0 of the UltraSPARC Visual Instruction Set extensions. The
  347. default is <samp>-mvis3</samp> when targeting a cpu that supports such
  348. instructions, such as niagara-3 and later. Setting <samp>-mvis3</samp>
  349. also sets <samp>-mvis2</samp> and <samp>-mvis</samp>.
  350. </p>
  351. </dd>
  352. <dt><code>-mvis4</code></dt>
  353. <dt><code>-mno-vis4</code></dt>
  354. <dd><a name="index-mvis4"></a>
  355. <a name="index-mno_002dvis4"></a>
  356. <p>With <samp>-mvis4</samp>, GCC generates code that takes advantage of
  357. version 4.0 of the UltraSPARC Visual Instruction Set extensions. The
  358. default is <samp>-mvis4</samp> when targeting a cpu that supports such
  359. instructions, such as niagara-7 and later. Setting <samp>-mvis4</samp>
  360. also sets <samp>-mvis3</samp>, <samp>-mvis2</samp> and <samp>-mvis</samp>.
  361. </p>
  362. </dd>
  363. <dt><code>-mvis4b</code></dt>
  364. <dt><code>-mno-vis4b</code></dt>
  365. <dd><a name="index-mvis4b"></a>
  366. <a name="index-mno_002dvis4b"></a>
  367. <p>With <samp>-mvis4b</samp>, GCC generates code that takes advantage of
  368. version 4.0 of the UltraSPARC Visual Instruction Set extensions, plus
  369. the additional VIS instructions introduced in the Oracle SPARC
  370. Architecture 2017. The default is <samp>-mvis4b</samp> when targeting a
  371. cpu that supports such instructions, such as m8 and later. Setting
  372. <samp>-mvis4b</samp> also sets <samp>-mvis4</samp>, <samp>-mvis3</samp>,
  373. <samp>-mvis2</samp> and <samp>-mvis</samp>.
  374. </p>
  375. </dd>
  376. <dt><code>-mcbcond</code></dt>
  377. <dt><code>-mno-cbcond</code></dt>
  378. <dd><a name="index-mcbcond"></a>
  379. <a name="index-mno_002dcbcond"></a>
  380. <p>With <samp>-mcbcond</samp>, GCC generates code that takes advantage of the UltraSPARC
  381. Compare-and-Branch-on-Condition instructions. The default is <samp>-mcbcond</samp>
  382. when targeting a CPU that supports such instructions, such as Niagara-4 and
  383. later.
  384. </p>
  385. </dd>
  386. <dt><code>-mfmaf</code></dt>
  387. <dt><code>-mno-fmaf</code></dt>
  388. <dd><a name="index-mfmaf"></a>
  389. <a name="index-mno_002dfmaf"></a>
  390. <p>With <samp>-mfmaf</samp>, GCC generates code that takes advantage of the UltraSPARC
  391. Fused Multiply-Add Floating-point instructions. The default is <samp>-mfmaf</samp>
  392. when targeting a CPU that supports such instructions, such as Niagara-3 and
  393. later.
  394. </p>
  395. </dd>
  396. <dt><code>-mfsmuld</code></dt>
  397. <dt><code>-mno-fsmuld</code></dt>
  398. <dd><a name="index-mfsmuld"></a>
  399. <a name="index-mno_002dfsmuld"></a>
  400. <p>With <samp>-mfsmuld</samp>, GCC generates code that takes advantage of the
  401. Floating-point Multiply Single to Double (FsMULd) instruction. The default is
  402. <samp>-mfsmuld</samp> when targeting a CPU supporting the architecture versions V8
  403. or V9 with FPU except <samp>-mcpu=leon</samp>.
  404. </p>
  405. </dd>
  406. <dt><code>-mpopc</code></dt>
  407. <dt><code>-mno-popc</code></dt>
  408. <dd><a name="index-mpopc"></a>
  409. <a name="index-mno_002dpopc"></a>
  410. <p>With <samp>-mpopc</samp>, GCC generates code that takes advantage of the UltraSPARC
  411. Population Count instruction. The default is <samp>-mpopc</samp>
  412. when targeting a CPU that supports such an instruction, such as Niagara-2 and
  413. later.
  414. </p>
  415. </dd>
  416. <dt><code>-msubxc</code></dt>
  417. <dt><code>-mno-subxc</code></dt>
  418. <dd><a name="index-msubxc"></a>
  419. <a name="index-mno_002dsubxc"></a>
  420. <p>With <samp>-msubxc</samp>, GCC generates code that takes advantage of the UltraSPARC
  421. Subtract-Extended-with-Carry instruction. The default is <samp>-msubxc</samp>
  422. when targeting a CPU that supports such an instruction, such as Niagara-7 and
  423. later.
  424. </p>
  425. </dd>
  426. <dt><code>-mfix-at697f</code></dt>
  427. <dd><a name="index-mfix_002dat697f"></a>
  428. <p>Enable the documented workaround for the single erratum of the Atmel AT697F
  429. processor (which corresponds to erratum #13 of the AT697E processor).
  430. </p>
  431. </dd>
  432. <dt><code>-mfix-ut699</code></dt>
  433. <dd><a name="index-mfix_002dut699"></a>
  434. <p>Enable the documented workarounds for the floating-point errata and the data
  435. cache nullify errata of the UT699 processor.
  436. </p>
  437. </dd>
  438. <dt><code>-mfix-ut700</code></dt>
  439. <dd><a name="index-mfix_002dut700"></a>
  440. <p>Enable the documented workaround for the back-to-back store errata of
  441. the UT699E/UT700 processor.
  442. </p>
  443. </dd>
  444. <dt><code>-mfix-gr712rc</code></dt>
  445. <dd><a name="index-mfix_002dgr712rc"></a>
  446. <p>Enable the documented workaround for the back-to-back store errata of
  447. the GR712RC processor.
  448. </p></dd>
  449. </dl>
  450. <p>These &lsquo;<samp>-m</samp>&rsquo; options are supported in addition to the above
  451. on SPARC-V9 processors in 64-bit environments:
  452. </p>
  453. <dl compact="compact">
  454. <dt><code>-m32</code></dt>
  455. <dt><code>-m64</code></dt>
  456. <dd><a name="index-m32-2"></a>
  457. <a name="index-m64-3"></a>
  458. <p>Generate code for a 32-bit or 64-bit environment.
  459. The 32-bit environment sets int, long and pointer to 32 bits.
  460. The 64-bit environment sets int to 32 bits and long and pointer
  461. to 64 bits.
  462. </p>
  463. </dd>
  464. <dt><code>-mcmodel=<var>which</var></code></dt>
  465. <dd><a name="index-mcmodel-1"></a>
  466. <p>Set the code model to one of
  467. </p>
  468. <dl compact="compact">
  469. <dt>&lsquo;<samp>medlow</samp>&rsquo;</dt>
  470. <dd><p>The Medium/Low code model: 64-bit addresses, programs
  471. must be linked in the low 32 bits of memory. Programs can be statically
  472. or dynamically linked.
  473. </p>
  474. </dd>
  475. <dt>&lsquo;<samp>medmid</samp>&rsquo;</dt>
  476. <dd><p>The Medium/Middle code model: 64-bit addresses, programs
  477. must be linked in the low 44 bits of memory, the text and data segments must
  478. be less than 2GB in size and the data segment must be located within 2GB of
  479. the text segment.
  480. </p>
  481. </dd>
  482. <dt>&lsquo;<samp>medany</samp>&rsquo;</dt>
  483. <dd><p>The Medium/Anywhere code model: 64-bit addresses, programs
  484. may be linked anywhere in memory, the text and data segments must be less
  485. than 2GB in size and the data segment must be located within 2GB of the
  486. text segment.
  487. </p>
  488. </dd>
  489. <dt>&lsquo;<samp>embmedany</samp>&rsquo;</dt>
  490. <dd><p>The Medium/Anywhere code model for embedded systems:
  491. 64-bit addresses, the text and data segments must be less than 2GB in
  492. size, both starting anywhere in memory (determined at link time). The
  493. global register %g4 points to the base of the data segment. Programs
  494. are statically linked and PIC is not supported.
  495. </p></dd>
  496. </dl>
  497. </dd>
  498. <dt><code>-mmemory-model=<var>mem-model</var></code></dt>
  499. <dd><a name="index-mmemory_002dmodel"></a>
  500. <p>Set the memory model in force on the processor to one of
  501. </p>
  502. <dl compact="compact">
  503. <dt>&lsquo;<samp>default</samp>&rsquo;</dt>
  504. <dd><p>The default memory model for the processor and operating system.
  505. </p>
  506. </dd>
  507. <dt>&lsquo;<samp>rmo</samp>&rsquo;</dt>
  508. <dd><p>Relaxed Memory Order
  509. </p>
  510. </dd>
  511. <dt>&lsquo;<samp>pso</samp>&rsquo;</dt>
  512. <dd><p>Partial Store Order
  513. </p>
  514. </dd>
  515. <dt>&lsquo;<samp>tso</samp>&rsquo;</dt>
  516. <dd><p>Total Store Order
  517. </p>
  518. </dd>
  519. <dt>&lsquo;<samp>sc</samp>&rsquo;</dt>
  520. <dd><p>Sequential Consistency
  521. </p></dd>
  522. </dl>
  523. <p>These memory models are formally defined in Appendix D of the SPARC-V9
  524. architecture manual, as set in the processor&rsquo;s <code>PSTATE.MM</code> field.
  525. </p>
  526. </dd>
  527. <dt><code>-mstack-bias</code></dt>
  528. <dt><code>-mno-stack-bias</code></dt>
  529. <dd><a name="index-mstack_002dbias"></a>
  530. <a name="index-mno_002dstack_002dbias"></a>
  531. <p>With <samp>-mstack-bias</samp>, GCC assumes that the stack pointer, and
  532. frame pointer if present, are offset by -2047 which must be added back
  533. when making stack frame references. This is the default in 64-bit mode.
  534. Otherwise, assume no such offset is present.
  535. </p></dd>
  536. </dl>
  537. <hr>
  538. <div class="header">
  539. <p>
  540. Next: <a href="SPU-Options.html#SPU-Options" accesskey="n" rel="next">SPU Options</a>, Previous: <a href="Solaris-2-Options.html#Solaris-2-Options" accesskey="p" rel="prev">Solaris 2 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>
  541. </div>
  542. </body>
  543. </html>