home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Education Sampler 1992 [NeXTSTEP]
/
Education_1992_Sampler.iso
/
NeXT
/
GnuSource
/
cc-61.0.1
/
cc
/
va-i860.h
< prev
next >
Wrap
C/C++ Source or Header
|
1991-04-24
|
2KB
|
60 lines
struct __va_struct { int __fixed[12]; int __floating[8]; };
typedef struct __va_ctl
{
struct __va_struct *__regs;
void *__stack;
int __nfixed, __nfloating;
} va_list;
#define va_alist
/* In GCC version 2, we want an ellipsis at the end of the declaration
of the argument list. GCC version 1 can't parse it. */
#if __GNUC__ > 1
/* The ... causes current_function_varargs to be set in cc1. */
#define va_dcl ...
#else
#define va_dcl
#endif
#define va_start(pvar) \
(memcpy (&(pvar), (struct __va_ctl *) __builtin_saveregs (), 80))
#define va_end(pvar)
#define va_arg(pvar,type) \
({ type __va_temp; \
*((__builtin_classify_type (__va_temp) < 8 \
&& sizeof __va_temp < 8) \
? ((pvar).__nfixed < 12 \
? (type *) &(pvar).__regs->__fixed[(pvar).__nfixed++] \
: ({ \
int temp \
= ((int) ((pvar).__stack + __alignof__ (type) - 1) \
& ~(__alignof__ (type) - 1)); \
(pvar).__stack = (void *) (temp + sizeof (type)); \
(type *) temp; \
})) \
: __builtin_classify_type (__va_temp) < 9 \
? ((pvar).__nfloating < 8 \
? ((pvar).__nfloating \
= (((pvar).__nfloating + 2 * (sizeof __va_temp / 4) - 1) \
& ~(sizeof __va_temp / 4 - 1)), \
(type *) &(pvar).__regs->__floating[(pvar).__nfloating - (sizeof __va_temp / 4)]) \
: ({ \
int temp \
= ((int) ((pvar).__stack + __alignof__ (type) - 1) \
& ~(__alignof__ (type) - 1)); \
(pvar).__stack = (void *) (temp + sizeof (type)); \
(type *) temp; \
})) \
: ({ \
int temp \
= ((int) ((pvar).__stack + __alignof__ (type) - 1) \
& ~(__alignof__ (type) - 1)); \
(pvar).__stack = (void *) (temp + sizeof (type)); \
(type *) temp; \
})); })