URL
https://opencores.org/ocsvn/eco32/eco32/trunk
Go to most recent revision |
Details |
Compare with Previous |
View Log
Line No. |
Rev |
Author |
Line |
1 |
4 |
hellwig |
#ifndef __STDARG
|
2 |
|
|
#define __STDARG
|
3 |
|
|
|
4 |
|
|
#if !defined(_VA_LIST) && !defined(__VA_LIST_DEFINED)
|
5 |
|
|
#define _VA_LIST
|
6 |
|
|
#define _VA_LIST_DEFINED
|
7 |
|
|
typedef char *__va_list;
|
8 |
|
|
#endif
|
9 |
|
|
static float __va_arg_tmp;
|
10 |
|
|
typedef __va_list va_list;
|
11 |
|
|
|
12 |
|
|
#define va_start(list, start) ((void)((list) = (sizeof(start)<4 ? \
|
13 |
|
|
(char *)((int *)&(start)+1) : (char *)(&(start)+1))))
|
14 |
|
|
#define __va_arg(list, mode, n) (\
|
15 |
|
|
__typecode(mode)==1 && sizeof(mode)==4 ? \
|
16 |
|
|
(__va_arg_tmp = *(double *)(&(list += ((sizeof(double)+n)&~n))[-(int)((sizeof(double)+n)&~n)]), \
|
17 |
|
|
*(mode *)&__va_arg_tmp) : \
|
18 |
|
|
*(mode *)(&(list += ((sizeof(mode)+n)&~n))[-(int)((sizeof(mode)+n)&~n)]))
|
19 |
|
|
#define _bigendian_va_arg(list, mode, n) (\
|
20 |
|
|
sizeof(mode)==1 ? *(mode *)(&(list += 4)[-1]) : \
|
21 |
|
|
sizeof(mode)==2 ? *(mode *)(&(list += 4)[-2]) : __va_arg(list, mode, n))
|
22 |
|
|
#define _littleendian_va_arg(list, mode, n) __va_arg(list, mode, n)
|
23 |
|
|
#define va_end(list) ((void)0)
|
24 |
|
|
#define va_arg(list, mode) _littleendian_va_arg(list, mode, 3U)
|
25 |
|
|
typedef void *__gnuc_va_list;
|
26 |
|
|
#endif
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.