SH-Options.html 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605
  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): SH Options</title>
  20. <meta name="description" content="Using the GNU Compiler Collection (GCC): SH Options">
  21. <meta name="keywords" content="Using the GNU Compiler Collection (GCC): SH 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="Solaris-2-Options.html#Solaris-2-Options" rel="next" title="Solaris 2 Options">
  31. <link href="Score-Options.html#Score-Options" rel="prev" title="Score 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="SH-Options"></a>
  63. <div class="header">
  64. <p>
  65. Next: <a href="Solaris-2-Options.html#Solaris-2-Options" accesskey="n" rel="next">Solaris 2 Options</a>, Previous: <a href="Score-Options.html#Score-Options" accesskey="p" rel="prev">Score 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="SH-Options-1"></a>
  69. <h4 class="subsection">3.18.43 SH Options</h4>
  70. <p>These &lsquo;<samp>-m</samp>&rsquo; options are defined for the SH implementations:
  71. </p>
  72. <dl compact="compact">
  73. <dt><code>-m1</code></dt>
  74. <dd><a name="index-m1"></a>
  75. <p>Generate code for the SH1.
  76. </p>
  77. </dd>
  78. <dt><code>-m2</code></dt>
  79. <dd><a name="index-m2"></a>
  80. <p>Generate code for the SH2.
  81. </p>
  82. </dd>
  83. <dt><code>-m2e</code></dt>
  84. <dd><p>Generate code for the SH2e.
  85. </p>
  86. </dd>
  87. <dt><code>-m2a-nofpu</code></dt>
  88. <dd><a name="index-m2a_002dnofpu"></a>
  89. <p>Generate code for the SH2a without FPU, or for a SH2a-FPU in such a way
  90. that the floating-point unit is not used.
  91. </p>
  92. </dd>
  93. <dt><code>-m2a-single-only</code></dt>
  94. <dd><a name="index-m2a_002dsingle_002donly"></a>
  95. <p>Generate code for the SH2a-FPU, in such a way that no double-precision
  96. floating-point operations are used.
  97. </p>
  98. </dd>
  99. <dt><code>-m2a-single</code></dt>
  100. <dd><a name="index-m2a_002dsingle"></a>
  101. <p>Generate code for the SH2a-FPU assuming the floating-point unit is in
  102. single-precision mode by default.
  103. </p>
  104. </dd>
  105. <dt><code>-m2a</code></dt>
  106. <dd><a name="index-m2a"></a>
  107. <p>Generate code for the SH2a-FPU assuming the floating-point unit is in
  108. double-precision mode by default.
  109. </p>
  110. </dd>
  111. <dt><code>-m3</code></dt>
  112. <dd><a name="index-m3"></a>
  113. <p>Generate code for the SH3.
  114. </p>
  115. </dd>
  116. <dt><code>-m3e</code></dt>
  117. <dd><a name="index-m3e"></a>
  118. <p>Generate code for the SH3e.
  119. </p>
  120. </dd>
  121. <dt><code>-m4-nofpu</code></dt>
  122. <dd><a name="index-m4_002dnofpu"></a>
  123. <p>Generate code for the SH4 without a floating-point unit.
  124. </p>
  125. </dd>
  126. <dt><code>-m4-single-only</code></dt>
  127. <dd><a name="index-m4_002dsingle_002donly"></a>
  128. <p>Generate code for the SH4 with a floating-point unit that only
  129. supports single-precision arithmetic.
  130. </p>
  131. </dd>
  132. <dt><code>-m4-single</code></dt>
  133. <dd><a name="index-m4_002dsingle"></a>
  134. <p>Generate code for the SH4 assuming the floating-point unit is in
  135. single-precision mode by default.
  136. </p>
  137. </dd>
  138. <dt><code>-m4</code></dt>
  139. <dd><a name="index-m4"></a>
  140. <p>Generate code for the SH4.
  141. </p>
  142. </dd>
  143. <dt><code>-m4-100</code></dt>
  144. <dd><a name="index-m4_002d100"></a>
  145. <p>Generate code for SH4-100.
  146. </p>
  147. </dd>
  148. <dt><code>-m4-100-nofpu</code></dt>
  149. <dd><a name="index-m4_002d100_002dnofpu"></a>
  150. <p>Generate code for SH4-100 in such a way that the
  151. floating-point unit is not used.
  152. </p>
  153. </dd>
  154. <dt><code>-m4-100-single</code></dt>
  155. <dd><a name="index-m4_002d100_002dsingle"></a>
  156. <p>Generate code for SH4-100 assuming the floating-point unit is in
  157. single-precision mode by default.
  158. </p>
  159. </dd>
  160. <dt><code>-m4-100-single-only</code></dt>
  161. <dd><a name="index-m4_002d100_002dsingle_002donly"></a>
  162. <p>Generate code for SH4-100 in such a way that no double-precision
  163. floating-point operations are used.
  164. </p>
  165. </dd>
  166. <dt><code>-m4-200</code></dt>
  167. <dd><a name="index-m4_002d200"></a>
  168. <p>Generate code for SH4-200.
  169. </p>
  170. </dd>
  171. <dt><code>-m4-200-nofpu</code></dt>
  172. <dd><a name="index-m4_002d200_002dnofpu"></a>
  173. <p>Generate code for SH4-200 without in such a way that the
  174. floating-point unit is not used.
  175. </p>
  176. </dd>
  177. <dt><code>-m4-200-single</code></dt>
  178. <dd><a name="index-m4_002d200_002dsingle"></a>
  179. <p>Generate code for SH4-200 assuming the floating-point unit is in
  180. single-precision mode by default.
  181. </p>
  182. </dd>
  183. <dt><code>-m4-200-single-only</code></dt>
  184. <dd><a name="index-m4_002d200_002dsingle_002donly"></a>
  185. <p>Generate code for SH4-200 in such a way that no double-precision
  186. floating-point operations are used.
  187. </p>
  188. </dd>
  189. <dt><code>-m4-300</code></dt>
  190. <dd><a name="index-m4_002d300"></a>
  191. <p>Generate code for SH4-300.
  192. </p>
  193. </dd>
  194. <dt><code>-m4-300-nofpu</code></dt>
  195. <dd><a name="index-m4_002d300_002dnofpu"></a>
  196. <p>Generate code for SH4-300 without in such a way that the
  197. floating-point unit is not used.
  198. </p>
  199. </dd>
  200. <dt><code>-m4-300-single</code></dt>
  201. <dd><a name="index-m4_002d300_002dsingle"></a>
  202. <p>Generate code for SH4-300 in such a way that no double-precision
  203. floating-point operations are used.
  204. </p>
  205. </dd>
  206. <dt><code>-m4-300-single-only</code></dt>
  207. <dd><a name="index-m4_002d300_002dsingle_002donly"></a>
  208. <p>Generate code for SH4-300 in such a way that no double-precision
  209. floating-point operations are used.
  210. </p>
  211. </dd>
  212. <dt><code>-m4-340</code></dt>
  213. <dd><a name="index-m4_002d340"></a>
  214. <p>Generate code for SH4-340 (no MMU, no FPU).
  215. </p>
  216. </dd>
  217. <dt><code>-m4-500</code></dt>
  218. <dd><a name="index-m4_002d500"></a>
  219. <p>Generate code for SH4-500 (no FPU). Passes <samp>-isa=sh4-nofpu</samp> to the
  220. assembler.
  221. </p>
  222. </dd>
  223. <dt><code>-m4a-nofpu</code></dt>
  224. <dd><a name="index-m4a_002dnofpu"></a>
  225. <p>Generate code for the SH4al-dsp, or for a SH4a in such a way that the
  226. floating-point unit is not used.
  227. </p>
  228. </dd>
  229. <dt><code>-m4a-single-only</code></dt>
  230. <dd><a name="index-m4a_002dsingle_002donly"></a>
  231. <p>Generate code for the SH4a, in such a way that no double-precision
  232. floating-point operations are used.
  233. </p>
  234. </dd>
  235. <dt><code>-m4a-single</code></dt>
  236. <dd><a name="index-m4a_002dsingle"></a>
  237. <p>Generate code for the SH4a assuming the floating-point unit is in
  238. single-precision mode by default.
  239. </p>
  240. </dd>
  241. <dt><code>-m4a</code></dt>
  242. <dd><a name="index-m4a"></a>
  243. <p>Generate code for the SH4a.
  244. </p>
  245. </dd>
  246. <dt><code>-m4al</code></dt>
  247. <dd><a name="index-m4al"></a>
  248. <p>Same as <samp>-m4a-nofpu</samp>, except that it implicitly passes
  249. <samp>-dsp</samp> to the assembler. GCC doesn&rsquo;t generate any DSP
  250. instructions at the moment.
  251. </p>
  252. </dd>
  253. <dt><code>-mb</code></dt>
  254. <dd><a name="index-mb"></a>
  255. <p>Compile code for the processor in big-endian mode.
  256. </p>
  257. </dd>
  258. <dt><code>-ml</code></dt>
  259. <dd><a name="index-ml-1"></a>
  260. <p>Compile code for the processor in little-endian mode.
  261. </p>
  262. </dd>
  263. <dt><code>-mdalign</code></dt>
  264. <dd><a name="index-mdalign"></a>
  265. <p>Align doubles at 64-bit boundaries. Note that this changes the calling
  266. conventions, and thus some functions from the standard C library do
  267. not work unless you recompile it first with <samp>-mdalign</samp>.
  268. </p>
  269. </dd>
  270. <dt><code>-mrelax</code></dt>
  271. <dd><a name="index-mrelax-6"></a>
  272. <p>Shorten some address references at link time, when possible; uses the
  273. linker option <samp>-relax</samp>.
  274. </p>
  275. </dd>
  276. <dt><code>-mbigtable</code></dt>
  277. <dd><a name="index-mbigtable"></a>
  278. <p>Use 32-bit offsets in <code>switch</code> tables. The default is to use
  279. 16-bit offsets.
  280. </p>
  281. </dd>
  282. <dt><code>-mbitops</code></dt>
  283. <dd><a name="index-mbitops-1"></a>
  284. <p>Enable the use of bit manipulation instructions on SH2A.
  285. </p>
  286. </dd>
  287. <dt><code>-mfmovd</code></dt>
  288. <dd><a name="index-mfmovd"></a>
  289. <p>Enable the use of the instruction <code>fmovd</code>. Check <samp>-mdalign</samp> for
  290. alignment constraints.
  291. </p>
  292. </dd>
  293. <dt><code>-mrenesas</code></dt>
  294. <dd><a name="index-mrenesas"></a>
  295. <p>Comply with the calling conventions defined by Renesas.
  296. </p>
  297. </dd>
  298. <dt><code>-mno-renesas</code></dt>
  299. <dd><a name="index-mno_002drenesas"></a>
  300. <p>Comply with the calling conventions defined for GCC before the Renesas
  301. conventions were available. This option is the default for all
  302. targets of the SH toolchain.
  303. </p>
  304. </dd>
  305. <dt><code>-mnomacsave</code></dt>
  306. <dd><a name="index-mnomacsave"></a>
  307. <p>Mark the <code>MAC</code> register as call-clobbered, even if
  308. <samp>-mrenesas</samp> is given.
  309. </p>
  310. </dd>
  311. <dt><code>-mieee</code></dt>
  312. <dt><code>-mno-ieee</code></dt>
  313. <dd><a name="index-mieee-1"></a>
  314. <a name="index-mno_002dieee"></a>
  315. <p>Control the IEEE compliance of floating-point comparisons, which affects the
  316. handling of cases where the result of a comparison is unordered. By default
  317. <samp>-mieee</samp> is implicitly enabled. If <samp>-ffinite-math-only</samp> is
  318. enabled <samp>-mno-ieee</samp> is implicitly set, which results in faster
  319. floating-point greater-equal and less-equal comparisons. The implicit settings
  320. can be overridden by specifying either <samp>-mieee</samp> or <samp>-mno-ieee</samp>.
  321. </p>
  322. </dd>
  323. <dt><code>-minline-ic_invalidate</code></dt>
  324. <dd><a name="index-minline_002dic_005finvalidate"></a>
  325. <p>Inline code to invalidate instruction cache entries after setting up
  326. nested function trampolines.
  327. This option has no effect if <samp>-musermode</samp> is in effect and the selected
  328. code generation option (e.g. <samp>-m4</samp>) does not allow the use of the <code>icbi</code>
  329. instruction.
  330. If the selected code generation option does not allow the use of the <code>icbi</code>
  331. instruction, and <samp>-musermode</samp> is not in effect, the inlined code
  332. manipulates the instruction cache address array directly with an associative
  333. write. This not only requires privileged mode at run time, but it also
  334. fails if the cache line had been mapped via the TLB and has become unmapped.
  335. </p>
  336. </dd>
  337. <dt><code>-misize</code></dt>
  338. <dd><a name="index-misize-1"></a>
  339. <p>Dump instruction size and location in the assembly code.
  340. </p>
  341. </dd>
  342. <dt><code>-mpadstruct</code></dt>
  343. <dd><a name="index-mpadstruct"></a>
  344. <p>This option is deprecated. It pads structures to multiple of 4 bytes,
  345. which is incompatible with the SH ABI.
  346. </p>
  347. </dd>
  348. <dt><code>-matomic-model=<var>model</var></code></dt>
  349. <dd><a name="index-matomic_002dmodel_003dmodel"></a>
  350. <p>Sets the model of atomic operations and additional parameters as a comma
  351. separated list. For details on the atomic built-in functions see
  352. <a href="_005f_005fatomic-Builtins.html#g_t_005f_005fatomic-Builtins">__atomic Builtins</a>. The following models and parameters are supported:
  353. </p>
  354. <dl compact="compact">
  355. <dt>&lsquo;<samp>none</samp>&rsquo;</dt>
  356. <dd><p>Disable compiler generated atomic sequences and emit library calls for atomic
  357. operations. This is the default if the target is not <code>sh*-*-linux*</code>.
  358. </p>
  359. </dd>
  360. <dt>&lsquo;<samp>soft-gusa</samp>&rsquo;</dt>
  361. <dd><p>Generate GNU/Linux compatible gUSA software atomic sequences for the atomic
  362. built-in functions. The generated atomic sequences require additional support
  363. from the interrupt/exception handling code of the system and are only suitable
  364. for SH3* and SH4* single-core systems. This option is enabled by default when
  365. the target is <code>sh*-*-linux*</code> and SH3* or SH4*. When the target is SH4A,
  366. this option also partially utilizes the hardware atomic instructions
  367. <code>movli.l</code> and <code>movco.l</code> to create more efficient code, unless
  368. &lsquo;<samp>strict</samp>&rsquo; is specified.
  369. </p>
  370. </dd>
  371. <dt>&lsquo;<samp>soft-tcb</samp>&rsquo;</dt>
  372. <dd><p>Generate software atomic sequences that use a variable in the thread control
  373. block. This is a variation of the gUSA sequences which can also be used on
  374. SH1* and SH2* targets. The generated atomic sequences require additional
  375. support from the interrupt/exception handling code of the system and are only
  376. suitable for single-core systems. When using this model, the &lsquo;<samp>gbr-offset=</samp>&rsquo;
  377. parameter has to be specified as well.
  378. </p>
  379. </dd>
  380. <dt>&lsquo;<samp>soft-imask</samp>&rsquo;</dt>
  381. <dd><p>Generate software atomic sequences that temporarily disable interrupts by
  382. setting <code>SR.IMASK = 1111</code>. This model works only when the program runs
  383. in privileged mode and is only suitable for single-core systems. Additional
  384. support from the interrupt/exception handling code of the system is not
  385. required. This model is enabled by default when the target is
  386. <code>sh*-*-linux*</code> and SH1* or SH2*.
  387. </p>
  388. </dd>
  389. <dt>&lsquo;<samp>hard-llcs</samp>&rsquo;</dt>
  390. <dd><p>Generate hardware atomic sequences using the <code>movli.l</code> and <code>movco.l</code>
  391. instructions only. This is only available on SH4A and is suitable for
  392. multi-core systems. Since the hardware instructions support only 32 bit atomic
  393. variables access to 8 or 16 bit variables is emulated with 32 bit accesses.
  394. Code compiled with this option is also compatible with other software
  395. atomic model interrupt/exception handling systems if executed on an SH4A
  396. system. Additional support from the interrupt/exception handling code of the
  397. system is not required for this model.
  398. </p>
  399. </dd>
  400. <dt>&lsquo;<samp>gbr-offset=</samp>&rsquo;</dt>
  401. <dd><p>This parameter specifies the offset in bytes of the variable in the thread
  402. control block structure that should be used by the generated atomic sequences
  403. when the &lsquo;<samp>soft-tcb</samp>&rsquo; model has been selected. For other models this
  404. parameter is ignored. The specified value must be an integer multiple of four
  405. and in the range 0-1020.
  406. </p>
  407. </dd>
  408. <dt>&lsquo;<samp>strict</samp>&rsquo;</dt>
  409. <dd><p>This parameter prevents mixed usage of multiple atomic models, even if they
  410. are compatible, and makes the compiler generate atomic sequences of the
  411. specified model only.
  412. </p>
  413. </dd>
  414. </dl>
  415. </dd>
  416. <dt><code>-mtas</code></dt>
  417. <dd><a name="index-mtas"></a>
  418. <p>Generate the <code>tas.b</code> opcode for <code>__atomic_test_and_set</code>.
  419. Notice that depending on the particular hardware and software configuration
  420. this can degrade overall performance due to the operand cache line flushes
  421. that are implied by the <code>tas.b</code> instruction. On multi-core SH4A
  422. processors the <code>tas.b</code> instruction must be used with caution since it
  423. can result in data corruption for certain cache configurations.
  424. </p>
  425. </dd>
  426. <dt><code>-mprefergot</code></dt>
  427. <dd><a name="index-mprefergot"></a>
  428. <p>When generating position-independent code, emit function calls using
  429. the Global Offset Table instead of the Procedure Linkage Table.
  430. </p>
  431. </dd>
  432. <dt><code>-musermode</code></dt>
  433. <dt><code>-mno-usermode</code></dt>
  434. <dd><a name="index-musermode"></a>
  435. <a name="index-mno_002dusermode"></a>
  436. <p>Don&rsquo;t allow (allow) the compiler generating privileged mode code. Specifying
  437. <samp>-musermode</samp> also implies <samp>-mno-inline-ic_invalidate</samp> if the
  438. inlined code would not work in user mode. <samp>-musermode</samp> is the default
  439. when the target is <code>sh*-*-linux*</code>. If the target is SH1* or SH2*
  440. <samp>-musermode</samp> has no effect, since there is no user mode.
  441. </p>
  442. </dd>
  443. <dt><code>-multcost=<var>number</var></code></dt>
  444. <dd><a name="index-multcost_003dnumber"></a>
  445. <p>Set the cost to assume for a multiply insn.
  446. </p>
  447. </dd>
  448. <dt><code>-mdiv=<var>strategy</var></code></dt>
  449. <dd><a name="index-mdiv_003dstrategy"></a>
  450. <p>Set the division strategy to be used for integer division operations.
  451. <var>strategy</var> can be one of:
  452. </p>
  453. <dl compact="compact">
  454. <dt>&lsquo;<samp>call-div1</samp>&rsquo;</dt>
  455. <dd><p>Calls a library function that uses the single-step division instruction
  456. <code>div1</code> to perform the operation. Division by zero calculates an
  457. unspecified result and does not trap. This is the default except for SH4,
  458. SH2A and SHcompact.
  459. </p>
  460. </dd>
  461. <dt>&lsquo;<samp>call-fp</samp>&rsquo;</dt>
  462. <dd><p>Calls a library function that performs the operation in double precision
  463. floating point. Division by zero causes a floating-point exception. This is
  464. the default for SHcompact with FPU. Specifying this for targets that do not
  465. have a double precision FPU defaults to <code>call-div1</code>.
  466. </p>
  467. </dd>
  468. <dt>&lsquo;<samp>call-table</samp>&rsquo;</dt>
  469. <dd><p>Calls a library function that uses a lookup table for small divisors and
  470. the <code>div1</code> instruction with case distinction for larger divisors. Division
  471. by zero calculates an unspecified result and does not trap. This is the default
  472. for SH4. Specifying this for targets that do not have dynamic shift
  473. instructions defaults to <code>call-div1</code>.
  474. </p>
  475. </dd>
  476. </dl>
  477. <p>When a division strategy has not been specified the default strategy is
  478. selected based on the current target. For SH2A the default strategy is to
  479. use the <code>divs</code> and <code>divu</code> instructions instead of library function
  480. calls.
  481. </p>
  482. </dd>
  483. <dt><code>-maccumulate-outgoing-args</code></dt>
  484. <dd><a name="index-maccumulate_002doutgoing_002dargs"></a>
  485. <p>Reserve space once for outgoing arguments in the function prologue rather
  486. than around each call. Generally beneficial for performance and size. Also
  487. needed for unwinding to avoid changing the stack frame around conditional code.
  488. </p>
  489. </dd>
  490. <dt><code>-mdivsi3_libfunc=<var>name</var></code></dt>
  491. <dd><a name="index-mdivsi3_005flibfunc_003dname"></a>
  492. <p>Set the name of the library function used for 32-bit signed division to
  493. <var>name</var>.
  494. This only affects the name used in the &lsquo;<samp>call</samp>&rsquo; division strategies, and
  495. the compiler still expects the same sets of input/output/clobbered registers as
  496. if this option were not present.
  497. </p>
  498. </dd>
  499. <dt><code>-mfixed-range=<var>register-range</var></code></dt>
  500. <dd><a name="index-mfixed_002drange-2"></a>
  501. <p>Generate code treating the given register range as fixed registers.
  502. A fixed register is one that the register allocator can not use. This is
  503. useful when compiling kernel code. A register range is specified as
  504. two registers separated by a dash. Multiple register ranges can be
  505. specified separated by a comma.
  506. </p>
  507. </dd>
  508. <dt><code>-mbranch-cost=<var>num</var></code></dt>
  509. <dd><a name="index-mbranch_002dcost_003dnum"></a>
  510. <p>Assume <var>num</var> to be the cost for a branch instruction. Higher numbers
  511. make the compiler try to generate more branch-free code if possible.
  512. If not specified the value is selected depending on the processor type that
  513. is being compiled for.
  514. </p>
  515. </dd>
  516. <dt><code>-mzdcbranch</code></dt>
  517. <dt><code>-mno-zdcbranch</code></dt>
  518. <dd><a name="index-mzdcbranch"></a>
  519. <a name="index-mno_002dzdcbranch"></a>
  520. <p>Assume (do not assume) that zero displacement conditional branch instructions
  521. <code>bt</code> and <code>bf</code> are fast. If <samp>-mzdcbranch</samp> is specified, the
  522. compiler prefers zero displacement branch code sequences. This is
  523. enabled by default when generating code for SH4 and SH4A. It can be explicitly
  524. disabled by specifying <samp>-mno-zdcbranch</samp>.
  525. </p>
  526. </dd>
  527. <dt><code>-mcbranch-force-delay-slot</code></dt>
  528. <dd><a name="index-mcbranch_002dforce_002ddelay_002dslot"></a>
  529. <p>Force the usage of delay slots for conditional branches, which stuffs the delay
  530. slot with a <code>nop</code> if a suitable instruction cannot be found. By default
  531. this option is disabled. It can be enabled to work around hardware bugs as
  532. found in the original SH7055.
  533. </p>
  534. </dd>
  535. <dt><code>-mfused-madd</code></dt>
  536. <dt><code>-mno-fused-madd</code></dt>
  537. <dd><a name="index-mfused_002dmadd-4"></a>
  538. <a name="index-mno_002dfused_002dmadd-4"></a>
  539. <p>Generate code that uses (does not use) the floating-point multiply and
  540. accumulate instructions. These instructions are generated by default
  541. if hardware floating point is used. The machine-dependent
  542. <samp>-mfused-madd</samp> option is now mapped to the machine-independent
  543. <samp>-ffp-contract=fast</samp> option, and <samp>-mno-fused-madd</samp> is
  544. mapped to <samp>-ffp-contract=off</samp>.
  545. </p>
  546. </dd>
  547. <dt><code>-mfsca</code></dt>
  548. <dt><code>-mno-fsca</code></dt>
  549. <dd><a name="index-mfsca"></a>
  550. <a name="index-mno_002dfsca"></a>
  551. <p>Allow or disallow the compiler to emit the <code>fsca</code> instruction for sine
  552. and cosine approximations. The option <samp>-mfsca</samp> must be used in
  553. combination with <samp>-funsafe-math-optimizations</samp>. It is enabled by default
  554. when generating code for SH4A. Using <samp>-mno-fsca</samp> disables sine and cosine
  555. approximations even if <samp>-funsafe-math-optimizations</samp> is in effect.
  556. </p>
  557. </dd>
  558. <dt><code>-mfsrra</code></dt>
  559. <dt><code>-mno-fsrra</code></dt>
  560. <dd><a name="index-mfsrra"></a>
  561. <a name="index-mno_002dfsrra"></a>
  562. <p>Allow or disallow the compiler to emit the <code>fsrra</code> instruction for
  563. reciprocal square root approximations. The option <samp>-mfsrra</samp> must be used
  564. in combination with <samp>-funsafe-math-optimizations</samp> and
  565. <samp>-ffinite-math-only</samp>. It is enabled by default when generating code for
  566. SH4A. Using <samp>-mno-fsrra</samp> disables reciprocal square root approximations
  567. even if <samp>-funsafe-math-optimizations</samp> and <samp>-ffinite-math-only</samp> are
  568. in effect.
  569. </p>
  570. </dd>
  571. <dt><code>-mpretend-cmove</code></dt>
  572. <dd><a name="index-mpretend_002dcmove"></a>
  573. <p>Prefer zero-displacement conditional branches for conditional move instruction
  574. patterns. This can result in faster code on the SH4 processor.
  575. </p>
  576. </dd>
  577. <dt><code>-mfdpic</code></dt>
  578. <dd><a name="index-fdpic"></a>
  579. <p>Generate code using the FDPIC ABI.
  580. </p>
  581. </dd>
  582. </dl>
  583. <hr>
  584. <div class="header">
  585. <p>
  586. Next: <a href="Solaris-2-Options.html#Solaris-2-Options" accesskey="n" rel="next">Solaris 2 Options</a>, Previous: <a href="Score-Options.html#Score-Options" accesskey="p" rel="prev">Score 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>
  587. </div>
  588. </body>
  589. </html>