This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [cygwin patch] Enable Support for __float128 (TFmode) IEEE quad type


This patch enables support for the __float128 (TFmode) IEEE quad type in
libgcc on cygwin.  It uses the same approach as for IA-32 on darwin.

With this patch the tests gcc.dg/torture/fp-int-convert-float128*.c pass
on cygwin.  Previously the tests failed to link.  See:

OK for trunk, then 4.4.

2009-05-21 David Billinghurst <>

* config.gcc: Enable support for the __float128 (TFmode) for i?86-*-cygwin.

* Enable support for the __float128 (TFmode) for i?86-*-cygwin.

Index: gcc/config.gcc
--- gcc/config.gcc      (revision 147701)
+++ gcc/config.gcc      (working copy)
@@ -1267,7 +1267,7 @@
-       tmake_file="${tmake_file} ${tmake_eh_file} i386/t-cygming i386/t-cygwin"
+       tmake_file="${tmake_file} ${tmake_eh_file} i386/t-cygming i386/t-cygwin i386/t-fprules-softfp soft-fp/t-softfp"
        extra_options="${extra_options} i386/cygming.opt"
        extra_objs="winnt.o winnt-stubs.o"

soft-fp is added for other x86 targets in "miscellaneous part" of config.gcc. Assuming that soft-fp also works for mingw (it is trivial to add soft-fp nowadays ;), we can simply add:

i[34567]86-*-pe | i[34567]86-*-cygwin* | i[34567]86-*-mingw* | x86_64-*-mingw*)
tmake_file="${tmake_file} i386/t-fprules-softfp soft-fp/t-softfp"

to the "miscellaneous part" of config.gcc.

Index: libgcc/
--- libgcc/ (revision 147701)
+++ libgcc/ (working copy)
@@ -323,8 +323,12 @@
-i[34567]86-*-cygwin* | i[34567]86-*-mingw*)
extra_parts="crtbegin.o crtend.o crtfastmath.o"
+ tmake_file="i386/t-cygming i386/t-crtfm t-softfp i386/${host_address}/t-fprules-softfp"

i386/32/t-fprules-softfp actually filters out TImode conversions that are not valid on x86_32. Please note, that there is no i386/64/t-fprules-softp.
+       ;;
+       extra_parts="crtbegin.o crtend.o crtfastmath.o"
        tmake_file="i386/t-cygming i386/t-crtfm"

Please add windows targets to existing target groups. It will just work out-of-the-box.

I have attached (untested) patch that implements suggested approaches. I'm not able to test it on windows targets. If it bootstraps OK for you, then it is OK for mainline SVN. Technically, testsuite failures are all regressions, but this patch enables new functionality on cygwin targets, so you will have to discuss backport to 4.4 with cygwin maintainers.

Index: gcc/config.gcc
--- gcc/config.gcc	(revision 147792)
+++ gcc/config.gcc	(working copy)
@@ -3127,6 +3127,9 @@
 	i[34567]86-*-linux* | x86_64-*-linux* | i[34567]86-*-kfreebsd*-gnu | x86_64-*-kfreebsd*-gnu)
 		tmake_file="${tmake_file} i386/t-fprules-softfp soft-fp/t-softfp i386/t-linux"
+	i[34567]86-*-pe | i[34567]86-*-cygwin* | i[34567]86-*-mingw* | x86_64-*-mingw*)
+		tmake_file="${tmake_file} i386/t-fprules-softfp soft-fp/t-softfp"
+		;;
 		tmake_file="${tmake_file} ia64/t-fprules-softfp soft-fp/t-softfp"
Index: libgcc/
--- libgcc/	(revision 147792)
+++ libgcc/	(working copy)
@@ -562,7 +562,9 @@
 case ${host} in
 i[34567]86-*-darwin* | x86_64-*-darwin* | \
   i[34567]86-*-kfreebsd*-gnu | x86_64-*-kfreebsd*-gnu | \
-  i[34567]86-*-linux* | x86_64-*-linux*)
+  i[34567]86-*-linux* | x86_64-*-linux* |\
+  i[34567]86-*-pe | i[34567]86-*-cygwin* | \
+  i[34567]86-*-mingw* | x86_64-*-mingw*)
 	if test "${host_address}" = 32; then
 		tmake_file="${tmake_file} t-softfp i386/${host_address}/t-fprules-softfp"

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]