diff options
author | meissner <meissner@138bc75d-0d04-0410-961f-82ee72b054a4> | 1991-09-12 22:22:50 +0000 |
---|---|---|
committer | meissner <meissner@138bc75d-0d04-0410-961f-82ee72b054a4> | 1991-09-12 22:22:50 +0000 |
commit | 953408382a00531abfa17526880719ec4ddb8eac (patch) | |
tree | d46d779ea9ebe9fce1e8bc64332160a89c699847 /gcc/ginclude/va-mips.h | |
parent | f57f3ebdfa5ad6aa31915bd6b55503ca0048011a (diff) | |
download | ppe42-gcc-953408382a00531abfa17526880719ec4ddb8eac.tar.gz ppe42-gcc-953408382a00531abfa17526880719ec4ddb8eac.zip |
Initial revision
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@39 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ginclude/va-mips.h')
-rw-r--r-- | gcc/ginclude/va-mips.h | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/gcc/ginclude/va-mips.h b/gcc/ginclude/va-mips.h new file mode 100644 index 00000000000..24fa9baa1cb --- /dev/null +++ b/gcc/ginclude/va-mips.h @@ -0,0 +1,42 @@ +/* ---------------------------------------- */ +/* VARARGS for MIPS/GNU CC */ +/* */ +/* */ +/* */ +/* */ +/* ---------------------------------------- */ + + +/* These macros implement traditional (non-ANSI) varargs + for GNU C. */ + +/* In GCC version 2, we want an ellipsis at the end of the declaration + of the argument list. GCC version 1 can't parse it. */ + +#if __GNUC__ > 1 +#define __va_ellipsis ... +#else +#define __va_ellipsis +#endif + +#define va_alist __builtin_va_alist +#define va_dcl int __builtin_va_alist; __va_ellipsis +#ifndef _VA_LIST_ +#define _VA_LIST_ +/* Make this a macro rather than a typedef, so we can undef any other defn. */ +#define va_list __va___list +typedef char * __va___list; +#endif + +#define va_start(AP) AP = (char *) &__builtin_va_alist +#define va_end(AP) + +#ifdef lint /* complains about constant in conditional context */ +#define va_arg(list, mode) ((mode *)(list += sizeof(mode)))[-1] + +#else /* !lint */ +#define va_arg(AP, mode) ((mode *)(AP = \ + (char *) (sizeof(mode) > 4 ? ((int)AP + 2*8 - 1) & -8 \ + : ((int)AP + 2*4 - 1) & -4)))[-1] +#endif /* lint */ + |