mirror of git://gcc.gnu.org/git/gcc.git
parent
f22f5fa078
commit
43b0eb42ea
|
|
@ -12,6 +12,12 @@
|
||||||
#ifdef __i860__
|
#ifdef __i860__
|
||||||
#include "va-i860.h"
|
#include "va-i860.h"
|
||||||
#else
|
#else
|
||||||
|
#ifdef __hp9000s800__
|
||||||
|
#include "va-hp800.h"
|
||||||
|
#else
|
||||||
|
#ifdef __mips__
|
||||||
|
#include "va-mips.h"
|
||||||
|
#else
|
||||||
|
|
||||||
/* The macro _VA_LIST_ is the same thing used by this file in Ultrix. */
|
/* The macro _VA_LIST_ is the same thing used by this file in Ultrix. */
|
||||||
#ifndef _VA_LIST_
|
#ifndef _VA_LIST_
|
||||||
|
|
@ -45,6 +51,8 @@ void va_end (va_list); /* Defined in libgcc.a */
|
||||||
(AP += __va_rounded_size (TYPE), \
|
(AP += __va_rounded_size (TYPE), \
|
||||||
*((TYPE *) (AP - __va_rounded_size (TYPE))))
|
*((TYPE *) (AP - __va_rounded_size (TYPE))))
|
||||||
|
|
||||||
|
#endif /* not mips */
|
||||||
|
#endif /* not hp9000s800 */
|
||||||
#endif /* not i860 */
|
#endif /* not i860 */
|
||||||
#endif /* not m88k */
|
#endif /* not m88k */
|
||||||
#endif /* _STDARG_H */
|
#endif /* _STDARG_H */
|
||||||
|
|
|
||||||
|
|
@ -28,15 +28,25 @@
|
||||||
typedef char * __va___list;
|
typedef char * __va___list;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define __va_rounded_size(TYPE) \
|
||||||
|
(((sizeof (TYPE) + sizeof (int) - 1) / sizeof (int)) * sizeof (int))
|
||||||
|
|
||||||
|
#ifdef _STDARG_H
|
||||||
|
#define va_start(AP, LASTARG) \
|
||||||
|
(AP = ((char *) &(LASTARG) + __va_rounded_size (LASTARG)))
|
||||||
|
#else
|
||||||
#define va_start(AP) AP = (char *) &__builtin_va_alist
|
#define va_start(AP) AP = (char *) &__builtin_va_alist
|
||||||
|
#endif
|
||||||
|
|
||||||
#define va_end(AP)
|
#define va_end(AP)
|
||||||
|
|
||||||
#ifdef lint /* complains about constant in conditional context */
|
#ifdef lint /* complains about constant in conditional context */
|
||||||
#define va_arg(list, mode) ((mode *)(list += sizeof(mode)))[-1]
|
#define va_arg(list, mode) ((mode *)(list += sizeof(mode)))[-1]
|
||||||
|
|
||||||
#else /* !lint */
|
#else /* !lint */
|
||||||
#define va_arg(AP, mode) ((mode *)(AP = \
|
#define va_arg(AP, mode) \
|
||||||
(char *) (sizeof(mode) > 4 ? ((int)AP + 2*8 - 1) & -8 \
|
((mode *)(AP = (char *) (__alignof(mode) > 4 \
|
||||||
: ((int)AP + 2*4 - 1) & -4)))[-1]
|
? ((int)AP + 2*8 - 1) & -8 \
|
||||||
|
: ((int)AP + 2*4 - 1) & -4)))[-1]
|
||||||
#endif /* lint */
|
#endif /* lint */
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue