diff options
Diffstat (limited to 'contrib/gcc/ginclude')
28 files changed, 0 insertions, 4115 deletions
diff --git a/contrib/gcc/ginclude/iso646.h b/contrib/gcc/ginclude/iso646.h deleted file mode 100644 index 77ebdd30c4dd..000000000000 --- a/contrib/gcc/ginclude/iso646.h +++ /dev/null @@ -1,15 +0,0 @@ -/* Macros for C programs written in national variants of ISO 646. */ - -#ifndef __cplusplus -#define and && -#define and_eq &= -#define bitand & -#define bitor | -#define compl ~ -#define not ! -#define not_eq != -#define or || -#define or_eq |= -#define xor ^ -#define xor_eq ^= -#endif diff --git a/contrib/gcc/ginclude/math-3300.h b/contrib/gcc/ginclude/math-3300.h deleted file mode 100644 index 5d7ba28f67f6..000000000000 --- a/contrib/gcc/ginclude/math-3300.h +++ /dev/null @@ -1,461 +0,0 @@ -/******************************************************************\ -* * -* <math-68881.h> last modified: 18 May 1989. * -* * -* Copyright (C) 1989 by Matthew Self. * -* You may freely distribute verbatim copies of this software * -* provided that this copyright notice is retained in all copies. * -* You may distribute modifications to this software under the * -* conditions above if you also clearly note such modifications * -* with their author and date. * -* * -* Note: errno is not set to EDOM when domain errors occur for * -* most of these functions. Rather, it is assumed that the * -* 68881's OPERR exception will be enabled and handled * -* appropriately by the operating system. Similarly, overflow * -* and underflow do not set errno to ERANGE. * -* * -* Send bugs to Matthew Self (self@bayes.arc.nasa.gov). * -* * -\******************************************************************/ - -#include <errno.h> - -#undef HUGE_VAL -#define HUGE_VAL \ -({ \ - double huge_val; \ - \ - __asm ("fmove%.d %#0x7ff0000000000000,%0" /* Infinity */ \ - : "=f" (huge_val) \ - : /* no inputs */); \ - huge_val; \ -}) - -__inline static const double sin (double x) -{ - double value; - - __asm ("fsin%.x %1,%0" - : "=f" (value) - : "f" (x)); - return value; -} - -__inline static const double cos (double x) -{ - double value; - - __asm ("fcos%.x %1,%0" - : "=f" (value) - : "f" (x)); - return value; -} - -__inline static const double tan (double x) -{ - double value; - - __asm ("ftan%.x %1,%0" - : "=f" (value) - : "f" (x)); - return value; -} - -__inline static const double asin (double x) -{ - double value; - - __asm ("fasin%.x %1,%0" - : "=f" (value) - : "f" (x)); - return value; -} - -__inline static const double acos (double x) -{ - double value; - - __asm ("facos%.x %1,%0" - : "=f" (value) - : "f" (x)); - return value; -} - -__inline static const double atan (double x) -{ - double value; - - __asm ("fatan%.x %1,%0" - : "=f" (value) - : "f" (x)); - return value; -} - -__inline static const double atan2 (double y, double x) -{ - double pi, pi_over_2; - - __asm ("fmovecr%.x %#0,%0" /* extended precision pi */ - : "=f" (pi) - : /* no inputs */ ); - __asm ("fscale%.b %#-1,%0" /* no loss of accuracy */ - : "=f" (pi_over_2) - : "0" (pi)); - if (x > 0) - { - if (y > 0) - { - if (x > y) - return atan (y / x); - else - return pi_over_2 - atan (x / y); - } - else - { - if (x > -y) - return atan (y / x); - else - return - pi_over_2 - atan (x / y); - } - } - else - { - if (y > 0) - { - if (-x > y) - return pi + atan (y / x); - else - return pi_over_2 - atan (x / y); - } - else - { - if (-x > -y) - return - pi + atan (y / x); - else if (y < 0) - return - pi_over_2 - atan (x / y); - else - { - double value; - - errno = EDOM; - __asm ("fmove%.d %#0x7fffffffffffffff,%0" /* quiet NaN */ - : "=f" (value) - : /* no inputs */); - return value; - } - } - } -} - -__inline static const double sinh (double x) -{ - double value; - - __asm ("fsinh%.x %1,%0" - : "=f" (value) - : "f" (x)); - return value; -} - -__inline static const double cosh (double x) -{ - double value; - - __asm ("fcosh%.x %1,%0" - : "=f" (value) - : "f" (x)); - return value; -} - -__inline static const double tanh (double x) -{ - double value; - - __asm ("ftanh%.x %1,%0" - : "=f" (value) - : "f" (x)); - return value; -} - -__inline static const double atanh (double x) -{ - double value; - - __asm ("fatanh%.x %1,%0" - : "=f" (value) - : "f" (x)); - return value; -} - -__inline static const double exp (double x) -{ - double value; - - __asm ("fetox%.x %1,%0" - : "=f" (value) - : "f" (x)); - return value; -} - -__inline static const double expm1 (double x) -{ - double value; - - __asm ("fetoxm1%.x %1,%0" - : "=f" (value) - : "f" (x)); - return value; -} - -__inline static const double log (double x) -{ - double value; - - __asm ("flogn%.x %1,%0" - : "=f" (value) - : "f" (x)); - return value; -} - -__inline static const double log1p (double x) -{ - double value; - - __asm ("flognp1%.x %1,%0" - : "=f" (value) - : "f" (x)); - return value; -} - -__inline static const double log10 (double x) -{ - double value; - - __asm ("flog10%.x %1,%0" - : "=f" (value) - : "f" (x)); - return value; -} - -__inline static const double sqrt (double x) -{ - double value; - - __asm ("fsqrt%.x %1,%0" - : "=f" (value) - : "f" (x)); - return value; -} - -__inline static const double pow (const double x, const double y) -{ - if (x > 0) - return exp (y * log (x)); - else if (x == 0) - { - if (y > 0) - return 0.0; - else - { - double value; - - errno = EDOM; - __asm ("fmove%.d %#0x7fffffffffffffff,%0" /* quiet NaN */ - : "=f" (value) - : /* no inputs */); - return value; - } - } - else - { - double temp; - - __asm ("fintrz%.x %1,%0" - : "=f" (temp) /* integer-valued float */ - : "f" (y)); - if (y == temp) - { - int i = (int) y; - - if ((i & 1) == 0) /* even */ - return exp (y * log (x)); - else - return - exp (y * log (x)); - } - else - { - double value; - - errno = EDOM; - __asm ("fmove%.d %#0x7fffffffffffffff,%0" /* quiet NaN */ - : "=f" (value) - : /* no inputs */); - return value; - } - } -} - -__inline static const double fabs (double x) -{ - double value; - - __asm ("fabs%.x %1,%0" - : "=f" (value) - : "f" (x)); - return value; -} - -__inline static const double ceil (double x) -{ - int rounding_mode, round_up; - double value; - - __asm volatile ("fmove%.l %%fpcr,%0" - : "=dm" (rounding_mode) - : /* no inputs */ ); - round_up = rounding_mode | 0x30; - __asm volatile ("fmove%.l %0,%%fpcr" - : /* no outputs */ - : "dmi" (round_up)); - __asm volatile ("fint%.x %1,%0" - : "=f" (value) - : "f" (x)); - __asm volatile ("fmove%.l %0,%%fpcr" - : /* no outputs */ - : "dmi" (rounding_mode)); - return value; -} - -__inline static const double floor (double x) -{ - int rounding_mode, round_down; - double value; - - __asm volatile ("fmove%.l %%fpcr,%0" - : "=dm" (rounding_mode) - : /* no inputs */ ); - round_down = (rounding_mode & ~0x10) - | 0x20; - __asm volatile ("fmove%.l %0,%%fpcr" - : /* no outputs */ - : "dmi" (round_down)); - __asm volatile ("fint%.x %1,%0" - : "=f" (value) - : "f" (x)); - __asm volatile ("fmove%.l %0,%%fpcr" - : /* no outputs */ - : "dmi" (rounding_mode)); - return value; -} - -__inline static const double rint (double x) -{ - int rounding_mode, round_nearest; - double value; - - __asm volatile ("fmove%.l %%fpcr,%0" - : "=dm" (rounding_mode) - : /* no inputs */ ); - round_nearest = rounding_mode & ~0x30; - __asm volatile ("fmove%.l %0,%%fpcr" - : /* no outputs */ - : "dmi" (round_nearest)); - __asm volatile ("fint%.x %1,%0" - : "=f" (value) - : "f" (x)); - __asm volatile ("fmove%.l %0,%%fpcr" - : /* no outputs */ - : "dmi" (rounding_mode)); - return value; -} - -__inline static const double fmod (double x, double y) -{ - double value; - - __asm ("fmod%.x %2,%0" - : "=f" (value) - : "0" (x), - "f" (y)); - return value; -} - -__inline static const double drem (double x, double y) -{ - double value; - - __asm ("frem%.x %2,%0" - : "=f" (value) - : "0" (x), - "f" (y)); - return value; -} - -__inline static const double scalb (double x, int n) -{ - double value; - - __asm ("fscale%.l %2,%0" - : "=f" (value) - : "0" (x), - "dmi" (n)); - return value; -} - -__inline static double logb (double x) -{ - double exponent; - - __asm ("fgetexp%.x %1,%0" - : "=f" (exponent) - : "f" (x)); - return exponent; -} - -__inline static const double ldexp (double x, int n) -{ - double value; - - __asm ("fscale%.l %2,%0" - : "=f" (value) - : "0" (x), - "dmi" (n)); - return value; -} - -__inline static double frexp (double x, int *exp) -{ - double float_exponent; - int int_exponent; - double mantissa; - - __asm ("fgetexp%.x %1,%0" - : "=f" (float_exponent) /* integer-valued float */ - : "f" (x)); - int_exponent = (int) float_exponent; - __asm ("fgetman%.x %1,%0" - : "=f" (mantissa) /* 1.0 <= mantissa < 2.0 */ - : "f" (x)); - if (mantissa != 0) - { - __asm ("fscale%.b %#-1,%0" - : "=f" (mantissa) /* mantissa /= 2.0 */ - : "0" (mantissa)); - int_exponent += 1; - } - *exp = int_exponent; - return mantissa; -} - -__inline static double modf (double x, double *ip) -{ - double temp; - - __asm ("fintrz%.x %1,%0" - : "=f" (temp) /* integer-valued float */ - : "f" (x)); - *ip = temp; - return x - temp; -} - diff --git a/contrib/gcc/ginclude/math-68881.h b/contrib/gcc/ginclude/math-68881.h deleted file mode 100644 index 7b91bc56a5db..000000000000 --- a/contrib/gcc/ginclude/math-68881.h +++ /dev/null @@ -1,529 +0,0 @@ -/******************************************************************\ -* * -* <math-68881.h> last modified: 23 May 1992. * -* * -* Copyright (C) 1989 by Matthew Self. * -* You may freely distribute verbatim copies of this software * -* provided that this copyright notice is retained in all copies. * -* You may distribute modifications to this software under the * -* conditions above if you also clearly note such modifications * -* with their author and date. * -* * -* Note: errno is not set to EDOM when domain errors occur for * -* most of these functions. Rather, it is assumed that the * -* 68881's OPERR exception will be enabled and handled * -* appropriately by the operating system. Similarly, overflow * -* and underflow do not set errno to ERANGE. * -* * -* Send bugs to Matthew Self (self@bayes.arc.nasa.gov). * -* * -\******************************************************************/ - -/* This file is NOT a part of GCC, just distributed with it. */ - -/* If you find this in GCC, - please send bug reports to bug-gcc@prep.ai.mit.edu. */ - -/* Changed by Richard Stallman: - May 1993, add conditional to prevent multiple inclusion. - % inserted before a #. - New function `hypot' added. - Nans written in hex to avoid 0rnan. - May 1992, use %! for fpcr register. Break lines before function names. - December 1989, add parens around `&' in pow. - November 1990, added alternate definition of HUGE_VAL for Sun. */ - -/* Changed by Jim Wilson: - September 1993, Use #undef before HUGE_VAL instead of #ifdef/#endif. */ - -/* Changed by Ian Lance Taylor: - September 1994, use extern inline instead of static inline. */ - -#ifndef __math_68881 -#define __math_68881 - -#include <errno.h> - -#undef HUGE_VAL -#ifdef __sun__ -/* The Sun assembler fails to handle the hex constant in the usual defn. */ -#define HUGE_VAL \ -({ \ - static union { int i[2]; double d; } u = { {0x7ff00000, 0} }; \ - u.d; \ -}) -#else -#define HUGE_VAL \ -({ \ - double huge_val; \ - \ - __asm ("fmove%.d %#0x7ff0000000000000,%0" /* Infinity */ \ - : "=f" (huge_val) \ - : /* no inputs */); \ - huge_val; \ -}) -#endif - -__inline extern double -sin (double x) -{ - double value; - - __asm ("fsin%.x %1,%0" - : "=f" (value) - : "f" (x)); - return value; -} - -__inline extern double -cos (double x) -{ - double value; - - __asm ("fcos%.x %1,%0" - : "=f" (value) - : "f" (x)); - return value; -} - -__inline extern double -tan (double x) -{ - double value; - - __asm ("ftan%.x %1,%0" - : "=f" (value) - : "f" (x)); - return value; -} - -__inline extern double -asin (double x) -{ - double value; - - __asm ("fasin%.x %1,%0" - : "=f" (value) - : "f" (x)); - return value; -} - -__inline extern double -acos (double x) -{ - double value; - - __asm ("facos%.x %1,%0" - : "=f" (value) - : "f" (x)); - return value; -} - -__inline extern double -atan (double x) -{ - double value; - - __asm ("fatan%.x %1,%0" - : "=f" (value) - : "f" (x)); - return value; -} - -__inline extern double -atan2 (double y, double x) -{ - double pi, pi_over_2; - - __asm ("fmovecr%.x %#0,%0" /* extended precision pi */ - : "=f" (pi) - : /* no inputs */ ); - __asm ("fscale%.b %#-1,%0" /* no loss of accuracy */ - : "=f" (pi_over_2) - : "0" (pi)); - if (x > 0) - { - if (y > 0) - { - if (x > y) - return atan (y / x); - else - return pi_over_2 - atan (x / y); - } - else - { - if (x > -y) - return atan (y / x); - else - return - pi_over_2 - atan (x / y); - } - } - else - { - if (y < 0) - { - if (-x > -y) - return - pi + atan (y / x); - else - return - pi_over_2 - atan (x / y); - } - else - { - if (-x > y) - return pi + atan (y / x); - else if (y > 0) - return pi_over_2 - atan (x / y); - else - { - double value; - - errno = EDOM; - __asm ("fmove%.d %#0x7fffffffffffffff,%0" /* quiet NaN */ - : "=f" (value) - : /* no inputs */); - return value; - } - } - } -} - -__inline extern double -sinh (double x) -{ - double value; - - __asm ("fsinh%.x %1,%0" - : "=f" (value) - : "f" (x)); - return value; -} - -__inline extern double -cosh (double x) -{ - double value; - - __asm ("fcosh%.x %1,%0" - : "=f" (value) - : "f" (x)); - return value; -} - -__inline extern double -tanh (double x) -{ - double value; - - __asm ("ftanh%.x %1,%0" - : "=f" (value) - : "f" (x)); - return value; -} - -__inline extern double -atanh (double x) -{ - double value; - - __asm ("fatanh%.x %1,%0" - : "=f" (value) - : "f" (x)); - return value; -} - -__inline extern double -exp (double x) -{ - double value; - - __asm ("fetox%.x %1,%0" - : "=f" (value) - : "f" (x)); - return value; -} - -__inline extern double -expm1 (double x) -{ - double value; - - __asm ("fetoxm1%.x %1,%0" - : "=f" (value) - : "f" (x)); - return value; -} - -__inline extern double -log (double x) -{ - double value; - - __asm ("flogn%.x %1,%0" - : "=f" (value) - : "f" (x)); - return value; -} - -__inline extern double -log1p (double x) -{ - double value; - - __asm ("flognp1%.x %1,%0" - : "=f" (value) - : "f" (x)); - return value; -} - -__inline extern double -log10 (double x) -{ - double value; - - __asm ("flog10%.x %1,%0" - : "=f" (value) - : "f" (x)); - return value; -} - -__inline extern double -sqrt (double x) -{ - double value; - - __asm ("fsqrt%.x %1,%0" - : "=f" (value) - : "f" (x)); - return value; -} - -__inline extern double -hypot (double x, double y) -{ - return sqrt (x*x + y*y); -} - -__inline extern double -pow (double x, double y) -{ - if (x > 0) - return exp (y * log (x)); - else if (x == 0) - { - if (y > 0) - return 0.0; - else - { - double value; - - errno = EDOM; - __asm ("fmove%.d %#0x7fffffffffffffff,%0" /* quiet NaN */ - : "=f" (value) - : /* no inputs */); - return value; - } - } - else - { - double temp; - - __asm ("fintrz%.x %1,%0" - : "=f" (temp) /* integer-valued float */ - : "f" (y)); - if (y == temp) - { - int i = (int) y; - - if ((i & 1) == 0) /* even */ - return exp (y * log (-x)); - else - return - exp (y * log (-x)); - } - else - { - double value; - - errno = EDOM; - __asm ("fmove%.d %#0x7fffffffffffffff,%0" /* quiet NaN */ - : "=f" (value) - : /* no inputs */); - return value; - } - } -} - -__inline extern double -fabs (double x) -{ - double value; - - __asm ("fabs%.x %1,%0" - : "=f" (value) - : "f" (x)); - return value; -} - -__inline extern double -ceil (double x) -{ - int rounding_mode, round_up; - double value; - - __asm volatile ("fmove%.l %!,%0" - : "=dm" (rounding_mode) - : /* no inputs */ ); - round_up = rounding_mode | 0x30; - __asm volatile ("fmove%.l %0,%!" - : /* no outputs */ - : "dmi" (round_up)); - __asm volatile ("fint%.x %1,%0" - : "=f" (value) - : "f" (x)); - __asm volatile ("fmove%.l %0,%!" - : /* no outputs */ - : "dmi" (rounding_mode)); - return value; -} - -__inline extern double -floor (double x) -{ - int rounding_mode, round_down; - double value; - - __asm volatile ("fmove%.l %!,%0" - : "=dm" (rounding_mode) - : /* no inputs */ ); - round_down = (rounding_mode & ~0x10) - | 0x20; - __asm volatile ("fmove%.l %0,%!" - : /* no outputs */ - : "dmi" (round_down)); - __asm volatile ("fint%.x %1,%0" - : "=f" (value) - : "f" (x)); - __asm volatile ("fmove%.l %0,%!" - : /* no outputs */ - : "dmi" (rounding_mode)); - return value; -} - -__inline extern double -rint (double x) -{ - int rounding_mode, round_nearest; - double value; - - __asm volatile ("fmove%.l %!,%0" - : "=dm" (rounding_mode) - : /* no inputs */ ); - round_nearest = rounding_mode & ~0x30; - __asm volatile ("fmove%.l %0,%!" - : /* no outputs */ - : "dmi" (round_nearest)); - __asm volatile ("fint%.x %1,%0" - : "=f" (value) - : "f" (x)); - __asm volatile ("fmove%.l %0,%!" - : /* no outputs */ - : "dmi" (rounding_mode)); - return value; -} - -__inline extern double -fmod (double x, double y) -{ - double value; - - __asm ("fmod%.x %2,%0" - : "=f" (value) - : "0" (x), - "f" (y)); - return value; -} - -__inline extern double -drem (double x, double y) -{ - double value; - - __asm ("frem%.x %2,%0" - : "=f" (value) - : "0" (x), - "f" (y)); - return value; -} - -__inline extern double -scalb (double x, int n) -{ - double value; - - __asm ("fscale%.l %2,%0" - : "=f" (value) - : "0" (x), - "dmi" (n)); - return value; -} - -__inline extern double -logb (double x) -{ - double exponent; - - __asm ("fgetexp%.x %1,%0" - : "=f" (exponent) - : "f" (x)); - return exponent; -} - -__inline extern double -ldexp (double x, int n) -{ - double value; - - __asm ("fscale%.l %2,%0" - : "=f" (value) - : "0" (x), - "dmi" (n)); - return value; -} - -__inline extern double -frexp (double x, int *exp) -{ - double float_exponent; - int int_exponent; - double mantissa; - - __asm ("fgetexp%.x %1,%0" - : "=f" (float_exponent) /* integer-valued float */ - : "f" (x)); - int_exponent = (int) float_exponent; - __asm ("fgetman%.x %1,%0" - : "=f" (mantissa) /* 1.0 <= mantissa < 2.0 */ - : "f" (x)); - if (mantissa != 0) - { - __asm ("fscale%.b %#-1,%0" - : "=f" (mantissa) /* mantissa /= 2.0 */ - : "0" (mantissa)); - int_exponent += 1; - } - *exp = int_exponent; - return mantissa; -} - -__inline extern double -modf (double x, double *ip) -{ - double temp; - - __asm ("fintrz%.x %1,%0" - : "=f" (temp) /* integer-valued float */ - : "f" (x)); - *ip = temp; - return x - temp; -} - -#endif /* not __math_68881 */ diff --git a/contrib/gcc/ginclude/ppc-asm.h b/contrib/gcc/ginclude/ppc-asm.h deleted file mode 100644 index 4512d94352a3..000000000000 --- a/contrib/gcc/ginclude/ppc-asm.h +++ /dev/null @@ -1,170 +0,0 @@ -/* PowerPC asm definitions for GNU C. */ -/* Under winnt, 1) gas supports the following as names and 2) in particular - defining "toc" breaks the FUNC_START macro as ".toc" becomes ".2" */ - -#if !defined(__WINNT__) -#define r0 0 -#define sp 1 -#define toc 2 -#define r3 3 -#define r4 4 -#define r5 5 -#define r6 6 -#define r7 7 -#define r8 8 -#define r9 9 -#define r10 10 -#define r11 11 -#define r12 12 -#define r13 13 -#define r14 14 -#define r15 15 -#define r16 16 -#define r17 17 -#define r18 18 -#define r19 19 -#define r20 20 -#define r21 21 -#define r22 22 -#define r23 23 -#define r24 24 -#define r25 25 -#define r26 26 -#define r27 27 -#define r28 28 -#define r29 29 -#define r30 30 -#define r31 31 - -#define cr0 0 -#define cr1 1 -#define cr2 2 -#define cr3 3 -#define cr4 4 -#define cr5 5 -#define cr6 6 -#define cr7 7 - -#define f0 0 -#define f1 1 -#define f2 2 -#define f3 3 -#define f4 4 -#define f5 5 -#define f6 6 -#define f7 7 -#define f8 8 -#define f9 9 -#define f10 10 -#define f11 11 -#define f12 12 -#define f13 13 -#define f14 14 -#define f15 15 -#define f16 16 -#define f17 17 -#define f18 18 -#define f19 19 -#define f20 20 -#define f21 21 -#define f22 22 -#define f23 23 -#define f24 24 -#define f25 25 -#define f26 26 -#define f27 27 -#define f28 28 -#define f29 29 -#define f30 30 -#define f31 31 -#endif - -/* - * Macros to glue together two tokens. - */ - -#ifdef __STDC__ -#define XGLUE(a,b) a##b -#else -#define XGLUE(a,b) a/**/b -#endif - -#define GLUE(a,b) XGLUE(a,b) - -/* - * Macros to begin and end a function written in assembler. If -mcall-aixdesc - * or -mcall-nt, create a function descriptor with the given name, and create - * the real function with one or two leading periods respectively. - */ - -#ifdef _RELOCATABLE -#define DESC_SECTION ".got2" -#else -#define DESC_SECTION ".got1" -#endif - -#if defined(_CALL_AIXDESC) -#define FUNC_NAME(name) GLUE(.,name) -#define FUNC_START(name) \ - .section DESC_SECTION,"aw"; \ -name: \ - .long GLUE(.,name); \ - .long _GLOBAL_OFFSET_TABLE_; \ - .long 0; \ - .previous; \ - .type GLUE(.,name),@function; \ - .globl name; \ - .globl GLUE(.,name); \ -GLUE(.,name): - -#define FUNC_END(name) \ -GLUE(.L,name): \ - .size GLUE(.,name),GLUE(.L,name)-GLUE(.,name) - -#elif defined(__WINNT__) -#define FUNC_NAME(name) GLUE(..,name) -#define FUNC_START(name) \ - .pdata; \ - .align 2; \ - .ualong GLUE(..,name),GLUE(name,.e),0,0,GLUE(..,name); \ - .reldata; \ -name: \ - .ualong GLUE(..,name),.toc; \ - .section .text; \ - .globl name; \ - .globl GLUE(..,name); \ -GLUE(..,name): - -#define FUNC_END(name) \ -GLUE(name,.e): ; \ -GLUE(FE_MOT_RESVD..,name): - -#elif defined(_CALL_NT) -#define FUNC_NAME(name) GLUE(..,name) -#define FUNC_START(name) \ - .section DESC_SECTION,"aw"; \ -name: \ - .long GLUE(..,name); \ - .long _GLOBAL_OFFSET_TABLE_; \ - .previous; \ - .type GLUE(..,name),@function; \ - .globl name; \ - .globl GLUE(..,name); \ -GLUE(..,name): - -#define FUNC_END(name) \ -GLUE(.L,name): \ - .size GLUE(..,name),GLUE(.L,name)-GLUE(..,name) - -#else -#define FUNC_NAME(name) name -#define FUNC_START(name) \ - .type name,@function; \ - .globl name; \ -name: - -#define FUNC_END(name) \ -GLUE(.L,name): \ - .size name,GLUE(.L,name)-name -#endif - diff --git a/contrib/gcc/ginclude/proto.h b/contrib/gcc/ginclude/proto.h deleted file mode 100644 index cc48915d8421..000000000000 --- a/contrib/gcc/ginclude/proto.h +++ /dev/null @@ -1,4 +0,0 @@ -/* This header file is to avoid trouble with semi-ANSI header files - on the Convex in system version 8.0. */ - -#define _PROTO(list) () diff --git a/contrib/gcc/ginclude/stdarg.h b/contrib/gcc/ginclude/stdarg.h deleted file mode 100644 index 3607db1de133..000000000000 --- a/contrib/gcc/ginclude/stdarg.h +++ /dev/null @@ -1,212 +0,0 @@ -/* stdarg.h for GNU. - Note that the type used in va_arg is supposed to match the - actual type **after default promotions**. - Thus, va_arg (..., short) is not valid. */ - -#ifndef _STDARG_H -#ifndef _ANSI_STDARG_H_ -#ifndef __need___va_list -#define _STDARG_H -#define _ANSI_STDARG_H_ -#endif /* not __need___va_list */ -#undef __need___va_list - -#ifdef __clipper__ -#include "va-clipper.h" -#else -#ifdef __m88k__ -#include "va-m88k.h" -#else -#ifdef __i860__ -#include "va-i860.h" -#else -#ifdef __hppa__ -#include "va-pa.h" -#else -#ifdef __mips__ -#include "va-mips.h" -#else -#ifdef __sparc__ -#include "va-sparc.h" -#else -#ifdef __i960__ -#include "va-i960.h" -#else -#ifdef __alpha__ -#include "va-alpha.h" -#else -#if defined (__H8300__) || defined (__H8300H__) || defined (__H8300S__) -#include "va-h8300.h" -#else -#if defined (__PPC__) && (defined (_CALL_SYSV) || defined (_WIN32)) -#include "va-ppc.h" -#else -#ifdef __arc__ -#include "va-arc.h" -#else -#ifdef __M32R__ -#include "va-m32r.h" -#else -#ifdef __sh__ -#include "va-sh.h" -#else -#ifdef __mn10300__ -#include "va-mn10300.h" -#else -#ifdef __mn10200__ -#include "va-mn10200.h" -#else -#ifdef __v850__ -#include "va-v850.h" -#else -#if defined (_TMS320C4x) || defined (_TMS320C3x) -#include <va-c4x.h> -#else - -/* Define __gnuc_va_list. */ - -#ifndef __GNUC_VA_LIST -#define __GNUC_VA_LIST -#if defined(__svr4__) || defined(_AIX) || defined(_M_UNIX) || defined(__NetBSD__) -typedef char *__gnuc_va_list; -#else -typedef void *__gnuc_va_list; -#endif -#endif - -/* Define the standard macros for the user, - if this invocation was from the user program. */ -#ifdef _STDARG_H - -/* Amount of space required in an argument list for an arg of type TYPE. - TYPE may alternatively be an expression whose type is used. */ - -#if defined(sysV68) -#define __va_rounded_size(TYPE) \ - (((sizeof (TYPE) + sizeof (short) - 1) / sizeof (short)) * sizeof (short)) -#elif defined(_AIX) -#define __va_rounded_size(TYPE) \ - (((sizeof (TYPE) + sizeof (long) - 1) / sizeof (long)) * sizeof (long)) -#else -#define __va_rounded_size(TYPE) \ - (((sizeof (TYPE) + sizeof (int) - 1) / sizeof (int)) * sizeof (int)) -#endif - -#define va_start(AP, LASTARG) \ - (AP = ((__gnuc_va_list) __builtin_next_arg (LASTARG))) - -#undef va_end -void va_end (__gnuc_va_list); /* Defined in libgcc.a */ -#define va_end(AP) ((void)0) - -/* We cast to void * and then to TYPE * because this avoids - a warning about increasing the alignment requirement. */ - -#if (defined (__arm__) && ! defined (__ARMEB__)) || defined (__i386__) || defined (__i860__) || defined (__ns32000__) || defined (__vax__) -/* This is for little-endian machines; small args are padded upward. */ -#define va_arg(AP, TYPE) \ - (AP = (__gnuc_va_list) ((char *) (AP) + __va_rounded_size (TYPE)), \ - *((TYPE *) (void *) ((char *) (AP) - __va_rounded_size (TYPE)))) -#else /* big-endian */ -/* This is for big-endian machines; small args are padded downward. */ -#define va_arg(AP, TYPE) \ - (AP = (__gnuc_va_list) ((char *) (AP) + __va_rounded_size (TYPE)), \ - *((TYPE *) (void *) ((char *) (AP) \ - - ((sizeof (TYPE) < __va_rounded_size (char) \ - ? sizeof (TYPE) : __va_rounded_size (TYPE)))))) -#endif /* big-endian */ - -/* Copy __gnuc_va_list into another variable of this type. */ -#define __va_copy(dest, src) (dest) = (src) - -#endif /* _STDARG_H */ - -#endif /* not TMS320C3x or TMS320C4x */ -#endif /* not v850 */ -#endif /* not mn10200 */ -#endif /* not mn10300 */ -#endif /* not sh */ -#endif /* not m32r */ -#endif /* not arc */ -#endif /* not powerpc with V.4 calling sequence */ -#endif /* not h8300 */ -#endif /* not alpha */ -#endif /* not i960 */ -#endif /* not sparc */ -#endif /* not mips */ -#endif /* not hppa */ -#endif /* not i860 */ -#endif /* not m88k */ -#endif /* not clipper */ - -#ifdef _STDARG_H -/* Define va_list, if desired, from __gnuc_va_list. */ -/* We deliberately do not define va_list when called from - stdio.h, because ANSI C says that stdio.h is not supposed to define - va_list. stdio.h needs to have access to that data type, - but must not use that name. It should use the name __gnuc_va_list, - which is safe because it is reserved for the implementation. */ - -#ifdef _HIDDEN_VA_LIST /* On OSF1, this means varargs.h is "half-loaded". */ -#undef _VA_LIST -#endif - -#ifdef _BSD_VA_LIST -#undef _BSD_VA_LIST -#endif - -#if defined(__svr4__) || (defined(_SCO_DS) && !defined(__VA_LIST)) -/* SVR4.2 uses _VA_LIST for an internal alias for va_list, - so we must avoid testing it and setting it here. - SVR4 uses _VA_LIST as a flag in stdarg.h, but we should - have no conflict with that. */ -#ifndef _VA_LIST_ -#define _VA_LIST_ -#ifdef __i860__ -#ifndef _VA_LIST -#define _VA_LIST va_list -#endif -#endif /* __i860__ */ -typedef __gnuc_va_list va_list; -#ifdef _SCO_DS -#define __VA_LIST -#endif -#endif /* _VA_LIST_ */ -#else /* not __svr4__ || _SCO_DS */ - -/* The macro _VA_LIST_ is the same thing used by this file in Ultrix. - But on BSD NET2 we must not test or define or undef it. - (Note that the comments in NET 2's ansi.h - are incorrect for _VA_LIST_--see stdio.h!) */ -#if !defined (_VA_LIST_) || defined (__BSD_NET2__) || defined (____386BSD____) || defined (__bsdi__) || defined (__sequent__) || defined (__FreeBSD__) || defined(WINNT) -/* The macro _VA_LIST_DEFINED is used in Windows NT 3.5 */ -#ifndef _VA_LIST_DEFINED -/* The macro _VA_LIST is used in SCO Unix 3.2. */ -#ifndef _VA_LIST -/* The macro _VA_LIST_T_H is used in the Bull dpx2 */ -#ifndef _VA_LIST_T_H -typedef __gnuc_va_list va_list; -#endif /* not _VA_LIST_T_H */ -#endif /* not _VA_LIST */ -#endif /* not _VA_LIST_DEFINED */ -#if !(defined (__BSD_NET2__) || defined (____386BSD____) || defined (__bsdi__) || defined (__sequent__) || defined (__FreeBSD__)) -#define _VA_LIST_ -#endif -#ifndef _VA_LIST -#define _VA_LIST -#endif -#ifndef _VA_LIST_DEFINED -#define _VA_LIST_DEFINED -#endif -#ifndef _VA_LIST_T_H -#define _VA_LIST_T_H -#endif - -#endif /* not _VA_LIST_, except on certain systems */ - -#endif /* not __svr4__ */ - -#endif /* _STDARG_H */ - -#endif /* not _ANSI_STDARG_H_ */ -#endif /* not _STDARG_H */ diff --git a/contrib/gcc/ginclude/stdbool.h b/contrib/gcc/ginclude/stdbool.h deleted file mode 100644 index 0baf9ce42bdc..000000000000 --- a/contrib/gcc/ginclude/stdbool.h +++ /dev/null @@ -1,20 +0,0 @@ -/* stdbool.h for GNU. */ -#ifndef __STDBOOL_H__ -#define __STDBOOL_H__ 1 - -/* The type `bool' must promote to `int' or `unsigned int'. The constants - `true' and `false' must have the value 0 and 1 respectively. */ -typedef enum - { - false = 0, - true = 1 - } bool; - -/* The names `true' and `false' must also be made available as macros. */ -#define false false -#define true true - -/* Signal that all the definitions are present. */ -#define __bool_true_false_are_defined 1 - -#endif /* stdbool.h */ diff --git a/contrib/gcc/ginclude/stddef.h b/contrib/gcc/ginclude/stddef.h deleted file mode 100644 index 615052e85d4e..000000000000 --- a/contrib/gcc/ginclude/stddef.h +++ /dev/null @@ -1,342 +0,0 @@ -#if (!defined(_STDDEF_H) && !defined(_STDDEF_H_) && !defined(_ANSI_STDDEF_H) \ - && !defined(__STDDEF_H__)) \ - || defined(__need_wchar_t) || defined(__need_size_t) \ - || defined(__need_ptrdiff_t) || defined(__need_NULL) \ - || defined(__need_wint_t) - -/* Any one of these symbols __need_* means that GNU libc - wants us just to define one data type. So don't define - the symbols that indicate this file's entire job has been done. */ -#if (!defined(__need_wchar_t) && !defined(__need_size_t) \ - && !defined(__need_ptrdiff_t) && !defined(__need_NULL) \ - && !defined(__need_wint_t)) -#define _STDDEF_H -#define _STDDEF_H_ -/* snaroff@next.com says the NeXT needs this. */ -#define _ANSI_STDDEF_H -/* Irix 5.1 needs this. */ -#define __STDDEF_H__ -#endif - -#ifndef __sys_stdtypes_h -/* This avoids lossage on SunOS but only if stdtypes.h comes first. - There's no way to win with the other order! Sun lossage. */ - -/* On 4.3bsd-net2, make sure ansi.h is included, so we have - one less case to deal with in the following. */ -#if defined (__BSD_NET2__) || defined (____386BSD____) || defined (__FreeBSD__) || defined(__NetBSD__) -#include <machine/ansi.h> -#endif - -/* In 4.3bsd-net2, machine/ansi.h defines these symbols, which are - defined if the corresponding type is *not* defined. - FreeBSD-2.1 defines _MACHINE_ANSI_H_ instead of _ANSI_H_ */ -#if defined(_ANSI_H_) || defined(_MACHINE_ANSI_H_) -#if !defined(_SIZE_T_) && !defined(_BSD_SIZE_T_) -#define _SIZE_T -#endif -#if !defined(_PTRDIFF_T_) && !defined(_BSD_PTRDIFF_T_) -#define _PTRDIFF_T -#endif -/* On BSD/386 1.1, at least, machine/ansi.h defines _BSD_WCHAR_T_ - instead of _WCHAR_T_. */ -#if !defined(_WCHAR_T_) && !defined(_BSD_WCHAR_T_) -#ifndef _BSD_WCHAR_T_ -#define _WCHAR_T -#endif -#endif -/* Undef _FOO_T_ if we are supposed to define foo_t. */ -#if defined (__need_ptrdiff_t) || defined (_STDDEF_H_) -#undef _PTRDIFF_T_ -#undef _BSD_PTRDIFF_T_ -#endif -#if defined (__need_size_t) || defined (_STDDEF_H_) -#undef _SIZE_T_ -#undef _BSD_SIZE_T_ -#endif -#if defined (__need_wchar_t) || defined (_STDDEF_H_) -#undef _WCHAR_T_ -#undef _BSD_WCHAR_T_ -#endif -#endif /* defined(_ANSI_H_) || defined(_MACHINE_ANSI_H_) */ - -/* Sequent's header files use _PTRDIFF_T_ in some conflicting way. - Just ignore it. */ -#if defined (__sequent__) && defined (_PTRDIFF_T_) -#undef _PTRDIFF_T_ -#endif - -/* On VxWorks, <type/vxTypesBase.h> may have defined macros like - _TYPE_size_t which will typedef size_t. fixincludes patched the - vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is - not defined, and so that defining this macro defines _GCC_SIZE_T. - If we find that the macros are still defined at this point, we must - invoke them so that the type is defined as expected. */ -#if defined (_TYPE_ptrdiff_t) && (defined (__need_ptrdiff_t) || defined (_STDDEF_H_)) -_TYPE_ptrdiff_t; -#undef _TYPE_ptrdiff_t -#endif -#if defined (_TYPE_size_t) && (defined (__need_size_t) || defined (_STDDEF_H_)) -_TYPE_size_t; -#undef _TYPE_size_t -#endif -#if defined (_TYPE_wchar_t) && (defined (__need_wchar_t) || defined (_STDDEF_H_)) -_TYPE_wchar_t; -#undef _TYPE_wchar_t -#endif - -/* In case nobody has defined these types, but we aren't running under - GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE__TYPE__, and - __WCHAR_TYPE__ have reasonable values. This can happen if the - parts of GCC is compiled by an older compiler, that actually - include gstddef.h, such as collect2. */ - -/* Signed type of difference of two pointers. */ - -/* Define this type if we are doing the whole job, - or if we want this type in particular. */ -#if defined (_STDDEF_H) || defined (__need_ptrdiff_t) -#ifndef _PTRDIFF_T /* in case <sys/types.h> has defined it. */ -#ifndef _T_PTRDIFF_ -#ifndef _T_PTRDIFF -#ifndef __PTRDIFF_T -#ifndef _PTRDIFF_T_ -#ifndef _BSD_PTRDIFF_T_ -#ifndef ___int_ptrdiff_t_h -#ifndef _GCC_PTRDIFF_T -#define _PTRDIFF_T -#define _T_PTRDIFF_ -#define _T_PTRDIFF -#define __PTRDIFF_T -#define _PTRDIFF_T_ -#define _BSD_PTRDIFF_T_ -#define ___int_ptrdiff_t_h -#define _GCC_PTRDIFF_T -#ifndef __PTRDIFF_TYPE__ -#define __PTRDIFF_TYPE__ long int -#endif -typedef __PTRDIFF_TYPE__ ptrdiff_t; -#endif /* _GCC_PTRDIFF_T */ -#endif /* ___int_ptrdiff_t_h */ -#endif /* _BSD_PTRDIFF_T_ */ -#endif /* _PTRDIFF_T_ */ -#endif /* __PTRDIFF_T */ -#endif /* _T_PTRDIFF */ -#endif /* _T_PTRDIFF_ */ -#endif /* _PTRDIFF_T */ - -/* If this symbol has done its job, get rid of it. */ -#undef __need_ptrdiff_t - -#endif /* _STDDEF_H or __need_ptrdiff_t. */ - -/* Unsigned type of `sizeof' something. */ - -/* Define this type if we are doing the whole job, - or if we want this type in particular. */ -#if defined (_STDDEF_H) || defined (__need_size_t) -#ifndef __size_t__ /* BeOS */ -#ifndef _SIZE_T /* in case <sys/types.h> has defined it. */ -#ifndef _SYS_SIZE_T_H -#ifndef _T_SIZE_ -#ifndef _T_SIZE -#ifndef __SIZE_T -#ifndef _SIZE_T_ -#ifndef _BSD_SIZE_T_ -#ifndef _SIZE_T_DEFINED_ -#ifndef _SIZE_T_DEFINED -#ifndef ___int_size_t_h -#ifndef _GCC_SIZE_T -#ifndef _SIZET_ -#ifndef __size_t -#define __size_t__ /* BeOS */ -#define _SIZE_T -#define _SYS_SIZE_T_H -#define _T_SIZE_ -#define _T_SIZE -#define __SIZE_T -#define _SIZE_T_ -#define _BSD_SIZE_T_ -#define _SIZE_T_DEFINED_ -#define _SIZE_T_DEFINED -#define ___int_size_t_h -#define _GCC_SIZE_T -#define _SIZET_ -#define __size_t -#ifndef __SIZE_TYPE__ -#define __SIZE_TYPE__ long unsigned int -#endif -#if !(defined (__GNUG__) && defined (size_t)) -typedef __SIZE_TYPE__ size_t; -#ifdef __BEOS__ -typedef long ssize_t; -#endif /* __BEOS__ */ -#endif /* !(defined (__GNUG__) && defined (size_t)) */ -#endif /* __size_t */ -#endif /* _SIZET_ */ -#endif /* _GCC_SIZE_T */ -#endif /* ___int_size_t_h */ -#endif /* _SIZE_T_DEFINED */ -#endif /* _SIZE_T_DEFINED_ */ -#endif /* _BSD_SIZE_T_ */ -#endif /* _SIZE_T_ */ -#endif /* __SIZE_T */ -#endif /* _T_SIZE */ -#endif /* _T_SIZE_ */ -#endif /* _SYS_SIZE_T_H */ -#endif /* _SIZE_T */ -#endif /* __size_t__ */ -#undef __need_size_t -#endif /* _STDDEF_H or __need_size_t. */ - - -/* Wide character type. - Locale-writers should change this as necessary to - be big enough to hold unique values not between 0 and 127, - and not (wchar_t) -1, for each defined multibyte character. */ - -/* Define this type if we are doing the whole job, - or if we want this type in particular. */ -#if defined (_STDDEF_H) || defined (__need_wchar_t) -#ifndef __wchar_t__ /* BeOS */ -#ifndef _WCHAR_T -#ifndef _T_WCHAR_ -#ifndef _T_WCHAR -#ifndef __WCHAR_T -#ifndef _WCHAR_T_ -#ifndef _BSD_WCHAR_T_ -#ifndef _WCHAR_T_DEFINED_ -#ifndef _WCHAR_T_DEFINED -#ifndef _WCHAR_T_H -#ifndef ___int_wchar_t_h -#ifndef __INT_WCHAR_T_H -#ifndef _GCC_WCHAR_T -#define __wchar_t__ /* BeOS */ -#define _WCHAR_T -#define _T_WCHAR_ -#define _T_WCHAR -#define __WCHAR_T -#define _WCHAR_T_ -#define _BSD_WCHAR_T_ -#define _WCHAR_T_DEFINED_ -#define _WCHAR_T_DEFINED -#define _WCHAR_T_H -#define ___int_wchar_t_h -#define __INT_WCHAR_T_H -#define _GCC_WCHAR_T - -/* On BSD/386 1.1, at least, machine/ansi.h defines _BSD_WCHAR_T_ - instead of _WCHAR_T_, and _BSD_RUNE_T_ (which, unlike the other - symbols in the _FOO_T_ family, stays defined even after its - corresponding type is defined). If we define wchar_t, then we - must undef _WCHAR_T_; for BSD/386 1.1 (and perhaps others), if - we undef _WCHAR_T_, then we must also define rune_t, since - headers like runetype.h assume that if machine/ansi.h is included, - and _BSD_WCHAR_T_ is not defined, then rune_t is available. - machine/ansi.h says, "Note that _WCHAR_T_ and _RUNE_T_ must be of - the same type." */ -#ifdef _BSD_WCHAR_T_ -#undef _BSD_WCHAR_T_ -#ifdef _BSD_RUNE_T_ -#if !defined (_ANSI_SOURCE) && !defined (_POSIX_SOURCE) -typedef _BSD_RUNE_T_ rune_t; -#endif -#endif -#endif - -#ifndef __WCHAR_TYPE__ -#ifdef __BEOS__ -#define __WCHAR_TYPE__ unsigned char -#else -#define __WCHAR_TYPE__ int -#endif -#endif -#ifndef __cplusplus -typedef __WCHAR_TYPE__ wchar_t; -#endif -#endif -#endif -#endif -#endif -#endif -#endif -#endif -#endif -#endif -#endif -#endif -#endif -#endif /* __wchar_t__ */ -#undef __need_wchar_t -#endif /* _STDDEF_H or __need_wchar_t. */ - -#if defined (_STDDEF_H) || defined (__need_wint_t) -#ifndef _WINT_T -#define _WINT_T - -#ifndef __WINT_TYPE__ -#define __WINT_TYPE__ unsigned int -#endif -typedef __WINT_TYPE__ wint_t; -#endif -#undef __need_wint_t -#endif - -/* In 4.3bsd-net2, leave these undefined to indicate that size_t, etc. - are already defined. */ -/* BSD/OS 3.1 requires the MACHINE_ANSI_H check here. FreeBSD 2.x apparently - does not, even though there is a check for MACHINE_ANSI_H above. */ -#if defined(_ANSI_H_) || (defined(__bsdi__) && defined(_MACHINE_ANSI_H_)) -/* The references to _GCC_PTRDIFF_T_, _GCC_SIZE_T_, and _GCC_WCHAR_T_ - are probably typos and should be removed before 2.8 is released. */ -#ifdef _GCC_PTRDIFF_T_ -#undef _PTRDIFF_T_ -#undef _BSD_PTRDIFF_T_ -#endif -#ifdef _GCC_SIZE_T_ -#undef _SIZE_T_ -#undef _BSD_SIZE_T_ -#endif -#ifdef _GCC_WCHAR_T_ -#undef _WCHAR_T_ -#undef _BSD_WCHAR_T_ -#endif -/* The following ones are the real ones. */ -#ifdef _GCC_PTRDIFF_T -#undef _PTRDIFF_T_ -#undef _BSD_PTRDIFF_T_ -#endif -#ifdef _GCC_SIZE_T -#undef _SIZE_T_ -#undef _BSD_SIZE_T_ -#endif -#ifdef _GCC_WCHAR_T -#undef _WCHAR_T_ -#undef _BSD_WCHAR_T_ -#endif -#endif /* _ANSI_H_ || ( __bsdi__ && _MACHINE_ANSI_H_ ) */ - -#endif /* __sys_stdtypes_h */ - -/* A null pointer constant. */ - -#if defined (_STDDEF_H) || defined (__need_NULL) -#undef NULL /* in case <stdio.h> has defined it. */ -#ifdef __GNUG__ -#define NULL __null -#else /* G++ */ -#define NULL ((void *)0) -#endif /* G++ */ -#endif /* NULL not defined and <stddef.h> or need NULL. */ -#undef __need_NULL - -#ifdef _STDDEF_H - -/* Offset of member MEMBER in a struct of type TYPE. */ - -#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER) - -#endif /* _STDDEF_H was defined this time */ - -#endif /* !_STDDEF_H && !_STDDEF_H_ && !_ANSI_STDDEF_H && !__STDDEF_H__ - || __need_XXX was not defined before */ diff --git a/contrib/gcc/ginclude/va-alpha.h b/contrib/gcc/ginclude/va-alpha.h deleted file mode 100644 index 2528a712ada2..000000000000 --- a/contrib/gcc/ginclude/va-alpha.h +++ /dev/null @@ -1,128 +0,0 @@ -/* GNU C varargs and stdargs support for the DEC Alpha. */ - -/* Note: We must use the name __builtin_savregs. GCC attaches special - significance to that name. In particular, regardless of where in a - function __builtin_saveregs is called, GCC moves the call up to the - very start of the function. */ - -/* Define __gnuc_va_list. */ - -#ifndef __GNUC_VA_LIST -#define __GNUC_VA_LIST - -/* In VMS, __gnuc_va_list is simply char *; on OSF, it's a structure. */ - -#ifdef __VMS__ -typedef char *__gnuc_va_list; -#else - -typedef struct { - char *__base; /* Pointer to first integer register. */ - int __offset; /* Byte offset of args so far. */ -} __gnuc_va_list; -#endif - -#endif /* __GNUC_VA_LIST */ - -/* If this is for internal libc use, don't define anything but - __gnuc_va_list. */ - -#if !defined(__GNUC_VA_LIST_1) && (defined (_STDARG_H) || defined (_VARARGS_H)) -#define __GNUC_VA_LIST_1 - -#define _VA_LIST -#define _VA_LIST_ - -typedef __gnuc_va_list va_list; - -#if !defined(_STDARG_H) - -/* varargs support */ -#define va_alist __builtin_va_alist -#define va_dcl int __builtin_va_alist;... -#ifdef __VMS__ -#define va_start(pvar) ((pvar) = __builtin_saveregs ()) -#else -#define va_start(pvar) ((pvar) = * (__gnuc_va_list *) __builtin_saveregs ()) -#endif - -#else /* STDARG.H */ - -/* ANSI alternative. */ - -/* Call __builtin_next_arg even though we aren't using its value, so that - we can verify that firstarg is correct. */ - -#ifdef __VMS__ -#define va_start(pvar, firstarg) \ - (__builtin_next_arg (firstarg), \ - (pvar) = __builtin_saveregs ()) -#else -#define va_start(pvar, firstarg) \ - (__builtin_next_arg (firstarg), \ - (pvar) = *(__gnuc_va_list *) __builtin_saveregs ()) -#endif - -#endif /* _STDARG_H */ - -#define va_end(__va) ((void) 0) - -/* Values returned by __builtin_classify_type. */ - -enum { - __no_type_class = -1, - __void_type_class, - __integer_type_class, - __char_type_class, - __enumeral_type_class, - __boolean_type_class, - __pointer_type_class, - __reference_type_class, - __offset_type_class, - __real_type_class, - __complex_type_class, - __function_type_class, - __method_type_class, - __record_type_class, - __union_type_class, - __array_type_class, - __string_type_class, - __set_type_class, - __file_type_class, - __lang_type_class -}; - -/* Note that parameters are always aligned at least to a word boundary - (when passed) regardless of what GCC's __alignof__ operator says. */ - -/* Avoid errors if compiling GCC v2 with GCC v1. */ -#if __GNUC__ == 1 -#define __extension__ -#endif - -/* Get the size of a type in bytes, rounded up to an integral number - of words. */ - -#define __va_tsize(__type) \ - (((sizeof (__type) + __extension__ sizeof (long long) - 1) \ - / __extension__ sizeof (long long)) * __extension__ sizeof (long long)) - -#ifdef __VMS__ -#define va_arg(__va, __type) \ -(*(((__va) += __va_tsize (__type)), \ - (__type *)(void *)((__va) - __va_tsize (__type)))) - -#else - -#define va_arg(__va, __type) \ -(*(((__va).__offset += __va_tsize (__type)), \ - (__type *)(void *)((__va).__base + (__va).__offset \ - - (((__builtin_classify_type (* (__type *) 0) \ - == __real_type_class) && (__va).__offset <= (6 * 8)) \ - ? (6 * 8) + 8 : __va_tsize (__type))))) -#endif - -/* Copy __gnuc_va_list into another variable of this type. */ -#define __va_copy(dest, src) (dest) = (src) - -#endif /* __GNUC_VA_LIST_1 */ diff --git a/contrib/gcc/ginclude/va-arc.h b/contrib/gcc/ginclude/va-arc.h deleted file mode 100644 index a718ad6245d6..000000000000 --- a/contrib/gcc/ginclude/va-arc.h +++ /dev/null @@ -1,111 +0,0 @@ -/* stdarg/varargs support for the ARC */ - -/* Define __gnuc_va_list. */ - -#ifndef __GNUC_VA_LIST -#define __GNUC_VA_LIST -typedef void * __gnuc_va_list; -#endif /* not __GNUC_VA_LIST */ - -/* If this is for internal libc use, don't define anything but - __gnuc_va_list. */ -#if defined (_STDARG_H) || defined (_VARARGS_H) - -/* 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 - -/* See arc_setup_incoming_varargs for reasons for the oddity in va_start. */ -#ifdef _STDARG_H -#define va_start(AP, LASTARG) \ -(AP = (__gnuc_va_list) ((int *) __builtin_next_arg (LASTARG) \ - + (__builtin_args_info (0) < 8 \ - ? (__builtin_args_info (0) & 1) \ - : 0))) -#else -#define va_alist __builtin_va_alist -#define va_dcl int __builtin_va_alist; __va_ellipsis -#define va_start(AP) \ -(AP = (__gnuc_va_list) ((int *) &__builtin_va_alist \ - + (__builtin_args_info (0) < 8 \ - ? (__builtin_args_info (0) & 1) \ - : 0))) -#endif - -#ifndef va_end -void va_end (__gnuc_va_list); /* Defined in libgcc.a */ - -/* Values returned by __builtin_classify_type. */ - -enum __va_type_classes { - __no_type_class = -1, - __void_type_class, - __integer_type_class, - __char_type_class, - __enumeral_type_class, - __boolean_type_class, - __pointer_type_class, - __reference_type_class, - __offset_type_class, - __real_type_class, - __complex_type_class, - __function_type_class, - __method_type_class, - __record_type_class, - __union_type_class, - __array_type_class, - __string_type_class, - __set_type_class, - __file_type_class, - __lang_type_class -}; - -#endif -#define va_end(AP) ((void)0) - -/* Avoid errors if compiling GCC v2 with GCC v1. */ -#if __GNUC__ == 1 -#define __extension__ -#endif - -/* All aggregates are passed by reference. All scalar types larger than 8 - bytes are passed by reference. */ -/* We cast to void * and then to TYPE * because this avoids - a warning about increasing the alignment requirement. - The casts to char * avoid warnings about invalid pointer arithmetic. */ - -#define __va_rounded_size(TYPE) \ - (((sizeof (TYPE) + sizeof (int) - 1) / sizeof (int)) * sizeof (int)) - -#ifdef __big_endian__ -#define va_arg(AP,TYPE) \ -__extension__ \ -(*({((__builtin_classify_type (*(TYPE*) 0) >= __record_type_class \ - || __va_rounded_size (TYPE) > 8) \ - ? ((AP) = (char *)(AP) + __va_rounded_size (TYPE *), \ - *(TYPE **) (void *) ((char *)(AP) - __va_rounded_size (TYPE *))) \ - : ((TYPE *) (void *) \ - (AP = (void *) ((__alignof__ (TYPE) > 4 \ - ? ((int) AP + 8 - 1) & -8 \ - : (int) AP) \ - + __va_rounded_size (TYPE))) - 1));})) -#else -#define va_arg(AP,TYPE) \ -__extension__ \ -(*({((__builtin_classify_type (*(TYPE*) 0) >= __record_type_class \ - || __va_rounded_size (TYPE) > 8) \ - ? ((AP) = (char *)(AP) + __va_rounded_size (TYPE *), \ - *(TYPE **) (void *) ((char *)(AP) - __va_rounded_size (TYPE *))) \ - : ((AP = (void *) ((__alignof__ (TYPE) > 4 \ - ? ((int) AP + 8 - 1) & -8 \ - : (int) AP) \ - + __va_rounded_size (TYPE))), \ - (TYPE *) (void *) (AP - __va_rounded_size (TYPE))));})) -#endif - -#endif /* defined (_STDARG_H) || defined (_VARARGS_H) */ diff --git a/contrib/gcc/ginclude/va-c4x.h b/contrib/gcc/ginclude/va-c4x.h deleted file mode 100644 index c73c6d592bdc..000000000000 --- a/contrib/gcc/ginclude/va-c4x.h +++ /dev/null @@ -1,34 +0,0 @@ -/* GNU C varargs support for the TMS320C[34]x */ - -/* C[34]x arguments grow in weird ways (downwards) that the standard - varargs stuff can't handle. */ - -#ifndef __GNUC_VA_LIST -#define __GNUC_VA_LIST - -typedef void *__gnuc_va_list; - -#endif /* not __GNUC_VA_LIST */ - -/* If this is for internal libc use, don't define anything but - __gnuc_va_list. */ -#if defined (_STDARG_H) || defined (_VARARGS_H) - -#ifdef _STDARG_H /* stdarg.h support */ - -#define va_start(AP,LASTARG) AP=(__gnuc_va_list) __builtin_next_arg (LASTARG) - -#else /* varargs.h support */ - -#define __va_ellipsis ... -#define va_alist __builtin_va_alist -#define va_dcl int __builtin_va_alist; __va_ellipsis -#define va_start(AP) AP=(__gnuc_va_list) ((int *)&__builtin_va_alist + 1) - -#endif /* _STDARG_H */ - -#define va_end(AP) ((void) 0) -#define va_arg(AP,TYPE) (AP = (__gnuc_va_list) ((char *) (AP) - sizeof(TYPE)), \ - *((TYPE *) ((char *) (AP)))) - -#endif /* defined (_STDARG_H) || defined (_VARARGS_H) */ diff --git a/contrib/gcc/ginclude/va-clipper.h b/contrib/gcc/ginclude/va-clipper.h deleted file mode 100644 index 213afca93f02..000000000000 --- a/contrib/gcc/ginclude/va-clipper.h +++ /dev/null @@ -1,60 +0,0 @@ -/* GNU C varargs and stdargs support for Clipper. */ - -/* Define __gnuc_va_list. */ - -#ifndef __GNUC_VA_LIST -#define __GNUC_VA_LIST - -typedef struct -{ - int __va_ap; /* pointer to stack args */ - void *__va_reg[4]; /* pointer to r0,f0,r1,f1 */ - int __va_num; /* number of args processed */ -} __gnuc_va_list; -#endif /* not __GNUC_VA_LIST */ - - -#if defined (_STDARG_H) || defined (_VARARGS_H) -typedef __gnuc_va_list va_list; -#define __va_list __gnuc_va_list /* acc compatibility */ - -#define _VA_LIST -#define _VA_LIST_ -#define _SYS_INT_STDARG_H /* acc compatibility */ - -/* Call __builtin_next_arg even though we aren't using its value, so that - we can verify that LASTARG is correct. */ -#ifdef _STDARG_H -#define va_start(AP,LASTARG) \ - (__builtin_next_arg (LASTARG), \ - (AP) = *(va_list *)__builtin_saveregs(), \ - (AP).__va_num = __builtin_args_info (0), \ - (AP).__va_ap += __builtin_args_info (1)) -#else -#define va_alist __builtin_va_alist -/* The ... causes current_function_varargs to be set in cc1. */ -#define va_dcl va_list __builtin_va_alist; ... -#define va_start(AP) \ - ((AP) = *(va_list *)__builtin_saveregs(), \ - (AP).__va_num = __builtin_args_info (0)) -#endif /* _STDARG_H */ - -/* round to alignment of `type' but keep a least integer alignment */ -#define __va_round(AP,TYPE) \ - ((AP).__va_ap = ((AP).__va_ap + __alignof__ (TYPE) - 1 ) & \ - ~(__alignof__ (TYPE) - 1), \ - ((AP).__va_ap = ((AP).__va_ap + sizeof (int) - 1) & ~(sizeof (int) - 1))) - -#define va_arg(AP, TYPE) \ - (*((AP).__va_num < 2 && __builtin_classify_type (* (TYPE *)0) < 12 \ - ? (__builtin_classify_type (* (TYPE *)0) == 8 \ - ? ((TYPE *)(AP).__va_reg[2 * (AP).__va_num++ + 1]) \ - : ((TYPE *)(AP).__va_reg[2 * (AP).__va_num++ ])) \ - : ((AP).__va_num++, __va_round (AP,TYPE), ((TYPE *)((AP).__va_ap))++))) - -#define va_end(AP) ((void) 0) - -/* Copy __gnuc_va_list into another variable of this type. */ -#define __va_copy(dest, src) (dest) = (src) - -#endif /* defined (_STDARG_H) || defined (_VARARGS_H) */ diff --git a/contrib/gcc/ginclude/va-h8300.h b/contrib/gcc/ginclude/va-h8300.h deleted file mode 100644 index 9565696e9ad6..000000000000 --- a/contrib/gcc/ginclude/va-h8300.h +++ /dev/null @@ -1,56 +0,0 @@ -/* stdarg/vararg support for the Hitachi h8/300 and h8/300h */ - -/* Define __gnuc_va_list. */ - -#ifndef __GNUC_VA_LIST -#define __GNUC_VA_LIST -typedef void *__gnuc_va_list; -#endif - -/* If this is for internal libc use, don't define anything but - __gnuc_va_list. */ -#if defined (_STDARG_H) || defined (_VARARGS_H) - -/* 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 - -#ifdef __H8300__ -#define __va_rounded_size(TYPE) \ - (((sizeof (TYPE) + sizeof (int) - 1) / sizeof (int)) * sizeof (int)) -#else -#define __va_rounded_size(TYPE) \ - (((sizeof (TYPE) + sizeof (long) - 1) / sizeof (long)) * sizeof (long)) -#endif - -#ifdef _STDARG_H - -#define va_start(AP,LASTARG) \ - (AP = ((__gnuc_va_list) __builtin_next_arg (LASTARG))) - -#else /* _VARARGS_H */ - -#define va_alist __builtin_va_alist -/* The ... causes current_function_varargs to be set in cc1. */ -#define va_dcl int __builtin_va_alist; __va_ellipsis -#define va_start(AP) AP = (void *) &__builtin_va_alist - -#endif /* _VARARGS_H */ - -#define va_arg(AP, TYPE) \ - (AP = (__gnuc_va_list) ((char *) (AP) + __va_rounded_size (TYPE)), \ - *((TYPE *) (void *) ((char *) (AP) \ - - ((sizeof (TYPE) < __va_rounded_size (int) \ - ? sizeof (TYPE) : __va_rounded_size (TYPE)))))) - -#define va_end(AP) ((void) 0) - -/* Copy __gnuc_va_list into another variable of this type. */ -#define __va_copy(dest, src) (dest) = (src) - -#endif /* defined (_STDARG_H) || defined (_VARARGS_H) */ diff --git a/contrib/gcc/ginclude/va-i860.h b/contrib/gcc/ginclude/va-i860.h deleted file mode 100644 index 56d2c7fe1d3b..000000000000 --- a/contrib/gcc/ginclude/va-i860.h +++ /dev/null @@ -1,214 +0,0 @@ -/* Note: We must use the name __builtin_savregs. GCC attaches special - significance to that name. In particular, regardless of where in a - function __builtin_saveregs is called, GCC moves the call up to the - very start of the function. */ - - -/* Define __gnuc_va_list. */ - -#ifndef __GNUC_VA_LIST -#define __GNUC_VA_LIST - -typedef union { - float __freg[8]; - double __dreg[4]; -} __f_regs; - -typedef struct { -#if defined (__SVR4__) || defined (__svr4__) || defined (__alliant__) || defined (__PARAGON__) - __f_regs __float_regs; long __ireg[12]; -#else /* pre-SVR4 */ - long __ireg[12]; __f_regs __float_regs; -#endif -} __va_saved_regs; - -typedef struct { -#if defined(__SVR4__) || defined(__svr4__) || defined(__alliant__) || defined (__PARAGON__) - unsigned __ireg_used; /* How many int regs consumed 'til now? */ - unsigned __freg_used; /* How many flt regs consumed 'til now? */ - long *__reg_base; /* Address of where we stored the regs. */ - long * __mem_ptr; /* Address of memory overflow args area. */ -#else /* pre-SVR4 */ - long *__reg_base; /* Address of where we stored the regs. */ - long * __mem_ptr; /* Address of memory overflow args area. */ - unsigned __ireg_used; /* How many int regs consumed 'til now? */ - unsigned __freg_used; /* How many flt regs consumed 'til now? */ -#endif -} __gnuc_va_list; -#endif /* not __GNUC_VA_LIST */ - -/* If this is for internal libc use, don't define anything but - __gnuc_va_list. */ -#if defined (_STDARG_H) || defined (_VARARGS_H) - -#if !defined(_STDARG_H) - -/* varargs support */ -#define va_alist __builtin_va_alist -#if defined (__PARAGON__) -#define va_dcl int va_alist; -#else /* __PARAGON__ */ -#define va_dcl -#endif /* __PARAGON__ */ -#define va_start(pvar) ((pvar) = * (__gnuc_va_list *) __builtin_saveregs ()) - -#else /* STDARG.H */ - -/* ANSI alternative. */ -/* Note that CUMULATIVE_ARGS elements are measured in bytes on the i860, - so we divide by 4 to get # of registers. */ -#define va_start(pvar, firstarg) \ - ((pvar) = *(__gnuc_va_list *) __builtin_saveregs (), \ - (pvar).__ireg_used = __builtin_args_info (0) / 4, \ - (pvar).__freg_used = __builtin_args_info (1) / 4, \ - (pvar).__mem_ptr = __builtin_next_arg (firstarg)) - -#endif /* _STDARG_H */ - -/* Values returned by __builtin_classify_type. */ - -#ifndef va_end -enum { - __no_type_class = -1, - __void_type_class, - __integer_type_class, - __char_type_class, - __enumeral_type_class, - __boolean_type_class, - __pointer_type_class, - __reference_type_class, - __offset_type_class, - __real_type_class, - __complex_type_class, - __function_type_class, - __method_type_class, - __record_type_class, - __union_type_class, - __array_type_class, - __string_type_class, - __set_type_class, - __file_type_class, - __lang_type_class -}; - -void va_end (__gnuc_va_list); /* Defined in libgcc.a */ -#endif -#define va_end(__va) ((void) 0) - -#define __NUM_PARM_FREGS 8 -#define __NUM_PARM_IREGS 12 - -#define __savereg(__va) ((__va_saved_regs *) ((__va).__reg_base)) - -/* This macro works both for SVR4 and pre-SVR4 environments. */ - -/* Note that parameters are always aligned at least to a word boundary - (when passed) regardless of what GCC's __alignof__ operator says. */ - -/* Make allowances here for adding 128-bit (long double) floats someday. */ - -#if 0 /* What was this for? */ -#ifndef __GNU_VA_LIST -#define __ireg_used ireg_used -#define __freg_used freg_used -#define __mem_ptr mem_ptr -#define __reg_base reg_base -#endif -#endif /* 0 */ - -/* Avoid errors if compiling GCC v2 with GCC v1. */ -#if __GNUC__ == 1 -#define __extension__ -#endif - -#define va_arg(__va, __type) \ -__extension__ \ -(* (__type *) \ -({ \ - register void *__rv; /* result value */ \ - register unsigned __align; \ - switch (__builtin_classify_type (* (__type *) 0)) \ - { \ - case __real_type_class: \ - switch (sizeof (__type)) \ - { \ - case sizeof (float): \ - case sizeof (double): \ - if ((__va).__freg_used < __NUM_PARM_FREGS - 1) \ - { \ - if (((__va).__freg_used & 1) != 0) \ - (__va).__freg_used++; /* skip odd */ \ - __rv = &__savereg((__va))->__float_regs.__freg[(__va).__freg_used];\ - (__va).__freg_used += 2; \ - } \ - else \ - { \ - if ((((unsigned) (__va).__mem_ptr) & (sizeof(double)-1)) != 0) \ - (__va).__mem_ptr++; /* skip odd */ \ - __rv = (__va).__mem_ptr; \ - (__va).__mem_ptr += 2; \ - } \ - if (sizeof (__type) == sizeof (float)) \ - { \ - *((float *) __rv) = *((double *) __rv); \ - *(((long *) __rv) + 1) = 0xfff00001; \ - } \ - break; \ - default: \ - abort (); \ - } \ - break; \ - case __void_type_class: \ - case __integer_type_class: \ - case __char_type_class: \ - case __enumeral_type_class: \ - case __boolean_type_class: \ - case __pointer_type_class: \ - case __reference_type_class: \ - case __offset_type_class: \ - if (sizeof (__type) <= 4) \ - { \ - __rv = ((__va).__ireg_used < __NUM_PARM_IREGS \ - ? (&__savereg((__va))->__ireg[(__va).__ireg_used++]) \ - : (__va).__mem_ptr++); \ - break; \ - } \ - else if ((__va).__ireg_used + sizeof (__type) / 4 <= __NUM_PARM_IREGS) \ - { \ - __rv = &__savereg((__va))->__ireg[(__va).__ireg_used]; \ - (__va).__ireg_used += sizeof (__type) / 4; \ - break; \ - } \ - /* Fall through to fetch from memory. */ \ - case __record_type_class: \ - case __union_type_class: \ - __align = (__alignof__ (__type) < sizeof (long) \ - ? sizeof (long) \ - : __alignof__ (__type)); \ - (__va).__mem_ptr \ - = (long *) \ - ((((unsigned) (__va).__mem_ptr) + (__align-1)) & ~(__align-1)); \ - __rv = (__va).__mem_ptr; \ - (__va).__mem_ptr \ - += ((sizeof (__type) + sizeof (long) - 1) / sizeof (long)); \ - break; \ - case __complex_type_class: \ - case __function_type_class: \ - case __method_type_class: \ - case __array_type_class: \ - case __string_type_class: \ - case __set_type_class: \ - case __file_type_class: \ - case __lang_type_class: \ - case __no_type_class: \ - default: \ - abort (); \ - } \ - __rv; \ -})) - -/* Copy __gnuc_va_list into another variable of this type. */ -#define __va_copy(dest, src) (dest) = (src) - -#endif /* defined (_STDARG_H) || defined (_VARARGS_H) */ - diff --git a/contrib/gcc/ginclude/va-i960.h b/contrib/gcc/ginclude/va-i960.h deleted file mode 100644 index 5588d4112917..000000000000 --- a/contrib/gcc/ginclude/va-i960.h +++ /dev/null @@ -1,79 +0,0 @@ -/* GNU C varargs support for the Intel 80960. */ - -/* Define __gnuc_va_list. */ - -#ifndef __GNUC_VA_LIST -#define __GNUC_VA_LIST -/* The first element is the address of the first argument. - The second element is the number of bytes skipped past so far. */ -typedef unsigned __gnuc_va_list[2]; -#endif /* not __GNUC_VA_LIST */ - -/* If this is for internal libc use, don't define anything but - __gnuc_va_list. */ -#if defined (_STDARG_H) || defined (_VARARGS_H) - -/* 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 - -/* The stack size of the type t. */ -#define __vsiz(T) (((sizeof (T) + 3) / 4) * 4) -/* The stack alignment of the type t. */ -#define __vali(T) (__alignof__ (T) >= 4 ? __alignof__ (T) : 4) -/* The offset of the next stack argument after one of type t at offset i. */ -#define __vpad(I, T) ((((I) + __vali (T) - 1) / __vali (T)) \ - * __vali (T) + __vsiz (T)) - -/* Avoid errors if compiling GCC v2 with GCC v1. */ -#if __GNUC__ == 1 -#define __extension__ -#endif - -#ifdef _STDARG_H -/* Call __builtin_next_arg even though we aren't using its value, so that - we can verify that firstarg is correct. */ -#define va_start(AP, LASTARG) \ -__extension__ \ -({ __builtin_next_arg (LASTARG); \ - __asm__ ("st g14,%0" : "=m" (*(AP))); \ - (AP)[1] = (__builtin_args_info (0) + __builtin_args_info (1)) * 4; }) - -#else - -#define va_alist __builtin_va_alist -#define va_dcl char *__builtin_va_alist; __va_ellipsis -#define va_start(AP) \ -__extension__ \ -({ __asm__ ("st g14,%0" : "=m" (*(AP))); \ - (AP)[1] = (__builtin_args_info (0) + __builtin_args_info (1)) * 4; }) -#endif - -/* We cast to void * and then to TYPE * because this avoids - a warning about increasing the alignment requirement. */ -#define va_arg(AP, T) \ -( \ - ( \ - ((AP)[1] <= 48 && (__vpad ((AP)[1], T) > 48 || __vsiz (T) > 16)) \ - ? ((AP)[1] = 48 + __vsiz (T)) \ - : ((AP)[1] = __vpad ((AP)[1], T)) \ - ), \ - \ - *((T *) (void *) ((char *) *(AP) + (AP)[1] - __vsiz (T))) \ -) - -#ifndef va_end -void va_end (__gnuc_va_list); /* Defined in libgcc.a */ -#endif -#define va_end(AP) ((void) 0) - -/* Copy __gnuc_va_list into another variable of this type. */ -#define __va_copy(dest, src) (dest) = (src) - -#endif /* defined (_STDARG_H) || defined (_VARARGS_H) */ - diff --git a/contrib/gcc/ginclude/va-m32r.h b/contrib/gcc/ginclude/va-m32r.h deleted file mode 100644 index 4ef0ad8267a8..000000000000 --- a/contrib/gcc/ginclude/va-m32r.h +++ /dev/null @@ -1,86 +0,0 @@ -/* GNU C stdarg/varargs support for the M32R */ - -/* Define __gnuc_va_list. */ -#ifndef __GNUC_VA_LIST -#define __GNUC_VA_LIST -typedef void *__gnuc_va_list; -#endif /* not __GNUC_VA_LIST */ - -/* If this is for internal libc use, don't define anything but - __gnuc_va_list. */ -#if defined (_STDARG_H) || defined (_VARARGS_H) - -/* Common code for va_start for both varargs and stdarg. */ - -#define __va_rounded_size(TYPE) \ - (((sizeof (TYPE) + sizeof (int) - 1) / sizeof (int)) * sizeof (int)) - -#ifdef _STDARG_H /* stdarg.h support */ - -/* Calling __builtin_next_arg gives the proper error message if LASTARG is - not indeed the last argument. */ -#define va_start(AP, LASTARG) \ - (AP = ((__gnuc_va_list) __builtin_next_arg (LASTARG))) - -#else /* varargs.h support */ - -#define va_alist __builtin_va_alist -/* The ... causes current_function_varargs to be set in cc1. */ -#define va_dcl int __builtin_va_alist; ... -#define va_start(AP) AP=(char *) &__builtin_va_alist - -#endif /* _STDARG_H */ - -/* Nothing needs to be done to end varargs/stdarg processing */ -#define va_end(AP) ((void) 0) - -/* Values returned by __builtin_classify_type. */ -enum __type_class -{ - __no_type_class = -1, - __void_type_class, - __integer_type_class, - __char_type_class, - __enumeral_type_class, - __boolean_type_class, - __pointer_type_class, - __reference_type_class, - __offset_type_class, - __real_type_class, - __complex_type_class, - __function_type_class, - __method_type_class, - __record_type_class, - __union_type_class, - __array_type_class, - __string_type_class, - __set_type_class, - __file_type_class, - __lang_type_class -}; - -/* Return whether a type is passed by reference. */ -#define __va_by_reference_p(TYPE) (sizeof (TYPE) > 8) - -#define va_arg(AP,TYPE) \ -__extension__ (*({ \ - register TYPE *__ptr; \ - \ - if (__va_by_reference_p (TYPE)) \ - { \ - __ptr = *(TYPE **)(void *) (AP); \ - (AP) = (__gnuc_va_list) ((char *) (AP) + sizeof (void *)); \ - } \ - else \ - { \ - __ptr = (TYPE *)(void *) \ - ((char *) (AP) + (sizeof (TYPE) < __va_rounded_size (char) \ - ? __va_rounded_size (TYPE) - sizeof (TYPE) \ - : 0)); \ - (AP) = (__gnuc_va_list) ((char *) (AP) + __va_rounded_size (TYPE)); \ - } \ - \ - __ptr; \ -})) - -#endif /* defined (_STDARG_H) || defined (_VARARGS_H) */ diff --git a/contrib/gcc/ginclude/va-m88k.h b/contrib/gcc/ginclude/va-m88k.h deleted file mode 100644 index 0a20d84501ce..000000000000 --- a/contrib/gcc/ginclude/va-m88k.h +++ /dev/null @@ -1,87 +0,0 @@ -/* GNU C varargs support for the Motorola 88100 */ - -/* Define __gnuc_va_list. */ - -#ifndef __GNUC_VA_LIST -#define __GNUC_VA_LIST - -typedef struct -{ - int __va_arg; /* argument number */ - int *__va_stk; /* start of args passed on stack */ - int *__va_reg; /* start of args passed in regs */ -} __gnuc_va_list; -#endif /* not __GNUC_VA_LIST */ - -/* If this is for internal libc use, don't define anything but - __gnuc_va_list. */ -#if defined (_STDARG_H) || defined (_VARARGS_H) - -#ifdef _STDARG_H /* stdarg.h support */ - -/* Call __builtin_next_arg even though we aren't using its value, so that - we can verify that LASTARG is correct. */ -#if __GNUC__ > 1 /* GCC 2.0 and beyond */ -#define va_start(AP,LASTARG) \ - (__builtin_next_arg (LASTARG), \ - (AP) = *(__gnuc_va_list *)__builtin_saveregs()) -#else -#define va_start(AP,LASTARG) \ - ( (AP).__va_reg = (int *) __builtin_saveregs2(0), \ - (AP).__va_stk = (int *) __builtin_argptr(), \ - (AP).__va_arg = (int) (__builtin_argsize() + 3) / 4 ) -#endif - -#else /* varargs.h support */ - -#if __GNUC__ > 1 /* GCC 2.0 and beyond */ -#define va_start(AP) ((AP) = *(__gnuc_va_list *)__builtin_saveregs()) -#else -#define va_start(AP) \ - ( (AP).__va_reg = (int *) __builtin_saveregs2(1), \ - (AP).__va_stk = (int *) __builtin_argptr(), \ - (AP).__va_arg = (int) (__builtin_argsize() - 4 + 3) / 4 ) -#endif -#define va_alist __va_1st_arg -#define va_dcl register int va_alist;... - -#endif /* _STDARG_H */ - -/* Avoid trouble between this file and _int_varargs.h under DG/UX. This file - can be included by <stdio.h> and others and provides definitions of - __va_size and __va_reg_p and a va_list typedef. Avoid defining va_list - again with _VA_LIST. */ -#ifdef __INT_VARARGS_H -#undef __va_size -#undef __va_reg_p -#define __gnuc_va_list va_list -#define _VA_LIST -#define _VA_LIST_ -#else -/* Similarly, if this gets included first, do nothing in _int_varargs.h. */ -#define __INT_VARARGS_H -#endif - -#define __va_reg_p(TYPE) \ - (__builtin_classify_type(*(TYPE *)0) < 12 \ - ? sizeof(TYPE) <= 8 : sizeof(TYPE) == 4 && __alignof__(TYPE) == 4) - -#define __va_size(TYPE) ((sizeof(TYPE) + 3) >> 2) - -/* We cast to void * and then to TYPE * because this avoids - a warning about increasing the alignment requirement. */ -#define va_arg(AP,TYPE) \ - ( (AP).__va_arg = (((AP).__va_arg + (1 << (__alignof__(TYPE) >> 3)) - 1) \ - & ~((1 << (__alignof__(TYPE) >> 3)) - 1)) \ - + __va_size(TYPE), \ - *((TYPE *) (void *) ((__va_reg_p(TYPE) \ - && (AP).__va_arg < 8 + __va_size(TYPE) \ - ? (AP).__va_reg : (AP).__va_stk) \ - + ((AP).__va_arg - __va_size(TYPE))))) - -#define va_end(AP) ((void)0) - -/* Copy __gnuc_va_list into another variable of this type. */ -#define __va_copy(dest, src) (dest) = (src) - -#endif /* defined (_STDARG_H) || defined (_VARARGS_H) */ diff --git a/contrib/gcc/ginclude/va-mips.h b/contrib/gcc/ginclude/va-mips.h deleted file mode 100644 index 96db5b466cc3..000000000000 --- a/contrib/gcc/ginclude/va-mips.h +++ /dev/null @@ -1,277 +0,0 @@ -/* ---------------------------------------- */ -/* VARARGS for MIPS/GNU CC */ -/* */ -/* */ -/* */ -/* */ -/* ---------------------------------------- */ - - -/* These macros implement varargs for GNU C--either traditional or ANSI. */ - -/* Define __gnuc_va_list. */ - -#ifndef __GNUC_VA_LIST -#define __GNUC_VA_LIST -#if defined (__mips_eabi) && ! defined (__mips_soft_float) && ! defined (__mips_single_float) - -typedef struct { - /* Pointer to FP regs. */ - char *__fp_regs; - /* Number of FP regs remaining. */ - int __fp_left; - /* Pointer to GP regs followed by stack parameters. */ - char *__gp_regs; -} __gnuc_va_list; - -#else /* ! (defined (__mips_eabi) && ! defined (__mips_soft_float) && ! defined (__mips_single_float)) */ - -typedef char * __gnuc_va_list; - -#endif /* ! (defined (__mips_eabi) && ! defined (__mips_soft_float) && ! defined (__mips_single_float)) */ -#endif /* not __GNUC_VA_LIST */ - -/* If this is for internal libc use, don't define anything but - __gnuc_va_list. */ -#if defined (_STDARG_H) || defined (_VARARGS_H) - -#ifndef _VA_MIPS_H_ENUM -#define _VA_MIPS_H_ENUM -enum { - __no_type_class = -1, - __void_type_class, - __integer_type_class, - __char_type_class, - __enumeral_type_class, - __boolean_type_class, - __pointer_type_class, - __reference_type_class, - __offset_type_class, - __real_type_class, - __complex_type_class, - __function_type_class, - __method_type_class, - __record_type_class, - __union_type_class, - __array_type_class, - __string_type_class, - __set_type_class, - __file_type_class, - __lang_type_class -}; -#endif - -/* 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 - -#ifdef __mips64 -#define __va_rounded_size(__TYPE) \ - (((sizeof (__TYPE) + 8 - 1) / 8) * 8) -#else -#define __va_rounded_size(__TYPE) \ - (((sizeof (__TYPE) + sizeof (int) - 1) / sizeof (int)) * sizeof (int)) -#endif - -#ifdef __mips64 -#define __va_reg_size 8 -#else -#define __va_reg_size 4 -#endif - -/* Get definitions for _MIPS_SIM_ABI64 etc. */ -#ifdef _MIPS_SIM -#include <sgidefs.h> -#endif - -#ifdef _STDARG_H -#if defined (__mips_eabi) -#if ! defined (__mips_soft_float) && ! defined (__mips_single_float) -#ifdef __mips64 -#define va_start(__AP, __LASTARG) \ - (__AP.__gp_regs = ((char *) __builtin_next_arg (__LASTARG) \ - - (__builtin_args_info (2) < 8 \ - ? (8 - __builtin_args_info (2)) * __va_reg_size \ - : 0)), \ - __AP.__fp_left = 8 - __builtin_args_info (3), \ - __AP.__fp_regs = __AP.__gp_regs - __AP.__fp_left * __va_reg_size) -#else /* ! defined (__mips64) */ -#define va_start(__AP, __LASTARG) \ - (__AP.__gp_regs = ((char *) __builtin_next_arg (__LASTARG) \ - - (__builtin_args_info (2) < 8 \ - ? (8 - __builtin_args_info (2)) * __va_reg_size \ - : 0)), \ - __AP.__fp_left = (8 - __builtin_args_info (3)) / 2, \ - __AP.__fp_regs = __AP.__gp_regs - __AP.__fp_left * 8, \ - __AP.__fp_regs = (char *) ((int) __AP.__fp_regs & -8)) -#endif /* ! defined (__mips64) */ -#else /* ! (! defined (__mips_soft_float) && ! defined (__mips_single_float) ) */ -#define va_start(__AP, __LASTARG) \ - (__AP = ((__gnuc_va_list) __builtin_next_arg (__LASTARG) \ - - (__builtin_args_info (2) >= 8 ? 0 \ - : (8 - __builtin_args_info (2)) * __va_reg_size))) -#endif /* ! (! defined (__mips_soft_float) && ! defined (__mips_single_float) ) */ -#else /* ! defined (__mips_eabi) */ -#define va_start(__AP, __LASTARG) \ - (__AP = (__gnuc_va_list) __builtin_next_arg (__LASTARG)) -#endif /* ! (defined (__mips_eabi) && ! defined (__mips_soft_float) && ! defined (__mips_single_float)) */ -#else /* ! _STDARG_H */ -#define va_alist __builtin_va_alist -#ifdef __mips64 -/* This assumes that `long long int' is always a 64 bit type. */ -#define va_dcl long long int __builtin_va_alist; __va_ellipsis -#else -#define va_dcl int __builtin_va_alist; __va_ellipsis -#endif -#if defined (__mips_eabi) -#if ! defined (__mips_soft_float) && ! defined (__mips_single_float) -#ifdef __mips64 -#define va_start(__AP) \ - (__AP.__gp_regs = ((char *) __builtin_next_arg () \ - - (__builtin_args_info (2) < 8 \ - ? (8 - __builtin_args_info (2)) * __va_reg_size \ - : __va_reg_size)), \ - __AP.__fp_left = 8 - __builtin_args_info (3), \ - __AP.__fp_regs = __AP.__gp_regs - __AP.__fp_left * __va_reg_size) -#else /* ! defined (__mips64) */ -#define va_start(__AP) \ - (__AP.__gp_regs = ((char *) __builtin_next_arg () \ - - (__builtin_args_info (2) < 8 \ - ? (8 - __builtin_args_info (2)) * __va_reg_size \ - : __va_reg_size)), \ - __AP.__fp_left = (8 - __builtin_args_info (3)) / 2, \ - __AP.__fp_regs = __AP.__gp_regs - __AP.__fp_left * 8, \ - __AP.__fp_regs = (char *) ((int) __AP.__fp_regs & -8)) -#endif /* ! defined (__mips64) */ -#else /* ! (! defined (__mips_soft_float) && ! defined (__mips_single_float)) */ -#define va_start(__AP) \ - (__AP = ((__gnuc_va_list) __builtin_next_arg () \ - - (__builtin_args_info (2) >= 8 ? __va_reg_size \ - : (8 - __builtin_args_info (2)) * __va_reg_size))) -#endif /* ! (! defined (__mips_soft_float) && ! defined (__mips_single_float)) */ -/* Need alternate code for _MIPS_SIM_ABI64. */ -#elif defined(_MIPS_SIM) && (_MIPS_SIM == _MIPS_SIM_ABI64 || _MIPS_SIM == _MIPS_SIM_NABI32) -#define va_start(__AP) \ - (__AP = (__gnuc_va_list) __builtin_next_arg () \ - + (__builtin_args_info (2) >= 8 ? -8 : 0)) -#else -#define va_start(__AP) __AP = (char *) &__builtin_va_alist -#endif -#endif /* ! _STDARG_H */ - -#ifndef va_end -void va_end (__gnuc_va_list); /* Defined in libgcc.a */ -#endif -#define va_end(__AP) ((void)0) - -#if defined (__mips_eabi) - -#if ! defined (__mips_soft_float) && ! defined (__mips_single_float) -#ifdef __mips64 -#define __va_next_addr(__AP, __type) \ - ((__builtin_classify_type (*(__type *) 0) == __real_type_class \ - && __AP.__fp_left > 0) \ - ? (--__AP.__fp_left, (__AP.__fp_regs += 8) - 8) \ - : (__AP.__gp_regs += __va_reg_size) - __va_reg_size) -#else -#define __va_next_addr(__AP, __type) \ - ((__builtin_classify_type (*(__type *) 0) == __real_type_class \ - && __AP.__fp_left > 0) \ - ? (--__AP.__fp_left, (__AP.__fp_regs += 8) - 8) \ - : (((__builtin_classify_type (* (__type *) 0) < __record_type_class \ - && __alignof__ (__type) > 4) \ - ? __AP.__gp_regs = (char *) (((int) __AP.__gp_regs + 8 - 1) & -8) \ - : (char *) 0), \ - (__builtin_classify_type (* (__type *) 0) >= __record_type_class \ - ? (__AP.__gp_regs += __va_reg_size) - __va_reg_size \ - : ((__AP.__gp_regs += __va_rounded_size (__type)) \ - - __va_rounded_size (__type))))) -#endif -#else /* ! (! defined (__mips_soft_float) && ! defined (__mips_single_float)) */ -#ifdef __mips64 -#define __va_next_addr(__AP, __type) \ - ((__AP += __va_reg_size) - __va_reg_size) -#else -#define __va_next_addr(__AP, __type) \ - (((__builtin_classify_type (* (__type *) 0) < __record_type_class \ - && __alignof__ (__type) > 4) \ - ? __AP = (char *) (((__PTRDIFF_TYPE__) __AP + 8 - 1) & -8) \ - : (char *) 0), \ - (__builtin_classify_type (* (__type *) 0) >= __record_type_class \ - ? (__AP += __va_reg_size) - __va_reg_size \ - : ((__AP += __va_rounded_size (__type)) \ - - __va_rounded_size (__type)))) -#endif -#endif /* ! (! defined (__mips_soft_float) && ! defined (__mips_single_float)) */ - -#ifdef __MIPSEB__ -#define va_arg(__AP, __type) \ - ((__va_rounded_size (__type) <= __va_reg_size) \ - ? *(__type *) (void *) (__va_next_addr (__AP, __type) \ - + __va_reg_size \ - - sizeof (__type)) \ - : (__builtin_classify_type (*(__type *) 0) >= __record_type_class \ - ? **(__type **) (void *) (__va_next_addr (__AP, __type) \ - + __va_reg_size \ - - sizeof (char *)) \ - : *(__type *) (void *) __va_next_addr (__AP, __type))) -#else -#define va_arg(__AP, __type) \ - ((__va_rounded_size (__type) <= __va_reg_size) \ - ? *(__type *) (void *) __va_next_addr (__AP, __type) \ - : (__builtin_classify_type (* (__type *) 0) >= __record_type_class \ - ? **(__type **) (void *) __va_next_addr (__AP, __type) \ - : *(__type *) (void *) __va_next_addr (__AP, __type))) -#endif - -#else /* ! defined (__mips_eabi) */ - -/* We cast to void * and then to TYPE * because this avoids - a warning about increasing the alignment requirement. */ -/* The __mips64 cases are reversed from the 32 bit cases, because the standard - 32 bit calling convention left-aligns all parameters smaller than a word, - whereas the __mips64 calling convention does not (and hence they are - right aligned). */ -#ifdef __mips64 -#ifdef __MIPSEB__ -#define va_arg(__AP, __type) \ - ((__type *) (void *) (__AP = (char *) \ - ((((__PTRDIFF_TYPE__)__AP + 8 - 1) & -8) \ - + __va_rounded_size (__type))))[-1] -#else -#define va_arg(__AP, __type) \ - ((__AP = (char *) ((((__PTRDIFF_TYPE__)__AP + 8 - 1) & -8) \ - + __va_rounded_size (__type))), \ - *(__type *) (void *) (__AP - __va_rounded_size (__type))) -#endif - -#else /* not __mips64 */ - -#ifdef __MIPSEB__ -/* For big-endian machines. */ -#define va_arg(__AP, __type) \ - ((__AP = (char *) ((__alignof__ (__type) > 4 \ - ? ((__PTRDIFF_TYPE__)__AP + 8 - 1) & -8 \ - : ((__PTRDIFF_TYPE__)__AP + 4 - 1) & -4) \ - + __va_rounded_size (__type))), \ - *(__type *) (void *) (__AP - __va_rounded_size (__type))) -#else -/* For little-endian machines. */ -#define va_arg(__AP, __type) \ - ((__type *) (void *) (__AP = (char *) ((__alignof__(__type) > 4 \ - ? ((__PTRDIFF_TYPE__)__AP + 8 - 1) & -8 \ - : ((__PTRDIFF_TYPE__)__AP + 4 - 1) & -4) \ - + __va_rounded_size(__type))))[-1] -#endif -#endif -#endif /* ! defined (__mips_eabi) */ - -/* Copy __gnuc_va_list into another variable of this type. */ -#define __va_copy(dest, src) (dest) = (src) - -#endif /* defined (_STDARG_H) || defined (_VARARGS_H) */ diff --git a/contrib/gcc/ginclude/va-mn10200.h b/contrib/gcc/ginclude/va-mn10200.h deleted file mode 100644 index b458b56e0beb..000000000000 --- a/contrib/gcc/ginclude/va-mn10200.h +++ /dev/null @@ -1,37 +0,0 @@ -/* CYGNUS LOCAL entire file/law */ -/* Define __gnuc_va_list. */ - -#ifndef __GNUC_VA_LIST -#define __GNUC_VA_LIST -typedef void *__gnuc_va_list; -#endif /* not __GNUC_VA_LIST */ - -/* If this is for internal libc use, don't define anything but - __gnuc_va_list. */ -#if defined (_STDARG_H) || defined (_VARARGS_H) -#define __gnuc_va_start(AP) (AP = (__gnuc_va_list)__builtin_saveregs()) -#define __va_ellipsis ... - -#ifdef _STDARG_H -#define va_start(AP, LASTARG) \ - (AP = ((__gnuc_va_list) __builtin_next_arg (LASTARG))) -#else -#define va_alist __builtin_va_alist -#define va_dcl int __builtin_va_alist; __va_ellipsis -#define va_start(AP) AP=(char *) &__builtin_va_alist -#endif - -/* Now stuff common to both varargs & stdarg implementations. */ -#define __va_rounded_size(TYPE) \ - (((sizeof (TYPE) + sizeof (int) - 1) / sizeof (int)) * sizeof (int)) -#undef va_end -void va_end (__gnuc_va_list); -#define va_end(AP) ((void)0) -#define va_arg(AP, TYPE) \ - (sizeof (TYPE) > 8 \ - ? (AP = (__gnuc_va_list) ((char *) (AP) + __va_rounded_size (char *)),\ - **((TYPE **) (void *) ((char *) (AP) - __va_rounded_size (char *))))\ - : (AP = (__gnuc_va_list) ((char *) (AP) + __va_rounded_size (TYPE)), \ - *((TYPE *) (void *) ((char *) (AP) - __va_rounded_size (TYPE))))) -#endif -/* END CYGNUS LOCAL */ diff --git a/contrib/gcc/ginclude/va-mn10300.h b/contrib/gcc/ginclude/va-mn10300.h deleted file mode 100644 index e156ccf5939b..000000000000 --- a/contrib/gcc/ginclude/va-mn10300.h +++ /dev/null @@ -1,35 +0,0 @@ -/* Define __gnuc_va_list. */ - -#ifndef __GNUC_VA_LIST -#define __GNUC_VA_LIST -typedef void *__gnuc_va_list; -#endif /* not __GNUC_VA_LIST */ - -/* If this is for internal libc use, don't define anything but - __gnuc_va_list. */ -#if defined (_STDARG_H) || defined (_VARARGS_H) -#define __gnuc_va_start(AP) (AP = (__gnuc_va_list)__builtin_saveregs()) -#define __va_ellipsis ... - -#ifdef _STDARG_H -#define va_start(AP, LASTARG) \ - (__builtin_next_arg (LASTARG), __gnuc_va_start (AP)) -#else -#define va_alist __builtin_va_alist -#define va_dcl int __builtin_va_alist; __va_ellipsis -#define va_start(AP) AP=(char *) &__builtin_va_alist -#endif - -/* Now stuff common to both varargs & stdarg implementations. */ -#define __va_rounded_size(TYPE) \ - (((sizeof (TYPE) + sizeof (int) - 1) / sizeof (int)) * sizeof (int)) -#undef va_end -void va_end (__gnuc_va_list); -#define va_end(AP) ((void)0) -#define va_arg(AP, TYPE) \ - (sizeof (TYPE) > 8 \ - ? (AP = (__gnuc_va_list) ((char *) (AP) + __va_rounded_size (char *)),\ - **((TYPE **) (void *) ((char *) (AP) - __va_rounded_size (char *))))\ - : (AP = (__gnuc_va_list) ((char *) (AP) + __va_rounded_size (TYPE)), \ - *((TYPE *) (void *) ((char *) (AP) - __va_rounded_size (TYPE))))) -#endif diff --git a/contrib/gcc/ginclude/va-pa.h b/contrib/gcc/ginclude/va-pa.h deleted file mode 100644 index 4865f6bfac08..000000000000 --- a/contrib/gcc/ginclude/va-pa.h +++ /dev/null @@ -1,52 +0,0 @@ - -/* Define __gnuc_va_list. */ - -#ifndef __GNUC_VA_LIST -#define __GNUC_VA_LIST - -typedef void *__gnuc_va_list; -#endif /* not __GNUC_VA_LIST */ - -/* If this is for internal libc use, don't define anything but - __gnuc_va_list. */ -#if defined (_STDARG_H) || defined (_VARARGS_H) -#if __GNUC__ > 1 -#define __va_ellipsis ... -#define __gnuc_va_start(AP) ((AP) = (va_list)__builtin_saveregs()) -#else -#define va_alist __va_a__, __va_b__, __va_c__, __va_d__ -#define __va_ellipsis -#define __gnuc_va_start(AP)\ - (AP) = (double *) &__va_a__, &__va_b__, &__va_c__, &__va_d__, \ - (AP) = (double *)((char *)(AP) + 4) -#endif /* __GNUC__ > 1 */ - -/* Call __builtin_next_arg even though we aren't using its value, so that - we can verify that LASTARG is correct. */ -#ifdef _STDARG_H -#define va_start(AP,LASTARG) \ - (__builtin_next_arg (LASTARG), __gnuc_va_start (AP)) -#else -/* The ... causes current_function_varargs to be set in cc1. */ -#define va_dcl long va_alist; __va_ellipsis -#define va_start(AP) __gnuc_va_start (AP) -#endif - -#define va_arg(AP,TYPE) \ - (*(sizeof(TYPE) > 8 ? \ - ((AP = (__gnuc_va_list) ((char *)AP - sizeof (int))), \ - (((TYPE *) (void *) (*((int *) (AP)))))) \ - :((AP = \ - (__gnuc_va_list) ((long)((char *)AP - sizeof (TYPE)) \ - & (sizeof(TYPE) > 4 ? ~0x7 : ~0x3))), \ - (((TYPE *) (void *) ((char *)AP + ((8 - sizeof(TYPE)) % 4))))))) - -#ifndef va_end -void va_end (__gnuc_va_list); /* Defined in libgcc.a */ -#endif -#define va_end(AP) ((void)0) - -/* Copy __gnuc_va_list into another variable of this type. */ -#define __va_copy(dest, src) (dest) = (src) - -#endif /* defined (_STDARG_H) || defined (_VARARGS_H) */ diff --git a/contrib/gcc/ginclude/va-ppc.h b/contrib/gcc/ginclude/va-ppc.h deleted file mode 100644 index de299b59cf9f..000000000000 --- a/contrib/gcc/ginclude/va-ppc.h +++ /dev/null @@ -1,255 +0,0 @@ -/* GNU C varargs support for the PowerPC with either the V.4 or Windows NT calling sequences */ - -#ifndef _WIN32 -/* System V.4 support */ -/* Define __gnuc_va_list. */ - -#ifndef __GNUC_VA_LIST -#define __GNUC_VA_LIST - -#ifndef _SYS_VA_LIST_H -#define _SYS_VA_LIST_H /* Solaris sys/va_list.h */ - -/* Solaris decided to rename overflow_arg_area to input_arg_area, - so handle it via a macro. */ -#define __va_overflow(AP) (AP)->overflow_arg_area - -/* Note that the names in this structure are in the user's namespace, but - that the V.4 abi explicitly states that these names should be used. */ -typedef struct __va_list_tag { - unsigned char gpr; /* index into the array of 8 GPRs stored in the - register save area gpr=0 corresponds to r3, - gpr=1 to r4, etc. */ - unsigned char fpr; /* index into the array of 8 FPRs stored in the - register save area fpr=0 corresponds to f1, - fpr=1 to f2, etc. */ - char *overflow_arg_area; /* location on stack that holds the next - overflow argument */ - char *reg_save_area; /* where r3:r10 and f1:f8, if saved are stored */ -} __va_list[1], __gnuc_va_list[1]; - -#else /* _SYS_VA_LIST */ - -typedef __va_list __gnuc_va_list; -#define __va_overflow(AP) (AP)->input_arg_area - -#endif /* not _SYS_VA_LIST */ -#endif /* not __GNUC_VA_LIST */ - -/* If this is for internal libc use, don't define anything but - __gnuc_va_list. */ -#if defined (_STDARG_H) || defined (_VARARGS_H) - -/* Register save area located below the frame pointer */ -#ifndef __VA_PPC_H__ -#define __VA_PPC_H__ -typedef struct { - long __gp_save[8]; /* save area for GP registers */ - double __fp_save[8]; /* save area for FP registers */ -} __va_regsave_t; - -/* Macros to access the register save area */ -/* We cast to void * and then to TYPE * because this avoids - a warning about increasing the alignment requirement. */ -#define __VA_FP_REGSAVE(AP,OFS,TYPE) \ - ((TYPE *) (void *) (&(((__va_regsave_t *) \ - (AP)->reg_save_area)->__fp_save[OFS]))) - -#define __VA_GP_REGSAVE(AP,OFS,TYPE) \ - ((TYPE *) (void *) (&(((__va_regsave_t *) \ - (AP)->reg_save_area)->__gp_save[OFS]))) - -/* Common code for va_start for both varargs and stdarg. We allow all - the work to be done by __builtin_saveregs. It returns a pointer to - a va_list that was constructed on the stack; we must simply copy it - to the user's variable. */ - -#define __va_start_common(AP, FAKE) \ - __builtin_memcpy ((AP), __builtin_saveregs (), sizeof(__gnuc_va_list)) - -#ifdef _STDARG_H /* stdarg.h support */ - -/* Calling __builtin_next_arg gives the proper error message if LASTARG is - not indeed the last argument. */ -#define va_start(AP,LASTARG) \ - (__builtin_next_arg (LASTARG), __va_start_common (AP, 0)) - -#else /* varargs.h support */ - -#define va_start(AP) __va_start_common (AP, 1) -#define va_alist __va_1st_arg -#define va_dcl register int va_alist; ... - -#endif /* _STDARG_H */ - -#ifdef _SOFT_FLOAT -#define __va_float_p(TYPE) 0 -#else -#define __va_float_p(TYPE) (__builtin_classify_type(*(TYPE *)0) == 8) -#endif - -#define __va_aggregate_p(TYPE) (__builtin_classify_type(*(TYPE *)0) >= 12) -#define __va_size(TYPE) ((sizeof(TYPE) + sizeof (long) - 1) / sizeof (long)) - -/* This symbol isn't defined. It is used to flag type promotion violations - at link time. We can only do this when optimizing. Use __builtin_trap - instead of abort so that we don't require a prototype for abort. - - __builtin_trap stuff is not available on the gcc-2.95 branch, so we just - avoid calling it for now. */ - -#ifdef __OPTIMIZE__ -extern void __va_arg_type_violation(void) __attribute__((__noreturn__)); -#else -#define __va_arg_type_violation() -#endif - -#define va_arg(AP,TYPE) \ -__extension__ (*({ \ - register TYPE *__ptr; \ - \ - if (__va_float_p (TYPE) && sizeof (TYPE) < 16) \ - { \ - unsigned char __fpr = (AP)->fpr; \ - if (__fpr < 8) \ - { \ - __ptr = __VA_FP_REGSAVE (AP, __fpr, TYPE); \ - (AP)->fpr = __fpr + 1; \ - } \ - else if (sizeof (TYPE) == 8) \ - { \ - unsigned long __addr = (unsigned long) (__va_overflow (AP)); \ - __ptr = (TYPE *)((__addr + 7) & -8); \ - __va_overflow (AP) = (char *)(__ptr + 1); \ - } \ - else \ - { \ - /* float is promoted to double. */ \ - __va_arg_type_violation (); \ - } \ - } \ - \ - /* Aggregates and long doubles are passed by reference. */ \ - else if (__va_aggregate_p (TYPE) || __va_float_p (TYPE)) \ - { \ - unsigned char __gpr = (AP)->gpr; \ - if (__gpr < 8) \ - { \ - __ptr = * __VA_GP_REGSAVE (AP, __gpr, TYPE *); \ - (AP)->gpr = __gpr + 1; \ - } \ - else \ - { \ - TYPE **__pptr = (TYPE **) (__va_overflow (AP)); \ - __ptr = * __pptr; \ - __va_overflow (AP) = (char *) (__pptr + 1); \ - } \ - } \ - \ - /* Only integrals remaining. */ \ - else \ - { \ - /* longlong is aligned. */ \ - if (sizeof (TYPE) == 8) \ - { \ - unsigned char __gpr = (AP)->gpr; \ - if (__gpr < 7) \ - { \ - __gpr += __gpr & 1; \ - __ptr = __VA_GP_REGSAVE (AP, __gpr, TYPE); \ - (AP)->gpr = __gpr + 2; \ - } \ - else \ - { \ - unsigned long __addr = (unsigned long) (__va_overflow (AP)); \ - __ptr = (TYPE *)((__addr + 7) & -8); \ - (AP)->gpr = 8; \ - __va_overflow (AP) = (char *)(__ptr + 1); \ - } \ - } \ - else if (sizeof (TYPE) == 4) \ - { \ - unsigned char __gpr = (AP)->gpr; \ - if (__gpr < 8) \ - { \ - __ptr = __VA_GP_REGSAVE (AP, __gpr, TYPE); \ - (AP)->gpr = __gpr + 1; \ - } \ - else \ - { \ - __ptr = (TYPE *) __va_overflow (AP); \ - __va_overflow (AP) = (char *)(__ptr + 1); \ - } \ - } \ - else \ - { \ - /* Everything else was promoted to int. */ \ - __va_arg_type_violation (); \ - } \ - } \ - __ptr; \ -})) - -#define va_end(AP) ((void)0) - -/* Copy __gnuc_va_list into another variable of this type. */ -#define __va_copy(dest, src) *(dest) = *(src) - -#endif /* __VA_PPC_H__ */ -#endif /* defined (_STDARG_H) || defined (_VARARGS_H) */ - - -#else -/* Windows NT */ -/* Define __gnuc_va_list. */ - -#ifndef __GNUC_VA_LIST -#define __GNUC_VA_LIST -typedef char *__gnuc_va_list; -#endif /* not __GNUC_VA_LIST */ - -/* If this is for internal libc use, don't define anything but - __gnuc_va_list. */ -#if defined (_STDARG_H) || defined (_VARARGS_H) - -#define __va_start_common(AP, LASTARG, FAKE) \ - ((__builtin_saveregs ()), ((AP) = ((char *) &LASTARG) + __va_rounded_size (AP)), 0) - -#ifdef _STDARG_H /* stdarg.h support */ - -/* Calling __builtin_next_arg gives the proper error message if LASTARG is - not indeed the last argument. */ -#define va_start(AP,LASTARG) \ - (__builtin_saveregs (), \ - (AP) = __builtin_next_arg (LASTARG), \ - 0) - -#else /* varargs.h support */ - -#define va_start(AP) \ - (__builtin_saveregs (), \ - (AP) = __builtin_next_arg (__va_1st_arg) - sizeof (int), \ - 0) - -#define va_alist __va_1st_arg -#define va_dcl register int __va_1st_arg; ... - -#endif /* _STDARG_H */ - -#define __va_rounded_size(TYPE) ((sizeof (TYPE) + 3) & ~3) -#define __va_align(AP, TYPE) \ - ((((unsigned long)(AP)) + ((sizeof (TYPE) >= 8) ? 7 : 3)) \ - & ~((sizeof (TYPE) >= 8) ? 7 : 3)) - -#define va_arg(AP,TYPE) \ -( *(TYPE *)((AP = (char *) (__va_align(AP, TYPE) \ - + __va_rounded_size(TYPE))) \ - - __va_rounded_size(TYPE))) - -#define va_end(AP) ((void)0) - -/* Copy __gnuc_va_list into another variable of this type. */ -#define __va_copy(dest, src) (dest) = (src) - -#endif /* defined (_STDARG_H) || defined (_VARARGS_H) */ -#endif /* Windows NT */ diff --git a/contrib/gcc/ginclude/va-pyr.h b/contrib/gcc/ginclude/va-pyr.h deleted file mode 100644 index 5ad4ba9d763e..000000000000 --- a/contrib/gcc/ginclude/va-pyr.h +++ /dev/null @@ -1,130 +0,0 @@ -/** - * - * Varargs for PYR/GNU CC - * - * WARNING -- WARNING -- DANGER - * - * The code in this file implements varargs for gcc on a pyr in - * a way that is compatible with code compiled by the Pyramid Technology - * C compiler. - * As such, it depends strongly on the Pyramid conventions for - * parameter passing.ct and independent implementation. - * These (somewhat bizarre) parameter-passing conventions are described - * in the ``OSx Operating System Porting Guide''. - * - * A quick summary is useful: - * 12 of the 48 register-windowed regs available for - * parameter passing. Parameters of a function call that are eligible - * to be passed in registers are assigned registers from TR0/PR0 onwards; - * all other arguments are passed on the stack. - * Structure and union parameters are *never* passed in registers, - * even if they are small enough to fit. They are always passed on - * the stack. - * - * Double-sized parameters cannot be passed in TR11, because - * TR12 is not used for passing parameters. If, in the absence of this - * rule, a double-sized param would have been passed in TR11, - * that parameter is passed on the stack and no parameters are - * passed in TR11. - * - * It is only known to work for passing 32-bit integer quantities - * (ie chars, shorts, ints/enums, longs), doubles, or pointers. - * Passing structures on a Pyramid via varargs is a loser. - * Passing an object larger than 8 bytes on a pyramid via varargs may - * also be a loser. - * - */ - - -/* - * pointer to next stack parameter in __va_buf[0] - * pointer to next parameter register in __va_buf[1] - * Count of registers seen at __va_buf[2] - * saved pr0..pr11 in __va_buf[3..14] - * # of calls to va_arg (debugging) at __va_buf[15] - */ - -/* Define __gnuc_va_list. */ - -#ifndef __GNUC_VA_LIST -#define __GNUC_VA_LIST - -typedef void *__voidptr; -#if 1 - -typedef struct __va_regs { - __voidptr __stackp,__regp,__count; - __voidptr __pr0,__pr1,__pr2,__pr3,__pr4,__pr5,__pr6,__pr7,__pr8,__pr9,__pr10,__pr11; - } __va_regs; - -typedef __va_regs __va_buf; -#else - -/* __va_buf[0] = address of next arg passed on the stack - __va_buf[1] = address of next arg passed in a register - __va_buf[2] = register-# of next arg passed in a register - */ -typedef __voidptr(*__va_buf); - -#endif - -typedef __va_buf __gnuc_va_list; - -#endif /* not __GNUC_VA_LIST */ - -/* If this is for internal libc use, don't define anything but - __gnuc_va_list. */ -#if defined (_STDARG_H) || defined (_VARARGS_H) - -/* 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 \ - __va0,__va1,__va2,__va3,__va4,__va5,__va6,__va7,__va8,__va9,__va10,__va11, \ - __builtin_va_alist - -/* The ... causes current_function_varargs to be set in cc1. */ -#define va_dcl __voidptr va_alist; __va_ellipsis - - -/* __asm ("rcsp %0" : "=r" ( _AP [0]));*/ - -#define va_start(_AP) \ - _AP = ((struct __va_regs) { \ - &(_AP.__pr0), (void*)&__builtin_va_alist, (void*)0, \ - __va0,__va1,__va2,__va3,__va4,__va5, \ - __va6,__va7,__va8,__va9,__va10,__va11}) - - -/* Avoid errors if compiling GCC v2 with GCC v1. */ -#if __GNUC__ == 1 -#define __extension__ -#endif - -/* We cast to void * and then to TYPE * because this avoids - a warning about increasing the alignment requirement. */ -#define va_arg(_AP, _MODE) \ -__extension__ \ -(*({__voidptr *__ap = (__voidptr*)&_AP; \ - register int __size = sizeof (_MODE); \ - register int __onstack = \ - (__size > 8 || ( (int)(__ap[2]) > 11) || \ - (__size==8 && (int)(__ap[2])==11)); \ - register int* __param_addr = ((int*)((__ap) [__onstack])); \ - \ - ((void *)__ap[__onstack])+=__size; \ - if (__onstack==0 || (int)(__ap[2])==11) \ - __ap[2]+= (__size >> 2); \ - (( _MODE *) (void *) __param_addr); \ -})) - -void va_end (__gnuc_va_list); /* Defined in libgcc.a */ -#define va_end(_X) ((void)0) - -#endif /* defined (_STDARG_H) || defined (_VARARGS_H) */ diff --git a/contrib/gcc/ginclude/va-sh.h b/contrib/gcc/ginclude/va-sh.h deleted file mode 100644 index dc4e3ae8079f..000000000000 --- a/contrib/gcc/ginclude/va-sh.h +++ /dev/null @@ -1,229 +0,0 @@ -/* The ! __SH3E_VARG case is similar to the default gvarargs.h . */ - -#if (defined (__SH3E__) || defined (__SH4_SINGLE__) || defined (__SH4__) || defined (__SH4_SINGLE_ONLY__)) && ! defined (__HITACHI__) -#define __SH3E_VARG -#endif - -/* Define __gnuc_va_list. */ - -#ifndef __GNUC_VA_LIST -#define __GNUC_VA_LIST - -#ifdef __SH3E_VARG - -typedef long __va_greg; -typedef float __va_freg; - -typedef struct { - __va_greg * __va_next_o; /* next available register */ - __va_greg * __va_next_o_limit; /* past last available register */ - __va_freg * __va_next_fp; /* next available fp register */ - __va_freg * __va_next_fp_limit; /* last available fp register */ - __va_greg * __va_next_stack; /* next extended word on stack */ -} __gnuc_va_list; - -#else /* ! SH3E */ - -typedef void *__gnuc_va_list; - -#endif /* ! SH3E */ - -#endif /* __GNUC_VA_LIST */ - -/* If this is for internal libc use, don't define anything but - __gnuc_va_list. */ -#if defined (_STDARG_H) || defined (_VARARGS_H) - -#ifdef _STDARG_H - -#ifdef __SH3E_VARG - -#define va_start(AP, LASTARG) \ -__extension__ \ - ({ \ - (AP).__va_next_fp = (__va_freg *) __builtin_saveregs (); \ - (AP).__va_next_fp_limit = ((AP).__va_next_fp + \ - (__builtin_args_info (1) < 8 ? 8 - __builtin_args_info (1) : 0)); \ - (AP).__va_next_o = (__va_greg *) (AP).__va_next_fp_limit; \ - (AP).__va_next_o_limit = ((AP).__va_next_o + \ - (__builtin_args_info (0) < 4 ? 4 - __builtin_args_info (0) : 0)); \ - (AP).__va_next_stack = (__va_greg *) __builtin_next_arg (LASTARG); \ - }) - -#else /* ! SH3E */ - -#define va_start(AP, LASTARG) \ - ((AP) = ((__gnuc_va_list) __builtin_next_arg (LASTARG))) - -#endif /* ! SH3E */ - -#else /* _VARARGS_H */ - -#define va_alist __builtin_va_alist -#define va_dcl int __builtin_va_alist;... - -#ifdef __SH3E_VARG - -#define va_start(AP) \ -__extension__ \ - ({ \ - (AP).__va_next_fp = (__va_freg *) __builtin_saveregs (); \ - (AP).__va_next_fp_limit = ((AP).__va_next_fp + \ - (__builtin_args_info (1) < 8 ? 8 - __builtin_args_info (1) : 0)); \ - (AP).__va_next_o = (__va_greg *) (AP).__va_next_fp_limit; \ - (AP).__va_next_o_limit = ((AP).__va_next_o + \ - (__builtin_args_info (0) < 4 ? 4 - __builtin_args_info (0) : 0)); \ - (AP).__va_next_stack \ - = ((__va_greg *) __builtin_next_arg (__builtin_va_alist) \ - - (__builtin_args_info (0) >= 4 || __builtin_args_info (1) >= 8 \ - ? 1 : 0)); \ - }) - -#else /* ! SH3E */ - -#define va_start(AP) ((AP) = (char *) &__builtin_va_alist) - -#endif /* ! SH3E */ - -#endif /* _STDARG */ - -#ifndef va_end -void va_end (__gnuc_va_list); /* Defined in libgcc.a */ - -/* Values returned by __builtin_classify_type. */ - -enum __va_type_classes { - __no_type_class = -1, - __void_type_class, - __integer_type_class, - __char_type_class, - __enumeral_type_class, - __boolean_type_class, - __pointer_type_class, - __reference_type_class, - __offset_type_class, - __real_type_class, - __complex_type_class, - __function_type_class, - __method_type_class, - __record_type_class, - __union_type_class, - __array_type_class, - __string_type_class, - __set_type_class, - __file_type_class, - __lang_type_class -}; - -#endif -#define va_end(pvar) ((void)0) - -#ifdef __LITTLE_ENDIAN__ -#define __LITTLE_ENDIAN_P 1 -#else -#define __LITTLE_ENDIAN_P 0 -#endif - -#define __SCALAR_TYPE(TYPE) \ - ((TYPE) == __integer_type_class \ - || (TYPE) == __char_type_class \ - || (TYPE) == __enumeral_type_class) - -/* RECORD_TYPE args passed using the C calling convention are - passed by invisible reference. ??? RECORD_TYPE args passed - in the stack are made to be word-aligned; for an aggregate that is - not word-aligned, we advance the pointer to the first non-reg slot. */ - - /* When this is a smaller-than-int integer, using - auto-increment in the promoted (SImode) is fastest; - however, there is no way to express that is C. Therefore, - we use an asm. - We want the MEM_IN_STRUCT_P bit set in the emitted RTL, therefore we - use unions even when it would otherwise be unnecessary. */ - -/* gcc has an extension that allows to use a casted lvalue as an lvalue, - But it doesn't work in C++ with -pedantic - even in the presence of - __extension__ . We work around this problem by using a reference type. */ -#ifdef __cplusplus -#define __VA_REF & -#else -#define __VA_REF -#endif - -#define __va_arg_sh1(AP, TYPE) __extension__ \ -({(sizeof (TYPE) == 1 \ - ? ({union {TYPE t; char c;} __t; \ - __asm("" \ - : "=r" (__t.c) \ - : "0" ((((union { int i, j; } *__VA_REF) (AP))++)->i)); \ - __t.t;}) \ - : sizeof (TYPE) == 2 \ - ? ({union {TYPE t; short s;} __t; \ - __asm("" \ - : "=r" (__t.s) \ - : "0" ((((union { int i, j; } *__VA_REF) (AP))++)->i)); \ - __t.t;}) \ - : sizeof (TYPE) >= 4 || __LITTLE_ENDIAN_P \ - ? (((union { TYPE t; int i;} *__VA_REF) (AP))++)->t \ - : ((union {TYPE t;TYPE u;}*) ((char *)++(int *__VA_REF)(AP) - sizeof (TYPE)))->t);}) - -#ifdef __SH3E_VARG - -#define __PASS_AS_FLOAT(TYPE_CLASS,SIZE) \ - (TYPE_CLASS == __real_type_class && SIZE == 4) - -#define __TARGET_SH4_P 0 - -#if defined(__SH4__) || defined(__SH4_SINGLE__) -#undef __PASS_AS_FLOAT -#define __PASS_AS_FLOAT(TYPE_CLASS,SIZE) \ - (TYPE_CLASS == __real_type_class && SIZE <= 8 \ - || TYPE_CLASS == __complex_type_class && SIZE <= 16) -#undef __TARGET_SH4_P -#define __TARGET_SH4_P 1 -#endif - -#define va_arg(pvar,TYPE) \ -__extension__ \ -({int __type = __builtin_classify_type (* (TYPE *) 0); \ - void * __result_p; \ - if (__PASS_AS_FLOAT (__type, sizeof(TYPE))) \ - { \ - if ((pvar).__va_next_fp < (pvar).__va_next_fp_limit) \ - { \ - if (((__type == __real_type_class && sizeof (TYPE) > 4)\ - || sizeof (TYPE) > 8) \ - && (((int) (pvar).__va_next_fp ^ (int) (pvar).__va_next_fp_limit)\ - & 4)) \ - (pvar).__va_next_fp++; \ - __result_p = &(pvar).__va_next_fp; \ - } \ - else \ - __result_p = &(pvar).__va_next_stack; \ - } \ - else \ - { \ - if ((pvar).__va_next_o + ((sizeof (TYPE) + 3) / 4) \ - <= (pvar).__va_next_o_limit) \ - __result_p = &(pvar).__va_next_o; \ - else \ - { \ - if (sizeof (TYPE) > 4) \ - if (! __TARGET_SH4_P) \ - (pvar).__va_next_o = (pvar).__va_next_o_limit; \ - \ - __result_p = &(pvar).__va_next_stack; \ - } \ - } \ - __va_arg_sh1(*(void **)__result_p, TYPE);}) - -#else /* ! SH3E */ - -#define va_arg(AP, TYPE) __va_arg_sh1((AP), TYPE) - -#endif /* SH3E */ - -/* Copy __gnuc_va_list into another variable of this type. */ -#define __va_copy(dest, src) ((dest) = (src)) - -#endif /* defined (_STDARG_H) || defined (_VARARGS_H) */ diff --git a/contrib/gcc/ginclude/va-sparc.h b/contrib/gcc/ginclude/va-sparc.h deleted file mode 100644 index 73c9de1cd9a0..000000000000 --- a/contrib/gcc/ginclude/va-sparc.h +++ /dev/null @@ -1,165 +0,0 @@ -/* This is just like the default gvarargs.h - except for differences described below. */ - -/* Define __gnuc_va_list. */ - -#ifndef __GNUC_VA_LIST -#define __GNUC_VA_LIST -#if ! defined (__svr4__) && ! defined (__linux__) && ! defined (__arch64__) -/* This has to be a char * to be compatible with Sun. - i.e., we have to pass a `va_list' to vsprintf. */ -typedef char * __gnuc_va_list; -#else -/* This has to be a void * to be compatible with Sun svr4. - i.e., we have to pass a `va_list' to vsprintf. */ -typedef void * __gnuc_va_list; -#endif -#endif /* not __GNUC_VA_LIST */ - -/* If this is for internal libc use, don't define anything but - __gnuc_va_list. */ -#if defined (_STDARG_H) || defined (_VARARGS_H) - -#ifdef _STDARG_H - -/* Call __builtin_next_arg even though we aren't using its value, so that - we can verify that LASTARG is correct. */ -#if defined (__GCC_NEW_VARARGS__) || defined (__arch64__) -#define va_start(AP, LASTARG) \ - (__builtin_next_arg (LASTARG), AP = (char *) __builtin_saveregs ()) -#else -#define va_start(AP, LASTARG) \ - (__builtin_saveregs (), AP = ((char *) __builtin_next_arg (LASTARG))) -#endif - -#else - -#define va_alist __builtin_va_alist -#define va_dcl int __builtin_va_alist;... - -#if defined (__GCC_NEW_VARARGS__) || defined (__arch64__) -#define va_start(AP) ((AP) = (char *) __builtin_saveregs ()) -#else -#define va_start(AP) \ - (__builtin_saveregs (), (AP) = ((char *) &__builtin_va_alist)) -#endif - -#endif - -#ifndef va_end -void va_end (__gnuc_va_list); /* Defined in libgcc.a */ - -/* Values returned by __builtin_classify_type. */ - -enum __va_type_classes { - __no_type_class = -1, - __void_type_class, - __integer_type_class, - __char_type_class, - __enumeral_type_class, - __boolean_type_class, - __pointer_type_class, - __reference_type_class, - __offset_type_class, - __real_type_class, - __complex_type_class, - __function_type_class, - __method_type_class, - __record_type_class, - __union_type_class, - __array_type_class, - __string_type_class, - __set_type_class, - __file_type_class, - __lang_type_class -}; - -#endif -#define va_end(pvar) ((void)0) - -/* Avoid errors if compiling GCC v2 with GCC v1. */ -#if __GNUC__ == 1 -#define __extension__ -#endif - -/* RECORD_TYPE args passed using the C calling convention are - passed by invisible reference. ??? RECORD_TYPE args passed - in the stack are made to be word-aligned; for an aggregate that is - not word-aligned, we advance the pointer to the first non-reg slot. */ - -#ifdef __arch64__ - -typedef unsigned int __ptrint __attribute__ ((__mode__ (__DI__))); - -/* ??? TODO: little endian support */ - -#define va_arg(pvar, TYPE) \ -__extension__ \ -(*({int __type = __builtin_classify_type (* (TYPE *) 0); \ - char * __result; \ - if (__type == __real_type_class) /* float? */ \ - { \ - if (__alignof__ (TYPE) == 16) \ - (pvar) = (void *) (((__ptrint) (pvar) + 15) & -16); \ - __result = (pvar); \ - (pvar) = (char *) (pvar) + sizeof (TYPE); \ - } \ - else if (__type < __record_type_class) /* integer? */ \ - { \ - (pvar) = (char *) (pvar) + 8; \ - __result = (char *) (pvar) - sizeof (TYPE); \ - } \ - else /* aggregate object */ \ - { \ - if (sizeof (TYPE) <= 8) \ - { \ - __result = (pvar); \ - (pvar) = (char *) (pvar) + 8; \ - } \ - else if (sizeof (TYPE) <= 16) \ - { \ - if (__alignof__ (TYPE) == 16) \ - (pvar) = (void *) (((__ptrint) (pvar) + 15) & -16); \ - __result = (pvar); \ - (pvar) = (char *) (pvar) + 16; \ - } \ - else \ - { \ - __result = * (void **) (pvar); \ - (pvar) = (char *) (pvar) + 8; \ - } \ - } \ - (TYPE *) __result;})) - -#else /* not __arch64__ */ - -#define __va_rounded_size(TYPE) \ - (((sizeof (TYPE) + sizeof (int) - 1) / sizeof (int)) * sizeof (int)) - -/* We don't declare the union member `d' to have type TYPE - because that would lose in C++ if TYPE has a constructor. */ -/* We cast to void * and then to TYPE * because this avoids - a warning about increasing the alignment requirement. - The casts to char * avoid warnings about invalid pointer arithmetic. */ -#define va_arg(pvar,TYPE) \ -__extension__ \ -(*({((__builtin_classify_type (*(TYPE*) 0) >= __record_type_class \ - || (__builtin_classify_type (*(TYPE*) 0) == __real_type_class \ - && sizeof (TYPE) == 16)) \ - ? ((pvar) = (char *)(pvar) + __va_rounded_size (TYPE *), \ - *(TYPE **) (void *) ((char *)(pvar) - __va_rounded_size (TYPE *))) \ - : __va_rounded_size (TYPE) == 8 \ - ? ({ union {char __d[sizeof (TYPE)]; int __i[2];} __u; \ - __u.__i[0] = ((int *) (void *) (pvar))[0]; \ - __u.__i[1] = ((int *) (void *) (pvar))[1]; \ - (pvar) = (char *)(pvar) + 8; \ - (TYPE *) (void *) __u.__d; }) \ - : ((pvar) = (char *)(pvar) + __va_rounded_size (TYPE), \ - ((TYPE *) (void *) ((char *)(pvar) - __va_rounded_size (TYPE)))));})) - -#endif /* not __arch64__ */ - -/* Copy __gnuc_va_list into another variable of this type. */ -#define __va_copy(dest, src) (dest) = (src) - -#endif /* defined (_STDARG_H) || defined (_VARARGS_H) */ diff --git a/contrib/gcc/ginclude/va-spur.h b/contrib/gcc/ginclude/va-spur.h deleted file mode 100644 index 7457ceb9fcdb..000000000000 --- a/contrib/gcc/ginclude/va-spur.h +++ /dev/null @@ -1,64 +0,0 @@ -/* varargs.h for SPUR */ - -/* NB. This is NOT the definition needed for the new ANSI proposed - standard */ - - -struct __va_struct { char __regs[20]; }; - -#define va_alist __va_regs, __va_stack - -/* 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 - -/* The ... causes current_function_varargs to be set in cc1. */ -#define va_dcl struct __va_struct __va_regs; int __va_stack; - -typedef struct { - int __pnt; - char *__regs; - char *__stack; -} va_list; - -#define va_start(pvar) \ - ((pvar).__pnt = 0, (pvar).__regs = __va_regs.__regs, \ - (pvar).__stack = (char *) &__va_stack) -#define va_end(pvar) ((void)0) - -/* Avoid errors if compiling GCC v2 with GCC v1. */ -#if __GNUC__ == 1 -#define __extension__ -#endif - -#define va_arg(pvar,type) \ -__extension__ \ - (*({ type *__va_result; \ - if ((pvar).__pnt >= 20) { \ - __va_result = ( (type *) ((pvar).__stack + (pvar).__pnt - 20)); \ - (pvar).__pnt += (sizeof(type) + 7) & ~7; \ - } \ - else if ((pvar).__pnt + sizeof(type) > 20) { \ - __va_result = (type *) (pvar).__stack; \ - (pvar).__pnt = 20 + ( (sizeof(type) + 7) & ~7); \ - } \ - else if (sizeof(type) == 8) { \ - union {double d; int i[2];} __u; \ - __u.i[0] = *(int *) ((pvar).__regs + (pvar).__pnt); \ - __u.i[1] = *(int *) ((pvar).__regs + (pvar).__pnt + 4); \ - __va_result = (type *) &__u; \ - (pvar).__pnt += 8; \ - } \ - else { \ - __va_result = (type *) ((pvar).__regs + (pvar).__pnt); \ - (pvar).__pnt += (sizeof(type) + 3) & ~3; \ - } \ - __va_result; })) - -/* Copy __gnuc_va_list into another variable of this type. */ -#define __va_copy(dest, src) (dest) = (src) diff --git a/contrib/gcc/ginclude/va-v850.h b/contrib/gcc/ginclude/va-v850.h deleted file mode 100644 index 96da6d5a3dea..000000000000 --- a/contrib/gcc/ginclude/va-v850.h +++ /dev/null @@ -1,34 +0,0 @@ -/* Define __gnuc_va_list. */ - -#ifndef __GNUC_VA_LIST -#define __GNUC_VA_LIST -typedef void *__gnuc_va_list; -#endif /* not __GNUC_VA_LIST */ - -/* If this is for internal libc use, don't define anything but - __gnuc_va_list. */ -#if defined (_STDARG_H) || defined (_VARARGS_H) - -#ifdef _STDARG_H -#define va_start(AP, LASTARG) \ - (AP = ((__gnuc_va_list) __builtin_next_arg (LASTARG))) -#else -#define __va_ellipsis ... -#define va_alist __builtin_va_alist -#define va_dcl int __builtin_va_alist; __va_ellipsis -#define va_start(AP) AP=(char *) &__builtin_va_alist -#endif - -/* Now stuff common to both varargs & stdarg implementations. */ -#define __va_rounded_size(TYPE) \ - (((sizeof (TYPE) + sizeof (int) - 1) / sizeof (int)) * sizeof (int)) -#undef va_end -void va_end (__gnuc_va_list); -#define va_end(AP) ((void)0) -#define va_arg(AP, TYPE) \ - (sizeof (TYPE) > 8 \ - ? (AP = (__gnuc_va_list) ((char *) (AP) + __va_rounded_size (char *)),\ - **((TYPE **) (void *) ((char *) (AP) - __va_rounded_size (char *))))\ - : (AP = (__gnuc_va_list) ((char *) (AP) + __va_rounded_size (TYPE)), \ - *((TYPE *) (void *) ((char *) (AP) - __va_rounded_size (TYPE))))) -#endif diff --git a/contrib/gcc/ginclude/varargs.h b/contrib/gcc/ginclude/varargs.h deleted file mode 100644 index bb9c98a7c305..000000000000 --- a/contrib/gcc/ginclude/varargs.h +++ /dev/null @@ -1,229 +0,0 @@ -/* Record that this is varargs.h; this turns off stdarg.h. */ - -#ifndef _VARARGS_H -#define _VARARGS_H - -#ifdef __sparc__ -#include "va-sparc.h" -#else -#ifdef __spur__ -#include "va-spur.h" -#else -#ifdef __mips__ -#include "va-mips.h" -#else -#ifdef __i860__ -#include "va-i860.h" -#else -#ifdef __pyr__ -#include "va-pyr.h" -#else -#ifdef __clipper__ -#include "va-clipper.h" -#else -#ifdef __m88k__ -#include "va-m88k.h" -#else -#if defined(__hppa__) || defined(hp800) -#include "va-pa.h" -#else -#ifdef __i960__ -#include "va-i960.h" -#else -#ifdef __alpha__ -#include "va-alpha.h" -#else -#if defined (__H8300__) || defined (__H8300H__) || defined (__H8300S__) -#include "va-h8300.h" -#else -#if defined (__PPC__) && (defined (_CALL_SYSV) || defined (_WIN32)) -#include "va-ppc.h" -#else -#ifdef __arc__ -#include "va-arc.h" -#else -#ifdef __M32R__ -#include "va-m32r.h" -#else -#ifdef __sh__ -#include "va-sh.h" -#else -#ifdef __mn10300__ -#include "va-mn10300.h" -#else -#ifdef __mn10200__ -#include "va-mn10200.h" -#else -#ifdef __v850__ -#include "va-v850.h" -#else -#if defined (_TMS320C4x) || defined (_TMS320C3x) -#include <va-c4x.h> -#else - -#ifdef __NeXT__ - -/* On Next, erase any vestiges of stdarg.h. */ - -#ifdef _ANSI_STDARG_H_ -#define _VA_LIST_ -#endif -#define _ANSI_STDARG_H_ - -#undef va_alist -#undef va_dcl -#undef va_list -#undef va_start -#undef va_end -#undef __va_rounded_size -#undef va_arg -#endif /* __NeXT__ */ - -/* 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 - -/* These macros implement traditional (non-ANSI) varargs - for GNU C. */ - -#define va_alist __builtin_va_alist -/* The ... causes current_function_varargs to be set in cc1. */ -/* ??? We don't process attributes correctly in K&R argument context. */ -typedef int __builtin_va_alist_t __attribute__((__mode__(__word__))); -#define va_dcl __builtin_va_alist_t __builtin_va_alist; __va_ellipsis - -/* Define __gnuc_va_list, just as in gstdarg.h. */ - -#ifndef __GNUC_VA_LIST -#define __GNUC_VA_LIST -#if defined(__svr4__) || defined(_AIX) || defined(_M_UNIX) -typedef char *__gnuc_va_list; -#else -typedef void *__gnuc_va_list; -#endif -#endif - -#define va_start(AP) AP=(char *) &__builtin_va_alist - -#define va_end(AP) ((void)0) - -#if defined(sysV68) -#define __va_rounded_size(TYPE) \ - (((sizeof (TYPE) + sizeof (short) - 1) / sizeof (short)) * sizeof (short)) -#elif defined(_AIX) -#define __va_rounded_size(TYPE) \ - (((sizeof (TYPE) + sizeof (long) - 1) / sizeof (long)) * sizeof (long)) -#else -#define __va_rounded_size(TYPE) \ - (((sizeof (TYPE) + sizeof (int) - 1) / sizeof (int)) * sizeof (int)) -#endif - -#if (defined (__arm__) && ! defined (__ARMEB__)) || defined (__i386__) || defined (__i860__) || defined (__ns32000__) || defined (__vax__) -/* This is for little-endian machines; small args are padded upward. */ -#define va_arg(AP, TYPE) \ - (AP = (__gnuc_va_list) ((char *) (AP) + __va_rounded_size (TYPE)), \ - *((TYPE *) (void *) ((char *) (AP) - __va_rounded_size (TYPE)))) -#else /* big-endian */ -/* This is for big-endian machines; small args are padded downward. */ -#define va_arg(AP, TYPE) \ - (AP = (__gnuc_va_list) ((char *) (AP) + __va_rounded_size (TYPE)), \ - *((TYPE *) (void *) ((char *) (AP) \ - - ((sizeof (TYPE) < __va_rounded_size (char) \ - ? sizeof (TYPE) : __va_rounded_size (TYPE)))))) -#endif /* big-endian */ - -/* Copy __gnuc_va_list into another variable of this type. */ -#define __va_copy(dest, src) (dest) = (src) - -#endif /* not TMS320C3x or TMS320C4x */ -#endif /* not v850 */ -#endif /* not mn10200 */ -#endif /* not mn10300 */ -#endif /* not sh */ -#endif /* not m32r */ -#endif /* not arc */ -#endif /* not powerpc with V.4 calling sequence */ -#endif /* not h8300 */ -#endif /* not alpha */ -#endif /* not i960 */ -#endif /* not hppa */ -#endif /* not m88k */ -#endif /* not clipper */ -#endif /* not pyr */ -#endif /* not i860 */ -#endif /* not mips */ -#endif /* not spur */ -#endif /* not sparc */ -#endif /* not _VARARGS_H */ - -/* Define va_list from __gnuc_va_list. */ - -#ifdef _HIDDEN_VA_LIST /* On OSF1, this means varargs.h is "half-loaded". */ -#undef _VA_LIST -#endif - -#if defined(__svr4__) || (defined(_SCO_DS) && !defined(__VA_LIST)) -/* SVR4.2 uses _VA_LIST for an internal alias for va_list, - so we must avoid testing it and setting it here. - SVR4 uses _VA_LIST as a flag in stdarg.h, but we should - have no conflict with that. */ -#ifndef _VA_LIST_ -#define _VA_LIST_ -#ifdef __i860__ -#ifndef _VA_LIST -#define _VA_LIST va_list -#endif -#endif /* __i860__ */ -typedef __gnuc_va_list va_list; -#ifdef _SCO_DS -#define __VA_LIST -#endif -#endif /* _VA_LIST_ */ - -#else /* not __svr4__ || _SCO_DS */ - -/* The macro _VA_LIST_ is the same thing used by this file in Ultrix. - But on BSD NET2 we must not test or define or undef it. - (Note that the comments in NET 2's ansi.h - are incorrect for _VA_LIST_--see stdio.h!) */ -/* Michael Eriksson <mer@sics.se> at Thu Sep 30 11:00:57 1993: - Sequent defines _VA_LIST_ in <machine/machtypes.h> to be the type to - use for va_list (``typedef _VA_LIST_ va_list'') */ -#if !defined (_VA_LIST_) || defined (__BSD_NET2__) || defined (____386BSD____) || defined (__bsdi__) || defined (__sequent__) || defined (__FreeBSD__) || defined(WINNT) -/* The macro _VA_LIST_DEFINED is used in Windows NT 3.5 */ -#ifndef _VA_LIST_DEFINED -/* The macro _VA_LIST is used in SCO Unix 3.2. */ -#ifndef _VA_LIST -/* The macro _VA_LIST_T_H is used in the Bull dpx2 */ -#ifndef _VA_LIST_T_H -typedef __gnuc_va_list va_list; -#endif /* not _VA_LIST_T_H */ -#endif /* not _VA_LIST */ -#endif /* not _VA_LIST_DEFINED */ -#if !(defined (__BSD_NET2__) || defined (____386BSD____) || defined (__bsdi__) || defined (__sequent__) || defined (__FreeBSD__)) -#define _VA_LIST_ -#endif -#ifndef _VA_LIST -#define _VA_LIST -#endif -#ifndef _VA_LIST_DEFINED -#define _VA_LIST_DEFINED -#endif -#ifndef _VA_LIST_T_H -#define _VA_LIST_T_H -#endif - -#endif /* not _VA_LIST_, except on certain systems */ - -#endif /* not __svr4__ */ - -/* The next BSD release (if there is one) wants this symbol to be - undefined instead of _VA_LIST_. */ -#ifdef _BSD_VA_LIST -#undef _BSD_VA_LIST -#endif |