OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [vmx/] [5-11.c] - Blame information for rev 816

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 298 jeremybenn
/* { dg-do compile } */
2
#include <altivec.h>
3
extern void fu32(vector unsigned int, vector unsigned int,
4
                 vector unsigned int, vector unsigned int);
5
void fxu32(vector unsigned int u32a, vector unsigned int u32b,
6
           vector unsigned int u32c, vector unsigned int u32d)
7
{
8
 fu32 (u32a,
9
       u32b,
10
       u32c,
11
       vec_avg(u32d, u32d));
12
 fu32 (vec_or (u32a, u32a),
13
       vec_and (u32b, u32b),
14
       vec_max (u32c, u32c),
15
       vec_min (u32d, u32d));
16
 fu32 (vec_sld (u32a, u32a, 0),
17
       vec_sld (u32b, u32b, 0),
18
       vec_sld (u32c, u32c, 0),
19
       vec_sld (u32d, u32d, 0));
20
 fu32 (((vector unsigned int){0,0,0,0}),
21
       ((vector unsigned int){0,0,0,0}),
22
       ((vector unsigned int){0,0,0,0}),
23
       ((vector unsigned int){0,0,0,0}));
24
 fu32 (vec_xor(u32a, u32a),
25
       vec_andc(u32b, u32b),
26
       vec_sub(u32c, u32c),
27
       vec_subs(u32d, u32d));
28
 fu32 (vec_splat_u32(0),
29
       vec_splat_u32(0),
30
       vec_splat_u32(0),
31
       vec_splat_u32(0));
32
 fu32 (((vector unsigned int){0xffffffff,0xffffffff,0xffffffff,0xffffffff}),
33
       ((vector unsigned int){0xffffffff,0xffffffff,0xffffffff,0xffffffff}),
34
       ((vector unsigned int){0xffffffff,0xffffffff,0xffffffff,0xffffffff}),
35
       ((vector unsigned int){0xffffffff,0xffffffff,0xffffffff,0xffffffff}));
36
 fu32 (vec_splat_u32(-1),
37
       vec_splat_u32(-1),
38
       vec_splat_u32(-1),
39
       vec_splat_u32(-1));
40
 fu32 ((vector unsigned int)vec_cmpeq(u32a, u32a),
41
       (vector unsigned int)vec_cmpeq(u32b, u32b),
42
       (vector unsigned int)vec_cmpeq(u32c, u32c),
43
       (vector unsigned int)vec_cmpeq(u32d, u32d));
44
}
45
 
46
extern void fu16(vector unsigned short, vector unsigned short,
47
                 vector unsigned short, vector unsigned short);
48
void fxu16(vector unsigned short u16a, vector unsigned short u16b,
49
           vector unsigned short u16c, vector unsigned short u16d)
50
{
51
 fu16 (u16a,
52
       u16b,
53
       u16c,
54
       vec_avg(u16d, u16d));
55
 fu16 (vec_or (u16a, u16a),
56
       vec_and (u16b, u16b),
57
       vec_max (u16c, u16c),
58
       vec_min (u16d, u16d));
59
 fu16 (vec_sld (u16a, u16a, 0),
60
       vec_sld (u16b, u16b, 0),
61
       vec_sld (u16c, u16c, 0),
62
       vec_sld (u16d, u16d, 0));
63
 fu16 (((vector unsigned short){0,0,0,0,0,0,0,0}),
64
       ((vector unsigned short){0,0,0,0,0,0,0,0}),
65
       ((vector unsigned short){0,0,0,0,0,0,0,0}),
66
       ((vector unsigned short){0,0,0,0,0,0,0,0}));
67
 fu16 (vec_xor(u16a, u16a),
68
       vec_andc(u16b, u16b),
69
       vec_sub(u16c, u16c),
70
       vec_subs(u16d, u16d));
71
 fu16 (vec_splat_u16(0),
72
       vec_splat_u16(0),
73
       vec_splat_u16(0),
74
       vec_splat_u16(0));
75
 fu16 (((vector unsigned short){0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff}),
76
       ((vector unsigned short){0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff}),
77
       ((vector unsigned short){0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff}),
78
       ((vector unsigned short){0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff}));
79
 fu16 (vec_splat_u16(-1),
80
       vec_splat_u16(-1),
81
       vec_splat_u16(-1),
82
       vec_splat_u16(-1));
83
 fu16 ((vector unsigned short)vec_cmpeq(u16a, u16a),
84
       (vector unsigned short)vec_cmpeq(u16b, u16b),
85
       (vector unsigned short)vec_cmpeq(u16c, u16c),
86
       (vector unsigned short)vec_cmpeq(u16d, u16d));
87
}
88
 
