M68K_002dOpts.html 15 KB

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