summaryrefslogtreecommitdiff
path: root/share/doc/gcc/Basic-PowerPC-Built_002din-Functions-Available-on-ISA-2_002e05.html
diff options
context:
space:
mode:
Diffstat (limited to 'share/doc/gcc/Basic-PowerPC-Built_002din-Functions-Available-on-ISA-2_002e05.html')
-rw-r--r--share/doc/gcc/Basic-PowerPC-Built_002din-Functions-Available-on-ISA-2_002e05.html197
1 files changed, 197 insertions, 0 deletions
diff --git a/share/doc/gcc/Basic-PowerPC-Built_002din-Functions-Available-on-ISA-2_002e05.html b/share/doc/gcc/Basic-PowerPC-Built_002din-Functions-Available-on-ISA-2_002e05.html
new file mode 100644
index 0000000..5a8f618
--- /dev/null
+++ b/share/doc/gcc/Basic-PowerPC-Built_002din-Functions-Available-on-ISA-2_002e05.html
@@ -0,0 +1,197 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<!-- This file documents the use of the GNU compilers.
+
+Copyright (C) 1988-2023 Free Software Foundation, Inc.
+
+Permission is granted to copy, distribute and/or modify this document
+under the terms of the GNU Free Documentation License, Version 1.3 or
+any later version published by the Free Software Foundation; with the
+Invariant Sections being "Funding Free Software", the Front-Cover
+Texts being (a) (see below), and with the Back-Cover Texts being (b)
+(see below). A copy of the license is included in the section entitled
+"GNU Free Documentation License".
+
+(a) The FSF's Front-Cover Text is:
+
+A GNU Manual
+
+(b) The FSF's Back-Cover Text is:
+
+You have freedom to copy and modify this GNU Manual, like GNU
+ software. Copies published by the Free Software Foundation raise
+ funds for GNU development. -->
+<!-- Created by GNU Texinfo 5.1, http://www.gnu.org/software/texinfo/ -->
+<head>
+<title>Using the GNU Compiler Collection (GCC): Basic PowerPC Built-in Functions Available on ISA 2.05</title>
+
+<meta name="description" content="Using the GNU Compiler Collection (GCC): Basic PowerPC Built-in Functions Available on ISA 2.05">
+<meta name="keywords" content="Using the GNU Compiler Collection (GCC): Basic PowerPC Built-in Functions Available on ISA 2.05">
+<meta name="resource-type" content="document">
+<meta name="distribution" content="global">
+<meta name="Generator" content="makeinfo">
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<link href="index.html#Top" rel="start" title="Top">
+<link href="Indices.html#Indices" rel="index" title="Indices">
+<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
+<link href="Basic-PowerPC-Built_002din-Functions.html#Basic-PowerPC-Built_002din-Functions" rel="up" title="Basic PowerPC Built-in Functions">
+<link href="Basic-PowerPC-Built_002din-Functions-Available-on-ISA-2_002e06.html#Basic-PowerPC-Built_002din-Functions-Available-on-ISA-2_002e06" rel="next" title="Basic PowerPC Built-in Functions Available on ISA 2.06">
+<link href="Basic-PowerPC-Built_002din-Functions-Available-on-all-Configurations.html#Basic-PowerPC-Built_002din-Functions-Available-on-all-Configurations" rel="previous" title="Basic PowerPC Built-in Functions Available on all Configurations">
+<style type="text/css">
+<!--
+a.summary-letter {text-decoration: none}
+blockquote.smallquotation {font-size: smaller}
+div.display {margin-left: 3.2em}
+div.example {margin-left: 3.2em}
+div.indentedblock {margin-left: 3.2em}
+div.lisp {margin-left: 3.2em}
+div.smalldisplay {margin-left: 3.2em}
+div.smallexample {margin-left: 3.2em}
+div.smallindentedblock {margin-left: 3.2em; font-size: smaller}
+div.smalllisp {margin-left: 3.2em}
+kbd {font-style:oblique}
+pre.display {font-family: inherit}
+pre.format {font-family: inherit}
+pre.menu-comment {font-family: serif}
+pre.menu-preformatted {font-family: serif}
+pre.smalldisplay {font-family: inherit; font-size: smaller}
+pre.smallexample {font-size: smaller}
+pre.smallformat {font-family: inherit; font-size: smaller}
+pre.smalllisp {font-size: smaller}
+span.nocodebreak {white-space:nowrap}
+span.nolinebreak {white-space:nowrap}
+span.roman {font-family:serif; font-weight:normal}
+span.sansserif {font-family:sans-serif; font-weight:normal}
+ul.no-bullet {list-style: none}
+-->
+</style>
+
+
+</head>
+
+<body lang="en_US" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
+<a name="Basic-PowerPC-Built_002din-Functions-Available-on-ISA-2_002e05"></a>
+<div class="header">
+<p>
+Next: <a href="Basic-PowerPC-Built_002din-Functions-Available-on-ISA-2_002e06.html#Basic-PowerPC-Built_002din-Functions-Available-on-ISA-2_002e06" accesskey="n" rel="next">Basic PowerPC Built-in Functions Available on ISA 2.06</a>, Previous: <a href="Basic-PowerPC-Built_002din-Functions-Available-on-all-Configurations.html#Basic-PowerPC-Built_002din-Functions-Available-on-all-Configurations" accesskey="p" rel="previous">Basic PowerPC Built-in Functions Available on all Configurations</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="Indices.html#Indices" title="Index" rel="index">Index</a>]</p>
+</div>
+<hr>
+<a name="Basic-PowerPC-Built_002din-Functions-Available-on-ISA-2_002e05-1"></a>
+<h4 class="subsubsection">6.60.22.2 Basic PowerPC Built-in Functions Available on ISA 2.05</h4>
+
+<p>The basic built-in functions described in this section are
+available on the PowerPC family of processors starting with ISA 2.05
+or later. Unless specific options are explicitly disabled on the
+command line, specifying option <samp>-mcpu=power6</samp> has the effect of
+enabling the <samp>-mpowerpc64</samp>, <samp>-mpowerpc-gpopt</samp>,
+<samp>-mpowerpc-gfxopt</samp>, <samp>-mmfcrf</samp>, <samp>-mpopcntb</samp>,
+<samp>-mfprnd</samp>, <samp>-mcmpb</samp>, <samp>-mhard-dfp</samp>, and
+<samp>-mrecip-precision</samp> options. Specify the
+<samp>-maltivec</samp> option explicitly in
+combination with the above options if desired.
+</p>
+<p>The following functions require option <samp>-mcmpb</samp>.
+</p><div class="smallexample">
+<pre class="smallexample">unsigned long long __builtin_cmpb (unsigned long long int, unsigned long long int);
+unsigned int __builtin_cmpb (unsigned int, unsigned int);
+</pre></div>
+
+<p>The <code>__builtin_cmpb</code> function
+performs a byte-wise compare on the contents of its two arguments,
+returning the result of the byte-wise comparison as the returned
+value. For each byte comparison, the corresponding byte of the return
+value holds 0xff if the input bytes are equal and 0 if the input bytes
+are not equal. If either of the arguments to this built-in function
+is wider than 32 bits, the function call expands into the form that
+expects <code>unsigned long long int</code> arguments
+which is only available on 64-bit targets.
+</p>
+<p>The following built-in functions are available
+when hardware decimal floating point
+(<samp>-mhard-dfp</samp>) is available:
+</p><div class="smallexample">
+<pre class="smallexample">void __builtin_set_fpscr_drn(int);
+_Decimal64 __builtin_ddedpd (int, _Decimal64);
+_Decimal128 __builtin_ddedpdq (int, _Decimal128);
+_Decimal64 __builtin_denbcd (int, _Decimal64);
+_Decimal128 __builtin_denbcdq (int, _Decimal128);
+_Decimal64 __builtin_diex (long long, _Decimal64);
+_Decimal128 _builtin_diexq (long long, _Decimal128);
+_Decimal64 __builtin_dscli (_Decimal64, int);
+_Decimal128 __builtin_dscliq (_Decimal128, int);
+_Decimal64 __builtin_dscri (_Decimal64, int);
+_Decimal128 __builtin_dscriq (_Decimal128, int);
+long long __builtin_dxex (_Decimal64);
+long long __builtin_dxexq (_Decimal128);
+_Decimal128 __builtin_pack_dec128 (unsigned long long, unsigned long long);
+unsigned long long __builtin_unpack_dec128 (_Decimal128, int);
+
+The <code>__builtin_set_fpscr_drn</code> builtin allows changing the three decimal
+floating point rounding mode bits. The argument is a 3-bit value. The
+argument can either be a <code>const int</code> or the value can be stored in
+a variable.
+The builtin uses the ISA 3.0 instruction <code>mffscdrn</code> if available.
+Otherwise the builtin reads the FPSCR, masks the current decimal rounding
+mode bits out and OR's in the new value.
+
+</pre></div>
+
+<p>The following functions require <samp>-mhard-float</samp>,
+<samp>-mpowerpc-gfxopt</samp>, and <samp>-mpopcntb</samp> options.
+</p>
+<div class="smallexample">
+<pre class="smallexample">double __builtin_recipdiv (double, double);
+float __builtin_recipdivf (float, float);
+double __builtin_rsqrt (double);
+float __builtin_rsqrtf (float);
+</pre></div>
+
+<p>The <code>vec_rsqrt</code>, <code>__builtin_rsqrt</code>, and
+<code>__builtin_rsqrtf</code> functions generate multiple instructions to
+implement the reciprocal sqrt functionality using reciprocal sqrt
+estimate instructions.
+</p>
+<p>The <code>__builtin_recipdiv</code>, and <code>__builtin_recipdivf</code>
+functions generate multiple instructions to implement division using
+the reciprocal estimate instructions.
+</p>
+<p>The following functions require <samp>-mhard-float</samp> and
+<samp>-mmultiple</samp> options.
+</p>
+<p>The <code>__builtin_unpack_longdouble</code> function takes a
+<code>long double</code> argument and a compile time constant of 0 or 1. If
+the constant is 0, the first <code>double</code> within the
+<code>long double</code> is returned, otherwise the second <code>double</code>
+is returned. The <code>__builtin_unpack_longdouble</code> function is only
+available if <code>long double</code> uses the IBM extended double
+representation.
+</p>
+<p>The <code>__builtin_pack_longdouble</code> function takes two <code>double</code>
+arguments and returns a <code>long double</code> value that combines the two
+arguments. The <code>__builtin_pack_longdouble</code> function is only
+available if <code>long double</code> uses the IBM extended double
+representation.
+</p>
+<p>The <code>__builtin_unpack_ibm128</code> function takes a <code>__ibm128</code>
+argument and a compile time constant of 0 or 1. If the constant is 0,
+the first <code>double</code> within the <code>__ibm128</code> is returned,
+otherwise the second <code>double</code> is returned.
+</p>
+<p>The <code>__builtin_pack_ibm128</code> function takes two <code>double</code>
+arguments and returns a <code>__ibm128</code> value that combines the two
+arguments.
+</p>
+<p>Additional built-in functions are available for the 64-bit PowerPC
+family of processors, for efficient use of 128-bit floating point
+(<code>__float128</code>) values.
+</p>
+<hr>
+<div class="header">
+<p>
+Next: <a href="Basic-PowerPC-Built_002din-Functions-Available-on-ISA-2_002e06.html#Basic-PowerPC-Built_002din-Functions-Available-on-ISA-2_002e06" accesskey="n" rel="next">Basic PowerPC Built-in Functions Available on ISA 2.06</a>, Previous: <a href="Basic-PowerPC-Built_002din-Functions-Available-on-all-Configurations.html#Basic-PowerPC-Built_002din-Functions-Available-on-all-Configurations" accesskey="p" rel="previous">Basic PowerPC Built-in Functions Available on all Configurations</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="Indices.html#Indices" title="Index" rel="index">Index</a>]</p>
+</div>
+
+
+
+</body>
+</html>