選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

182 行
8.1KB

  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>Paired-Single Built-in Functions (Using the GNU Compiler Collection (GCC))</title>
  21. <meta name="description" content="Paired-Single Built-in Functions (Using the GNU Compiler Collection (GCC))">
  22. <meta name="keywords" content="Paired-Single Built-in Functions (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="MIPS-Loongson-Built_002din-Functions.html#MIPS-Loongson-Built_002din-Functions" rel="up" title="MIPS Loongson Built-in Functions">
  30. <link href="MIPS_002d3D-Built_002din-Functions.html#MIPS_002d3D-Built_002din-Functions" rel="next" title="MIPS-3D Built-in Functions">
  31. <link href="Paired_002dSingle-Arithmetic.html#Paired_002dSingle-Arithmetic" rel="prev" title="Paired-Single Arithmetic">
  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="Paired_002dSingle-Built_002din-Functions"></a>
  62. <div class="header">
  63. <p>
  64. Next: <a href="MIPS_002d3D-Built_002din-Functions.html#MIPS_002d3D-Built_002din-Functions" accesskey="n" rel="next">MIPS-3D Built-in Functions</a>, Previous: <a href="Paired_002dSingle-Arithmetic.html#Paired_002dSingle-Arithmetic" accesskey="p" rel="prev">Paired-Single Arithmetic</a>, Up: <a href="MIPS-Loongson-Built_002din-Functions.html#MIPS-Loongson-Built_002din-Functions" accesskey="u" rel="up">MIPS Loongson 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="Paired_002dSingle-Built_002din-Functions-1"></a>
  68. <h4 class="subsubsection">6.60.16.2 Paired-Single Built-in Functions</h4>
  69. <p>The following paired-single functions map directly to a particular
  70. MIPS instruction. Please refer to the architecture specification
  71. for details on what each instruction does.
  72. </p>
  73. <dl compact="compact">
  74. <dt><code>v2sf __builtin_mips_pll_ps (v2sf, v2sf)</code></dt>
  75. <dd><p>Pair lower lower (<code>pll.ps</code>).
  76. </p>
  77. </dd>
  78. <dt><code>v2sf __builtin_mips_pul_ps (v2sf, v2sf)</code></dt>
  79. <dd><p>Pair upper lower (<code>pul.ps</code>).
  80. </p>
  81. </dd>
  82. <dt><code>v2sf __builtin_mips_plu_ps (v2sf, v2sf)</code></dt>
  83. <dd><p>Pair lower upper (<code>plu.ps</code>).
  84. </p>
  85. </dd>
  86. <dt><code>v2sf __builtin_mips_puu_ps (v2sf, v2sf)</code></dt>
  87. <dd><p>Pair upper upper (<code>puu.ps</code>).
  88. </p>
  89. </dd>
  90. <dt><code>v2sf __builtin_mips_cvt_ps_s (float, float)</code></dt>
  91. <dd><p>Convert pair to paired single (<code>cvt.ps.s</code>).
  92. </p>
  93. </dd>
  94. <dt><code>float __builtin_mips_cvt_s_pl (v2sf)</code></dt>
  95. <dd><p>Convert pair lower to single (<code>cvt.s.pl</code>).
  96. </p>
  97. </dd>
  98. <dt><code>float __builtin_mips_cvt_s_pu (v2sf)</code></dt>
  99. <dd><p>Convert pair upper to single (<code>cvt.s.pu</code>).
  100. </p>
  101. </dd>
  102. <dt><code>v2sf __builtin_mips_abs_ps (v2sf)</code></dt>
  103. <dd><p>Absolute value (<code>abs.ps</code>).
  104. </p>
  105. </dd>
  106. <dt><code>v2sf __builtin_mips_alnv_ps (v2sf, v2sf, int)</code></dt>
  107. <dd><p>Align variable (<code>alnv.ps</code>).
  108. </p>
  109. <p><em>Note:</em> The value of the third parameter must be 0 or 4
  110. modulo 8, otherwise the result is unpredictable. Please read the
  111. instruction description for details.
  112. </p></dd>
  113. </dl>
  114. <p>The following multi-instruction functions are also available.
  115. In each case, <var>cond</var> can be any of the 16 floating-point conditions:
  116. <code>f</code>, <code>un</code>, <code>eq</code>, <code>ueq</code>, <code>olt</code>, <code>ult</code>,
  117. <code>ole</code>, <code>ule</code>, <code>sf</code>, <code>ngle</code>, <code>seq</code>, <code>ngl</code>,
  118. <code>lt</code>, <code>nge</code>, <code>le</code> or <code>ngt</code>.
  119. </p>
  120. <dl compact="compact">
  121. <dt><code>v2sf __builtin_mips_movt_c_<var>cond</var>_ps (v2sf <var>a</var>, v2sf <var>b</var>, v2sf <var>c</var>, v2sf <var>d</var>)</code></dt>
  122. <dt><code>v2sf __builtin_mips_movf_c_<var>cond</var>_ps (v2sf <var>a</var>, v2sf <var>b</var>, v2sf <var>c</var>, v2sf <var>d</var>)</code></dt>
  123. <dd><p>Conditional move based on floating-point comparison (<code>c.<var>cond</var>.ps</code>,
  124. <code>movt.ps</code>/<code>movf.ps</code>).
  125. </p>
  126. <p>The <code>movt</code> functions return the value <var>x</var> computed by:
  127. </p>
  128. <div class="smallexample">
  129. <pre class="smallexample">c.<var>cond</var>.ps <var>cc</var>,<var>a</var>,<var>b</var>
  130. mov.ps <var>x</var>,<var>c</var>
  131. movt.ps <var>x</var>,<var>d</var>,<var>cc</var>
  132. </pre></div>
  133. <p>The <code>movf</code> functions are similar but use <code>movf.ps</code> instead
  134. of <code>movt.ps</code>.
  135. </p>
  136. </dd>
  137. <dt><code>int __builtin_mips_upper_c_<var>cond</var>_ps (v2sf <var>a</var>, v2sf <var>b</var>)</code></dt>
  138. <dt><code>int __builtin_mips_lower_c_<var>cond</var>_ps (v2sf <var>a</var>, v2sf <var>b</var>)</code></dt>
  139. <dd><p>Comparison of two paired-single values (<code>c.<var>cond</var>.ps</code>,
  140. <code>bc1t</code>/<code>bc1f</code>).
  141. </p>
  142. <p>These functions compare <var>a</var> and <var>b</var> using <code>c.<var>cond</var>.ps</code>
  143. and return either the upper or lower half of the result. For example:
  144. </p>
  145. <div class="smallexample">
  146. <pre class="smallexample">v2sf a, b;
  147. if (__builtin_mips_upper_c_eq_ps (a, b))
  148. upper_halves_are_equal ();
  149. else
  150. upper_halves_are_unequal ();
  151. if (__builtin_mips_lower_c_eq_ps (a, b))
  152. lower_halves_are_equal ();
  153. else
  154. lower_halves_are_unequal ();
  155. </pre></div>
  156. </dd>
  157. </dl>
  158. <hr>
  159. <div class="header">
  160. <p>
  161. Next: <a href="MIPS_002d3D-Built_002din-Functions.html#MIPS_002d3D-Built_002din-Functions" accesskey="n" rel="next">MIPS-3D Built-in Functions</a>, Previous: <a href="Paired_002dSingle-Arithmetic.html#Paired_002dSingle-Arithmetic" accesskey="p" rel="prev">Paired-Single Arithmetic</a>, Up: <a href="MIPS-Loongson-Built_002din-Functions.html#MIPS-Loongson-Built_002din-Functions" accesskey="u" rel="up">MIPS Loongson 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>
  162. </div>
  163. </body>
  164. </html>