You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35620 lines
1.1 MiB

<!--
Copyright (c) 2017 OpenPOWER Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<chapter version="5.0" xml:lang="en" xmlns="http://docbook.org/ns/docbook" xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="section_vec_intrinsics">
<!-- Chapter Title goes here. -->
<title>Vector Intrinsic Reference</title>
<para>Some front matter should go here, describing conventions
used throughout the chapter.</para>
<section>
<title>Built-In Vector Functions</title>
<para>Some front matter should go here, describing conventions
specific to this section.</para>
<?hard-pagebreak?>
<simplesect xml:id="vec_abs">
<title>vec_abs</title>
<subtitle>Vector Absolute Value</subtitle>
<programlisting>
r = vec_abs (a)
</programlisting>
<para><emphasis role="bold">Purpose:</emphasis>
Returns a vector <emphasis role="bold">r</emphasis> that contains the
absolute values of the contents of the given vector
<emphasis role="bold">a</emphasis>.
</para>
<para><emphasis role="bold">Result value:</emphasis>
The value of each element of <emphasis role="bold">r</emphasis> is the
absolute value of the corresponding element of
<emphasis role="bold">a</emphasis>. For integer vectors, the arithmetic
is modular.
</para>
<para><emphasis role="bold">Endian considerations:</emphasis>
None.
</para>
<table frame="all">
<title>Supported type signatures for vec_abs</title>
<tgroup cols="3">
<colspec colname="c1" colwidth="20*" />
<colspec colname="c2" colwidth="20*" />
<colspec colname="c3" colwidth="20*" />
<thead>
<row>
<entry align="center">
<para>
<emphasis role="bold">r</emphasis>
</para>
</entry>
<entry align="center">
<para>
<emphasis role="bold">a</emphasis>
</para>
</entry>
<entry align="center">
<para>
<emphasis role="bold">Example Implementation</emphasis>
</para>
</entry>
</row>
</thead>
<tbody>
<row>
<entry align="center" valign="middle">
<para>vector signed char</para>
</entry>
<entry align="center" valign="middle">
<para>vector signed char</para>
</entry>
<entry>
<programlisting>
vspltisw t,0
vsububm t,t,a
vmaxsb r,t,a
</programlisting>
</entry>
</row>
<row>
<entry align="center" valign="middle">
<para>vector signed short</para>
</entry>
<entry align="center" valign="middle">
<para>vector signed short</para>
</entry>
<entry>
<programlisting>
vspltisw t,0
vsubuhm t,t,a
vmaxsh r,t,a
</programlisting>
</entry>
</row>
<row>
<entry align="center" valign="middle">
<para>vector signed int</para>
</entry>
<entry align="center" valign="middle">
<para>vector signed int</para>
</entry>
<entry>
<programlisting>
vspltisw t,0
vsubuwm t,t,a
vmaxsw r,t,a
</programlisting>
</entry>
</row>
<row>
<entry align="center" valign="middle">
<para>vector signed long long</para>
</entry>
<entry align="center" valign="middle">
<para>vector signed long long</para>
</entry>
<entry>
<programlisting>
vspltisw t,0
vsubudm t,t,a
vmaxsd r,t,a
</programlisting>
</entry>
</row>
<row>
<entry align="center" valign="middle">
<para>vector float</para>
</entry>
<entry align="center" valign="middle">
<para>vector float</para>
</entry>
<entry>
<programlisting>
xvabssp r,a
</programlisting>
</entry>
</row>
<row>
<entry align="center" valign="middle">
<para>vector double</para>
</entry>
<entry align="center" valign="middle">
<para>vector double</para>
</entry>
<entry>
<programlisting>
xvabsdp r,a
</programlisting>
</entry>
</row>
</tbody>
</tgroup>
</table>
</simplesect>
<?hard-pagebreak?>
<simplesect xml:id="vec_absd">
<title>vec_absd</title>
<subtitle>Vector Absolute Difference</subtitle>
<programlisting>
r = vec_absd (a, b)
</programlisting>
<para><emphasis role="bold">Purpose:</emphasis>
Computes the absolute difference of two vectors.
</para>
<para><emphasis role="bold">Result value:</emphasis>
The value of each element of <emphasis role="bold">r</emphasis> is the
absolute difference of the corresponding elements of <emphasis
role="bold">a</emphasis> and <emphasis role="bold">b</emphasis>, using
modulo arithmetic.
</para>
<para><emphasis role="bold">Endian considerations:</emphasis>
None.
</para>
<table frame="all">
<title>Supported type signatures for vec_absd</title>
<tgroup cols="5">
<colspec colname="c1" colwidth="20*" />
<colspec colname="c2" colwidth="20*" />
<colspec colname="c3" colwidth="20*" />
<colspec colname="c4" colwidth="20*" />
<colspec colname="c5" colwidth="20*" />
<thead>
<row>
<entry align="center" valign="middle">
<para>
<emphasis role="bold">r</emphasis>
</para>
</entry>
<entry align="center" valign="middle">
<para>
<emphasis role="bold">a</emphasis>
</para>
</entry>
<entry align="center" valign="middle">
<para>
<emphasis role="bold">b</emphasis>
</para>
</entry>
<entry align="center" valign="middle">
<para>
<emphasis role="bold">Example Implementation</emphasis>
</para>
</entry>
<entry align="center" valign="middle">
<para>
<emphasis role="bold">Restrictions</emphasis>
</para>
</entry>
</row>
</thead>
<tbody>
<row>
<entry align="center" valign="middle">
<para>vector unsigned char</para>
</entry>
<entry align="center" valign="middle">
<para>vector unsigned char</para>
</entry>
<entry align="center" valign="middle">
<para>vector unsigned char</para>
</entry>
<entry>
<programlisting>
vabsdub r,a,b
</programlisting>
</entry>
<entry align="center" valign="middle">
<para>ISA 3.0 or later</para>
</entry>
</row>
<row>
<entry align="center" valign="middle">
<para>vector unsigned short</para>
</entry>
<entry align="center" valign="middle">
<para>vector unsigned short</para>
</entry>
<entry align="center" valign="middle">
<para>vector unsigned short</para>
</entry>
<entry>
<programlisting>
vabsduh r,a,b
</programlisting>
</entry>
<entry align="center" valign="middle">
<para>ISA 3.0 or later</para>
</entry>
</row>
<row>
<entry align="center" valign="middle">
<para>vector unsigned int</para>
</entry>
<entry align="center" valign="middle">
<para>vector unsigned int</para>
</entry>
<entry align="center" valign="middle">
<para>vector unsigned int</para>
</entry>
<entry>
<programlisting>
vabsduw r,a,b
</programlisting>
</entry>
<entry align="center" valign="middle">
<para>ISA 3.0 or later</para>
</entry>
</row>
</tbody>
</tgroup>
</table>
</simplesect>
<?hard-pagebreak?>
<simplesect xml:id="vec_abss">
<title>vec_abss</title>
<subtitle>Vector Absolute Value Saturated</subtitle>
<programlisting>
r = vec_abss (a)
</programlisting>
<para><emphasis role="bold">Purpose:</emphasis>
Returns a vector <emphasis role="bold">r</emphasis> that contains the
saturated absolute values of the contents of the given vector
<emphasis role="bold">a</emphasis>.
</para>
<para><emphasis role="bold">Result value:</emphasis>
The value of each element of <emphasis role="bold">r</emphasis> is the
saturated absolute value of the corresponding element of
<emphasis role="bold">a</emphasis>.
</para>
<para><emphasis role="bold">Endian considerations:</emphasis>
None.
</para>
<table frame="all">
<title>Supported type signatures for vec_abss</title>
<tgroup cols="3">
<colspec colname="c1" colwidth="20*" />
<colspec colname="c2" colwidth="20*" />
<colspec colname="c3" colwidth="20*" />
<thead>
<row>
<entry align="center">
<para>
<emphasis role="bold">r</emphasis>
</para>
</entry>
<entry align="center">
<para>
<emphasis role="bold">a</emphasis>
</para>
</entry>
<entry align="center">
<para>
<emphasis role="bold">Example Implementation</emphasis>
</para>
</entry>
</row>
</thead>
<tbody>
<row>
<entry align="center" valign="middle">
<para>vector signed char</para>
</entry>
<entry align="center" valign="middle">
<para>vector signed char</para>
</entry>
<entry>
<programlisting>
vspltisb t,0
vsubsbs t,t,a
vmaxsb r,t,a
</programlisting>
</entry>
</row>
<row>
<entry align="center" valign="middle">
<para>vector signed short</para>
</entry>
<entry align="center" valign="middle">
<para>vector signed short</para>
</entry>
<entry>
<programlisting>
vspltish t,0
vsubshs t,t,a
vmaxsh r,t,a
</programlisting>
</entry>
</row>
<row>
<entry align="center" valign="middle">
<para>vector signed int</para>
</entry>
<entry align="center" valign="middle">
<para>vector signed int</para>
</entry>
<entry>
<programlisting>
vspltisw t,0
vsubsws t,t,a
vmaxsw r,t,a
</programlisting>
</entry>
</row>
</tbody>
</tgroup>
</table>
</simplesect>
<?hard-pagebreak?>
<simplesect xml:id="vec_add">
<title>vec_add</title>
<subtitle>Vector Addition</subtitle>
<programlisting>
r = vec_add (a, b)
</programlisting>
<para><emphasis role="bold">Purpose:</emphasis>
Computes the sum of two vectors.
</para>
<para><emphasis role="bold">Result value:</emphasis>
The value of each element of <emphasis role="bold">r</emphasis> is the
sum of the corresponding elements of <emphasis
role="bold">a</emphasis> and <emphasis role="bold">b</emphasis>. Modular
arithmetic is used for both signed and unsigned integers.
</para>
<para><emphasis role="bold">Endian considerations:</emphasis>
None.
</para>
<table frame="all">
<title>Supported type signatures for vec_add</title>
<tgroup cols="4">
<colspec colname="c1" colwidth="20*" />
<colspec colname="c2" colwidth="20*" />
<colspec colname="c3" colwidth="20*" />
<colspec colname="c4" colwidth="20*" />
<thead>
<row>
<entry align="center" valign="middle">
<para>
<emphasis role="bold">r</emphasis>
</para>
</entry>
<entry align="center" valign="middle">
<para>
<emphasis role="bold">a</emphasis>
</para>
</entry>
<entry align="center" valign="middle">
<para>
<emphasis role="bold">b</emphasis>
</para>
</entry>
<entry align="center" valign="middle">
<para>
<emphasis role="bold">Example Implementation</emphasis>
</para>
</entry>
</row>
</thead>
<tbody>
<row>
<entry align="center" valign="middle">
<para>vector signed char</para>
</entry>
<entry align="center" valign="middle">
<para>vector signed char</para>
</entry>
<entry align="center" valign="middle">
<para>vector signed char</para>
</entry>
<entry>
<programlisting>
vaddubm r,a,b
</programlisting>
</entry>
</row>
<row>
<entry align="center" valign="middle">
<para>vector unsigned char</para>
</entry>
<entry align="center" valign="middle">
<para>vector unsigned char</para>
</entry>
<entry align="center" valign="middle">
<para>vector unsigned char</para>
</entry>
<entry>
<programlisting>
vaddubm r,a,b
</programlisting>
</entry>
</row>
<row>
<entry align="center" valign="middle">
<para>vector signed short</para>
</entry>
<entry align="center" valign="middle">
<para>vector signed short</para>
</entry>
<entry align="center" valign="middle">
<para>vector signed short</para>
</entry>
<entry>
<programlisting>
vadduhm r,a,b
</programlisting>
</entry>
</row>
<row>
<entry align="center" valign="middle">
<para>vector unsigned short</para>
</entry>
<entry align="center" valign="middle">
<para>vector unsigned short</para>
</entry>
<entry align="center" valign="middle">
<para>vector unsigned short</para>
</entry>
<entry>
<programlisting>
vadduhm r,a,b
</programlisting>
</entry>
</row>
<row>
<entry align="center" valign="middle">
<para>vector signed int</para>
</entry>
<entry align="center" valign="middle">
<para>vector signed int</para>
</entry>
<entry align="center" valign="middle">
<para>vector signed int</para>
</entry>
<entry>
<programlisting>
vadduwm r,a,b
</programlisting>
</entry>
</row>
<row>
<entry align="center" valign="middle">
<para>vector unsigned int</para>
</entry>
<entry align="center" valign="middle">
<para>vector unsigned int</para>
</entry>
<entry align="center" valign="middle">
<para>vector unsigned int</para>
</entry>
<entry>
<programlisting>
vadduwm r,a,b
</programlisting>
</entry>
</row>
<row>
<entry align="center" valign="middle">
<para>vector signed long long</para>
</entry>
<entry align="center" valign="middle">
<para>vector signed long long</para>
</entry>
<entry align="center" valign="middle">
<para>vector signed long long</para>
</entry>
<entry>
<programlisting>
vaddudm r,a,b
</programlisting>
</entry>
</row>
<row>
<entry align="center" valign="middle">
<para>vector unsigned long long</para>
</entry>
<entry align="center" valign="middle">
<para>vector unsigned long long</para>
</entry>
<entry align="center" valign="middle">
<para>vector unsigned long long</para>
</entry>
<entry>
<programlisting>
vaddudm r,a,b
</programlisting>
</entry>
</row>
<row>
<entry align="center" valign="middle">
<para>vector signed __int128</para>
</entry>
<entry align="center" valign="middle">
<para>vector signed __int128</para>
</entry>
<entry align="center" valign="middle">
<para>vector signed __int128</para>
</entry>
<entry>
<programlisting>
vadduqm r,a,b
</programlisting>
</entry>
</row>
<row>
<entry align="center" valign="middle">
<para>vector unsigned __int128</para>
</entry>
<entry align="center" valign="middle">
<para>vector unsigned __int128</para>
</entry>
<entry align="center" valign="middle">
<para>vector unsigned __int128</para>
</entry>
<entry>
<programlisting>
vadduqm r,a,b
</programlisting>
</entry>
</row>
<row>
<entry align="center" valign="middle">
<para>vector float</para>
</entry>
<entry align="center" valign="middle">
<para>vector float</para>
</entry>
<entry align="center" valign="middle">
<para>vector float</para>
</entry>
<entry>
<programlisting>
xvaddsp r,a,b
</programlisting>
</entry>
</row>
<row>
<entry align="center" valign="middle">
<para>vector double</para>
</entry>
<entry align="center" valign="middle">
<para>vector double</para>
</entry>
<entry align="center" valign="middle">
<para>vector double</para>
</entry>
<entry>
<programlisting>
xvadddp r,a,b
</programlisting>
</entry>
</row>
</tbody>
</tgroup>
</table>
</simplesect>
<?hard-pagebreak?>
<simplesect xml:id="vec_addc">
<title>vec_addc</title>
<subtitle>Vector Add Carrying</subtitle>
<programlisting>
r = vec_addc (a, b)
</programlisting>
<para><emphasis role="bold">Purpose:</emphasis>
Returns a vector of carry bits produced by adding two vectors.
</para>
<para><emphasis role="bold">Result value:</emphasis>
The value of each element of <emphasis role="bold">r</emphasis> is the
carry produced by adding the corresponding elements of <emphasis
role="bold">a</emphasis> and <emphasis role="bold">b</emphasis> (1
if there is a carry, 0 otherwise).
</para>
<para><emphasis role="bold">Endian considerations:</emphasis>
None.
</para>
<table frame="all">
<title>Supported type signatures for vec_addc</title>
<tgroup cols="4">
<colspec colname="c1" colwidth="20*" />
<colspec colname="c2" colwidth="20*" />
<colspec colname="c3" colwidth="20*" />
<colspec colname="c4" colwidth="20*" />
<thead>
<row>
<entry align="center" valign="middle">
<para>
<emphasis role="bold">r</emphasis>
</para>
</entry>
<entry align="center" valign="middle">
<para>
<emphasis role="bold">a</emphasis>
</para>
</entry>
<entry align="center" valign="middle">
<para>
<emphasis role="bold">b</emphasis>
</para>
</entry>
<entry align="center" valign="middle">
<para>
<emphasis role="bold">Example Implementation</emphasis>
</para>
</entry>
</row>
</thead>
<tbody>
<row>
<entry align="center" valign="middle">
<para>vector signed int</para>
</entry>
<entry align="center" valign="middle">
<para>vector signed int</para>
</entry>
<entry align="center" valign="middle">
<para>vector signed int</para>
</entry>
<entry>
<programlisting>
vaddcuw r,a,b
</programlisting>
</entry>
</row>
<row>
<entry align="center" valign="middle">
<para>vector unsigned int</para>
</entry>
<entry align="center" valign="middle">
<para>vector unsigned int</para>
</entry>
<entry align="center" valign="middle">
<para>vector unsigned int</para>
</entry>
<entry>
<programlisting>
vaddcuw r,a,b
</programlisting>
</entry>
</row>
<row>
<entry align="center" valign="middle">
<para>vector signed __int128</para>
</entry>
<entry align="center" valign="middle">
<para>vector signed __int128</para>
</entry>
<entry align="center" valign="middle">
<para>vector signed __int128</para>
</entry>
<entry>
<programlisting>
vaddcuq r,a,b
</programlisting>
</entry>
</row>
<row>
<entry align="center" valign="middle">
<para>vector unsigned __int128</para>
</entry>
<entry align="center" valign="middle">
<para>vector unsigned __int128</para>
</entry>
<entry align="center" valign="middle">
<para>vector unsigned __int128</para>
</entry>
<entry>
<programlisting>
vaddcuq r,a,b
</programlisting>
</entry>
</row>
</tbody>
</tgroup>
</table>
</simplesect>
<?hard-pagebreak?>
<simplesect xml:id="vec_adde">
<title>vec_adde</title>
<subtitle>Vector Add Extended</subtitle>
<programlisting>
r = vec_adde (a, b, c)
</programlisting>
<para><emphasis role="bold">Purpose:</emphasis>
Returns a vector formed as the sum of two vectors and a carry vector.
</para>
<para><emphasis role="bold">Result value:</emphasis>
The value of each element of <emphasis role="bold">r</emphasis> is
produced by adding the corresponding elements of <emphasis
role="bold">a</emphasis> and <emphasis role="bold">b</emphasis> with
a carry specified in the corresponding element of <emphasis
role="bold">c</emphasis> (1 if there is a carry, 0 otherwise).
</para>
<para><emphasis role="bold">Endian considerations:</emphasis>
None.
</para>
<table frame="all">
<title>Supported type signatures for vec_adde</title>
<tgroup cols="5">
<colspec colname="c1" colwidth="20*" />
<colspec colname="c2" colwidth="20*" />
<colspec colname="c3" colwidth="20*" />
<colspec colname="c4" colwidth="20*" />
<colspec colname="c5" colwidth="20*" />
<thead>
<row>
<entry align="center" valign="middle">
<para>
<emphasis role="bold">r</emphasis>
</para>
</entry>
<entry align="center" valign="middle">
<para>
<emphasis role="bold">a</emphasis>
</para>
</entry>
<entry align="center" valign="middle">
<para>
<emphasis role="bold">b</emphasis>
</para>
</entry>
<entry align="center" valign="middle">
<para>
<emphasis role="bold">c</emphasis>
</para>
</entry>
<entry align="center" valign="middle">
<para>
<emphasis role="bold">Example Implementation</emphasis>
</para>
</entry>
</row>
</thead>
<tbody>
<row>
<entry align="center" valign="middle">
<para>vector signed int</para>
</entry>
<entry align="center" valign="middle">
<para>vector signed int</para>
</entry>
<entry align="center" valign="middle">
<para>vector signed int</para>
</entry>
<entry align="center" valign="middle">
<para>vector signed int</para>
</entry>
<entry>
<programlisting>
vspltisw t,1
vadduwm r,a,b
xxland c,c,t
vadduwm r,r,c
</programlisting>
</entry>
</row>
<row>
<entry align="center" valign="middle">
<para>vector unsigned int</para>
</entry>
<entry align="center" valign="middle">
<para>vector unsigned int</para>
</entry>
<entry align="center" valign="middle">
<para>vector unsigned int</para>
</entry>
<entry align="center" valign="middle">
<para>vector unsigned int</para>
</entry>
<entry>
<programlisting>
vspltisw t,1
vadduwm r,a,b
xxland c,c,t
vadduwm r,r,c
</programlisting>
</entry>
</row>
<row>
<entry align="center" valign="middle">
<para>vector signed __int128</para>
</entry>
<entry align="center" valign="middle">
<para>vector signed __int128</para>
</entry>
<entry align="center" valign="middle">
<para>vector signed __int128</para>
</entry>
<entry align="center" valign="middle">
<para>vector signed __int128</para>
</entry>
<entry>
<programlisting>
vaddeuqm r,a,b,c
</programlisting>
</entry>
</row>
<row>
<entry align="center" valign="middle">
<para>vector unsigned __int128</para>
</entry>
<entry align="center" valign="middle">
<para>vector unsigned __int128</para>
</entry>
<entry align="center" valign="middle">
<para>vector unsigned __int128</para>
</entry>
<entry align="center" valign="middle">
<para>vector unsigned __int128</para>
</entry>
<entry>
<programlisting>
vaddeuqm r,a,b,c
</programlisting>
</entry>
</row>
</tbody>
</tgroup>
</table>
</simplesect>
<?hard-pagebreak?>
<simplesect xml:id="vec_addec">
<title>vec_addec</title>
<subtitle>Vector Add Extended Carrying</subtitle>
<programlisting>
r = vec_addec (a, b, c)
</programlisting>
<para><emphasis role="bold">Purpose:</emphasis>
Returns a vector of carry bits produced by adding two vectors and
a carry vector.
</para>
<para><emphasis role="bold">Result value:</emphasis>
The value of each element of <emphasis role="bold">r</emphasis> is
the carry produced by adding the corresponding elements of <emphasis
role="bold">a</emphasis> and <emphasis role="bold">b</emphasis> and
a carry specified in the corresponding element of <emphasis
role="bold">c</emphasis> (1 if there is a carry, 0 otherwise).
</para>
<para><emphasis role="bold">Endian considerations:</emphasis>
None.
</para>
<table frame="all">
<title>Supported type signatures for vec_addec</title>
<tgroup cols="5">
<colspec colname="c1" colwidth="20*" />
<colspec colname="c2" colwidth="20*" />
<colspec colname="c3" colwidth="20*" />
<colspec colname="c4" colwidth="20*" />
<colspec colname="c5" colwidth="20*" />
<thead>
<row>
<entry align="center" valign="middle">
<para>
<emphasis role="bold">r</emphasis>
</para>
</entry>
<entry align="center" valign="middle">
<para>
<emphasis role="bold">a</emphasis>
</para>
</entry>
<entry align="center" valign="middle">
<para>
<emphasis role="bold">b</emphasis>
</para>
</entry>
<entry align="center" valign="middle">
<para>
<emphasis role="bold">c</emphasis>
</para>
</entry>
<entry align="center" valign="middle">
<para>
<emphasis role="bold">Example Implementation</emphasis>
</para>
</entry>
</row>
</thead>
<tbody>
<row>
<entry align="center" valign="middle">
<para>vector signed int</para>
</entry>
<entry align="center" valign="middle">
<para>vector signed int</para>
</entry>
<entry align="center" valign="middle">
<para>vector signed int</para>
</entry>
<entry align="center" valign="middle">
<para>vector signed int</para>
</entry>
<entry>
<programlisting>
vspltisw t,1
xxland u,c,t
vadduwm v,a,b
vaddcuw w,a,b
vaddcuw x,v,u
xxlor r,w,x
</programlisting>
</entry>
</row>
<row>
<entry align="center" valign="middle">
<para>vector unsigned int</para>
</entry>
<entry align="center" valign="middle">
<para>vector unsigned int</para>
</entry>
<entry align="center" valign="middle">
<para>vector unsigned int</para>
</entry>
<entry align="center" valign="middle">
<para>vector unsigned int</para>
</entry>
<entry>
<programlisting>
vspltisw t,1
xxland u,c,t
vadduwm v,a,b
vaddcuw w,a,b
vaddcuw x,v,u
xxlor r,w,x
</programlisting>
</entry>
</row>
<row>
<entry align="center" valign="middle">
<para>vector signed __int128</para>
</entry>
<entry align="center" valign="middle">
<para>vector signed __int128</para>
</entry>
<entry align="center" valign="middle">
<para>vector signed __int128</para>
</entry>
<entry align="center" valign="middle">
<para>vector signed __int128</para>
</entry>
<entry>
<programlisting>
vaddecuq r,a,b,c
</programlisting>
</entry>
</row>
<row>
<entry align="center" valign="middle">
<para>vector unsigned __int128</para>
</entry>
<entry align="center" valign="middle">
<para>vector unsigned __int128</para>
</entry>
<entry align="center" valign="middle">
<para>vector unsigned __int128</para>
</entry>
<entry align="center" valign="middle">
<para>vector unsigned __int128</para>
</entry>
<entry>
<programlisting>
vaddecuq r,a,b,c
</programlisting>
</entry>
</row>
</tbody>
</tgroup>
</table>
</simplesect>
<?hard-pagebreak?>
<simplesect xml:id="vec_adds">
<title>vec_adds</title>
<subtitle>Vector Add Saturating</subtitle>
<programlisting>
r = vec_adds (a, b)
</programlisting>
<para><emphasis role="bold">Purpose:</emphasis>
Computes the saturated sum of two vectors.
</para>
<para><emphasis role="bold">Result value:</emphasis>
The value of each element of <emphasis role="bold">r</emphasis> is the
saturated sum of the corresponding elements of <emphasis
role="bold">a</emphasis> and <emphasis role="bold">b</emphasis>.
</para>
<para><emphasis role="bold">Endian considerations:</emphasis>
None.
</para>
<table frame="all">
<title>Supported type signatures for vec_adds</title>
<tgroup cols="4">
<colspec colname="c1" colwidth="20*" />
<colspec colname="c2" colwidth="20*" />
<colspec colname="c3" colwidth="20*" />
<colspec colname="c4" colwidth="20*" />
<thead>
<row>
<entry align="center" valign="middle">
<para>
<emphasis role="bold">r</emphasis>
</para>
</entry>
<entry align="center" valign="middle">
<para>
<emphasis role="bold">a</emphasis>
</para>
</entry>
<entry align="center" valign="middle">
<para>
<emphasis role="bold">b</emphasis>
</para>
</entry>
<entry align="center" valign="middle">
<para>
<emphasis role="bold">Example Implementation</emphasis>
</para>
</entry>
</row>
</thead>
<tbody>
<row>
<entry align="center" valign="middle">
<para>vector signed char</para>
</entry>
<entry align="center" valign="middle">
<para>vector signed char</para>
</entry>
<entry align="center" valign="middle">
<para>vector signed char</para>
</entry>
<entry>
<programlisting>
vaddsbs r,a,b
</programlisting>
</entry>
</row>
<row>
<entry align="center" valign="middle">
<para>vector unsigned char</para>
</entry>
<entry align="center" valign="middle">
<para>vector unsigned char</para>
</entry>
<entry align="center" valign="middle">
<para>vector unsigned char</para>
</entry>
<entry>
<programlisting>
vaddubs r,a,b
</programlisting>
</entry>
</row>
<row>
<entry align="center" valign="middle">
<para>vector signed short</para>
</entry>
<entry align="center" valign="middle">
<para>vector signed short</para>
</entry>
<entry align="center" valign="middle">
<para>vector signed short</para>
</entry>
<entry>
<programlisting>
vaddshs r,a,b
</programlisting>
</entry>
</row>
<row>
<entry align="center" valign="middle">
<para>vector unsigned short</para>
</entry>
<entry align="center" valign="middle">
<para>vector unsigned short</para>
</entry>