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] PR libgcc/83112, Fix warnings on libgcc float128-ifunc.c


On Wed, Nov 29, 2017 at 08:42:51PM -0600, Segher Boessenkool wrote:
> Hi,
> 
> On Mon, Nov 27, 2017 at 06:40:09PM -0500, Michael Meissner wrote:
> > @@ -33,3 +35,13 @@ $(fp128_hw_obj)		 : $(srcdir)/config/rs6
> >  
> >  $(fp128_ifunc_obj)	 : INTERNAL_CFLAGS += $(FP128_CFLAGS_SW)
> >  $(fp128_ifunc_obj)	 : $(srcdir)/config/rs6000/t-float128-hw
> > +
> > +_mulkc3-hw.c: $(srcdir)/config/rs6000/_mulkc3.c
> > +	rm -rf _mulkc3.c
> > +	(echo "#define __mulkc3 __mulkc3_hw"; \
> > +	 cat $(srcdir)/config/rs6000/_mulkc3.c) > _mulkc3-hw.c
> 
> Please don't -rf.  -rf is a dangerous habit.
> 
> This also won't work if anything tries to build _mulkc3-hw.c a second
> time; you have deleted its prerequisite.
> 
> Maybe some other scheme is better?
> 
> > --- libgcc/config/rs6000/t-float128	(revision 255177)
> > +++ libgcc/config/rs6000/t-float128	(working copy)
> > @@ -86,7 +86,7 @@ test:
> >  	for x in $(fp128_obj); do echo "    $$x"; done;
> >  
> >  clean-float128:
> > -	rm -rf $(fp128_softfp_src)
> > +	rm -rf $(fp128_softfp_src) $(fp128_hardfp_src)
> >  	@$(MULTICLEAN) multi-clean DO=clean-float128
> 
> -rm to avoid warnings from rm if you clean without the files being there.
> 
> Otherwise looks good.  Thanks!

As we discussed on private IRC, I mistakenly deleted the _{mul,div}kc3.c file
when I meant to delete the _{mul,div}kc3-hw.c file before recreating it.

This is the patch I checked in (subversion id 255282):

2017-11-30  Michael Meissner  <meissner@linux.vnet.ibm.com>

	PR libgcc/83112
	* config/rs6000/float128-ifunc.c (__addkf3_resolve): Use the
	correct type for all ifunc resolvers to silence -Wattribute-alias
	warnings.  Eliminate the forward declaration of the resolver
	functions which is no longer needed.
	(__subkf3_resolve): Likewise.
	(__mulkf3_resolve): Likewise.
	(__divkf3_resolve): Likewise.
	(__negkf2_resolve): Likewise.
	(__eqkf2_resolve): Likewise.
	(__nekf2_resolve): Likewise.
	(__gekf2_resolve): Likewise.
	(__gtkf2_resolve): Likewise.
	(__lekf2_resolve): Likewise.
	(__ltkf2_resolve): Likewise.
	(__unordkf2_resolve): Likewise.
	(__extendsfkf2_resolve): Likewise.
	(__extenddfkf2_resolve): Likewise.
	(__trunckfsf2_resolve): Likewise.
	(__trunckfdf2_resolve): Likewise.
	(__fixkfsi_resolve): Likewise.
	(__fixkfdi_resolve): Likewise.
	(__fixunskfsi_resolve): Likewise.
	(__fixunskfdi_resolve): Likewise.
	(__floatsikf_resolve): Likewise.
	(__floatdikf_resolve): Likewise.
	(__floatunsikf_resolve): Likewise.
	(__floatundikf_resolve): Likewise.
	(__extendkftf2_resolve): Likewise.
	(__trunctfkf2_resolve): Likewise.

	PR libgcc/83103
	* config/rs6000/quad-float128.h (TF): Don't define if long double
	is IEEE 128-bit floating point.
	(TCtype): Define as either TCmode or KCmode, depending on whether
	long double is IEEE 128-bit floating point.
	(__mulkc3_sw): Add declarations for software/hardware versions of
	complex multiply/divide.
	(__divkc3_sw): Likewise.
	(__mulkc3_hw): Likewise.
	(__divkc3_hw): Likewise.
	* config/rs6000/_mulkc3.c (_mulkc3): If we are building ifunc
	handlers to switch between using software emulation and hardware
	float128 instructions, build the complex multiply/divide functions
	for both software and hardware support.
	* config/rs6000/_divkc3.c (_divkc3): Likewise.
	* config/rs6000/float128-ifunc.c (__mulkc3_resolve): Likewise.
	(__divkc3_resolve): Likewise.
	(__mulkc3): Likewise.
	(__divkc3): Likewise.
	* config/rs6000/t-float128-hw (fp128_hardfp_src): Likewise.
	(fp128_hw_src): Likewise.
	(fp128_hw_static_obj): Likewise.
	(fp128_hw_shared_obj): Likewise.
	(_mulkc3-hw.c): Likewise.
	(_divkc3-hw.c): Likewise.
	* config/rs6000/t-float128 (clean-float128): Delete _mulkc3-hw.c
	and _divkc3-hw.c.

-- 
Michael Meissner, IBM
IBM, M/S 2506R, 550 King Street, Littleton, MA 01460-6245, USA
email: meissner@linux.vnet.ibm.com, phone: +1 (978) 899-4797

Attachment: pr83112.patch03b
Description: Text document


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