From 3b8318052298eb22355dad37ff842d871c409b3d Mon Sep 17 00:00:00 2001 From: Roger Sayle Date: Wed, 8 Feb 2006 18:31:36 +0000 Subject: re PR target/22209 (libgfortran unresolvable symbols on irix6.5) PR target/22209 * config/mips/mips.h (MIN_UNITS_PER_WORD): Don't define for libgcc. * config/mips/_tilib.c: Remove. * config/fixtfdi.c: New libgcc source file. * config/fixunstfdi.c: New source file. * config/floatditf.c: New source file. * config/floatunditf.c: New souce file. * config/mips/t-iris6 (LIB2FUNCS_EXTRA): Include the new source files above instead of config/mips/_tilib.c. * config/mips/t-linux64 (LIB2FUNCS_EXTRA): Likewise. From-SVN: r110760 --- gcc/config/floatditf.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 gcc/config/floatditf.c (limited to 'gcc/config/floatditf.c') diff --git a/gcc/config/floatditf.c b/gcc/config/floatditf.c new file mode 100644 index 0000000..7656f2d --- /dev/null +++ b/gcc/config/floatditf.c @@ -0,0 +1,25 @@ +/* Public domain. */ +#if __LDBL_MANT_DIG__ == 106 +typedef int DItype __attribute__ ((mode (DI))); +typedef int SItype __attribute__ ((mode (SI))); +typedef unsigned int UDItype __attribute__ ((mode (DI))); +typedef unsigned int USItype __attribute__ ((mode (SI))); +typedef float DFtype __attribute__ ((mode (DF))); +typedef float TFtype __attribute__ ((mode (TF))); + +TFtype __floatditf (UDItype); + +TFtype +__floatditf (UDItype u) +{ + DFtype dh, dl; + + dh = (SItype) (u >> (sizeof (SItype) * 8)); + dh *= 2.0 * (((UDItype) 1) << ((sizeof (SItype) * 8) - 1)); + dl = (USItype) (u & ((((UDItype) 1) << (sizeof (SItype) * 8)) - 1)); + + return (TFtype) dh + (TFtype) dl; +} + +#endif + -- cgit v1.1