diff options
Diffstat (limited to 'contrib/gcc/config/rs6000/darwin-ldouble.c')
-rw-r--r-- | contrib/gcc/config/rs6000/darwin-ldouble.c | 39 |
1 files changed, 28 insertions, 11 deletions
diff --git a/contrib/gcc/config/rs6000/darwin-ldouble.c b/contrib/gcc/config/rs6000/darwin-ldouble.c index 3174ebb..210f2d6 100644 --- a/contrib/gcc/config/rs6000/darwin-ldouble.c +++ b/contrib/gcc/config/rs6000/darwin-ldouble.c @@ -1,5 +1,5 @@ /* 128-bit long double support routines for Darwin. - Copyright (C) 1993, 2003, 2004 Free Software Foundation, Inc. + Copyright (C) 1993, 2003, 2004, 2005 Free Software Foundation, Inc. This file is part of GCC. @@ -48,7 +48,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA This code currently assumes big-endian. */ -#if !_SOFT_FLOAT && (defined (__MACH__) || defined (__powerpc64__)) +#if !_SOFT_FLOAT && (defined (__MACH__) || defined (__powerpc64__) || defined (_AIX)) #define fabs(x) __builtin_fabs(x) @@ -58,10 +58,27 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA but GCC currently generates poor code when a union is used to turn a long double into a pair of doubles. */ -extern long double _xlqadd (double, double, double, double); -extern long double _xlqsub (double, double, double, double); -extern long double _xlqmul (double, double, double, double); -extern long double _xlqdiv (double, double, double, double); +extern long double __gcc_qadd (double, double, double, double); +extern long double __gcc_qsub (double, double, double, double); +extern long double __gcc_qmul (double, double, double, double); +extern long double __gcc_qdiv (double, double, double, double); + +#if defined __ELF__ && defined IN_LIBGCC2_S +/* Provide definitions of the old symbol names to statisfy apps and + shared libs built against an older libgcc. To access the _xlq + symbols an explicit version reference is needed, so these won't + satisfy an unadorned reference like _xlqadd. If dot symbols are + not needed, the assembler will remove the aliases from the symbol + table. */ +__asm__ (".symver __gcc_qadd,_xlqadd@GCC_3.4\n\t" + ".symver __gcc_qsub,_xlqsub@GCC_3.4\n\t" + ".symver __gcc_qmul,_xlqmul@GCC_3.4\n\t" + ".symver __gcc_qdiv,_xlqdiv@GCC_3.4\n\t" + ".symver .__gcc_qadd,._xlqadd@GCC_3.4\n\t" + ".symver .__gcc_qsub,._xlqsub@GCC_3.4\n\t" + ".symver .__gcc_qmul,._xlqmul@GCC_3.4\n\t" + ".symver .__gcc_qdiv,._xlqdiv@GCC_3.4"); +#endif typedef union { @@ -73,7 +90,7 @@ static const double FPKINF = 1.0/0.0; /* Add two 'long double' values and return the result. */ long double -_xlqadd (double a, double b, double c, double d) +__gcc_qadd (double a, double b, double c, double d) { longDblUnion z; double t, tau, u, FPR_zero, FPR_PosInf; @@ -132,13 +149,13 @@ _xlqadd (double a, double b, double c, double d) } long double -_xlqsub (double a, double b, double c, double d) +__gcc_qsub (double a, double b, double c, double d) { - return _xlqadd (a, b, -c, -d); + return __gcc_qadd (a, b, -c, -d); } long double -_xlqmul (double a, double b, double c, double d) +__gcc_qmul (double a, double b, double c, double d) { longDblUnion z; double t, tau, u, v, w, FPR_zero, FPR_PosInf; @@ -169,7 +186,7 @@ _xlqmul (double a, double b, double c, double d) } long double -_xlqdiv (double a, double b, double c, double d) +__gcc_qdiv (double a, double b, double c, double d) { longDblUnion z; double s, sigma, t, tau, u, v, w, FPR_zero, FPR_PosInf; |