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

M68K_002dOpts.html 15KB

3 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327
  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>M68K-Opts (Using as)</title>
  16. <meta name="description" content="M68K-Opts (Using as)">
  17. <meta name="keywords" content="M68K-Opts (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="M68K_002dDependent.html#M68K_002dDependent" rel="up" title="M68K-Dependent">
  25. <link href="M68K_002dSyntax.html#M68K_002dSyntax" rel="next" title="M68K-Syntax">
  26. <link href="M68K_002dDependent.html#M68K_002dDependent" rel="prev" title="M68K-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="M68K_002dOpts"></a>
  57. <div class="header">
  58. <p>
  59. Next: <a href="M68K_002dSyntax.html#M68K_002dSyntax" accesskey="n" rel="next">M68K-Syntax</a>, Up: <a href="M68K_002dDependent.html#M68K_002dDependent" accesskey="u" rel="up">M68K-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="M680x0-Options"></a>
  63. <h4 class="subsection">9.22.1 M680x0 Options</h4>
  64. <a name="index-options_002c-M680x0"></a>
  65. <a name="index-M680x0-options"></a>
  66. <p>The Motorola 680x0 version of <code>as</code> has a few machine
  67. dependent options:
  68. </p>
  69. <dl compact="compact">
  70. <dd>
  71. <a name="index-_002dmarch_003d-command_002dline-option_002c-M680x0"></a>
  72. </dd>
  73. <dt>&lsquo;<samp>-march=<var>architecture</var></samp>&rsquo;</dt>
  74. <dd><p>This option specifies a target architecture. The following
  75. architectures are recognized:
  76. <code>68000</code>,
  77. <code>68010</code>,
  78. <code>68020</code>,
  79. <code>68030</code>,
  80. <code>68040</code>,
  81. <code>68060</code>,
  82. <code>cpu32</code>,
  83. <code>isaa</code>,
  84. <code>isaaplus</code>,
  85. <code>isab</code>,
  86. <code>isac</code> and
  87. <code>cfv4e</code>.
  88. </p>
  89. <a name="index-_002dmcpu_003d-command_002dline-option_002c-M680x0"></a>
  90. </dd>
  91. <dt>&lsquo;<samp>-mcpu=<var>cpu</var></samp>&rsquo;</dt>
  92. <dd><p>This option specifies a target cpu. When used in conjunction with the
  93. <samp>-march</samp> option, the cpu must be within the specified
  94. architecture. Also, the generic features of the architecture are used
  95. for instruction generation, rather than those of the specific chip.
  96. </p>
  97. <a name="index-_002dm_005bno_002d_005d68851-command_002dline-option_002c-M680x0"></a>
  98. <a name="index-_002dm_005bno_002d_005d68881-command_002dline-option_002c-M680x0"></a>
  99. <a name="index-_002dm_005bno_002d_005ddiv-command_002dline-option_002c-M680x0"></a>
  100. <a name="index-_002dm_005bno_002d_005dusp-command_002dline-option_002c-M680x0"></a>
  101. <a name="index-_002dm_005bno_002d_005dfloat-command_002dline-option_002c-M680x0"></a>
  102. <a name="index-_002dm_005bno_002d_005dmac-command_002dline-option_002c-M680x0"></a>
  103. <a name="index-_002dm_005bno_002d_005demac-command_002dline-option_002c-M680x0"></a>
  104. </dd>
  105. <dt>&lsquo;<samp>-m[no-]68851</samp>&rsquo;</dt>
  106. <dt>&lsquo;<samp>-m[no-]68881</samp>&rsquo;</dt>
  107. <dt>&lsquo;<samp>-m[no-]div</samp>&rsquo;</dt>
  108. <dt>&lsquo;<samp>-m[no-]usp</samp>&rsquo;</dt>
  109. <dt>&lsquo;<samp>-m[no-]float</samp>&rsquo;</dt>
  110. <dt>&lsquo;<samp>-m[no-]mac</samp>&rsquo;</dt>
  111. <dt>&lsquo;<samp>-m[no-]emac</samp>&rsquo;</dt>
  112. <dd>
  113. <p>Enable or disable various architecture specific features. If a chip
  114. or architecture by default supports an option (for instance
  115. <samp>-march=isaaplus</samp> includes the <samp>-mdiv</samp> option),
  116. explicitly disabling the option will override the default.
  117. </p>
  118. <a name="index-_002dl-option_002c-M680x0"></a>
  119. </dd>
  120. <dt>&lsquo;<samp>-l</samp>&rsquo;</dt>
  121. <dd><p>You can use the &lsquo;<samp>-l</samp>&rsquo; option to shorten the size of references to undefined
  122. symbols. If you do not use the &lsquo;<samp>-l</samp>&rsquo; option, references to undefined
  123. symbols are wide enough for a full <code>long</code> (32 bits). (Since
  124. <code>as</code> cannot know where these symbols end up, <code>as</code> can
  125. only allocate space for the linker to fill in later. Since <code>as</code>
  126. does not know how far away these symbols are, it allocates as much space as it
  127. can.) If you use this option, the references are only one word wide (16 bits).
  128. This may be useful if you want the object file to be as small as possible, and
  129. you know that the relevant symbols are always less than 17 bits away.
  130. </p>
  131. <a name="index-_002d_002dregister_002dprefix_002doptional-option_002c-M680x0"></a>
  132. </dd>
  133. <dt>&lsquo;<samp>--register-prefix-optional</samp>&rsquo;</dt>
  134. <dd><p>For some configurations, especially those where the compiler normally
  135. does not prepend an underscore to the names of user variables, the
  136. assembler requires a &lsquo;<samp>%</samp>&rsquo; before any use of a register name. This
  137. is intended to let the assembler distinguish between C variables and
  138. functions named &lsquo;<samp>a0</samp>&rsquo; through &lsquo;<samp>a7</samp>&rsquo;, and so on. The &lsquo;<samp>%</samp>&rsquo; is
  139. always accepted, but is not required for certain configurations, notably
  140. &lsquo;<samp>sun3</samp>&rsquo;. The &lsquo;<samp>--register-prefix-optional</samp>&rsquo; option may be used
  141. to permit omitting the &lsquo;<samp>%</samp>&rsquo; even for configurations for which it is
  142. normally required. If this is done, it will generally be impossible to
  143. refer to C variables and functions with the same names as register
  144. names.
  145. </p>
  146. <a name="index-_002d_002dbitwise_002dor-option_002c-M680x0"></a>
  147. </dd>
  148. <dt>&lsquo;<samp>--bitwise-or</samp>&rsquo;</dt>
  149. <dd><p>Normally the character &lsquo;<samp>|</samp>&rsquo; is treated as a comment character, which
  150. means that it can not be used in expressions. The &lsquo;<samp>--bitwise-or</samp>&rsquo;
  151. option turns &lsquo;<samp>|</samp>&rsquo; into a normal character. In this mode, you must
  152. either use C style comments, or start comments with a &lsquo;<samp>#</samp>&rsquo; character
  153. at the beginning of a line.
  154. </p>
  155. <a name="index-_002d_002dbase_002dsize_002ddefault_002d16"></a>
  156. <a name="index-_002d_002dbase_002dsize_002ddefault_002d32"></a>
  157. </dd>
  158. <dt>&lsquo;<samp>--base-size-default-16 --base-size-default-32</samp>&rsquo;</dt>
  159. <dd><p>If you use an addressing mode with a base register without specifying
  160. the size, <code>as</code> will normally use the full 32 bit value.
  161. For example, the addressing mode &lsquo;<samp>%a0@(%d0)</samp>&rsquo; is equivalent to
  162. &lsquo;<samp>%a0@(%d0:l)</samp>&rsquo;. You may use the &lsquo;<samp>--base-size-default-16</samp>&rsquo;
  163. option to tell <code>as</code> to default to using the 16 bit value.
  164. In this case, &lsquo;<samp>%a0@(%d0)</samp>&rsquo; is equivalent to &lsquo;<samp>%a0@(%d0:w)</samp>&rsquo;.
  165. You may use the &lsquo;<samp>--base-size-default-32</samp>&rsquo; option to restore the
  166. default behaviour.
  167. </p>
  168. <a name="index-_002d_002ddisp_002dsize_002ddefault_002d16"></a>
  169. <a name="index-_002d_002ddisp_002dsize_002ddefault_002d32"></a>
  170. </dd>
  171. <dt>&lsquo;<samp>--disp-size-default-16 --disp-size-default-32</samp>&rsquo;</dt>
  172. <dd><p>If you use an addressing mode with a displacement, and the value of the
  173. displacement is not known, <code>as</code> will normally assume that
  174. the value is 32 bits. For example, if the symbol &lsquo;<samp>disp</samp>&rsquo; has not
  175. been defined, <code>as</code> will assemble the addressing mode
  176. &lsquo;<samp>%a0@(disp,%d0)</samp>&rsquo; as though &lsquo;<samp>disp</samp>&rsquo; is a 32 bit value. You may
  177. use the &lsquo;<samp>--disp-size-default-16</samp>&rsquo; option to tell <code>as</code>
  178. to instead assume that the displacement is 16 bits. In this case,
  179. <code>as</code> will assemble &lsquo;<samp>%a0@(disp,%d0)</samp>&rsquo; as though
  180. &lsquo;<samp>disp</samp>&rsquo; is a 16 bit value. You may use the
  181. &lsquo;<samp>--disp-size-default-32</samp>&rsquo; option to restore the default behaviour.
  182. </p>
  183. <a name="index-_002d_002dpcrel"></a>
  184. </dd>
  185. <dt>&lsquo;<samp>--pcrel</samp>&rsquo;</dt>
  186. <dd><p>Always keep branches PC-relative. In the M680x0 architecture all branches
  187. are defined as PC-relative. However, on some processors they are limited
  188. to word displacements maximum. When <code>as</code> needs a long branch
  189. that is not available, it normally emits an absolute jump instead. This
  190. option disables this substitution. When this option is given and no long
  191. branches are available, only word branches will be emitted. An error
  192. message will be generated if a word branch cannot reach its target. This
  193. option has no effect on 68020 and other processors that have long branches.
  194. see <a href="M68K_002dBranch.html#M68K_002dBranch">Branch Improvement</a>.
  195. </p>
  196. <a name="index-_002dm68000-and-related-options"></a>
  197. <a name="index-architecture-options_002c-M680x0"></a>
  198. <a name="index-M680x0-architecture-options"></a>
  199. </dd>
  200. <dt>&lsquo;<samp>-m68000</samp>&rsquo;</dt>
  201. <dd><p><code>as</code> can assemble code for several different members of the
  202. Motorola 680x0 family. The default depends upon how <code>as</code>
  203. was configured when it was built; normally, the default is to assemble
  204. code for the 68020 microprocessor. The following options may be used to
  205. change the default. These options control which instructions and
  206. addressing modes are permitted. The members of the 680x0 family are
  207. very similar. For detailed information about the differences, see the
  208. Motorola manuals.
  209. </p>
  210. <dl compact="compact">
  211. <dt>&lsquo;<samp>-m68000</samp>&rsquo;</dt>
  212. <dt>&lsquo;<samp>-m68ec000</samp>&rsquo;</dt>
  213. <dt>&lsquo;<samp>-m68hc000</samp>&rsquo;</dt>
  214. <dt>&lsquo;<samp>-m68hc001</samp>&rsquo;</dt>
  215. <dt>&lsquo;<samp>-m68008</samp>&rsquo;</dt>
  216. <dt>&lsquo;<samp>-m68302</samp>&rsquo;</dt>
  217. <dt>&lsquo;<samp>-m68306</samp>&rsquo;</dt>
  218. <dt>&lsquo;<samp>-m68307</samp>&rsquo;</dt>
  219. <dt>&lsquo;<samp>-m68322</samp>&rsquo;</dt>
  220. <dt>&lsquo;<samp>-m68356</samp>&rsquo;</dt>
  221. <dd><p>Assemble for the 68000. &lsquo;<samp>-m68008</samp>&rsquo;, &lsquo;<samp>-m68302</samp>&rsquo;, and so on are synonyms
  222. for &lsquo;<samp>-m68000</samp>&rsquo;, since the chips are the same from the point of view
  223. of the assembler.
  224. </p>
  225. </dd>
  226. <dt>&lsquo;<samp>-m68010</samp>&rsquo;</dt>
  227. <dd><p>Assemble for the 68010.
  228. </p>
  229. </dd>
  230. <dt>&lsquo;<samp>-m68020</samp>&rsquo;</dt>
  231. <dt>&lsquo;<samp>-m68ec020</samp>&rsquo;</dt>
  232. <dd><p>Assemble for the 68020. This is normally the default.
  233. </p>
  234. </dd>
  235. <dt>&lsquo;<samp>-m68030</samp>&rsquo;</dt>
  236. <dt>&lsquo;<samp>-m68ec030</samp>&rsquo;</dt>
  237. <dd><p>Assemble for the 68030.
  238. </p>
  239. </dd>
  240. <dt>&lsquo;<samp>-m68040</samp>&rsquo;</dt>
  241. <dt>&lsquo;<samp>-m68ec040</samp>&rsquo;</dt>
  242. <dd><p>Assemble for the 68040.
  243. </p>
  244. </dd>
  245. <dt>&lsquo;<samp>-m68060</samp>&rsquo;</dt>
  246. <dt>&lsquo;<samp>-m68ec060</samp>&rsquo;</dt>
  247. <dd><p>Assemble for the 68060.
  248. </p>
  249. </dd>
  250. <dt>&lsquo;<samp>-mcpu32</samp>&rsquo;</dt>
  251. <dt>&lsquo;<samp>-m68330</samp>&rsquo;</dt>
  252. <dt>&lsquo;<samp>-m68331</samp>&rsquo;</dt>
  253. <dt>&lsquo;<samp>-m68332</samp>&rsquo;</dt>
  254. <dt>&lsquo;<samp>-m68333</samp>&rsquo;</dt>
  255. <dt>&lsquo;<samp>-m68334</samp>&rsquo;</dt>
  256. <dt>&lsquo;<samp>-m68336</samp>&rsquo;</dt>
  257. <dt>&lsquo;<samp>-m68340</samp>&rsquo;</dt>
  258. <dt>&lsquo;<samp>-m68341</samp>&rsquo;</dt>
  259. <dt>&lsquo;<samp>-m68349</samp>&rsquo;</dt>
  260. <dt>&lsquo;<samp>-m68360</samp>&rsquo;</dt>
  261. <dd><p>Assemble for the CPU32 family of chips.
  262. </p>
  263. </dd>
  264. <dt>&lsquo;<samp>-m5200</samp>&rsquo;</dt>
  265. <dt>&lsquo;<samp>-m5202</samp>&rsquo;</dt>
  266. <dt>&lsquo;<samp>-m5204</samp>&rsquo;</dt>
  267. <dt>&lsquo;<samp>-m5206</samp>&rsquo;</dt>
  268. <dt>&lsquo;<samp>-m5206e</samp>&rsquo;</dt>
  269. <dt>&lsquo;<samp>-m521x</samp>&rsquo;</dt>
  270. <dt>&lsquo;<samp>-m5249</samp>&rsquo;</dt>
  271. <dt>&lsquo;<samp>-m528x</samp>&rsquo;</dt>
  272. <dt>&lsquo;<samp>-m5307</samp>&rsquo;</dt>
  273. <dt>&lsquo;<samp>-m5407</samp>&rsquo;</dt>
  274. <dt>&lsquo;<samp>-m547x</samp>&rsquo;</dt>
  275. <dt>&lsquo;<samp>-m548x</samp>&rsquo;</dt>
  276. <dt>&lsquo;<samp>-mcfv4</samp>&rsquo;</dt>
  277. <dt>&lsquo;<samp>-mcfv4e</samp>&rsquo;</dt>
  278. <dd><p>Assemble for the ColdFire family of chips.
  279. </p>
  280. </dd>
  281. <dt>&lsquo;<samp>-m68881</samp>&rsquo;</dt>
  282. <dt>&lsquo;<samp>-m68882</samp>&rsquo;</dt>
  283. <dd><p>Assemble 68881 floating point instructions. This is the default for the
  284. 68020, 68030, and the CPU32. The 68040 and 68060 always support
  285. floating point instructions.
  286. </p>
  287. </dd>
  288. <dt>&lsquo;<samp>-mno-68881</samp>&rsquo;</dt>
  289. <dd><p>Do not assemble 68881 floating point instructions. This is the default
  290. for 68000 and the 68010. The 68040 and 68060 always support floating
  291. point instructions, even if this option is used.
  292. </p>
  293. </dd>
  294. <dt>&lsquo;<samp>-m68851</samp>&rsquo;</dt>
  295. <dd><p>Assemble 68851 MMU instructions. This is the default for the 68020,
  296. 68030, and 68060. The 68040 accepts a somewhat different set of MMU
  297. instructions; &lsquo;<samp>-m68851</samp>&rsquo; and &lsquo;<samp>-m68040</samp>&rsquo; should not be used
  298. together.
  299. </p>
  300. </dd>
  301. <dt>&lsquo;<samp>-mno-68851</samp>&rsquo;</dt>
  302. <dd><p>Do not assemble 68851 MMU instructions. This is the default for the
  303. 68000, 68010, and the CPU32. The 68040 accepts a somewhat different set
  304. of MMU instructions.
  305. </p></dd>
  306. </dl>
  307. </dd>
  308. </dl>
  309. <hr>
  310. <div class="header">
  311. <p>
  312. Next: <a href="M68K_002dSyntax.html#M68K_002dSyntax" accesskey="n" rel="next">M68K-Syntax</a>, Up: <a href="M68K_002dDependent.html#M68K_002dDependent" accesskey="u" rel="up">M68K-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>
  313. </div>
  314. </body>
  315. </html>