On Mon, Nov 06, 2017 at 05:56:59AM -0600, Segher Boessenkool wrote:
> Hi!
> 
> On Fri, Nov 03, 2017 at 06:07:38PM -0400, Michael Meissner wrote:
> > This patch fixes PR 82748, which is a compiler abort if you use the old
> > __builtin_fabsq function when you are changing the long double default from 
> > IBM
> > double-double format to IEEE.
> > 
> > The problem is __builtin_fabsq returns a KFmode type, but when you use
> > -mabi=ieeelongdouble, the float128 type is TFmode.
> 
> 
> > --- gcc/config/rs6000/rs6000.c      (revision 254357)
> > +++ gcc/config/rs6000/rs6000.c      (working copy)
> > @@ -16109,39 +16109,11 @@ rs6000_invalid_builtin (enum rs6000_buil
> >     from ia64.c.  */
> >  
> >  static tree
> > -rs6000_fold_builtin (tree fndecl, int n_args ATTRIBUTE_UNUSED,
> > -                tree *args, bool ignore ATTRIBUTE_UNUSED)
> > +rs6000_fold_builtin (tree fndecl ATTRIBUTE_UNUSED,
> > +                int n_args  ATTRIBUTE_UNUSED,
> > +                tree *args  ATTRIBUTE_UNUSED,
> > +                bool ignore ATTRIBUTE_UNUSED)
> 
> No extra spaces please.

ok.

> If the arguments are always unused, you can simply leave out their name
> (or comment the name), like

If you look further down, you will see that SUBTARGET_FOLD_BUILTIN is called if
it is defined, and darwin seems to use it.

We could do a cleanup where the hook is now not defined if
SUBTARGET_FOLD_BUILTIN is not defined.

it is defined, so we don't know whether the arguments are used or not. 
> static tree
> rs6000_fold_builtin (tree /*fndecl*/, int /*n_args*/, tree * /*args*/,
>                    bool /*ignore*/)
> 
> or
> 
> static tree
> rs6000_fold_builtin (tree, int, tree *, bool)
> 
> > +    case FLOAT128_BUILTIN_TRUNCF128_ODD:
> > +      return rs6000_expand_unop_builtin (TARGET_IEEEQUAD
> > +                                     ? CODE_FOR_trunctfdf2_odd
> > +                                     : CODE_FOR_trunckfdf2_odd, exp, 
> > target);
> 
> The indent is wrong in this one.

Ok.

> Rest looks good.  Okay for trunk.  Thanks!
> 
> 
> Segher
> 

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

Reply via email to