Annotation of gcc/va-mips.h, revision 1.1.1.4

1.1       root        1: /* ---------------------------------------- */
                      2: /*           VARARGS  for MIPS/GNU CC       */
                      3: /*                                          */
                      4: /*                                          */
                      5: /*                                          */
                      6: /*                                          */
                      7: /* ---------------------------------------- */
                      8: 
                      9: 
1.1.1.3   root       10: /* These macros implement varargs for GNU C--either traditional or ANSU.  */
                     11: 
                     12: /* Define __gnuc_va_list.  */
                     13: 
                     14: #ifndef __GNUC_VA_LIST
                     15: #define __GNUC_VA_LIST
                     16: typedef char * __gnuc_va_list;
                     17: #endif /* not __GNUC_VA_LIST */
                     18: 
                     19: /* If this is for internal libc use, don't define anything but
                     20:    __gnuc_va_list.  */
                     21: #if defined (_STDARG_H) || defined (_VARARGS_H)
1.1       root       22: 
                     23: /* In GCC version 2, we want an ellipsis at the end of the declaration
                     24:    of the argument list.  GCC version 1 can't parse it.  */
                     25: 
                     26: #if __GNUC__ > 1
                     27: #define __va_ellipsis ...
                     28: #else
                     29: #define __va_ellipsis
                     30: #endif
                     31: 
1.1.1.3   root       32: #define __va_rounded_size(__TYPE)  \
                     33:   (((sizeof (__TYPE) + sizeof (int) - 1) / sizeof (int)) * sizeof (int))
1.1       root       34: 
                     35: #ifdef _STDARG_H
1.1.1.3   root       36: #define va_start(__AP, __LASTARG)                                              \
                     37:  (__AP = ((char *) &(__LASTARG) + __va_rounded_size (__LASTARG)))
                     38: 
1.1       root       39: #else
1.1.1.2   root       40: #define va_alist  __builtin_va_alist
                     41: #define va_dcl    int __builtin_va_alist; __va_ellipsis
1.1.1.3   root       42: #define va_start(__AP)  __AP = (char *) &__builtin_va_alist
1.1       root       43: #endif
                     44: 
1.1.1.3   root       45: #ifndef va_end
                     46: void va_end (__gnuc_va_list);          /* Defined in libgcc.a */
                     47: #endif
                     48: #define va_end(__AP)
1.1       root       49: 
1.1.1.3   root       50: /* We cast to void * and then to TYPE * because this avoids
                     51:    a warning about increasing the alignment requirement.  */
1.1.1.4 ! root       52: #ifdef __MIPSEB__
        !            53: /* For big-endian machines.  */
        !            54: #define va_arg(__AP, __type)                                   \
        !            55:   ((__AP = (char *) ((__alignof__ (__type) > 4                 \
        !            56:                      ? ((int)__AP + 8 - 1) & -8                \
        !            57:                      : ((int)__AP + 4 - 1) & -4)               \
        !            58:                     + __va_rounded_size (__type))),            \
        !            59:    *(__type *) (void *) (__AP - __va_rounded_size (__type)))
        !            60: #else
        !            61: /* For little-endian machines.  */
1.1.1.3   root       62: #define va_arg(__AP, __type)                                               \
1.1.1.4 ! root       63:   ((__type *) (void *) (__AP = (char *) ((__alignof__(__type) > 4          \
1.1.1.3   root       64:                                          ? ((int)__AP + 8 - 1) & -8        \
                     65:                                          : ((int)__AP + 4 - 1) & -4)       \
                     66:                                         + __va_rounded_size(__type))))[-1]
1.1.1.4 ! root       67: #endif
1.1       root       68: 
1.1.1.3   root       69: #endif /* defined (_STDARG_H) || defined (_VARARGS_H) */

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.