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);
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)
{
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)
{
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)
{
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
0x04, 0x05, 0x14, 0x15, 0x06, 0x07, 0x16, 0x17));
}
+static vector bool short __ATTRS_o_ai
+vec_vmrghh(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_vmrghh(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));
+}
+
/* vec_vmrghw */
#define __builtin_altivec_vmrghw vec_vmrghw
0x04, 0x05, 0x06, 0x07, 0x14, 0x15, 0x16, 0x17));
}
+static vector bool int __ATTRS_o_ai
+vec_vmrghw(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_vmrghw(vector float a, vector float b)
{
0x0C, 0x1C, 0x0D, 0x1D, 0x0E, 0x1E, 0x0F, 0x1F));
}
+static vector bool char __ATTRS_o_ai
+vec_mergel(vector bool char a, vector bool char b)
+{
+ return vec_perm(a, b, (vector unsigned char)
+ (0x08, 0x18, 0x09, 0x19, 0x0A, 0x1A, 0x0B, 0x1B,
+ 0x0C, 0x1C, 0x0D, 0x1D, 0x0E, 0x1E, 0x0F, 0x1F));
+}
+
static vector short __ATTRS_o_ai
vec_mergel(vector short a, vector short b)
{
0x0C, 0x0D, 0x1C, 0x1D, 0x0E, 0x0F, 0x1E, 0x1F));
}
+static vector bool short __ATTRS_o_ai
+vec_mergel(vector bool short a, vector bool short b)
+{
+ return vec_perm(a, b, (vector unsigned char)
+ (0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B, 0x1A, 0x1B,
+ 0x0C, 0x0D, 0x1C, 0x1D, 0x0E, 0x0F, 0x1E, 0x1F));
+}
+
+static vector pixel __ATTRS_o_ai
+vec_mergel(vector pixel a, vector pixel b)
+{
+ return vec_perm(a, b, (vector unsigned char)
+ (0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B, 0x1A, 0x1B,
+ 0x0C, 0x0D, 0x1C, 0x1D, 0x0E, 0x0F, 0x1E, 0x1F));
+}
+
static vector int __ATTRS_o_ai
vec_mergel(vector int a, vector int b)
{
0x0C, 0x0D, 0x0E, 0x0F, 0x1C, 0x1D, 0x1E, 0x1F));
}
+static vector bool int __ATTRS_o_ai
+vec_mergel(vector bool int a, vector bool int b)
+{
+ return vec_perm(a, b, (vector unsigned char)
+ (0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19, 0x1A, 0x1B,
+ 0x0C, 0x0D, 0x0E, 0x0F, 0x1C, 0x1D, 0x1E, 0x1F));
+}
+
static vector float __ATTRS_o_ai
vec_mergel(vector float a, vector float b)
{
0x0C, 0x1C, 0x0D, 0x1D, 0x0E, 0x1E, 0x0F, 0x1F));
}
+static vector bool char __ATTRS_o_ai
+vec_vmrglb(vector bool char a, vector bool char b)
+{
+ return vec_perm(a, b, (vector unsigned char)
+ (0x08, 0x18, 0x09, 0x19, 0x0A, 0x1A, 0x0B, 0x1B,
+ 0x0C, 0x1C, 0x0D, 0x1D, 0x0E, 0x1E, 0x0F, 0x1F));
+}
+
/* vec_vmrglh */
#define __builtin_altivec_vmrglh vec_vmrglh
0x0C, 0x0D, 0x1C, 0x1D, 0x0E, 0x0F, 0x1E, 0x1F));
}
+static vector bool short __ATTRS_o_ai
+vec_vmrglh(vector bool short a, vector bool short b)
+{
+ return vec_perm(a, b, (vector unsigned char)
+ (0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B, 0x1A, 0x1B,
+ 0x0C, 0x0D, 0x1C, 0x1D, 0x0E, 0x0F, 0x1E, 0x1F));
+}
+
+static vector pixel __ATTRS_o_ai
+vec_vmrglh(vector pixel a, vector pixel b)
+{
+ return vec_perm(a, b, (vector unsigned char)
+ (0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B, 0x1A, 0x1B,
+ 0x0C, 0x0D, 0x1C, 0x1D, 0x0E, 0x0F, 0x1E, 0x1F));
+}
+
/* vec_vmrglw */
#define __builtin_altivec_vmrglw vec_vmrglw
0x0C, 0x0D, 0x0E, 0x0F, 0x1C, 0x1D, 0x1E, 0x1F));
}
+static vector bool int __ATTRS_o_ai
+vec_vmrglw(vector bool int a, vector bool int b)
+{
+ return vec_perm(a, b, (vector unsigned char)
+ (0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19, 0x1A, 0x1B,
+ 0x0C, 0x0D, 0x0E, 0x0F, 0x1C, 0x1D, 0x1E, 0x1F));
+}
+
static vector float __ATTRS_o_ai
vec_vmrglw(vector float a, vector float b)
{
0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F));
}
+static vector bool char __ATTRS_o_ai
+vec_pack(vector bool short a, vector bool short b)
+{
+ return (vector bool char)vec_perm(a, b, (vector unsigned char)
+ (0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F,
+ 0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F));
+}
+
static vector short __ATTRS_o_ai
vec_pack(vector int a, vector int b)
{
0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F));
}
+static vector bool short __ATTRS_o_ai
+vec_pack(vector bool int a, vector bool int b)
+{
+ return (vector bool short)vec_perm(a, b, (vector unsigned char)
+ (0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F,
+ 0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F));
+}
+
/* vec_vpkuhum */
#define __builtin_altivec_vpkuhum vec_vpkuhum
0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F));
}
+static vector bool char __ATTRS_o_ai
+vec_vpkuhum(vector bool short a, vector bool short b)
+{
+ return (vector bool char)vec_perm(a, b, (vector unsigned char)
+ (0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F,
+ 0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F));
+}
+
/* vec_vpkuwum */
#define __builtin_altivec_vpkuwum vec_vpkuwum
0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F));
}
+static vector bool short __ATTRS_o_ai
+vec_vpkuwum(vector bool int a, vector bool int b)
+{
+ return (vector bool short)vec_perm(a, b, (vector unsigned char)
+ (0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F,
+ 0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F));
+}
+
/* vec_packpx */
static vector pixel __attribute__((__always_inline__))
return (vector unsigned char)__builtin_altivec_vperm_4si((vector int)a, (vector int)b, c);
}
+vector bool char __ATTRS_o_ai
+vec_perm(vector bool char a, vector bool char b, vector unsigned char c)
+{
+ return (vector bool char)__builtin_altivec_vperm_4si((vector int)a, (vector int)b, c);
+}
+
vector short __ATTRS_o_ai
vec_perm(vector short a, vector short b, vector unsigned char c)
{
return (vector unsigned short)__builtin_altivec_vperm_4si((vector int)a, (vector int)b, c);
}
+vector bool short __ATTRS_o_ai
+vec_perm(vector bool short a, vector bool short b, vector unsigned char c)
+{
+ return (vector bool short)__builtin_altivec_vperm_4si((vector int)a, (vector int)b, c);
+}
+
+vector pixel __ATTRS_o_ai
+vec_perm(vector pixel a, vector pixel b, vector unsigned char c)
+{
+ return (vector pixel)__builtin_altivec_vperm_4si((vector int)a, (vector int)b, c);
+}
+
vector int __ATTRS_o_ai
vec_perm(vector int a, vector int b, vector unsigned char c)
{
return (vector unsigned int)__builtin_altivec_vperm_4si((vector int)a, (vector int)b, c);
}
+vector bool int __ATTRS_o_ai
+vec_perm(vector bool int a, vector bool int b, vector unsigned char c)
+{
+ return (vector bool int)__builtin_altivec_vperm_4si((vector int)a, (vector int)b, c);
+}
+
vector float __ATTRS_o_ai
vec_perm(vector float a, vector float b, vector unsigned char c)
{
return (vector unsigned char)__builtin_altivec_vperm_4si((vector int)a, (vector int)b, c);
}
+vector bool char __ATTRS_o_ai
+vec_vperm(vector bool char a, vector bool char b, vector unsigned char c)
+{
+ return (vector bool char)__builtin_altivec_vperm_4si((vector int)a, (vector int)b, c);
+}
+
vector short __ATTRS_o_ai
vec_vperm(vector short a, vector short b, vector unsigned char c)
{
return (vector unsigned short)__builtin_altivec_vperm_4si((vector int)a, (vector int)b, c);
}
+vector bool short __ATTRS_o_ai
+vec_vperm(vector bool short a, vector bool short b, vector unsigned char c)
+{
+ return (vector bool short)__builtin_altivec_vperm_4si((vector int)a, (vector int)b, c);
+}
+
+vector pixel __ATTRS_o_ai
+vec_vperm(vector pixel a, vector pixel b, vector unsigned char c)
+{
+ return (vector pixel)__builtin_altivec_vperm_4si((vector int)a, (vector int)b, c);
+}
+
vector int __ATTRS_o_ai
vec_vperm(vector int a, vector int b, vector unsigned char c)
{
return (vector unsigned int)__builtin_altivec_vperm_4si((vector int)a, (vector int)b, c);
}
+vector bool int __ATTRS_o_ai
+vec_vperm(vector bool int a, vector bool int b, vector unsigned char c)
+{
+ return (vector bool int)__builtin_altivec_vperm_4si((vector int)a, (vector int)b, c);
+}
+
vector float __ATTRS_o_ai
vec_vperm(vector float a, vector float b, vector unsigned char c)
{
static vector signed char __ATTRS_o_ai
vec_sld(vector signed char a, vector signed char b, unsigned char c)
{
- return (vector signed char)vec_perm(a, b, (vector unsigned char)
+ return vec_perm(a, b, (vector unsigned char)
(c, c+1, c+2, c+3, c+4, c+5, c+6, c+7,
c+8, c+9, c+10, c+11, c+12, c+13, c+14, c+15));
}
static vector unsigned char __ATTRS_o_ai
vec_sld(vector unsigned char a, vector unsigned char b, unsigned char c)
{
- return (vector unsigned char)vec_perm(a, b, (vector unsigned char)
+ return vec_perm(a, b, (vector unsigned char)
(c, c+1, c+2, c+3, c+4, c+5, c+6, c+7,
c+8, c+9, c+10, c+11, c+12, c+13, c+14, c+15));
}
static vector short __ATTRS_o_ai
vec_sld(vector short a, vector short b, unsigned char c)
{
- return (vector short)vec_perm(a, b, (vector unsigned char)
+ return vec_perm(a, b, (vector unsigned char)
(c, c+1, c+2, c+3, c+4, c+5, c+6, c+7,
c+8, c+9, c+10, c+11, c+12, c+13, c+14, c+15));
}
static vector unsigned short __ATTRS_o_ai
vec_sld(vector unsigned short a, vector unsigned short b, unsigned char c)
{
- return (vector unsigned short)vec_perm(a, b, (vector unsigned char)
+ return vec_perm(a, b, (vector unsigned char)
+ (c, c+1, c+2, c+3, c+4, c+5, c+6, c+7,
+ c+8, c+9, c+10, c+11, c+12, c+13, c+14, c+15));
+}
+
+static vector pixel __ATTRS_o_ai
+vec_sld(vector pixel a, vector pixel b, unsigned char c)
+{
+ return vec_perm(a, b, (vector unsigned char)
(c, c+1, c+2, c+3, c+4, c+5, c+6, c+7,
c+8, c+9, c+10, c+11, c+12, c+13, c+14, c+15));
}
static vector unsigned int __ATTRS_o_ai
vec_sld(vector unsigned int a, vector unsigned int b, unsigned char c)
{
- return (vector unsigned int)vec_perm(a, b, (vector unsigned char)
+ return vec_perm(a, b, (vector unsigned char)
(c, c+1, c+2, c+3, c+4, c+5, c+6, c+7,
c+8, c+9, c+10, c+11, c+12, c+13, c+14, c+15));
}
static vector float __ATTRS_o_ai
vec_sld(vector float a, vector float b, unsigned char c)
{
- return (vector float)vec_perm(a, b, (vector unsigned char)
+ return vec_perm(a, b, (vector unsigned char)
(c, c+1, c+2, c+3, c+4, c+5, c+6, c+7,
c+8, c+9, c+10, c+11, c+12, c+13, c+14, c+15));
}
static vector signed char __ATTRS_o_ai
vec_vsldoi(vector signed char a, vector signed char b, unsigned char c)
{
- return (vector signed char)vec_perm(a, b, (vector unsigned char)
+ return vec_perm(a, b, (vector unsigned char)
(c, c+1, c+2, c+3, c+4, c+5, c+6, c+7,
c+8, c+9, c+10, c+11, c+12, c+13, c+14, c+15));
}
static vector unsigned char __ATTRS_o_ai
vec_vsldoi(vector unsigned char a, vector unsigned char b, unsigned char c)
{
- return (vector unsigned char)vec_perm(a, b, (vector unsigned char)
+ return vec_perm(a, b, (vector unsigned char)
(c, c+1, c+2, c+3, c+4, c+5, c+6, c+7,
c+8, c+9, c+10, c+11, c+12, c+13, c+14, c+15));
}
static vector short __ATTRS_o_ai
vec_vsldoi(vector short a, vector short b, unsigned char c)
{
- return (vector short)vec_perm(a, b, (vector unsigned char)
+ return vec_perm(a, b, (vector unsigned char)
(c, c+1, c+2, c+3, c+4, c+5, c+6, c+7,
c+8, c+9, c+10, c+11, c+12, c+13, c+14, c+15));
}
static vector unsigned short __ATTRS_o_ai
vec_vsldoi(vector unsigned short a, vector unsigned short b, unsigned char c)
{
- return (vector unsigned short)vec_perm(a, b, (vector unsigned char)
+ return vec_perm(a, b, (vector unsigned char)
+ (c, c+1, c+2, c+3, c+4, c+5, c+6, c+7,
+ c+8, c+9, c+10, c+11, c+12, c+13, c+14, c+15));
+}
+
+static vector pixel __ATTRS_o_ai
+vec_vsldoi(vector pixel a, vector pixel b, unsigned char c)
+{
+ return vec_perm(a, b, (vector unsigned char)
(c, c+1, c+2, c+3, c+4, c+5, c+6, c+7,
c+8, c+9, c+10, c+11, c+12, c+13, c+14, c+15));
}
static vector unsigned int __ATTRS_o_ai
vec_vsldoi(vector unsigned int a, vector unsigned int b, unsigned char c)
{
- return (vector unsigned int)vec_perm(a, b, (vector unsigned char)
+ return vec_perm(a, b, (vector unsigned char)
(c, c+1, c+2, c+3, c+4, c+5, c+6, c+7,
c+8, c+9, c+10, c+11, c+12, c+13, c+14, c+15));
}
static vector float __ATTRS_o_ai
vec_vsldoi(vector float a, vector float b, unsigned char c)
{
- return (vector float)vec_perm(a, b, (vector unsigned char)
+ return vec_perm(a, b, (vector unsigned char)
(c, c+1, c+2, c+3, c+4, c+5, c+6, c+7,
c+8, c+9, c+10, c+11, c+12, c+13, c+14, c+15));
}
static vector signed char __ATTRS_o_ai
vec_splat(vector signed char a, unsigned char b)
{
- return (vector signed char)vec_perm(a, a, (vector unsigned char)(b));
+ return vec_perm(a, a, (vector unsigned char)(b));
}
static vector unsigned char __ATTRS_o_ai
vec_splat(vector unsigned char a, unsigned char b)
{
- return (vector unsigned char)vec_perm(a, a, (vector unsigned char)(b));
+ return vec_perm(a, a, (vector unsigned char)(b));
+}
+
+static vector bool char __ATTRS_o_ai
+vec_splat(vector bool char a, unsigned char b)
+{
+ return vec_perm(a, a, (vector unsigned char)(b));
}
static vector short __ATTRS_o_ai
vec_splat(vector short a, unsigned char b)
{
b *= 2;
- return (vector short)vec_perm(a, a, (vector unsigned char)
+ return vec_perm(a, a, (vector unsigned char)
(b, b+1, b, b+1, b, b+1, b, b+1, b, b+1, b, b+1, b, b+1, b, b+1));
}
vec_splat(vector unsigned short a, unsigned char b)
{
b *= 2;
- return (vector unsigned short)vec_perm(a, a, (vector unsigned char)
+ return vec_perm(a, a, (vector unsigned char)
+ (b, b+1, b, b+1, b, b+1, b, b+1, b, b+1, b, b+1, b, b+1, b, b+1));
+}
+
+static vector bool short __ATTRS_o_ai
+vec_splat(vector bool short a, unsigned char b)
+{
+ b *= 2;
+ return vec_perm(a, a, (vector unsigned char)
+ (b, b+1, b, b+1, b, b+1, b, b+1, b, b+1, b, b+1, b, b+1, b, b+1));
+}
+
+static vector pixel __ATTRS_o_ai
+vec_splat(vector pixel a, unsigned char b)
+{
+ b *= 2;
+ return vec_perm(a, a, (vector unsigned char)
(b, b+1, b, b+1, b, b+1, b, b+1, b, b+1, b, b+1, b, b+1, b, b+1));
}
vec_splat(vector unsigned int a, unsigned char b)
{
b *= 4;
- return (vector unsigned int)vec_perm(a, a, (vector unsigned char)
+ return vec_perm(a, a, (vector unsigned char)
+ (b, b+1, b+2, b+3, b, b+1, b+2, b+3, b, b+1, b+2, b+3, b, b+1, b+2, b+3));
+}
+
+static vector bool int __ATTRS_o_ai
+vec_splat(vector bool int a, unsigned char b)
+{
+ b *= 4;
+ return vec_perm(a, a, (vector unsigned char)
(b, b+1, b+2, b+3, b, b+1, b+2, b+3, b, b+1, b+2, b+3, b, b+1, b+2, b+3));
}
vec_splat(vector float a, unsigned char b)
{
b *= 4;
- return (vector float)vec_perm(a, a, (vector unsigned char)
+ return vec_perm(a, a, (vector unsigned char)
(b, b+1, b+2, b+3, b, b+1, b+2, b+3, b, b+1, b+2, b+3, b, b+1, b+2, b+3));
}
static vector signed char __ATTRS_o_ai
vec_vspltb(vector signed char a, unsigned char b)
{
- return (vector signed char)vec_perm(a, a, (vector unsigned char)(b));
+ return vec_perm(a, a, (vector unsigned char)(b));
}
static vector unsigned char __ATTRS_o_ai
vec_vspltb(vector unsigned char a, unsigned char b)
{
- return (vector unsigned char)vec_perm(a, a, (vector unsigned char)(b));
+ return vec_perm(a, a, (vector unsigned char)(b));
+}
+
+static vector bool char __ATTRS_o_ai
+vec_vspltb(vector bool char a, unsigned char b)
+{
+ return vec_perm(a, a, (vector unsigned char)(b));
}
/* vec_vsplth */
vec_vsplth(vector short a, unsigned char b)
{
b *= 2;
- return (vector short)vec_perm(a, a, (vector unsigned char)
+ return vec_perm(a, a, (vector unsigned char)
(b, b+1, b, b+1, b, b+1, b, b+1, b, b+1, b, b+1, b, b+1, b, b+1));
}
vec_vsplth(vector unsigned short a, unsigned char b)
{
b *= 2;
- return (vector unsigned short)vec_perm(a, a, (vector unsigned char)
+ return vec_perm(a, a, (vector unsigned char)
+ (b, b+1, b, b+1, b, b+1, b, b+1, b, b+1, b, b+1, b, b+1, b, b+1));
+}
+
+static vector bool short __ATTRS_o_ai
+vec_vsplth(vector bool short a, unsigned char b)
+{
+ b *= 2;
+ return vec_perm(a, a, (vector unsigned char)
+ (b, b+1, b, b+1, b, b+1, b, b+1, b, b+1, b, b+1, b, b+1, b, b+1));
+}
+
+static vector pixel __ATTRS_o_ai
+vec_vsplth(vector pixel a, unsigned char b)
+{
+ b *= 2;
+ return vec_perm(a, a, (vector unsigned char)
(b, b+1, b, b+1, b, b+1, b, b+1, b, b+1, b, b+1, b, b+1, b, b+1));
}
vec_vspltw(vector int a, unsigned char b)
{
b *= 4;
- return (vector int)vec_perm(a, a, (vector unsigned char)
+ return vec_perm(a, a, (vector unsigned char)
(b, b+1, b+2, b+3, b, b+1, b+2, b+3, b, b+1, b+2, b+3, b, b+1, b+2, b+3));
}
vec_vspltw(vector unsigned int a, unsigned char b)
{
b *= 4;
- return (vector unsigned int)vec_perm(a, a, (vector unsigned char)
+ return vec_perm(a, a, (vector unsigned char)
+ (b, b+1, b+2, b+3, b, b+1, b+2, b+3, b, b+1, b+2, b+3, b, b+1, b+2, b+3));
+}
+
+static vector bool int __ATTRS_o_ai
+vec_vspltw(vector bool int a, unsigned char b)
+{
+ b *= 4;
+ return vec_perm(a, a, (vector unsigned char)
(b, b+1, b+2, b+3, b, b+1, b+2, b+3, b, b+1, b+2, b+3, b, b+1, b+2, b+3));
}
vec_vspltw(vector float a, unsigned char b)
{
b *= 4;
- return (vector float)vec_perm(a, a, (vector unsigned char)
+ return vec_perm(a, a, (vector unsigned char)
(b, b+1, b+2, b+3, b, b+1, b+2, b+3, b, b+1, b+2, b+3, b, b+1, b+2, b+3));
}
vector bool short vbs = { 1, 0, 1, 0, 1, 0, 1, 0 };
vector short vs = { -1, 2, -3, 4, -5, 6, -7, 8 };
vector unsigned short vus = { 1, 2, 3, 4, 5, 6, 7, 8 };
+vector pixel vp = { 1, 2, 3, 4, 5, 6, 7, 8 };
vector bool int vbi = { 1, 0, 1, 0 };
vector int vi = { -1, 2, -3, 4 };
vector unsigned int vui = { 1, 2, 3, 4 };
/* vec_mergeh */
res_vsc = vec_mergeh(vsc, vsc); // CHECK: @llvm.ppc.altivec.vperm
res_vuc = vec_mergeh(vuc, vuc); // CHECK: @llvm.ppc.altivec.vperm
+ res_vbc = vec_mergeh(vbc, vbc); // CHECK: @llvm.ppc.altivec.vperm
res_vs = vec_mergeh(vs, vs); // CHECK: @llvm.ppc.altivec.vperm
+ res_vp = vec_mergeh(vp, vp); // CHECK: @llvm.ppc.altivec.vperm
res_vus = vec_mergeh(vus, vus); // CHECK: @llvm.ppc.altivec.vperm
+ res_vbs = vec_mergeh(vbs, vbs); // CHECK: @llvm.ppc.altivec.vperm
res_vi = vec_mergeh(vi, vi); // CHECK: @llvm.ppc.altivec.vperm
res_vui = vec_mergeh(vui, vui); // CHECK: @llvm.ppc.altivec.vperm
+ res_vbi = vec_mergeh(vbi, vbi); // CHECK: @llvm.ppc.altivec.vperm
res_vf = vec_mergeh(vf, vf); // CHECK: @llvm.ppc.altivec.vperm
res_vsc = vec_vmrghb(vsc, vsc); // CHECK: @llvm.ppc.altivec.vperm
res_vuc = vec_vmrghb(vuc, vuc); // CHECK: @llvm.ppc.altivec.vperm
+ res_vbc = vec_vmrghb(vbc, vbc); // CHECK: @llvm.ppc.altivec.vperm
res_vs = vec_vmrghh(vs, vs); // CHECK: @llvm.ppc.altivec.vperm
+ res_vp = vec_vmrghh(vp, vp); // CHECK: @llvm.ppc.altivec.vperm
res_vus = vec_vmrghh(vus, vus); // CHECK: @llvm.ppc.altivec.vperm
+ res_vbs = vec_vmrghh(vbs, vbs); // CHECK: @llvm.ppc.altivec.vperm
res_vi = vec_vmrghw(vi, vi); // CHECK: @llvm.ppc.altivec.vperm
res_vui = vec_vmrghw(vui, vui); // CHECK: @llvm.ppc.altivec.vperm
+ res_vbi = vec_vmrghw(vbi, vbi); // CHECK: @llvm.ppc.altivec.vperm
res_vf = vec_vmrghw(vf, vf); // CHECK: @llvm.ppc.altivec.vperm
/* vec_mergel */
res_vsc = vec_mergel(vsc, vsc); // CHECK: @llvm.ppc.altivec.vperm
res_vuc = vec_mergel(vuc, vuc); // CHECK: @llvm.ppc.altivec.vperm
+ res_vbc = vec_mergel(vbc, vbc); // CHECK: @llvm.ppc.altivec.vperm
res_vs = vec_mergel(vs, vs); // CHECK: @llvm.ppc.altivec.vperm
+ res_vp = vec_mergeh(vp, vp); // CHECK: @llvm.ppc.altivec.vperm
res_vus = vec_mergel(vus, vus); // CHECK: @llvm.ppc.altivec.vperm
+ res_vbs = vec_mergel(vbs, vbs); // CHECK: @llvm.ppc.altivec.vperm
res_vi = vec_mergel(vi, vi); // CHECK: @llvm.ppc.altivec.vperm
res_vui = vec_mergel(vui, vui); // CHECK: @llvm.ppc.altivec.vperm
+ res_vbi = vec_mergel(vbi, vbi); // CHECK: @llvm.ppc.altivec.vperm
res_vf = vec_mergel(vf, vf); // CHECK: @llvm.ppc.altivec.vperm
res_vsc = vec_vmrglb(vsc, vsc); // CHECK: @llvm.ppc.altivec.vperm
res_vuc = vec_vmrglb(vuc, vuc); // CHECK: @llvm.ppc.altivec.vperm
+ res_vbc = vec_vmrglb(vbc, vbc); // CHECK: @llvm.ppc.altivec.vperm
res_vs = vec_vmrglh(vs, vs); // CHECK: @llvm.ppc.altivec.vperm
+ res_vp = vec_vmrglh(vp, vp); // CHECK: @llvm.ppc.altivec.vperm
res_vus = vec_vmrglh(vus, vus); // CHECK: @llvm.ppc.altivec.vperm
+ res_vbs = vec_vmrglh(vbs, vbs); // CHECK: @llvm.ppc.altivec.vperm
res_vi = vec_vmrglw(vi, vi); // CHECK: @llvm.ppc.altivec.vperm
res_vui = vec_vmrglw(vui, vui); // CHECK: @llvm.ppc.altivec.vperm
+ res_vbi = vec_vmrglw(vbi, vbi); // CHECK: @llvm.ppc.altivec.vperm
res_vf = vec_vmrglw(vf, vf); // CHECK: @llvm.ppc.altivec.vperm
/* vec_mfvscr */
/* vec_pack */
res_vsc = vec_pack(vs, vs); // CHECK: @llvm.ppc.altivec.vperm
res_vuc = vec_pack(vus, vus); // CHECK: @llvm.ppc.altivec.vperm
+ res_vbc = vec_pack(vbs, vbs); // CHECK: @llvm.ppc.altivec.vperm
res_vs = vec_pack(vi, vi); // CHECK: @llvm.ppc.altivec.vperm
res_vus = vec_pack(vui, vui); // CHECK: @llvm.ppc.altivec.vperm
+ res_vbs = vec_pack(vbi, vbi); // CHECK: @llvm.ppc.altivec.vperm
res_vsc = vec_vpkuhum(vs, vs); // CHECK: @llvm.ppc.altivec.vperm
res_vuc = vec_vpkuhum(vus, vus); // CHECK: @llvm.ppc.altivec.vperm
+ res_vbc = vec_vpkuhum(vbs, vbs); // CHECK: @llvm.ppc.altivec.vperm
res_vs = vec_vpkuwum(vi, vi); // CHECK: @llvm.ppc.altivec.vperm
res_vus = vec_vpkuwum(vui, vui); // CHECK: @llvm.ppc.altivec.vperm
+ res_vbs = vec_vpkuwum(vbi, vbi); // CHECK: @llvm.ppc.altivec.vperm
/* vec_packpx */
res_vp = vec_packpx(vui, vui); // CHECK: @llvm.ppc.altivec.vpkpx
/* vec_perm */
res_vsc = vec_perm(vsc, vsc, vuc); // CHECK: @llvm.ppc.altivec.vperm
res_vuc = vec_perm(vuc, vuc, vuc); // CHECK: @llvm.ppc.altivec.vperm
+ res_vbc = vec_perm(vbc, vbc, vuc); // CHECK: @llvm.ppc.altivec.vperm
res_vs = vec_perm(vs, vs, vuc); // CHECK: @llvm.ppc.altivec.vperm
res_vus = vec_perm(vus, vus, vuc); // CHECK: @llvm.ppc.altivec.vperm
+ res_vbs = vec_perm(vbs, vbs, vuc); // CHECK: @llvm.ppc.altivec.vperm
+ res_vp = vec_perm(vp, vp, vuc); // CHECK: @llvm.ppc.altivec.vperm
res_vi = vec_perm(vi, vi, vuc); // CHECK: @llvm.ppc.altivec.vperm
res_vui = vec_perm(vui, vui, vuc); // CHECK: @llvm.ppc.altivec.vperm
+ res_vbi = vec_perm(vbi, vbi, vuc); // CHECK: @llvm.ppc.altivec.vperm
res_vf = vec_perm(vf, vf, vuc); // CHECK: @llvm.ppc.altivec.vperm
res_vsc = vec_vperm(vsc, vsc, vuc); // CHECK: @llvm.ppc.altivec.vperm
res_vuc = vec_vperm(vuc, vuc, vuc); // CHECK: @llvm.ppc.altivec.vperm
+ res_vbc = vec_vperm(vbc, vbc, vuc); // CHECK: @llvm.ppc.altivec.vperm
res_vs = vec_vperm(vs, vs, vuc); // CHECK: @llvm.ppc.altivec.vperm
res_vus = vec_vperm(vus, vus, vuc); // CHECK: @llvm.ppc.altivec.vperm
+ res_vbs = vec_vperm(vbs, vbs, vuc); // CHECK: @llvm.ppc.altivec.vperm
+ res_vp = vec_vperm(vp, vp, vuc); // CHECK: @llvm.ppc.altivec.vperm
res_vi = vec_vperm(vi, vi, vuc); // CHECK: @llvm.ppc.altivec.vperm
res_vui = vec_vperm(vui, vui, vuc); // CHECK: @llvm.ppc.altivec.vperm
+ res_vbi = vec_vperm(vbi, vbi, vuc); // CHECK: @llvm.ppc.altivec.vperm
res_vf = vec_vperm(vf, vf, vuc); // CHECK: @llvm.ppc.altivec.vperm
/* vec_re */
res_vuc = vec_sld(vuc, vuc, 0); // CHECK: @llvm.ppc.altivec.vperm
res_vs = vec_sld(vs, vs, 0); // CHECK: @llvm.ppc.altivec.vperm
res_vus = vec_sld(vus, vus, 0); // CHECK: @llvm.ppc.altivec.vperm
+ res_vp = vec_sld(vp, vp, 0); // CHECK: @llvm.ppc.altivec.vperm
res_vi = vec_sld(vi, vi, 0); // CHECK: @llvm.ppc.altivec.vperm
res_vui = vec_sld(vui, vui, 0); // CHECK: @llvm.ppc.altivec.vperm
res_vf = vec_sld(vf, vf, 0); // CHECK: @llvm.ppc.altivec.vperm
res_vuc = vec_vsldoi(vuc, vuc, 0); // CHECK: @llvm.ppc.altivec.vperm
res_vs = vec_vsldoi(vs, vs, 0); // CHECK: @llvm.ppc.altivec.vperm
res_vus = vec_vsldoi(vus, vus, 0); // CHECK: @llvm.ppc.altivec.vperm
+ res_vp = vec_vsldoi(vp, vp, 0); // CHECK: @llvm.ppc.altivec.vperm
res_vi = vec_vsldoi(vi, vi, 0); // CHECK: @llvm.ppc.altivec.vperm
res_vui = vec_vsldoi(vui, vui, 0); // CHECK: @llvm.ppc.altivec.vperm
res_vf = vec_vsldoi(vf, vf, 0); // CHECK: @llvm.ppc.altivec.vperm
/* vec_splat */
res_vsc = vec_splat(vsc, 0); // CHECK: @llvm.ppc.altivec.vperm
res_vuc = vec_splat(vuc, 0); // CHECK: @llvm.ppc.altivec.vperm
+ res_vbc = vec_splat(vbc, 0); // CHECK: @llvm.ppc.altivec.vperm
res_vs = vec_splat(vs, 0); // CHECK: @llvm.ppc.altivec.vperm
res_vus = vec_splat(vus, 0); // CHECK: @llvm.ppc.altivec.vperm
+ res_vbs = vec_splat(vbs, 0); // CHECK: @llvm.ppc.altivec.vperm
+ res_vp = vec_splat(vp, 0); // CHECK: @llvm.ppc.altivec.vperm
res_vi = vec_splat(vi, 0); // CHECK: @llvm.ppc.altivec.vperm
res_vui = vec_splat(vui, 0); // CHECK: @llvm.ppc.altivec.vperm
+ res_vbi = vec_splat(vbi, 0); // CHECK: @llvm.ppc.altivec.vperm
res_vf = vec_splat(vf, 0); // CHECK: @llvm.ppc.altivec.vperm
res_vsc = vec_vspltb(vsc, 0); // CHECK: @llvm.ppc.altivec.vperm
res_vuc = vec_vspltb(vuc, 0); // CHECK: @llvm.ppc.altivec.vperm
+ res_vbc = vec_vspltb(vbc, 0); // CHECK: @llvm.ppc.altivec.vperm
res_vs = vec_vsplth(vs, 0); // CHECK: @llvm.ppc.altivec.vperm
res_vus = vec_vsplth(vus, 0); // CHECK: @llvm.ppc.altivec.vperm
+ res_vbs = vec_vsplth(vbs, 0); // CHECK: @llvm.ppc.altivec.vperm
+ res_vp = vec_vsplth(vp, 0); // CHECK: @llvm.ppc.altivec.vperm
res_vi = vec_vspltw(vi, 0); // CHECK: @llvm.ppc.altivec.vperm
res_vui = vec_vspltw(vui, 0); // CHECK: @llvm.ppc.altivec.vperm
+ res_vbi = vec_vspltw(vbi, 0); // CHECK: @llvm.ppc.altivec.vperm
res_vf = vec_vspltw(vf, 0); // CHECK: @llvm.ppc.altivec.vperm
/* vec_splat_s8 */