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