MMIX_002dOpts.html 8.8 KB

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