89
extern void fu8(vector unsigned char, vector unsigned char,
90
                vector unsigned char, vector unsigned char);
91
void fxu8(vector unsigned char u8a, vector unsigned char u8b,
92
           vector unsigned char u8c, vector unsigned char u8d)
93
{
94
 fu8 (u8a,
95
       u8b,
96
       u8c,
97
       vec_avg(u8d, u8d));
98
 fu8 (vec_or (u8a, u8a),
99
       vec_and (u8b, u8b),
100
       vec_max (u8c, u8c),
101
       vec_min (u8d, u8d));
102
 fu8 (vec_sld (u8a, u8a, 0),
103
       vec_sld (u8b, u8b, 0),
104
       vec_sld (u8c, u8c, 0),
105
       vec_sld (u8d, u8d, 0));
106
 fu8 (((vector unsigned char){0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}),
107
       ((vector unsigned char){0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}),
108
       ((vector unsigned char){0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}),
109
       ((vector unsigned char){0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}));
110
 fu8 (vec_xor(u8a, u8a),
111
       vec_andc(u8b, u8b),
112
       vec_sub(u8c, u8c),
113
       vec_subs(u8d, u8d));
114
 fu8 (vec_splat_u8(0),
115
       vec_splat_u8(0),
116
       vec_splat_u8(0),
117
       vec_splat_u8(0));
118
 fu8 (((vector unsigned char){0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff}),
119
       ((vector unsigned char){0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff}),
120
       ((vector unsigned char){0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff}),
121
       ((vector unsigned char){0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff}));
122
 fu8 (vec_splat_u8(-1),
123
       vec_splat_u8(-1),
124
       vec_splat_u8(-1),
125
       vec_splat_u8(-1));
126
 fu8 ((vector unsigned char)vec_cmpeq(u8a, u8a),
127
       (vector unsigned char)vec_cmpeq(u8b, u8b),
128
       (vector unsigned char)vec_cmpeq(u8c, u8c),
129
       (vector unsigned char)vec_cmpeq(u8d, u8d));
130
}
131
 
132
extern void fs32(vector signed int, vector signed int,
133
                 vector signed int, vector signed int);
134
void fxs32(vector signed int s32a, vector signed int s32b,
135
           vector signed int s32c, vector signed int s32d)
136
{
137
 fs32 (s32a,
138
       s32b,
139
       s32c,
140
       vec_avg(s32d, s32d));
141
 fs32 (vec_or (s32a, s32a),
142
       vec_and (s32b, s32b),
143
       vec_max (s32c, s32c),
144
       vec_min (s32d, s32d));
145
 fs32 (vec_sld (s32a, s32a, 0),
146
       vec_sld (s32b, s32b, 0),
147
       vec_sld (s32c, s32c, 0),
148
       vec_sld (s32d, s32d, 0));
149
 fs32 (((vector signed int){0,0,0,0}),
150
       ((vector signed int){0,0,0,0}),
151
       ((vector signed int){0,0,0,0}),
152
       ((vector signed int){0,0,0,0}));
153
 fs32 (vec_xor(s32a, s32a),
154
       vec_andc(s32b, s32b),
155
       vec_sub(s32c, s32c),
156
       vec_subs(s32d, s32d));
157
 fs32 (vec_splat_s32(0),
158
       vec_splat_s32(0),
159
       vec_splat_s32(0),
160
       vec_splat_s32(0));
161
 fs32 (((vector signed int){-1,-1,-1,-1}),
162
       ((vector signed int){-1,-1,-1,-1}),
163
       ((vector signed int){-1,-1,-1,-1}),
164
       ((vector signed int){-1,-1,-1,-1}));
165
 fs32 (vec_splat_s32(-1),
166
       vec_splat_s32(-1),
167
       vec_splat_s32(-1),
168
       vec_splat_s32(-1));
169
 fs32 ((vector signed int)vec_cmpeq(s32a, s32a),
170
       (vector signed int)vec_cmpeq(s32b, s32b),
171
       (vector signed int)vec_cmpeq(s32c, s32c),
172
       (vector signed int)vec_cmpeq(s32d, s32d));
173
}
174
 
175
extern void fs16(vector signed short, vector signed short,
176
                 vector signed short, vector signed short);
177
void fxs16(vector signed short s16a, vector signed short s16b,
178
           vector signed short s16c, vector signed short s16d)
