You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1000 lines
35KB

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