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.

625 lines
32KB

  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>AArch64 Options (Using the GNU Compiler Collection (GCC))</title>
  21. <meta name="description" content="AArch64 Options (Using the GNU Compiler Collection (GCC))">
  22. <meta name="keywords" content="AArch64 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="Adapteva-Epiphany-Options.html#Adapteva-Epiphany-Options" rel="next" title="Adapteva Epiphany Options">
  31. <link href="Submodel-Options.html#Submodel-Options" rel="prev" title="Submodel 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="AArch64-Options"></a>
  62. <div class="header">
  63. <p>
  64. Next: <a href="Adapteva-Epiphany-Options.html#Adapteva-Epiphany-Options" accesskey="n" rel="next">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>
  65. </div>
  66. <hr>
  67. <a name="AArch64-Options-1"></a>
  68. <h4 class="subsection">3.19.1 AArch64 Options</h4>
  69. <a name="index-AArch64-Options"></a>
  70. <p>These options are defined for AArch64 implementations:
  71. </p>
  72. <dl compact="compact">
  73. <dt><code>-mabi=<var>name</var></code></dt>
  74. <dd><a name="index-mabi"></a>
  75. <p>Generate code for the specified data model. Permissible values
  76. are &lsquo;<samp>ilp32</samp>&rsquo; for SysV-like data model where int, long int and pointers
  77. are 32 bits, and &lsquo;<samp>lp64</samp>&rsquo; for SysV-like data model where int is 32 bits,
  78. but long int and pointers are 64 bits.
  79. </p>
  80. <p>The default depends on the specific target configuration. Note that
  81. the LP64 and ILP32 ABIs are not link-compatible; you must compile your
  82. entire program with the same ABI, and link with a compatible set of libraries.
  83. </p>
  84. </dd>
  85. <dt><code>-mbig-endian</code></dt>
  86. <dd><a name="index-mbig_002dendian"></a>
  87. <p>Generate big-endian code. This is the default when GCC is configured for an
  88. &lsquo;<samp>aarch64_be-*-*</samp>&rsquo; target.
  89. </p>
  90. </dd>
  91. <dt><code>-mgeneral-regs-only</code></dt>
  92. <dd><a name="index-mgeneral_002dregs_002donly"></a>
  93. <p>Generate code which uses only the general-purpose registers. This will prevent
  94. the compiler from using floating-point and Advanced SIMD registers but will not
  95. impose any restrictions on the assembler.
  96. </p>
  97. </dd>
  98. <dt><code>-mlittle-endian</code></dt>
  99. <dd><a name="index-mlittle_002dendian"></a>
  100. <p>Generate little-endian code. This is the default when GCC is configured for an
  101. &lsquo;<samp>aarch64-*-*</samp>&rsquo; but not an &lsquo;<samp>aarch64_be-*-*</samp>&rsquo; target.
  102. </p>
  103. </dd>
  104. <dt><code>-mcmodel=tiny</code></dt>
  105. <dd><a name="index-mcmodel_003dtiny"></a>
  106. <p>Generate code for the tiny code model. The program and its statically defined
  107. symbols must be within 1MB of each other. Programs can be statically or
  108. dynamically linked.
  109. </p>
  110. </dd>
  111. <dt><code>-mcmodel=small</code></dt>
  112. <dd><a name="index-mcmodel_003dsmall"></a>
  113. <p>Generate code for the small code model. The program and its statically defined
  114. symbols must be within 4GB of each other. Programs can be statically or
  115. dynamically linked. This is the default code model.
  116. </p>
  117. </dd>
  118. <dt><code>-mcmodel=large</code></dt>
  119. <dd><a name="index-mcmodel_003dlarge"></a>
  120. <p>Generate code for the large code model. This makes no assumptions about
  121. addresses and sizes of sections. Programs can be statically linked only. The
  122. <samp>-mcmodel=large</samp> option is incompatible with <samp>-mabi=ilp32</samp>,
  123. <samp>-fpic</samp> and <samp>-fPIC</samp>.
  124. </p>
  125. </dd>
  126. <dt><code>-mstrict-align</code></dt>
  127. <dt><code>-mno-strict-align</code></dt>
  128. <dd><a name="index-mstrict_002dalign"></a>
  129. <a name="index-mno_002dstrict_002dalign"></a>
  130. <p>Avoid or allow generating memory accesses that may not be aligned on a natural
  131. object boundary as described in the architecture specification.
  132. </p>
  133. </dd>
  134. <dt><code>-momit-leaf-frame-pointer</code></dt>
  135. <dt><code>-mno-omit-leaf-frame-pointer</code></dt>
  136. <dd><a name="index-momit_002dleaf_002dframe_002dpointer"></a>
  137. <a name="index-mno_002domit_002dleaf_002dframe_002dpointer"></a>
  138. <p>Omit or keep the frame pointer in leaf functions. The former behavior is the
  139. default.
  140. </p>
  141. </dd>
  142. <dt><code>-mstack-protector-guard=<var>guard</var></code></dt>
  143. <dt><code>-mstack-protector-guard-reg=<var>reg</var></code></dt>
  144. <dt><code>-mstack-protector-guard-offset=<var>offset</var></code></dt>
  145. <dd><a name="index-mstack_002dprotector_002dguard"></a>
  146. <a name="index-mstack_002dprotector_002dguard_002dreg"></a>
  147. <a name="index-mstack_002dprotector_002dguard_002doffset"></a>
  148. <p>Generate stack protection code using canary at <var>guard</var>. Supported
  149. locations are &lsquo;<samp>global</samp>&rsquo; for a global canary or &lsquo;<samp>sysreg</samp>&rsquo; for a
  150. canary in an appropriate system register.
  151. </p>
  152. <p>With the latter choice the options
  153. <samp>-mstack-protector-guard-reg=<var>reg</var></samp> and
  154. <samp>-mstack-protector-guard-offset=<var>offset</var></samp> furthermore specify
  155. which system register to use as base register for reading the canary,
  156. and from what offset from that base register. There is no default
  157. register or offset as this is entirely for use within the Linux
  158. kernel.
  159. </p>
  160. </dd>
  161. <dt><code>-mstack-protector-guard=<var>guard</var></code></dt>
  162. <dt><code>-mstack-protector-guard-reg=<var>reg</var></code></dt>
  163. <dt><code>-mstack-protector-guard-offset=<var>offset</var></code></dt>
  164. <dd><a name="index-mstack_002dprotector_002dguard-1"></a>
  165. <a name="index-mstack_002dprotector_002dguard_002dreg-1"></a>
  166. <a name="index-mstack_002dprotector_002dguard_002doffset-1"></a>
  167. <p>Generate stack protection code using canary at <var>guard</var>. Supported
  168. locations are &lsquo;<samp>global</samp>&rsquo; for a global canary or &lsquo;<samp>sysreg</samp>&rsquo; for a
  169. canary in an appropriate system register.
  170. </p>
  171. <p>With the latter choice the options
  172. <samp>-mstack-protector-guard-reg=<var>reg</var></samp> and
  173. <samp>-mstack-protector-guard-offset=<var>offset</var></samp> furthermore specify
  174. which system register to use as base register for reading the canary,
  175. and from what offset from that base register. There is no default
  176. register or offset as this is entirely for use within the Linux
  177. kernel.
  178. </p>
  179. </dd>
  180. <dt><code>-mtls-dialect=desc</code></dt>
  181. <dd><a name="index-mtls_002ddialect_003ddesc"></a>
  182. <p>Use TLS descriptors as the thread-local storage mechanism for dynamic accesses
  183. of TLS variables. This is the default.
  184. </p>
  185. </dd>
  186. <dt><code>-mtls-dialect=traditional</code></dt>
  187. <dd><a name="index-mtls_002ddialect_003dtraditional"></a>
  188. <p>Use traditional TLS as the thread-local storage mechanism for dynamic accesses
  189. of TLS variables.
  190. </p>
  191. </dd>
  192. <dt><code>-mtls-size=<var>size</var></code></dt>
  193. <dd><a name="index-mtls_002dsize"></a>
  194. <p>Specify bit size of immediate TLS offsets. Valid values are 12, 24, 32, 48.
  195. This option requires binutils 2.26 or newer.
  196. </p>
  197. </dd>
  198. <dt><code>-mfix-cortex-a53-835769</code></dt>
  199. <dt><code>-mno-fix-cortex-a53-835769</code></dt>
  200. <dd><a name="index-mfix_002dcortex_002da53_002d835769"></a>
  201. <a name="index-mno_002dfix_002dcortex_002da53_002d835769"></a>
  202. <p>Enable or disable the workaround for the ARM Cortex-A53 erratum number 835769.
  203. This involves inserting a NOP instruction between memory instructions and
  204. 64-bit integer multiply-accumulate instructions.
  205. </p>
  206. </dd>
  207. <dt><code>-mfix-cortex-a53-843419</code></dt>
  208. <dt><code>-mno-fix-cortex-a53-843419</code></dt>
  209. <dd><a name="index-mfix_002dcortex_002da53_002d843419"></a>
  210. <a name="index-mno_002dfix_002dcortex_002da53_002d843419"></a>
  211. <p>Enable or disable the workaround for the ARM Cortex-A53 erratum number 843419.
  212. This erratum workaround is made at link time and this will only pass the
  213. corresponding flag to the linker.
  214. </p>
  215. </dd>
  216. <dt><code>-mlow-precision-recip-sqrt</code></dt>
  217. <dt><code>-mno-low-precision-recip-sqrt</code></dt>
  218. <dd><a name="index-mlow_002dprecision_002drecip_002dsqrt"></a>
  219. <a name="index-mno_002dlow_002dprecision_002drecip_002dsqrt"></a>
  220. <p>Enable or disable the reciprocal square root approximation.
  221. This option only has an effect if <samp>-ffast-math</samp> or
  222. <samp>-funsafe-math-optimizations</samp> is used as well. Enabling this reduces
  223. precision of reciprocal square root results to about 16 bits for
  224. single precision and to 32 bits for double precision.
  225. </p>
  226. </dd>
  227. <dt><code>-mlow-precision-sqrt</code></dt>
  228. <dt><code>-mno-low-precision-sqrt</code></dt>
  229. <dd><a name="index-mlow_002dprecision_002dsqrt"></a>
  230. <a name="index-mno_002dlow_002dprecision_002dsqrt"></a>
  231. <p>Enable or disable the square root approximation.
  232. This option only has an effect if <samp>-ffast-math</samp> or
  233. <samp>-funsafe-math-optimizations</samp> is used as well. Enabling this reduces
  234. precision of square root results to about 16 bits for
  235. single precision and to 32 bits for double precision.
  236. If enabled, it implies <samp>-mlow-precision-recip-sqrt</samp>.
  237. </p>
  238. </dd>
  239. <dt><code>-mlow-precision-div</code></dt>
  240. <dt><code>-mno-low-precision-div</code></dt>
  241. <dd><a name="index-mlow_002dprecision_002ddiv"></a>
  242. <a name="index-mno_002dlow_002dprecision_002ddiv"></a>
  243. <p>Enable or disable the division approximation.
  244. This option only has an effect if <samp>-ffast-math</samp> or
  245. <samp>-funsafe-math-optimizations</samp> is used as well. Enabling this reduces
  246. precision of division results to about 16 bits for
  247. single precision and to 32 bits for double precision.
  248. </p>
  249. </dd>
  250. <dt><code>-mtrack-speculation</code></dt>
  251. <dt><code>-mno-track-speculation</code></dt>
  252. <dd><p>Enable or disable generation of additional code to track speculative
  253. execution through conditional branches. The tracking state can then
  254. be used by the compiler when expanding calls to
  255. <code>__builtin_speculation_safe_copy</code> to permit a more efficient code
  256. sequence to be generated.
  257. </p>
  258. </dd>
  259. <dt><code>-moutline-atomics</code></dt>
  260. <dt><code>-mno-outline-atomics</code></dt>
  261. <dd><p>Enable or disable calls to out-of-line helpers to implement atomic operations.
  262. These helpers will, at runtime, determine if the LSE instructions from
  263. ARMv8.1-A can be used; if not, they will use the load/store-exclusive
  264. instructions that are present in the base ARMv8.0 ISA.
  265. </p>
  266. <p>This option is only applicable when compiling for the base ARMv8.0
  267. instruction set. If using a later revision, e.g. <samp>-march=armv8.1-a</samp>
  268. or <samp>-march=armv8-a+lse</samp>, the ARMv8.1-Atomics instructions will be
  269. used directly. The same applies when using <samp>-mcpu=</samp> when the
  270. selected cpu supports the &lsquo;<samp>lse</samp>&rsquo; feature.
  271. This option is on by default.
  272. </p>
  273. </dd>
  274. <dt><code>-march=<var>name</var></code></dt>
  275. <dd><a name="index-march"></a>
  276. <p>Specify the name of the target architecture and, optionally, one or
  277. more feature modifiers. This option has the form
  278. <samp>-march=<var>arch</var><span class="roman">{</span>+<span class="roman">[</span>no<span class="roman">]</span><var>feature</var><span class="roman">}*</span></samp>.
  279. </p>
  280. <p>The table below summarizes the permissible values for <var>arch</var>
  281. and the features that they enable by default:
  282. </p>
  283. <table>
  284. <thead><tr><th width="20%"><var>arch</var> value</th><th width="20%">Architecture</th><th width="60%">Includes by default</th></tr></thead>
  285. <tr><td width="20%">&lsquo;<samp>armv8-a</samp>&rsquo;</td><td width="20%">Armv8-A</td><td width="60%">&lsquo;<samp>+fp</samp>&rsquo;, &lsquo;<samp>+simd</samp>&rsquo;</td></tr>
  286. <tr><td width="20%">&lsquo;<samp>armv8.1-a</samp>&rsquo;</td><td width="20%">Armv8.1-A</td><td width="60%">&lsquo;<samp>armv8-a</samp>&rsquo;, &lsquo;<samp>+crc</samp>&rsquo;, &lsquo;<samp>+lse</samp>&rsquo;, &lsquo;<samp>+rdma</samp>&rsquo;</td></tr>
  287. <tr><td width="20%">&lsquo;<samp>armv8.2-a</samp>&rsquo;</td><td width="20%">Armv8.2-A</td><td width="60%">&lsquo;<samp>armv8.1-a</samp>&rsquo;</td></tr>
  288. <tr><td width="20%">&lsquo;<samp>armv8.3-a</samp>&rsquo;</td><td width="20%">Armv8.3-A</td><td width="60%">&lsquo;<samp>armv8.2-a</samp>&rsquo;</td></tr>
  289. <tr><td width="20%">&lsquo;<samp>armv8.4-a</samp>&rsquo;</td><td width="20%">Armv8.4-A</td><td width="60%">&lsquo;<samp>armv8.3-a</samp>&rsquo;, &lsquo;<samp>+fp16fml</samp>&rsquo;, &lsquo;<samp>+dotprod</samp>&rsquo;</td></tr>
  290. <tr><td width="20%">&lsquo;<samp>armv8.5-a</samp>&rsquo;</td><td width="20%">Armv8.5-A</td><td width="60%">&lsquo;<samp>armv8.4-a</samp>&rsquo;, &lsquo;<samp>+sb</samp>&rsquo;, &lsquo;<samp>+ssbs</samp>&rsquo;, &lsquo;<samp>+predres</samp>&rsquo;</td></tr>
  291. <tr><td width="20%">&lsquo;<samp>armv8.6-a</samp>&rsquo;</td><td width="20%">Armv8.6-A</td><td width="60%">&lsquo;<samp>armv8.5-a</samp>&rsquo;, &lsquo;<samp>+bf16</samp>&rsquo;, &lsquo;<samp>+i8mm</samp>&rsquo;</td></tr>
  292. </table>
  293. <p>The value &lsquo;<samp>native</samp>&rsquo; is available on native AArch64 GNU/Linux and
  294. causes the compiler to pick the architecture of the host system. This
  295. option has no effect if the compiler is unable to recognize the
  296. architecture of the host system,
  297. </p>
  298. <p>The permissible values for <var>feature</var> are listed in the sub-section
  299. on <a href="#aarch64_002dfeature_002dmodifiers"><samp>-march</samp> and <samp>-mcpu</samp>
  300. Feature Modifiers</a>. Where conflicting feature modifiers are
  301. specified, the right-most feature is used.
  302. </p>
  303. <p>GCC uses <var>name</var> to determine what kind of instructions it can emit
  304. when generating assembly code. If <samp>-march</samp> is specified
  305. without either of <samp>-mtune</samp> or <samp>-mcpu</samp> also being
  306. specified, the code is tuned to perform well across a range of target
  307. processors implementing the target architecture.
  308. </p>
  309. </dd>
  310. <dt><code>-mtune=<var>name</var></code></dt>
  311. <dd><a name="index-mtune"></a>
  312. <p>Specify the name of the target processor for which GCC should tune the
  313. performance of the code. Permissible values for this option are:
  314. &lsquo;<samp>generic</samp>&rsquo;, &lsquo;<samp>cortex-a35</samp>&rsquo;, &lsquo;<samp>cortex-a53</samp>&rsquo;, &lsquo;<samp>cortex-a55</samp>&rsquo;,
  315. &lsquo;<samp>cortex-a57</samp>&rsquo;, &lsquo;<samp>cortex-a72</samp>&rsquo;, &lsquo;<samp>cortex-a73</samp>&rsquo;, &lsquo;<samp>cortex-a75</samp>&rsquo;,
  316. &lsquo;<samp>cortex-a76</samp>&rsquo;, &lsquo;<samp>cortex-a76ae</samp>&rsquo;, &lsquo;<samp>cortex-a77</samp>&rsquo;,
  317. &lsquo;<samp>cortex-a65</samp>&rsquo;, &lsquo;<samp>cortex-a65ae</samp>&rsquo;, &lsquo;<samp>cortex-a34</samp>&rsquo;,
  318. &lsquo;<samp>ares</samp>&rsquo;, &lsquo;<samp>exynos-m1</samp>&rsquo;, &lsquo;<samp>emag</samp>&rsquo;, &lsquo;<samp>falkor</samp>&rsquo;, &lsquo;<samp>neoverse-e1</samp>&rsquo;,
  319. &lsquo;<samp>neoverse-n1</samp>&rsquo;, &lsquo;<samp>neoverse-n2</samp>&rsquo;, &lsquo;<samp>neoverse-v1</samp>&rsquo;, &lsquo;<samp>qdf24xx</samp>&rsquo;,
  320. &lsquo;<samp>saphira</samp>&rsquo;, &lsquo;<samp>phecda</samp>&rsquo;, &lsquo;<samp>xgene1</samp>&rsquo;, &lsquo;<samp>vulcan</samp>&rsquo;, &lsquo;<samp>octeontx</samp>&rsquo;,
  321. &lsquo;<samp>octeontx81</samp>&rsquo;, &lsquo;<samp>octeontx83</samp>&rsquo;,
  322. &lsquo;<samp>octeontx2</samp>&rsquo;, &lsquo;<samp>octeontx2t98</samp>&rsquo;, &lsquo;<samp>octeontx2t96</samp>&rsquo;
  323. &lsquo;<samp>octeontx2t93</samp>&rsquo;, &lsquo;<samp>octeontx2f95</samp>&rsquo;, &lsquo;<samp>octeontx2f95n</samp>&rsquo;,
  324. &lsquo;<samp>octeontx2f95mm</samp>&rsquo;,
  325. &lsquo;<samp>a64fx</samp>&rsquo;,
  326. &lsquo;<samp>thunderx</samp>&rsquo;, &lsquo;<samp>thunderxt88</samp>&rsquo;,
  327. &lsquo;<samp>thunderxt88p1</samp>&rsquo;, &lsquo;<samp>thunderxt81</samp>&rsquo;, &lsquo;<samp>tsv110</samp>&rsquo;,
  328. &lsquo;<samp>thunderxt83</samp>&rsquo;, &lsquo;<samp>thunderx2t99</samp>&rsquo;, &lsquo;<samp>thunderx3t110</samp>&rsquo;, &lsquo;<samp>zeus</samp>&rsquo;,
  329. &lsquo;<samp>cortex-a57.cortex-a53</samp>&rsquo;, &lsquo;<samp>cortex-a72.cortex-a53</samp>&rsquo;,
  330. &lsquo;<samp>cortex-a73.cortex-a35</samp>&rsquo;, &lsquo;<samp>cortex-a73.cortex-a53</samp>&rsquo;,
  331. &lsquo;<samp>cortex-a75.cortex-a55</samp>&rsquo;, &lsquo;<samp>cortex-a76.cortex-a55</samp>&rsquo;
  332. &lsquo;<samp>native</samp>&rsquo;.
  333. </p>
  334. <p>The values &lsquo;<samp>cortex-a57.cortex-a53</samp>&rsquo;, &lsquo;<samp>cortex-a72.cortex-a53</samp>&rsquo;,
  335. &lsquo;<samp>cortex-a73.cortex-a35</samp>&rsquo;, &lsquo;<samp>cortex-a73.cortex-a53</samp>&rsquo;,
  336. &lsquo;<samp>cortex-a75.cortex-a55</samp>&rsquo;, &lsquo;<samp>cortex-a76.cortex-a55</samp>&rsquo; specify that GCC
  337. should tune for a big.LITTLE system.
  338. </p>
  339. <p>Additionally on native AArch64 GNU/Linux systems the value
  340. &lsquo;<samp>native</samp>&rsquo; tunes performance to the host system. This option has no effect
  341. if the compiler is unable to recognize the processor of the host system.
  342. </p>
  343. <p>Where none of <samp>-mtune=</samp>, <samp>-mcpu=</samp> or <samp>-march=</samp>
  344. are specified, the code is tuned to perform well across a range
  345. of target processors.
  346. </p>
  347. <p>This option cannot be suffixed by feature modifiers.
  348. </p>
  349. </dd>
  350. <dt><code>-mcpu=<var>name</var></code></dt>
  351. <dd><a name="index-mcpu"></a>
  352. <p>Specify the name of the target processor, optionally suffixed by one
  353. or more feature modifiers. This option has the form
  354. <samp>-mcpu=<var>cpu</var><span class="roman">{</span>+<span class="roman">[</span>no<span class="roman">]</span><var>feature</var><span class="roman">}*</span></samp>, where
  355. the permissible values for <var>cpu</var> are the same as those available
  356. for <samp>-mtune</samp>. The permissible values for <var>feature</var> are
  357. documented in the sub-section on
  358. <a href="#aarch64_002dfeature_002dmodifiers"><samp>-march</samp> and <samp>-mcpu</samp>
  359. Feature Modifiers</a>. Where conflicting feature modifiers are
  360. specified, the right-most feature is used.
  361. </p>
  362. <p>GCC uses <var>name</var> to determine what kind of instructions it can emit when
  363. generating assembly code (as if by <samp>-march</samp>) and to determine
  364. the target processor for which to tune for performance (as if
  365. by <samp>-mtune</samp>). Where this option is used in conjunction
  366. with <samp>-march</samp> or <samp>-mtune</samp>, those options take precedence
  367. over the appropriate part of this option.
  368. </p>
  369. </dd>
  370. <dt><code>-moverride=<var>string</var></code></dt>
  371. <dd><a name="index-moverride"></a>
  372. <p>Override tuning decisions made by the back-end in response to a
  373. <samp>-mtune=</samp> switch. The syntax, semantics, and accepted values
  374. for <var>string</var> in this option are not guaranteed to be consistent
  375. across releases.
  376. </p>
  377. <p>This option is only intended to be useful when developing GCC.
  378. </p>
  379. </dd>
  380. <dt><code>-mverbose-cost-dump</code></dt>
  381. <dd><a name="index-mverbose_002dcost_002ddump"></a>
  382. <p>Enable verbose cost model dumping in the debug dump files. This option is
  383. provided for use in debugging the compiler.
  384. </p>
  385. </dd>
  386. <dt><code>-mpc-relative-literal-loads</code></dt>
  387. <dt><code>-mno-pc-relative-literal-loads</code></dt>
  388. <dd><a name="index-mpc_002drelative_002dliteral_002dloads"></a>
  389. <a name="index-mno_002dpc_002drelative_002dliteral_002dloads"></a>
  390. <p>Enable or disable PC-relative literal loads. With this option literal pools are
  391. accessed using a single instruction and emitted after each function. This
  392. limits the maximum size of functions to 1MB. This is enabled by default for
  393. <samp>-mcmodel=tiny</samp>.
  394. </p>
  395. </dd>
  396. <dt><code>-msign-return-address=<var>scope</var></code></dt>
  397. <dd><a name="index-msign_002dreturn_002daddress"></a>
  398. <p>Select the function scope on which return address signing will be applied.
  399. Permissible values are &lsquo;<samp>none</samp>&rsquo;, which disables return address signing,
  400. &lsquo;<samp>non-leaf</samp>&rsquo;, which enables pointer signing for functions which are not leaf
  401. functions, and &lsquo;<samp>all</samp>&rsquo;, which enables pointer signing for all functions. The
  402. default value is &lsquo;<samp>none</samp>&rsquo;. This option has been deprecated by
  403. -mbranch-protection.
  404. </p>
  405. </dd>
  406. <dt><code>-mbranch-protection=<var>none</var>|<var>standard</var>|<var>pac-ret</var>[+<var>leaf</var>+<var>b-key</var>]|<var>bti</var></code></dt>
  407. <dd><a name="index-mbranch_002dprotection"></a>
  408. <p>Select the branch protection features to use.
  409. &lsquo;<samp>none</samp>&rsquo; is the default and turns off all types of branch protection.
  410. &lsquo;<samp>standard</samp>&rsquo; turns on all types of branch protection features. If a feature
  411. has additional tuning options, then &lsquo;<samp>standard</samp>&rsquo; sets it to its standard
  412. level.
  413. &lsquo;<samp>pac-ret[+<var>leaf</var>]</samp>&rsquo; turns on return address signing to its standard
  414. level: signing functions that save the return address to memory (non-leaf
  415. functions will practically always do this) using the a-key. The optional
  416. argument &lsquo;<samp>leaf</samp>&rsquo; can be used to extend the signing to include leaf
  417. functions. The optional argument &lsquo;<samp>b-key</samp>&rsquo; can be used to sign the functions
  418. with the B-key instead of the A-key.
  419. &lsquo;<samp>bti</samp>&rsquo; turns on branch target identification mechanism.
  420. </p>
  421. </dd>
  422. <dt><code>-mharden-sls=<var>opts</var></code></dt>
  423. <dd><a name="index-mharden_002dsls"></a>
  424. <p>Enable compiler hardening against straight line speculation (SLS).
  425. <var>opts</var> is a comma-separated list of the following options:
  426. </p><dl compact="compact">
  427. <dt>&lsquo;<samp>retbr</samp>&rsquo;</dt>
  428. <dt>&lsquo;<samp>blr</samp>&rsquo;</dt>
  429. </dl>
  430. <p>In addition, &lsquo;<samp>-mharden-sls=all</samp>&rsquo; enables all SLS hardening while
  431. &lsquo;<samp>-mharden-sls=none</samp>&rsquo; disables all SLS hardening.
  432. </p>
  433. </dd>
  434. <dt><code>-msve-vector-bits=<var>bits</var></code></dt>
  435. <dd><a name="index-msve_002dvector_002dbits"></a>
  436. <p>Specify the number of bits in an SVE vector register. This option only has
  437. an effect when SVE is enabled.
  438. </p>
  439. <p>GCC supports two forms of SVE code generation: &ldquo;vector-length
  440. agnostic&rdquo; output that works with any size of vector register and
  441. &ldquo;vector-length specific&rdquo; output that allows GCC to make assumptions
  442. about the vector length when it is useful for optimization reasons.
  443. The possible values of &lsquo;<samp>bits</samp>&rsquo; are: &lsquo;<samp>scalable</samp>&rsquo;, &lsquo;<samp>128</samp>&rsquo;,
  444. &lsquo;<samp>256</samp>&rsquo;, &lsquo;<samp>512</samp>&rsquo;, &lsquo;<samp>1024</samp>&rsquo; and &lsquo;<samp>2048</samp>&rsquo;.
  445. Specifying &lsquo;<samp>scalable</samp>&rsquo; selects vector-length agnostic
  446. output. At present &lsquo;<samp>-msve-vector-bits=128</samp>&rsquo; also generates vector-length
  447. agnostic output for big-endian targets. All other values generate
  448. vector-length specific code. The behavior of these values may change
  449. in future releases and no value except &lsquo;<samp>scalable</samp>&rsquo; should be
  450. relied on for producing code that is portable across different
  451. hardware SVE vector lengths.
  452. </p>
  453. <p>The default is &lsquo;<samp>-msve-vector-bits=scalable</samp>&rsquo;, which produces
  454. vector-length agnostic code.
  455. </p></dd>
  456. </dl>
  457. <a name="g_t_002dmarch-and-_002dmcpu-Feature-Modifiers"></a>
  458. <h4 class="subsubsection">3.19.1.1 <samp>-march</samp> and <samp>-mcpu</samp> Feature Modifiers</h4>
  459. <a name="aarch64_002dfeature_002dmodifiers"></a><a name="index-_002dmarch-feature-modifiers"></a>
  460. <a name="index-_002dmcpu-feature-modifiers"></a>
  461. <p>Feature modifiers used with <samp>-march</samp> and <samp>-mcpu</samp> can be any of
  462. the following and their inverses <samp>no<var>feature</var></samp>:
  463. </p>
  464. <dl compact="compact">
  465. <dt>&lsquo;<samp>crc</samp>&rsquo;</dt>
  466. <dd><p>Enable CRC extension. This is on by default for
  467. <samp>-march=armv8.1-a</samp>.
  468. </p></dd>
  469. <dt>&lsquo;<samp>crypto</samp>&rsquo;</dt>
  470. <dd><p>Enable Crypto extension. This also enables Advanced SIMD and floating-point
  471. instructions.
  472. </p></dd>
  473. <dt>&lsquo;<samp>fp</samp>&rsquo;</dt>
  474. <dd><p>Enable floating-point instructions. This is on by default for all possible
  475. values for options <samp>-march</samp> and <samp>-mcpu</samp>.
  476. </p></dd>
  477. <dt>&lsquo;<samp>simd</samp>&rsquo;</dt>
  478. <dd><p>Enable Advanced SIMD instructions. This also enables floating-point
  479. instructions. This is on by default for all possible values for options
  480. <samp>-march</samp> and <samp>-mcpu</samp>.
  481. </p></dd>
  482. <dt>&lsquo;<samp>sve</samp>&rsquo;</dt>
  483. <dd><p>Enable Scalable Vector Extension instructions. This also enables Advanced
  484. SIMD and floating-point instructions.
  485. </p></dd>
  486. <dt>&lsquo;<samp>lse</samp>&rsquo;</dt>
  487. <dd><p>Enable Large System Extension instructions. This is on by default for
  488. <samp>-march=armv8.1-a</samp>.
  489. </p></dd>
  490. <dt>&lsquo;<samp>rdma</samp>&rsquo;</dt>
  491. <dd><p>Enable Round Double Multiply Accumulate instructions. This is on by default
  492. for <samp>-march=armv8.1-a</samp>.
  493. </p></dd>
  494. <dt>&lsquo;<samp>fp16</samp>&rsquo;</dt>
  495. <dd><p>Enable FP16 extension. This also enables floating-point instructions.
  496. </p></dd>
  497. <dt>&lsquo;<samp>fp16fml</samp>&rsquo;</dt>
  498. <dd><p>Enable FP16 fmla extension. This also enables FP16 extensions and
  499. floating-point instructions. This option is enabled by default for <samp>-march=armv8.4-a</samp>. Use of this option with architectures prior to Armv8.2-A is not supported.
  500. </p>
  501. </dd>
  502. <dt>&lsquo;<samp>rcpc</samp>&rsquo;</dt>
  503. <dd><p>Enable the RcPc extension. This does not change code generation from GCC,
  504. but is passed on to the assembler, enabling inline asm statements to use
  505. instructions from the RcPc extension.
  506. </p></dd>
  507. <dt>&lsquo;<samp>dotprod</samp>&rsquo;</dt>
  508. <dd><p>Enable the Dot Product extension. This also enables Advanced SIMD instructions.
  509. </p></dd>
  510. <dt>&lsquo;<samp>aes</samp>&rsquo;</dt>
  511. <dd><p>Enable the Armv8-a aes and pmull crypto extension. This also enables Advanced
  512. SIMD instructions.
  513. </p></dd>
  514. <dt>&lsquo;<samp>sha2</samp>&rsquo;</dt>
  515. <dd><p>Enable the Armv8-a sha2 crypto extension. This also enables Advanced SIMD instructions.
  516. </p></dd>
  517. <dt>&lsquo;<samp>sha3</samp>&rsquo;</dt>
  518. <dd><p>Enable the sha512 and sha3 crypto extension. This also enables Advanced SIMD
  519. instructions. Use of this option with architectures prior to Armv8.2-A is not supported.
  520. </p></dd>
  521. <dt>&lsquo;<samp>sm4</samp>&rsquo;</dt>
  522. <dd><p>Enable the sm3 and sm4 crypto extension. This also enables Advanced SIMD instructions.
  523. Use of this option with architectures prior to Armv8.2-A is not supported.
  524. </p></dd>
  525. <dt>&lsquo;<samp>profile</samp>&rsquo;</dt>
  526. <dd><p>Enable the Statistical Profiling extension. This option is only to enable the
  527. extension at the assembler level and does not affect code generation.
  528. </p></dd>
  529. <dt>&lsquo;<samp>rng</samp>&rsquo;</dt>
  530. <dd><p>Enable the Armv8.5-a Random Number instructions. This option is only to
  531. enable the extension at the assembler level and does not affect code
  532. generation.
  533. </p></dd>
  534. <dt>&lsquo;<samp>memtag</samp>&rsquo;</dt>
  535. <dd><p>Enable the Armv8.5-a Memory Tagging Extensions.
  536. Use of this option with architectures prior to Armv8.5-A is not supported.
  537. </p></dd>
  538. <dt>&lsquo;<samp>sb</samp>&rsquo;</dt>
  539. <dd><p>Enable the Armv8-a Speculation Barrier instruction. This option is only to
  540. enable the extension at the assembler level and does not affect code
  541. generation. This option is enabled by default for <samp>-march=armv8.5-a</samp>.
  542. </p></dd>
  543. <dt>&lsquo;<samp>ssbs</samp>&rsquo;</dt>
  544. <dd><p>Enable the Armv8-a Speculative Store Bypass Safe instruction. This option
  545. is only to enable the extension at the assembler level and does not affect code
  546. generation. This option is enabled by default for <samp>-march=armv8.5-a</samp>.
  547. </p></dd>
  548. <dt>&lsquo;<samp>predres</samp>&rsquo;</dt>
  549. <dd><p>Enable the Armv8-a Execution and Data Prediction Restriction instructions.
  550. This option is only to enable the extension at the assembler level and does
  551. not affect code generation. This option is enabled by default for
  552. <samp>-march=armv8.5-a</samp>.
  553. </p></dd>
  554. <dt>&lsquo;<samp>sve2</samp>&rsquo;</dt>
  555. <dd><p>Enable the Armv8-a Scalable Vector Extension 2. This also enables SVE
  556. instructions.
  557. </p></dd>
  558. <dt>&lsquo;<samp>sve2-bitperm</samp>&rsquo;</dt>
  559. <dd><p>Enable SVE2 bitperm instructions. This also enables SVE2 instructions.
  560. </p></dd>
  561. <dt>&lsquo;<samp>sve2-sm4</samp>&rsquo;</dt>
  562. <dd><p>Enable SVE2 sm4 instructions. This also enables SVE2 instructions.
  563. </p></dd>
  564. <dt>&lsquo;<samp>sve2-aes</samp>&rsquo;</dt>
  565. <dd><p>Enable SVE2 aes instructions. This also enables SVE2 instructions.
  566. </p></dd>
  567. <dt>&lsquo;<samp>sve2-sha3</samp>&rsquo;</dt>
  568. <dd><p>Enable SVE2 sha3 instructions. This also enables SVE2 instructions.
  569. </p></dd>
  570. <dt>&lsquo;<samp>tme</samp>&rsquo;</dt>
  571. <dd><p>Enable the Transactional Memory Extension.
  572. </p></dd>
  573. <dt>&lsquo;<samp>i8mm</samp>&rsquo;</dt>
  574. <dd><p>Enable 8-bit Integer Matrix Multiply instructions. This also enables
  575. Advanced SIMD and floating-point instructions. This option is enabled by
  576. default for <samp>-march=armv8.6-a</samp>. Use of this option with architectures
  577. prior to Armv8.2-A is not supported.
  578. </p></dd>
  579. <dt>&lsquo;<samp>f32mm</samp>&rsquo;</dt>
  580. <dd><p>Enable 32-bit Floating point Matrix Multiply instructions. This also enables
  581. SVE instructions. Use of this option with architectures prior to Armv8.2-A is
  582. not supported.
  583. </p></dd>
  584. <dt>&lsquo;<samp>f64mm</samp>&rsquo;</dt>
  585. <dd><p>Enable 64-bit Floating point Matrix Multiply instructions. This also enables
  586. SVE instructions. Use of this option with architectures prior to Armv8.2-A is
  587. not supported.
  588. </p></dd>
  589. <dt>&lsquo;<samp>bf16</samp>&rsquo;</dt>
  590. <dd><p>Enable brain half-precision floating-point instructions. This also enables
  591. Advanced SIMD and floating-point instructions. This option is enabled by
  592. default for <samp>-march=armv8.6-a</samp>. Use of this option with architectures
  593. prior to Armv8.2-A is not supported.
  594. </p>
  595. </dd>
  596. </dl>
  597. <p>Feature <samp>crypto</samp> implies <samp>aes</samp>, <samp>sha2</samp>, and <samp>simd</samp>,
  598. which implies <samp>fp</samp>.
  599. Conversely, <samp>nofp</samp> implies <samp>nosimd</samp>, which implies
  600. <samp>nocrypto</samp>, <samp>noaes</samp> and <samp>nosha2</samp>.
  601. </p>
  602. <hr>
  603. <div class="header">
  604. <p>
  605. Next: <a href="Adapteva-Epiphany-Options.html#Adapteva-Epiphany-Options" accesskey="n" rel="next">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>
  606. </div>
  607. </body>
  608. </html>