]>
Commit | Line | Data |
---|---|---|
45516216 | 1 | # 1 "test.c" |
2 | # 1 "<built-in>" | |
3 | # 1 "<command line>" | |
4 | # 1 "test.c" | |
5 | # 1 "/usr/local/src/blackfin/svn/uclinux-dist/trunk/lib/libbfdsp/include/float16.h" 1 | |
6 | ||
7 | ||
8 | #pragma system_header | |
9 | # 38 "/usr/local/src/blackfin/svn/uclinux-dist/trunk/lib/libbfdsp/include/float16.h" | |
10 | typedef union { | |
11 | long l; | |
12 | unsigned long u; | |
13 | struct { | |
14 | short e; | |
15 | short m; | |
16 | } s; | |
17 | float f; | |
18 | } float16; | |
19 | ||
20 | ||
21 | ||
22 | # 1 "/usr/local/src/blackfin/svn/uclinux-dist/trunk/lib/libbfdsp/include/fract.h" 1 | |
23 | ||
24 | ||
25 | ||
26 | # 4 "/usr/local/src/blackfin/svn/uclinux-dist/trunk/lib/libbfdsp/include/fract.h" 3 | |
27 | # 25 "/usr/local/src/blackfin/svn/uclinux-dist/trunk/lib/libbfdsp/include/fract.h" 3 | |
28 | # 1 "/usr/local/src/blackfin/svn/uclinux-dist/trunk/lib/libbfdsp/include/fract_typedef.h" 1 3 | |
29 | ||
30 | ||
31 | ||
32 | # 4 "/usr/local/src/blackfin/svn/uclinux-dist/trunk/lib/libbfdsp/include/fract_typedef.h" 3 | |
33 | # 25 "/usr/local/src/blackfin/svn/uclinux-dist/trunk/lib/libbfdsp/include/fract_typedef.h" 3 | |
34 | typedef short fract16; | |
35 | typedef long fract32; | |
36 | # 26 "/usr/local/src/blackfin/svn/uclinux-dist/trunk/lib/libbfdsp/include/fract.h" 2 3 | |
37 | # 1 "/usr/local/src/blackfin/svn/uclinux-dist/trunk/lib/libbfdsp/include/fract_math.h" 1 3 | |
38 | ||
39 | ||
40 | ||
41 | # 4 "/usr/local/src/blackfin/svn/uclinux-dist/trunk/lib/libbfdsp/include/fract_math.h" 3 | |
42 | # 26 "/usr/local/src/blackfin/svn/uclinux-dist/trunk/lib/libbfdsp/include/fract_math.h" 3 | |
43 | # 1 "/usr/local/src/blackfin/svn/uclinux-dist/trunk/lib/libbfdsp/include/ccblkfn.h" 1 3 | |
44 | ||
45 | ||
46 | ||
47 | # 4 "/usr/local/src/blackfin/svn/uclinux-dist/trunk/lib/libbfdsp/include/ccblkfn.h" 3 | |
48 | # 25 "/usr/local/src/blackfin/svn/uclinux-dist/trunk/lib/libbfdsp/include/ccblkfn.h" 3 | |
49 | # 1 "/usr/local/src/blackfin/toolchains/20061225/out-uclinux/bfin-uclinux/runtime/usr/include/stdlib.h" 1 3 4 | |
50 | # 25 "/usr/local/src/blackfin/toolchains/20061225/out-uclinux/bfin-uclinux/runtime/usr/include/stdlib.h" 3 4 | |
51 | # 1 "/usr/local/src/blackfin/toolchains/20061225/out-uclinux/bfin-uclinux/runtime/usr/include/features.h" 1 3 4 | |
52 | # 267 "/usr/local/src/blackfin/toolchains/20061225/out-uclinux/bfin-uclinux/runtime/usr/include/features.h" 3 4 | |
53 | # 1 "/usr/local/src/blackfin/toolchains/20061225/out-uclinux/bfin-uclinux/runtime/usr/include/bits/uClibc_config.h" 1 3 4 | |
54 | # 268 "/usr/local/src/blackfin/toolchains/20061225/out-uclinux/bfin-uclinux/runtime/usr/include/features.h" 2 3 4 | |
55 | # 303 "/usr/local/src/blackfin/toolchains/20061225/out-uclinux/bfin-uclinux/runtime/usr/include/features.h" 3 4 | |
56 | # 1 "/usr/local/src/blackfin/toolchains/20061225/out-uclinux/bfin-uclinux/runtime/usr/include/sys/cdefs.h" 1 3 4 | |
57 | # 304 "/usr/local/src/blackfin/toolchains/20061225/out-uclinux/bfin-uclinux/runtime/usr/include/features.h" 2 3 4 | |
58 | # 26 "/usr/local/src/blackfin/toolchains/20061225/out-uclinux/bfin-uclinux/runtime/usr/include/stdlib.h" 2 3 4 | |
59 | # 35 "/usr/local/src/blackfin/toolchains/20061225/out-uclinux/bfin-uclinux/runtime/usr/include/stdlib.h" 3 4 | |
60 | # 1 "/usr/local/src/blackfin/toolchains/20061225/out-uclinux/lib/gcc/bfin-uclinux/4.1.1/include/stddef.h" 1 3 4 | |
61 | # 214 "/usr/local/src/blackfin/toolchains/20061225/out-uclinux/lib/gcc/bfin-uclinux/4.1.1/include/stddef.h" 3 4 | |
62 | typedef long unsigned int size_t; | |
63 | # 36 "/usr/local/src/blackfin/toolchains/20061225/out-uclinux/bfin-uclinux/runtime/usr/include/stdlib.h" 2 3 4 | |
64 | ||
65 | ||
66 | # 95 "/usr/local/src/blackfin/toolchains/20061225/out-uclinux/bfin-uclinux/runtime/usr/include/stdlib.h" 3 4 | |
67 | ||
68 | ||
69 | typedef struct | |
70 | { | |
71 | int quot; | |
72 | int rem; | |
73 | } div_t; | |
74 | ||
75 | ||
76 | ||
77 | typedef struct | |
78 | { | |
79 | long int quot; | |
80 | long int rem; | |
81 | } ldiv_t; | |
82 | ||
83 | ||
84 | ||
85 | # 147 "/usr/local/src/blackfin/toolchains/20061225/out-uclinux/bfin-uclinux/runtime/usr/include/stdlib.h" 3 4 | |
86 | ||
87 | ||
88 | ||
89 | extern double atof (__const char *__nptr) __attribute__ ((__pure__)); | |
90 | ||
91 | ||
92 | extern int atoi (__const char *__nptr) __attribute__ ((__pure__)); | |
93 | ||
94 | extern long int atol (__const char *__nptr) __attribute__ ((__pure__)); | |
95 | ||
96 | ||
97 | ||
98 | ||
99 | ||
100 | __extension__ extern long long int atoll (__const char *__nptr) | |
101 | __attribute__ ((__pure__)); | |
102 | ||
103 | ||
104 | ||
105 | ||
106 | ||
107 | ||
108 | extern double strtod (__const char *__restrict __nptr, | |
109 | char **__restrict __endptr) ; | |
110 | ||
111 | # 185 "/usr/local/src/blackfin/toolchains/20061225/out-uclinux/bfin-uclinux/runtime/usr/include/stdlib.h" 3 4 | |
112 | ||
113 | ||
114 | extern long int strtol (__const char *__restrict __nptr, | |
115 | char **__restrict __endptr, int __base) ; | |
116 | ||
117 | extern unsigned long int strtoul (__const char *__restrict __nptr, | |
118 | char **__restrict __endptr, int __base) | |
119 | ; | |
120 | ||
121 | ||
122 | ||
123 | ||
124 | __extension__ | |
125 | extern long long int strtoq (__const char *__restrict __nptr, | |
126 | char **__restrict __endptr, int __base) ; | |
127 | ||
128 | __extension__ | |
129 | extern unsigned long long int strtouq (__const char *__restrict __nptr, | |
130 | char **__restrict __endptr, int __base) | |
131 | ; | |
132 | ||
133 | ||
134 | ||
135 | ||
136 | ||
137 | __extension__ | |
138 | extern long long int strtoll (__const char *__restrict __nptr, | |
139 | char **__restrict __endptr, int __base) ; | |
140 | ||
141 | __extension__ | |
142 | extern unsigned long long int strtoull (__const char *__restrict __nptr, | |
143 | char **__restrict __endptr, int __base) | |
144 | ; | |
145 | ||
146 | # 309 "/usr/local/src/blackfin/toolchains/20061225/out-uclinux/bfin-uclinux/runtime/usr/include/stdlib.h" 3 4 | |
147 | extern char *l64a (long int __n) ; | |
148 | ||
149 | ||
150 | extern long int a64l (__const char *__s) __attribute__ ((__pure__)); | |
151 | ||
152 | ||
153 | ||
154 | ||
155 | # 1 "/usr/local/src/blackfin/toolchains/20061225/out-uclinux/bfin-uclinux/runtime/usr/include/sys/types.h" 1 3 4 | |
156 | # 28 "/usr/local/src/blackfin/toolchains/20061225/out-uclinux/bfin-uclinux/runtime/usr/include/sys/types.h" 3 4 | |
157 | ||
158 | ||
159 | # 1 "/usr/local/src/blackfin/toolchains/20061225/out-uclinux/bfin-uclinux/runtime/usr/include/bits/types.h" 1 3 4 | |
160 | # 29 "/usr/local/src/blackfin/toolchains/20061225/out-uclinux/bfin-uclinux/runtime/usr/include/bits/types.h" 3 4 | |
161 | # 1 "/usr/local/src/blackfin/toolchains/20061225/out-uclinux/lib/gcc/bfin-uclinux/4.1.1/include/stddef.h" 1 3 4 | |
162 | # 30 "/usr/local/src/blackfin/toolchains/20061225/out-uclinux/bfin-uclinux/runtime/usr/include/bits/types.h" 2 3 4 | |
163 | # 1 "/usr/local/src/blackfin/toolchains/20061225/out-uclinux/bfin-uclinux/runtime/usr/include/bits/kernel_types.h" 1 3 4 | |
164 | # 10 "/usr/local/src/blackfin/toolchains/20061225/out-uclinux/bfin-uclinux/runtime/usr/include/bits/kernel_types.h" 3 4 | |
165 | typedef unsigned short __kernel_dev_t; | |
166 | typedef unsigned long __kernel_ino_t; | |
167 | typedef unsigned short __kernel_mode_t; | |
168 | typedef unsigned short __kernel_nlink_t; | |
169 | typedef long __kernel_off_t; | |
170 | typedef int __kernel_pid_t; | |
171 | typedef unsigned short __kernel_ipc_pid_t; | |
172 | typedef unsigned short __kernel_uid_t; | |
173 | typedef unsigned short __kernel_gid_t; | |
174 | typedef unsigned int __kernel_size_t; | |
175 | typedef int __kernel_ssize_t; | |
176 | typedef int __kernel_ptrdiff_t; | |
177 | typedef long __kernel_time_t; | |
178 | typedef long __kernel_suseconds_t; | |
179 | typedef long __kernel_clock_t; | |
180 | typedef int __kernel_daddr_t; | |
181 | typedef char * __kernel_caddr_t; | |
182 | typedef unsigned short __kernel_uid16_t; | |
183 | typedef unsigned short __kernel_gid16_t; | |
184 | typedef unsigned int __kernel_uid32_t; | |
185 | typedef unsigned int __kernel_gid32_t; | |
186 | typedef unsigned short __kernel_old_uid_t; | |
187 | typedef unsigned short __kernel_old_gid_t; | |
188 | typedef long long __kernel_loff_t; | |
189 | typedef __kernel_dev_t __kernel_old_dev_t; | |
190 | ||
191 | typedef struct { | |
192 | ||
193 | ||
194 | ||
195 | int __val[2]; | |
196 | ||
197 | } __kernel_fsid_t; | |
198 | # 31 "/usr/local/src/blackfin/toolchains/20061225/out-uclinux/bfin-uclinux/runtime/usr/include/bits/types.h" 2 3 4 | |
199 | ||
200 | ||
201 | typedef unsigned char __u_char; | |
202 | typedef unsigned short __u_short; | |
203 | typedef unsigned int __u_int; | |
204 | typedef unsigned long __u_long; | |
205 | ||
206 | __extension__ typedef unsigned long long int __u_quad_t; | |
207 | __extension__ typedef long long int __quad_t; | |
208 | # 50 "/usr/local/src/blackfin/toolchains/20061225/out-uclinux/bfin-uclinux/runtime/usr/include/bits/types.h" 3 4 | |
209 | typedef signed char __int8_t; | |
210 | typedef unsigned char __uint8_t; | |
211 | typedef signed short int __int16_t; | |
212 | typedef unsigned short int __uint16_t; | |
213 | typedef signed int __int32_t; | |
214 | typedef unsigned int __uint32_t; | |
215 | ||
216 | __extension__ typedef signed long long int __int64_t; | |
217 | __extension__ typedef unsigned long long int __uint64_t; | |
218 | ||
219 | typedef __quad_t *__qaddr_t; | |
220 | ||
221 | typedef __u_quad_t __dev_t; | |
222 | typedef __u_int __uid_t; | |
223 | typedef __u_int __gid_t; | |
224 | typedef __u_long __ino_t; | |
225 | typedef __u_int __mode_t; | |
226 | typedef __u_int __nlink_t; | |
227 | typedef long int __off_t; | |
228 | typedef __quad_t __loff_t; | |
229 | typedef int __pid_t; | |
230 | typedef long int __ssize_t; | |
231 | typedef __u_long __rlim_t; | |
232 | typedef __u_quad_t __rlim64_t; | |
233 | typedef __u_int __id_t; | |
234 | ||
235 | typedef struct | |
236 | { | |
237 | int __val[2]; | |
238 | } __fsid_t; | |
239 | ||
240 | ||
241 | typedef int __daddr_t; | |
242 | typedef char *__caddr_t; | |
243 | typedef long int __time_t; | |
244 | typedef unsigned int __useconds_t; | |
245 | typedef long int __suseconds_t; | |
246 | typedef long int __swblk_t; | |
247 | ||
248 | typedef long int __clock_t; | |
249 | ||
250 | ||
251 | typedef int __clockid_t; | |
252 | ||
253 | ||
254 | typedef int __timer_t; | |
255 | ||
256 | ||
257 | ||
258 | ||
259 | ||
260 | ||
261 | typedef int __key_t; | |
262 | ||
263 | ||
264 | typedef __kernel_ipc_pid_t __ipc_pid_t; | |
265 | ||
266 | ||
267 | ||
268 | typedef long int __blksize_t; | |
269 | ||
270 | ||
271 | ||
272 | ||
273 | typedef __quad_t __blkcnt64_t; | |
274 | ||
275 | ||
276 | typedef __u_long __fsblkcnt_t; | |
277 | typedef __u_quad_t __fsblkcnt64_t; | |
278 | ||
279 | ||
280 | typedef __u_long __fsfilcnt_t; | |
281 | typedef __u_quad_t __fsfilcnt64_t; | |
282 | ||
283 | ||
284 | typedef __u_quad_t __ino64_t; | |
285 | ||
286 | ||
287 | typedef __loff_t __off64_t; | |
288 | ||
289 | ||
290 | typedef long int __t_scalar_t; | |
291 | typedef unsigned long int __t_uscalar_t; | |
292 | ||
293 | ||
294 | typedef int __intptr_t; | |
295 | ||
296 | ||
297 | typedef unsigned int __socklen_t; | |
298 | ||
299 | ||
300 | ||
301 | ||
302 | # 1 "/usr/local/src/blackfin/toolchains/20061225/out-uclinux/bfin-uclinux/runtime/usr/include/bits/pthreadtypes.h" 1 3 4 | |
303 | # 23 "/usr/local/src/blackfin/toolchains/20061225/out-uclinux/bfin-uclinux/runtime/usr/include/bits/pthreadtypes.h" 3 4 | |
304 | # 1 "/usr/local/src/blackfin/toolchains/20061225/out-uclinux/bfin-uclinux/runtime/usr/include/bits/sched.h" 1 3 4 | |
305 | # 68 "/usr/local/src/blackfin/toolchains/20061225/out-uclinux/bfin-uclinux/runtime/usr/include/bits/sched.h" 3 4 | |
306 | struct __sched_param | |
307 | { | |
308 | int __sched_priority; | |
309 | }; | |
310 | # 24 "/usr/local/src/blackfin/toolchains/20061225/out-uclinux/bfin-uclinux/runtime/usr/include/bits/pthreadtypes.h" 2 3 4 | |
311 | ||
312 | ||
313 | struct _pthread_fastlock | |
314 | { | |
315 | long int __status; | |
316 | int __spinlock; | |
317 | ||
318 | }; | |
319 | ||
320 | ||
321 | ||
322 | typedef struct _pthread_descr_struct *_pthread_descr; | |
323 | ||
324 | ||
325 | ||
326 | ||
327 | ||
328 | typedef struct __pthread_attr_s | |
329 | { | |
330 | int __detachstate; | |
331 | int __schedpolicy; | |
332 | struct __sched_param __schedparam; | |
333 | int __inheritsched; | |
334 | int __scope; | |
335 | size_t __guardsize; | |
336 | int __stackaddr_set; | |
337 | void *__stackaddr; | |
338 | size_t __stacksize; | |
339 | } pthread_attr_t; | |
340 | ||
341 | ||
342 | ||
343 | typedef struct | |
344 | { | |
345 | struct _pthread_fastlock __c_lock; | |
346 | _pthread_descr __c_waiting; | |
347 | } pthread_cond_t; | |
348 | ||
349 | ||
350 | ||
351 | typedef struct | |
352 | { | |
353 | int __dummy; | |
354 | } pthread_condattr_t; | |
355 | ||
356 | ||
357 | typedef unsigned int pthread_key_t; | |
358 | ||
359 | ||
360 | ||
361 | ||
362 | ||
363 | typedef struct | |
364 | { | |
365 | int __m_reserved; | |
366 | int __m_count; | |
367 | _pthread_descr __m_owner; | |
368 | int __m_kind; | |
369 | struct _pthread_fastlock __m_lock; | |
370 | } pthread_mutex_t; | |
371 | ||
372 | ||
373 | ||
374 | typedef struct | |
375 | { | |
376 | int __mutexkind; | |
377 | } pthread_mutexattr_t; | |
378 | ||
379 | ||
380 | ||
381 | typedef int pthread_once_t; | |
382 | # 140 "/usr/local/src/blackfin/toolchains/20061225/out-uclinux/bfin-uclinux/runtime/usr/include/bits/pthreadtypes.h" 3 4 | |
383 | typedef unsigned long int pthread_t; | |
384 | # 145 "/usr/local/src/blackfin/toolchains/20061225/out-uclinux/bfin-uclinux/runtime/usr/include/bits/types.h" 2 3 4 | |
385 | # 31 "/usr/local/src/blackfin/toolchains/20061225/out-uclinux/bfin-uclinux/runtime/usr/include/sys/types.h" 2 3 4 | |
386 | ||
387 | ||
388 | ||
389 | typedef __u_char u_char; | |
390 | typedef __u_short u_short; | |
391 | typedef __u_int u_int; | |
392 | typedef __u_long u_long; | |
393 | typedef __quad_t quad_t; | |
394 | typedef __u_quad_t u_quad_t; | |
395 | typedef __fsid_t fsid_t; | |
396 | ||
397 | ||
398 | ||
399 | ||
400 | typedef __loff_t loff_t; | |
401 | ||
402 | ||
403 | ||
404 | typedef __ino_t ino_t; | |
405 | # 61 "/usr/local/src/blackfin/toolchains/20061225/out-uclinux/bfin-uclinux/runtime/usr/include/sys/types.h" 3 4 | |
406 | typedef __dev_t dev_t; | |
407 | ||
408 | ||
409 | ||
410 | ||
411 | typedef __gid_t gid_t; | |
412 | ||
413 | ||
414 | ||
415 | ||
416 | typedef __mode_t mode_t; | |
417 | ||
418 | ||
419 | ||
420 | ||
421 | typedef __nlink_t nlink_t; | |
422 | ||
423 | ||
424 | ||
425 | ||
426 | typedef __uid_t uid_t; | |
427 | ||
428 | ||
429 | ||
430 | ||
431 | ||
432 | typedef __off_t off_t; | |
433 | # 99 "/usr/local/src/blackfin/toolchains/20061225/out-uclinux/bfin-uclinux/runtime/usr/include/sys/types.h" 3 4 | |
434 | typedef __pid_t pid_t; | |
435 | ||
436 | ||
437 | ||
438 | ||
439 | typedef __id_t id_t; | |
440 | ||
441 | ||
442 | ||
443 | ||
444 | typedef __ssize_t ssize_t; | |
445 | ||
446 | ||
447 | ||
448 | ||
449 | ||
450 | typedef __daddr_t daddr_t; | |
451 | typedef __caddr_t caddr_t; | |
452 | ||
453 | ||
454 | ||
455 | ||
456 | ||
457 | typedef __key_t key_t; | |
458 | # 132 "/usr/local/src/blackfin/toolchains/20061225/out-uclinux/bfin-uclinux/runtime/usr/include/sys/types.h" 3 4 | |
459 | # 1 "/usr/local/src/blackfin/toolchains/20061225/out-uclinux/bfin-uclinux/runtime/usr/include/time.h" 1 3 4 | |
460 | # 74 "/usr/local/src/blackfin/toolchains/20061225/out-uclinux/bfin-uclinux/runtime/usr/include/time.h" 3 4 | |
461 | ||
462 | ||
463 | typedef __time_t time_t; | |
464 | ||
465 | ||
466 | ||
467 | # 92 "/usr/local/src/blackfin/toolchains/20061225/out-uclinux/bfin-uclinux/runtime/usr/include/time.h" 3 4 | |
468 | typedef __clockid_t clockid_t; | |
469 | # 104 "/usr/local/src/blackfin/toolchains/20061225/out-uclinux/bfin-uclinux/runtime/usr/include/time.h" 3 4 | |
470 | typedef __timer_t timer_t; | |
471 | # 133 "/usr/local/src/blackfin/toolchains/20061225/out-uclinux/bfin-uclinux/runtime/usr/include/sys/types.h" 2 3 4 | |
472 | # 146 "/usr/local/src/blackfin/toolchains/20061225/out-uclinux/bfin-uclinux/runtime/usr/include/sys/types.h" 3 4 | |
473 | # 1 "/usr/local/src/blackfin/toolchains/20061225/out-uclinux/lib/gcc/bfin-uclinux/4.1.1/include/stddef.h" 1 3 4 | |
474 | # 147 "/usr/local/src/blackfin/toolchains/20061225/out-uclinux/bfin-uclinux/runtime/usr/include/sys/types.h" 2 3 4 | |
475 | ||
476 | ||
477 | ||
478 | typedef unsigned long int ulong; | |
479 | typedef unsigned short int ushort; | |
480 | typedef unsigned int uint; | |
481 | # 190 "/usr/local/src/blackfin/toolchains/20061225/out-uclinux/bfin-uclinux/runtime/usr/include/sys/types.h" 3 4 | |
482 | typedef int int8_t __attribute__ ((__mode__ (__QI__))); | |
483 | typedef int int16_t __attribute__ ((__mode__ (__HI__))); | |
484 | typedef int int32_t __attribute__ ((__mode__ (__SI__))); | |
485 | typedef int int64_t __attribute__ ((__mode__ (__DI__))); | |
486 | ||
487 | ||
488 | typedef unsigned int u_int8_t __attribute__ ((__mode__ (__QI__))); | |
489 | typedef unsigned int u_int16_t __attribute__ ((__mode__ (__HI__))); | |
490 | typedef unsigned int u_int32_t __attribute__ ((__mode__ (__SI__))); | |
491 | typedef unsigned int u_int64_t __attribute__ ((__mode__ (__DI__))); | |
492 | ||
493 | typedef int register_t __attribute__ ((__mode__ (__word__))); | |
494 | # 212 "/usr/local/src/blackfin/toolchains/20061225/out-uclinux/bfin-uclinux/runtime/usr/include/sys/types.h" 3 4 | |
495 | # 1 "/usr/local/src/blackfin/toolchains/20061225/out-uclinux/bfin-uclinux/runtime/usr/include/endian.h" 1 3 4 | |
496 | # 37 "/usr/local/src/blackfin/toolchains/20061225/out-uclinux/bfin-uclinux/runtime/usr/include/endian.h" 3 4 | |
497 | # 1 "/usr/local/src/blackfin/toolchains/20061225/out-uclinux/bfin-uclinux/runtime/usr/include/bits/endian.h" 1 3 4 | |
498 | # 38 "/usr/local/src/blackfin/toolchains/20061225/out-uclinux/bfin-uclinux/runtime/usr/include/endian.h" 2 3 4 | |
499 | # 213 "/usr/local/src/blackfin/toolchains/20061225/out-uclinux/bfin-uclinux/runtime/usr/include/sys/types.h" 2 3 4 | |
500 | ||
501 | ||
502 | # 1 "/usr/local/src/blackfin/toolchains/20061225/out-uclinux/bfin-uclinux/runtime/usr/include/sys/select.h" 1 3 4 | |
503 | # 31 "/usr/local/src/blackfin/toolchains/20061225/out-uclinux/bfin-uclinux/runtime/usr/include/sys/select.h" 3 4 | |
504 | # 1 "/usr/local/src/blackfin/toolchains/20061225/out-uclinux/bfin-uclinux/runtime/usr/include/bits/select.h" 1 3 4 | |
505 | # 32 "/usr/local/src/blackfin/toolchains/20061225/out-uclinux/bfin-uclinux/runtime/usr/include/sys/select.h" 2 3 4 | |
506 | ||
507 | ||
508 | # 1 "/usr/local/src/blackfin/toolchains/20061225/out-uclinux/bfin-uclinux/runtime/usr/include/bits/sigset.h" 1 3 4 | |
509 | # 23 "/usr/local/src/blackfin/toolchains/20061225/out-uclinux/bfin-uclinux/runtime/usr/include/bits/sigset.h" 3 4 | |
510 | typedef int __sig_atomic_t; | |
511 | ||
512 | ||
513 | ||
514 | ||
515 | typedef struct | |
516 | { | |
517 | unsigned long int __val[(1024 / (8 * sizeof (unsigned long int)))]; | |
518 | } __sigset_t; | |
519 | # 35 "/usr/local/src/blackfin/toolchains/20061225/out-uclinux/bfin-uclinux/runtime/usr/include/sys/select.h" 2 3 4 | |
520 | ||
521 | ||
522 | ||
523 | typedef __sigset_t sigset_t; | |
524 | ||
525 | ||
526 | ||
527 | ||
528 | # 1 "/usr/local/src/blackfin/toolchains/20061225/out-uclinux/bfin-uclinux/runtime/usr/include/time.h" 1 3 4 | |
529 | # 118 "/usr/local/src/blackfin/toolchains/20061225/out-uclinux/bfin-uclinux/runtime/usr/include/time.h" 3 4 | |
530 | struct timespec | |
531 | { | |
532 | __time_t tv_sec; | |
533 | long int tv_nsec; | |
534 | }; | |
535 | # 44 "/usr/local/src/blackfin/toolchains/20061225/out-uclinux/bfin-uclinux/runtime/usr/include/sys/select.h" 2 3 4 | |
536 | ||
537 | # 1 "/usr/local/src/blackfin/toolchains/20061225/out-uclinux/bfin-uclinux/runtime/usr/include/bits/time.h" 1 3 4 | |
538 | # 71 "/usr/local/src/blackfin/toolchains/20061225/out-uclinux/bfin-uclinux/runtime/usr/include/bits/time.h" 3 4 | |
539 | struct timeval | |
540 | { | |
541 | __time_t tv_sec; | |
542 | __suseconds_t tv_usec; | |
543 | }; | |
544 | # 46 "/usr/local/src/blackfin/toolchains/20061225/out-uclinux/bfin-uclinux/runtime/usr/include/sys/select.h" 2 3 4 | |
545 | ||
546 | ||
547 | ||
548 | typedef long int __fd_mask; | |
549 | ||
550 | ||
551 | ||
552 | ||
553 | ||
554 | ||
555 | ||
556 | typedef struct | |
557 | { | |
558 | ||
559 | ||
560 | ||
561 | ||
562 | ||
563 | ||
564 | __fd_mask __fds_bits[1024 / (8 * sizeof (__fd_mask))]; | |
565 | ||
566 | ||
567 | } fd_set; | |
568 | ||
569 | ||
570 | ||
571 | ||
572 | ||
573 | ||
574 | typedef __fd_mask fd_mask; | |
575 | # 89 "/usr/local/src/blackfin/toolchains/20061225/out-uclinux/bfin-uclinux/runtime/usr/include/sys/select.h" 3 4 | |
576 | ||
577 | ||
578 | ||
579 | ||
580 | ||
581 | ||
582 | ||
583 | extern int select (int __nfds, fd_set *__restrict __readfds, | |
584 | fd_set *__restrict __writefds, | |
585 | fd_set *__restrict __exceptfds, | |
586 | struct timeval *__restrict __timeout) ; | |
587 | # 112 "/usr/local/src/blackfin/toolchains/20061225/out-uclinux/bfin-uclinux/runtime/usr/include/sys/select.h" 3 4 | |
588 | ||
589 | # 216 "/usr/local/src/blackfin/toolchains/20061225/out-uclinux/bfin-uclinux/runtime/usr/include/sys/types.h" 2 3 4 | |
590 | ||
591 | ||
592 | # 1 "/usr/local/src/blackfin/toolchains/20061225/out-uclinux/bfin-uclinux/runtime/usr/include/sys/sysmacros.h" 1 3 4 | |
593 | # 28 "/usr/local/src/blackfin/toolchains/20061225/out-uclinux/bfin-uclinux/runtime/usr/include/sys/sysmacros.h" 3 4 | |
594 | __extension__ | |
595 | static __inline unsigned int gnu_dev_major (unsigned long long int __dev) | |
596 | ; | |
597 | __extension__ | |
598 | static __inline unsigned int gnu_dev_minor (unsigned long long int __dev) | |
599 | ; | |
600 | __extension__ | |
601 | static __inline unsigned long long int gnu_dev_makedev (unsigned int __major, | |
602 | unsigned int __minor) | |
603 | ; | |
604 | ||
605 | ||
606 | __extension__ static __inline unsigned int | |
607 | gnu_dev_major (unsigned long long int __dev) | |
608 | { | |
609 | return ((__dev >> 8) & 0xfff) | ((unsigned int) (__dev >> 32) & ~0xfff); | |
610 | } | |
611 | ||
612 | __extension__ static __inline unsigned int | |
613 | gnu_dev_minor (unsigned long long int __dev) | |
614 | { | |
615 | return (__dev & 0xff) | ((unsigned int) (__dev >> 12) & ~0xff); | |
616 | } | |
617 | ||
618 | __extension__ static __inline unsigned long long int | |
619 | gnu_dev_makedev (unsigned int __major, unsigned int __minor) | |
620 | { | |
621 | return ((__minor & 0xff) | ((__major & 0xfff) << 8) | |
622 | | (((unsigned long long int) (__minor & ~0xff)) << 12) | |
623 | | (((unsigned long long int) (__major & ~0xfff)) << 32)); | |
624 | } | |
625 | # 219 "/usr/local/src/blackfin/toolchains/20061225/out-uclinux/bfin-uclinux/runtime/usr/include/sys/types.h" 2 3 4 | |
626 | # 230 "/usr/local/src/blackfin/toolchains/20061225/out-uclinux/bfin-uclinux/runtime/usr/include/sys/types.h" 3 4 | |
627 | ||
628 | ||
629 | ||
630 | typedef __fsblkcnt_t fsblkcnt_t; | |
631 | ||
632 | ||
633 | ||
634 | typedef __fsfilcnt_t fsfilcnt_t; | |
635 | # 262 "/usr/local/src/blackfin/toolchains/20061225/out-uclinux/bfin-uclinux/runtime/usr/include/sys/types.h" 3 4 | |
636 | ||
637 | # 318 "/usr/local/src/blackfin/toolchains/20061225/out-uclinux/bfin-uclinux/runtime/usr/include/stdlib.h" 2 3 4 | |
638 | ||
639 | ||
640 | ||
641 | ||
642 | ||
643 | ||
644 | extern long int random (void) ; | |
645 | ||
646 | ||
647 | extern void srandom (unsigned int __seed) ; | |
648 | ||
649 | ||
650 | ||
651 | ||
652 | ||
653 | extern char *initstate (unsigned int __seed, char *__statebuf, | |
654 | size_t __statelen) ; | |
655 | ||
656 | ||
657 | ||
658 | extern char *setstate (char *__statebuf) ; | |
659 | ||
660 | ||
661 | ||
662 | ||
663 | ||
664 | ||
665 | ||
666 | struct random_data | |
667 | { | |
668 | int32_t *fptr; | |
669 | int32_t *rptr; | |
670 | int32_t *state; | |
671 | int rand_type; | |
672 | int rand_deg; | |
673 | int rand_sep; | |
674 | int32_t *end_ptr; | |
675 | }; | |
676 | ||
677 | extern int random_r (struct random_data *__restrict __buf, | |
678 | int32_t *__restrict __result) ; | |
679 | ||
680 | extern int srandom_r (unsigned int __seed, struct random_data *__buf) ; | |
681 | ||
682 | extern int initstate_r (unsigned int __seed, char *__restrict __statebuf, | |
683 | size_t __statelen, | |
684 | struct random_data *__restrict __buf) ; | |
685 | ||
686 | extern int setstate_r (char *__restrict __statebuf, | |
687 | struct random_data *__restrict __buf) ; | |
688 | ||
689 | ||
690 | ||
691 | ||
692 | ||
693 | ||
694 | extern int rand (void) ; | |
695 | ||
696 | extern void srand (unsigned int __seed) ; | |
697 | ||
698 | ||
699 | ||
700 | ||
701 | extern int rand_r (unsigned int *__seed) ; | |
702 | # 390 "/usr/local/src/blackfin/toolchains/20061225/out-uclinux/bfin-uclinux/runtime/usr/include/stdlib.h" 3 4 | |
703 | extern double drand48 (void) ; | |
704 | extern double erand48 (unsigned short int __xsubi[3]) ; | |
705 | ||
706 | ||
707 | ||
708 | extern long int lrand48 (void) ; | |
709 | extern long int nrand48 (unsigned short int __xsubi[3]) ; | |
710 | ||
711 | ||
712 | extern long int mrand48 (void) ; | |
713 | extern long int jrand48 (unsigned short int __xsubi[3]) ; | |
714 | ||
715 | ||
716 | extern void srand48 (long int __seedval) ; | |
717 | extern unsigned short int *seed48 (unsigned short int __seed16v[3]) ; | |
718 | extern void lcong48 (unsigned short int __param[7]) ; | |
719 | ||
720 | ||
721 | ||
722 | ||
723 | ||
724 | struct drand48_data | |
725 | { | |
726 | unsigned short int __x[3]; | |
727 | unsigned short int __old_x[3]; | |
728 | unsigned short int __c; | |
729 | unsigned short int __init; | |
730 | unsigned long long int __a; | |
731 | }; | |
732 | ||
733 | ||
734 | ||
735 | extern int drand48_r (struct drand48_data *__restrict __buffer, | |
736 | double *__restrict __result) ; | |
737 | extern int erand48_r (unsigned short int __xsubi[3], | |
738 | struct drand48_data *__restrict __buffer, | |
739 | double *__restrict __result) ; | |
740 | ||
741 | ||
742 | ||
743 | extern int lrand48_r (struct drand48_data *__restrict __buffer, | |
744 | long int *__restrict __result) ; | |
745 | extern int nrand48_r (unsigned short int __xsubi[3], | |
746 | struct drand48_data *__restrict __buffer, | |
747 | long int *__restrict __result) ; | |
748 | ||
749 | ||
750 | extern int mrand48_r (struct drand48_data *__restrict __buffer, | |
751 | long int *__restrict __result) ; | |
752 | extern int jrand48_r (unsigned short int __xsubi[3], | |
753 | struct drand48_data *__restrict __buffer, | |
754 | long int *__restrict __result) ; | |
755 | ||
756 | ||
757 | extern int srand48_r (long int __seedval, struct drand48_data *__buffer) | |
758 | ; | |
759 | ||
760 | extern int seed48_r (unsigned short int __seed16v[3], | |
761 | struct drand48_data *__buffer) ; | |
762 | ||
763 | extern int lcong48_r (unsigned short int __param[7], | |
764 | struct drand48_data *__buffer) ; | |
765 | ||
766 | ||
767 | ||
768 | ||
769 | ||
770 | ||
771 | ||
772 | ||
773 | ||
774 | extern void *malloc (size_t __size) __attribute__ ((__malloc__)); | |
775 | ||
776 | extern void *calloc (size_t __nmemb, size_t __size) | |
777 | __attribute__ ((__malloc__)); | |
778 | ||
779 | ||
780 | ||
781 | ||
782 | ||
783 | ||
784 | ||
785 | extern void *realloc (void *__ptr, size_t __size) __attribute__ ((__malloc__)); | |
786 | ||
787 | extern void free (void *__ptr) ; | |
788 | ||
789 | ||
790 | ||
791 | ||
792 | extern void cfree (void *__ptr) ; | |
793 | ||
794 | ||
795 | ||
796 | # 1 "/usr/local/src/blackfin/toolchains/20061225/out-uclinux/bfin-uclinux/runtime/usr/include/alloca.h" 1 3 4 | |
797 | # 25 "/usr/local/src/blackfin/toolchains/20061225/out-uclinux/bfin-uclinux/runtime/usr/include/alloca.h" 3 4 | |
798 | # 1 "/usr/local/src/blackfin/toolchains/20061225/out-uclinux/lib/gcc/bfin-uclinux/4.1.1/include/stddef.h" 1 3 4 | |
799 | # 26 "/usr/local/src/blackfin/toolchains/20061225/out-uclinux/bfin-uclinux/runtime/usr/include/alloca.h" 2 3 4 | |
800 | ||
801 | ||
802 | ||
803 | ||
804 | ||
805 | ||
806 | ||
807 | extern void *alloca (size_t __size) ; | |
808 | ||
809 | ||
810 | ||
811 | ||
812 | ||
813 | ||
814 | # 484 "/usr/local/src/blackfin/toolchains/20061225/out-uclinux/bfin-uclinux/runtime/usr/include/stdlib.h" 2 3 4 | |
815 | ||
816 | ||
817 | ||
818 | ||
819 | extern void *valloc (size_t __size) __attribute__ ((__malloc__)); | |
820 | # 497 "/usr/local/src/blackfin/toolchains/20061225/out-uclinux/bfin-uclinux/runtime/usr/include/stdlib.h" 3 4 | |
821 | ||
822 | ||
823 | extern void abort (void) __attribute__ ((__noreturn__)); | |
824 | ||
825 | ||
826 | ||
827 | extern int atexit (void (*__func) (void)) ; | |
828 | ||
829 | ||
830 | ||
831 | ||
832 | ||
833 | extern int on_exit (void (*__func) (int __status, void *__arg), void *__arg) | |
834 | ; | |
835 | ||
836 | ||
837 | ||
838 | ||
839 | ||
840 | ||
841 | extern void exit (int __status) __attribute__ ((__noreturn__)); | |
842 | ||
843 | # 529 "/usr/local/src/blackfin/toolchains/20061225/out-uclinux/bfin-uclinux/runtime/usr/include/stdlib.h" 3 4 | |
844 | ||
845 | ||
846 | extern char *getenv (__const char *__name) ; | |
847 | ||
848 | ||
849 | ||
850 | ||
851 | extern char *__secure_getenv (__const char *__name) ; | |
852 | ||
853 | ||
854 | ||
855 | ||
856 | ||
857 | extern int putenv (char *__string) ; | |
858 | ||
859 | ||
860 | ||
861 | ||
862 | ||
863 | extern int setenv (__const char *__name, __const char *__value, int __replace) | |
864 | ; | |
865 | ||
866 | ||
867 | extern int unsetenv (__const char *__name) ; | |
868 | # 568 "/usr/local/src/blackfin/toolchains/20061225/out-uclinux/bfin-uclinux/runtime/usr/include/stdlib.h" 3 4 | |
869 | extern int clearenv (void) ; | |
870 | # 577 "/usr/local/src/blackfin/toolchains/20061225/out-uclinux/bfin-uclinux/runtime/usr/include/stdlib.h" 3 4 | |
871 | extern char *mktemp (char *__template) ; | |
872 | # 588 "/usr/local/src/blackfin/toolchains/20061225/out-uclinux/bfin-uclinux/runtime/usr/include/stdlib.h" 3 4 | |
873 | extern int mkstemp (char *__template); | |
874 | # 607 "/usr/local/src/blackfin/toolchains/20061225/out-uclinux/bfin-uclinux/runtime/usr/include/stdlib.h" 3 4 | |
875 | extern char *mkdtemp (char *__template) ; | |
876 | ||
877 | ||
878 | ||
879 | ||
880 | ||
881 | ||
882 | ||
883 | ||
884 | extern int system (__const char *__command); | |
885 | ||
886 | # 627 "/usr/local/src/blackfin/toolchains/20061225/out-uclinux/bfin-uclinux/runtime/usr/include/stdlib.h" 3 4 | |
887 | extern char *realpath (__const char *__restrict __name, | |
888 | char *__restrict __resolved) ; | |
889 | ||
890 | ||
891 | ||
892 | ||
893 | ||
894 | ||
895 | typedef int (*__compar_fn_t) (__const void *, __const void *); | |
896 | ||
897 | ||
898 | ||
899 | ||
900 | ||
901 | ||
902 | ||
903 | ||
904 | ||
905 | extern void *bsearch (__const void *__key, __const void *__base, | |
906 | size_t __nmemb, size_t __size, __compar_fn_t __compar); | |
907 | ||
908 | ||
909 | ||
910 | extern void qsort (void *__base, size_t __nmemb, size_t __size, | |
911 | __compar_fn_t __compar); | |
912 | ||
913 | ||
914 | ||
915 | extern int abs (int __x) __attribute__ ((__const__)); | |
916 | extern long int labs (long int __x) __attribute__ ((__const__)); | |
917 | ||
918 | ||
919 | ||
920 | ||
921 | ||
922 | ||
923 | ||
924 | ||
925 | ||
926 | ||
927 | ||
928 | ||
929 | extern div_t div (int __numer, int __denom) | |
930 | __attribute__ ((__const__)); | |
931 | extern ldiv_t ldiv (long int __numer, long int __denom) | |
932 | __attribute__ ((__const__)); | |
933 | ||
934 | # 714 "/usr/local/src/blackfin/toolchains/20061225/out-uclinux/bfin-uclinux/runtime/usr/include/stdlib.h" 3 4 | |
935 | extern int rpmatch (__const char *__response) ; | |
936 | # 775 "/usr/local/src/blackfin/toolchains/20061225/out-uclinux/bfin-uclinux/runtime/usr/include/stdlib.h" 3 4 | |
937 | extern int getloadavg (double __loadavg[], int __nelem) ; | |
938 | ||
939 | ||
940 | ||
941 | ||
942 | ||
943 | ||
944 | # 26 "/usr/local/src/blackfin/svn/uclinux-dist/trunk/lib/libbfdsp/include/ccblkfn.h" 2 3 | |
945 | # 133 "/usr/local/src/blackfin/svn/uclinux-dist/trunk/lib/libbfdsp/include/ccblkfn.h" 3 | |
946 | void *_l1_memcpy(void *datap, const void *instrp, size_t n); | |
947 | ||
948 | void *_memcpy_l1(void *instrp, const void *datap, size_t n); | |
949 | # 156 "/usr/local/src/blackfin/svn/uclinux-dist/trunk/lib/libbfdsp/include/ccblkfn.h" 3 | |
950 | extern int __builtin_bfin_testset(char *); | |
951 | extern void __builtin_bfin_untestset(char *); | |
952 | ||
953 | static __inline void adi_acquire_lock(volatile unsigned short *t) | |
954 | { | |
955 | int tVal; | |
956 | ||
957 | __builtin_bfin_csync(); | |
958 | tVal = __builtin_bfin_testset((char *)t); | |
959 | while ( tVal == 0 ) | |
960 | { | |
961 | __builtin_bfin_csync(); | |
962 | tVal = __builtin_bfin_testset((char *)t); | |
963 | } | |
964 | } | |
965 | ||
966 | static __inline int adi_try_lock(volatile unsigned short *t) | |
967 | { | |
968 | __builtin_bfin_csync(); | |
969 | return __builtin_bfin_testset((char *)t); | |
970 | } | |
971 | ||
972 | static __inline void adi_release_lock(volatile unsigned short *t) | |
973 | { | |
974 | __builtin_bfin_untestset((char *)t); | |
975 | __builtin_bfin_ssync(); | |
976 | } | |
977 | ||
978 | ||
979 | static __inline void claim_atomic_access(volatile unsigned short *t) | |
980 | { | |
981 | adi_acquire_lock(t); | |
982 | } | |
983 | ||
984 | static __inline void release_atomic_access(volatile unsigned short *t) | |
985 | { | |
986 | adi_release_lock(t); | |
987 | } | |
988 | # 27 "/usr/local/src/blackfin/svn/uclinux-dist/trunk/lib/libbfdsp/include/fract_math.h" 2 3 | |
989 | # 1 "/usr/local/src/blackfin/svn/uclinux-dist/trunk/lib/libbfdsp/include/fr2x16_math.h" 1 3 | |
990 | ||
991 | ||
992 | #pragma system_header | |
993 | # 26 "/usr/local/src/blackfin/svn/uclinux-dist/trunk/lib/libbfdsp/include/fr2x16_math.h" 3 | |
994 | # 1 "/usr/local/src/blackfin/svn/uclinux-dist/trunk/lib/libbfdsp/include/fr2x16_base.h" 1 3 | |
995 | ||
996 | ||
997 | ||
998 | # 4 "/usr/local/src/blackfin/svn/uclinux-dist/trunk/lib/libbfdsp/include/fr2x16_base.h" 3 | |
999 | # 26 "/usr/local/src/blackfin/svn/uclinux-dist/trunk/lib/libbfdsp/include/fr2x16_base.h" 3 | |
1000 | # 1 "/usr/local/src/blackfin/svn/uclinux-dist/trunk/lib/libbfdsp/include/fr2x16_typedef.h" 1 3 | |
1001 | ||
1002 | ||
1003 | ||
1004 | # 4 "/usr/local/src/blackfin/svn/uclinux-dist/trunk/lib/libbfdsp/include/fr2x16_typedef.h" 3 | |
1005 | # 27 "/usr/local/src/blackfin/svn/uclinux-dist/trunk/lib/libbfdsp/include/fr2x16_typedef.h" 3 | |
1006 | # 1 "/usr/local/src/blackfin/svn/uclinux-dist/trunk/lib/libbfdsp/include/r2x16_typedef.h" 1 3 | |
1007 | ||
1008 | ||
1009 | ||
1010 | # 4 "/usr/local/src/blackfin/svn/uclinux-dist/trunk/lib/libbfdsp/include/r2x16_typedef.h" 3 | |
1011 | # 27 "/usr/local/src/blackfin/svn/uclinux-dist/trunk/lib/libbfdsp/include/r2x16_typedef.h" 3 | |
1012 | # 1 "/usr/local/src/blackfin/svn/uclinux-dist/trunk/lib/libbfdsp/include/raw_typedef.h" 1 3 | |
1013 | ||
1014 | ||
1015 | ||
1016 | # 4 "/usr/local/src/blackfin/svn/uclinux-dist/trunk/lib/libbfdsp/include/raw_typedef.h" 3 | |
1017 | # 25 "/usr/local/src/blackfin/svn/uclinux-dist/trunk/lib/libbfdsp/include/raw_typedef.h" 3 | |
1018 | typedef char _raw8; | |
1019 | typedef short _raw16; | |
1020 | typedef int _raw32; | |
1021 | typedef int __v2hi __attribute__ ((__mode__ (__V2HI__))); | |
1022 | # 28 "/usr/local/src/blackfin/svn/uclinux-dist/trunk/lib/libbfdsp/include/r2x16_typedef.h" 2 3 | |
1023 | ||
1024 | typedef __v2hi raw2x16; | |
1025 | # 28 "/usr/local/src/blackfin/svn/uclinux-dist/trunk/lib/libbfdsp/include/fr2x16_typedef.h" 2 3 | |
1026 | ||
1027 | ||
1028 | ||
1029 | ||
1030 | ||
1031 | typedef raw2x16 fract2x16; | |
1032 | typedef fract2x16 fr2x16; | |
1033 | # 27 "/usr/local/src/blackfin/svn/uclinux-dist/trunk/lib/libbfdsp/include/fr2x16_base.h" 2 3 | |
1034 | ||
1035 | # 1 "/usr/local/src/blackfin/svn/uclinux-dist/trunk/lib/libbfdsp/include/r2x16_base.h" 1 3 | |
1036 | ||
1037 | ||
1038 | ||
1039 | # 4 "/usr/local/src/blackfin/svn/uclinux-dist/trunk/lib/libbfdsp/include/r2x16_base.h" 3 | |
1040 | # 35 "/usr/local/src/blackfin/svn/uclinux-dist/trunk/lib/libbfdsp/include/r2x16_base.h" 3 | |
1041 | static __inline raw2x16 compose_2x16(_raw16 _x, _raw16 _y) { | |
1042 | return __builtin_bfin_compose_2x16(_x, _y); | |
1043 | } | |
1044 | static __inline _raw16 high_of_2x16(raw2x16 _x) { | |
1045 | return __builtin_bfin_extract_hi(_x); | |
1046 | } | |
1047 | static __inline _raw16 low_of_2x16(raw2x16 _x) { | |
1048 | return __builtin_bfin_extract_lo(_x); | |
1049 | } | |
1050 | # 29 "/usr/local/src/blackfin/svn/uclinux-dist/trunk/lib/libbfdsp/include/fr2x16_base.h" 2 3 | |
1051 | # 67 "/usr/local/src/blackfin/svn/uclinux-dist/trunk/lib/libbfdsp/include/fr2x16_base.h" 3 | |
1052 | static __inline fract16 sum_fr2x16(fract2x16 _x){ | |
1053 | return __builtin_bfin_sum_fr2x16(_x); | |
1054 | } | |
1055 | # 80 "/usr/local/src/blackfin/svn/uclinux-dist/trunk/lib/libbfdsp/include/fr2x16_base.h" 3 | |
1056 | static __inline fract2x16 compose_fr2x16(fract16 _x, fract16 _y) { | |
1057 | return compose_2x16(_x,_y); | |
1058 | } | |
1059 | ||
1060 | ||
1061 | ||
1062 | ||
1063 | static __inline fract16 high_of_fr2x16(fract2x16 _x) { | |
1064 | return high_of_2x16(_x); | |
1065 | } | |
1066 | ||
1067 | ||
1068 | ||
1069 | ||
1070 | static __inline fract16 low_of_fr2x16(fract2x16 _x) { | |
1071 | return low_of_2x16(_x); | |
1072 | } | |
1073 | # 27 "/usr/local/src/blackfin/svn/uclinux-dist/trunk/lib/libbfdsp/include/fr2x16_math.h" 2 3 | |
1074 | # 41 "/usr/local/src/blackfin/svn/uclinux-dist/trunk/lib/libbfdsp/include/fr2x16_math.h" 3 | |
1075 | static __inline fract2x16 abs_fr2x16(fract2x16 _x) { | |
1076 | return __builtin_bfin_abs_fr2x16(_x); | |
1077 | } | |
1078 | static __inline fract2x16 min_fr2x16(fract2x16 _x, fract2x16 _y) { | |
1079 | return __builtin_bfin_min_fr2x16(_x, _y); | |
1080 | } | |
1081 | static __inline fract2x16 max_fr2x16(fract2x16 _x, fract2x16 _y) { | |
1082 | return __builtin_bfin_max_fr2x16(_x, _y); | |
1083 | } | |
1084 | # 65 "/usr/local/src/blackfin/svn/uclinux-dist/trunk/lib/libbfdsp/include/fr2x16_math.h" 3 | |
1085 | static __inline fract2x16 add_as_fr2x16(fract2x16 x,fract2x16 y) { | |
1086 | return __builtin_bfin_dspaddsubsat(x,y); | |
1087 | } | |
1088 | ||
1089 | static __inline fract2x16 add_sa_fr2x16(fract2x16 x,fract2x16 y) { | |
1090 | return __builtin_bfin_dspsubaddsat(x,y); | |
1091 | } | |
1092 | ||
1093 | static __inline fract16 diff_hl_fr2x16(fr2x16 x) { | |
1094 | return __builtin_bfin_diff_hl_fr2x16(x); | |
1095 | } | |
1096 | ||
1097 | static __inline fract16 diff_lh_fr2x16(fr2x16 x) { | |
1098 | return __builtin_bfin_diff_lh_fr2x16(x); | |
1099 | } | |
1100 | ||
1101 | ||
1102 | ||
1103 | static __inline fract32 mult_ll_fr2x16(fract2x16 _x, fract2x16 _y) { | |
1104 | return low_of_fr2x16(_x)*low_of_fr2x16(_y); | |
1105 | } | |
1106 | static __inline fract32 mult_hl_fr2x16(fract2x16 _x, fract2x16 _y) { | |
1107 | return high_of_fr2x16(_x)*low_of_fr2x16(_y); | |
1108 | } | |
1109 | static __inline fract32 mult_lh_fr2x16(fract2x16 _x, fract2x16 _y) { | |
1110 | return low_of_fr2x16(_x)*high_of_fr2x16(_y); | |
1111 | } | |
1112 | static __inline fract32 mult_hh_fr2x16(fract2x16 _x, fract2x16 _y) { | |
1113 | return high_of_fr2x16(_x)*high_of_fr2x16(_y); | |
1114 | } | |
1115 | # 28 "/usr/local/src/blackfin/svn/uclinux-dist/trunk/lib/libbfdsp/include/fract_math.h" 2 3 | |
1116 | # 48 "/usr/local/src/blackfin/svn/uclinux-dist/trunk/lib/libbfdsp/include/fract_math.h" 3 | |
1117 | static __inline fract2x16 add_fr2x16(fract2x16 _x, fract2x16 _y) | |
1118 | { return __builtin_bfin_add_fr2x16(_x,_y); } | |
1119 | ||
1120 | ||
1121 | static __inline fract16 add_fr1x16(fract16 _x, fract16 _y) | |
1122 | { return __builtin_bfin_add_fr1x16(_x,_y); } | |
1123 | ||
1124 | ||
1125 | ||
1126 | ||
1127 | static __inline fract2x16 sub_fr2x16(fract2x16 _x, fract2x16 _y) | |
1128 | { return __builtin_bfin_sub_fr2x16(_x,_y); } | |
1129 | ||
1130 | ||
1131 | static __inline fract16 sub_fr1x16(fract16 _x, fract16 _y) | |
1132 | { return __builtin_bfin_sub_fr1x16(_x,_y); } | |
1133 | ||
1134 | ||
1135 | ||
1136 | ||
1137 | static __inline fract2x16 mult_fr2x16(fract2x16 _x, fract2x16 _y) | |
1138 | { return __builtin_bfin_mult_fr2x16(_x,_y); } | |
1139 | ||
1140 | ||
1141 | ||
1142 | static __inline fract16 mult_fr1x16(fract16 _x, fract16 _y) | |
1143 | { return __builtin_bfin_mult_fr1x16(_x,_y); } | |
1144 | ||
1145 | ||
1146 | ||
1147 | ||
1148 | ||
1149 | ||
1150 | static __inline fract2x16 multr_fr2x16(fract2x16 _x, fract2x16 _y) | |
1151 | { return __builtin_bfin_multr_fr2x16(_x,_y); } | |
1152 | ||
1153 | ||
1154 | ||
1155 | ||
1156 | static __inline fract16 multr_fr1x16(fract16 _x, fract16 _y) | |
1157 | { return __builtin_bfin_multr_fr1x16(_x,_y); } | |
1158 | ||
1159 | ||
1160 | ||
1161 | ||
1162 | ||
1163 | static __inline fract2x16 negate_fr2x16(fract2x16 _x) | |
1164 | { return __builtin_bfin_negate_fr2x16(_x); } | |
1165 | ||
1166 | ||
1167 | ||
1168 | static __inline fract16 negate_fr1x16(fract16 _x) | |
1169 | { return __builtin_bfin_negate_fr1x16(_x); } | |
1170 | # 112 "/usr/local/src/blackfin/svn/uclinux-dist/trunk/lib/libbfdsp/include/fract_math.h" 3 | |
1171 | static __inline fract2x16 shl_fr2x16(fract2x16 _x, short _y) | |
1172 | { return __builtin_bfin_shl_fr2x16(_x,_y); } | |
1173 | # 125 "/usr/local/src/blackfin/svn/uclinux-dist/trunk/lib/libbfdsp/include/fract_math.h" 3 | |
1174 | static __inline fract2x16 shl_fr2x16_clip(fract2x16 _x, short _y) | |
1175 | { | |
1176 | _y = _y > 15 ? 15 : _y; | |
1177 | _y = _y < -16 ? -16 : _y; | |
1178 | return __builtin_bfin_shl_fr2x16(_x,_y); | |
1179 | } | |
1180 | # 140 "/usr/local/src/blackfin/svn/uclinux-dist/trunk/lib/libbfdsp/include/fract_math.h" 3 | |
1181 | static __inline fract16 shl_fr1x16(fract16 _x, short _y) | |
1182 | { return __builtin_bfin_shl_fr1x16(_x,_y); } | |
1183 | # 150 "/usr/local/src/blackfin/svn/uclinux-dist/trunk/lib/libbfdsp/include/fract_math.h" 3 | |
1184 | static __inline fract16 shl_fr1x16_clip(fract16 _x, short _y) | |
1185 | { | |
1186 | _y = _y > 15 ? 15 : _y; | |
1187 | _y = _y < -16 ? -16 : _y; | |
1188 | return __builtin_bfin_shl_fr1x16(_x,_y); | |
1189 | } | |
1190 | # 169 "/usr/local/src/blackfin/svn/uclinux-dist/trunk/lib/libbfdsp/include/fract_math.h" 3 | |
1191 | static __inline fract2x16 shr_fr2x16(fract2x16 _x, short _y) | |
1192 | { return __builtin_bfin_shl_fr2x16(_x,-_y); } | |
1193 | # 180 "/usr/local/src/blackfin/svn/uclinux-dist/trunk/lib/libbfdsp/include/fract_math.h" 3 | |
1194 | static __inline fract2x16 shr_fr2x16_clip(fract2x16 _x, short _y) | |
1195 | { | |
1196 | _y = _y > 16 ? 16 : _y; | |
1197 | _y = _y < -15 ? -15 : _y; | |
1198 | return __builtin_bfin_shl_fr2x16 (_x,-_y); | |
1199 | } | |
1200 | # 195 "/usr/local/src/blackfin/svn/uclinux-dist/trunk/lib/libbfdsp/include/fract_math.h" 3 | |
1201 | static __inline fract16 shr_fr1x16(fract16 _x, short _y) | |
1202 | { return __builtin_bfin_shl_fr1x16(_x,-_y); } | |
1203 | # 205 "/usr/local/src/blackfin/svn/uclinux-dist/trunk/lib/libbfdsp/include/fract_math.h" 3 | |
1204 | static __inline fract16 shr_fr1x16_clip(fract16 _x, short _y) | |
1205 | { | |
1206 | _y = _y > 16 ? 16 : _y; | |
1207 | _y = _y < -15 ? -15 : _y; | |
1208 | return __builtin_bfin_shl_fr1x16(_x,-_y); | |
1209 | } | |
1210 | # 219 "/usr/local/src/blackfin/svn/uclinux-dist/trunk/lib/libbfdsp/include/fract_math.h" 3 | |
1211 | static __inline fract2x16 shrl_fr2x16(fract2x16 _x, short _y) | |
1212 | { return __builtin_bfin_lshl_fr2x16(_x,-_y); } | |
1213 | ||
1214 | ||
1215 | ||
1216 | ||
1217 | ||
1218 | ||
1219 | ||
1220 | static __inline fract2x16 shrl_fr2x16_clip(fract2x16 _x, short _y) | |
1221 | { | |
1222 | _y = _y > 16 ? 16 : _y; | |
1223 | _y = _y < -15 ? -15 : _y; | |
1224 | return __builtin_bfin_lshl_fr2x16 (_x,-_y); | |
1225 | } | |
1226 | # 242 "/usr/local/src/blackfin/svn/uclinux-dist/trunk/lib/libbfdsp/include/fract_math.h" 3 | |
1227 | static __inline fract16 shrl_fr1x16(fract16 _x, short _y) | |
1228 | { return __builtin_bfin_lshl_fr1x16(_x,-_y); } | |
1229 | ||
1230 | ||
1231 | ||
1232 | ||
1233 | ||
1234 | ||
1235 | ||
1236 | static __inline fract16 shrl_fr1x16_clip(fract16 _x, short _y) | |
1237 | { | |
1238 | _y = _y > 16 ? 16 : _y; | |
1239 | _y = _y < -15 ? -15 : _y; | |
1240 | return __builtin_bfin_lshl_fr1x16 (_x,-_y); | |
1241 | } | |
1242 | # 267 "/usr/local/src/blackfin/svn/uclinux-dist/trunk/lib/libbfdsp/include/fract_math.h" 3 | |
1243 | static __inline fract32 add_fr1x32(fract32 _x, fract32 _y) | |
1244 | { return __builtin_bfin_add_fr1x32(_x,_y); } | |
1245 | ||
1246 | ||
1247 | static __inline fract32 sub_fr1x32(fract32 _x, fract32 _y) | |
1248 | { return __builtin_bfin_sub_fr1x32(_x,_y); } | |
1249 | ||
1250 | ||
1251 | ||
1252 | ||
1253 | static __inline fract32 mult_fr1x32x32(fract32 _x, fract32 _y) | |
1254 | { return __builtin_bfin_mult_fr1x32x32(_x,_y); } | |
1255 | ||
1256 | ||
1257 | ||
1258 | ||
1259 | ||
1260 | static __inline fract32 mult_fr1x32x32NS(fract32 _x, fract32 _y) | |
1261 | { return __builtin_bfin_mult_fr1x32x32NS(_x,_y); } | |
1262 | ||
1263 | ||
1264 | ||
1265 | ||
1266 | static __inline fract32 abs_fr1x32(fract32 _x) | |
1267 | { return __builtin_bfin_abs_fr1x32(_x); } | |
1268 | ||
1269 | ||
1270 | static __inline fract32 __builtin_bfin_negate_fr1x32(fract32 _x) { | |
1271 | return __builtin_bfin_sub_fr1x32(0, _x); | |
1272 | } | |
1273 | ||
1274 | ||
1275 | static __inline fract32 negate_fr1x32(fract32 _x) { | |
1276 | return __builtin_bfin_sub_fr1x32(0, _x); | |
1277 | } | |
1278 | ||
1279 | ||
1280 | static __inline fract32 min_fr1x32(fract32 _x, fract32 _y) | |
1281 | { return __builtin_bfin_min_fr1x32(_x,_y); } | |
1282 | ||
1283 | ||
1284 | static __inline fract32 max_fr1x32(fract32 _x, fract32 _y) | |
1285 | { return __builtin_bfin_max_fr1x32(_x,_y); } | |
1286 | # 319 "/usr/local/src/blackfin/svn/uclinux-dist/trunk/lib/libbfdsp/include/fract_math.h" 3 | |
1287 | static __inline fract32 shl_fr1x32(fract32 _x, short _y) | |
1288 | { return __builtin_bfin_shl_fr1x32(_x,_y); } | |
1289 | # 329 "/usr/local/src/blackfin/svn/uclinux-dist/trunk/lib/libbfdsp/include/fract_math.h" 3 | |
1290 | static __inline fract32 shl_fr1x32_clip(fract32 _x, short _y) | |
1291 | { return __builtin_bfin_shl_fr1x32_clip(_x,_y); } | |
1292 | # 340 "/usr/local/src/blackfin/svn/uclinux-dist/trunk/lib/libbfdsp/include/fract_math.h" 3 | |
1293 | static __inline fract32 shr_fr1x32(fract32 _x, short _y) | |
1294 | { return __builtin_bfin_shr_fr1x32(_x,_y); } | |
1295 | # 350 "/usr/local/src/blackfin/svn/uclinux-dist/trunk/lib/libbfdsp/include/fract_math.h" 3 | |
1296 | static __inline fract32 shr_fr1x32_clip(fract32 _x, short _y) | |
1297 | { return __builtin_bfin_shr_fr1x32_clip(_x,_y); } | |
1298 | ||
1299 | ||
1300 | ||
1301 | static __inline fract32 mult_fr1x32(fract16 _x, fract16 _y) | |
1302 | { return __builtin_bfin_mult_fr1x32(_x,_y); } | |
1303 | # 365 "/usr/local/src/blackfin/svn/uclinux-dist/trunk/lib/libbfdsp/include/fract_math.h" 3 | |
1304 | static __inline fract16 __builtin_bfin_sat_fr1x32(fract32 _x) | |
1305 | { return shl_fr1x32(_x,16)>>16;} | |
1306 | ||
1307 | ||
1308 | ||
1309 | static __inline fract16 sat_fr1x32(fract32 _x) | |
1310 | { return shl_fr1x32(_x,16)>>16;} | |
1311 | ||
1312 | ||
1313 | ||
1314 | static __inline fract16 round_fr1x32(fract32 _x) | |
1315 | { return __builtin_bfin_round_fr1x32(_x); } | |
1316 | # 388 "/usr/local/src/blackfin/svn/uclinux-dist/trunk/lib/libbfdsp/include/fract_math.h" 3 | |
1317 | static __inline int norm_fr1x32(fract32 _x) | |
1318 | { return __builtin_bfin_norm_fr1x32(_x); } | |
1319 | # 401 "/usr/local/src/blackfin/svn/uclinux-dist/trunk/lib/libbfdsp/include/fract_math.h" 3 | |
1320 | static __inline int norm_fr1x16(fract16 _x) | |
1321 | { return __builtin_bfin_norm_fr1x16(_x); } | |
1322 | ||
1323 | ||
1324 | ||
1325 | static __inline fract16 trunc_fr1x32(fract32 _x) | |
1326 | { return _x>>16; } | |
1327 | ||
1328 | ||
1329 | ||
1330 | static __inline fract16 abs_fr16 (fract16 _x) | |
1331 | { return __builtin_bfin_abs_fr1x16 (_x); } | |
1332 | ||
1333 | ||
1334 | ||
1335 | static __inline fract16 abs_fr1x16 (fract16 _x) | |
1336 | { return __builtin_bfin_abs_fr1x16(_x); } | |
1337 | ||
1338 | ||
1339 | static __inline fract16 max_fr16 (fract16 _x, fract16 _y) | |
1340 | { return __builtin_bfin_max_fr1x16 (_x, _y); } | |
1341 | ||
1342 | ||
1343 | static __inline fract16 min_fr16 (fract16 _x, fract16 _y) | |
1344 | { return __builtin_bfin_min_fr1x16 (_x, _y); } | |
1345 | # 27 "/usr/local/src/blackfin/svn/uclinux-dist/trunk/lib/libbfdsp/include/fract.h" 2 3 | |
1346 | # 1 "/usr/local/src/blackfin/svn/uclinux-dist/trunk/lib/libbfdsp/include/fract2float_conv.h" 1 3 | |
1347 | ||
1348 | ||
1349 | ||
1350 | # 4 "/usr/local/src/blackfin/svn/uclinux-dist/trunk/lib/libbfdsp/include/fract2float_conv.h" 3 | |
1351 | # 31 "/usr/local/src/blackfin/svn/uclinux-dist/trunk/lib/libbfdsp/include/fract2float_conv.h" 3 | |
1352 | static __inline fract32 fr16_to_fr32(fract16 _x) { | |
1353 | ||
1354 | return ((fract32)(_x)) << 16; | |
1355 | } | |
1356 | ||
1357 | static __inline fract16 fr32_to_fr16(fract32 _x) { | |
1358 | ||
1359 | return (fract16)(_x >> 16); | |
1360 | } | |
1361 | ||
1362 | float fr32_to_float (fract32); | |
1363 | fract32 float_to_fr32 (float); | |
1364 | ||
1365 | static __inline float fr16_to_float(fract16 _x) { | |
1366 | return fr32_to_float(fr16_to_fr32(_x)); | |
1367 | } | |
1368 | ||
1369 | static __inline fract16 float_to_fr16(float _x) { | |
1370 | return fr32_to_fr16(float_to_fr32(_x)); | |
1371 | } | |
1372 | # 28 "/usr/local/src/blackfin/svn/uclinux-dist/trunk/lib/libbfdsp/include/fract.h" 2 3 | |
1373 | # 51 "/usr/local/src/blackfin/svn/uclinux-dist/trunk/lib/libbfdsp/include/float16.h" 2 | |
1374 | # 82 "/usr/local/src/blackfin/svn/uclinux-dist/trunk/lib/libbfdsp/include/float16.h" | |
1375 | __inline float16 | |
1376 | fr16_to_fl16(fract16 fr) | |
1377 | { | |
1378 | float16 fl = { 0 }; | |
1379 | if (fr) { | |
1380 | short exp = norm_fr1x16(fr); | |
1381 | fl.s.e = -exp; | |
1382 | fl.s.m = fr << exp; | |
1383 | } | |
1384 | return fl; | |
1385 | } | |
1386 | ||
1387 | __inline fract16 | |
1388 | fl16_to_fr16(float16 fl) | |
1389 | { | |
1390 | fract16 fr = fl.s.m; | |
1391 | short exp = fl.s.e; | |
1392 | ||
1393 | return shl_fr1x16(fr, exp); | |
1394 | } | |
1395 | ||
1396 | static __inline float16 | |
1397 | norm_fl16(float16 fl) | |
1398 | { | |
1399 | if (fl.s.m) { | |
1400 | short exp = norm_fr1x16(fl.s.m); | |
1401 | fl.s.m <<= exp; | |
1402 | fl.s.e -= exp; | |
1403 | } else { | |
1404 | fl.s.e = 0; | |
1405 | } | |
1406 | return fl; | |
1407 | } | |
1408 | ||
1409 | __inline float16 | |
1410 | add_fl16(float16 x, float16 y) | |
1411 | { | |
1412 | int d = x.s.e - y.s.e; | |
1413 | float16 fl = x, a = y; | |
1414 | int xneg = x.l < 0; | |
1415 | int yneg = y.l < 0; | |
1416 | if (d < 0) { | |
1417 | fl = y; | |
1418 | a = x; | |
1419 | } | |
1420 | d = abs_fr1x32(d); | |
1421 | fl.s.m += a.s.m >> d; | |
1422 | ||
1423 | if (xneg == yneg && xneg != (fl.l < 0)) { | |
1424 | fl.s.m >>= 1; | |
1425 | fl.s.m &= 0x7fff; | |
1426 | fl.s.m |= xneg << 15; | |
1427 | fl.s.e++; | |
1428 | } else if (fl.s.m) { | |
1429 | short exp = norm_fr1x16(fl.s.m); | |
1430 | fl.s.m <<= exp; | |
1431 | fl.s.e -= exp; | |
1432 | } else { | |
1433 | fl.s.e = 0; | |
1434 | } | |
1435 | return fl; | |
1436 | } | |
1437 | ||
1438 | __inline float16 | |
1439 | sub_fl16(float16 x, float16 y) | |
1440 | { | |
1441 | int d = x.s.e - y.s.e; | |
1442 | float16 fl = x, a = y; | |
1443 | int xneg = x.l < 0; | |
1444 | int yneg = y.l < 0; | |
1445 | if (d < 0) { | |
1446 | d = -d; | |
1447 | fl.s.m >>= d; | |
1448 | fl.s.e += d; | |
1449 | } else { | |
1450 | a.s.m >>= d; | |
1451 | } | |
1452 | fl.s.m -= a.s.m; | |
1453 | ||
1454 | if (xneg != yneg && yneg == (fl.l < 0)) { | |
1455 | fl.s.m >>= 1; | |
1456 | fl.s.m &= 0x7fff; | |
1457 | fl.s.m |= xneg << 15; | |
1458 | fl.s.e++; | |
1459 | } else if (fl.s.m) { | |
1460 | short exp = norm_fr1x16(fl.s.m); | |
1461 | fl.s.m <<= exp; | |
1462 | fl.s.e -= exp; | |
1463 | } else { | |
1464 | fl.s.e = 0; | |
1465 | } | |
1466 | return fl; | |
1467 | } | |
1468 | ||
1469 | __inline float16 | |
1470 | mul_fl16(float16 x, float16 y) | |
1471 | { | |
1472 | float16 fl; | |
1473 | ||
1474 | fl.s.e = x.s.e + y.s.e; | |
1475 | fl.s.m = mult_fr1x16(x.s.m, y.s.m); | |
1476 | if (fl.s.m) { | |
1477 | short exp = norm_fr1x16(fl.s.m); | |
1478 | fl.s.m <<= exp; | |
1479 | fl.s.e -= exp; | |
1480 | } else { | |
1481 | fl.s.e = 0; | |
1482 | } | |
1483 | return fl; | |
1484 | } | |
1485 | ||
1486 | __inline float16 | |
1487 | div_fl16(float16 x, float16 y) | |
1488 | { | |
1489 | int i; | |
1490 | int niters = 15; | |
1491 | const long one = 0x40000001; | |
1492 | float16 fl; | |
1493 | int xneg = x.l < 0; | |
1494 | int yneg = y.l < 0; | |
1495 | unsigned short r = 0; | |
1496 | unsigned short d = x.s.m; | |
1497 | unsigned short q = y.s.m; | |
1498 | if (y.l == 0) { | |
1499 | fl.l=0x00008000; | |
1500 | return fl; | |
1501 | } | |
1502 | if (y.l == one) | |
1503 | return x; | |
1504 | if (x.l == y.l) { | |
1505 | fl.l = one; | |
1506 | return fl; | |
1507 | } | |
1508 | fl.s.e = x.s.e - y.s.e; | |
1509 | if (xneg) | |
1510 | d = -d; | |
1511 | if (yneg) | |
1512 | q = -q; | |
1513 | for (i = 0; i < niters; i++) { | |
1514 | if (q <= d) { | |
1515 | d -= q; | |
1516 | r |= 1; | |
1517 | } | |
1518 | d <<= 1; | |
1519 | r <<= 1; | |
1520 | } | |
1521 | d = r; | |
1522 | if (d & 0x8000) { | |
1523 | ||
1524 | d >>= 1; | |
1525 | d &= 0x7fff; | |
1526 | fl.s.e++; | |
1527 | } | |
1528 | if (xneg != yneg) | |
1529 | d = -d; | |
1530 | fl.s.m = d; | |
1531 | if (fl.s.m) { | |
1532 | short exp = norm_fr1x16(fl.s.m); | |
1533 | fl.s.m <<= exp; | |
1534 | fl.s.e -= exp; | |
1535 | } else { | |
1536 | fl.s.e = 0; | |
1537 | } | |
1538 | return fl; | |
1539 | } | |
1540 | ||
1541 | __inline float16 | |
1542 | negate_fl16(float16 fl) | |
1543 | { | |
1544 | # 262 "/usr/local/src/blackfin/svn/uclinux-dist/trunk/lib/libbfdsp/include/float16.h" | |
1545 | fl.s.m = -fl.s.m; | |
1546 | ||
1547 | return fl; | |
1548 | } | |
1549 | ||
1550 | __inline float16 | |
1551 | abs_fl16(float16 fl) | |
1552 | { | |
1553 | fl.s.m = abs_fr1x16(fl.s.m); | |
1554 | return fl; | |
1555 | } | |
1556 | ||
1557 | __inline int | |
1558 | cmp_fl16(float16 x, float16 y) | |
1559 | { | |
1560 | ||
1561 | ||
1562 | ||
1563 | ||
1564 | int neg = 0; | |
1565 | int res; | |
1566 | short resl, resh; | |
1567 | int xneg = x.l < 0; | |
1568 | int yneg = y.l < 0; | |
1569 | ||
1570 | ||
1571 | ||
1572 | ||
1573 | ||
1574 | ||
1575 | if (xneg == yneg) | |
1576 | neg = xneg; | |
1577 | else | |
1578 | return (xneg << 31) | 1; | |
1579 | ||
1580 | resh = sub_fr1x16(x.s.m, y.s.m); | |
1581 | resl = sub_fr1x16(x.s.e, y.s.e); | |
1582 | if (resl == 0) | |
1583 | resl = resh; | |
1584 | res = resl; | |
1585 | if (neg) | |
1586 | res = -res; | |
1587 | return res; | |
1588 | } | |
1589 | ||
1590 | __inline float16 | |
1591 | fl_to_fl16(float f) | |
1592 | { | |
1593 | float16 fl; | |
1594 | unsigned long sign, uexp; | |
1595 | long exp; | |
1596 | fl.f = f; | |
1597 | if ((fl.u << 1) == 0) { | |
1598 | ||
1599 | fl.u = 0; | |
1600 | return fl; | |
1601 | } | |
1602 | sign = (fl.u >> 31) << 31; | |
1603 | uexp = (fl.u << 1) >> 24; | |
1604 | exp = uexp - 127; | |
1605 | exp += 1; | |
1606 | fl. u |= (1<<23); | |
1607 | fl.u <<= 8; | |
1608 | fl.u >>= 1; | |
1609 | ||
1610 | ||
1611 | ||
1612 | ||
1613 | fl.s.e = exp; | |
1614 | if (sign) | |
1615 | fl.s.m = -fl.s.m; | |
1616 | return fl; | |
1617 | } | |
1618 | ||
1619 | __inline int | |
1620 | fits_in_fl16(float f) | |
1621 | { | |
1622 | float16 fl; | |
1623 | fl.f = f; | |
1624 | return (fl.u & 0xff) == 0; | |
1625 | } | |
1626 | ||
1627 | __inline float | |
1628 | fl16_to_fl(float16 fl) | |
1629 | { | |
1630 | unsigned long exp, sign; | |
1631 | if (fl.u == 0) | |
1632 | return fl.f; | |
1633 | sign = (fl.u >> 31) << 31; | |
1634 | exp = (fl.s.e + 127 - 1); | |
1635 | if ((fl.s.m & 0xffff) == 0x8000) { | |
1636 | fl.s.m = 0x4000; | |
1637 | exp++; | |
1638 | } else if (sign) { | |
1639 | fl.s.m = -fl.s.m; | |
1640 | } | |
1641 | fl.s.e = 0; | |
1642 | fl.u <<= 2; | |
1643 | fl.u >>= 9; | |
1644 | exp <<= 23; | |
1645 | fl.u = sign | exp | fl.u; | |
1646 | return fl.f; | |
1647 | } | |
1648 | # 1 "test.c" 2 |