Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

246 lines
13KB

  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-2020 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 6.5, http://www.gnu.org/software/texinfo/ -->
  18. <head>
  19. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  20. <title>Basic PowerPC Built-in Functions Available on ISA 3.0 (Using the GNU Compiler Collection (GCC))</title>
  21. <meta name="description" content="Basic PowerPC Built-in Functions Available on ISA 3.0 (Using the GNU Compiler Collection (GCC))">
  22. <meta name="keywords" content="Basic PowerPC Built-in Functions Available on ISA 3.0 (Using the GNU Compiler Collection (GCC))">
  23. <meta name="resource-type" content="document">
  24. <meta name="distribution" content="global">
  25. <meta name="Generator" content="makeinfo">
  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="Basic-PowerPC-Built_002din-Functions.html#Basic-PowerPC-Built_002din-Functions" rel="up" title="Basic PowerPC Built-in Functions">
  30. <link href="PowerPC-AltiVec_002fVSX-Built_002din-Functions.html#PowerPC-AltiVec_002fVSX-Built_002din-Functions" rel="next" title="PowerPC AltiVec/VSX Built-in Functions">
  31. <link href="Basic-PowerPC-Built_002din-Functions-Available-on-ISA-2_002e07.html#Basic-PowerPC-Built_002din-Functions-Available-on-ISA-2_002e07" rel="prev" title="Basic PowerPC Built-in Functions Available on ISA 2.07">
  32. <style type="text/css">
  33. <!--
  34. a.summary-letter {text-decoration: none}
  35. blockquote.indentedblock {margin-right: 0em}
  36. blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
  37. blockquote.smallquotation {font-size: smaller}
  38. div.display {margin-left: 3.2em}
  39. div.example {margin-left: 3.2em}
  40. div.lisp {margin-left: 3.2em}
  41. div.smalldisplay {margin-left: 3.2em}
  42. div.smallexample {margin-left: 3.2em}
  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.nolinebreak {white-space: nowrap}
  54. span.roman {font-family: initial; font-weight: normal}
  55. span.sansserif {font-family: sans-serif; font-weight: normal}
  56. ul.no-bullet {list-style: none}
  57. -->
  58. </style>
  59. </head>
  60. <body lang="en">
  61. <a name="Basic-PowerPC-Built_002din-Functions-Available-on-ISA-3_002e0"></a>
  62. <div class="header">
  63. <p>
  64. Previous: <a href="Basic-PowerPC-Built_002din-Functions-Available-on-ISA-2_002e07.html#Basic-PowerPC-Built_002din-Functions-Available-on-ISA-2_002e07" accesskey="p" rel="prev">Basic PowerPC Built-in Functions Available on ISA 2.07</a>, Up: <a href="Basic-PowerPC-Built_002din-Functions.html#Basic-PowerPC-Built_002din-Functions" accesskey="u" rel="up">Basic PowerPC Built-in Functions</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>
  65. </div>
  66. <hr>
  67. <a name="Basic-PowerPC-Built_002din-Functions-Available-on-ISA-3_002e0-1"></a>
  68. <h4 class="subsubsection">6.60.22.5 Basic PowerPC Built-in Functions Available on ISA 3.0</h4>
  69. <p>The basic built-in functions described in this section are
  70. available on the PowerPC family of processors starting with ISA 3.0
  71. or later. Unless specific options are explicitly disabled on the
  72. command line, specifying option <samp>-mcpu=power9</samp> has the effect of
  73. enabling all the same options as for <samp>-mcpu=power8</samp> in
  74. addition to the <samp>-misel</samp> option.
  75. </p>
  76. <p>The following built-in functions are available on Linux 64-bit systems
  77. that use the ISA 3.0 instruction set (<samp>-mcpu=power9</samp>):
  78. </p>
  79. <dl compact="compact">
  80. <dt><code>__float128 __builtin_addf128_round_to_odd (__float128, __float128)</code></dt>
  81. <dd><p>Perform a 128-bit IEEE floating point add using round to odd as the
  82. rounding mode.
  83. <a name="index-_005f_005fbuiltin_005faddf128_005fround_005fto_005fodd"></a>
  84. </p>
  85. </dd>
  86. <dt><code>__float128 __builtin_subf128_round_to_odd (__float128, __float128)</code></dt>
  87. <dd><p>Perform a 128-bit IEEE floating point subtract using round to odd as
  88. the rounding mode.
  89. <a name="index-_005f_005fbuiltin_005fsubf128_005fround_005fto_005fodd"></a>
  90. </p>
  91. </dd>
  92. <dt><code>__float128 __builtin_mulf128_round_to_odd (__float128, __float128)</code></dt>
  93. <dd><p>Perform a 128-bit IEEE floating point multiply using round to odd as
  94. the rounding mode.
  95. <a name="index-_005f_005fbuiltin_005fmulf128_005fround_005fto_005fodd"></a>
  96. </p>
  97. </dd>
  98. <dt><code>__float128 __builtin_divf128_round_to_odd (__float128, __float128)</code></dt>
  99. <dd><p>Perform a 128-bit IEEE floating point divide using round to odd as
  100. the rounding mode.
  101. <a name="index-_005f_005fbuiltin_005fdivf128_005fround_005fto_005fodd"></a>
  102. </p>
  103. </dd>
  104. <dt><code>__float128 __builtin_sqrtf128_round_to_odd (__float128)</code></dt>
  105. <dd><p>Perform a 128-bit IEEE floating point square root using round to odd
  106. as the rounding mode.
  107. <a name="index-_005f_005fbuiltin_005fsqrtf128_005fround_005fto_005fodd"></a>
  108. </p>
  109. </dd>
  110. <dt><code>__float128 __builtin_fmaf128_round_to_odd (__float128, __float128, __float128)</code></dt>
  111. <dd><p>Perform a 128-bit IEEE floating point fused multiply and add operation
  112. using round to odd as the rounding mode.
  113. <a name="index-_005f_005fbuiltin_005ffmaf128_005fround_005fto_005fodd"></a>
  114. </p>
  115. </dd>
  116. <dt><code>double __builtin_truncf128_round_to_odd (__float128)</code></dt>
  117. <dd><p>Convert a 128-bit IEEE floating point value to <code>double</code> using
  118. round to odd as the rounding mode.
  119. <a name="index-_005f_005fbuiltin_005ftruncf128_005fround_005fto_005fodd"></a>
  120. </p></dd>
  121. </dl>
  122. <p>The following additional built-in functions are also available for the
  123. PowerPC family of processors, starting with ISA 3.0 or later:
  124. </p><div class="smallexample">
  125. <pre class="smallexample">long long __builtin_darn (void);
  126. long long __builtin_darn_raw (void);
  127. int __builtin_darn_32 (void);
  128. </pre></div>
  129. <p>The <code>__builtin_darn</code> and <code>__builtin_darn_raw</code>
  130. functions require a
  131. 64-bit environment supporting ISA 3.0 or later.
  132. The <code>__builtin_darn</code> function provides a 64-bit conditioned
  133. random number. The <code>__builtin_darn_raw</code> function provides a
  134. 64-bit raw random number. The <code>__builtin_darn_32</code> function
  135. provides a 32-bit conditioned random number.
  136. </p>
  137. <p>The following additional built-in functions are also available for the
  138. PowerPC family of processors, starting with ISA 3.0 or later:
  139. </p>
  140. <div class="smallexample">
  141. <pre class="smallexample">int __builtin_byte_in_set (unsigned char u, unsigned long long set);
  142. int __builtin_byte_in_range (unsigned char u, unsigned int range);
  143. int __builtin_byte_in_either_range (unsigned char u, unsigned int ranges);
  144. int __builtin_dfp_dtstsfi_lt (unsigned int comparison, _Decimal64 value);
  145. int __builtin_dfp_dtstsfi_lt (unsigned int comparison, _Decimal128 value);
  146. int __builtin_dfp_dtstsfi_lt_dd (unsigned int comparison, _Decimal64 value);
  147. int __builtin_dfp_dtstsfi_lt_td (unsigned int comparison, _Decimal128 value);
  148. int __builtin_dfp_dtstsfi_gt (unsigned int comparison, _Decimal64 value);
  149. int __builtin_dfp_dtstsfi_gt (unsigned int comparison, _Decimal128 value);
  150. int __builtin_dfp_dtstsfi_gt_dd (unsigned int comparison, _Decimal64 value);
  151. int __builtin_dfp_dtstsfi_gt_td (unsigned int comparison, _Decimal128 value);
  152. int __builtin_dfp_dtstsfi_eq (unsigned int comparison, _Decimal64 value);
  153. int __builtin_dfp_dtstsfi_eq (unsigned int comparison, _Decimal128 value);
  154. int __builtin_dfp_dtstsfi_eq_dd (unsigned int comparison, _Decimal64 value);
  155. int __builtin_dfp_dtstsfi_eq_td (unsigned int comparison, _Decimal128 value);
  156. int __builtin_dfp_dtstsfi_ov (unsigned int comparison, _Decimal64 value);
  157. int __builtin_dfp_dtstsfi_ov (unsigned int comparison, _Decimal128 value);
  158. int __builtin_dfp_dtstsfi_ov_dd (unsigned int comparison, _Decimal64 value);
  159. int __builtin_dfp_dtstsfi_ov_td (unsigned int comparison, _Decimal128 value);
  160. double __builtin_mffsl(void);
  161. </pre></div>
  162. <p>The <code>__builtin_byte_in_set</code> function requires a
  163. 64-bit environment supporting ISA 3.0 or later. This function returns
  164. a non-zero value if and only if its <code>u</code> argument exactly equals one of
  165. the eight bytes contained within its 64-bit <code>set</code> argument.
  166. </p>
  167. <p>The <code>__builtin_byte_in_range</code> and
  168. <code>__builtin_byte_in_either_range</code> require an environment
  169. supporting ISA 3.0 or later. For these two functions, the
  170. <code>range</code> argument is encoded as 4 bytes, organized as
  171. <code>hi_1:lo_1:hi_2:lo_2</code>.
  172. The <code>__builtin_byte_in_range</code> function returns a
  173. non-zero value if and only if its <code>u</code> argument is within the
  174. range bounded between <code>lo_2</code> and <code>hi_2</code> inclusive.
  175. The <code>__builtin_byte_in_either_range</code> function returns non-zero if
  176. and only if its <code>u</code> argument is within either the range bounded
  177. between <code>lo_1</code> and <code>hi_1</code> inclusive or the range bounded
  178. between <code>lo_2</code> and <code>hi_2</code> inclusive.
  179. </p>
  180. <p>The <code>__builtin_dfp_dtstsfi_lt</code> function returns a non-zero value
  181. if and only if the number of signficant digits of its <code>value</code> argument
  182. is less than its <code>comparison</code> argument. The
  183. <code>__builtin_dfp_dtstsfi_lt_dd</code> and
  184. <code>__builtin_dfp_dtstsfi_lt_td</code> functions behave similarly, but
  185. require that the type of the <code>value</code> argument be
  186. <code>__Decimal64</code> and <code>__Decimal128</code> respectively.
  187. </p>
  188. <p>The <code>__builtin_dfp_dtstsfi_gt</code> function returns a non-zero value
  189. if and only if the number of signficant digits of its <code>value</code> argument
  190. is greater than its <code>comparison</code> argument. The
  191. <code>__builtin_dfp_dtstsfi_gt_dd</code> and
  192. <code>__builtin_dfp_dtstsfi_gt_td</code> functions behave similarly, but
  193. require that the type of the <code>value</code> argument be
  194. <code>__Decimal64</code> and <code>__Decimal128</code> respectively.
  195. </p>
  196. <p>The <code>__builtin_dfp_dtstsfi_eq</code> function returns a non-zero value
  197. if and only if the number of signficant digits of its <code>value</code> argument
  198. equals its <code>comparison</code> argument. The
  199. <code>__builtin_dfp_dtstsfi_eq_dd</code> and
  200. <code>__builtin_dfp_dtstsfi_eq_td</code> functions behave similarly, but
  201. require that the type of the <code>value</code> argument be
  202. <code>__Decimal64</code> and <code>__Decimal128</code> respectively.
  203. </p>
  204. <p>The <code>__builtin_dfp_dtstsfi_ov</code> function returns a non-zero value
  205. if and only if its <code>value</code> argument has an undefined number of
  206. significant digits, such as when <code>value</code> is an encoding of <code>NaN</code>.
  207. The <code>__builtin_dfp_dtstsfi_ov_dd</code> and
  208. <code>__builtin_dfp_dtstsfi_ov_td</code> functions behave similarly, but
  209. require that the type of the <code>value</code> argument be
  210. <code>__Decimal64</code> and <code>__Decimal128</code> respectively.
  211. </p>
  212. <p>The <code>__builtin_mffsl</code> uses the ISA 3.0 <code>mffsl</code> instruction to read
  213. the FPSCR. The instruction is a lower latency version of the <code>mffs</code>
  214. instruction. If the <code>mffsl</code> instruction is not available, then the
  215. builtin uses the older <code>mffs</code> instruction to read the FPSCR.
  216. </p>
  217. <hr>
  218. <div class="header">
  219. <p>
  220. Previous: <a href="Basic-PowerPC-Built_002din-Functions-Available-on-ISA-2_002e07.html#Basic-PowerPC-Built_002din-Functions-Available-on-ISA-2_002e07" accesskey="p" rel="prev">Basic PowerPC Built-in Functions Available on ISA 2.07</a>, Up: <a href="Basic-PowerPC-Built_002din-Functions.html#Basic-PowerPC-Built_002din-Functions" accesskey="u" rel="up">Basic PowerPC Built-in Functions</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>
  221. </div>
  222. </body>
  223. </html>