This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Add attribute((target_clone(...))) to PowerPC
- From: Segher Boessenkool <segher at kernel dot crashing dot org>
- To: Michael Meissner <meissner at linux dot vnet dot ibm dot com>, Florian Weimer <fweimer at gapps dot redhat dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>, David Edelsohn <dje dot gcc at gmail dot com>, Bill Schmidt <wschmidt at linux dot vnet dot ibm dot com>
- Date: Fri, 2 Jun 2017 11:55:57 -0500
- Subject: Re: [PATCH] Add attribute((target_clone(...))) to PowerPC
- Authentication-results: sourceware.org; auth=none
- References: <20170525182549.GA29828@ibm-tiger.the-meissners.org> <CAO3sB50myWLA0O5sApAYrV6TNOEuRQk25piPhN6-0yxNsqkPxw@mail.gmail.com> <20170525200539.GA13410@ibm-tiger.the-meissners.org> <20170530215131.GM19687@gate.crashing.org> <20170531223337.GA13852@ibm-tiger.the-meissners.org> <20170601204322.GW19687@gate.crashing.org> <20170602141627.GA30725@ibm-tiger.the-meissners.org>
Hi!
On Fri, Jun 02, 2017 at 10:16:27AM -0400, Michael Meissner wrote:
> > With "you don't have to give the enum a name" I meant write it as
> >
> > enum {
> > CLONE_DEFAULT = 0,
> > CLONE_ISA_2_05,
> > [...]
> > CLONE_MASK
> > };
> >
> > If you do "const int", I think it should be "static const int"?
>
> Ok. I think I was under the impression that enums were more tightly typed on
> C++ compared to C, and that you needed explicit casts to/from integer.
No, conversions from enum to int are still explicitly allowed (but not
the other way around indeed).
> > > +#if defined (ASM_OUTPUT_TYPE_DIRECTIVE)
> > > + if (targetm.has_ifunc_p ())
> >
> > Hrm, I still don't see what you need the #ifdef for. What in the
> > following code won't compile without it? Or does targetm.has_ifunc_p
> > return the wrong answer?
>
> Right now, we only enable ifunc by default under Linux, so I removed the
> #ifdef. We will see if it breaks on non Linux systems.
Heh, you could test, you know ;-)
The patch is okay for trunk, but please test on AIX.
Segher