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.

162 lines
8.8KB

  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>MMIX-Opts (Using as)</title>
  16. <meta name="description" content="MMIX-Opts (Using as)">
  17. <meta name="keywords" content="MMIX-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="MMIX_002dDependent.html#MMIX_002dDependent" rel="up" title="MMIX-Dependent">
  25. <link href="MMIX_002dExpand.html#MMIX_002dExpand" rel="next" title="MMIX-Expand">
  26. <link href="MMIX_002dDependent.html#MMIX_002dDependent" rel="prev" title="MMIX-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="MMIX_002dOpts"></a>
  57. <div class="header">
  58. <p>
  59. Next: <a href="MMIX_002dExpand.html#MMIX_002dExpand" accesskey="n" rel="next">MMIX-Expand</a>, Up: <a href="MMIX_002dDependent.html#MMIX_002dDependent" accesskey="u" rel="up">MMIX-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="Command_002dline-Options-1"></a>
  63. <h4 class="subsection">9.28.1 Command-line Options</h4>
  64. <a name="index-options_002c-MMIX"></a>
  65. <a name="index-MMIX-options"></a>
  66. <p>The MMIX version of <code>as</code> has some machine-dependent options.
  67. </p>
  68. <a name="index-_002d_002dfixed_002dspecial_002dregister_002dnames-command_002dline-option_002c-MMIX"></a>
  69. <p>When &lsquo;<samp>--fixed-special-register-names</samp>&rsquo; is specified, only the register
  70. names specified in <a href="MMIX_002dRegs.html#MMIX_002dRegs">MMIX-Regs</a> are recognized in the instructions
  71. <code>PUT</code> and <code>GET</code>.
  72. </p>
  73. <a name="index-_002d_002dglobalize_002dsymbols-command_002dline-option_002c-MMIX"></a>
  74. <p>You can use the &lsquo;<samp>--globalize-symbols</samp>&rsquo; to make all symbols global.
  75. This option is useful when splitting up a <code>mmixal</code> program into
  76. several files.
  77. </p>
  78. <a name="index-_002d_002dgnu_002dsyntax-command_002dline-option_002c-MMIX"></a>
  79. <p>The &lsquo;<samp>--gnu-syntax</samp>&rsquo; turns off most syntax compatibility with
  80. <code>mmixal</code>. Its usability is currently doubtful.
  81. </p>
  82. <a name="index-_002d_002drelax-command_002dline-option_002c-MMIX"></a>
  83. <p>The &lsquo;<samp>--relax</samp>&rsquo; option is not fully supported, but will eventually make
  84. the object file prepared for linker relaxation.
  85. </p>
  86. <a name="index-_002d_002dno_002dpredefined_002dsyms-command_002dline-option_002c-MMIX"></a>
  87. <p>If you want to avoid inadvertently calling a predefined symbol and would
  88. rather get an error, for example when using <code>as</code> with a
  89. compiler or other machine-generated code, specify
  90. &lsquo;<samp>--no-predefined-syms</samp>&rsquo;. This turns off built-in predefined
  91. definitions of all such symbols, including rounding-mode symbols, segment
  92. symbols, &lsquo;<samp>BIT</samp>&rsquo; symbols, and <code>TRAP</code> symbols used in <code>mmix</code>
  93. &ldquo;system calls&rdquo;. It also turns off predefined special-register names,
  94. except when used in <code>PUT</code> and <code>GET</code> instructions.
  95. </p>
  96. <a name="index-_002d_002dno_002dexpand-command_002dline-option_002c-MMIX"></a>
  97. <p>By default, some instructions are expanded to fit the size of the operand
  98. or an external symbol (see <a href="MMIX_002dExpand.html#MMIX_002dExpand">MMIX-Expand</a>). By passing
  99. &lsquo;<samp>--no-expand</samp>&rsquo;, no such expansion will be done, instead causing errors
  100. at link time if the operand does not fit.
  101. </p>
  102. <a name="index-_002d_002dno_002dmerge_002dgregs-command_002dline-option_002c-MMIX"></a>
  103. <p>The <code>mmixal</code> documentation (see <a href="MMIX_002dSyntax.html#mmixsite">mmixsite</a>) specifies that global
  104. registers allocated with the &lsquo;<samp>GREG</samp>&rsquo; directive (see <a href="MMIX_002dPseudos.html#MMIX_002dgreg">MMIX-greg</a>) and
  105. initialized to the same non-zero value, will refer to the same global
  106. register. This isn&rsquo;t strictly enforceable in <code>as</code> since the
  107. final addresses aren&rsquo;t known until link-time, but it will do an effort
  108. unless the &lsquo;<samp>--no-merge-gregs</samp>&rsquo; option is specified. (Register merging
  109. isn&rsquo;t yet implemented in <code>ld</code>.)
  110. </p>
  111. <a name="index-_002dx-command_002dline-option_002c-MMIX"></a>
  112. <p><code>as</code> will warn every time it expands an instruction to fit an
  113. operand unless the option &lsquo;<samp>-x</samp>&rsquo; is specified. It is believed that
  114. this behaviour is more useful than just mimicking <code>mmixal</code>&rsquo;s
  115. behaviour, in which instructions are only expanded if the &lsquo;<samp>-x</samp>&rsquo; option
  116. is specified, and assembly fails otherwise, when an instruction needs to
  117. be expanded. It needs to be kept in mind that <code>mmixal</code> is both an
  118. assembler and linker, while <code>as</code> will expand instructions
  119. that at link stage can be contracted. (Though linker relaxation isn&rsquo;t yet
  120. implemented in <code>ld</code>.) The option &lsquo;<samp>-x</samp>&rsquo; also implies
  121. &lsquo;<samp>--linker-allocated-gregs</samp>&rsquo;.
  122. </p>
  123. <a name="index-_002d_002dno_002dpushj_002dstubs-command_002dline-option_002c-MMIX"></a>
  124. <a name="index-_002d_002dno_002dstubs-command_002dline-option_002c-MMIX"></a>
  125. <p>If instruction expansion is enabled, <code>as</code> can expand a
  126. &lsquo;<samp>PUSHJ</samp>&rsquo; instruction into a series of instructions. The shortest
  127. expansion is to not expand it, but just mark the call as redirectable to a
  128. stub, which <code>ld</code> creates at link-time, but only if the
  129. original &lsquo;<samp>PUSHJ</samp>&rsquo; instruction is found not to reach the target. The
  130. stub consists of the necessary instructions to form a jump to the target.
  131. This happens if <code>as</code> can assert that the &lsquo;<samp>PUSHJ</samp>&rsquo;
  132. instruction can reach such a stub. The option &lsquo;<samp>--no-pushj-stubs</samp>&rsquo;
  133. disables this shorter expansion, and the longer series of instructions is
  134. then created at assembly-time. The option &lsquo;<samp>--no-stubs</samp>&rsquo; is a synonym,
  135. intended for compatibility with future releases, where generation of stubs
  136. for other instructions may be implemented.
  137. </p>
  138. <a name="index-_002d_002dlinker_002dallocated_002dgregs-command_002dline-option_002c-MMIX"></a>
  139. <p>Usually a two-operand-expression (see <a href="MMIX_002dPseudos.html#GREG_002dbase">GREG-base</a>) without a matching
  140. &lsquo;<samp>GREG</samp>&rsquo; directive is treated as an error by <code>as</code>. When
  141. the option &lsquo;<samp>--linker-allocated-gregs</samp>&rsquo; is in effect, they are instead
  142. passed through to the linker, which will allocate as many global registers
  143. as is needed.
  144. </p>
  145. <hr>
  146. <div class="header">
  147. <p>
  148. Next: <a href="MMIX_002dExpand.html#MMIX_002dExpand" accesskey="n" rel="next">MMIX-Expand</a>, Up: <a href="MMIX_002dDependent.html#MMIX_002dDependent" accesskey="u" rel="up">MMIX-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>
  149. </div>
  150. </body>
  151. </html>