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.

169 lines
7.2KB

  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>RISC-V-Options (Using as)</title>
  16. <meta name="description" content="RISC-V-Options (Using as)">
  17. <meta name="keywords" content="RISC-V-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="RISC_002dV_002dDependent.html#RISC_002dV_002dDependent" rel="up" title="RISC-V-Dependent">
  25. <link href="RISC_002dV_002dDirectives.html#RISC_002dV_002dDirectives" rel="next" title="RISC-V-Directives">
  26. <link href="RISC_002dV_002dDependent.html#RISC_002dV_002dDependent" rel="prev" title="RISC-V-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="RISC_002dV_002dOptions"></a>
  57. <div class="header">
  58. <p>
  59. Next: <a href="RISC_002dV_002dDirectives.html#RISC_002dV_002dDirectives" accesskey="n" rel="next">RISC-V-Directives</a>, Up: <a href="RISC_002dV_002dDependent.html#RISC_002dV_002dDependent" accesskey="u" rel="up">RISC-V-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="RISC_002dV-Options"></a>
  63. <h4 class="subsection">9.38.1 RISC-V Options</h4>
  64. <p>The following table lists all available RISC-V specific options.
  65. </p>
  66. <dl compact="compact">
  67. <dd>
  68. <a name="index-_002dfpic-option_002c-RISC_002dV"></a>
  69. </dd>
  70. <dt><code>-fpic</code></dt>
  71. <dt><code>-fPIC</code></dt>
  72. <dd><p>Generate position-independent code
  73. </p>
  74. <a name="index-_002dfno_002dpic-option_002c-RISC_002dV"></a>
  75. </dd>
  76. <dt><code>-fno-pic</code></dt>
  77. <dd><p>Don&rsquo;t generate position-independent code (default)
  78. </p>
  79. <a name="index-_002dmarch_003dISA-option_002c-RISC_002dV"></a>
  80. </dd>
  81. <dt><code>-march=ISA</code></dt>
  82. <dd><p>Select the base isa, as specified by ISA. For example -march=rv32ima.
  83. If this option and the architecture attributes aren&rsquo;t set, then assembler
  84. will check the default configure setting &ndash;with-arch=ISA.
  85. </p>
  86. <a name="index-_002dmisa_002dspec_003dISAspec-option_002c-RISC_002dV"></a>
  87. </dd>
  88. <dt><code>-misa-spec=ISAspec</code></dt>
  89. <dd><p>Select the default isa spec version. If the version of ISA isn&rsquo;t set
  90. by -march, then assembler helps to set the version according to
  91. the default chosen spec. If this option isn&rsquo;t set, then assembler will
  92. check the default configure setting &ndash;with-isa-spec=ISAspec.
  93. </p>
  94. <a name="index-_002dmpriv_002dspec_003dPRIVspec-option_002c-RISC_002dV"></a>
  95. </dd>
  96. <dt><code>-mpriv-spec=PRIVspec</code></dt>
  97. <dd><p>Select the privileged spec version. We can decide whether the CSR is valid or
  98. not according to the chosen spec. If this option and the privilege attributes
  99. aren&rsquo;t set, then assembler will check the default configure setting
  100. &ndash;with-priv-spec=PRIVspec.
  101. </p>
  102. <a name="index-_002dmabi_003dABI-option_002c-RISC_002dV"></a>
  103. </dd>
  104. <dt><code>-mabi=ABI</code></dt>
  105. <dd><p>Selects the ABI, which is either &quot;ilp32&quot; or &quot;lp64&quot;, optionally followed
  106. by &quot;f&quot;, &quot;d&quot;, or &quot;q&quot; to indicate single-precision, double-precision, or
  107. quad-precision floating-point calling convention, or none to indicate
  108. the soft-float calling convention. Also, &quot;ilp32&quot; can optionally be followed
  109. by &quot;e&quot; to indicate the RVE ABI, which is always soft-float.
  110. </p>
  111. <a name="index-_002dmrelax-option_002c-RISC_002dV"></a>
  112. </dd>
  113. <dt><code>-mrelax</code></dt>
  114. <dd><p>Take advantage of linker relaxations to reduce the number of instructions
  115. required to materialize symbol addresses. (default)
  116. </p>
  117. <a name="index-_002dmno_002drelax-option_002c-RISC_002dV"></a>
  118. </dd>
  119. <dt><code>-mno-relax</code></dt>
  120. <dd><p>Don&rsquo;t do linker relaxations.
  121. </p>
  122. <a name="index-_002dmarch_002dattr-option_002c-RISC_002dV"></a>
  123. </dd>
  124. <dt><code>-march-attr</code></dt>
  125. <dd><p>Generate the default contents for the riscv elf attribute section if the
  126. .attribute directives are not set. This section is used to record the
  127. information that a linker or runtime loader needs to check compatibility.
  128. This information includes ISA string, stack alignment requirement, unaligned
  129. memory accesses, and the major, minor and revision version of privileged
  130. specification.
  131. </p>
  132. <a name="index-_002dmno_002darch_002dattr-option_002c-RISC_002dV"></a>
  133. </dd>
  134. <dt><code>-mno-arch-attr</code></dt>
  135. <dd><p>Don&rsquo;t generate the default riscv elf attribute section if the .attribute
  136. directives are not set.
  137. </p>
  138. <a name="index-_002dmcsr_002dcheck-option_002c-RISC_002dV"></a>
  139. </dd>
  140. <dt><code>-mcsr-check</code></dt>
  141. <dd><p>Enable the CSR checking for the ISA-dependent CRS and the read-only CSR.
  142. The ISA-dependent CSR are only valid when the specific ISA is set. The
  143. read-only CSR can not be written by the CSR instructions.
  144. </p>
  145. <a name="index-_002dmno_002dcsr_002dcheck-option_002c-RISC_002dV"></a>
  146. </dd>
  147. <dt><code>-mno-csr-check</code></dt>
  148. <dd><p>Don&rsquo;t do CSR cheching.
  149. </p></dd>
  150. </dl>
  151. <hr>
  152. <div class="header">
  153. <p>
  154. Next: <a href="RISC_002dV_002dDirectives.html#RISC_002dV_002dDirectives" accesskey="n" rel="next">RISC-V-Directives</a>, Up: <a href="RISC_002dV_002dDependent.html#RISC_002dV_002dDependent" accesskey="u" rel="up">RISC-V-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>
  155. </div>
  156. </body>
  157. </html>