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]

Re: [PATCH] clean up support for testing DFP rounding


On Wed, Nov 22, 2006 at 09:51:59AM +1100, Ben Elliston wrote:
> Hi Janis
> 
> Sorry for the delay ..
> 
> On Wed, Nov 15, 2006 at 05:14:08PM -0800, Janis Johnson wrote:
> 
> > This patch cleans up the current testing support for DFP rounding, and
> > uses a new macro that's similar to the one used in soft-fp support.
> >
> > Tested on powerpc64-linux with --enable-decimal-float.  OK for mainline?
> >
> > 2006-11-15  Janis Johnson  <janis187@us.ibm.com>
> >
> > libdecnumber/
> > 	* decRound.c: Move declarations to header file.
> > 	* decRound.h: New.
> >
> > gcc/
> > 	* config/dfp-bit.h: Include decRound.h.
> > 	(CONTEXT_ROUND): Delete.
> > 	(DFP_INIT_ROUNDMODE): Define if not already defined.
> > 	* config/dfp-bit.c (dfp_unary_op, dfp_binary_op, dfp_compare_op,
> > 	DFP_TO_DFP, INT_TO_DFP, BFP_TO_DFP): Use DFP_INIT_ROUNDMODE.
> 
> It's probably necessary to update some Makefile dependencies for the
> existence of decRound.h (perhaps in gcc/Makefile.in, but more likely
> in libgcc.mk).  Can you check, please?

Indeed, and it turned out that the right dependencies weren't being
checked for compiles of functions in dfp-bit.c.  I added the following
to the patch and checked it in on mainline:

Index: gcc/mklibgcc.in
===================================================================
--- gcc/mklibgcc.in	(revision 119257)
+++ gcc/mklibgcc.in	(working copy)
@@ -145,6 +145,9 @@
 	$(srcdir)/../libdecnumber/decNumberLocal.h $(srcdir)/../libdecnumber/decimal32.h $(srcdir)/../libdecnumber/decimal64.h
 	$(srcdir)/../libdecnumber/decimal128.h $(srcdir)/../libdecnumber/decDPD.h $(srcdir)/../libdecnumber/decUtility.h'
 
+# Dependencies for dfp-bit.c
+dfpbit_c_dep='$(srcdir)/../libdecnumber/decRound.h'" $libgcc_dep $decnumber_dep"
+
 # Flag whether we need eh_dummy.c
 need_eh_dummy=
 
@@ -456,7 +459,7 @@
       if [ "$dpbit" ]; then
         for name in $dpfuncs; do
           out="libgcc/${dir}/${name}${objext}"
-	  echo $out: config/dfp-bit.h config/dfp-bit.c $fpbit_c_dep
+	  echo $out: config/dfp-bit.h config/dfp-bit.c $dfpbit_c_dep
 	  echo "	$gcc_compile" -DFINE_GRAINED_LIBRARIES $flags -DL$name -DWIDTH=$dpwidth \
 	      $DFP_CFLAGS -c $\(srcdir\)/config/dfp-bit.c -o $out
 	  echo $libgcc_a: $out


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