179
{
180
 fs16 (s16a,
181
       s16b,
182
       s16c,
183
       vec_avg(s16d, s16d));
184
 fs16 (vec_or (s16a, s16a),
185
       vec_and (s16b, s16b),
186
       vec_max (s16c, s16c),
187
       vec_min (s16d, s16d));
188
 fs16 (vec_sld (s16a, s16a, 0),
189
       vec_sld (s16b, s16b, 0),
190
       vec_sld (s16c, s16c, 0),
191
       vec_sld (s16d, s16d, 0));
192
 fs16 (((vector signed short){0,0,0,0,0,0,0,0}),
193
       ((vector signed short){0,0,0,0,0,0,0,0}),
194
       ((vector signed short){0,0,0,0,0,0,0,0}),
195
       ((vector signed short){0,0,0,0,0,0,0,0}));
196
 fs16 (vec_xor(s16a, s16a),
197
       vec_andc(s16b, s16b),
198
       vec_sub(s16c, s16c),
199
       vec_subs(s16d, s16d));
200
 fs16 (vec_splat_s16(0),
201
       vec_splat_s16(0),
202
       vec_splat_s16(0),
203
       vec_splat_s16(0));
204
 fs16 (((vector signed short){-1,-1,-1,-1,-1,-1,-1,-1}),
205
       ((vector signed short){-1,-1,-1,-1,-1,-1,-1,-1}),
206
       ((vector signed short){-1,-1,-1,-1,-1,-1,-1,-1}),
207
       ((vector signed short){-1,-1,-1,-1,-1,-1,-1,-1}));
208
 fs16 (vec_splat_s16(-1),
209
       vec_splat_s16(-1),
210
       vec_splat_s16(-1),
211
       vec_splat_s16(-1));
212
 fs16 ((vector signed short)vec_cmpeq(s16a, s16a),
213
       (vector signed short)vec_cmpeq(s16b, s16b),
214
       (vector signed short)vec_cmpeq(s16c, s16c),
215
       (vector signed short)vec_cmpeq(s16d, s16d));
216
}
217
 
218
extern void fs8(vector signed char, vector signed char,
219
                vector signed char, vector signed char);
220
void fxs8(vector signed char s8a, vector signed char s8b,
221
           vector signed char s8c, vector signed char s8d)
222
{
223
 fs8 (s8a,
224
       s8b,
225
       s8c,
226
       vec_avg(s8d, s8d));
227
 fs8 (vec_or (s8a, s8a),
228
       vec_and (s8b, s8b),
229
       vec_max (s8c, s8c),
230
       vec_min (s8d, s8d));
231
 fs8 (vec_sld (s8a, s8a, 0),
232
       vec_sld (s8b, s8b, 0),
233
       vec_sld (s8c, s8c, 0),
234
       vec_sld (s8d, s8d, 0));
235
 fs8 (((vector signed char){0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}),
236
       ((vector signed char){0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}),
237
       ((vector signed char){0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}),
238
       ((vector signed char){0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}));
239
 fs8 (vec_xor(s8a, s8a),
240
       vec_andc(s8b, s8b),
241
       vec_sub(s8c, s8c),
242
       vec_subs(s8d, s8d));
243
 fs8 (vec_splat_s8(0),
244
       vec_splat_s8(0),
245
       vec_splat_s8(0),
246
       vec_splat_s8(0));
247
 fs8 (((vector signed char){-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1}),
248
       ((vector signed char){-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1}),
249
       ((vector signed char){-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1}),
250
       ((vector signed char){-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1}));
251
 fs8 (vec_splat_s8(-1),
252
       vec_splat_s8(-1),
253
       vec_splat_s8(-1),
254
       vec_splat_s8(-1));
255
 fs8 ((vector signed char)vec_cmpeq(s8a, s8a),
256
       (vector signed char)vec_cmpeq(s8b, s8b),
257
       (vector signed char)vec_cmpeq(s8c, s8c),
258
       (vector signed char)vec_cmpeq(s8d, s8d));
259
}
260
 
261
void fu32(vector unsigned int a, vector unsigned int b,
262
          vector unsigned int c, vector unsigned int d)
263
{
264
}
265
 
266
void fu16(vector unsigned short a, vector unsigned short b,
267
          vector unsigned short c, vector unsigned short d)
268
{
269
}
270
 
271
void fu8(vector unsigned char a, vector unsigned char b,
272
         vector unsigned char c, vector unsigned char d)
273
{
274
}
275
 
276
void fs32(vector signed int a, vector signed int b,
277
          vector signed int c, vector signed int d)
278
{
279
}
280
 
281
void fs16(vector signed short a, vector signed short b,
282
          vector signed short c, vector signed short d)
283
{
284
}
285
 
286
void fs8(vector signed char a, vector signed char b,
287
         vector signed char c, vector signed char d)
288
{
289
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.