Re: [PATCH 03/34] rs6000: Add the rest of the [altivec] stanza to the builtins file

2021-08-10 Thread Bill Schmidt via Gcc-patches
On 8/10/21 8:40 AM, Segher Boessenkool wrote: On Tue, Aug 10, 2021 at 08:02:24AM -0500, Bill Schmidt wrote: The whole point is that this data type is only used for interfaces, as shown in the example code.  Nobody wants to define const void as anything.  The const serves only as a contract tha

Re: [PATCH 03/34] rs6000: Add the rest of the [altivec] stanza to the builtins file

2021-08-10 Thread Segher Boessenkool
On Tue, Aug 10, 2021 at 08:02:24AM -0500, Bill Schmidt wrote: > The whole point is that this data type is only used for interfaces, as > shown in the example code.  Nobody wants to define const void as > anything.  The const serves only as a contract that the pointed-to > object, no matter what

Re: [PATCH 03/34] rs6000: Add the rest of the [altivec] stanza to the builtins file

2021-08-10 Thread Bill Schmidt via Gcc-patches
On 8/10/21 7:48 AM, Segher Boessenkool wrote: On Tue, Aug 10, 2021 at 07:17:54AM -0500, Bill Schmidt wrote: On 8/9/21 6:44 PM, Segher Boessenkool wrote: This is not a documented GCC extension either, and it might even conflict with the existing void * extension (allowing arithmetic on it, by de

Re: [PATCH 03/34] rs6000: Add the rest of the [altivec] stanza to the builtins file

2021-08-10 Thread Segher Boessenkool
On Tue, Aug 10, 2021 at 07:17:54AM -0500, Bill Schmidt wrote: > On 8/9/21 6:44 PM, Segher Boessenkool wrote: > >This is not a documented GCC extension either, and it might even > >conflict with the existing void * extension (allowing arithmetic on it, > >by defining sizeof(void)). In either case i

Re: [PATCH 03/34] rs6000: Add the rest of the [altivec] stanza to the builtins file

2021-08-10 Thread Bill Schmidt via Gcc-patches
On 8/9/21 6:44 PM, Segher Boessenkool wrote: This is not a documented GCC extension either, and it might even conflict with the existing void * extension (allowing arithmetic on it, by defining sizeof(void)). In either case it is not currently defined. I'm not sure how you get to this, bu

Re: [PATCH 03/34] rs6000: Add the rest of the [altivec] stanza to the builtins file

2021-08-09 Thread Segher Boessenkool
On Mon, Aug 09, 2021 at 02:18:48PM -0500, Bill Schmidt wrote: > >>"const void" is meaningless, and maybe even invalid C. I think the code > >>is wrong, not (just) the documentation! This wants to be > >>void *const > >>but it is > >>const void * > >>as far as I can see? > >> > >>As I said

Re: [PATCH 03/34] rs6000: Add the rest of the [altivec] stanza to the builtins file

2021-08-09 Thread Bill Schmidt via Gcc-patches
Hi Segher, + pcvoid_type_node += build_pointer_type (build_qualified_type (void_type_node, + TYPE_QUAL_CONST)); A const void? Interesting. You are building a pointer to a const void here, not a const pointer to void. Is that what you wanted?

Re: [PATCH 03/34] rs6000: Add the rest of the [altivec] stanza to the builtins file

2021-08-09 Thread Segher Boessenkool
On Sun, Aug 08, 2021 at 03:53:01PM -0500, Bill Schmidt wrote: > On 8/8/21 3:27 PM, Segher Boessenkool wrote: > >Okido. What about the signed char though? > > Sorry, forgot to address that.  There are two reasons to keep it as is:  > (a) It matches what we have in the old support, and (b) it make

Re: [PATCH 03/34] rs6000: Add the rest of the [altivec] stanza to the builtins file

2021-08-08 Thread Bill Schmidt via Gcc-patches
Hi... On 8/8/21 3:27 PM, Segher Boessenkool wrote: Hi! On Sun, Aug 08, 2021 at 11:53:38AM -0500, Bill Schmidt wrote: On 8/6/21 7:01 PM, Segher Boessenkool wrote: On Thu, Jul 29, 2021 at 08:30:50AM -0500, Bill Schmidt wrote: + const vsc __builtin_altivec_abss_v16qi (vsc); +ABSS_V16QI alt

Re: [PATCH 03/34] rs6000: Add the rest of the [altivec] stanza to the builtins file

2021-08-08 Thread Segher Boessenkool
Hi! On Sun, Aug 08, 2021 at 11:53:38AM -0500, Bill Schmidt wrote: > On 8/6/21 7:01 PM, Segher Boessenkool wrote: > >On Thu, Jul 29, 2021 at 08:30:50AM -0500, Bill Schmidt wrote: > >>+ const vsc __builtin_altivec_abss_v16qi (vsc); > >>+ABSS_V16QI altivec_abss_v16qi {} > >>+ > >>+ const vsi __

Re: [PATCH 03/34] rs6000: Add the rest of the [altivec] stanza to the builtins file

2021-08-08 Thread Bill Schmidt via Gcc-patches
Hi Segher, On 8/6/21 7:01 PM, Segher Boessenkool wrote: Hi! On Thu, Jul 29, 2021 at 08:30:50AM -0500, Bill Schmidt wrote: + const vsc __builtin_altivec_abss_v16qi (vsc); +ABSS_V16QI altivec_abss_v16qi {} + + const vsi __builtin_altivec_abss_v4si (vsi); +ABSS_V4SI altivec_abss_v4si {}

Re: [PATCH 03/34] rs6000: Add the rest of the [altivec] stanza to the builtins file

2021-08-06 Thread Segher Boessenkool
Hi! On Thu, Jul 29, 2021 at 08:30:50AM -0500, Bill Schmidt wrote: > + const vsc __builtin_altivec_abss_v16qi (vsc); > +ABSS_V16QI altivec_abss_v16qi {} > + > + const vsi __builtin_altivec_abss_v4si (vsi); > +ABSS_V4SI altivec_abss_v4si {} > + > + const vss __builtin_altivec_abss_v8hi (v

[PATCH 03/34] rs6000: Add the rest of the [altivec] stanza to the builtins file

2021-07-29 Thread Bill Schmidt via Gcc-patches
2021-06-10 Bill Schmidt gcc/ * config/rs6000/rs6000-builtin-new.def: Finish altivec stanza. * config/rs6000/rs6000-call.c (rs6000_init_builtins): Move initialization of pcvoid_type_node here... (altivec_init_builtins): ...from here. * config/rs6000/rs6000