📄 avcall.h.mingw32
字号:
__avword filler1;#endif#if defined(__i386__) || defined(__m68k__) || (defined(__sparc__) && !defined(__sparc64__)) || defined(__hppa__) || defined(__arm__) || defined(__rs6000__) || defined(__convex__) || defined(__s390__) /* temporary storage, used to split doubles into two words */ union { double _double;#if defined(__sparc__) && !defined(__sparc64__) && defined(HAVE_LONGLONG) long long _longlong;#endif __avword words[2]; } tmp;#endif#if defined(__x86_64__) /* store the integer arguments in an extra array */ __avword* iaptr; __avword iargs[6];#endif#if defined(__mips__) && !defined(__mipsn32__) /* store the floating-point arguments in an extra array */ int anum; double floatarg[2];#endif#if defined(__mipsn32__) || defined(__mips64__) /* store the floating-point arguments in an extra array */ int anum; /* redundant: (LIST).aptr = &(LIST).args[(LIST).anum] */ unsigned int farg_mask; /* bitmask of those entries in farg[] which have a value */ unsigned int darg_mask; /* bitmask of those entries in args[] which have a double value */ float farg[8];#endif#if defined(__sparc64__) /* store the floating-point arguments in an extra array */ int anum; /* redundant: (LIST).aptr = &(LIST).args[(LIST).anum] */ unsigned int farg_mask; /* bitmask of those entries in farg[] which have a value */ unsigned int darg_mask; /* bitmask of those entries in args[] which have a double value */#endif#if defined(__ia64__) || defined(__x86_64__) /* store the floating-point arguments in an extra array */ double* faptr; double fargs[8];#endif __avword args[__AV_ALIST_WORDS]; /* sizeof(double)-aligned */#if defined(__rs6000__) /* store the floating-point arguments in an extra array */ double* faptr; double fargs[13];#endif#if defined(__s390__) /* store the floating-point arguments in an extra array */ int fargwords; float* faptr; float fargs[2]; int* fargsusedptr; int fargsused[2]; double* daptr; double dargs[2]; int* dargsusedptr; int dargsused[2];#endif#if defined(AMIGA) /* store the arguments passed in registers in an extra array */ __avword regargs[8+7];#endif} av_alist;/* The limit for the pointer into the args[] array. */#if defined(__sparc__) || defined(__sparc64__) || defined(__hppa__) || (defined(__rs6000__) && !defined(_AIX) && !(defined(__MACH__) && defined(__APPLE__))) || defined(__s390)#define __av_eptr(LIST) ((LIST).eptr)#else#define __av_eptr(LIST) (&(LIST).args[__AV_ALIST_WORDS])#endif/* Delayed overflow detection */#if defined(__hppa__)#define av_overflown(LIST) ((LIST).aptr < __av_eptr(LIST))#else#define av_overflown(LIST) ((LIST).aptr > __av_eptr(LIST))#endif/* * av_start_<type> macros which specify the return type */#define __AV_START_FLAGS \ __AV_STRUCT_RETURN | __AV_FLOAT_RETURN | __AV_STRUCT_ARGS | __AV_FLOAT_ARGS | __AV_INTEGERS | __AV_CLEANUP#define __av_start(LIST,FUNC,RADDR,RETTYPE) \ ((LIST).func = (__avword(*)())(FUNC), \ (LIST).raddr = (void*)(RADDR), \ (LIST).rtype = (RETTYPE), \ __av_start1(LIST) \ (LIST).flags = __AV_START_FLAGS)#if defined(__i386__) || defined(__m68k__) || defined(__alpha__) || defined(__arm__) || defined(__m88k__) || defined(__convex__)#define __av_start1(LIST) \ (LIST).aptr = &(LIST).args[0],#endif#if defined(__mips__) && !defined(__mipsn32__)#define __av_start1(LIST) \ (LIST).anum = 0, \ (LIST).aptr = &(LIST).args[0],#endif#if defined(__mipsn32__) || defined(__mips64__)#define __av_start1(LIST) \ (LIST).anum = 0, \ (LIST).farg_mask = 0, \ (LIST).darg_mask = 0, \ (LIST).aptr = &(LIST).args[0],#endif#if defined(__sparc__) && !defined(__sparc64__)#define __av_start1(LIST) \ (LIST).aptr = &(LIST).args[0], \ (LIST).eptr = &(LIST).args[__AV_ALIST_WORDS],#endif#if defined(__sparc64__)#define __av_start1(LIST) \ (LIST).anum = 0, \ (LIST).farg_mask = 0, \ (LIST).darg_mask = 0, \ (LIST).aptr = &(LIST).args[0], \ (LIST).eptr = &(LIST).args[__AV_ALIST_WORDS],#endif#if defined(__hppa__)#define __av_start1(LIST) \ (LIST).aptr = &(LIST).args[__AV_ALIST_WORDS], \ (LIST).eptr = &(LIST).args[0],#endif#if defined(__rs6000__)#if defined(_AIX) || (defined(__MACH__) && defined(__APPLE__))#define __av_start1(LIST) \ (LIST).aptr = &(LIST).args[0], \ (LIST).faptr = &(LIST).fargs[0],#else#define __av_start1(LIST) \ (LIST).aptr = &(LIST).args[0], \ (LIST).faptr = &(LIST).fargs[0], \ (LIST).eptr = &(LIST).args[__AV_ALIST_WORDS],#endif#endif#if defined(__s390__)#define __av_start1(LIST) \ (LIST).aptr = &(LIST).args[0], \ (LIST).fargwords = 0, \ (LIST).faptr = &(LIST).fargs[0], \ (LIST).daptr = &(LIST).dargs[0], \ (LIST).fargsusedptr = &(LIST).fargsused[0], \ (LIST).dargsusedptr = &(LIST).dargsused[0], \ (LIST).eptr = &(LIST).args[__AV_ALIST_WORDS],#endif#if defined(__ia64__)#define __av_start1(LIST) \ (LIST).aptr = &(LIST).args[0], \ (LIST).faptr = &(LIST).fargs[0],#endif#if defined(__x86_64__)#define __av_start1(LIST) \ (LIST).aptr = &(LIST).args[0], \ (LIST).iaptr = &(LIST).iargs[0], \ (LIST).faptr = &(LIST).fargs[0],#endif#define av_start_void(LIST,FUNC) __av_start(LIST,FUNC,0, __AVvoid)#define av_start_char(LIST,FUNC,RADDR) __av_start(LIST,FUNC,RADDR,__AVchar)#define av_start_schar(LIST,FUNC,RADDR) __av_start(LIST,FUNC,RADDR,__AVschar)#define av_start_uchar(LIST,FUNC,RADDR) __av_start(LIST,FUNC,RADDR,__AVuchar)#define av_start_short(LIST,FUNC,RADDR) __av_start(LIST,FUNC,RADDR,__AVshort)#define av_start_ushort(LIST,FUNC,RADDR) __av_start(LIST,FUNC,RADDR,__AVushort)#define av_start_int(LIST,FUNC,RADDR) __av_start(LIST,FUNC,RADDR,__AVint)#define av_start_uint(LIST,FUNC,RADDR) __av_start(LIST,FUNC,RADDR,__AVuint)#define av_start_long(LIST,FUNC,RADDR) __av_start(LIST,FUNC,RADDR,__AVlong)#define av_start_ulong(LIST,FUNC,RADDR) __av_start(LIST,FUNC,RADDR,__AVulong)#define av_start_longlong(LIST,FUNC,RADDR) __av_start(LIST,FUNC,RADDR,__AVlonglong)#define av_start_ulonglong(LIST,FUNC,RADDR) __av_start(LIST,FUNC,RADDR,__AVulonglong)#define av_start_float(LIST,FUNC,RADDR) __av_start(LIST,FUNC,RADDR,__AVfloat)#define av_start_double(LIST,FUNC,RADDR) __av_start(LIST,FUNC,RADDR,__AVdouble)#define av_start_ptr(LIST,FUNC,TYPE,RADDR) __av_start(LIST,FUNC,RADDR,__AVvoidp)#define av_start_struct(LIST,FUNC,TYPE,TYPE_SPLITTABLE,RADDR) \ _av_start_struct(LIST,FUNC,sizeof(TYPE),TYPE_SPLITTABLE,RADDR)#define _av_start_struct(LIST,FUNC,TYPE_SIZE,TYPE_SPLITTABLE,RADDR) \ (__av_start(LIST,FUNC,RADDR,__AVstruct), \ (LIST).rsize = TYPE_SIZE, \ __av_start_struct1(LIST,TYPE_SIZE,TYPE_SPLITTABLE), \ 0)#define __av_start_struct1(LIST,TYPE_SIZE,TYPE_SPLITTABLE) \ ((LIST).flags & __AV_PCC_STRUCT_RETURN \ ? /* pcc struct return convention: \ * called function returns pointer to value, we'll copy its contents afterwards. \ */ \ 0 \ : __av_start_struct2(LIST,TYPE_SIZE,TYPE_SPLITTABLE) \ )#if (defined(__sparc__) && !defined(__sparc64__)) || defined(__m88k__)/* Return structure pointer is passed in a special register. */#define __av_start_struct2(LIST,TYPE_SIZE,TYPE_SPLITTABLE) 0#else#define __av_start_struct2(LIST,TYPE_SIZE,TYPE_SPLITTABLE) \ (((LIST).flags & __AV_SMALL_STRUCT_RETURN) \ && __av_reg_struct_return(LIST,TYPE_SIZE,TYPE_SPLITTABLE) \ ? /* <= Word-sized structures are returned in a register. */ \ __av_start_struct3(LIST) \ : __av_start_struct4(LIST,TYPE_SIZE) \ )/* Determines whether a structure is returned in registers, * depending on its size and its word-splittable flag. */#if (defined(__i386__) && defined(_WIN32))#define __av_reg_struct_return(LIST,TYPE_SIZE,TYPE_SPLITTABLE) \ ((TYPE_SIZE) == 1 || (TYPE_SIZE) == 2 || (TYPE_SIZE) == 4 \ || ((TYPE_SIZE) == 8 \ && (((LIST).flags & __AV_MSVC_STRUCT_RETURN) \ || ((TYPE_SPLITTABLE) \ && ((LIST).flags & __AV_GCC_STRUCT_RETURN) \ ) ) ) )/* Turn on __AV_REGISTER_STRUCT_RETURN if __AV_SMALL_STRUCT_RETURN was set * and the struct will actually be returned in registers. */#define __av_start_struct3(LIST) \ ((LIST).flags |= __AV_REGISTER_STRUCT_RETURN, 0)#endif#if (defined(__i386__) && !defined(_WIN32)) || defined(__m68k__) || defined(__arm__) || defined(__rs6000__) || defined(__convex__) || defined(__s390__)#define __av_reg_struct_return(LIST,TYPE_SIZE,TYPE_SPLITTABLE) \ ((TYPE_SIZE) == 1 || (TYPE_SIZE) == 2 || (TYPE_SIZE) == 4 \ || ((TYPE_SIZE) == 8 && (TYPE_SPLITTABLE) \ && ((LIST).flags & __AV_GCC_STRUCT_RETURN) \ ) )/* Turn on __AV_REGISTER_STRUCT_RETURN if __AV_SMALL_STRUCT_RETURN was set * and the struct will actually be returned in registers. */#define __av_start_struct3(LIST) \ ((LIST).flags |= __AV_REGISTER_STRUCT_RETURN, 0)#endif#if defined(__alpha__)#define __av_reg_struct_return(LIST,TYPE_SIZE,TYPE_SPLITTABLE) \ ((TYPE_SIZE) == 1 || (TYPE_SIZE) == 2 || (TYPE_SIZE) == 4 || (TYPE_SIZE) == 8 \ || ((TYPE_SIZE) == 16 && (TYPE_SPLITTABLE) \ && ((LIST).flags & __AV_GCC_STRUCT_RETURN) \ ) )/* Turn on __AV_REGISTER_STRUCT_RETURN if __AV_SMALL_STRUCT_RETURN was set * and the struct will actually be returned in registers. */#define __av_start_struct3(LIST) \ ((LIST).flags |= __AV_REGISTER_STRUCT_RETURN, 0)#endif#if defined(__hppa__)#define __av_reg_struct_return(LIST,TYPE_SIZE,TYPE_SPLITTABLE) \ ((LIST).flags & __AV_OLDGCC_STRUCT_RETURN \ ? ((TYPE_SIZE) == 1 || (TYPE_SIZE) == 2 || (TYPE_SIZE) == 4) \ : ((TYPE_SIZE) <= 8) \ )/* Test both __AV_OLDGCC_STRUCT_RETURN and __AV_SMALL_STRUCT_RETURN at run time. */#define __av_start_struct3(LIST) \ 0#endif#if defined(__mips__) && !defined(__mipsn32__)#define __av_reg_struct_return(LIST,TYPE_SIZE,TYPE_SPLITTABLE) \ ((TYPE_SIZE) == 1 || (TYPE_SIZE) == 2 || (TYPE_SIZE) == 4)/* Test __AV_SMALL_STRUCT_RETURN instead of __AV_REGISTER_STRUCT_RETURN. */#define __av_start_struct3(LIST) \ 0#endif#if defined(__mipsn32__) || defined(__mips64__)#define __av_reg_struct_return(LIST,TYPE_SIZE,TYPE_SPLITTABLE) \ ((LIST).flags & __AV_GCC_STRUCT_RETURN \ ? ((TYPE_SIZE) == 1 || (TYPE_SIZE) == 2 || (TYPE_SIZE) == 4 || (TYPE_SIZE) == 8) \ : ((TYPE_SIZE) <= 16) \ )/* Turn on __AV_REGISTER_STRUCT_RETURN if __AV_SMALL_STRUCT_RETURN was set * and the struct will actually be returned in registers. */#define __av_start_struct3(LIST) \ ((LIST).flags |= __AV_REGISTER_STRUCT_RETURN, 0)#endif#if defined(__sparc64__) || defined(__ia64__)#define __av_reg_struct_return(LIST,TYPE_SIZE,TYPE_SPLITTABLE) \ ((TYPE_SIZE) <= 32)/* Turn on __AV_REGISTER_STRUCT_RETURN if __AV_SMALL_STRUCT_RETURN was set * and the struct will actually be returned in registers. */#define __av_start_struct3(LIST) \ ((LIST).flags |= __AV_REGISTER_STRUCT_RETURN, 0)#endif#if defined(__x86_64__)#define __av_reg_struct_return(LIST,TYPE_SIZE,TYPE_SPLITTABLE) \ ((TYPE_SIZE) <= 16)/* Turn on __AV_REGISTER_STRUCT_RETURN if __AV_SMALL_STRUCT_RETURN was set * and the struct will actually be returned in registers. */#define __av_start_struct3(LIST) \ ((LIST).flags |= __AV_REGISTER_STRUCT_RETURN, 0)#endif#if defined(__i386__)/* Return structure pointer is passed in a special register or as first arg. */#define __av_start_struct4(LIST,TYPE_SIZE) \ ((LIST).flags & __AV_NEXTGCC_STRUCT_RETURN \ ? 0 /* special register */ \ : (*(LIST).aptr++ = (__avword)((LIST).raddr), 0) /* first arg */ \ )#endif#if defined(__m68k__) || defined(__hppa__) || defined(__ia64__)/* Return structure pointer is passed in a special register. */#define __av_start_struct4(LIST,TYPE_SIZE) 0#endif/* Return structure pointer is passed as first arg. */#if defined(__alpha__) || defined(__arm__) || defined(__rs6000__) || defined(__convex__) || defined(__s390__)#define __av_start_struct4(LIST,TYPE_SIZE) \ (*(LIST).aptr++ = (__avword)((LIST).raddr), 0)#endif#if defined(__mips__) || defined(__mipsn32__) || defined(__mips64__) || defined(__sparc64__)#define __av_start_struct4(LIST,TYPE_SIZE) \ (*(LIST).aptr++ = (__avword)((LIST).raddr), \ (LIST).anum++, \ 0 \ )#endif#if defined(__x86_64__)#define __av_start_struct4(LIST,TYPE_SIZE) \ (*(LIST).iaptr++ = (__avword)((LIST).raddr), 0)#endif#endif/* * av_<type> macros which specify the argument and its type *//* * scalar argument types */#if defined(__i386__) || defined(__m68k__) || (defined(__sparc__) && !defined(__sparc64__)) || defined(__alpha__) || defined(__arm__) || defined(__rs6000__) || defined(__m88k__) || defined(__convex__) || defined(__ia64__) || defined(__x86_64__) || defined(__s390__)/* Floats and all integer types are passed as words, * doubles as two words. */#define __av_word(LIST,VAL) \ (++(LIST).aptr > __av_eptr(LIST) \ ? -1 : ((LIST).aptr[-1] = (__avword)(VAL), 0))#endif#if defined(__mips__) || defined(__mipsn32__) || defined(__mips64__) || defined(__sparc64__)/* Most things are passed as integers: */#define __av_word(LIST,VAL) \ (++(LIST).aptr > __av_eptr(LIST) \ ? -1 : ((LIST).anum++, (LIST).aptr[-1] = (__avword)(VAL), 0))#endif#if defined(__hppa__)/* Floats and all integer types are passed as words, * doubles as two words.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -