On 8/23/21 5:15 PM, Segher Boessenkool wrote:
On Thu, Jul 29, 2021 at 08:30:56AM -0500, Bill Schmidt wrote:
        * config/rs6000/rs6000-call.c (rs6000_init_builtins): Initialize
        various pointer type nodes.
        * config/rs6000/rs6000.h (rs6000_builtin_type_index): Add enum
        values for various pointer types.
        (ptr_V16QI_type_node): New macro.
[ ... ]

        (ptr_long_long_unsigned_type_node): New macro.

+  ptr_long_integer_type_node
+    = build_pointer_type
+       (build_qualified_type (long_integer_type_internal_node,
+                              TYPE_QUAL_CONST));
+
+  ptr_long_unsigned_type_node
+    = build_pointer_type
+       (build_qualified_type (long_unsigned_type_internal_node,
+                              TYPE_QUAL_CONST));
This isn't correct formatting either.  Just use a temp variable?  Long
names and function calls do not mix, moreso with our coding conventions.

   tree t = build_qualified_type (long_unsigned_type_internal_node,
                                 TYPE_QUAL_CONST));
   ptr_long_unsigned_type_node = build_pointer_type (t);
Good choice, will do.
+  if (dfloat64_type_node)
+    ptr_dfloat64_type_node
+      = build_pointer_type (build_qualified_type (dfloat64_type_internal_node,
You might want to use a block to make this a little more readable / less
surprising.  Okay either way.
Yep.  Will use a temp variable again and that will force the block.
@@ -2517,6 +2558,47 @@ enum rs6000_builtin_type_index
  #define vector_pair_type_node          
(rs6000_builtin_types[RS6000_BTI_vector_pair])
  #define vector_quad_type_node          
(rs6000_builtin_types[RS6000_BTI_vector_quad])
  #define pcvoid_type_node               
(rs6000_builtin_types[RS6000_BTI_const_ptr_void])
+#define ptr_V16QI_type_node             
(rs6000_builtin_types[RS6000_BTI_ptr_V16QI])
Not new of course, but those outer parens are pointless.  In macros
write extra parens around uses of parameters, and nowhere else.

Okay for trunk with the formatting fixed.  Thanks!

Thanks for the review!

Bill


Segher

Reply via email to