|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194 |
- <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
- <html>
- <!-- Copyright (C) 1988-2020 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 6.5, http://www.gnu.org/software/texinfo/ -->
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
- <title>Basic PowerPC Built-in Functions Available on ISA 2.05 (Using the GNU Compiler Collection (GCC))</title>
-
- <meta name="description" content="Basic PowerPC Built-in Functions Available on ISA 2.05 (Using the GNU Compiler Collection (GCC))">
- <meta name="keywords" content="Basic PowerPC Built-in Functions Available on ISA 2.05 (Using the GNU Compiler Collection (GCC))">
- <meta name="resource-type" content="document">
- <meta name="distribution" content="global">
- <meta name="Generator" content="makeinfo">
- <link href="index.html#Top" rel="start" title="Top">
- <link href="Option-Index.html#Option-Index" rel="index" title="Option Index">
- <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="prev" title="Basic PowerPC Built-in Functions Available on all Configurations">
- <style type="text/css">
- <!--
- a.summary-letter {text-decoration: none}
- blockquote.indentedblock {margin-right: 0em}
- blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
- blockquote.smallquotation {font-size: smaller}
- div.display {margin-left: 3.2em}
- div.example {margin-left: 3.2em}
- div.lisp {margin-left: 3.2em}
- div.smalldisplay {margin-left: 3.2em}
- div.smallexample {margin-left: 3.2em}
- 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.nolinebreak {white-space: nowrap}
- span.roman {font-family: initial; font-weight: normal}
- span.sansserif {font-family: sans-serif; font-weight: normal}
- ul.no-bullet {list-style: none}
- -->
- </style>
-
-
- </head>
-
- <body lang="en">
- <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="prev">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> [<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>
- </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="prev">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> [<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>
- </div>
-
-
-
- </body>
- </html>
|