source: Deliverables/D2.2/8051-memoryspaces-branch/tests/clight/fir4.Clight.expected @ 1448

Last change on this file since 1448 was 453, checked in by ayache, 10 years ago

Import of the Paris's sources.

File size: 7.9 KB
Line 
1int fir4_c[16] = { 1129, 60034, 64720, 5595, 494, 59867, 65370, 5724, 5724,
2  65370, 59867, 494, 5595, 64720, 60034, 1129, };
3
4int fir4_in[56] = { 1, 0, 16384, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5  0, 0, 0, 0, 0, 0, 0, 7986, 8993, 1808, 4096, 4096, 4096, 4096, 4096, 4096,
6  4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096,
7  4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, };
8
9extern void *__builtin___memcpy_chk(void *, void *, unsigned int, unsigned int);
10
11extern void *__builtin___memmove_chk(void *, void *, unsigned int, unsigned int);
12
13extern void *__builtin___mempcpy_chk(void *, void *, unsigned int, unsigned int);
14
15extern void *__builtin___memset_chk(void *, int, unsigned int, unsigned int);
16
17extern unsigned char *__builtin___stpcpy_chk(unsigned char *, unsigned char *, unsigned int);
18
19extern unsigned char *__builtin___strcat_chk(unsigned char *, unsigned char *, unsigned int);
20
21extern unsigned char *__builtin___strcpy_chk(unsigned char *, unsigned char *, unsigned int);
22
23extern unsigned char *__builtin___strncat_chk(unsigned char *, unsigned char *, unsigned int, unsigned int);
24
25extern unsigned char *__builtin___strncpy_chk(unsigned char *, unsigned char *, unsigned int, unsigned int);
26
27extern int __builtin___vfprintf_chk(void *, int, unsigned char *, void *);
28
29extern int __builtin___vprintf_chk(int, unsigned char *, void *);
30
31extern int __builtin___vsnprintf_chk(unsigned char *, unsigned int, int, unsigned int, unsigned char *, void *);
32
33extern int __builtin___vsprintf_chk(unsigned char *, int, unsigned int, unsigned char *, void *);
34
35extern double __builtin_acos(double);
36
37extern float __builtin_acosf(float);
38
39extern double __builtin_acosl(double);
40
41extern void *__builtin_alloca(unsigned int);
42
43extern double __builtin_asin(double);
44
45extern float __builtin_asinf(float);
46
47extern double __builtin_asinl(double);
48
49extern double __builtin_atan(double);
50
51extern float __builtin_atanf(float);
52
53extern double __builtin_atanl(double);
54
55extern double __builtin_atan2(double, double);
56
57extern float __builtin_atan2f(float, float);
58
59extern double __builtin_atan2l(double, double);
60
61extern double __builtin_ceil(double);
62
63extern float __builtin_ceilf(float);
64
65extern double __builtin_ceill(double);
66
67extern double __builtin_cos(double);
68
69extern float __builtin_cosf(float);
70
71extern double __builtin_cosl(double);
72
73extern double __builtin_cosh(double);
74
75extern float __builtin_coshf(float);
76
77extern double __builtin_coshl(double);
78
79extern int __builtin_clz(unsigned int);
80
81extern int __builtin_clzl(unsigned int);
82
83extern int __builtin_clzll(unsigned int);
84
85extern int __builtin_constant_p(int);
86
87extern int __builtin_ctz(unsigned int);
88
89extern int __builtin_ctzl(unsigned int);
90
91extern int __builtin_ctzll(unsigned int);
92
93extern double __builtin_exp(double);
94
95extern float __builtin_expf(float);
96
97extern double __builtin_expl(double);
98
99extern int __builtin_expect(int, int);
100
101extern double __builtin_fabs(double);
102
103extern float __builtin_fabsf(float);
104
105extern double __builtin_fabsl(double);
106
107extern int __builtin_ffs(unsigned int);
108
109extern int __builtin_ffsl(unsigned int);
110
111extern int __builtin_ffsll(unsigned int);
112
113extern void *__builtin_frame_address(unsigned int);
114
115extern double __builtin_floor(double);
116
117extern float __builtin_floorf(float);
118
119extern double __builtin_floorl(double);
120
121extern double __builtin_huge_val(void);
122
123extern float __builtin_huge_valf(void);
124
125extern double __builtin_huge_vall(void);
126
127extern double __builtin_inf(void);
128
129extern float __builtin_inff(void);
130
131extern double __builtin_infl(void);
132
133extern void *__builtin_memcpy(void *, void *, unsigned int);
134
135extern void *__builtin_mempcpy(void *, void *, unsigned int);
136
137extern double __builtin_fmod(double);
138
139extern float __builtin_fmodf(float);
140
141extern double __builtin_fmodl(double);
142
143extern double __builtin_frexp(double, int *);
144
145extern float __builtin_frexpf(float, int *);
146
147extern double __builtin_frexpl(double, int *);
148
149extern double __builtin_ldexp(double, int);
150
151extern float __builtin_ldexpf(float, int);
152
153extern double __builtin_ldexpl(double, int);
154
155extern double __builtin_log(double);
156
157extern float __builtin_logf(float);
158
159extern double __builtin_logl(double);
160
161extern double __builtin_log10(double);
162
163extern float __builtin_log10f(float);
164
165extern double __builtin_log10l(double);
166
167extern float __builtin_modff(float, float *);
168
169extern double __builtin_modfl(double, double *);
170
171extern double __builtin_nan(unsigned char *);
172
173extern float __builtin_nanf(unsigned char *);
174
175extern double __builtin_nanl(unsigned char *);
176
177extern double __builtin_nans(unsigned char *);
178
179extern float __builtin_nansf(unsigned char *);
180
181extern double __builtin_nansl(unsigned char *);
182
183extern void *__builtin_next_arg(void);
184
185extern unsigned int __builtin_object_size(void *, int);
186
187extern int __builtin_parity(unsigned int);
188
189extern int __builtin_parityl(unsigned int);
190
191extern int __builtin_parityll(unsigned int);
192
193extern int __builtin_popcount(unsigned int);
194
195extern int __builtin_popcountl(unsigned int);
196
197extern int __builtin_popcountll(unsigned int);
198
199extern double __builtin_powi(double, int);
200
201extern float __builtin_powif(float, int);
202
203extern double __builtin_powil(double, int);
204
205extern void __builtin_return(void *);
206
207extern void *__builtin_return_address(unsigned int);
208
209extern double __builtin_sin(double);
210
211extern float __builtin_sinf(float);
212
213extern double __builtin_sinl(double);
214
215extern double __builtin_sinh(double);
216
217extern float __builtin_sinhf(float);
218
219extern double __builtin_sinhl(double);
220
221extern double __builtin_sqrt(double);
222
223extern float __builtin_sqrtf(float);
224
225extern double __builtin_sqrtl(double);
226
227extern unsigned char *__builtin_stpcpy(unsigned char *, unsigned char *);
228
229extern unsigned char *__builtin_strchr(unsigned char *, unsigned char);
230
231extern int __builtin_strcmp(unsigned char *, unsigned char *);
232
233extern unsigned char *__builtin_strcpy(unsigned char *, unsigned char *);
234
235extern unsigned int __builtin_strcspn(unsigned char *, unsigned char *);
236
237extern unsigned char *__builtin_strncat(unsigned char *, unsigned char *, unsigned int);
238
239extern int __builtin_strncmp(unsigned char *, unsigned char *, unsigned int);
240
241extern unsigned char *__builtin_strncpy(unsigned char *, unsigned char *, unsigned int);
242
243extern int __builtin_strspn(unsigned char *, unsigned char *);
244
245extern unsigned char *__builtin_strpbrk(unsigned char *, unsigned char *);
246
247extern int __builtin_types_compatible_p(unsigned int, unsigned int);
248
249extern double __builtin_tan(double);
250
251extern float __builtin_tanf(float);
252
253extern double __builtin_tanl(double);
254
255extern double __builtin_tanh(double);
256
257extern float __builtin_tanhf(float);
258
259extern double __builtin_tanhl(double);
260
261extern void __builtin_va_end(void *);
262
263extern void __builtin_varargs_start(void *);
264
265extern void __builtin_va_start(void *, void *);
266
267extern void __builtin_stdarg_start(void *);
268
269extern void __builtin_va_arg(void *, unsigned int);
270
271extern void __builtin_va_copy(void *, void *);
272
273int fir4(int *fir4_in__1, int *fir4_c__1, int *fir4_out, int size)
274{
275  int i;
276  int j;
277  int tmp1;
278  int tmp2;
279  int tmp3;
280  int tmp4;
281  int x[16];
282  int adx;
283  int res;
284  c25:
285  adx = 0;
286  c24:
287  res = 0;
288  c23:
289  for (({ c22: i = 0; }); (/* c21 */ i < 16); ({ c20: i = i + 1; })) {
290    c19:
291    x[i] = 0;
292  }
293  c18:
294  for (({ c17: j = 0; }); (/* c16 */ j < size); ({ c15: j = j + 1; })) {
295    c14:
296    x[adx] = fir4_in__1[j];
297    c13:
298    res = 0;
299    c12:
300    for (({ c11: i = 0; }); (/* c10 */ i < 16); ({ c9: i = i + 4; })) {
301      c8:
302      tmp1 = x[adx] * fir4_c__1[i];
303      c7:
304      tmp2 = x[((adx + 1) % 16)] * fir4_c__1[(i + 1)];
305      c6:
306      tmp3 = x[((adx + 2) % 16)] * fir4_c__1[(i + 2)];
307      c5:
308      tmp4 = x[((adx + 3) % 16)] * fir4_c__1[(i + 3)];
309      c4:
310      res = (((res + tmp1) + tmp2) + tmp3) + tmp4;
311      c3:
312      adx = (adx + 4) % 16;
313    }
314    c2:
315    adx = (adx + 1) % 16;
316    c1:
317    fir4_out[j] = res >> 16;
318  }
319  c0:
320  return 0;
321}
322
323int main(void)
324{
325  int fir4_out[16];
326  int t;
327  c27:
328  t = fir4(fir4_in, fir4_c, fir4_out, 16);
329  c26:
330  return t;
331}
332
333
Note: See TracBrowser for help on using the repository browser.