From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) by sourceware.org (Postfix) with ESMTP id C9AFB3858D35 for ; Mon, 23 Aug 2021 22:16:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org C9AFB3858D35 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=kernel.crashing.org Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=kernel.crashing.org Received: from gate.crashing.org (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id 17NMFQs3016051; Mon, 23 Aug 2021 17:15:26 -0500 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id 17NMFP8I016046; Mon, 23 Aug 2021 17:15:25 -0500 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Mon, 23 Aug 2021 17:15:25 -0500 From: Segher Boessenkool To: Bill Schmidt Cc: gcc-patches@gcc.gnu.org, dje.gcc@gmail.com, willschm@linux.ibm.com Subject: Re: [PATCH 09/34] rs6000: Add more type nodes to support builtin processing Message-ID: <20210823221525.GC1583@gate.crashing.org> References: <95a55b02e8fe06cfd7961a67b41c8dcc79ab44ef.1627562851.git.wschmidt@linux.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <95a55b02e8fe06cfd7961a67b41c8dcc79ab44ef.1627562851.git.wschmidt@linux.ibm.com> User-Agent: Mutt/1.4.2.3i X-Spam-Status: No, score=-5.7 required=5.0 tests=BAYES_00, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, TXREP, T_SPF_HELO_PERMERROR, T_SPF_PERMERROR autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Aug 2021 22:16:29 -0000 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); > + 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. > @@ -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! Segher