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

1.1.1.3 ! root        1: /* This is just like the default gvarargs.h
        !             2:    except for differences decribed below.  */
1.1       root        3: 
1.1.1.3 ! root        4: /* va_list is a structure instead of a char*.  */
        !             5: typedef struct __va_ctl
        !             6: {
        !             7:   char *__stack;   /* Current pointer for fetching args.  */
        !             8:   char *__beg;     /* Pointer to position of first saved register arg.  */
        !             9: } va_list;
        !            10: 
        !            11: #define va_alist  __builtin_va_alist
        !            12: #define va_dcl    int __builtin_va_alist;
        !            13: 
        !            14: /* The difference is to store the stack address in both components
        !            15:    instead of in AP itself.  */
        !            16: #define va_start(AP)                                           \
        !            17:  (__builtin_saveregs (),                                       \
        !            18:  (AP).__beg = (AP).__stack = ((char *) &__builtin_va_alist))
        !            19: #define va_end(pvar)
        !            20: 
        !            21: #define __va_rounded_size(TYPE)  \
        !            22:   (((sizeof (TYPE) + sizeof (int) - 1) / sizeof (int)) * sizeof (int))
        !            23: 
        !            24: /* The difference is that, for an aggregate that is not word-aligned,
        !            25:    we advance (pvar).__stack to the first non-reg slot.  */
        !            26: #define va_arg(pvar,TYPE)                                      \
        !            27: ({ TYPE __va_temp;                                             \
        !            28:    ((__builtin_classify_type (__va_temp) < 12                  \
        !            29:      || __alignof__ __va_temp >= 4)                            \
        !            30:     ? ((pvar).__stack += __va_rounded_size (TYPE),             \
        !            31:        *((TYPE *) ((pvar).__stack - __va_rounded_size (TYPE))))        \
        !            32:     : ((((pvar).__stack - (pvar).__beg < 24)                   \
        !            33:        ? (pvar).__stack = (pvar).__beg + 24 : 0),              \
        !            34:        (pvar).__stack += __va_rounded_size (TYPE),             \
        !            35:        *((TYPE *) ((pvar).__stack - __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.