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 {}
+
+  const vss __builtin_altivec_abss_v8hi (vss);
+    ABSS_V8HI altivec_abss_v8hi {}
Is there any ordering used here?  What is it, then?  Just alphabetical?

That order does not really allow breaking things up into groups, which
is the main tool to keep things manageable.


Yes, within each stanza, the ordering is alphabetical by built-in name.  It seems to me that any other ordering is arbitrary and prone to requiring exceptions, so in the end you just end up with a mess where nobody knows where to put the next builtin added. That's certainly what happened with the old support.


+  const vsc __builtin_vec_init_v16qi (signed char, signed char, signed char, 
signed char, signed char, signed char, signed char, signed char, signed char, 
signed char, signed char, signed char, signed char, signed char, signed char, 
signed char);
That is a very long line, can you do something about that, or is that
forced by the file format?  Can you use just "char"?  "signed char" is a
very strange choice.


Right now, long lines are there because the parser doesn't support breaking up the line.  I have an additional patch I put together recently that allows the use of escape-newline to break up these lines.  I am planning to submit that once we get through the current patch set.


+  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?

(And yes I do realise this is just moved, not new code).


Sorry, I misdocumented this below.  I'll review and make sure this is correct everywhere.

Thanks for the review!
Bill


--- a/gcc/config/rs6000/rs6000.h
+++ b/gcc/config/rs6000/rs6000.h
@@ -2460,6 +2460,7 @@ enum rs6000_builtin_type_index
    RS6000_BTI_const_str,                /* pointer to const char * */
    RS6000_BTI_vector_pair,      /* unsigned 256-bit types (vector pair).  */
    RS6000_BTI_vector_quad,      /* unsigned 512-bit types (vector quad).  */
+  RS6000_BTI_const_ptr_void,     /* const pointer to void */
    RS6000_BTI_MAX
  };
That is not what
   build_pointer_type (build_qualified_type (void_type_node, TYPE_QUAL_CONST));
builds though?

Okay for trunk, but please look at those things, especially the pcvoid
one!  Thanks,


Segher

Reply via email to