This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [MIPS] PR target/22209: Support TImode arithmetic on MIPS
- From: Richard Sandiford <richard at codesourcery dot com>
- To: Roger Sayle <roger at eyesopen dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 13 Feb 2006 15:07:37 +0000
- Subject: Re: [MIPS] PR target/22209: Support TImode arithmetic on MIPS
- References: <Pine.LNX.4.44.0602051423540.14834-100000@www.eyesopen.com>
Roger Sayle <roger@eyesopen.com> writes:
> Ok for mainline? This is also a regression in 4.1, but I'd
> hope that this could be tested on several MIPS targets before
> we decide whether or not to backport to the pending release
> branch.
OK, I've finally got a 64-bit MIPS GNU/Linux system up and running,
so I gave mainline a spin with this patch in. (It wasn't quite as
bad as a 72 hour Tru64 cycle, but it was very, very close.)
Anyway, it showed up a problem: the new config/*.c files were producing
empty object files. This is because IRIX and GNU/Linux use a different
long double format; the former uses paired doubles while the latter uses
normal 128-bit IEEE long doubles. The __LDBL_MANT_DIG__ == 106 checks
are therefore only correct for IRIX.
The functions in the new files should work equally well with IEEE long
doubles, so this patch extends the preprocessor condition accordingly.
Bootstrapped & regression tested on mips64-linux-gnu. Test results here:
http://gcc.gnu.org/ml/gcc-testresults/2006-02/msg00660.html
Obviously a bit of triage needed, but they're not catatrosphic.
OK to install?
Richard
* config/floatunditf.c: Use if __LDBL_MANT_DIG__ == 113.
* config/fixtfdi.c: Likewise.
* config/fixunstfdi.c: Likewise.
* config/floatditf.c: Likewise.
Index: gcc/config/floatunditf.c
===================================================================
--- gcc/config/floatunditf.c (revision 110832)
+++ gcc/config/floatunditf.c (working copy)
@@ -1,5 +1,5 @@
/* Public domain. */
-#if __LDBL_MANT_DIG__ == 106
+#if __LDBL_MANT_DIG__ == 106 || __LDBL_MANT_DIG__ == 113
typedef int DItype __attribute__ ((mode (DI)));
typedef int SItype __attribute__ ((mode (SI)));
typedef unsigned int UDItype __attribute__ ((mode (DI)));
Index: gcc/config/fixtfdi.c
===================================================================
--- gcc/config/fixtfdi.c (revision 110832)
+++ gcc/config/fixtfdi.c (working copy)
@@ -1,5 +1,5 @@
/* Public domain. */
-#if __LDBL_MANT_DIG__ == 106
+#if __LDBL_MANT_DIG__ == 106 || __LDBL_MANT_DIG__ == 113
typedef int DItype __attribute__ ((mode (DI)));
typedef float TFtype __attribute__ ((mode (TF)));
Index: gcc/config/fixunstfdi.c
===================================================================
--- gcc/config/fixunstfdi.c (revision 110832)
+++ gcc/config/fixunstfdi.c (working copy)
@@ -1,5 +1,5 @@
/* Public domain. */
-#if __LDBL_MANT_DIG__ == 106
+#if __LDBL_MANT_DIG__ == 106 || __LDBL_MANT_DIG__ == 113
typedef int DItype __attribute__ ((mode (DI)));
typedef int SItype __attribute__ ((mode (SI)));
typedef unsigned int UDItype __attribute__ ((mode (DI)));
Index: gcc/config/floatditf.c
===================================================================
--- gcc/config/floatditf.c (revision 110832)
+++ gcc/config/floatditf.c (working copy)
@@ -1,5 +1,5 @@
/* Public domain. */
-#if __LDBL_MANT_DIG__ == 106
+#if __LDBL_MANT_DIG__ == 106 || __LDBL_MANT_DIG__ == 113
typedef int DItype __attribute__ ((mode (DI)));
typedef int SItype __attribute__ ((mode (SI)));
typedef unsigned int UDItype __attribute__ ((mode (DI)));