From: Richard Stallman Date: Fri, 9 Jul 1993 22:19:58 +0000 (+0000) Subject: Make var/stdargs compatible with apogee's acc. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9e91edcefb11f7d7ffe62296ea7a55879d3f8099;p=gcc.git Make var/stdargs compatible with apogee's acc. (__gnuc_va_list): Replace __va_f and __va_r with __va_reg. (__va_list, _SYS_INT_STDARG_H): New defines. (va_arg): Corresponding changes. From-SVN: r4894 --- diff --git a/gcc/ginclude/va-clipper.h b/gcc/ginclude/va-clipper.h index 80b42c618cf..e3a4b8f6e53 100644 --- a/gcc/ginclude/va-clipper.h +++ b/gcc/ginclude/va-clipper.h @@ -7,9 +7,8 @@ typedef struct { - double __va_f[2]; /* saved floating regs f0,f1 */ - int __va_r[2]; /* saved general regs r0,r1 */ int __va_ap; /* pointer to stack args */ + void *__va_reg[4]; /* pointer to r0,f0,r1,f1 */ int __va_num; /* number of args processed */ } __gnuc_va_list; #endif /* not __GNUC_VA_LIST */ @@ -17,8 +16,11 @@ typedef struct #if defined (_STDARG_H) || defined (_VARARGS_H) #define va_list __gnuc_va_list +#define __va_list __gnuc_va_list /* acc compatibility */ + #define _VA_LIST #define _VA_LIST_ +#define _SYS_INT_STDARG_H /* acc compatibility */ #ifdef _STDARG_H #define va_start(AP,LASTARG) \ @@ -43,9 +45,9 @@ typedef struct #define va_arg(AP, TYPE) \ ((AP).__va_num < 2 && __builtin_classify_type (* (TYPE *)0) < 12 \ - ? (__builtin_classify_type (* (TYPE *)0) == 8 \ - ? (*(TYPE *)&(AP).__va_f[(AP).__va_num++]) \ - : ((TYPE)((AP).__va_r[(AP).__va_num++]))) \ + ? (__builtin_classify_type (* (TYPE *)0) == 8 \ + ? (*(TYPE *)(AP).__va_reg[2 * (AP).__va_num++ + 1]) \ + : (*(TYPE *)(AP).__va_reg[2 * (AP).__va_num++ ])) \ : ((AP).__va_num++, __va_round (AP,TYPE), *((TYPE *)((AP).__va_ap))++)) #define va_end(AP)