Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

MIPS-Options.html 28KB

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