This is the mail archive of the gcc-patches@gcc.gnu.org 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]

PATCH: Enable TFmode for DFP


On Fri, Jun 15, 2007 at 09:04:15AM +0200, Uros Bizjak wrote:
> >With Intel BID library, I got the following on Linux/Intel64:
> 
> >/export/build/gnu/gcc/build-x86_64-linux/prev-gcc/xgcc
> >-B/export/build/gnu/gcc/build-x86_64-linux/prev-gcc/ -O2 -g    x.c   -o
> >x
> >./x
> >1.200000
> >1.300000
> >1.400000
> 
> Nice!
> 
> I have committed the x86_64 libgcc TFmode support patch (with updated
> copyright years) to SVN mainline.
> 

Here is the updated patch to enable TFmode for DFP. Ben, can you
take a look?

Thanks.


H.J.
----
2007-06-15  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.

--- 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


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