[PATCH v2 3/3] powerpc64le: Add glibc-hwcaps support

Segher Boessenkool segher@kernel.crashing.org
Wed Nov 4 19:36:27 GMT 2020


Hi Florian,

On Wed, Nov 04, 2020 at 09:28:33AM +0100, Florian Weimer wrote:
> * Segher Boessenkool:
> 
> > Not going to happen.  A new powerpc64le-linux-novec triple (or whatever
> > naming, this is just an example) can be made of course, but the existing
> > name will keep standing for the existing ABI!
> 
> Fine with me.
> 
> >> >> ISA features that cannot automatically and pervasively used by compilers
> >> >> can be excluded as well.  MMA could be in that category, and I think
> >> >> cryptography-related instructions generally are.
> >> >
> >> > MMA is indeed optional for Linux.
> >> > AFAICS, cryptography-related instructions are part of SIMD and should be
> >> > required for Linux.
> >> 
> >> Then I think we should change GCC not to enable MMA with -mcpu=power10.
> >
> > No.
> >
> > -mcpu=power10 enables MMA.  If you do not want all Power10 features, you
> > should not use -mcpu=power10.  It is that simple.
> 
> Then we need a different name, or require MMA for the "power10"
> glibc-hwcaps subdirectory.

Or do nothing.  Glibc doesn't use any MMA code, does it?  This is never
generated automatically, you need to really ask for it in your source
code.

> > Since powerpc64le-linux requires Power8 or later, you always have VMX
> > and VSX enabled there.  In exactly that same way.
> >
> > GCC never generates anything MMA that the user did not explicitly ask
> > for in the source code (with builtins, say), so this is not an issue.
> > Compare this with hardware DFP.
> 
> GCC defines __MMA__ for -mcpu=power10, and source code will evenually be
> sensitive to that macro.

That macro simply says that source code can use MMA builtins and the
like.  Is it important for glibc whether user code uses MMA?

> I think it is important that -mcpu=power10 and the "power10"
> subdirectory mean the same thing.

-mcpu=power10 means "generate code optimised for power10" (and: "it will
probably not run on cpus not compatible to power10").

Is that what that subdir holds as well?


Segher


More information about the Libc-alpha mailing list