diff options
author | Roger Sayle <roger@eyesopen.com> | 2006-02-08 18:31:36 +0000 |
---|---|---|
committer | Roger Sayle <sayle@gcc.gnu.org> | 2006-02-08 18:31:36 +0000 |
commit | 3b8318052298eb22355dad37ff842d871c409b3d (patch) | |
tree | bebfda43f375ce069f89e1dac6ba8ece0221d385 /gcc/config/floatunditf.c | |
parent | 855dd2bcff9e32e053bf66e336405ded26e9c927 (diff) | |
download | gcc-3b8318052298eb22355dad37ff842d871c409b3d.zip gcc-3b8318052298eb22355dad37ff842d871c409b3d.tar.gz gcc-3b8318052298eb22355dad37ff842d871c409b3d.tar.bz2 |
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
Diffstat (limited to 'gcc/config/floatunditf.c')
-rw-r--r-- | gcc/config/floatunditf.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/gcc/config/floatunditf.c b/gcc/config/floatunditf.c new file mode 100644 index 0000000..27fa058 --- /dev/null +++ b/gcc/config/floatunditf.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 __floatunditf (UDItype); + +TFtype +__floatunditf (UDItype u) +{ + DFtype dh, dl; + + dh = (USItype) (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 + |