RL78-Options.html 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <html>
  3. <!-- Copyright (C) 1988-2017 Free Software Foundation, Inc.
  4. Permission is granted to copy, distribute and/or modify this document
  5. under the terms of the GNU Free Documentation License, Version 1.3 or
  6. any later version published by the Free Software Foundation; with the
  7. Invariant Sections being "Funding Free Software", the Front-Cover
  8. Texts being (a) (see below), and with the Back-Cover Texts being (b)
  9. (see below). A copy of the license is included in the section entitled
  10. "GNU Free Documentation License".
  11. (a) The FSF's Front-Cover Text is:
  12. A GNU Manual
  13. (b) The FSF's Back-Cover Text is:
  14. You have freedom to copy and modify this GNU Manual, like GNU
  15. software. Copies published by the Free Software Foundation raise
  16. funds for GNU development. -->
  17. <!-- Created by GNU Texinfo 5.2, http://www.gnu.org/software/texinfo/ -->
  18. <head>
  19. <title>Using the GNU Compiler Collection (GCC): RL78 Options</title>
  20. <meta name="description" content="Using the GNU Compiler Collection (GCC): RL78 Options">
  21. <meta name="keywords" content="Using the GNU Compiler Collection (GCC): RL78 Options">
  22. <meta name="resource-type" content="document">
  23. <meta name="distribution" content="global">
  24. <meta name="Generator" content="makeinfo">
  25. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  26. <link href="index.html#Top" rel="start" title="Top">
  27. <link href="Option-Index.html#Option-Index" rel="index" title="Option Index">
  28. <link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
  29. <link href="Submodel-Options.html#Submodel-Options" rel="up" title="Submodel Options">
  30. <link href="RS_002f6000-and-PowerPC-Options.html#RS_002f6000-and-PowerPC-Options" rel="next" title="RS/6000 and PowerPC Options">
  31. <link href="RISC_002dV-Options.html#RISC_002dV-Options" rel="prev" title="RISC-V Options">
  32. <style type="text/css">
  33. <!--
  34. a.summary-letter {text-decoration: none}
  35. blockquote.smallquotation {font-size: smaller}
  36. div.display {margin-left: 3.2em}
  37. div.example {margin-left: 3.2em}
  38. div.indentedblock {margin-left: 3.2em}
  39. div.lisp {margin-left: 3.2em}
  40. div.smalldisplay {margin-left: 3.2em}
  41. div.smallexample {margin-left: 3.2em}
  42. div.smallindentedblock {margin-left: 3.2em; font-size: smaller}
  43. div.smalllisp {margin-left: 3.2em}
  44. kbd {font-style:oblique}
  45. pre.display {font-family: inherit}
  46. pre.format {font-family: inherit}
  47. pre.menu-comment {font-family: serif}
  48. pre.menu-preformatted {font-family: serif}
  49. pre.smalldisplay {font-family: inherit; font-size: smaller}
  50. pre.smallexample {font-size: smaller}
  51. pre.smallformat {font-family: inherit; font-size: smaller}
  52. pre.smalllisp {font-size: smaller}
  53. span.nocodebreak {white-space:nowrap}
  54. span.nolinebreak {white-space:nowrap}
  55. span.roman {font-family:serif; font-weight:normal}
  56. span.sansserif {font-family:sans-serif; font-weight:normal}
  57. ul.no-bullet {list-style: none}
  58. -->
  59. </style>
  60. </head>
  61. <body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
  62. <a name="RL78-Options"></a>
  63. <div class="header">
  64. <p>
  65. Next: <a href="RS_002f6000-and-PowerPC-Options.html#RS_002f6000-and-PowerPC-Options" accesskey="n" rel="next">RS/6000 and PowerPC Options</a>, Previous: <a href="RISC_002dV-Options.html#RISC_002dV-Options" accesskey="p" rel="prev">RISC-V Options</a>, Up: <a href="Submodel-Options.html#Submodel-Options" accesskey="u" rel="up">Submodel Options</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Option-Index.html#Option-Index" title="Index" rel="index">Index</a>]</p>
  66. </div>
  67. <hr>
  68. <a name="RL78-Options-1"></a>
  69. <h4 class="subsection">3.18.38 RL78 Options</h4>
  70. <a name="index-RL78-Options"></a>
  71. <dl compact="compact">
  72. <dt><code>-msim</code></dt>
  73. <dd><a name="index-msim-7"></a>
  74. <p>Links in additional target libraries to support operation within a
  75. simulator.
  76. </p>
  77. </dd>
  78. <dt><code>-mmul=none</code></dt>
  79. <dt><code>-mmul=g10</code></dt>
  80. <dt><code>-mmul=g13</code></dt>
  81. <dt><code>-mmul=g14</code></dt>
  82. <dt><code>-mmul=rl78</code></dt>
  83. <dd><a name="index-mmul"></a>
  84. <p>Specifies the type of hardware multiplication and division support to
  85. be used. The simplest is <code>none</code>, which uses software for both
  86. multiplication and division. This is the default. The <code>g13</code>
  87. value is for the hardware multiply/divide peripheral found on the
  88. RL78/G13 (S2 core) targets. The <code>g14</code> value selects the use of
  89. the multiplication and division instructions supported by the RL78/G14
  90. (S3 core) parts. The value <code>rl78</code> is an alias for <code>g14</code> and
  91. the value <code>mg10</code> is an alias for <code>none</code>.
  92. </p>
  93. <p>In addition a C preprocessor macro is defined, based upon the setting
  94. of this option. Possible values are: <code>__RL78_MUL_NONE__</code>,
  95. <code>__RL78_MUL_G13__</code> or <code>__RL78_MUL_G14__</code>.
  96. </p>
  97. </dd>
  98. <dt><code>-mcpu=g10</code></dt>
  99. <dt><code>-mcpu=g13</code></dt>
  100. <dt><code>-mcpu=g14</code></dt>
  101. <dt><code>-mcpu=rl78</code></dt>
  102. <dd><a name="index-mcpu-8"></a>
  103. <p>Specifies the RL78 core to target. The default is the G14 core, also
  104. known as an S3 core or just RL78. The G13 or S2 core does not have
  105. multiply or divide instructions, instead it uses a hardware peripheral
  106. for these operations. The G10 or S1 core does not have register
  107. banks, so it uses a different calling convention.
  108. </p>
  109. <p>If this option is set it also selects the type of hardware multiply
  110. support to use, unless this is overridden by an explicit
  111. <samp>-mmul=none</samp> option on the command line. Thus specifying
  112. <samp>-mcpu=g13</samp> enables the use of the G13 hardware multiply
  113. peripheral and specifying <samp>-mcpu=g10</samp> disables the use of
  114. hardware multiplications altogether.
  115. </p>
  116. <p>Note, although the RL78/G14 core is the default target, specifying
  117. <samp>-mcpu=g14</samp> or <samp>-mcpu=rl78</samp> on the command line does
  118. change the behavior of the toolchain since it also enables G14
  119. hardware multiply support. If these options are not specified on the
  120. command line then software multiplication routines will be used even
  121. though the code targets the RL78 core. This is for backwards
  122. compatibility with older toolchains which did not have hardware
  123. multiply and divide support.
  124. </p>
  125. <p>In addition a C preprocessor macro is defined, based upon the setting
  126. of this option. Possible values are: <code>__RL78_G10__</code>,
  127. <code>__RL78_G13__</code> or <code>__RL78_G14__</code>.
  128. </p>
  129. </dd>
  130. <dt><code>-mg10</code></dt>
  131. <dt><code>-mg13</code></dt>
  132. <dt><code>-mg14</code></dt>
  133. <dt><code>-mrl78</code></dt>
  134. <dd><a name="index-mg10"></a>
  135. <a name="index-mg13"></a>
  136. <a name="index-mg14"></a>
  137. <a name="index-mrl78"></a>
  138. <p>These are aliases for the corresponding <samp>-mcpu=</samp> option. They
  139. are provided for backwards compatibility.
  140. </p>
  141. </dd>
  142. <dt><code>-mallregs</code></dt>
  143. <dd><a name="index-mallregs"></a>
  144. <p>Allow the compiler to use all of the available registers. By default
  145. registers <code>r24..r31</code> are reserved for use in interrupt handlers.
  146. With this option enabled these registers can be used in ordinary
  147. functions as well.
  148. </p>
  149. </dd>
  150. <dt><code>-m64bit-doubles</code></dt>
  151. <dt><code>-m32bit-doubles</code></dt>
  152. <dd><a name="index-m64bit_002ddoubles"></a>
  153. <a name="index-m32bit_002ddoubles"></a>
  154. <p>Make the <code>double</code> data type be 64 bits (<samp>-m64bit-doubles</samp>)
  155. or 32 bits (<samp>-m32bit-doubles</samp>) in size. The default is
  156. <samp>-m32bit-doubles</samp>.
  157. </p>
  158. </dd>
  159. <dt><code>-msave-mduc-in-interrupts</code></dt>
  160. <dt><code>-mno-save-mduc-in-interrupts</code></dt>
  161. <dd><a name="index-msave_002dmduc_002din_002dinterrupts"></a>
  162. <a name="index-mno_002dsave_002dmduc_002din_002dinterrupts"></a>
  163. <p>Specifies that interrupt handler functions should preserve the
  164. MDUC registers. This is only necessary if normal code might use
  165. the MDUC registers, for example because it performs multiplication
  166. and division operations. The default is to ignore the MDUC registers
  167. as this makes the interrupt handlers faster. The target option -mg13
  168. needs to be passed for this to work as this feature is only available
  169. on the G13 target (S2 core). The MDUC registers will only be saved
  170. if the interrupt handler performs a multiplication or division
  171. operation or it calls another function.
  172. </p>
  173. </dd>
  174. </dl>
  175. <hr>
  176. <div class="header">
  177. <p>
  178. Next: <a href="RS_002f6000-and-PowerPC-Options.html#RS_002f6000-and-PowerPC-Options" accesskey="n" rel="next">RS/6000 and PowerPC Options</a>, Previous: <a href="RISC_002dV-Options.html#RISC_002dV-Options" accesskey="p" rel="prev">RISC-V Options</a>, Up: <a href="Submodel-Options.html#Submodel-Options" accesskey="u" rel="up">Submodel Options</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Option-Index.html#Option-Index" title="Index" rel="index">Index</a>]</p>
  179. </div>
  180. </body>
  181. </html>