1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
|
/* { dg-do compile { target { powerpc*-*-* } } } */
/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
/* { dg-require-effective-target powerpc_vsx_ok } */
/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power7" } } */
/* { dg-options "-O3 -mcpu=power7" } */
/* { dg-final { scan-assembler "xxsldwi" } } */
/* { dg-final { scan-assembler "xxpermdi" } } */
#include <altivec.h>
vector double
v2df_shift (vector double a, vector double b)
{
return vec_xxsldwi (a, b, 1);
}
vector float
v4sf_shift (vector float a, vector float b)
{
return vec_xxsldwi (a, b, 1);
}
vector long long
v2di_shift (vector long long a, vector long long b)
{
return vec_xxsldwi (a, b, 1);
}
vector unsigned long long
v2diu_shift (vector unsigned long long a, vector unsigned long long b)
{
return vec_xxsldwi (a, b, 1);
}
vector int
v4si_shift (vector int a, vector int b)
{
return vec_xxsldwi (a, b, 1);
}
vector unsigned int
v4siu_shift (vector unsigned int a, vector unsigned int b)
{
return vec_xxsldwi (a, b, 1);
}
vector short
v8hi_shift (vector short a, vector short b)
{
return vec_xxsldwi (a, b, 1);
}
vector unsigned short
v8hiu_shift (vector unsigned short a, vector unsigned short b)
{
return vec_xxsldwi (a, b, 1);
}
vector signed char
v16qi_shift (vector signed char a, vector signed char b)
{
return vec_xxsldwi (a, b, 1);
}
vector unsigned char
v16qiu_shift (vector unsigned char a, vector unsigned char b)
{
return vec_xxsldwi (a, b, 1);
}
vector double
v2df_permute (vector double a, vector double b)
{
return vec_xxpermdi (a, b, 1);
}
vector float
v4sf_permute (vector float a, vector float b)
{
return vec_xxpermdi (a, b, 1);
}
vector long long
v2di_permute (vector long long a, vector long long b)
{
return vec_xxpermdi (a, b, 1);
}
vector unsigned long long
v2diu_permute (vector unsigned long long a, vector unsigned long long b)
{
return vec_xxpermdi (a, b, 1);
}
vector int
v4si_permute (vector int a, vector int b)
{
return vec_xxpermdi (a, b, 1);
}
vector unsigned int
v4siu_permute (vector unsigned int a, vector unsigned int b)
{
return vec_xxpermdi (a, b, 1);
}
vector short
v8hi_permute (vector short a, vector short b)
{
return vec_xxpermdi (a, b, 1);
}
vector unsigned short
v8hiu_permute (vector unsigned short a, vector unsigned short b)
{
return vec_xxpermdi (a, b, 1);
}
vector signed char
v16qi_permute (vector signed char a, vector signed char b)
{
return vec_xxpermdi (a, b, 1);
}
vector unsigned char
v16qiu_permute (vector unsigned char a, vector unsigned char b)
{
return vec_xxpermdi (a, b, 1);
}
|