Annotation of gcc/va-sparc.h, revision 1.1.1.3

1.1       root        1: /* This is just like the default gvarargs.h
1.1.1.3 ! root        2:    except for differences described below.  */
1.1       root        3: 
                      4: /* Make this a macro rather than a typedef, so we can undef any other defn.  */
                      5: #define va_list __va___list
1.1.1.3 ! root        6: #ifndef __svr4__
1.1       root        7: /* This has to be a char * to be compatible with Sun.
                      8:    i.e., we have to pass a `va_list' to vsprintf.  */
                      9: typedef char * __va___list;
1.1.1.3 ! root       10: #else
        !            11: /* This has to be a void * to be compatible with Sun svr4.
        !            12:    i.e., we have to pass a `va_list' to vsprintf.  */
        !            13: typedef void * __va___list;
        !            14: #endif
1.1       root       15: 
                     16: /* In GCC version 2, we want an ellipsis at the end of the declaration
                     17:    of the argument list.  GCC version 1 can't parse it.  */
                     18: 
                     19: #if __GNUC__ > 1
                     20: #define __va_ellipsis ...
                     21: #else
                     22: #define __va_ellipsis
                     23: #endif
                     24: 
1.1.1.2   root       25: #ifdef _STDARG_H
                     26: #define va_start(AP, LASTARG)                                  \
                     27:   (__builtin_saveregs (), AP = ((char *) __builtin_next_arg ()))
                     28: #else
1.1.1.3 ! root       29: #define va_alist  __builtin_va_alist
        !            30: /* The ... causes current_function_varargs to be set in cc1.  */
        !            31: #define va_dcl    int __builtin_va_alist; __va_ellipsis
        !            32: 
1.1       root       33: #define va_start(AP)                                           \
                     34:  (__builtin_saveregs (), (AP) = ((char *) &__builtin_va_alist))
1.1.1.2   root       35: #endif
                     36: 
1.1       root       37: #define va_end(pvar)
                     38: 
                     39: #define __va_rounded_size(TYPE)  \
                     40:   (((sizeof (TYPE) + sizeof (int) - 1) / sizeof (int)) * sizeof (int))
                     41: 
                     42: /* Avoid errors if compiling GCC v2 with GCC v1.  */
                     43: #if __GNUC__ == 1
                     44: #define __extension__
                     45: #endif
                     46: 
                     47: /* RECORD_TYPE args passed using the C calling convention are
                     48:    passed by invisible reference.  ??? RECORD_TYPE args passed
                     49:    in the stack are made to be word-aligned; for an aggregate that is
                     50:    not word-aligned, we advance the pointer to the first non-reg slot.  */
                     51: #define va_arg(pvar,TYPE)                                      \
                     52: __extension__                                                  \
                     53: ({ TYPE __va_temp;                                             \
                     54:    ((__builtin_classify_type (__va_temp) >= 12)                        \
                     55:     ? ((pvar) += __va_rounded_size (TYPE *),                   \
1.1.1.2   root       56:        **(TYPE **) ((pvar) - __va_rounded_size (TYPE *)))      \
1.1.1.3 ! root       57:     : __va_rounded_size (TYPE) == 8                            \
        !            58:     ? ({ union {TYPE d; int i[2];} u;                          \
        !            59:         u.i[0] = ((int *) (pvar))[0];                          \
        !            60:         u.i[1] = ((int *) (pvar))[1];                          \
        !            61:         (pvar) += 8;                                           \
        !            62:         u.d; })                                                \
1.1.1.2   root       63:     : ((pvar) += __va_rounded_size (TYPE),                     \
1.1       root       64:        *((TYPE *) ((pvar) - __va_rounded_size (TYPE)))));})

unix.superglobalmegacorp.com

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