blob: a225378c3062d362ad2bd98f69d042af9ca5f657 [file] [log] [blame]
/*===---- altivec.h - Standard header for type generic math ---------------===*\
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
\*===----------------------------------------------------------------------===*/
#ifndef __ALTIVEC_H
#define __ALTIVEC_H
#ifndef __ALTIVEC__
#error "AltiVec support not enabled"
#endif
/* constants for mapping CR6 bits to predicate result. */
#define __CR6_EQ 0
#define __CR6_EQ_REV 1
#define __CR6_LT 2
#define __CR6_LT_REV 3
#define __ATTRS_o_ai __attribute__((__overloadable__, __always_inline__))
static vector signed char __ATTRS_o_ai
vec_perm(vector signed char a, vector signed char b, vector unsigned char c);
static vector unsigned char __ATTRS_o_ai
vec_perm(vector unsigned char a,
vector unsigned char b,
vector unsigned char c);
static vector bool char __ATTRS_o_ai
vec_perm(vector bool char a, vector bool char b, vector unsigned char c);
static vector short __ATTRS_o_ai
vec_perm(vector short a, vector short b, vector unsigned char c);
static vector unsigned short __ATTRS_o_ai
vec_perm(vector unsigned short a,
vector unsigned short b,
vector unsigned char c);
static vector bool short __ATTRS_o_ai
vec_perm(vector bool short a, vector bool short b, vector unsigned char c);
static vector pixel __ATTRS_o_ai
vec_perm(vector pixel a, vector pixel b, vector unsigned char c);
static vector int __ATTRS_o_ai
vec_perm(vector int a, vector int b, vector unsigned char c);
static vector unsigned int __ATTRS_o_ai
vec_perm(vector unsigned int a, vector unsigned int b, vector unsigned char c);
static vector bool int __ATTRS_o_ai
vec_perm(vector bool int a, vector bool int b, vector unsigned char c);
static vector float __ATTRS_o_ai
vec_perm(vector float a, vector float b, vector unsigned char c);
/* vec_abs */
#define __builtin_altivec_abs_v16qi vec_abs
#define __builtin_altivec_abs_v8hi vec_abs
#define __builtin_altivec_abs_v4si vec_abs
static vector signed char __ATTRS_o_ai
vec_abs(vector signed char a)
{
return __builtin_altivec_vmaxsb(a, -a);
}
static vector signed short __ATTRS_o_ai
vec_abs(vector signed short a)
{
return __builtin_altivec_vmaxsh(a, -a);
}
static vector signed int __ATTRS_o_ai
vec_abs(vector signed int a)
{
return __builtin_altivec_vmaxsw(a, -a);
}
static vector float __ATTRS_o_ai
vec_abs(vector float a)
{
vector unsigned int res = (vector unsigned int)a
& (vector unsigned int)(0x7FFFFFFF);
return (vector float)res;
}
/* vec_abss */
#define __builtin_altivec_abss_v16qi vec_abss
#define __builtin_altivec_abss_v8hi vec_abss
#define __builtin_altivec_abss_v4si vec_abss
static vector signed char __ATTRS_o_ai
vec_abss(vector signed char a)
{
return __builtin_altivec_vmaxsb
(a, __builtin_altivec_vsubsbs((vector signed char)(0), a));
}
static vector signed short __ATTRS_o_ai
vec_abss(vector signed short a)
{
return __builtin_altivec_vmaxsh
(a, __builtin_altivec_vsubshs((vector signed short)(0), a));
}
static vector signed int __ATTRS_o_ai
vec_abss(vector signed int a)
{
return __builtin_altivec_vmaxsw
(a, __builtin_altivec_vsubsws((vector signed int)(0), a));
}
/* vec_add */
static vector signed char __ATTRS_o_ai
vec_add(vector signed char a, vector signed char b)
{
return a + b;
}
static vector signed char __ATTRS_o_ai
vec_add(vector bool char a, vector signed char b)
{
return (vector signed char)a + b;
}
static vector signed char __ATTRS_o_ai
vec_add(vector signed char a, vector bool char b)
{
return a + (vector signed char)b;
}
static vector unsigned char __ATTRS_o_ai
vec_add(vector unsigned char a, vector unsigned char b)
{
return a + b;
}
static vector unsigned char __ATTRS_o_ai
vec_add(vector bool char a, vector unsigned char b)
{
return (vector unsigned char)a + b;
}
static vector unsigned char __ATTRS_o_ai
vec_add(vector unsigned char a, vector bool char b)
{
return a + (vector unsigned char)b;
}
static vector short __ATTRS_o_ai
vec_add(vector short a, vector short b)
{
return a + b;
}
static vector short __ATTRS_o_ai
vec_add(vector bool short a, vector short b)
{
return (vector short)a + b;
}
static vector short __ATTRS_o_ai
vec_add(vector short a, vector bool short b)
{
return a + (vector short)b;
}
static vector unsigned short __ATTRS_o_ai
vec_add(vector unsigned short a, vector unsigned short b)
{
return a + b;
}
static vector unsigned short __ATTRS_o_ai
vec_add(vector bool short a, vector unsigned short b)
{
return (vector unsigned short)a + b;
}
static vector unsigned short __ATTRS_o_ai
vec_add(vector unsigned short a, vector bool short b)
{
return a + (vector unsigned short)b;
}
static vector int __ATTRS_o_ai
vec_add(vector int a, vector int b)
{
return a + b;
}
static vector int __ATTRS_o_ai
vec_add(vector bool int a, vector int b)
{
return (vector int)a + b;
}
static vector int __ATTRS_o_ai
vec_add(vector int a, vector bool int b)
{
return a + (vector int)b;
}
static vector unsigned int __ATTRS_o_ai
vec_add(vector unsigned int a, vector unsigned int b)
{
return a + b;
}
static vector unsigned int __ATTRS_o_ai
vec_add(vector bool int a, vector unsigned int b)
{
return (vector unsigned int)a + b;
}
static vector unsigned int __ATTRS_o_ai
vec_add(vector unsigned int a, vector bool int b)
{
return a + (vector unsigned int)b;
}
static vector float __ATTRS_o_ai
vec_add(vector float a, vector float b)
{
return a + b;
}
/* vec_vaddubm */
#define __builtin_altivec_vaddubm vec_vaddubm
static vector signed char __ATTRS_o_ai
vec_vaddubm(vector signed char a, vector signed char b)
{
return a + b;
}
static vector signed char __ATTRS_o_ai
vec_vaddubm(vector bool char a, vector signed char b)
{
return (vector signed char)a + b;
}
static vector signed char __ATTRS_o_ai
vec_vaddubm(vector signed char a, vector bool char b)
{
return a + (vector signed char)b;
}
static vector unsigned char __ATTRS_o_ai
vec_vaddubm(vector unsigned char a, vector unsigned char b)
{
return a + b;
}
static vector unsigned char __ATTRS_o_ai
vec_vaddubm(vector bool char a, vector unsigned char b)
{
return (vector unsigned char)a + b;
}
static vector unsigned char __ATTRS_o_ai
vec_vaddubm(vector unsigned char a, vector bool char b)
{
return a + (vector unsigned char)b;
}
/* vec_vadduhm */
#define __builtin_altivec_vadduhm vec_vadduhm
static vector short __ATTRS_o_ai
vec_vadduhm(vector short a, vector short b)
{
return a + b;
}
static vector short __ATTRS_o_ai
vec_vadduhm(vector bool short a, vector short b)
{
return (vector short)a + b;
}
static vector short __ATTRS_o_ai
vec_vadduhm(vector short a, vector bool short b)
{
return a + (vector short)b;
}
static vector unsigned short __ATTRS_o_ai
vec_vadduhm(vector unsigned short a, vector unsigned short b)
{
return a + b;
}
static vector unsigned short __ATTRS_o_ai
vec_vadduhm(vector bool short a, vector unsigned short b)
{
return (vector unsigned short)a + b;
}
static vector unsigned short __ATTRS_o_ai
vec_vadduhm(vector unsigned short a, vector bool short b)
{
return a + (vector unsigned short)b;
}
/* vec_vadduwm */
#define __builtin_altivec_vadduwm vec_vadduwm
static vector int __ATTRS_o_ai
vec_vadduwm(vector int a, vector int b)
{
return a + b;
}
static vector int __ATTRS_o_ai
vec_vadduwm(vector bool int a, vector int b)
{
return (vector int)a + b;
}
static vector int __ATTRS_o_ai
vec_vadduwm(vector int a, vector bool int b)
{
return a + (vector int)b;
}
static vector unsigned int __ATTRS_o_ai
vec_vadduwm(vector unsigned int a, vector unsigned int b)
{
return a + b;
}
static vector unsigned int __ATTRS_o_ai
vec_vadduwm(vector bool int a, vector unsigned int b)
{
return (vector unsigned int)a + b;
}
static vector unsigned int __ATTRS_o_ai
vec_vadduwm(vector unsigned int a, vector bool int b)
{
return a + (vector unsigned int)b;
}
/* vec_vaddfp */
#define __builtin_altivec_vaddfp vec_vaddfp
static vector float __attribute__((__always_inline__))
vec_vaddfp(vector float a, vector float b)
{
return a + b;
}
/* vec_addc */
static vector unsigned int __attribute__((__always_inline__))
vec_addc(vector unsigned int a, vector unsigned int b)
{
return __builtin_altivec_vaddcuw(a, b);
}
/* vec_vaddcuw */
static vector unsigned int __attribute__((__always_inline__))
vec_vaddcuw(vector unsigned int a, vector unsigned int b)
{
return __builtin_altivec_vaddcuw(a, b);
}
/* vec_adds */
static vector signed char __ATTRS_o_ai
vec_adds(vector signed char a, vector signed char b)
{
return __builtin_altivec_vaddsbs(a, b);
}
static vector signed char __ATTRS_o_ai
vec_adds(vector bool char a, vector signed char b)
{
return __builtin_altivec_vaddsbs((vector signed char)a, b);
}
static vector signed char __ATTRS_o_ai
vec_adds(vector signed char a, vector bool char b)
{
return __builtin_altivec_vaddsbs(a, (vector signed char)b);
}
static vector unsigned char __ATTRS_o_ai
vec_adds(vector unsigned char a, vector unsigned char b)
{
return __builtin_altivec_vaddubs(a, b);
}
static vector unsigned char __ATTRS_o_ai
vec_adds(vector bool char a, vector unsigned char b)
{
return __builtin_altivec_vaddubs((vector unsigned char)a, b);
}
static vector unsigned char __ATTRS_o_ai
vec_adds(vector unsigned char a, vector bool char b)
{
return __builtin_altivec_vaddubs(a, (vector unsigned char)b);
}
static vector short __ATTRS_o_ai
vec_adds(vector short a, vector short b)
{
return __builtin_altivec_vaddshs(a, b);
}
static vector short __ATTRS_o_ai
vec_adds(vector bool short a, vector short b)
{
return __builtin_altivec_vaddshs((vector short)a, b);
}
static vector short __ATTRS_o_ai
vec_adds(vector short a, vector bool short b)
{
return __builtin_altivec_vaddshs(a, (vector short)b);
}
static vector unsigned short __ATTRS_o_ai
vec_adds(vector unsigned short a, vector unsigned short b)
{
return __builtin_altivec_vadduhs(a, b);
}
static vector unsigned short __ATTRS_o_ai
vec_adds(vector bool short a, vector unsigned short b)
{
return __builtin_altivec_vadduhs((vector unsigned short)a, b);
}
static vector unsigned short __ATTRS_o_ai
vec_adds(vector unsigned short a, vector bool short b)
{
return __builtin_altivec_vadduhs(a, (vector unsigned short)b);
}
static vector int __ATTRS_o_ai
vec_adds(vector int a, vector int b)
{
return __builtin_altivec_vaddsws(a, b);
}
static vector int __ATTRS_o_ai
vec_adds(vector bool int a, vector int b)
{
return __builtin_altivec_vaddsws((vector int)a, b);
}
static vector int __ATTRS_o_ai
vec_adds(vector int a, vector bool int b)
{
return __builtin_altivec_vaddsws(a, (vector int)b);
}
static vector unsigned int __ATTRS_o_ai
vec_adds(vector unsigned int a, vector unsigned int b)
{
return __builtin_altivec_vadduws(a, b);
}
static vector unsigned int __ATTRS_o_ai
vec_adds(vector bool int a, vector unsigned int b)
{
return __builtin_altivec_vadduws((vector unsigned int)a, b);
}
static vector unsigned int __ATTRS_o_ai
vec_adds(vector unsigned int a, vector bool int b)
{
return __builtin_altivec_vadduws(a, (vector unsigned int)b);
}
/* vec_vaddsbs */
static vector signed char __ATTRS_o_ai
vec_vaddsbs(vector signed char a, vector signed char b)
{
return __builtin_altivec_vaddsbs(a, b);
}
static vector signed char __ATTRS_o_ai
vec_vaddsbs(vector bool char a, vector signed char b)
{
return __builtin_altivec_vaddsbs((vector signed char)a, b);
}
static vector signed char __ATTRS_o_ai
vec_vaddsbs(vector signed char a, vector bool char b)
{
return __builtin_altivec_vaddsbs(a, (vector signed char)b);
}
/* vec_vaddubs */
static vector unsigned char __ATTRS_o_ai
vec_vaddubs(vector unsigned char a, vector unsigned char b)
{
return __builtin_altivec_vaddubs(a, b);
}
static vector unsigned char __ATTRS_o_ai
vec_vaddubs(vector bool char a, vector unsigned char b)
{
return __builtin_altivec_vaddubs((vector unsigned char)a, b);
}
static vector unsigned char __ATTRS_o_ai
vec_vaddubs(vector unsigned char a, vector bool char b)
{
return __builtin_altivec_vaddubs(a, (vector unsigned char)b);
}
/* vec_vaddshs */
static vector short __ATTRS_o_ai
vec_vaddshs(vector short a, vector short b)
{
return __builtin_altivec_vaddshs(a, b);
}
static vector short __ATTRS_o_ai
vec_vaddshs(vector bool short a, vector short b)
{
return __builtin_altivec_vaddshs((vector short)a, b);
}
static vector short __ATTRS_o_ai
vec_vaddshs(vector short a, vector bool short b)
{
return __builtin_altivec_vaddshs(a, (vector short)b);
}
/* vec_vadduhs */
static vector unsigned short __ATTRS_o_ai
vec_vadduhs(vector unsigned short a, vector unsigned short b)
{
return __builtin_altivec_vadduhs(a, b);
}
static vector unsigned short __ATTRS_o_ai
vec_vadduhs(vector bool short a, vector unsigned short b)
{
return __builtin_altivec_vadduhs((vector unsigned short)a, b);
}
static vector unsigned short __ATTRS_o_ai
vec_vadduhs(vector unsigned short a, vector bool short b)
{
return __builtin_altivec_vadduhs(a, (vector unsigned short)b);
}
/* vec_vaddsws */
static vector int __ATTRS_o_ai
vec_vaddsws(vector int a, vector int b)
{
return __builtin_altivec_vaddsws(a, b);
}
static vector int __ATTRS_o_ai
vec_vaddsws(vector bool int a, vector int b)
{
return __builtin_altivec_vaddsws((vector int)a, b);
}
static vector int __ATTRS_o_ai
vec_vaddsws(vector int a, vector bool int b)
{
return __builtin_altivec_vaddsws(a, (vector int)b);
}
/* vec_vadduws */
static vector unsigned int __ATTRS_o_ai
vec_vadduws(vector unsigned int a, vector unsigned int b)
{
return __builtin_altivec_vadduws(a, b);
}
static vector unsigned int __ATTRS_o_ai
vec_vadduws(vector bool int a, vector unsigned int b)
{
return __builtin_altivec_vadduws((vector unsigned int)a, b);
}
static vector unsigned int __ATTRS_o_ai
vec_vadduws(vector unsigned int a, vector bool int b)
{
return __builtin_altivec_vadduws(a, (vector unsigned int)b);
}
/* vec_and */
#define __builtin_altivec_vand vec_and
static vector signed char __ATTRS_o_ai
vec_and(vector signed char a, vector signed char b)
{
return a & b;
}
static vector signed char __ATTRS_o_ai
vec_and(vector bool char a, vector signed char b)
{
return (vector signed char)a & b;
}
static vector signed char __ATTRS_o_ai
vec_and(vector signed char a, vector bool char b)
{
return a & (vector signed char)b;
}
static vector unsigned char __ATTRS_o_ai
vec_and(vector unsigned char a, vector unsigned char b)
{
return a & b;
}
static vector unsigned char __ATTRS_o_ai
vec_and(vector bool char a, vector unsigned char b)
{
return (vector unsigned char)a & b;
}
static vector unsigned char __ATTRS_o_ai
vec_and(vector unsigned char a, vector bool char b)
{
return a & (vector unsigned char)b;
}
static vector bool char __ATTRS_o_ai
vec_and(vector bool char a, vector bool char b)
{
return a & b;
}
static vector short __ATTRS_o_ai
vec_and(vector short a, vector short b)
{
return a & b;
}
static vector short __ATTRS_o_ai
vec_and(vector bool short a, vector short b)
{
return (vector short)a & b;
}
static vector short __ATTRS_o_ai
vec_and(vector short a, vector bool short b)
{
return a & (vector short)b;
}
static vector unsigned short __ATTRS_o_ai
vec_and(vector unsigned short a, vector unsigned short b)
{
return a & b;
}
static vector unsigned short __ATTRS_o_ai
vec_and(vector bool short a, vector unsigned short b)
{
return (vector unsigned short)a & b;
}
static vector unsigned short __ATTRS_o_ai
vec_and(vector unsigned short a, vector bool short b)
{
return a & (vector unsigned short)b;
}
static vector bool short __ATTRS_o_ai
vec_and(vector bool short a, vector bool short b)
{
return a & b;
}
static vector int __ATTRS_o_ai
vec_and(vector int a, vector int b)
{
return a & b;
}
static vector int __ATTRS_o_ai
vec_and(vector bool int a, vector int b)
{
return (vector int)a & b;
}
static vector int __ATTRS_o_ai
vec_and(vector int a, vector bool int b)
{
return a & (vector int)b;
}
static vector unsigned int __ATTRS_o_ai
vec_and(vector unsigned int a, vector unsigned int b)
{
return a & b;
}
static vector unsigned int __ATTRS_o_ai
vec_and(vector bool int a, vector unsigned int b)
{
return (vector unsigned int)a & b;
}
static vector unsigned int __ATTRS_o_ai
vec_and(vector unsigned int a, vector bool int b)
{
return a & (vector unsigned int)b;
}
static vector bool int __ATTRS_o_ai
vec_and(vector bool int a, vector bool int b)
{
return a & b;
}
static vector float __ATTRS_o_ai
vec_and(vector float a, vector float b)
{
vector unsigned int res = (vector unsigned int)a & (vector unsigned int)b;
return (vector float)res;
}
static vector float __ATTRS_o_ai
vec_and(vector bool int a, vector float b)
{
vector unsigned int res = (vector unsigned int)a & (vector unsigned int)b;
return (vector float)res;
}
static vector float __ATTRS_o_ai
vec_and(vector float a, vector bool int b)
{
vector unsigned int res = (vector unsigned int)a & (vector unsigned int)b;
return (vector float)res;
}
/* vec_vand */
static vector signed char __ATTRS_o_ai
vec_vand(vector signed char a, vector signed char b)
{
return a & b;
}
static vector signed char __ATTRS_o_ai
vec_vand(vector bool char a, vector signed char b)
{
return (vector signed char)a & b;
}
static vector signed char __ATTRS_o_ai
vec_vand(vector signed char a, vector bool char b)
{
return a & (vector signed char)b;
}
static vector unsigned char __ATTRS_o_ai
vec_vand(vector unsigned char a, vector unsigned char b)
{
return a & b;
}
static vector unsigned char __ATTRS_o_ai
vec_vand(vector bool char a, vector unsigned char b)
{
return (vector unsigned char)a & b;
}
static vector unsigned char __ATTRS_o_ai
vec_vand(vector unsigned char a, vector bool char b)
{
return a & (vector unsigned char)b;
}
static vector bool char __ATTRS_o_ai
vec_vand(vector bool char a, vector bool char b)
{
return a & b;
}
static vector short __ATTRS_o_ai
vec_vand(vector short a, vector short b)
{
return a & b;
}
static vector short __ATTRS_o_ai
vec_vand(vector bool short a, vector short b)
{
return (vector short)a & b;
}
static vector short __ATTRS_o_ai
vec_vand(vector short a, vector bool short b)
{
return a & (vector short)b;
}
static vector unsigned short __ATTRS_o_ai
vec_vand(vector unsigned short a, vector unsigned short b)
{
return a & b;
}
static vector unsigned short __ATTRS_o_ai
vec_vand(vector bool short a, vector unsigned short b)
{
return (vector unsigned short)a & b;
}
static vector unsigned short __ATTRS_o_ai
vec_vand(vector unsigned short a, vector bool short b)
{
return a & (vector unsigned short)b;
}
static vector bool short __ATTRS_o_ai
vec_vand(vector bool short a, vector bool short b)
{
return a & b;
}
static vector int __ATTRS_o_ai
vec_vand(vector int a, vector int b)
{
return a & b;
}
static vector int __ATTRS_o_ai
vec_vand(vector bool int a, vector int b)
{
return (vector int)a & b;
}
static vector int __ATTRS_o_ai
vec_vand(vector int a, vector bool int b)
{
return a & (vector int)b;
}
static vector unsigned int __ATTRS_o_ai
vec_vand(vector unsigned int a, vector unsigned int b)
{
return a & b;
}
static vector unsigned int __ATTRS_o_ai
vec_vand(vector bool int a, vector unsigned int b)
{
return (vector unsigned int)a & b;
}
static vector unsigned int __ATTRS_o_ai
vec_vand(vector unsigned int a, vector bool int b)
{
return a & (vector unsigned int)b;
}
static vector bool int __ATTRS_o_ai
vec_vand(vector bool int a, vector bool int b)
{
return a & b;
}
static vector float __ATTRS_o_ai
vec_vand(vector float a, vector float b)
{
vector unsigned int res = (vector unsigned int)a & (vector unsigned int)b;
return (vector float)res;
}
static vector float __ATTRS_o_ai
vec_vand(vector bool int a, vector float b)
{
vector unsigned int res = (vector unsigned int)a & (vector unsigned int)b;
return (vector float)res;
}
static vector float __ATTRS_o_ai
vec_vand(vector float a, vector bool int b)
{
vector unsigned int res = (vector unsigned int)a & (vector unsigned int)b;
return (vector float)res;
}
/* vec_andc */
#define __builtin_altivec_vandc vec_andc
static vector signed char __ATTRS_o_ai
vec_andc(vector signed char a, vector signed char b)
{
return a & ~b;
}
static vector signed char __ATTRS_o_ai
vec_andc(vector bool char a, vector signed char b)
{
return (vector signed char)a & ~b;
}
static vector signed char __ATTRS_o_ai
vec_andc(vector signed char a, vector bool char b)
{
return a & ~(vector signed char)b;
}
static vector unsigned char __ATTRS_o_ai
vec_andc(vector unsigned char a, vector unsigned char b)
{
return a & ~b;
}
static vector unsigned char __ATTRS_o_ai
vec_andc(vector bool char a, vector unsigned char b)
{
return (vector unsigned char)a & ~b;
}
static vector unsigned char __ATTRS_o_ai
vec_andc(vector unsigned char a, vector bool char b)
{
return a & ~(vector unsigned char)b;
}
static vector bool char __ATTRS_o_ai
vec_andc(vector bool char a, vector bool char b)
{
return a & ~b;
}
static vector short __ATTRS_o_ai
vec_andc(vector short a, vector short b)
{
return a & ~b;
}
static vector short __ATTRS_o_ai
vec_andc(vector bool short a, vector short b)
{
return (vector short)a & ~b;
}
static vector short __ATTRS_o_ai
vec_andc(vector short a, vector bool short b)
{
return a & ~(vector short)b;
}
static vector unsigned short __ATTRS_o_ai
vec_andc(vector unsigned short a, vector unsigned short b)
{
return a & ~b;
}
static vector unsigned short __ATTRS_o_ai
vec_andc(vector bool short a, vector unsigned short b)
{
return (vector unsigned short)a & ~b;
}
static vector unsigned short __ATTRS_o_ai
vec_andc(vector unsigned short a, vector bool short b)
{
return a & ~(vector unsigned short)b;
}
static vector bool short __ATTRS_o_ai
vec_andc(vector bool short a, vector bool short b)
{
return a & ~b;
}
static vector int __ATTRS_o_ai
vec_andc(vector int a, vector int b)
{
return a & ~b;
}
static vector int __ATTRS_o_ai
vec_andc(vector bool int a, vector int b)
{
return (vector int)a & ~b;
}
static vector int __ATTRS_o_ai
vec_andc(vector int a, vector bool int b)
{
return a & ~(vector int)b;
}
static vector unsigned int __ATTRS_o_ai
vec_andc(vector unsigned int a, vector unsigned int b)
{
return a & ~b;
}
static vector unsigned int __ATTRS_o_ai
vec_andc(vector bool int a, vector unsigned int b)
{
return (vector unsigned int)a & ~b;
}
static vector unsigned int __ATTRS_o_ai
vec_andc(vector unsigned int a, vector bool int b)
{
return a & ~(vector unsigned int)b;
}
static vector bool int __ATTRS_o_ai
vec_andc(vector bool int a, vector bool int b)
{
return a & ~b;
}
static vector float __ATTRS_o_ai
vec_andc(vector float a, vector float b)
{
vector unsigned int res = (vector unsigned int)a & ~(vector unsigned int)b;
return (vector float)res;
}
static vector float __ATTRS_o_ai
vec_andc(vector bool int a, vector float b)
{
vector unsigned int res = (vector unsigned int)a & ~(vector unsigned int)b;
return (vector float)res;
}
static vector float __ATTRS_o_ai
vec_andc(vector float a, vector bool int b)
{
vector unsigned int res = (vector unsigned int)a & ~(vector unsigned int)b;
return (vector float)res;
}
/* vec_vandc */
static vector signed char __ATTRS_o_ai
vec_vandc(vector signed char a, vector signed char b)
{
return a & ~b;
}
static vector signed char __ATTRS_o_ai
vec_vandc(vector bool char a, vector signed char b)
{
return (vector signed char)a & ~b;
}
static vector signed char __ATTRS_o_ai
vec_vandc(vector signed char a, vector bool char b)
{
return a & ~(vector signed char)b;
}
static vector unsigned char __ATTRS_o_ai
vec_vandc(vector unsigned char a, vector unsigned char b)
{
return a & ~b;
}
static vector unsigned char __ATTRS_o_ai
vec_vandc(vector bool char a, vector unsigned char b)
{
return (vector unsigned char)a & ~b;
}
static vector unsigned char __ATTRS_o_ai
vec_vandc(vector unsigned char a, vector bool char b)
{
return a & ~(vector unsigned char)b;
}
static vector bool char __ATTRS_o_ai
vec_vandc(vector bool char a, vector bool char b)
{
return a & ~b;
}
static vector short __ATTRS_o_ai
vec_vandc(vector short a, vector short b)
{
return a & ~b;
}
static vector short __ATTRS_o_ai
vec_vandc(vector bool short a, vector short b)
{
return (vector short)a & ~b;
}
static vector short __ATTRS_o_ai
vec_vandc(vector short a, vector bool short b)
{
return a & ~(vector short)b;
}
static vector unsigned short __ATTRS_o_ai
vec_vandc(vector unsigned short a, vector unsigned short b)
{
return a & ~b;
}
static vector unsigned short __ATTRS_o_ai
vec_vandc(vector bool short a, vector unsigned short b)
{
return (vector unsigned short)a & ~b;
}
static vector unsigned short __ATTRS_o_ai
vec_vandc(vector unsigned short a, vector bool short b)
{
return a & ~(vector unsigned short)b;
}
static vector bool short __ATTRS_o_ai
vec_vandc(vector bool short a, vector bool short b)
{
return a & ~b;
}
static vector int __ATTRS_o_ai
vec_vandc(vector int a, vector int b)
{
return a & ~b;
}
static vector int __ATTRS_o_ai
vec_vandc(vector bool int a, vector int b)
{
return (vector int)a & ~b;
}
static vector int __ATTRS_o_ai
vec_vandc(vector int a, vector bool int b)
{
return a & ~(vector int)b;
}
static vector unsigned int __ATTRS_o_ai
vec_vandc(vector unsigned int a, vector unsigned int b)
{
return a & ~b;
}
static vector unsigned int __ATTRS_o_ai
vec_vandc(vector bool int a, vector unsigned int b)
{
return (vector unsigned int)a & ~b;
}
static vector unsigned int __ATTRS_o_ai
vec_vandc(vector unsigned int a, vector bool int b)
{
return a & ~(vector unsigned int)b;
}
static vector bool int __ATTRS_o_ai
vec_vandc(vector bool int a, vector bool int b)
{
return a & ~b;
}
static vector float __ATTRS_o_ai
vec_vandc(vector float a, vector float b)
{
vector unsigned int res = (vector unsigned int)a & ~(vector unsigned int)b;
return (vector float)res;
}
static vector float __ATTRS_o_ai
vec_vandc(vector bool int a, vector float b)
{
vector unsigned int res = (vector unsigned int)a & ~(vector unsigned int)b;
return (vector float)res;
}
static vector float __ATTRS_o_ai
vec_vandc(vector float a, vector bool int b)
{
vector unsigned int res = (vector unsigned int)a & ~(vector unsigned int)b;
return (vector float)res;
}
/* vec_avg */
static vector signed char __ATTRS_o_ai
vec_avg(vector signed char a, vector signed char b)
{
return __builtin_altivec_vavgsb(a, b);
}
static vector unsigned char __ATTRS_o_ai
vec_avg(vector unsigned char a, vector unsigned char b)
{
return __builtin_altivec_vavgub(a, b);
}
static vector short __ATTRS_o_ai
vec_avg(vector short a, vector short b)
{
return __builtin_altivec_vavgsh(a, b);
}
static vector unsigned short __ATTRS_o_ai
vec_avg(vector unsigned short a, vector unsigned short b)
{
return __builtin_altivec_vavguh(a, b);
}
static vector int __ATTRS_o_ai
vec_avg(vector int a, vector int b)
{
return __builtin_altivec_vavgsw(a, b);
}
static vector unsigned int __ATTRS_o_ai
vec_avg(vector unsigned int a, vector unsigned int b)
{
return __builtin_altivec_vavguw(a, b);
}
/* vec_vavgsb */
static vector signed char __attribute__((__always_inline__))
vec_vavgsb(vector signed char a, vector signed char b)
{
return __builtin_altivec_vavgsb(a, b);
}
/* vec_vavgub */
static vector unsigned char __attribute__((__always_inline__))
vec_vavgub(vector unsigned char a, vector unsigned char b)
{
return __builtin_altivec_vavgub(a, b);
}
/* vec_vavgsh */
static vector short __attribute__((__always_inline__))
vec_vavgsh(vector short a, vector short b)
{
return __builtin_altivec_vavgsh(a, b);
}
/* vec_vavguh */
static vector unsigned short __attribute__((__always_inline__))
vec_vavguh(vector unsigned short a, vector unsigned short b)
{
return __builtin_altivec_vavguh(a, b);
}
/* vec_vavgsw */
static vector int __attribute__((__always_inline__))
vec_vavgsw(vector int a, vector int b)
{
return __builtin_altivec_vavgsw(a, b);
}
/* vec_vavguw */
static vector unsigned int __attribute__((__always_inline__))
vec_vavguw(vector unsigned int a, vector unsigned int b)
{
return __builtin_altivec_vavguw(a, b);
}
/* vec_ceil */
static vector float __attribute__((__always_inline__))
vec_ceil(vector float a)
{
return __builtin_altivec_vrfip(a);
}
/* vec_vrfip */
static vector float __attribute__((__always_inline__))
vec_vrfip(vector float a)
{
return __builtin_altivec_vrfip(a);
}
/* vec_cmpb */
static vector int __attribute__((__always_inline__))
vec_cmpb(vector float a, vector float b)
{
return __builtin_altivec_vcmpbfp(a, b);
}
/* vec_vcmpbfp */
static vector int __attribute__((__always_inline__))
vec_vcmpbfp(vector float a, vector float b)
{
return __builtin_altivec_vcmpbfp(a, b);
}
/* vec_cmpeq */
static vector bool char __ATTRS_o_ai
vec_cmpeq(vector signed char a, vector signed char b)
{
return (vector bool char)
__builtin_altivec_vcmpequb((vector char)a, (vector char)b);
}
static vector bool char __ATTRS_o_ai
vec_cmpeq(vector unsigned char a, vector unsigned char b)
{
return (vector bool char)
__builtin_altivec_vcmpequb((vector char)a, (vector char)b);
}
static vector bool short __ATTRS_o_ai
vec_cmpeq(vector short a, vector short b)
{
return (vector bool short)__builtin_altivec_vcmpequh(a, b);
}
static vector bool short __ATTRS_o_ai
vec_cmpeq(vector unsigned short a, vector unsigned short b)
{
return (vector bool short)
__builtin_altivec_vcmpequh((vector short)a, (vector short)b);
}
static vector bool int __ATTRS_o_ai
vec_cmpeq(vector int a, vector int b)
{
return (vector bool int)__builtin_altivec_vcmpequw(a, b);
}
static vector bool int __ATTRS_o_ai
vec_cmpeq(vector unsigned int a, vector unsigned int b)
{
return (vector bool int)
__builtin_altivec_vcmpequw((vector int)a, (vector int)b);
}
static vector bool int __ATTRS_o_ai
vec_cmpeq(vector float a, vector float b)
{
return (vector bool int)__builtin_altivec_vcmpeqfp(a, b);
}
/* vec_cmpge */
static vector bool int __attribute__((__always_inline__))
vec_cmpge(vector float a, vector float b)
{
return (vector bool int)__builtin_altivec_vcmpgefp(a, b);
}
/* vec_vcmpgefp */
static vector bool int __attribute__((__always_inline__))
vec_vcmpgefp(vector float a, vector float b)
{
return (vector bool int)__builtin_altivec_vcmpgefp(a, b);
}
/* vec_cmpgt */
static vector bool char __ATTRS_o_ai
vec_cmpgt(vector signed char a, vector signed char b)
{
return (vector bool char)__builtin_altivec_vcmpgtsb(a, b);
}
static vector bool char __ATTRS_o_ai
vec_cmpgt(vector unsigned char a, vector unsigned char b)
{
return (vector bool char)__builtin_altivec_vcmpgtub(a, b);
}
static vector bool short __ATTRS_o_ai
vec_cmpgt(vector short a, vector short b)
{
return (vector bool short)__builtin_altivec_vcmpgtsh(a, b);
}
static vector bool short __ATTRS_o_ai
vec_cmpgt(vector unsigned short a, vector unsigned short b)
{
return (vector bool short)__builtin_altivec_vcmpgtuh(a, b);
}
static vector bool int __ATTRS_o_ai
vec_cmpgt(vector int a, vector int b)
{
return (vector bool int)__builtin_altivec_vcmpgtsw(a, b);
}
static vector bool int __ATTRS_o_ai
vec_cmpgt(vector unsigned int a, vector unsigned int b)
{
return (vector bool int)__builtin_altivec_vcmpgtuw(a, b);
}
static vector bool int __ATTRS_o_ai
vec_cmpgt(vector float a, vector float b)
{
return (vector bool int)__builtin_altivec_vcmpgtfp(a, b);
}
/* vec_vcmpgtsb */
static vector bool char __attribute__((__always_inline__))
vec_vcmpgtsb(vector signed char a, vector signed char b)
{
return (vector bool char)__builtin_altivec_vcmpgtsb(a, b);
}
/* vec_vcmpgtub */
static vector bool char __attribute__((__always_inline__))
vec_vcmpgtub(vector unsigned char a, vector unsigned char b)
{
return (vector bool char)__builtin_altivec_vcmpgtub(a, b);
}
/* vec_vcmpgtsh */
static vector bool short __attribute__((__always_inline__))
vec_vcmpgtsh(vector short a, vector short b)
{
return (vector bool short)__builtin_altivec_vcmpgtsh(a, b);
}
/* vec_vcmpgtuh */
static vector bool short __attribute__((__always_inline__))
vec_vcmpgtuh(vector unsigned short a, vector unsigned short b)
{
return (vector bool short)__builtin_altivec_vcmpgtuh(a, b);
}
/* vec_vcmpgtsw */
static vector bool int __attribute__((__always_inline__))
vec_vcmpgtsw(vector int a, vector int b)
{
return (vector bool int)__builtin_altivec_vcmpgtsw(a, b);
}
/* vec_vcmpgtuw */
static vector bool int __attribute__((__always_inline__))
vec_vcmpgtuw(vector unsigned int a, vector unsigned int b)
{
return (vector bool int)__builtin_altivec_vcmpgtuw(a, b);
}
/* vec_vcmpgtfp */
static vector bool int __attribute__((__always_inline__))
vec_vcmpgtfp(vector float a, vector float b)
{
return (vector bool int)__builtin_altivec_vcmpgtfp(a, b);
}
/* vec_cmple */
static vector bool int __attribute__((__always_inline__))
vec_cmple(vector float a, vector float b)
{
return (vector bool int)__builtin_altivec_vcmpgefp(b, a);
}
/* vec_cmplt */
static vector bool char __ATTRS_o_ai
vec_cmplt(vector signed char a, vector signed char b)
{
return (vector bool char)__builtin_altivec_vcmpgtsb(b, a);
}
static vector bool char __ATTRS_o_ai
vec_cmplt(vector unsigned char a, vector unsigned char b)
{
return (vector bool char)__builtin_altivec_vcmpgtub(b, a);
}
static vector bool short __ATTRS_o_ai
vec_cmplt(vector short a, vector short b)
{
return (vector bool short)__builtin_altivec_vcmpgtsh(b, a);
}
static vector bool short __ATTRS_o_ai
vec_cmplt(vector unsigned short a, vector unsigned short b)
{
return (vector bool short)__builtin_altivec_vcmpgtuh(b, a);
}
static vector bool int __ATTRS_o_ai
vec_cmplt(vector int a, vector int b)
{
return (vector bool int)__builtin_altivec_vcmpgtsw(b, a);
}
static vector bool int __ATTRS_o_ai
vec_cmplt(vector unsigned int a, vector unsigned int b)
{
return (vector bool int)__builtin_altivec_vcmpgtuw(b, a);
}
static vector bool int __ATTRS_o_ai
vec_cmplt(vector float a, vector float b)
{
return (vector bool int)__builtin_altivec_vcmpgtfp(b, a);
}
/* vec_ctf */
static vector float __ATTRS_o_ai
vec_ctf(vector int a, int b)
{
return __builtin_altivec_vcfsx(a, b);
}
static vector float __ATTRS_o_ai
vec_ctf(vector unsigned int a, int b)
{
return __builtin_altivec_vcfux((vector int)a, b);
}
/* vec_vcfsx */
static vector float __attribute__((__always_inline__))
vec_vcfsx(vector int a, int b)
{
return __builtin_altivec_vcfsx(a, b);
}
/* vec_vcfux */
static vector float __attribute__((__always_inline__))
vec_vcfux(vector unsigned int a, int b)
{
return __builtin_altivec_vcfux((vector int)a, b);
}
/* vec_cts */
static vector int __attribute__((__always_inline__))
vec_cts(vector float a, int b)
{
return __builtin_altivec_vctsxs(a, b);
}
/* vec_vctsxs */
static vector int __attribute__((__always_inline__))
vec_vctsxs(vector float a, int b)
{
return __builtin_altivec_vctsxs(a, b);
}
/* vec_ctu */
static vector unsigned int __attribute__((__always_inline__))
vec_ctu(vector float a, int b)
{
return __builtin_altivec_vctuxs(a, b);
}
/* vec_vctuxs */
static vector unsigned int __attribute__((__always_inline__))
vec_vctuxs(vector float a, int b)
{
return __builtin_altivec_vctuxs(a, b);
}
/* vec_dss */
static void __attribute__((__always_inline__))
vec_dss(int a)
{
__builtin_altivec_dss(a);
}
/* vec_dssall */
static void __attribute__((__always_inline__))
vec_dssall(void)
{
__builtin_altivec_dssall();
}
/* vec_dst */
static void __attribute__((__always_inline__))
vec_dst(const void *a, int b, int c)
{
__builtin_altivec_dst(a, b, c);
}
/* vec_dstst */
static void __attribute__((__always_inline__))
vec_dstst(const void *a, int b, int c)
{
__builtin_altivec_dstst(a, b, c);
}
/* vec_dststt */
static void __attribute__((__always_inline__))
vec_dststt(const void *a, int b, int c)
{
__builtin_altivec_dststt(a, b, c);
}
/* vec_dstt */
static void __attribute__((__always_inline__))
vec_dstt(const void *a, int b, int c)
{
__builtin_altivec_dstt(a, b, c);
}
/* vec_expte */
static vector float __attribute__((__always_inline__))
vec_expte(vector float a)
{
return __builtin_altivec_vexptefp(a);
}
/* vec_vexptefp */
static vector float __attribute__((__always_inline__))
vec_vexptefp(vector float a)
{
return __builtin_altivec_vexptefp(a);
}
/* vec_floor */
static vector float __attribute__((__always_inline__))
vec_floor(vector float a)
{
return __builtin_altivec_vrfim(a);
}
/* vec_vrfim */
static vector float __attribute__((__always_inline__))
vec_vrfim(vector float a)
{
return __builtin_altivec_vrfim(a);
}
/* vec_ld */
static vector signed char __ATTRS_o_ai
vec_ld(int a, const vector signed char *b)
{
return (vector signed char)__builtin_altivec_lvx(a, b);
}
static vector signed char __ATTRS_o_ai
vec_ld(int a, const signed char *b)
{
return (vector signed char)__builtin_altivec_lvx(a, b);
}
static vector unsigned char __ATTRS_o_ai
vec_ld(int a, const vector unsigned char *b)
{
return (vector unsigned char)__builtin_altivec_lvx(a, b);
}
static vector unsigned char __ATTRS_o_ai
vec_ld(int a, const unsigned char *b)
{
return (vector unsigned char)__builtin_altivec_lvx(a, b);
}
static vector bool char __ATTRS_o_ai
vec_ld(int a, const vector bool char *b)
{
return (vector bool char)__builtin_altivec_lvx(a, b);
}
static vector short __ATTRS_o_ai
vec_ld(int a, const vector short *b)
{
return (vector short)__builtin_altivec_lvx(a, b);
}
static vector short __ATTRS_o_ai
vec_ld(int a, const short *b)
{
return (vector short)__builtin_altivec_lvx(a, b);
}
static vector unsigned short __ATTRS_o_ai
vec_ld(int a, const vector unsigned short *b)
{
return (vector unsigned short)__builtin_altivec_lvx(a, b);
}
static vector unsigned short __ATTRS_o_ai
vec_ld(int a, const unsigned short *b)
{
return (vector unsigned short)__builtin_altivec_lvx(a, b);
}
static vector bool short __ATTRS_o_ai
vec_ld(int a, const vector bool short *b)
{
return (vector bool short)__builtin_altivec_lvx(a, b);
}
static vector pixel __ATTRS_o_ai
vec_ld(int a, const vector pixel *b)
{
return (vector pixel)__builtin_altivec_lvx(a, b);
}
static vector int __ATTRS_o_ai
vec_ld(int a, const vector int *b)
{
return (vector int)__builtin_altivec_lvx(a, b);
}
static vector int __ATTRS_o_ai
vec_ld(int a, const int *b)
{
return (vector int)__builtin_altivec_lvx(a, b);
}
static vector unsigned int __ATTRS_o_ai
vec_ld(int a, const vector unsigned int *b)
{
return (vector unsigned int)__builtin_altivec_lvx(a, b);
}
static vector unsigned int __ATTRS_o_ai
vec_ld(int a, const unsigned int *b)
{
return (vector unsigned int)__builtin_altivec_lvx(a, b);
}
static vector bool int __ATTRS_o_ai
vec_ld(int a, const vector bool int *b)
{
return (vector bool int)__builtin_altivec_lvx(a, b);
}
static vector float __ATTRS_o_ai
vec_ld(int a, const vector float *b)
{
return (vector float)__builtin_altivec_lvx(a, b);
}
static vector float __ATTRS_o_ai
vec_ld(int a, const float *b)
{
return (vector float)__builtin_altivec_lvx(a, b);
}
/* vec_lvx */
static vector signed char __ATTRS_o_ai
vec_lvx(int a, const vector signed char *b)
{
return (vector signed char)__builtin_altivec_lvx(a, b);
}
static vector signed char __ATTRS_o_ai
vec_lvx(int a, const signed char *b)
{
return (vector signed char)__builtin_altivec_lvx(a, b);
}
static vector unsigned char __ATTRS_o_ai
vec_lvx(int a, const vector unsigned char *b)
{
return (vector unsigned char)__builtin_altivec_lvx(a, b);
}
static vector unsigned char __ATTRS_o_ai
vec_lvx(int a, const unsigned char *b)
{
return (vector unsigned char)__builtin_altivec_lvx(a, b);
}
static vector bool char __ATTRS_o_ai
vec_lvx(int a, const vector bool char *b)
{
return (vector bool char)__builtin_altivec_lvx(a, b);
}
static vector short __ATTRS_o_ai
vec_lvx(int a, const vector short *b)
{
return (vector short)__builtin_altivec_lvx(a, b);
}
static vector short __ATTRS_o_ai
vec_lvx(int a, const short *b)
{
return (vector short)__builtin_altivec_lvx(a, b);
}
static vector unsigned short __ATTRS_o_ai
vec_lvx(int a, const vector unsigned short *b)
{
return (vector unsigned short)__builtin_altivec_lvx(a, b);
}
static vector unsigned short __ATTRS_o_ai
vec_lvx(int a, const unsigned short *b)
{
return (vector unsigned short)__builtin_altivec_lvx(a, b);
}
static vector bool short __ATTRS_o_ai
vec_lvx(int a, const vector bool short *b)
{
return (vector bool short)__builtin_altivec_lvx(a, b);
}
static vector pixel __ATTRS_o_ai
vec_lvx(int a, const vector pixel *b)
{
return (vector pixel)__builtin_altivec_lvx(a, b);
}
static vector int __ATTRS_o_ai
vec_lvx(int a, const vector int *b)
{
return (vector int)__builtin_altivec_lvx(a, b);
}
static vector int __ATTRS_o_ai
vec_lvx(int a, const int *b)
{
return (vector int)__builtin_altivec_lvx(a, b);
}
static vector unsigned int __ATTRS_o_ai
vec_lvx(int a, const vector unsigned int *b)
{
return (vector unsigned int)__builtin_altivec_lvx(a, b);
}
static vector unsigned int __ATTRS_o_ai
vec_lvx(int a, const unsigned int *b)
{
return (vector unsigned int)__builtin_altivec_lvx(a, b);
}
static vector bool int __ATTRS_o_ai
vec_lvx(int a, const vector bool int *b)
{
return (vector bool int)__builtin_altivec_lvx(a, b);
}
static vector float __ATTRS_o_ai
vec_lvx(int a, const vector float *b)
{
return (vector float)__builtin_altivec_lvx(a, b);
}
static vector float __ATTRS_o_ai
vec_lvx(int a, const float *b)
{
return (vector float)__builtin_altivec_lvx(a, b);
}
/* vec_lde */
static vector signed char __ATTRS_o_ai
vec_lde(int a, const vector signed char *b)
{
return (vector signed char)__builtin_altivec_lvebx(a, b);
}
static vector unsigned char __ATTRS_o_ai
vec_lde(int a, const vector unsigned char *b)
{
return (vector unsigned char)__builtin_altivec_lvebx(a, b);
}
static vector short __ATTRS_o_ai
vec_lde(int a, const vector short *b)
{
return (vector short)__builtin_altivec_lvehx(a, b);
}
static vector unsigned short __ATTRS_o_ai
vec_lde(int a, const vector unsigned short *b)
{
return (vector unsigned short)__builtin_altivec_lvehx(a, b);
}
static vector int __ATTRS_o_ai
vec_lde(int a, const vector int *b)
{
return (vector int)__builtin_altivec_lvewx(a, b);
}
static vector unsigned int __ATTRS_o_ai
vec_lde(int a, const vector unsigned int *b)
{
return (vector unsigned int)__builtin_altivec_lvewx(a, b);
}
static vector float __ATTRS_o_ai
vec_lde(int a, const vector float *b)
{
return (vector float)__builtin_altivec_lvewx(a, b);
}
/* vec_lvebx */
static vector signed char __ATTRS_o_ai
vec_lvebx(int a, const vector signed char *b)
{
return (vector signed char)__builtin_altivec_lvebx(a, b);
}
static vector unsigned char __ATTRS_o_ai
vec_lvebx(int a, const vector unsigned char *b)
{
return (vector unsigned char)__builtin_altivec_lvebx(a, b);
}
/* vec_lvehx */
static vector short __ATTRS_o_ai
vec_lvehx(int a, const vector short *b)
{
return (vector short)__builtin_altivec_lvehx(a, b);
}
static vector unsigned short __ATTRS_o_ai
vec_lvehx(int a, const vector unsigned short *b)
{
return (vector unsigned short)__builtin_altivec_lvehx(a, b);
}
/* vec_lvewx */
static vector int __ATTRS_o_ai
vec_lvewx(int a, const vector int *b)
{
return (vector int)__builtin_altivec_lvewx(a, b);
}
static vector unsigned int __ATTRS_o_ai
vec_lvewx(int a, const vector unsigned int *b)
{
return (vector unsigned int)__builtin_altivec_lvewx(a, b);
}
static vector float __ATTRS_o_ai
vec_lvewx(int a, const vector float *b)
{
return (vector float)__builtin_altivec_lvewx(a, b);
}
/* vec_ldl */
static vector signed char __ATTRS_o_ai
vec_ldl(int a, const vector signed char *b)
{
return (vector signed char)__builtin_altivec_lvxl(a, b);
}
static vector signed char __ATTRS_o_ai
vec_ldl(int a, const signed char *b)
{
return (vector signed char)__builtin_altivec_lvxl(a, b);
}
static vector unsigned char __ATTRS_o_ai
vec_ldl(int a, const vector unsigned char *b)
{
return (vector unsigned char)__builtin_altivec_lvxl(a, b);
}
static vector unsigned char __ATTRS_o_ai
vec_ldl(int a, const unsigned char *b)
{
return (vector unsigned char)__builtin_altivec_lvxl(a, b);
}
static vector bool char __ATTRS_o_ai
vec_ldl(int a, const vector bool char *b)
{
return (vector bool char)__builtin_altivec_lvxl(a, b);
}
static vector short __ATTRS_o_ai
vec_ldl(int a, const vector short *b)
{
return (vector short)__builtin_altivec_lvxl(a, b);
}
static vector short __ATTRS_o_ai
vec_ldl(int a, const short *b)
{
return (vector short)__builtin_altivec_lvxl(a, b);
}
static vector unsigned short __ATTRS_o_ai
vec_ldl(int a, const vector unsigned short *b)
{
return (vector unsigned short)__builtin_altivec_lvxl(a, b);
}
static vector unsigned short __ATTRS_o_ai
vec_ldl(int a, const unsigned short *b)
{
return (vector unsigned short)__builtin_altivec_lvxl(a, b);
}
static vector bool short __ATTRS_o_ai
vec_ldl(int a, const vector bool short *b)
{
return (vector bool short)__builtin_altivec_lvxl(a, b);
}
static vector pixel __ATTRS_o_ai
vec_ldl(int a, const vector pixel *b)
{
return (vector pixel short)__builtin_altivec_lvxl(a, b);
}
static vector int __ATTRS_o_ai
vec_ldl(int a, const vector int *b)
{
return (vector int)__builtin_altivec_lvxl(a, b);
}
static vector int __ATTRS_o_ai
vec_ldl(int a, const int *b)
{
return (vector int)__builtin_altivec_lvxl(a, b);
}
static vector unsigned int __ATTRS_o_ai
vec_ldl(int a, const vector unsigned int *b)
{
return (vector unsigned int)__builtin_altivec_lvxl(a, b);
}
static vector unsigned int __ATTRS_o_ai
vec_ldl(int a, const unsigned int *b)
{
return (vector unsigned int)__builtin_altivec_lvxl(a, b);
}
static vector bool int __ATTRS_o_ai
vec_ldl(int a, const vector bool int *b)
{
return (vector bool int)__builtin_altivec_lvxl(a, b);
}
static vector float __ATTRS_o_ai
vec_ldl(int a, const vector float *b)
{
return (vector float)__builtin_altivec_lvxl(a, b);
}
static vector float __ATTRS_o_ai
vec_ldl(int a, const float *b)
{
return (vector float)__builtin_altivec_lvxl(a, b);
}
/* vec_lvxl */
static vector signed char __ATTRS_o_ai
vec_lvxl(int a, const vector signed char *b)
{
return (vector signed char)__builtin_altivec_lvxl(a, b);
}
static vector signed char __ATTRS_o_ai
vec_lvxl(int a, const signed char *b)
{
return (vector signed char)__builtin_altivec_lvxl(a, b);
}
static vector unsigned char __ATTRS_o_ai
vec_lvxl(int a, const vector unsigned char *b)
{
return (vector unsigned char)__builtin_altivec_lvxl(a, b);
}
static vector unsigned char __ATTRS_o_ai
vec_lvxl(int a, const unsigned char *b)
{
return (vector unsigned char)__builtin_altivec_lvxl(a, b);
}
static vector bool char __ATTRS_o_ai
vec_lvxl(int a, const vector bool char *b)
{
return (vector bool char)__builtin_altivec_lvxl(a, b);
}
static vector short __ATTRS_o_ai
vec_lvxl(int a, const vector short *b)
{
return (vector short)__builtin_altivec_lvxl(a, b);
}
static vector short __ATTRS_o_ai
vec_lvxl(int a, const short *b)
{
return (vector short)__builtin_altivec_lvxl(a, b);
}
static vector unsigned short __ATTRS_o_ai
vec_lvxl(int a, const vector unsigned short *b)
{
return (vector unsigned short)__builtin_altivec_lvxl(a, b);
}
static vector unsigned short __ATTRS_o_ai
vec_lvxl(int a, const unsigned short *b)
{
return (vector unsigned short)__builtin_altivec_lvxl(a, b);
}
static vector bool short __ATTRS_o_ai
vec_lvxl(int a, const vector bool short *b)
{
return (vector bool short)__builtin_altivec_lvxl(a, b);
}
static vector pixel __ATTRS_o_ai
vec_lvxl(int a, const vector pixel *b)
{
return (vector pixel)__builtin_altivec_lvxl(a, b);
}
static vector int __ATTRS_o_ai
vec_lvxl(int a, const vector int *b)
{
return (vector int)__builtin_altivec_lvxl(a, b);
}
static vector int __ATTRS_o_ai
vec_lvxl(int a, const int *b)
{
return (vector int)__builtin_altivec_lvxl(a, b);
}
static vector unsigned int __ATTRS_o_ai
vec_lvxl(int a, const vector unsigned int *b)
{
return (vector unsigned int)__builtin_altivec_lvxl(a, b);
}
static vector unsigned int __ATTRS_o_ai
vec_lvxl(int a, const unsigned int *b)
{
return (vector unsigned int)__builtin_altivec_lvxl(a, b);
}
static vector bool int __ATTRS_o_ai
vec_lvxl(int a, const vector bool int *b)
{
return (vector bool int)__builtin_altivec_lvxl(a, b);
}
static vector float __ATTRS_o_ai
vec_lvxl(int a, const vector float *b)
{
return (vector float)__builtin_altivec_lvxl(a, b);
}
static vector float __ATTRS_o_ai
vec_lvxl(int a, const float *b)
{
return (vector float)__builtin_altivec_lvxl(a, b);
}
/* vec_loge */
static vector float __attribute__((__always_inline__))
vec_loge(vector float a)
{
return __builtin_altivec_vlogefp(a);
}
/* vec_vlogefp */
static vector float __attribute__((__always_inline__))
vec_vlogefp(vector float a)
{
return __builtin_altivec_vlogefp(a);
}
/* vec_lvsl */
static vector unsigned char __ATTRS_o_ai
vec_lvsl(int a, const signed char *b)
{
return (vector unsigned char)__builtin_altivec_lvsl(a, b);
}
static vector unsigned char __ATTRS_o_ai
vec_lvsl(int a, const unsigned char *b)
{
return (vector unsigned char)__builtin_altivec_lvsl(a, b);
}
static vector unsigned char __ATTRS_o_ai
vec_lvsl(int a, const short *b)
{
return (vector unsigned char)__builtin_altivec_lvsl(a, b);
}
static vector unsigned char __ATTRS_o_ai
vec_lvsl(int a, const unsigned short *b)
{
return (vector unsigned char)__builtin_altivec_lvsl(a, b);
}
static vector unsigned char __ATTRS_o_ai
vec_lvsl(int a, const int *b)
{
return (vector unsigned char)__builtin_altivec_lvsl(a, b);
}
static vector unsigned char __ATTRS_o_ai
vec_lvsl(int a, const unsigned int *b)
{
return (vector unsigned char)__builtin_altivec_lvsl(a, b);
}
static vector unsigned char __ATTRS_o_ai
vec_lvsl(int a, const float *b)
{
return (vector unsigned char)__builtin_altivec_lvsl(a, b);
}
/* vec_lvsr */
static vector unsigned char __ATTRS_o_ai
vec_lvsr(int a, const signed char *b)
{
return (vector unsigned char)__builtin_altivec_lvsr(a, b);
}
static vector unsigned char __ATTRS_o_ai
vec_lvsr(int a, const unsigned char *b)
{
return (vector unsigned char)__builtin_altivec_lvsr(a, b);
}
static vector unsigned char __ATTRS_o_ai
vec_lvsr(int a, const short *b)
{
return (vector unsigned char)__builtin_altivec_lvsr(a, b);
}
static vector unsigned char __ATTRS_o_ai
vec_lvsr(int a, const unsigned short *b)
{
return (vector unsigned char)__builtin_altivec_lvsr(a, b);
}
static vector unsigned char __ATTRS_o_ai
vec_lvsr(int a, const int *b)
{
return (vector unsigned char)__builtin_altivec_lvsr(a, b);
}
static vector unsigned char __ATTRS_o_ai
vec_lvsr(int a, const unsigned int *b)
{
return (vector unsigned char)__builtin_altivec_lvsr(a, b);
}
static vector unsigned char __ATTRS_o_ai
vec_lvsr(int a, const float *b)
{
return (vector unsigned char)__builtin_altivec_lvsr(a, b);
}
/* vec_madd */
static vector float __attribute__((__always_inline__))
vec_madd(vector float a, vector float b, vector float c)
{
return __builtin_altivec_vmaddfp(a, b, c);
}
/* vec_vmaddfp */
static vector float __attribute__((__always_inline__))
vec_vmaddfp(vector float a, vector float b, vector float c)
{
return __builtin_altivec_vmaddfp(a, b, c);
}
/* vec_madds */
static vector signed short __attribute__((__always_inline__))
vec_madds(vector signed short a, vector signed short b, vector signed short c)
{
return __builtin_altivec_vmhaddshs(a, b, c);
}
/* vec_vmhaddshs */
static vector signed short __attribute__((__always_inline__))
vec_vmhaddshs(vector signed short a,
vector signed short b,
vector signed short c)
{
return __builtin_altivec_vmhaddshs(a, b, c);
}
/* vec_max */
static vector signed char __ATTRS_o_ai
vec_max(vector signed char a, vector signed char b)
{
return __builtin_altivec_vmaxsb(a, b);
}
static vector signed char __ATTRS_o_ai
vec_max(vector bool char a, vector signed char b)
{
return __builtin_altivec_vmaxsb((vector signed char)a, b);
}
static vector signed char __ATTRS_o_ai
vec_max(vector signed char a, vector bool char b)
{
return __builtin_altivec_vmaxsb(a, (vector signed char)b);
}
static vector unsigned char __ATTRS_o_ai
vec_max(vector unsigned char a, vector unsigned char b)
{
return __builtin_altivec_vmaxub(a, b);
}
static vector unsigned char __ATTRS_o_ai
vec_max(vector bool char a, vector unsigned char b)
{
return __builtin_altivec_vmaxub((vector unsigned char)a, b);
}
static vector unsigned char __ATTRS_o_ai
vec_max(vector unsigned char a, vector bool char b)
{
return __builtin_altivec_vmaxub(a, (vector unsigned char)b);
}
static vector short __ATTRS_o_ai
vec_max(vector short a, vector short b)
{
return __builtin_altivec_vmaxsh(a, b);
}
static vector short __ATTRS_o_ai
vec_max(vector bool short a, vector short b)
{
return __builtin_altivec_vmaxsh((vector short)a, b);
}
static vector short __ATTRS_o_ai
vec_max(vector short a, vector bool short b)
{
return __builtin_altivec_vmaxsh(a, (vector short)b);
}
static vector unsigned short __ATTRS_o_ai
vec_max(vector unsigned short a, vector unsigned short b)
{
return __builtin_altivec_vmaxuh(a, b);
}
static vector unsigned short __ATTRS_o_ai
vec_max(vector bool short a, vector unsigned short b)
{
return __builtin_altivec_vmaxuh((vector unsigned short)a, b);
}
static vector unsigned short __ATTRS_o_ai
vec_max(vector unsigned short a, vector bool short b)
{
return __builtin_altivec_vmaxuh(a, (vector unsigned short)b);
}
static vector int __ATTRS_o_ai
vec_max(vector int a, vector int b)
{
return __builtin_altivec_vmaxsw(a, b);
}
static vector int __ATTRS_o_ai
vec_max(vector bool int a, vector int b)
{
return __builtin_altivec_vmaxsw((vector int)a, b);
}
static vector int __ATTRS_o_ai
vec_max(vector int a, vector bool int b)
{
return __builtin_altivec_vmaxsw(a, (vector int)b);
}
static vector unsigned int __ATTRS_o_ai
vec_max(vector unsigned int a, vector unsigned int b)
{
return __builtin_altivec_vmaxuw(a, b);
}
static vector unsigned int __ATTRS_o_ai
vec_max(vector bool int a, vector unsigned int b)
{
return __builtin_altivec_vmaxuw((vector unsigned int)a, b);
}
static vector unsigned int __ATTRS_o_ai
vec_max(vector unsigned int a, vector bool int b)
{
return __builtin_altivec_vmaxuw(a, (vector unsigned int)b);
}
static vector float __ATTRS_o_ai
vec_max(vector float a, vector float b)
{
return __builtin_altivec_vmaxfp(a, b);
}
/* vec_vmaxsb */
static vector signed char __ATTRS_o_ai
vec_vmaxsb(vector signed char a, vector signed char b)
{
return __builtin_altivec_vmaxsb(a, b);
}
static vector signed char __ATTRS_o_ai
vec_vmaxsb(vector bool char a, vector signed char b)
{
return __builtin_altivec_vmaxsb((vector signed char)a, b);
}
static vector signed char __ATTRS_o_ai
vec_vmaxsb(vector signed char a, vector bool char b)
{
return __builtin_altivec_vmaxsb(a, (vector signed char)b);
}
/* vec_vmaxub */
static vector unsigned char __ATTRS_o_ai
vec_vmaxub(vector unsigned char a, vector unsigned char b)
{
return __builtin_altivec_vmaxub(a, b);
}
static vector unsigned char __ATTRS_o_ai
vec_vmaxub(vector bool char a, vector unsigned char b)
{
return __builtin_altivec_vmaxub((vector unsigned char)a, b);
}
static vector unsigned char __ATTRS_o_ai
vec_vmaxub(vector unsigned char a, vector bool char b)
{
return __builtin_altivec_vmaxub(a, (vector unsigned char)b);
}
/* vec_vmaxsh */
static vector short __ATTRS_o_ai
vec_vmaxsh(vector short a, vector short b)
{
return __builtin_altivec_vmaxsh(a, b);
}
static vector short __ATTRS_o_ai
vec_vmaxsh(vector bool short a, vector short b)
{
return __builtin_altivec_vmaxsh((vector short)a, b);
}
static vector short __ATTRS_o_ai
vec_vmaxsh(vector short a, vector bool short b)
{
return __builtin_altivec_vmaxsh(a, (vector short)b);
}
/* vec_vmaxuh */
static vector unsigned short __ATTRS_o_ai
vec_vmaxuh(vector unsigned short a, vector unsigned short b)
{
return __builtin_altivec_vmaxuh(a, b);
}
static vector unsigned short __ATTRS_o_ai
vec_vmaxuh(vector bool short a, vector unsigned short b)
{
return __builtin_altivec_vmaxuh((vector unsigned short)a, b);
}
static vector unsigned short __ATTRS_o_ai
vec_vmaxuh(vector unsigned short a, vector bool short b)
{
return __builtin_altivec_vmaxuh(a, (vector unsigned short)b);
}
/* vec_vmaxsw */
static vector int __ATTRS_o_ai
vec_vmaxsw(vector int a, vector int b)
{
return __builtin_altivec_vmaxsw(a, b);
}
static vector int __ATTRS_o_ai
vec_vmaxsw(vector bool int a, vector int b)
{
return __builtin_altivec_vmaxsw((vector int)a, b);
}
static vector int __ATTRS_o_ai
vec_vmaxsw(vector int a, vector bool int b)
{
return __builtin_altivec_vmaxsw(a, (vector int)b);
}
/* vec_vmaxuw */
static vector unsigned int __ATTRS_o_ai
vec_vmaxuw(vector unsigned int a, vector unsigned int b)
{
return __builtin_altivec_vmaxuw(a, b);
}
static vector unsigned int __ATTRS_o_ai
vec_vmaxuw(vector bool int a, vector unsigned int b)
{
return __builtin_altivec_vmaxuw((vector unsigned int)a, b);
}
static vector unsigned int __ATTRS_o_ai
vec_vmaxuw(vector unsigned int a, vector bool int b)
{
return __builtin_altivec_vmaxuw(a, (vector unsigned int)b);
}
/* vec_vmaxfp */
static vector float __attribute__((__always_inline__))
vec_vmaxfp(vector float a, vector float b)
{
return __builtin_altivec_vmaxfp(a, b);
}
/* vec_mergeh */
static vector signed char __ATTRS_o_ai
vec_mergeh(vector signed char a, vector signed char b)
{
return vec_perm(a, b, (vector unsigned char)
(0x00, 0x10, 0x01, 0x11, 0x02, 0x12, 0x03, 0x13,
0x04, 0x14, 0x05, 0x15, 0x06, 0x16, 0x07, 0x17));
}
static vector unsigned char __ATTRS_o_ai
vec_mergeh(vector unsigned char a, vector unsigned char b)
{
return vec_perm(a, b, (vector unsigned char)
(0x00, 0x10, 0x01, 0x11, 0x02, 0x12, 0x03, 0x13,
0x04, 0x14, 0x05, 0x15, 0x06, 0x16, 0x07, 0x17));
}
static vector bool char __ATTRS_o_ai
vec_mergeh(vector bool char a, vector bool char b)
{
return vec_perm(a, b, (vector unsigned char)
(0x00, 0x10, 0x01, 0x11, 0x02, 0x12, 0x03, 0x13,
0x04, 0x14, 0x05, 0x15, 0x06, 0x16, 0x07, 0x17));
}
static vector short __ATTRS_o_ai
vec_mergeh(vector short a, vector short b)
{
return vec_perm(a, b, (vector unsigned char)
(0x00, 0x01, 0x10, 0x11, 0x02, 0x03, 0x12, 0x13,
0x04, 0x05, 0x14, 0x15, 0x06, 0x07, 0x16, 0x17));
}
static vector unsigned short __ATTRS_o_ai
vec_mergeh(vector unsigned short a, vector unsigned short b)
{
return vec_perm(a, b, (vector unsigned char)
(0x00, 0x01, 0x10, 0x11, 0x02, 0x03, 0x12, 0x13,
0x04, 0x05, 0x14, 0x15, 0x06, 0x07, 0x16, 0x17));
}
static vector bool short __ATTRS_o_ai
vec_mergeh(vector bool short a, vector bool short b)
{
return vec_perm(a, b, (vector unsigned char)
(0x00, 0x01, 0x10, 0x11, 0x02, 0x03, 0x12, 0x13,
0x04, 0x05, 0x14, 0x15, 0x06, 0x07, 0x16, 0x17));
}
static vector pixel __ATTRS_o_ai
vec_mergeh(vector pixel a, vector pixel b)
{
return vec_perm(a, b, (vector unsigned char)
(0x00, 0x01, 0x10, 0x11, 0x02, 0x03, 0x12, 0x13,
0x04, 0x05, 0x14, 0x15, 0x06, 0x07, 0x16, 0x17));
}
static vector int __ATTRS_o_ai
vec_mergeh(vector int a, vector int b)
{
return vec_perm(a, b, (vector unsigned char)
(0x00, 0x01, 0x02, 0x03, 0x10, 0x11, 0x12, 0x13,
0x04, 0x05, 0x06, 0x07, 0x14, 0x15, 0x16, 0x17));
}
static vector unsigned int __ATTRS_o_ai
vec_mergeh(vector unsigned int a, vector unsigned int b)
{
return vec_perm(a, b, (vector unsigned char)
(0x00, 0x01, 0x02, 0x03, 0x10, 0x11, 0x12, 0x13,
0x04, 0x05, 0x06, 0x07, 0x14, 0x15, 0x16, 0x17));
}
static vector bool int __ATTRS_o_ai
vec_mergeh(vector bool int a, vector bool int b)
{
return vec_perm(a, b, (vector unsigned char)
(0x00, 0x01, 0x02, 0x03, 0x10, 0x11, 0x12, 0x13,
0x04, 0x05, 0x06, 0x07, 0x14, 0x15, 0x16, 0x17));
}
static vector float __ATTRS_o_ai
vec_mergeh(vector float a, vector float b)
{
return vec_perm(a, b, (vector unsigned char)
(0x00, 0x01, 0x02, 0x03, 0x10, 0x11, 0x12, 0x13,
0x04, 0x05, 0x06, 0x07, 0x14, 0x15, 0x16, 0x17));
}
/* vec_vmrghb */
#define __builtin_altivec_vmrghb vec_vmrghb
static vector signed char __ATTRS_o_ai
vec_vmrghb(vector signed char a, vector signed char b)
{
return vec_perm(a, b, (vector unsigned char)
(0x00, 0x10, 0x01, 0x11, 0x02, 0x12, 0x03, 0x13,
0x04, 0x14, 0x05, 0x15, 0x06, 0x16, 0x07, 0x17));
}
static vector unsigned char __ATTRS_o_ai
vec_vmrghb(vector unsigned char a, vector unsigned char b)
{
return vec_perm(a, b, (vector unsigned char)
(0x00, 0x10, 0x01, 0x11, 0x02, 0x12, 0x03, 0x13,
0x04, 0x14, 0x05, 0x15, 0x06, 0x16, 0x07, 0x17));
}
static vector bool char __ATTRS_o_ai
vec_vmrghb(vector bool char a, vector bool char b)
{
return vec_perm(a, b, (vector unsigned char)
(0x00, 0x10, 0x01, 0x11, 0x02, 0x12, 0x03, 0x13,
0x04, 0x14, 0x05, 0x15, 0x06, 0x16, 0x07, 0x17));
}
/* vec_vmrghh */
#define __builtin_altivec_vmrghh vec_vmrghh
static vector short __ATTRS_o_ai
vec_vmrghh(vector short a, vector short b)
{
return vec_perm(a, b, (vector unsigned char)
(0x00, 0x01, 0x10, 0x11, 0x02, 0x03, 0x12, 0x13,
0x04, 0x05, 0x14, 0x15, 0x06, 0x07, 0x16, 0x17));
}
static vector unsigned short __ATTRS_o_ai