RX-Built_002din-Functions.html 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222
  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): RX Built-in Functions</title>
  20. <meta name="description" content="Using the GNU Compiler Collection (GCC): RX Built-in Functions">
  21. <meta name="keywords" content="Using the GNU Compiler Collection (GCC): RX Built-in Functions">
  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="Target-Builtins.html#Target-Builtins" rel="up" title="Target Builtins">
  30. <link href="S_002f390-System-z-Built_002din-Functions.html#S_002f390-System-z-Built_002din-Functions" rel="next" title="S/390 System z Built-in Functions">
  31. <link href="PowerPC-Hardware-Transactional-Memory-Built_002din-Functions.html#PowerPC-Hardware-Transactional-Memory-Built_002din-Functions" rel="prev" title="PowerPC Hardware Transactional Memory Built-in Functions">
  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="RX-Built_002din-Functions"></a>
  63. <div class="header">
  64. <p>
  65. Next: <a href="S_002f390-System-z-Built_002din-Functions.html#S_002f390-System-z-Built_002din-Functions" accesskey="n" rel="next">S/390 System z Built-in Functions</a>, Previous: <a href="PowerPC-Hardware-Transactional-Memory-Built_002din-Functions.html#PowerPC-Hardware-Transactional-Memory-Built_002din-Functions" accesskey="p" rel="prev">PowerPC Hardware Transactional Memory Built-in Functions</a>, Up: <a href="Target-Builtins.html#Target-Builtins" accesskey="u" rel="up">Target Builtins</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="RX-Built_002din-Functions-1"></a>
  69. <h4 class="subsection">6.60.24 RX Built-in Functions</h4>
  70. <p>GCC supports some of the RX instructions which cannot be expressed in
  71. the C programming language via the use of built-in functions. The
  72. following functions are supported:
  73. </p>
  74. <dl>
  75. <dt><a name="index-_005f_005fbuiltin_005frx_005fbrk"></a>Built-in Function: <em>void</em> <strong>__builtin_rx_brk</strong> <em>(void)</em></dt>
  76. <dd><p>Generates the <code>brk</code> machine instruction.
  77. </p></dd></dl>
  78. <dl>
  79. <dt><a name="index-_005f_005fbuiltin_005frx_005fclrpsw"></a>Built-in Function: <em>void</em> <strong>__builtin_rx_clrpsw</strong> <em>(int)</em></dt>
  80. <dd><p>Generates the <code>clrpsw</code> machine instruction to clear the specified
  81. bit in the processor status word.
  82. </p></dd></dl>
  83. <dl>
  84. <dt><a name="index-_005f_005fbuiltin_005frx_005fint"></a>Built-in Function: <em>void</em> <strong>__builtin_rx_int</strong> <em>(int)</em></dt>
  85. <dd><p>Generates the <code>int</code> machine instruction to generate an interrupt
  86. with the specified value.
  87. </p></dd></dl>
  88. <dl>
  89. <dt><a name="index-_005f_005fbuiltin_005frx_005fmachi"></a>Built-in Function: <em>void</em> <strong>__builtin_rx_machi</strong> <em>(int, int)</em></dt>
  90. <dd><p>Generates the <code>machi</code> machine instruction to add the result of
  91. multiplying the top 16 bits of the two arguments into the
  92. accumulator.
  93. </p></dd></dl>
  94. <dl>
  95. <dt><a name="index-_005f_005fbuiltin_005frx_005fmaclo"></a>Built-in Function: <em>void</em> <strong>__builtin_rx_maclo</strong> <em>(int, int)</em></dt>
  96. <dd><p>Generates the <code>maclo</code> machine instruction to add the result of
  97. multiplying the bottom 16 bits of the two arguments into the
  98. accumulator.
  99. </p></dd></dl>
  100. <dl>
  101. <dt><a name="index-_005f_005fbuiltin_005frx_005fmulhi"></a>Built-in Function: <em>void</em> <strong>__builtin_rx_mulhi</strong> <em>(int, int)</em></dt>
  102. <dd><p>Generates the <code>mulhi</code> machine instruction to place the result of
  103. multiplying the top 16 bits of the two arguments into the
  104. accumulator.
  105. </p></dd></dl>
  106. <dl>
  107. <dt><a name="index-_005f_005fbuiltin_005frx_005fmullo"></a>Built-in Function: <em>void</em> <strong>__builtin_rx_mullo</strong> <em>(int, int)</em></dt>
  108. <dd><p>Generates the <code>mullo</code> machine instruction to place the result of
  109. multiplying the bottom 16 bits of the two arguments into the
  110. accumulator.
  111. </p></dd></dl>
  112. <dl>
  113. <dt><a name="index-_005f_005fbuiltin_005frx_005fmvfachi"></a>Built-in Function: <em>int</em> <strong>__builtin_rx_mvfachi</strong> <em>(void)</em></dt>
  114. <dd><p>Generates the <code>mvfachi</code> machine instruction to read the top
  115. 32 bits of the accumulator.
  116. </p></dd></dl>
  117. <dl>
  118. <dt><a name="index-_005f_005fbuiltin_005frx_005fmvfacmi"></a>Built-in Function: <em>int</em> <strong>__builtin_rx_mvfacmi</strong> <em>(void)</em></dt>
  119. <dd><p>Generates the <code>mvfacmi</code> machine instruction to read the middle
  120. 32 bits of the accumulator.
  121. </p></dd></dl>
  122. <dl>
  123. <dt><a name="index-_005f_005fbuiltin_005frx_005fmvfc"></a>Built-in Function: <em>int</em> <strong>__builtin_rx_mvfc</strong> <em>(int)</em></dt>
  124. <dd><p>Generates the <code>mvfc</code> machine instruction which reads the control
  125. register specified in its argument and returns its value.
  126. </p></dd></dl>
  127. <dl>
  128. <dt><a name="index-_005f_005fbuiltin_005frx_005fmvtachi"></a>Built-in Function: <em>void</em> <strong>__builtin_rx_mvtachi</strong> <em>(int)</em></dt>
  129. <dd><p>Generates the <code>mvtachi</code> machine instruction to set the top
  130. 32 bits of the accumulator.
  131. </p></dd></dl>
  132. <dl>
  133. <dt><a name="index-_005f_005fbuiltin_005frx_005fmvtaclo"></a>Built-in Function: <em>void</em> <strong>__builtin_rx_mvtaclo</strong> <em>(int)</em></dt>
  134. <dd><p>Generates the <code>mvtaclo</code> machine instruction to set the bottom
  135. 32 bits of the accumulator.
  136. </p></dd></dl>
  137. <dl>
  138. <dt><a name="index-_005f_005fbuiltin_005frx_005fmvtc"></a>Built-in Function: <em>void</em> <strong>__builtin_rx_mvtc</strong> <em>(int reg, int val)</em></dt>
  139. <dd><p>Generates the <code>mvtc</code> machine instruction which sets control
  140. register number <code>reg</code> to <code>val</code>.
  141. </p></dd></dl>
  142. <dl>
  143. <dt><a name="index-_005f_005fbuiltin_005frx_005fmvtipl"></a>Built-in Function: <em>void</em> <strong>__builtin_rx_mvtipl</strong> <em>(int)</em></dt>
  144. <dd><p>Generates the <code>mvtipl</code> machine instruction set the interrupt
  145. priority level.
  146. </p></dd></dl>
  147. <dl>
  148. <dt><a name="index-_005f_005fbuiltin_005frx_005fracw"></a>Built-in Function: <em>void</em> <strong>__builtin_rx_racw</strong> <em>(int)</em></dt>
  149. <dd><p>Generates the <code>racw</code> machine instruction to round the accumulator
  150. according to the specified mode.
  151. </p></dd></dl>
  152. <dl>
  153. <dt><a name="index-_005f_005fbuiltin_005frx_005frevw"></a>Built-in Function: <em>int</em> <strong>__builtin_rx_revw</strong> <em>(int)</em></dt>
  154. <dd><p>Generates the <code>revw</code> machine instruction which swaps the bytes in
  155. the argument so that bits 0&ndash;7 now occupy bits 8&ndash;15 and vice versa,
  156. and also bits 16&ndash;23 occupy bits 24&ndash;31 and vice versa.
  157. </p></dd></dl>
  158. <dl>
  159. <dt><a name="index-_005f_005fbuiltin_005frx_005frmpa"></a>Built-in Function: <em>void</em> <strong>__builtin_rx_rmpa</strong> <em>(void)</em></dt>
  160. <dd><p>Generates the <code>rmpa</code> machine instruction which initiates a
  161. repeated multiply and accumulate sequence.
  162. </p></dd></dl>
  163. <dl>
  164. <dt><a name="index-_005f_005fbuiltin_005frx_005fround"></a>Built-in Function: <em>void</em> <strong>__builtin_rx_round</strong> <em>(float)</em></dt>
  165. <dd><p>Generates the <code>round</code> machine instruction which returns the
  166. floating-point argument rounded according to the current rounding mode
  167. set in the floating-point status word register.
  168. </p></dd></dl>
  169. <dl>
  170. <dt><a name="index-_005f_005fbuiltin_005frx_005fsat"></a>Built-in Function: <em>int</em> <strong>__builtin_rx_sat</strong> <em>(int)</em></dt>
  171. <dd><p>Generates the <code>sat</code> machine instruction which returns the
  172. saturated value of the argument.
  173. </p></dd></dl>
  174. <dl>
  175. <dt><a name="index-_005f_005fbuiltin_005frx_005fsetpsw"></a>Built-in Function: <em>void</em> <strong>__builtin_rx_setpsw</strong> <em>(int)</em></dt>
  176. <dd><p>Generates the <code>setpsw</code> machine instruction to set the specified
  177. bit in the processor status word.
  178. </p></dd></dl>
  179. <dl>
  180. <dt><a name="index-_005f_005fbuiltin_005frx_005fwait"></a>Built-in Function: <em>void</em> <strong>__builtin_rx_wait</strong> <em>(void)</em></dt>
  181. <dd><p>Generates the <code>wait</code> machine instruction.
  182. </p></dd></dl>
  183. <hr>
  184. <div class="header">
  185. <p>
  186. Next: <a href="S_002f390-System-z-Built_002din-Functions.html#S_002f390-System-z-Built_002din-Functions" accesskey="n" rel="next">S/390 System z Built-in Functions</a>, Previous: <a href="PowerPC-Hardware-Transactional-Memory-Built_002din-Functions.html#PowerPC-Hardware-Transactional-Memory-Built_002din-Functions" accesskey="p" rel="prev">PowerPC Hardware Transactional Memory Built-in Functions</a>, Up: <a href="Target-Builtins.html#Target-Builtins" accesskey="u" rel="up">Target Builtins</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>
  187. </div>
  188. </body>
  189. </html>