MIPS-Options.html 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707
  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-2020 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.1, http://www.gnu.org/software/texinfo/ -->
  13. <head>
  14. <title>Using as: MIPS Options</title>
  15. <meta name="description" content="Using as: MIPS Options">
  16. <meta name="keywords" content="Using as: MIPS 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="MIPS_002dDependent.html#MIPS_002dDependent" rel="up" title="MIPS-Dependent">
  25. <link href="MIPS-Macros.html#MIPS-Macros" rel="next" title="MIPS Macros">
  26. <link href="MIPS_002dDependent.html#MIPS_002dDependent" rel="previous" title="MIPS-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="MIPS-Options"></a>
  58. <div class="header">
  59. <p>
  60. Next: <a href="MIPS-Macros.html#MIPS-Macros" accesskey="n" rel="next">MIPS Macros</a>, Up: <a href="MIPS_002dDependent.html#MIPS_002dDependent" accesskey="u" rel="up">MIPS-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="Assembler-options"></a>
  64. <h4 class="subsection">9.27.1 Assembler options</h4>
  65. <p>The MIPS configurations of <small>GNU</small> <code>as</code> support these
  66. special options:
  67. </p>
  68. <dl compact="compact">
  69. <dd><a name="index-_002dG-option-_0028MIPS_0029"></a>
  70. </dd>
  71. <dt><code>-G <var>num</var></code></dt>
  72. <dd><p>Set the &ldquo;small data&rdquo; limit to <var>n</var> bytes. The default limit is 8 bytes.
  73. See <a href="MIPS-Small-Data.html#MIPS-Small-Data">Controlling the use of small data accesses</a>.
  74. </p>
  75. <a name="index-_002dEB-option-_0028MIPS_0029"></a>
  76. <a name="index-_002dEL-option-_0028MIPS_0029"></a>
  77. <a name="index-MIPS-big_002dendian-output"></a>
  78. <a name="index-MIPS-little_002dendian-output"></a>
  79. <a name="index-big_002dendian-output_002c-MIPS"></a>
  80. <a name="index-little_002dendian-output_002c-MIPS"></a>
  81. </dd>
  82. <dt><code>-EB</code></dt>
  83. <dt><code>-EL</code></dt>
  84. <dd><p>Any MIPS configuration of <code>as</code> can select big-endian or
  85. little-endian output at run time (unlike the other <small>GNU</small> development
  86. tools, which must be configured for one or the other). Use &lsquo;<samp>-EB</samp>&rsquo;
  87. to select big-endian output, and &lsquo;<samp>-EL</samp>&rsquo; for little-endian.
  88. </p>
  89. </dd>
  90. <dt><code>-KPIC</code></dt>
  91. <dd><a name="index-PIC-selection_002c-MIPS"></a>
  92. <a name="index-_002dKPIC-option_002c-MIPS"></a>
  93. <p>Generate SVR4-style PIC. This option tells the assembler to generate
  94. SVR4-style position-independent macro expansions. It also tells the
  95. assembler to mark the output file as PIC.
  96. </p>
  97. </dd>
  98. <dt><code>-mvxworks-pic</code></dt>
  99. <dd><a name="index-_002dmvxworks_002dpic-option_002c-MIPS"></a>
  100. <p>Generate VxWorks PIC. This option tells the assembler to generate
  101. VxWorks-style position-independent macro expansions.
  102. </p>
  103. <a name="index-MIPS-architecture-options"></a>
  104. </dd>
  105. <dt><code>-mips1</code></dt>
  106. <dt><code>-mips2</code></dt>
  107. <dt><code>-mips3</code></dt>
  108. <dt><code>-mips4</code></dt>
  109. <dt><code>-mips5</code></dt>
  110. <dt><code>-mips32</code></dt>
  111. <dt><code>-mips32r2</code></dt>
  112. <dt><code>-mips32r3</code></dt>
  113. <dt><code>-mips32r5</code></dt>
  114. <dt><code>-mips32r6</code></dt>
  115. <dt><code>-mips64</code></dt>
  116. <dt><code>-mips64r2</code></dt>
  117. <dt><code>-mips64r3</code></dt>
  118. <dt><code>-mips64r5</code></dt>
  119. <dt><code>-mips64r6</code></dt>
  120. <dd><p>Generate code for a particular MIPS Instruction Set Architecture level.
  121. &lsquo;<samp>-mips1</samp>&rsquo; corresponds to the R2000 and R3000 processors,
  122. &lsquo;<samp>-mips2</samp>&rsquo; to the R6000 processor, &lsquo;<samp>-mips3</samp>&rsquo; to the
  123. R4000 processor, and &lsquo;<samp>-mips4</samp>&rsquo; to the R8000 and R10000 processors.
  124. &lsquo;<samp>-mips5</samp>&rsquo;, &lsquo;<samp>-mips32</samp>&rsquo;, &lsquo;<samp>-mips32r2</samp>&rsquo;, &lsquo;<samp>-mips32r3</samp>&rsquo;,
  125. &lsquo;<samp>-mips32r5</samp>&rsquo;, &lsquo;<samp>-mips32r6</samp>&rsquo;, &lsquo;<samp>-mips64</samp>&rsquo;, &lsquo;<samp>-mips64r2</samp>&rsquo;,
  126. &lsquo;<samp>-mips64r3</samp>&rsquo;, &lsquo;<samp>-mips64r5</samp>&rsquo;, and &lsquo;<samp>-mips64r6</samp>&rsquo; correspond to
  127. generic MIPS V, MIPS32, MIPS32 Release 2, MIPS32 Release 3, MIPS32
  128. Release 5, MIPS32 Release 6, MIPS64, and MIPS64 Release 2, MIPS64
  129. Release 3, MIPS64 Release 5, and MIPS64 Release 6 ISA processors,
  130. respectively. You can also switch instruction sets during the assembly;
  131. see <a href="MIPS-ISA.html#MIPS-ISA">Directives to override the ISA level</a>.
  132. </p>
  133. </dd>
  134. <dt><code>-mgp32</code></dt>
  135. <dt><code>-mfp32</code></dt>
  136. <dd><p>Some macros have different expansions for 32-bit and 64-bit registers.
  137. The register sizes are normally inferred from the ISA and ABI, but these
  138. flags force a certain group of registers to be treated as 32 bits wide at
  139. all times. &lsquo;<samp>-mgp32</samp>&rsquo; controls the size of general-purpose registers
  140. and &lsquo;<samp>-mfp32</samp>&rsquo; controls the size of floating-point registers.
  141. </p>
  142. <p>The <code>.set gp=32</code> and <code>.set fp=32</code> directives allow the size
  143. of registers to be changed for parts of an object. The default value is
  144. restored by <code>.set gp=default</code> and <code>.set fp=default</code>.
  145. </p>
  146. <p>On some MIPS variants there is a 32-bit mode flag; when this flag is
  147. set, 64-bit instructions generate a trap. Also, some 32-bit OSes only
  148. save the 32-bit registers on a context switch, so it is essential never
  149. to use the 64-bit registers.
  150. </p>
  151. </dd>
  152. <dt><code>-mgp64</code></dt>
  153. <dt><code>-mfp64</code></dt>
  154. <dd><p>Assume that 64-bit registers are available. This is provided in the
  155. interests of symmetry with &lsquo;<samp>-mgp32</samp>&rsquo; and &lsquo;<samp>-mfp32</samp>&rsquo;.
  156. </p>
  157. <p>The <code>.set gp=64</code> and <code>.set fp=64</code> directives allow the size
  158. of registers to be changed for parts of an object. The default value is
  159. restored by <code>.set gp=default</code> and <code>.set fp=default</code>.
  160. </p>
  161. </dd>
  162. <dt><code>-mfpxx</code></dt>
  163. <dd><p>Make no assumptions about whether 32-bit or 64-bit floating-point
  164. registers are available. This is provided to support having modules
  165. compatible with either &lsquo;<samp>-mfp32</samp>&rsquo; or &lsquo;<samp>-mfp64</samp>&rsquo;. This option can
  166. only be used with MIPS II and above.
  167. </p>
  168. <p>The <code>.set fp=xx</code> directive allows a part of an object to be marked
  169. as not making assumptions about 32-bit or 64-bit FP registers. The
  170. default value is restored by <code>.set fp=default</code>.
  171. </p>
  172. </dd>
  173. <dt><code>-modd-spreg</code></dt>
  174. <dt><code>-mno-odd-spreg</code></dt>
  175. <dd><p>Enable use of floating-point operations on odd-numbered single-precision
  176. registers when supported by the ISA. &lsquo;<samp>-mfpxx</samp>&rsquo; implies
  177. &lsquo;<samp>-mno-odd-spreg</samp>&rsquo;, otherwise the default is &lsquo;<samp>-modd-spreg</samp>&rsquo;
  178. </p>
  179. </dd>
  180. <dt><code>-mips16</code></dt>
  181. <dt><code>-no-mips16</code></dt>
  182. <dd><p>Generate code for the MIPS 16 processor. This is equivalent to putting
  183. <code>.module mips16</code> at the start of the assembly file. &lsquo;<samp>-no-mips16</samp>&rsquo;
  184. turns off this option.
  185. </p>
  186. </dd>
  187. <dt><code>-mmips16e2</code></dt>
  188. <dt><code>-mno-mips16e2</code></dt>
  189. <dd><p>Enable the use of MIPS16e2 instructions in MIPS16 mode. This is equivalent
  190. to putting <code>.module mips16e2</code> at the start of the assembly file.
  191. &lsquo;<samp>-mno-mips16e2</samp>&rsquo; turns off this option.
  192. </p>
  193. </dd>
  194. <dt><code>-mmicromips</code></dt>
  195. <dt><code>-mno-micromips</code></dt>
  196. <dd><p>Generate code for the microMIPS processor. This is equivalent to putting
  197. <code>.module micromips</code> at the start of the assembly file.
  198. &lsquo;<samp>-mno-micromips</samp>&rsquo; turns off this option. This is equivalent to putting
  199. <code>.module nomicromips</code> at the start of the assembly file.
  200. </p>
  201. </dd>
  202. <dt><code>-msmartmips</code></dt>
  203. <dt><code>-mno-smartmips</code></dt>
  204. <dd><p>Enables the SmartMIPS extensions to the MIPS32 instruction set, which
  205. provides a number of new instructions which target smartcard and
  206. cryptographic applications. This is equivalent to putting
  207. <code>.module smartmips</code> at the start of the assembly file.
  208. &lsquo;<samp>-mno-smartmips</samp>&rsquo; turns off this option.
  209. </p>
  210. </dd>
  211. <dt><code>-mips3d</code></dt>
  212. <dt><code>-no-mips3d</code></dt>
  213. <dd><p>Generate code for the MIPS-3D Application Specific Extension.
  214. This tells the assembler to accept MIPS-3D instructions.
  215. &lsquo;<samp>-no-mips3d</samp>&rsquo; turns off this option.
  216. </p>
  217. </dd>
  218. <dt><code>-mdmx</code></dt>
  219. <dt><code>-no-mdmx</code></dt>
  220. <dd><p>Generate code for the MDMX Application Specific Extension.
  221. This tells the assembler to accept MDMX instructions.
  222. &lsquo;<samp>-no-mdmx</samp>&rsquo; turns off this option.
  223. </p>
  224. </dd>
  225. <dt><code>-mdsp</code></dt>
  226. <dt><code>-mno-dsp</code></dt>
  227. <dd><p>Generate code for the DSP Release 1 Application Specific Extension.
  228. This tells the assembler to accept DSP Release 1 instructions.
  229. &lsquo;<samp>-mno-dsp</samp>&rsquo; turns off this option.
  230. </p>
  231. </dd>
  232. <dt><code>-mdspr2</code></dt>
  233. <dt><code>-mno-dspr2</code></dt>
  234. <dd><p>Generate code for the DSP Release 2 Application Specific Extension.
  235. This option implies &lsquo;<samp>-mdsp</samp>&rsquo;.
  236. This tells the assembler to accept DSP Release 2 instructions.
  237. &lsquo;<samp>-mno-dspr2</samp>&rsquo; turns off this option.
  238. </p>
  239. </dd>
  240. <dt><code>-mdspr3</code></dt>
  241. <dt><code>-mno-dspr3</code></dt>
  242. <dd><p>Generate code for the DSP Release 3 Application Specific Extension.
  243. This option implies &lsquo;<samp>-mdsp</samp>&rsquo; and &lsquo;<samp>-mdspr2</samp>&rsquo;.
  244. This tells the assembler to accept DSP Release 3 instructions.
  245. &lsquo;<samp>-mno-dspr3</samp>&rsquo; turns off this option.
  246. </p>
  247. </dd>
  248. <dt><code>-mmt</code></dt>
  249. <dt><code>-mno-mt</code></dt>
  250. <dd><p>Generate code for the MT Application Specific Extension.
  251. This tells the assembler to accept MT instructions.
  252. &lsquo;<samp>-mno-mt</samp>&rsquo; turns off this option.
  253. </p>
  254. </dd>
  255. <dt><code>-mmcu</code></dt>
  256. <dt><code>-mno-mcu</code></dt>
  257. <dd><p>Generate code for the MCU Application Specific Extension.
  258. This tells the assembler to accept MCU instructions.
  259. &lsquo;<samp>-mno-mcu</samp>&rsquo; turns off this option.
  260. </p>
  261. </dd>
  262. <dt><code>-mmsa</code></dt>
  263. <dt><code>-mno-msa</code></dt>
  264. <dd><p>Generate code for the MIPS SIMD Architecture Extension.
  265. This tells the assembler to accept MSA instructions.
  266. &lsquo;<samp>-mno-msa</samp>&rsquo; turns off this option.
  267. </p>
  268. </dd>
  269. <dt><code>-mxpa</code></dt>
  270. <dt><code>-mno-xpa</code></dt>
  271. <dd><p>Generate code for the MIPS eXtended Physical Address (XPA) Extension.
  272. This tells the assembler to accept XPA instructions.
  273. &lsquo;<samp>-mno-xpa</samp>&rsquo; turns off this option.
  274. </p>
  275. </dd>
  276. <dt><code>-mvirt</code></dt>
  277. <dt><code>-mno-virt</code></dt>
  278. <dd><p>Generate code for the Virtualization Application Specific Extension.
  279. This tells the assembler to accept Virtualization instructions.
  280. &lsquo;<samp>-mno-virt</samp>&rsquo; turns off this option.
  281. </p>
  282. </dd>
  283. <dt><code>-mcrc</code></dt>
  284. <dt><code>-mno-crc</code></dt>
  285. <dd><p>Generate code for the cyclic redundancy check (CRC) Application Specific
  286. Extension. This tells the assembler to accept CRC instructions.
  287. &lsquo;<samp>-mno-crc</samp>&rsquo; turns off this option.
  288. </p>
  289. </dd>
  290. <dt><code>-mginv</code></dt>
  291. <dt><code>-mno-ginv</code></dt>
  292. <dd><p>Generate code for the Global INValidate (GINV) Application Specific
  293. Extension. This tells the assembler to accept GINV instructions.
  294. &lsquo;<samp>-mno-ginv</samp>&rsquo; turns off this option.
  295. </p>
  296. </dd>
  297. <dt><code>-mloongson-mmi</code></dt>
  298. <dt><code>-mno-loongson-mmi</code></dt>
  299. <dd><p>Generate code for the Loongson MultiMedia extensions Instructions (MMI)
  300. Application Specific Extension. This tells the assembler to accept MMI
  301. instructions.
  302. &lsquo;<samp>-mno-loongson-mmi</samp>&rsquo; turns off this option.
  303. </p>
  304. </dd>
  305. <dt><code>-mloongson-cam</code></dt>
  306. <dt><code>-mno-loongson-cam</code></dt>
  307. <dd><p>Generate code for the Loongson Content Address Memory (CAM)
  308. Application Specific Extension. This tells the assembler to accept CAM
  309. instructions.
  310. &lsquo;<samp>-mno-loongson-cam</samp>&rsquo; turns off this option.
  311. </p>
  312. </dd>
  313. <dt><code>-mloongson-ext</code></dt>
  314. <dt><code>-mno-loongson-ext</code></dt>
  315. <dd><p>Generate code for the Loongson EXTensions (EXT) instructions
  316. Application Specific Extension. This tells the assembler to accept EXT
  317. instructions.
  318. &lsquo;<samp>-mno-loongson-ext</samp>&rsquo; turns off this option.
  319. </p>
  320. </dd>
  321. <dt><code>-mloongson-ext2</code></dt>
  322. <dt><code>-mno-loongson-ext2</code></dt>
  323. <dd><p>Generate code for the Loongson EXTensions R2 (EXT2) instructions
  324. Application Specific Extension. This tells the assembler to accept EXT2
  325. instructions.
  326. &lsquo;<samp>-mno-loongson-ext2</samp>&rsquo; turns off this option.
  327. </p>
  328. </dd>
  329. <dt><code>-minsn32</code></dt>
  330. <dt><code>-mno-insn32</code></dt>
  331. <dd><p>Only use 32-bit instruction encodings when generating code for the
  332. microMIPS processor. This option inhibits the use of any 16-bit
  333. instructions. This is equivalent to putting <code>.set insn32</code> at
  334. the start of the assembly file. &lsquo;<samp>-mno-insn32</samp>&rsquo; turns off this
  335. option. This is equivalent to putting <code>.set noinsn32</code> at the
  336. start of the assembly file. By default &lsquo;<samp>-mno-insn32</samp>&rsquo; is
  337. selected, allowing all instructions to be used.
  338. </p>
  339. </dd>
  340. <dt><code>-mfix7000</code></dt>
  341. <dt><code>-mno-fix7000</code></dt>
  342. <dd><p>Cause nops to be inserted if the read of the destination register
  343. of an mfhi or mflo instruction occurs in the following two instructions.
  344. </p>
  345. </dd>
  346. <dt><code>-mfix-rm7000</code></dt>
  347. <dt><code>-mno-fix-rm7000</code></dt>
  348. <dd><p>Cause nops to be inserted if a dmult or dmultu instruction is
  349. followed by a load instruction.
  350. </p>
  351. </dd>
  352. <dt><code>-mfix-loongson2f-jump</code></dt>
  353. <dt><code>-mno-fix-loongson2f-jump</code></dt>
  354. <dd><p>Eliminate instruction fetch from outside 256M region to work around the
  355. Loongson2F &lsquo;<samp>jump</samp>&rsquo; instructions. Without it, under extreme cases,
  356. the kernel may crash. The issue has been solved in latest processor
  357. batches, but this fix has no side effect to them.
  358. </p>
  359. </dd>
  360. <dt><code>-mfix-loongson2f-nop</code></dt>
  361. <dt><code>-mno-fix-loongson2f-nop</code></dt>
  362. <dd><p>Replace nops by <code>or at,at,zero</code> to work around the Loongson2F
  363. &lsquo;<samp>nop</samp>&rsquo; errata. Without it, under extreme cases, the CPU might
  364. deadlock. The issue has been solved in later Loongson2F batches, but
  365. this fix has no side effect to them.
  366. </p>
  367. </dd>
  368. <dt><code>-mfix-loongson3-llsc</code></dt>
  369. <dt><code>-mno-fix-loongson3-llsc</code></dt>
  370. <dd><p>Insert &lsquo;<samp>sync</samp>&rsquo; before &lsquo;<samp>ll</samp>&rsquo; and &lsquo;<samp>lld</samp>&rsquo; to work around
  371. Loongson3 LLSC errata. Without it, under extrame cases, the CPU might
  372. deadlock. The default can be controlled by the
  373. <samp>--enable-mips-fix-loongson3-llsc=[yes|no]</samp> configure option.
  374. </p>
  375. </dd>
  376. <dt><code>-mfix-vr4120</code></dt>
  377. <dt><code>-mno-fix-vr4120</code></dt>
  378. <dd><p>Insert nops to work around certain VR4120 errata. This option is
  379. intended to be used on GCC-generated code: it is not designed to catch
  380. all problems in hand-written assembler code.
  381. </p>
  382. </dd>
  383. <dt><code>-mfix-vr4130</code></dt>
  384. <dt><code>-mno-fix-vr4130</code></dt>
  385. <dd><p>Insert nops to work around the VR4130 &lsquo;<samp>mflo</samp>&rsquo;/&lsquo;<samp>mfhi</samp>&rsquo; errata.
  386. </p>
  387. </dd>
  388. <dt><code>-mfix-24k</code></dt>
  389. <dt><code>-mno-fix-24k</code></dt>
  390. <dd><p>Insert nops to work around the 24K &lsquo;<samp>eret</samp>&rsquo;/&lsquo;<samp>deret</samp>&rsquo; errata.
  391. </p>
  392. </dd>
  393. <dt><code>-mfix-cn63xxp1</code></dt>
  394. <dt><code>-mno-fix-cn63xxp1</code></dt>
  395. <dd><p>Replace <code>pref</code> hints 0 - 4 and 6 - 24 with hint 28 to work around
  396. certain CN63XXP1 errata.
  397. </p>
  398. </dd>
  399. <dt><code>-mfix-r5900</code></dt>
  400. <dt><code>-mno-fix-r5900</code></dt>
  401. <dd><p>Do not attempt to schedule the preceding instruction into the delay slot
  402. of a branch instruction placed at the end of a short loop of six
  403. instructions or fewer and always schedule a <code>nop</code> instruction there
  404. instead. The short loop bug under certain conditions causes loops to
  405. execute only once or twice, due to a hardware bug in the R5900 chip.
  406. </p>
  407. </dd>
  408. <dt><code>-m4010</code></dt>
  409. <dt><code>-no-m4010</code></dt>
  410. <dd><p>Generate code for the LSI R4010 chip. This tells the assembler to
  411. accept the R4010-specific instructions (&lsquo;<samp>addciu</samp>&rsquo;, &lsquo;<samp>ffc</samp>&rsquo;,
  412. etc.), and to not schedule &lsquo;<samp>nop</samp>&rsquo; instructions around accesses to
  413. the &lsquo;<samp>HI</samp>&rsquo; and &lsquo;<samp>LO</samp>&rsquo; registers. &lsquo;<samp>-no-m4010</samp>&rsquo; turns off this
  414. option.
  415. </p>
  416. </dd>
  417. <dt><code>-m4650</code></dt>
  418. <dt><code>-no-m4650</code></dt>
  419. <dd><p>Generate code for the MIPS R4650 chip. This tells the assembler to accept
  420. the &lsquo;<samp>mad</samp>&rsquo; and &lsquo;<samp>madu</samp>&rsquo; instruction, and to not schedule &lsquo;<samp>nop</samp>&rsquo;
  421. instructions around accesses to the &lsquo;<samp>HI</samp>&rsquo; and &lsquo;<samp>LO</samp>&rsquo; registers.
  422. &lsquo;<samp>-no-m4650</samp>&rsquo; turns off this option.
  423. </p>
  424. </dd>
  425. <dt><code>-m3900</code></dt>
  426. <dt><code>-no-m3900</code></dt>
  427. <dt><code>-m4100</code></dt>
  428. <dt><code>-no-m4100</code></dt>
  429. <dd><p>For each option &lsquo;<samp>-m<var>nnnn</var></samp>&rsquo;, generate code for the MIPS
  430. R<var>nnnn</var> chip. This tells the assembler to accept instructions
  431. specific to that chip, and to schedule for that chip&rsquo;s hazards.
  432. </p>
  433. </dd>
  434. <dt><code>-march=<var>cpu</var></code></dt>
  435. <dd><p>Generate code for a particular MIPS CPU. It is exactly equivalent to
  436. &lsquo;<samp>-m<var>cpu</var></samp>&rsquo;, except that there are more value of <var>cpu</var>
  437. understood. Valid <var>cpu</var> value are:
  438. </p>
  439. <blockquote>
  440. <p>2000,
  441. 3000,
  442. 3900,
  443. 4000,
  444. 4010,
  445. 4100,
  446. 4111,
  447. vr4120,
  448. vr4130,
  449. vr4181,
  450. 4300,
  451. 4400,
  452. 4600,
  453. 4650,
  454. 5000,
  455. rm5200,
  456. rm5230,
  457. rm5231,
  458. rm5261,
  459. rm5721,
  460. vr5400,
  461. vr5500,
  462. 6000,
  463. rm7000,
  464. 8000,
  465. rm9000,
  466. 10000,
  467. 12000,
  468. 14000,
  469. 16000,
  470. 4kc,
  471. 4km,
  472. 4kp,
  473. 4ksc,
  474. 4kec,
  475. 4kem,
  476. 4kep,
  477. 4ksd,
  478. m4k,
  479. m4kp,
  480. m14k,
  481. m14kc,
  482. m14ke,
  483. m14kec,
  484. 24kc,
  485. 24kf2_1,
  486. 24kf,
  487. 24kf1_1,
  488. 24kec,
  489. 24kef2_1,
  490. 24kef,
  491. 24kef1_1,
  492. 34kc,
  493. 34kf2_1,
  494. 34kf,
  495. 34kf1_1,
  496. 34kn,
  497. 74kc,
  498. 74kf2_1,
  499. 74kf,
  500. 74kf1_1,
  501. 74kf3_2,
  502. 1004kc,
  503. 1004kf2_1,
  504. 1004kf,
  505. 1004kf1_1,
  506. interaptiv,
  507. interaptiv-mr2,
  508. m5100,
  509. m5101,
  510. p5600,
  511. 5kc,
  512. 5kf,
  513. 20kc,
  514. 25kf,
  515. sb1,
  516. sb1a,
  517. i6400,
  518. i6500,
  519. p6600,
  520. loongson2e,
  521. loongson2f,
  522. gs464,
  523. gs464e,
  524. gs264e,
  525. octeon,
  526. octeon+,
  527. octeon2,
  528. octeon3,
  529. xlr,
  530. xlp
  531. </p></blockquote>
  532. <p>For compatibility reasons, &lsquo;<samp><var>n</var>x</samp>&rsquo; and &lsquo;<samp><var>b</var>fx</samp>&rsquo; are
  533. accepted as synonyms for &lsquo;<samp><var>n</var>f1_1</samp>&rsquo;. These values are
  534. deprecated.
  535. </p>
  536. </dd>
  537. <dt><code>-mtune=<var>cpu</var></code></dt>
  538. <dd><p>Schedule and tune for a particular MIPS CPU. Valid <var>cpu</var> values are
  539. identical to &lsquo;<samp>-march=<var>cpu</var></samp>&rsquo;.
  540. </p>
  541. </dd>
  542. <dt><code>-mabi=<var>abi</var></code></dt>
  543. <dd><p>Record which ABI the source code uses. The recognized arguments
  544. are: &lsquo;<samp>32</samp>&rsquo;, &lsquo;<samp>n32</samp>&rsquo;, &lsquo;<samp>o64</samp>&rsquo;, &lsquo;<samp>64</samp>&rsquo; and &lsquo;<samp>eabi</samp>&rsquo;.
  545. </p>
  546. </dd>
  547. <dt><code>-msym32</code></dt>
  548. <dt><code>-mno-sym32</code></dt>
  549. <dd><a name="index-_002dmsym32"></a>
  550. <a name="index-_002dmno_002dsym32"></a>
  551. <p>Equivalent to adding <code>.set sym32</code> or <code>.set nosym32</code> to
  552. the beginning of the assembler input. See <a href="MIPS-Symbol-Sizes.html#MIPS-Symbol-Sizes">MIPS Symbol Sizes</a>.
  553. </p>
  554. <a name="index-_002dnocpp-ignored-_0028MIPS_0029"></a>
  555. </dd>
  556. <dt><code>-nocpp</code></dt>
  557. <dd><p>This option is ignored. It is accepted for command-line compatibility with
  558. other assemblers, which use it to turn off C style preprocessing. With
  559. <small>GNU</small> <code>as</code>, there is no need for &lsquo;<samp>-nocpp</samp>&rsquo;, because the
  560. <small>GNU</small> assembler itself never runs the C preprocessor.
  561. </p>
  562. </dd>
  563. <dt><code>-msoft-float</code></dt>
  564. <dt><code>-mhard-float</code></dt>
  565. <dd><p>Disable or enable floating-point instructions. Note that by default
  566. floating-point instructions are always allowed even with CPU targets
  567. that don&rsquo;t have support for these instructions.
  568. </p>
  569. </dd>
  570. <dt><code>-msingle-float</code></dt>
  571. <dt><code>-mdouble-float</code></dt>
  572. <dd><p>Disable or enable double-precision floating-point operations. Note
  573. that by default double-precision floating-point operations are always
  574. allowed even with CPU targets that don&rsquo;t have support for these
  575. operations.
  576. </p>
  577. </dd>
  578. <dt><code>--construct-floats</code></dt>
  579. <dt><code>--no-construct-floats</code></dt>
  580. <dd><p>The <code>--no-construct-floats</code> option disables the construction of
  581. double width floating point constants by loading the two halves of the
  582. value into the two single width floating point registers that make up
  583. the double width register. This feature is useful if the processor
  584. support the FR bit in its status register, and this bit is known (by
  585. the programmer) to be set. This bit prevents the aliasing of the double
  586. width register by the single width registers.
  587. </p>
  588. <p>By default <code>--construct-floats</code> is selected, allowing construction
  589. of these floating point constants.
  590. </p>
  591. </dd>
  592. <dt><code>--relax-branch</code></dt>
  593. <dt><code>--no-relax-branch</code></dt>
  594. <dd><p>The &lsquo;<samp>--relax-branch</samp>&rsquo; option enables the relaxation of out-of-range
  595. branches. Any branches whose target cannot be reached directly are
  596. converted to a small instruction sequence including an inverse-condition
  597. branch to the physically next instruction, and a jump to the original
  598. target is inserted between the two instructions. In PIC code the jump
  599. will involve further instructions for address calculation.
  600. </p>
  601. <p>The <code>BC1ANY2F</code>, <code>BC1ANY2T</code>, <code>BC1ANY4F</code>, <code>BC1ANY4T</code>,
  602. <code>BPOSGE32</code> and <code>BPOSGE64</code> instructions are excluded from
  603. relaxation, because they have no complementing counterparts. They could
  604. be relaxed with the use of a longer sequence involving another branch,
  605. however this has not been implemented and if their target turns out of
  606. reach, they produce an error even if branch relaxation is enabled.
  607. </p>
  608. <p>Also no MIPS16 branches are ever relaxed.
  609. </p>
  610. <p>By default &lsquo;<samp>--no-relax-branch</samp>&rsquo; is selected, causing any out-of-range
  611. branches to produce an error.
  612. </p>
  613. </dd>
  614. <dt><code>-mignore-branch-isa</code></dt>
  615. <dt><code>-mno-ignore-branch-isa</code></dt>
  616. <dd><p>Ignore branch checks for invalid transitions between ISA modes.
  617. </p>
  618. <p>The semantics of branches does not provide for an ISA mode switch, so in
  619. most cases the ISA mode a branch has been encoded for has to be the same
  620. as the ISA mode of the branch&rsquo;s target label. If the ISA modes do not
  621. match, then such a branch, if taken, will cause the ISA mode to remain
  622. unchanged and instructions that follow will be executed in the wrong ISA
  623. mode causing the program to misbehave or crash.
  624. </p>
  625. <p>In the case of the <code>BAL</code> instruction it may be possible to relax
  626. it to an equivalent <code>JALX</code> instruction so that the ISA mode is
  627. switched at the run time as required. For other branches no relaxation
  628. is possible and therefore GAS has checks implemented that verify in
  629. branch assembly that the two ISA modes match, and report an error
  630. otherwise so that the problem with code can be diagnosed at the assembly
  631. time rather than at the run time.
  632. </p>
  633. <p>However some assembly code, including generated code produced by some
  634. versions of GCC, may incorrectly include branches to data labels, which
  635. appear to require a mode switch but are either dead or immediately
  636. followed by valid instructions encoded for the same ISA the branch has
  637. been encoded for. While not strictly correct at the source level such
  638. code will execute as intended, so to help with these cases
  639. &lsquo;<samp>-mignore-branch-isa</samp>&rsquo; is supported which disables ISA mode checks
  640. for branches.
  641. </p>
  642. <p>By default &lsquo;<samp>-mno-ignore-branch-isa</samp>&rsquo; is selected, causing any invalid
  643. branch requiring a transition between ISA modes to produce an error.
  644. </p>
  645. <a name="index-_002dmnan_003d-command_002dline-option_002c-MIPS"></a>
  646. </dd>
  647. <dt><code>-mnan=<var>encoding</var></code></dt>
  648. <dd><p>This option indicates whether the source code uses the IEEE 2008
  649. NaN encoding (<samp>-mnan=2008</samp>) or the original MIPS encoding
  650. (<samp>-mnan=legacy</samp>). It is equivalent to adding a <code>.nan</code>
  651. directive to the beginning of the source file. See <a href="MIPS-NaN-Encodings.html#MIPS-NaN-Encodings">MIPS NaN Encodings</a>.
  652. </p>
  653. <p><samp>-mnan=legacy</samp> is the default if no <samp>-mnan</samp> option or
  654. <code>.nan</code> directive is used.
  655. </p>
  656. </dd>
  657. <dt><code>--trap</code></dt>
  658. <dt><code>--no-break</code></dt>
  659. <dd><p><code>as</code> automatically macro expands certain division and
  660. multiplication instructions to check for overflow and division by zero. This
  661. option causes <code>as</code> to generate code to take a trap exception
  662. rather than a break exception when an error is detected. The trap instructions
  663. are only supported at Instruction Set Architecture level 2 and higher.
  664. </p>
  665. </dd>
  666. <dt><code>--break</code></dt>
  667. <dt><code>--no-trap</code></dt>
  668. <dd><p>Generate code to take a break exception rather than a trap exception when an
  669. error is detected. This is the default.
  670. </p>
  671. </dd>
  672. <dt><code>-mpdr</code></dt>
  673. <dt><code>-mno-pdr</code></dt>
  674. <dd><p>Control generation of <code>.pdr</code> sections. Off by default on IRIX, on
  675. elsewhere.
  676. </p>
  677. </dd>
  678. <dt><code>-mshared</code></dt>
  679. <dt><code>-mno-shared</code></dt>
  680. <dd><p>When generating code using the Unix calling conventions (selected by
  681. &lsquo;<samp>-KPIC</samp>&rsquo; or &lsquo;<samp>-mcall_shared</samp>&rsquo;), gas will normally generate code
  682. which can go into a shared library. The &lsquo;<samp>-mno-shared</samp>&rsquo; option
  683. tells gas to generate code which uses the calling convention, but can
  684. not go into a shared library. The resulting code is slightly more
  685. efficient. This option only affects the handling of the
  686. &lsquo;<samp>.cpload</samp>&rsquo; and &lsquo;<samp>.cpsetup</samp>&rsquo; pseudo-ops.
  687. </p></dd>
  688. </dl>
  689. <hr>
  690. <div class="header">
  691. <p>
  692. Next: <a href="MIPS-Macros.html#MIPS-Macros" accesskey="n" rel="next">MIPS Macros</a>, Up: <a href="MIPS_002dDependent.html#MIPS_002dDependent" accesskey="u" rel="up">MIPS-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>
  693. </div>
  694. </body>
  695. </html>