ARC-Options.html 32 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923
  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): ARC Options</title>
  20. <meta name="description" content="Using the GNU Compiler Collection (GCC): ARC Options">
  21. <meta name="keywords" content="Using the GNU Compiler Collection (GCC): ARC 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="ARM-Options.html#ARM-Options" rel="next" title="ARM Options">
  31. <link href="Adapteva-Epiphany-Options.html#Adapteva-Epiphany-Options" rel="prev" title="Adapteva Epiphany 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="ARC-Options"></a>
  63. <div class="header">
  64. <p>
  65. Next: <a href="ARM-Options.html#ARM-Options" accesskey="n" rel="next">ARM Options</a>, Previous: <a href="Adapteva-Epiphany-Options.html#Adapteva-Epiphany-Options" accesskey="p" rel="prev">Adapteva Epiphany 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="ARC-Options-1"></a>
  69. <h4 class="subsection">3.18.3 ARC Options</h4>
  70. <a name="index-ARC-options"></a>
  71. <p>The following options control the architecture variant for which code
  72. is being compiled:
  73. </p>
  74. <dl compact="compact">
  75. <dt><code>-mbarrel-shifter</code></dt>
  76. <dd><a name="index-mbarrel_002dshifter"></a>
  77. <p>Generate instructions supported by barrel shifter. This is the default
  78. unless <samp>-mcpu=ARC601</samp> or &lsquo;<samp>-mcpu=ARCEM</samp>&rsquo; is in effect.
  79. </p>
  80. </dd>
  81. <dt><code>-mcpu=<var>cpu</var></code></dt>
  82. <dd><a name="index-mcpu-1"></a>
  83. <p>Set architecture type, register usage, and instruction scheduling
  84. parameters for <var>cpu</var>. There are also shortcut alias options
  85. available for backward compatibility and convenience. Supported
  86. values for <var>cpu</var> are
  87. </p>
  88. <dl compact="compact">
  89. <dd><a name="index-mA6"></a>
  90. <a name="index-mARC600"></a>
  91. </dd>
  92. <dt>&lsquo;<samp>arc600</samp>&rsquo;</dt>
  93. <dd><p>Compile for ARC600. Aliases: <samp>-mA6</samp>, <samp>-mARC600</samp>.
  94. </p>
  95. </dd>
  96. <dt>&lsquo;<samp>arc601</samp>&rsquo;</dt>
  97. <dd><a name="index-mARC601"></a>
  98. <p>Compile for ARC601. Alias: <samp>-mARC601</samp>.
  99. </p>
  100. </dd>
  101. <dt>&lsquo;<samp>arc700</samp>&rsquo;</dt>
  102. <dd><a name="index-mA7"></a>
  103. <a name="index-mARC700"></a>
  104. <p>Compile for ARC700. Aliases: <samp>-mA7</samp>, <samp>-mARC700</samp>.
  105. This is the default when configured with <samp>--with-cpu=arc700</samp>.
  106. </p>
  107. </dd>
  108. <dt>&lsquo;<samp>arcem</samp>&rsquo;</dt>
  109. <dd><p>Compile for ARC EM.
  110. </p>
  111. </dd>
  112. <dt>&lsquo;<samp>archs</samp>&rsquo;</dt>
  113. <dd><p>Compile for ARC HS.
  114. </p>
  115. </dd>
  116. <dt>&lsquo;<samp>em</samp>&rsquo;</dt>
  117. <dd><p>Compile for ARC EM CPU with no hardware extensions.
  118. </p>
  119. </dd>
  120. <dt>&lsquo;<samp>em4</samp>&rsquo;</dt>
  121. <dd><p>Compile for ARC EM4 CPU.
  122. </p>
  123. </dd>
  124. <dt>&lsquo;<samp>em4_dmips</samp>&rsquo;</dt>
  125. <dd><p>Compile for ARC EM4 DMIPS CPU.
  126. </p>
  127. </dd>
  128. <dt>&lsquo;<samp>em4_fpus</samp>&rsquo;</dt>
  129. <dd><p>Compile for ARC EM4 DMIPS CPU with the single-precision floating-point
  130. extension.
  131. </p>
  132. </dd>
  133. <dt>&lsquo;<samp>em4_fpuda</samp>&rsquo;</dt>
  134. <dd><p>Compile for ARC EM4 DMIPS CPU with single-precision floating-point and
  135. double assist instructions.
  136. </p>
  137. </dd>
  138. <dt>&lsquo;<samp>hs</samp>&rsquo;</dt>
  139. <dd><p>Compile for ARC HS CPU with no hardware extensions except the atomic
  140. instructions.
  141. </p>
  142. </dd>
  143. <dt>&lsquo;<samp>hs34</samp>&rsquo;</dt>
  144. <dd><p>Compile for ARC HS34 CPU.
  145. </p>
  146. </dd>
  147. <dt>&lsquo;<samp>hs38</samp>&rsquo;</dt>
  148. <dd><p>Compile for ARC HS38 CPU.
  149. </p>
  150. </dd>
  151. <dt>&lsquo;<samp>hs38_linux</samp>&rsquo;</dt>
  152. <dd><p>Compile for ARC HS38 CPU with all hardware extensions on.
  153. </p>
  154. </dd>
  155. <dt>&lsquo;<samp>arc600_norm</samp>&rsquo;</dt>
  156. <dd><p>Compile for ARC 600 CPU with <code>norm</code> instructions enabled.
  157. </p>
  158. </dd>
  159. <dt>&lsquo;<samp>arc600_mul32x16</samp>&rsquo;</dt>
  160. <dd><p>Compile for ARC 600 CPU with <code>norm</code> and 32x16-bit multiply
  161. instructions enabled.
  162. </p>
  163. </dd>
  164. <dt>&lsquo;<samp>arc600_mul64</samp>&rsquo;</dt>
  165. <dd><p>Compile for ARC 600 CPU with <code>norm</code> and <code>mul64</code>-family
  166. instructions enabled.
  167. </p>
  168. </dd>
  169. <dt>&lsquo;<samp>arc601_norm</samp>&rsquo;</dt>
  170. <dd><p>Compile for ARC 601 CPU with <code>norm</code> instructions enabled.
  171. </p>
  172. </dd>
  173. <dt>&lsquo;<samp>arc601_mul32x16</samp>&rsquo;</dt>
  174. <dd><p>Compile for ARC 601 CPU with <code>norm</code> and 32x16-bit multiply
  175. instructions enabled.
  176. </p>
  177. </dd>
  178. <dt>&lsquo;<samp>arc601_mul64</samp>&rsquo;</dt>
  179. <dd><p>Compile for ARC 601 CPU with <code>norm</code> and <code>mul64</code>-family
  180. instructions enabled.
  181. </p>
  182. </dd>
  183. <dt>&lsquo;<samp>nps400</samp>&rsquo;</dt>
  184. <dd><p>Compile for ARC 700 on NPS400 chip.
  185. </p>
  186. </dd>
  187. </dl>
  188. </dd>
  189. <dt><code>-mdpfp</code></dt>
  190. <dd><a name="index-mdpfp"></a>
  191. </dd>
  192. <dt><code>-mdpfp-compact</code></dt>
  193. <dd><a name="index-mdpfp_002dcompact"></a>
  194. <p>Generate double-precision FPX instructions, tuned for the compact
  195. implementation.
  196. </p>
  197. </dd>
  198. <dt><code>-mdpfp-fast</code></dt>
  199. <dd><a name="index-mdpfp_002dfast"></a>
  200. <p>Generate double-precision FPX instructions, tuned for the fast
  201. implementation.
  202. </p>
  203. </dd>
  204. <dt><code>-mno-dpfp-lrsr</code></dt>
  205. <dd><a name="index-mno_002ddpfp_002dlrsr"></a>
  206. <p>Disable <code>lr</code> and <code>sr</code> instructions from using FPX extension
  207. aux registers.
  208. </p>
  209. </dd>
  210. <dt><code>-mea</code></dt>
  211. <dd><a name="index-mea"></a>
  212. <p>Generate extended arithmetic instructions. Currently only
  213. <code>divaw</code>, <code>adds</code>, <code>subs</code>, and <code>sat16</code> are
  214. supported. This is always enabled for <samp>-mcpu=ARC700</samp>.
  215. </p>
  216. </dd>
  217. <dt><code>-mno-mpy</code></dt>
  218. <dd><a name="index-mno_002dmpy"></a>
  219. <p>Do not generate <code>mpy</code>-family instructions for ARC700. This option is
  220. deprecated.
  221. </p>
  222. </dd>
  223. <dt><code>-mmul32x16</code></dt>
  224. <dd><a name="index-mmul32x16"></a>
  225. <p>Generate 32x16-bit multiply and multiply-accumulate instructions.
  226. </p>
  227. </dd>
  228. <dt><code>-mmul64</code></dt>
  229. <dd><a name="index-mmul64"></a>
  230. <p>Generate <code>mul64</code> and <code>mulu64</code> instructions.
  231. Only valid for <samp>-mcpu=ARC600</samp>.
  232. </p>
  233. </dd>
  234. <dt><code>-mnorm</code></dt>
  235. <dd><a name="index-mnorm"></a>
  236. <p>Generate <code>norm</code> instructions. This is the default if <samp>-mcpu=ARC700</samp>
  237. is in effect.
  238. </p>
  239. </dd>
  240. <dt><code>-mspfp</code></dt>
  241. <dd><a name="index-mspfp"></a>
  242. </dd>
  243. <dt><code>-mspfp-compact</code></dt>
  244. <dd><a name="index-mspfp_002dcompact"></a>
  245. <p>Generate single-precision FPX instructions, tuned for the compact
  246. implementation.
  247. </p>
  248. </dd>
  249. <dt><code>-mspfp-fast</code></dt>
  250. <dd><a name="index-mspfp_002dfast"></a>
  251. <p>Generate single-precision FPX instructions, tuned for the fast
  252. implementation.
  253. </p>
  254. </dd>
  255. <dt><code>-msimd</code></dt>
  256. <dd><a name="index-msimd"></a>
  257. <p>Enable generation of ARC SIMD instructions via target-specific
  258. builtins. Only valid for <samp>-mcpu=ARC700</samp>.
  259. </p>
  260. </dd>
  261. <dt><code>-msoft-float</code></dt>
  262. <dd><a name="index-msoft_002dfloat"></a>
  263. <p>This option ignored; it is provided for compatibility purposes only.
  264. Software floating-point code is emitted by default, and this default
  265. can overridden by FPX options; <samp>-mspfp</samp>, <samp>-mspfp-compact</samp>, or
  266. <samp>-mspfp-fast</samp> for single precision, and <samp>-mdpfp</samp>,
  267. <samp>-mdpfp-compact</samp>, or <samp>-mdpfp-fast</samp> for double precision.
  268. </p>
  269. </dd>
  270. <dt><code>-mswap</code></dt>
  271. <dd><a name="index-mswap"></a>
  272. <p>Generate <code>swap</code> instructions.
  273. </p>
  274. </dd>
  275. <dt><code>-matomic</code></dt>
  276. <dd><a name="index-matomic"></a>
  277. <p>This enables use of the locked load/store conditional extension to implement
  278. atomic memory built-in functions. Not available for ARC 6xx or ARC
  279. EM cores.
  280. </p>
  281. </dd>
  282. <dt><code>-mdiv-rem</code></dt>
  283. <dd><a name="index-mdiv_002drem"></a>
  284. <p>Enable <code>div</code> and <code>rem</code> instructions for ARCv2 cores.
  285. </p>
  286. </dd>
  287. <dt><code>-mcode-density</code></dt>
  288. <dd><a name="index-mcode_002ddensity"></a>
  289. <p>Enable code density instructions for ARC EM.
  290. This option is on by default for ARC HS.
  291. </p>
  292. </dd>
  293. <dt><code>-mll64</code></dt>
  294. <dd><a name="index-mll64"></a>
  295. <p>Enable double load/store operations for ARC HS cores.
  296. </p>
  297. </dd>
  298. <dt><code>-mtp-regno=<var>regno</var></code></dt>
  299. <dd><a name="index-mtp_002dregno"></a>
  300. <p>Specify thread pointer register number.
  301. </p>
  302. </dd>
  303. <dt><code>-mmpy-option=<var>multo</var></code></dt>
  304. <dd><a name="index-mmpy_002doption"></a>
  305. <p>Compile ARCv2 code with a multiplier design option. You can specify
  306. the option using either a string or numeric value for <var>multo</var>.
  307. &lsquo;<samp>wlh1</samp>&rsquo; is the default value. The recognized values are:
  308. </p>
  309. <dl compact="compact">
  310. <dt>&lsquo;<samp>0</samp>&rsquo;</dt>
  311. <dt>&lsquo;<samp>none</samp>&rsquo;</dt>
  312. <dd><p>No multiplier available.
  313. </p>
  314. </dd>
  315. <dt>&lsquo;<samp>1</samp>&rsquo;</dt>
  316. <dt>&lsquo;<samp>w</samp>&rsquo;</dt>
  317. <dd><p>16x16 multiplier, fully pipelined.
  318. The following instructions are enabled: <code>mpyw</code> and <code>mpyuw</code>.
  319. </p>
  320. </dd>
  321. <dt>&lsquo;<samp>2</samp>&rsquo;</dt>
  322. <dt>&lsquo;<samp>wlh1</samp>&rsquo;</dt>
  323. <dd><p>32x32 multiplier, fully
  324. pipelined (1 stage). The following instructions are additionally
  325. enabled: <code>mpy</code>, <code>mpyu</code>, <code>mpym</code>, <code>mpymu</code>, and <code>mpy_s</code>.
  326. </p>
  327. </dd>
  328. <dt>&lsquo;<samp>3</samp>&rsquo;</dt>
  329. <dt>&lsquo;<samp>wlh2</samp>&rsquo;</dt>
  330. <dd><p>32x32 multiplier, fully pipelined
  331. (2 stages). The following instructions are additionally enabled: <code>mpy</code>,
  332. <code>mpyu</code>, <code>mpym</code>, <code>mpymu</code>, and <code>mpy_s</code>.
  333. </p>
  334. </dd>
  335. <dt>&lsquo;<samp>4</samp>&rsquo;</dt>
  336. <dt>&lsquo;<samp>wlh3</samp>&rsquo;</dt>
  337. <dd><p>Two 16x16 multipliers, blocking,
  338. sequential. The following instructions are additionally enabled: <code>mpy</code>,
  339. <code>mpyu</code>, <code>mpym</code>, <code>mpymu</code>, and <code>mpy_s</code>.
  340. </p>
  341. </dd>
  342. <dt>&lsquo;<samp>5</samp>&rsquo;</dt>
  343. <dt>&lsquo;<samp>wlh4</samp>&rsquo;</dt>
  344. <dd><p>One 16x16 multiplier, blocking,
  345. sequential. The following instructions are additionally enabled: <code>mpy</code>,
  346. <code>mpyu</code>, <code>mpym</code>, <code>mpymu</code>, and <code>mpy_s</code>.
  347. </p>
  348. </dd>
  349. <dt>&lsquo;<samp>6</samp>&rsquo;</dt>
  350. <dt>&lsquo;<samp>wlh5</samp>&rsquo;</dt>
  351. <dd><p>One 32x4 multiplier, blocking,
  352. sequential. The following instructions are additionally enabled: <code>mpy</code>,
  353. <code>mpyu</code>, <code>mpym</code>, <code>mpymu</code>, and <code>mpy_s</code>.
  354. </p>
  355. </dd>
  356. <dt>&lsquo;<samp>7</samp>&rsquo;</dt>
  357. <dt>&lsquo;<samp>plus_dmpy</samp>&rsquo;</dt>
  358. <dd><p>ARC HS SIMD support.
  359. </p>
  360. </dd>
  361. <dt>&lsquo;<samp>8</samp>&rsquo;</dt>
  362. <dt>&lsquo;<samp>plus_macd</samp>&rsquo;</dt>
  363. <dd><p>ARC HS SIMD support.
  364. </p>
  365. </dd>
  366. <dt>&lsquo;<samp>9</samp>&rsquo;</dt>
  367. <dt>&lsquo;<samp>plus_qmacw</samp>&rsquo;</dt>
  368. <dd><p>ARC HS SIMD support.
  369. </p>
  370. </dd>
  371. </dl>
  372. <p>This option is only available for ARCv2 cores.
  373. </p>
  374. </dd>
  375. <dt><code>-mfpu=<var>fpu</var></code></dt>
  376. <dd><a name="index-mfpu"></a>
  377. <p>Enables support for specific floating-point hardware extensions for ARCv2
  378. cores. Supported values for <var>fpu</var> are:
  379. </p>
  380. <dl compact="compact">
  381. <dt>&lsquo;<samp>fpus</samp>&rsquo;</dt>
  382. <dd><p>Enables support for single-precision floating-point hardware
  383. extensions.
  384. </p>
  385. </dd>
  386. <dt>&lsquo;<samp>fpud</samp>&rsquo;</dt>
  387. <dd><p>Enables support for double-precision floating-point hardware
  388. extensions. The single-precision floating-point extension is also
  389. enabled. Not available for ARC EM.
  390. </p>
  391. </dd>
  392. <dt>&lsquo;<samp>fpuda</samp>&rsquo;</dt>
  393. <dd><p>Enables support for double-precision floating-point hardware
  394. extensions using double-precision assist instructions. The single-precision
  395. floating-point extension is also enabled. This option is
  396. only available for ARC EM.
  397. </p>
  398. </dd>
  399. <dt>&lsquo;<samp>fpuda_div</samp>&rsquo;</dt>
  400. <dd><p>Enables support for double-precision floating-point hardware
  401. extensions using double-precision assist instructions.
  402. The single-precision floating-point, square-root, and divide
  403. extensions are also enabled. This option is
  404. only available for ARC EM.
  405. </p>
  406. </dd>
  407. <dt>&lsquo;<samp>fpuda_fma</samp>&rsquo;</dt>
  408. <dd><p>Enables support for double-precision floating-point hardware
  409. extensions using double-precision assist instructions.
  410. The single-precision floating-point and fused multiply and add
  411. hardware extensions are also enabled. This option is
  412. only available for ARC EM.
  413. </p>
  414. </dd>
  415. <dt>&lsquo;<samp>fpuda_all</samp>&rsquo;</dt>
  416. <dd><p>Enables support for double-precision floating-point hardware
  417. extensions using double-precision assist instructions.
  418. All single-precision floating-point hardware extensions are also
  419. enabled. This option is only available for ARC EM.
  420. </p>
  421. </dd>
  422. <dt>&lsquo;<samp>fpus_div</samp>&rsquo;</dt>
  423. <dd><p>Enables support for single-precision floating-point, square-root and divide
  424. hardware extensions.
  425. </p>
  426. </dd>
  427. <dt>&lsquo;<samp>fpud_div</samp>&rsquo;</dt>
  428. <dd><p>Enables support for double-precision floating-point, square-root and divide
  429. hardware extensions. This option
  430. includes option &lsquo;<samp>fpus_div</samp>&rsquo;. Not available for ARC EM.
  431. </p>
  432. </dd>
  433. <dt>&lsquo;<samp>fpus_fma</samp>&rsquo;</dt>
  434. <dd><p>Enables support for single-precision floating-point and
  435. fused multiply and add hardware extensions.
  436. </p>
  437. </dd>
  438. <dt>&lsquo;<samp>fpud_fma</samp>&rsquo;</dt>
  439. <dd><p>Enables support for double-precision floating-point and
  440. fused multiply and add hardware extensions. This option
  441. includes option &lsquo;<samp>fpus_fma</samp>&rsquo;. Not available for ARC EM.
  442. </p>
  443. </dd>
  444. <dt>&lsquo;<samp>fpus_all</samp>&rsquo;</dt>
  445. <dd><p>Enables support for all single-precision floating-point hardware
  446. extensions.
  447. </p>
  448. </dd>
  449. <dt>&lsquo;<samp>fpud_all</samp>&rsquo;</dt>
  450. <dd><p>Enables support for all single- and double-precision floating-point
  451. hardware extensions. Not available for ARC EM.
  452. </p>
  453. </dd>
  454. </dl>
  455. </dd>
  456. </dl>
  457. <p>The following options are passed through to the assembler, and also
  458. define preprocessor macro symbols.
  459. </p>
  460. <dl compact="compact">
  461. <dt><code>-mdsp-packa</code></dt>
  462. <dd><a name="index-mdsp_002dpacka"></a>
  463. <p>Passed down to the assembler to enable the DSP Pack A extensions.
  464. Also sets the preprocessor symbol <code>__Xdsp_packa</code>. This option is
  465. deprecated.
  466. </p>
  467. </dd>
  468. <dt><code>-mdvbf</code></dt>
  469. <dd><a name="index-mdvbf"></a>
  470. <p>Passed down to the assembler to enable the dual Viterbi butterfly
  471. extension. Also sets the preprocessor symbol <code>__Xdvbf</code>. This
  472. option is deprecated.
  473. </p>
  474. </dd>
  475. <dt><code>-mlock</code></dt>
  476. <dd><a name="index-mlock"></a>
  477. <p>Passed down to the assembler to enable the locked load/store
  478. conditional extension. Also sets the preprocessor symbol
  479. <code>__Xlock</code>.
  480. </p>
  481. </dd>
  482. <dt><code>-mmac-d16</code></dt>
  483. <dd><a name="index-mmac_002dd16"></a>
  484. <p>Passed down to the assembler. Also sets the preprocessor symbol
  485. <code>__Xxmac_d16</code>. This option is deprecated.
  486. </p>
  487. </dd>
  488. <dt><code>-mmac-24</code></dt>
  489. <dd><a name="index-mmac_002d24"></a>
  490. <p>Passed down to the assembler. Also sets the preprocessor symbol
  491. <code>__Xxmac_24</code>. This option is deprecated.
  492. </p>
  493. </dd>
  494. <dt><code>-mrtsc</code></dt>
  495. <dd><a name="index-mrtsc"></a>
  496. <p>Passed down to the assembler to enable the 64-bit time-stamp counter
  497. extension instruction. Also sets the preprocessor symbol
  498. <code>__Xrtsc</code>. This option is deprecated.
  499. </p>
  500. </dd>
  501. <dt><code>-mswape</code></dt>
  502. <dd><a name="index-mswape"></a>
  503. <p>Passed down to the assembler to enable the swap byte ordering
  504. extension instruction. Also sets the preprocessor symbol
  505. <code>__Xswape</code>.
  506. </p>
  507. </dd>
  508. <dt><code>-mtelephony</code></dt>
  509. <dd><a name="index-mtelephony"></a>
  510. <p>Passed down to the assembler to enable dual- and single-operand
  511. instructions for telephony. Also sets the preprocessor symbol
  512. <code>__Xtelephony</code>. This option is deprecated.
  513. </p>
  514. </dd>
  515. <dt><code>-mxy</code></dt>
  516. <dd><a name="index-mxy"></a>
  517. <p>Passed down to the assembler to enable the XY memory extension. Also
  518. sets the preprocessor symbol <code>__Xxy</code>.
  519. </p>
  520. </dd>
  521. </dl>
  522. <p>The following options control how the assembly code is annotated:
  523. </p>
  524. <dl compact="compact">
  525. <dt><code>-misize</code></dt>
  526. <dd><a name="index-misize"></a>
  527. <p>Annotate assembler instructions with estimated addresses.
  528. </p>
  529. </dd>
  530. <dt><code>-mannotate-align</code></dt>
  531. <dd><a name="index-mannotate_002dalign"></a>
  532. <p>Explain what alignment considerations lead to the decision to make an
  533. instruction short or long.
  534. </p>
  535. </dd>
  536. </dl>
  537. <p>The following options are passed through to the linker:
  538. </p>
  539. <dl compact="compact">
  540. <dt><code>-marclinux</code></dt>
  541. <dd><a name="index-marclinux"></a>
  542. <p>Passed through to the linker, to specify use of the <code>arclinux</code> emulation.
  543. This option is enabled by default in tool chains built for
  544. <code><span class="nolinebreak">arc-linux-uclibc</span></code><!-- /@w --> and <code><span class="nolinebreak">arceb-linux-uclibc</span></code><!-- /@w --> targets
  545. when profiling is not requested.
  546. </p>
  547. </dd>
  548. <dt><code>-marclinux_prof</code></dt>
  549. <dd><a name="index-marclinux_005fprof"></a>
  550. <p>Passed through to the linker, to specify use of the
  551. <code>arclinux_prof</code> emulation. This option is enabled by default in
  552. tool chains built for <code><span class="nolinebreak">arc-linux-uclibc</span></code><!-- /@w --> and
  553. <code><span class="nolinebreak">arceb-linux-uclibc</span></code><!-- /@w --> targets when profiling is requested.
  554. </p>
  555. </dd>
  556. </dl>
  557. <p>The following options control the semantics of generated code:
  558. </p>
  559. <dl compact="compact">
  560. <dt><code>-mlong-calls</code></dt>
  561. <dd><a name="index-mlong_002dcalls-1"></a>
  562. <p>Generate calls as register indirect calls, thus providing access
  563. to the full 32-bit address range.
  564. </p>
  565. </dd>
  566. <dt><code>-mmedium-calls</code></dt>
  567. <dd><a name="index-mmedium_002dcalls"></a>
  568. <p>Don&rsquo;t use less than 25-bit addressing range for calls, which is the
  569. offset available for an unconditional branch-and-link
  570. instruction. Conditional execution of function calls is suppressed, to
  571. allow use of the 25-bit range, rather than the 21-bit range with
  572. conditional branch-and-link. This is the default for tool chains built
  573. for <code><span class="nolinebreak">arc-linux-uclibc</span></code><!-- /@w --> and <code><span class="nolinebreak">arceb-linux-uclibc</span></code><!-- /@w --> targets.
  574. </p>
  575. </dd>
  576. <dt><code>-mno-sdata</code></dt>
  577. <dd><a name="index-mno_002dsdata"></a>
  578. <p>Do not generate sdata references. This is the default for tool chains
  579. built for <code><span class="nolinebreak">arc-linux-uclibc</span></code><!-- /@w --> and <code><span class="nolinebreak">arceb-linux-uclibc</span></code><!-- /@w -->
  580. targets.
  581. </p>
  582. </dd>
  583. <dt><code>-mvolatile-cache</code></dt>
  584. <dd><a name="index-mvolatile_002dcache"></a>
  585. <p>Use ordinarily cached memory accesses for volatile references. This is the
  586. default.
  587. </p>
  588. </dd>
  589. <dt><code>-mno-volatile-cache</code></dt>
  590. <dd><a name="index-mno_002dvolatile_002dcache"></a>
  591. <p>Enable cache bypass for volatile references.
  592. </p>
  593. </dd>
  594. </dl>
  595. <p>The following options fine tune code generation:
  596. </p><dl compact="compact">
  597. <dt><code>-malign-call</code></dt>
  598. <dd><a name="index-malign_002dcall"></a>
  599. <p>Do alignment optimizations for call instructions.
  600. </p>
  601. </dd>
  602. <dt><code>-mauto-modify-reg</code></dt>
  603. <dd><a name="index-mauto_002dmodify_002dreg"></a>
  604. <p>Enable the use of pre/post modify with register displacement.
  605. </p>
  606. </dd>
  607. <dt><code>-mbbit-peephole</code></dt>
  608. <dd><a name="index-mbbit_002dpeephole"></a>
  609. <p>Enable bbit peephole2.
  610. </p>
  611. </dd>
  612. <dt><code>-mno-brcc</code></dt>
  613. <dd><a name="index-mno_002dbrcc"></a>
  614. <p>This option disables a target-specific pass in <samp>arc_reorg</samp> to
  615. generate compare-and-branch (<code>br<var>cc</var></code>) instructions.
  616. It has no effect on
  617. generation of these instructions driven by the combiner pass.
  618. </p>
  619. </dd>
  620. <dt><code>-mcase-vector-pcrel</code></dt>
  621. <dd><a name="index-mcase_002dvector_002dpcrel"></a>
  622. <p>Use PC-relative switch case tables to enable case table shortening.
  623. This is the default for <samp>-Os</samp>.
  624. </p>
  625. </dd>
  626. <dt><code>-mcompact-casesi</code></dt>
  627. <dd><a name="index-mcompact_002dcasesi"></a>
  628. <p>Enable compact <code>casesi</code> pattern. This is the default for <samp>-Os</samp>,
  629. and only available for ARCv1 cores.
  630. </p>
  631. </dd>
  632. <dt><code>-mno-cond-exec</code></dt>
  633. <dd><a name="index-mno_002dcond_002dexec"></a>
  634. <p>Disable the ARCompact-specific pass to generate conditional
  635. execution instructions.
  636. </p>
  637. <p>Due to delay slot scheduling and interactions between operand numbers,
  638. literal sizes, instruction lengths, and the support for conditional execution,
  639. the target-independent pass to generate conditional execution is often lacking,
  640. so the ARC port has kept a special pass around that tries to find more
  641. conditional execution generation opportunities after register allocation,
  642. branch shortening, and delay slot scheduling have been done. This pass
  643. generally, but not always, improves performance and code size, at the cost of
  644. extra compilation time, which is why there is an option to switch it off.
  645. If you have a problem with call instructions exceeding their allowable
  646. offset range because they are conditionalized, you should consider using
  647. <samp>-mmedium-calls</samp> instead.
  648. </p>
  649. </dd>
  650. <dt><code>-mearly-cbranchsi</code></dt>
  651. <dd><a name="index-mearly_002dcbranchsi"></a>
  652. <p>Enable pre-reload use of the <code>cbranchsi</code> pattern.
  653. </p>
  654. </dd>
  655. <dt><code>-mexpand-adddi</code></dt>
  656. <dd><a name="index-mexpand_002dadddi"></a>
  657. <p>Expand <code>adddi3</code> and <code>subdi3</code> at RTL generation time into
  658. <code>add.f</code>, <code>adc</code> etc.
  659. </p>
  660. </dd>
  661. <dt><code>-mindexed-loads</code></dt>
  662. <dd><a name="index-mindexed_002dloads"></a>
  663. <p>Enable the use of indexed loads. This can be problematic because some
  664. optimizers then assume that indexed stores exist, which is not
  665. the case.
  666. </p>
  667. <a name="index-mlra"></a>
  668. <p>Enable Local Register Allocation. This is still experimental for ARC,
  669. so by default the compiler uses standard reload
  670. (i.e. <samp>-mno-lra</samp>).
  671. </p>
  672. </dd>
  673. <dt><code>-mlra-priority-none</code></dt>
  674. <dd><a name="index-mlra_002dpriority_002dnone"></a>
  675. <p>Don&rsquo;t indicate any priority for target registers.
  676. </p>
  677. </dd>
  678. <dt><code>-mlra-priority-compact</code></dt>
  679. <dd><a name="index-mlra_002dpriority_002dcompact"></a>
  680. <p>Indicate target register priority for r0..r3 / r12..r15.
  681. </p>
  682. </dd>
  683. <dt><code>-mlra-priority-noncompact</code></dt>
  684. <dd><a name="index-mlra_002dpriority_002dnoncompact"></a>
  685. <p>Reduce target register priority for r0..r3 / r12..r15.
  686. </p>
  687. </dd>
  688. <dt><code>-mno-millicode</code></dt>
  689. <dd><a name="index-mno_002dmillicode"></a>
  690. <p>When optimizing for size (using <samp>-Os</samp>), prologues and epilogues
  691. that have to save or restore a large number of registers are often
  692. shortened by using call to a special function in libgcc; this is
  693. referred to as a <em>millicode</em> call. As these calls can pose
  694. performance issues, and/or cause linking issues when linking in a
  695. nonstandard way, this option is provided to turn off millicode call
  696. generation.
  697. </p>
  698. </dd>
  699. <dt><code>-mmixed-code</code></dt>
  700. <dd><a name="index-mmixed_002dcode"></a>
  701. <p>Tweak register allocation to help 16-bit instruction generation.
  702. This generally has the effect of decreasing the average instruction size
  703. while increasing the instruction count.
  704. </p>
  705. </dd>
  706. <dt><code>-mq-class</code></dt>
  707. <dd><a name="index-mq_002dclass"></a>
  708. <p>Enable &lsquo;<samp>q</samp>&rsquo; instruction alternatives.
  709. This is the default for <samp>-Os</samp>.
  710. </p>
  711. </dd>
  712. <dt><code>-mRcq</code></dt>
  713. <dd><a name="index-mRcq"></a>
  714. <p>Enable &lsquo;<samp>Rcq</samp>&rsquo; constraint handling.
  715. Most short code generation depends on this.
  716. This is the default.
  717. </p>
  718. </dd>
  719. <dt><code>-mRcw</code></dt>
  720. <dd><a name="index-mRcw"></a>
  721. <p>Enable &lsquo;<samp>Rcw</samp>&rsquo; constraint handling.
  722. Most ccfsm condexec mostly depends on this.
  723. This is the default.
  724. </p>
  725. </dd>
  726. <dt><code>-msize-level=<var>level</var></code></dt>
  727. <dd><a name="index-msize_002dlevel"></a>
  728. <p>Fine-tune size optimization with regards to instruction lengths and alignment.
  729. The recognized values for <var>level</var> are:
  730. </p><dl compact="compact">
  731. <dt>&lsquo;<samp>0</samp>&rsquo;</dt>
  732. <dd><p>No size optimization. This level is deprecated and treated like &lsquo;<samp>1</samp>&rsquo;.
  733. </p>
  734. </dd>
  735. <dt>&lsquo;<samp>1</samp>&rsquo;</dt>
  736. <dd><p>Short instructions are used opportunistically.
  737. </p>
  738. </dd>
  739. <dt>&lsquo;<samp>2</samp>&rsquo;</dt>
  740. <dd><p>In addition, alignment of loops and of code after barriers are dropped.
  741. </p>
  742. </dd>
  743. <dt>&lsquo;<samp>3</samp>&rsquo;</dt>
  744. <dd><p>In addition, optional data alignment is dropped, and the option <samp>Os</samp> is enabled.
  745. </p>
  746. </dd>
  747. </dl>
  748. <p>This defaults to &lsquo;<samp>3</samp>&rsquo; when <samp>-Os</samp> is in effect. Otherwise,
  749. the behavior when this is not set is equivalent to level &lsquo;<samp>1</samp>&rsquo;.
  750. </p>
  751. </dd>
  752. <dt><code>-mtune=<var>cpu</var></code></dt>
  753. <dd><a name="index-mtune-1"></a>
  754. <p>Set instruction scheduling parameters for <var>cpu</var>, overriding any implied
  755. by <samp>-mcpu=</samp>.
  756. </p>
  757. <p>Supported values for <var>cpu</var> are
  758. </p>
  759. <dl compact="compact">
  760. <dt>&lsquo;<samp>ARC600</samp>&rsquo;</dt>
  761. <dd><p>Tune for ARC600 CPU.
  762. </p>
  763. </dd>
  764. <dt>&lsquo;<samp>ARC601</samp>&rsquo;</dt>
  765. <dd><p>Tune for ARC601 CPU.
  766. </p>
  767. </dd>
  768. <dt>&lsquo;<samp>ARC700</samp>&rsquo;</dt>
  769. <dd><p>Tune for ARC700 CPU with standard multiplier block.
  770. </p>
  771. </dd>
  772. <dt>&lsquo;<samp>ARC700-xmac</samp>&rsquo;</dt>
  773. <dd><p>Tune for ARC700 CPU with XMAC block.
  774. </p>
  775. </dd>
  776. <dt>&lsquo;<samp>ARC725D</samp>&rsquo;</dt>
  777. <dd><p>Tune for ARC725D CPU.
  778. </p>
  779. </dd>
  780. <dt>&lsquo;<samp>ARC750D</samp>&rsquo;</dt>
  781. <dd><p>Tune for ARC750D CPU.
  782. </p>
  783. </dd>
  784. </dl>
  785. </dd>
  786. <dt><code>-mmultcost=<var>num</var></code></dt>
  787. <dd><a name="index-mmultcost"></a>
  788. <p>Cost to assume for a multiply instruction, with &lsquo;<samp>4</samp>&rsquo; being equal to a
  789. normal instruction.
  790. </p>
  791. </dd>
  792. <dt><code>-munalign-prob-threshold=<var>probability</var></code></dt>
  793. <dd><a name="index-munalign_002dprob_002dthreshold"></a>
  794. <p>Set probability threshold for unaligning branches.
  795. When tuning for &lsquo;<samp>ARC700</samp>&rsquo; and optimizing for speed, branches without
  796. filled delay slot are preferably emitted unaligned and long, unless
  797. profiling indicates that the probability for the branch to be taken
  798. is below <var>probability</var>. See <a href="Cross_002dprofiling.html#Cross_002dprofiling">Cross-profiling</a>.
  799. The default is (REG_BR_PROB_BASE/2), i.e. 5000.
  800. </p>
  801. </dd>
  802. </dl>
  803. <p>The following options are maintained for backward compatibility, but
  804. are now deprecated and will be removed in a future release:
  805. </p>
  806. <dl compact="compact">
  807. <dt><code>-margonaut</code></dt>
  808. <dd><a name="index-margonaut"></a>
  809. <p>Obsolete FPX.
  810. </p>
  811. </dd>
  812. <dt><code>-mbig-endian</code></dt>
  813. <dd><a name="index-mbig_002dendian-1"></a>
  814. </dd>
  815. <dt><code>-EB</code></dt>
  816. <dd><a name="index-EB"></a>
  817. <p>Compile code for big-endian targets. Use of these options is now
  818. deprecated. Big-endian code is supported by configuring GCC to build
  819. <code><span class="nolinebreak">arceb-elf32</span></code><!-- /@w --> and <code><span class="nolinebreak">arceb-linux-uclibc</span></code><!-- /@w --> targets,
  820. for which big endian is the default.
  821. </p>
  822. </dd>
  823. <dt><code>-mlittle-endian</code></dt>
  824. <dd><a name="index-mlittle_002dendian-1"></a>
  825. </dd>
  826. <dt><code>-EL</code></dt>
  827. <dd><a name="index-EL"></a>
  828. <p>Compile code for little-endian targets. Use of these options is now
  829. deprecated. Little-endian code is supported by configuring GCC to build
  830. <code><span class="nolinebreak">arc-elf32</span></code><!-- /@w --> and <code><span class="nolinebreak">arc-linux-uclibc</span></code><!-- /@w --> targets,
  831. for which little endian is the default.
  832. </p>
  833. </dd>
  834. <dt><code>-mbarrel_shifter</code></dt>
  835. <dd><a name="index-mbarrel_005fshifter"></a>
  836. <p>Replaced by <samp>-mbarrel-shifter</samp>.
  837. </p>
  838. </dd>
  839. <dt><code>-mdpfp_compact</code></dt>
  840. <dd><a name="index-mdpfp_005fcompact"></a>
  841. <p>Replaced by <samp>-mdpfp-compact</samp>.
  842. </p>
  843. </dd>
  844. <dt><code>-mdpfp_fast</code></dt>
  845. <dd><a name="index-mdpfp_005ffast"></a>
  846. <p>Replaced by <samp>-mdpfp-fast</samp>.
  847. </p>
  848. </dd>
  849. <dt><code>-mdsp_packa</code></dt>
  850. <dd><a name="index-mdsp_005fpacka"></a>
  851. <p>Replaced by <samp>-mdsp-packa</samp>.
  852. </p>
  853. </dd>
  854. <dt><code>-mEA</code></dt>
  855. <dd><a name="index-mEA"></a>
  856. <p>Replaced by <samp>-mea</samp>.
  857. </p>
  858. </dd>
  859. <dt><code>-mmac_24</code></dt>
  860. <dd><a name="index-mmac_005f24"></a>
  861. <p>Replaced by <samp>-mmac-24</samp>.
  862. </p>
  863. </dd>
  864. <dt><code>-mmac_d16</code></dt>
  865. <dd><a name="index-mmac_005fd16"></a>
  866. <p>Replaced by <samp>-mmac-d16</samp>.
  867. </p>
  868. </dd>
  869. <dt><code>-mspfp_compact</code></dt>
  870. <dd><a name="index-mspfp_005fcompact"></a>
  871. <p>Replaced by <samp>-mspfp-compact</samp>.
  872. </p>
  873. </dd>
  874. <dt><code>-mspfp_fast</code></dt>
  875. <dd><a name="index-mspfp_005ffast"></a>
  876. <p>Replaced by <samp>-mspfp-fast</samp>.
  877. </p>
  878. </dd>
  879. <dt><code>-mtune=<var>cpu</var></code></dt>
  880. <dd><a name="index-mtune-2"></a>
  881. <p>Values &lsquo;<samp>arc600</samp>&rsquo;, &lsquo;<samp>arc601</samp>&rsquo;, &lsquo;<samp>arc700</samp>&rsquo; and
  882. &lsquo;<samp>arc700-xmac</samp>&rsquo; for <var>cpu</var> are replaced by &lsquo;<samp>ARC600</samp>&rsquo;,
  883. &lsquo;<samp>ARC601</samp>&rsquo;, &lsquo;<samp>ARC700</samp>&rsquo; and &lsquo;<samp>ARC700-xmac</samp>&rsquo; respectively.
  884. </p>
  885. </dd>
  886. <dt><code>-multcost=<var>num</var></code></dt>
  887. <dd><a name="index-multcost"></a>
  888. <p>Replaced by <samp>-mmultcost</samp>.
  889. </p>
  890. </dd>
  891. </dl>
  892. <hr>
  893. <div class="header">
  894. <p>
  895. Next: <a href="ARM-Options.html#ARM-Options" accesskey="n" rel="next">ARM Options</a>, Previous: <a href="Adapteva-Epiphany-Options.html#Adapteva-Epiphany-Options" accesskey="p" rel="prev">Adapteva Epiphany 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>
  896. </div>
  897. </body>
  898. </html>