On 8/17/20 12:13 PM, Carl Love wrote:
Segher, Bill, Peter:
On Fri, 2020-08-14 at 19:42 -0500, Segher Boessenkool wrote:
Do the names agree with the (future) documentation now?
Did not double check on the documentation.
Someone should...
Looking at the box document "Proposed function Prototypes for P10".
There are a number of builtins of the form "name()" which get expanded
to
__builtin_altivec_name or __builtin_vsx_name.
But there does not appear to be any additional defined prototype for
the __builtin_altivec_name or __builtin_vsx_name in the document so we
don't need to worry about these prototypes as far as I can see.
There are three prototypes __builtin_cfuged, __builtin_pdepd,
__builtin_pextd defined in the document.
The corresponding builtin definitions in GCC are:
__builtin_altivec_cfuged, __builtin_altivec_pdepd,
__builtin_altivec_pextd
which does not match the defined prototype in the document.
These are scalar instructions, not vector, so they should not be using
any flavor of "V". They should be using BU_P10_MISC_n, where n is the
number of arguments.
Bill
I don't see any defines in gcc/config/rs6000 that would map
__builtin_name to __builtin_altivec_name so these three appear to be
unsupported as far as I can see. I assume adding
#define __builtin_name __builtin_altivec_name
to gcc/config/rs6000/altivec.h would be the easiest way to define the
prototypes from the document. I can add the defines if you think that
is the correct fix. Please let me know.
The MMA related builtins at the end of the document appear to have the
proper define BU_MMA_# macro expansions to generate the defined
prototype names.
Looking at the builtin definitions in box for RFC 2608, RFC 2609, RFC
2629 the builtins are all of the form name() so I don't see any issues
with the internal GCC name changes for the builtins in these documents.
Carl