ARM-Options.html 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <html>
  3. <!-- This file documents the GNU Assembler "as".
  4. Copyright (C) 1991-2017 Free Software Foundation, Inc.
  5. Permission is granted to copy, distribute and/or modify this document
  6. under the terms of the GNU Free Documentation License, Version 1.3
  7. or any later version published by the Free Software Foundation;
  8. with no Invariant Sections, with no Front-Cover Texts, and with no
  9. Back-Cover Texts. A copy of the license is included in the
  10. section entitled "GNU Free Documentation License".
  11. -->
  12. <!-- Created by GNU Texinfo 5.2, http://www.gnu.org/software/texinfo/ -->
  13. <head>
  14. <title>Using as: ARM Options</title>
  15. <meta name="description" content="Using as: ARM Options">
  16. <meta name="keywords" content="Using as: ARM Options">
  17. <meta name="resource-type" content="document">
  18. <meta name="distribution" content="global">
  19. <meta name="Generator" content="makeinfo">
  20. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  21. <link href="index.html#Top" rel="start" title="Top">
  22. <link href="AS-Index.html#AS-Index" rel="index" title="AS Index">
  23. <link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
  24. <link href="ARM_002dDependent.html#ARM_002dDependent" rel="up" title="ARM-Dependent">
  25. <link href="ARM-Syntax.html#ARM-Syntax" rel="next" title="ARM Syntax">
  26. <link href="ARM_002dDependent.html#ARM_002dDependent" rel="prev" title="ARM-Dependent">
  27. <style type="text/css">
  28. <!--
  29. a.summary-letter {text-decoration: none}
  30. blockquote.smallquotation {font-size: smaller}
  31. div.display {margin-left: 3.2em}
  32. div.example {margin-left: 3.2em}
  33. div.indentedblock {margin-left: 3.2em}
  34. div.lisp {margin-left: 3.2em}
  35. div.smalldisplay {margin-left: 3.2em}
  36. div.smallexample {margin-left: 3.2em}
  37. div.smallindentedblock {margin-left: 3.2em; font-size: smaller}
  38. div.smalllisp {margin-left: 3.2em}
  39. kbd {font-style:oblique}
  40. pre.display {font-family: inherit}
  41. pre.format {font-family: inherit}
  42. pre.menu-comment {font-family: serif}
  43. pre.menu-preformatted {font-family: serif}
  44. pre.smalldisplay {font-family: inherit; font-size: smaller}
  45. pre.smallexample {font-size: smaller}
  46. pre.smallformat {font-family: inherit; font-size: smaller}
  47. pre.smalllisp {font-size: smaller}
  48. span.nocodebreak {white-space:nowrap}
  49. span.nolinebreak {white-space:nowrap}
  50. span.roman {font-family:serif; font-weight:normal}
  51. span.sansserif {font-family:sans-serif; font-weight:normal}
  52. ul.no-bullet {list-style: none}
  53. -->
  54. </style>
  55. </head>
  56. <body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
  57. <a name="ARM-Options"></a>
  58. <div class="header">
  59. <p>
  60. Next: <a href="ARM-Syntax.html#ARM-Syntax" accesskey="n" rel="next">ARM Syntax</a>, Up: <a href="ARM_002dDependent.html#ARM_002dDependent" accesskey="u" rel="up">ARM-Dependent</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="AS-Index.html#AS-Index" title="Index" rel="index">Index</a>]</p>
  61. </div>
  62. <hr>
  63. <a name="Options-3"></a>
  64. <h4 class="subsection">9.4.1 Options</h4>
  65. <a name="index-ARM-options-_0028none_0029"></a>
  66. <a name="index-options-for-ARM-_0028none_0029"></a>
  67. <dl compact="compact">
  68. <dd>
  69. <a name="index-_002dmcpu_003d-command-line-option_002c-ARM"></a>
  70. </dd>
  71. <dt><code>-mcpu=<var>processor</var>[+<var>extension</var>&hellip;]</code></dt>
  72. <dd><p>This option specifies the target processor. The assembler will issue an
  73. error message if an attempt is made to assemble an instruction which
  74. will not execute on the target processor. The following processor names are
  75. recognized:
  76. <code>arm1</code>,
  77. <code>arm2</code>,
  78. <code>arm250</code>,
  79. <code>arm3</code>,
  80. <code>arm6</code>,
  81. <code>arm60</code>,
  82. <code>arm600</code>,
  83. <code>arm610</code>,
  84. <code>arm620</code>,
  85. <code>arm7</code>,
  86. <code>arm7m</code>,
  87. <code>arm7d</code>,
  88. <code>arm7dm</code>,
  89. <code>arm7di</code>,
  90. <code>arm7dmi</code>,
  91. <code>arm70</code>,
  92. <code>arm700</code>,
  93. <code>arm700i</code>,
  94. <code>arm710</code>,
  95. <code>arm710t</code>,
  96. <code>arm720</code>,
  97. <code>arm720t</code>,
  98. <code>arm740t</code>,
  99. <code>arm710c</code>,
  100. <code>arm7100</code>,
  101. <code>arm7500</code>,
  102. <code>arm7500fe</code>,
  103. <code>arm7t</code>,
  104. <code>arm7tdmi</code>,
  105. <code>arm7tdmi-s</code>,
  106. <code>arm8</code>,
  107. <code>arm810</code>,
  108. <code>strongarm</code>,
  109. <code>strongarm1</code>,
  110. <code>strongarm110</code>,
  111. <code>strongarm1100</code>,
  112. <code>strongarm1110</code>,
  113. <code>arm9</code>,
  114. <code>arm920</code>,
  115. <code>arm920t</code>,
  116. <code>arm922t</code>,
  117. <code>arm940t</code>,
  118. <code>arm9tdmi</code>,
  119. <code>fa526</code> (Faraday FA526 processor),
  120. <code>fa626</code> (Faraday FA626 processor),
  121. <code>arm9e</code>,
  122. <code>arm926e</code>,
  123. <code>arm926ej-s</code>,
  124. <code>arm946e-r0</code>,
  125. <code>arm946e</code>,
  126. <code>arm946e-s</code>,
  127. <code>arm966e-r0</code>,
  128. <code>arm966e</code>,
  129. <code>arm966e-s</code>,
  130. <code>arm968e-s</code>,
  131. <code>arm10t</code>,
  132. <code>arm10tdmi</code>,
  133. <code>arm10e</code>,
  134. <code>arm1020</code>,
  135. <code>arm1020t</code>,
  136. <code>arm1020e</code>,
  137. <code>arm1022e</code>,
  138. <code>arm1026ej-s</code>,
  139. <code>fa606te</code> (Faraday FA606TE processor),
  140. <code>fa616te</code> (Faraday FA616TE processor),
  141. <code>fa626te</code> (Faraday FA626TE processor),
  142. <code>fmp626</code> (Faraday FMP626 processor),
  143. <code>fa726te</code> (Faraday FA726TE processor),
  144. <code>arm1136j-s</code>,
  145. <code>arm1136jf-s</code>,
  146. <code>arm1156t2-s</code>,
  147. <code>arm1156t2f-s</code>,
  148. <code>arm1176jz-s</code>,
  149. <code>arm1176jzf-s</code>,
  150. <code>mpcore</code>,
  151. <code>mpcorenovfp</code>,
  152. <code>cortex-a5</code>,
  153. <code>cortex-a7</code>,
  154. <code>cortex-a8</code>,
  155. <code>cortex-a9</code>,
  156. <code>cortex-a15</code>,
  157. <code>cortex-a17</code>,
  158. <code>cortex-a32</code>,
  159. <code>cortex-a35</code>,
  160. <code>cortex-a53</code>,
  161. <code>cortex-a57</code>,
  162. <code>cortex-a72</code>,
  163. <code>cortex-a73</code>,
  164. <code>cortex-r4</code>,
  165. <code>cortex-r4f</code>,
  166. <code>cortex-r5</code>,
  167. <code>cortex-r7</code>,
  168. <code>cortex-r8</code>,
  169. <code>cortex-m33</code>,
  170. <code>cortex-m23</code>,
  171. <code>cortex-m7</code>,
  172. <code>cortex-m4</code>,
  173. <code>cortex-m3</code>,
  174. <code>cortex-m1</code>,
  175. <code>cortex-m0</code>,
  176. <code>cortex-m0plus</code>,
  177. <code>exynos-m1</code>,
  178. <code>marvell-pj4</code>,
  179. <code>marvell-whitney</code>,
  180. <code>falkor</code>,
  181. <code>qdf24xx</code>,
  182. <code>xgene1</code>,
  183. <code>xgene2</code>,
  184. <code>ep9312</code> (ARM920 with Cirrus Maverick coprocessor),
  185. <code>i80200</code> (Intel XScale processor)
  186. <code>iwmmxt</code> (Intel(r) XScale processor with Wireless MMX(tm) technology coprocessor)
  187. and
  188. <code>xscale</code>.
  189. The special name <code>all</code> may be used to allow the
  190. assembler to accept instructions valid for any ARM processor.
  191. </p>
  192. <p>In addition to the basic instruction set, the assembler can be told to
  193. accept various extension mnemonics that extend the processor using the
  194. co-processor instruction space. For example, <code>-mcpu=arm920+maverick</code>
  195. is equivalent to specifying <code>-mcpu=ep9312</code>.
  196. </p>
  197. <p>Multiple extensions may be specified, separated by a <code>+</code>. The
  198. extensions should be specified in ascending alphabetical order.
  199. </p>
  200. <p>Some extensions may be restricted to particular architectures; this is
  201. documented in the list of extensions below.
  202. </p>
  203. <p>Extension mnemonics may also be removed from those the assembler accepts.
  204. This is done be prepending <code>no</code> to the option that adds the extension.
  205. Extensions that are removed should be listed after all extensions which have
  206. been added, again in ascending alphabetical order. For example,
  207. <code>-mcpu=ep9312+nomaverick</code> is equivalent to specifying <code>-mcpu=arm920</code>.
  208. </p>
  209. <p>The following extensions are currently supported:
  210. <code>crc</code>
  211. <code>crypto</code> (Cryptography Extensions for v8-A architecture, implies <code>fp+simd</code>),
  212. <code>dotprod</code> (Dot Product Extensions for v8.2-A architecture, implies <code>fp+simd</code>),
  213. <code>fp</code> (Floating Point Extensions for v8-A architecture),
  214. <code>idiv</code> (Integer Divide Extensions for v7-A and v7-R architectures),
  215. <code>iwmmxt</code>,
  216. <code>iwmmxt2</code>,
  217. <code>xscale</code>,
  218. <code>maverick</code>,
  219. <code>mp</code> (Multiprocessing Extensions for v7-A and v7-R
  220. architectures),
  221. <code>os</code> (Operating System for v6M architecture),
  222. <code>sec</code> (Security Extensions for v6K and v7-A architectures),
  223. <code>simd</code> (Advanced SIMD Extensions for v8-A architecture, implies <code>fp</code>),
  224. <code>virt</code> (Virtualization Extensions for v7-A architecture, implies
  225. <code>idiv</code>),
  226. <code>pan</code> (Priviliged Access Never Extensions for v8-A architecture),
  227. <code>ras</code> (Reliability, Availability and Serviceability extensions
  228. for v8-A architecture),
  229. <code>rdma</code> (ARMv8.1 Advanced SIMD extensions for v8-A architecture, implies
  230. <code>simd</code>)
  231. and
  232. <code>xscale</code>.
  233. </p>
  234. <a name="index-_002dmarch_003d-command-line-option_002c-ARM"></a>
  235. </dd>
  236. <dt><code>-march=<var>architecture</var>[+<var>extension</var>&hellip;]</code></dt>
  237. <dd><p>This option specifies the target architecture. The assembler will issue
  238. an error message if an attempt is made to assemble an instruction which
  239. will not execute on the target architecture. The following architecture
  240. names are recognized:
  241. <code>armv1</code>,
  242. <code>armv2</code>,
  243. <code>armv2a</code>,
  244. <code>armv2s</code>,
  245. <code>armv3</code>,
  246. <code>armv3m</code>,
  247. <code>armv4</code>,
  248. <code>armv4xm</code>,
  249. <code>armv4t</code>,
  250. <code>armv4txm</code>,
  251. <code>armv5</code>,
  252. <code>armv5t</code>,
  253. <code>armv5txm</code>,
  254. <code>armv5te</code>,
  255. <code>armv5texp</code>,
  256. <code>armv6</code>,
  257. <code>armv6j</code>,
  258. <code>armv6k</code>,
  259. <code>armv6z</code>,
  260. <code>armv6kz</code>,
  261. <code>armv6-m</code>,
  262. <code>armv6s-m</code>,
  263. <code>armv7</code>,
  264. <code>armv7-a</code>,
  265. <code>armv7ve</code>,
  266. <code>armv7-r</code>,
  267. <code>armv7-m</code>,
  268. <code>armv7e-m</code>,
  269. <code>armv8-a</code>,
  270. <code>armv8.1-a</code>,
  271. <code>armv8.2-a</code>,
  272. <code>armv8.3-a</code>,
  273. <code>iwmmxt</code>
  274. <code>iwmmxt2</code>
  275. and
  276. <code>xscale</code>.
  277. If both <code>-mcpu</code> and
  278. <code>-march</code> are specified, the assembler will use
  279. the setting for <code>-mcpu</code>.
  280. </p>
  281. <p>The architecture option can be extended with the same instruction set
  282. extension options as the <code>-mcpu</code> option.
  283. </p>
  284. <a name="index-_002dmfpu_003d-command-line-option_002c-ARM"></a>
  285. </dd>
  286. <dt><code>-mfpu=<var>floating-point-format</var></code></dt>
  287. <dd>
  288. <p>This option specifies the floating point format to assemble for. The
  289. assembler will issue an error message if an attempt is made to assemble
  290. an instruction which will not execute on the target floating point unit.
  291. The following format options are recognized:
  292. <code>softfpa</code>,
  293. <code>fpe</code>,
  294. <code>fpe2</code>,
  295. <code>fpe3</code>,
  296. <code>fpa</code>,
  297. <code>fpa10</code>,
  298. <code>fpa11</code>,
  299. <code>arm7500fe</code>,
  300. <code>softvfp</code>,
  301. <code>softvfp+vfp</code>,
  302. <code>vfp</code>,
  303. <code>vfp10</code>,
  304. <code>vfp10-r0</code>,
  305. <code>vfp9</code>,
  306. <code>vfpxd</code>,
  307. <code>vfpv2</code>,
  308. <code>vfpv3</code>,
  309. <code>vfpv3-fp16</code>,
  310. <code>vfpv3-d16</code>,
  311. <code>vfpv3-d16-fp16</code>,
  312. <code>vfpv3xd</code>,
  313. <code>vfpv3xd-d16</code>,
  314. <code>vfpv4</code>,
  315. <code>vfpv4-d16</code>,
  316. <code>fpv4-sp-d16</code>,
  317. <code>fpv5-sp-d16</code>,
  318. <code>fpv5-d16</code>,
  319. <code>fp-armv8</code>,
  320. <code>arm1020t</code>,
  321. <code>arm1020e</code>,
  322. <code>arm1136jf-s</code>,
  323. <code>maverick</code>,
  324. <code>neon</code>,
  325. <code>neon-vfpv4</code>,
  326. <code>neon-fp-armv8</code>,
  327. <code>crypto-neon-fp-armv8</code>,
  328. <code>neon-fp-armv8.1</code>
  329. and
  330. <code>crypto-neon-fp-armv8.1</code>.
  331. </p>
  332. <p>In addition to determining which instructions are assembled, this option
  333. also affects the way in which the <code>.double</code> assembler directive behaves
  334. when assembling little-endian code.
  335. </p>
  336. <p>The default is dependent on the processor selected. For Architecture 5 or
  337. later, the default is to assembler for VFP instructions; for earlier
  338. architectures the default is to assemble for FPA instructions.
  339. </p>
  340. <a name="index-_002dmthumb-command-line-option_002c-ARM"></a>
  341. </dd>
  342. <dt><code>-mthumb</code></dt>
  343. <dd><p>This option specifies that the assembler should start assembling Thumb
  344. instructions; that is, it should behave as though the file starts with a
  345. <code>.code 16</code> directive.
  346. </p>
  347. <a name="index-_002dmthumb_002dinterwork-command-line-option_002c-ARM"></a>
  348. </dd>
  349. <dt><code>-mthumb-interwork</code></dt>
  350. <dd><p>This option specifies that the output generated by the assembler should
  351. be marked as supporting interworking.
  352. </p>
  353. <a name="index-_002dmimplicit_002dit-command-line-option_002c-ARM"></a>
  354. </dd>
  355. <dt><code>-mimplicit-it=never</code></dt>
  356. <dt><code>-mimplicit-it=always</code></dt>
  357. <dt><code>-mimplicit-it=arm</code></dt>
  358. <dt><code>-mimplicit-it=thumb</code></dt>
  359. <dd><p>The <code>-mimplicit-it</code> option controls the behavior of the assembler when
  360. conditional instructions are not enclosed in IT blocks.
  361. There are four possible behaviors.
  362. If <code>never</code> is specified, such constructs cause a warning in ARM
  363. code and an error in Thumb-2 code.
  364. If <code>always</code> is specified, such constructs are accepted in both
  365. ARM and Thumb-2 code, where the IT instruction is added implicitly.
  366. If <code>arm</code> is specified, such constructs are accepted in ARM code
  367. and cause an error in Thumb-2 code.
  368. If <code>thumb</code> is specified, such constructs cause a warning in ARM
  369. code and are accepted in Thumb-2 code. If you omit this option, the
  370. behavior is equivalent to <code>-mimplicit-it=arm</code>.
  371. </p>
  372. <a name="index-_002dmapcs_002d26-command-line-option_002c-ARM"></a>
  373. <a name="index-_002dmapcs_002d32-command-line-option_002c-ARM"></a>
  374. </dd>
  375. <dt><code>-mapcs-26</code></dt>
  376. <dt><code>-mapcs-32</code></dt>
  377. <dd><p>These options specify that the output generated by the assembler should
  378. be marked as supporting the indicated version of the Arm Procedure.
  379. Calling Standard.
  380. </p>
  381. <a name="index-_002dmatpcs-command-line-option_002c-ARM"></a>
  382. </dd>
  383. <dt><code>-matpcs</code></dt>
  384. <dd><p>This option specifies that the output generated by the assembler should
  385. be marked as supporting the Arm/Thumb Procedure Calling Standard. If
  386. enabled this option will cause the assembler to create an empty
  387. debugging section in the object file called .arm.atpcs. Debuggers can
  388. use this to determine the ABI being used by.
  389. </p>
  390. <a name="index-_002dmapcs_002dfloat-command-line-option_002c-ARM"></a>
  391. </dd>
  392. <dt><code>-mapcs-float</code></dt>
  393. <dd><p>This indicates the floating point variant of the APCS should be
  394. used. In this variant floating point arguments are passed in FP
  395. registers rather than integer registers.
  396. </p>
  397. <a name="index-_002dmapcs_002dreentrant-command-line-option_002c-ARM"></a>
  398. </dd>
  399. <dt><code>-mapcs-reentrant</code></dt>
  400. <dd><p>This indicates that the reentrant variant of the APCS should be used.
  401. This variant supports position independent code.
  402. </p>
  403. <a name="index-_002dmfloat_002dabi_003d-command-line-option_002c-ARM"></a>
  404. </dd>
  405. <dt><code>-mfloat-abi=<var>abi</var></code></dt>
  406. <dd><p>This option specifies that the output generated by the assembler should be
  407. marked as using specified floating point ABI.
  408. The following values are recognized:
  409. <code>soft</code>,
  410. <code>softfp</code>
  411. and
  412. <code>hard</code>.
  413. </p>
  414. <a name="index-_002deabi_003d-command-line-option_002c-ARM"></a>
  415. </dd>
  416. <dt><code>-meabi=<var>ver</var></code></dt>
  417. <dd><p>This option specifies which EABI version the produced object files should
  418. conform to.
  419. The following values are recognized:
  420. <code>gnu</code>,
  421. <code>4</code>
  422. and
  423. <code>5</code>.
  424. </p>
  425. <a name="index-_002dEB-command-line-option_002c-ARM"></a>
  426. </dd>
  427. <dt><code>-EB</code></dt>
  428. <dd><p>This option specifies that the output generated by the assembler should
  429. be marked as being encoded for a big-endian processor.
  430. </p>
  431. <p>Note: If a program is being built for a system with big-endian data
  432. and little-endian instructions then it should be assembled with the
  433. <samp>-EB</samp> option, (all of it, code and data) and then linked with
  434. the <samp>--be8</samp> option. This will reverse the endianness of the
  435. instructions back to little-endian, but leave the data as big-endian.
  436. </p>
  437. <a name="index-_002dEL-command-line-option_002c-ARM"></a>
  438. </dd>
  439. <dt><code>-EL</code></dt>
  440. <dd><p>This option specifies that the output generated by the assembler should
  441. be marked as being encoded for a little-endian processor.
  442. </p>
  443. <a name="index-_002dk-command-line-option_002c-ARM"></a>
  444. <a name="index-PIC-code-generation-for-ARM"></a>
  445. </dd>
  446. <dt><code>-k</code></dt>
  447. <dd><p>This option specifies that the output of the assembler should be marked
  448. as position-independent code (PIC).
  449. </p>
  450. <a name="index-_002d_002dfix_002dv4bx-command-line-option_002c-ARM"></a>
  451. </dd>
  452. <dt><code>--fix-v4bx</code></dt>
  453. <dd><p>Allow <code>BX</code> instructions in ARMv4 code. This is intended for use with
  454. the linker option of the same name.
  455. </p>
  456. <a name="index-_002dmwarn_002ddeprecated-command-line-option_002c-ARM"></a>
  457. </dd>
  458. <dt><code>-mwarn-deprecated</code></dt>
  459. <dt><code>-mno-warn-deprecated</code></dt>
  460. <dd><p>Enable or disable warnings about using deprecated options or
  461. features. The default is to warn.
  462. </p>
  463. <a name="index-_002dmccs-command-line-option_002c-ARM"></a>
  464. </dd>
  465. <dt><code>-mccs</code></dt>
  466. <dd><p>Turns on CodeComposer Studio assembly syntax compatibility mode.
  467. </p>
  468. <a name="index-_002dmwarn_002dsyms-command-line-option_002c-ARM"></a>
  469. </dd>
  470. <dt><code>-mwarn-syms</code></dt>
  471. <dt><code>-mno-warn-syms</code></dt>
  472. <dd><p>Enable or disable warnings about symbols that match the names of ARM
  473. instructions. The default is to warn.
  474. </p>
  475. </dd>
  476. </dl>
  477. <hr>
  478. <div class="header">
  479. <p>
  480. Next: <a href="ARM-Syntax.html#ARM-Syntax" accesskey="n" rel="next">ARM Syntax</a>, Up: <a href="ARM_002dDependent.html#ARM_002dDependent" accesskey="u" rel="up">ARM-Dependent</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="AS-Index.html#AS-Index" title="Index" rel="index">Index</a>]</p>
  481. </div>
  482. </body>
  483. </html>