PATCH: Add DFP TFmode conversions
H. J. Lu
hjl@lucon.org
Wed Jun 13 17:58:00 GMT 2007
On Wed, Jun 13, 2007 at 06:40:48PM +0200, Uros Bizjak wrote:
> H. J. Lu wrote:
> >--- gcc/config/i386/i386.h.float128 2007-06-12 05:45:21.000000000 -0700
> >+++ gcc/config/i386/i386.h 2007-06-13 07:33:09.000000000 -0700
> >@@ -2452,6 +2452,10 @@ struct machine_function GTY(())
> > #define SYMBOL_REF_DLLEXPORT_P(X) \
> > ((SYMBOL_REF_FLAGS (X) & SYMBOL_FLAG_DLLEXPORT) != 0)
> >
> >+/* Put all *tf routines in libgcc for 64bit. */
> >+#undef LIBGCC2_HAS_TF_MODE
> >+#define LIBGCC2_HAS_TF_MODE TARGET_64BIT
> >+
> >
>
> This part should go into linux64.h, as not all i386 targets support
> TFmode (echristo will add these lines to darwin target).
>
Here is the updated patch. OK to install?
H.J.
---
2007-06-13 H.J. Lu <hongjiu.lu@intel.com>
* Makefile.in (D32PBIT_FUNCS): Add _sd_to_tf and _tf_to_sd.
(D64PBIT_FUNCS): Add _dd_to_tf and _tf_to_dd.
(D128PBIT_FUNCS): Add _td_to_tf and _tf_to_td.
* config/dfp-bit.c: Empty for TFmode conversions.
* config/i386/linux64.h (LIBGCC2_HAS_TF_MODE): Defined.
--- gcc/Makefile.in.float128 2007-06-12 17:49:16.000000000 -0700
+++ gcc/Makefile.in 2007-06-13 09:10:25.000000000 -0700
@@ -1249,23 +1249,24 @@ D32PBIT_FUNCS = _addsub_sd _div_sd _mul_
_eq_sd _ne_sd _lt_sd _gt_sd _le_sd _ge_sd \
_sd_to_si _sd_to_di _sd_to_usi _sd_to_udi \
_si_to_sd _di_to_sd _usi_to_sd _udi_to_sd \
- _sd_to_sf _sd_to_df _sd_to_xf _sf_to_sd _df_to_sd _xf_to_sd \
+ _sd_to_sf _sd_to_df _sd_to_xf _sd_to_tf \
+ _sf_to_sd _df_to_sd _xf_to_sd _tf_to_sd \
_sd_to_dd _sd_to_td _unord_sd _conv_sd
D64PBIT_FUNCS = _addsub_dd _div_dd _mul_dd _plus_dd _minus_dd \
_eq_dd _ne_dd _lt_dd _gt_dd _le_dd _ge_dd \
_dd_to_si _dd_to_di _dd_to_usi _dd_to_udi \
_si_to_dd _di_to_dd _usi_to_dd _udi_to_dd \
- _dd_to_sf _dd_to_df _dd_to_xf \
- _sf_to_dd _df_to_dd _xf_to_dd \
+ _dd_to_sf _dd_to_df _dd_to_xf _dd_to_tf \
+ _sf_to_dd _df_to_dd _xf_to_dd _tf_to_dd \
_dd_to_sd _dd_to_td _unord_dd _conv_dd
D128PBIT_FUNCS = _addsub_td _div_td _mul_td _plus_td _minus_td \
_eq_td _ne_td _lt_td _gt_td _le_td _ge_td \
_td_to_si _td_to_di _td_to_usi _td_to_udi \
_si_to_td _di_to_td _usi_to_td _udi_to_td \
- _td_to_sf _td_to_df _td_to_xf \
- _sf_to_td _df_to_td _xf_to_td \
+ _td_to_sf _td_to_df _td_to_xf _td_to_tf \
+ _sf_to_td _df_to_td _xf_to_td _tf_to_td \
_td_to_sd _td_to_dd _unord_td _conv_td
# These might cause a divide overflow trap and so are compiled with
--- gcc/config/dfp-bit.c.float128 2007-03-24 12:05:56.000000000 -0700
+++ gcc/config/dfp-bit.c 2007-06-13 09:10:25.000000000 -0700
@@ -37,6 +37,11 @@ Software Foundation, 51 Franklin Street,
/* The intended way to use this file is to make two copies, add `#define '
to one copy, then compile both copies and add them to libgcc.a. */
+/* FIXME: This implementation doesn't support TFmode conversions. */
+#if !(defined (L_sd_to_tf) || defined (L_dd_to_tf) \
+ || defined (L_td_to_tf) || defined (L_tf_to_sd) \
+ || defined (L_tf_to_dd) || defined (L_tf_to_td))
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -576,3 +581,7 @@ DFP_UNORD (DFP_C_TYPE arg_a, DFP_C_TYPE
return (decNumberIsNaN (&arg1) || decNumberIsNaN (&arg2));
}
#endif /* L_unord_sd || L_unord_dd || L_unord_td */
+
+/* !(L_sd_to_tf || L_dd_to_tf || L_td_to_tf \
+ || L_tf_to_sd || L_tf_to_dd || L_tf_to_td) */
+#endif
--- gcc/config/i386/linux64.h.float128 2007-04-04 17:37:13.000000000 -0700
+++ gcc/config/i386/linux64.h 2007-06-13 10:12:40.000000000 -0700
@@ -102,3 +102,7 @@ Boston, MA 02110-1301, USA. */
x86_64 glibc provides it in %fs:0x28. */
#define TARGET_THREAD_SSP_OFFSET (TARGET_64BIT ? 0x28 : 0x14)
#endif
+
+/* Put all *tf routines in libgcc for 64bit. */
+#undef LIBGCC2_HAS_TF_MODE
+#define LIBGCC2_HAS_TF_MODE TARGET_64BIT
More information about the Gcc-patches
mailing list