[cfe-dev] How do I specify a specific PowerPC CPU to clang?
Hal Finkel
hfinkel at anl.gov
Tue Jul 3 09:54:14 PDT 2012
On Mon, 2 Jul 2012 16:04:09 +0200
Andy Gibbs <andyg1001 at hotmail.co.uk> wrote:
> On Monday, July 02, 2012 3:43 PM, Hal Finkel wrote:
> > On Mon, 2 Jul 2012 15:09:31 +0200
> > Andy Gibbs <andyg1001 at hotmail.co.uk> wrote:
> >
> >> On Tuesday, June 19, 2012 2:09 AM, Hal Finkel wrote:
> >> > Sean, Richard,
> >> >
> >> > I added -mcpu support for PPC to trunk clang in r158334. Does
> >> > this not work for you?
> >> >
> >> > -Hal
> >>
> >> Hal,
> >>
> >> Thanks for adding this feature.
> >>
> >
> > Andy,
> >
> >> Please can I offer an improvement to it?
> >
> > Of course :)
> >
> >> In your commit comments you
> >> stated "a few preprocessor defines for common CPU types have been
> >> added". Attached is a patch that adds more.
> >
> > A few quick things:
> >
> >> + /// \brief Flags for architecture specific defines.
> >> + typedef enum {
> >> + ppc_arch_none = 0,
> >> + ppc_arch_name = 1 << 0, // <name> is substituted for arch
> >> name.
> >> + ppc_arch_ppcgr = 1 << 1,
> >
> > You need to follow the coding conventions for naming the constants
> > here:
> > http://llvm.org/docs/CodingStandards.html#name-types-functions-variables-and-enumerators-properly
>
> Ooops, sorry, I've spent the morning working to another set of coding
> standards and its unfortunately carried across!
>
> Attached is a fixed patch.
r159665. Thanks!
-Hal
>
> Cheers
> Andy
>
--
Hal Finkel
Postdoctoral Appointee
Leadership Computing Facility
Argonne National Laboratory
More information about the cfe-dev
mailing list