OpenCores
URL https://opencores.org/ocsvn/eco32/eco32/trunk

Subversion Repositories eco32

[/] [eco32/] [trunk/] [lcc/] [include/] [alpha/] [osf/] [stdarg.h] - Blame information for rev 142

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 4 hellwig
#ifndef __STDARG
2
#define __STDARG
3
 
4
#if !defined(_VA_LIST) && !defined(__VA_LIST_DEFINED)
5
#define _VA_LIST
6
#define _VA_LIST_DEFINED
7
typedef struct {
8
        char    *_a0;           /* pointer to first homed integer arg */
9
        int     _offset;        /* byte offset of next param */
10
        float   _tmp;
11
} __va_list;
12
#endif
13
static float __va_arg_tmp;
14
typedef __va_list va_list;
15
 
16
#define va_start(list, start) ((void)( \
17
        (list)._a0 = (__typecode(__firstarg)==1 ? \
18
                (char*)&__firstarg+48 : (char *)&__firstarg), \
19
        (list)._offset = (__typecode(start)==1 ? \
20
                (char*)&start+56 : (char *)&start+8)-(list)._a0))
21
#define va_arg(list, mode) (*(mode *)( \
22
        (list)._offset += (int)((sizeof(mode)+7)&~7), \
23
        (__typecode(mode)==1 && sizeof(mode)==4) ? \
24
                ((list)._tmp = (float)*(double *)((list)._a0 + (list)._offset - \
25
                        ((list)._offset <= 48 ? 56 : 8))), (char *)&(list)._tmp : \
26
        (__typecode(mode)==1 && (list)._offset <= 48) ? \
27
                (list)._a0 + (list)._offset - 56 : \
28
        (list)._a0 + (list)._offset - (int)((sizeof(mode)+7)&~7)))
29
#define va_end(list) ((void)0)
30
#endif

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.