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
This commit is contained in:
Richard Stallman 1993-07-09 22:19:58 +00:00
parent d412ec4c71
commit 9e91edcefb
1 changed files with 7 additions and 5 deletions

View File

@ -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)