(va_start): Pass LASTARG as a parameter to

builtin_next_arg.

From-SVN: r6855
This commit is contained in:
Jim Wilson 1994-03-23 14:19:23 -08:00
parent c4dfe0fc06
commit 117aea7ad8
6 changed files with 11 additions and 12 deletions

View File

@ -67,7 +67,7 @@ typedef void *__gnuc_va_list;
(((sizeof (TYPE) + sizeof (int) - 1) / sizeof (int)) * sizeof (int))
#define va_start(AP, LASTARG) \
(AP = ((__gnuc_va_list) __builtin_next_arg ()))
(AP = ((__gnuc_va_list) __builtin_next_arg (LASTARG)))
#undef va_end
void va_end (__gnuc_va_list); /* Defined in libgcc.a */

View File

@ -30,7 +30,8 @@ typedef void *__gnuc_va_list;
#ifdef _STDARG_H
#define va_start(AP,LASTARG) (AP = ((__gnuc_va_list) __builtin_next_arg ()))
#define va_start(AP,LASTARG) \
(AP = ((__gnuc_va_list) __builtin_next_arg (LASTARG)))
#else /* _VARARGS_H */

View File

@ -61,7 +61,7 @@ typedef struct {
((pvar) = *(__gnuc_va_list *) __builtin_saveregs (), \
(pvar).__ireg_used = __builtin_args_info (0) / 4, \
(pvar).__freg_used = __builtin_args_info (1) / 4, \
(pvar).__mem_ptr = __builtin_next_arg ())
(pvar).__mem_ptr = __builtin_next_arg (firstarg))
#endif /* _STDARG_H */

View File

@ -39,7 +39,7 @@ typedef unsigned __gnuc_va_list[2];
#define va_start(AP, LASTARG) \
__extension__ \
({ __asm__ ("st g14,%0" : "=m" (*(AP))); \
(AP)[1] = (unsigned) __builtin_next_arg () - *AP; })
(AP)[1] = (unsigned) __builtin_next_arg (LASTARG) - *AP; })
#else
#define va_alist __builtin_va_alist

View File

@ -38,12 +38,7 @@ typedef char * __gnuc_va_list;
#endif
#ifdef _STDARG_H
#if __mips==3
#define va_start(__AP, __LASTARG) (__AP = __builtin_next_arg ())
#else
#define va_start(__AP, __LASTARG) \
(__AP = ((char *) &(__LASTARG) + __va_rounded_size (__LASTARG)))
#endif
#define va_start(__AP, __LASTARG) (__AP = __builtin_next_arg (__LASTARG))
#else
#define va_alist __builtin_va_alist

View File

@ -23,11 +23,14 @@ typedef void * __gnuc_va_list;
#ifdef _STDARG_H
/* Call __builtin_next_arg even though we aren't using its value, so that
we can verify that LASTARG is correct. */
#ifdef __GCC_NEW_VARARGS__
#define va_start(AP, LASTARG) (AP = (char *) __builtin_saveregs ())
#define va_start(AP, LASTARG) \
(__builtin_next_arg (LASTARG), AP = (char *) __builtin_saveregs ())
#else
#define va_start(AP, LASTARG) \
(__builtin_saveregs (), AP = ((char *) __builtin_next_arg ()))
(__builtin_saveregs (), AP = ((char *) __builtin_next_arg (LASTARG)))
#endif
#else