From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id D09353857404 for ; Fri, 25 Mar 2022 14:47:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D09353857404 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-651-Ifyhj96ENeaaZnsRG-bZPA-1; Fri, 25 Mar 2022 10:47:11 -0400 X-MC-Unique: Ifyhj96ENeaaZnsRG-bZPA-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 7994C1066559; Fri, 25 Mar 2022 14:47:09 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.39.192.15]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2E34540F9D40; Fri, 25 Mar 2022 14:47:09 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.16.1/8.16.1) with ESMTPS id 22PEl59U1794408 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Fri, 25 Mar 2022 15:47:05 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.16.1/8.16.1/Submit) id 22PEl2mj1794405; Fri, 25 Mar 2022 15:47:02 +0100 Date: Fri, 25 Mar 2022 15:47:02 +0100 From: Jakub Jelinek To: Richard Earnshaw Cc: Richard Earnshaw , Richard Sandiford , Kyrylo Tkachov , Andreas Krebbel , Ulrich Weigand , Eric Botcazou , gcc@gcc.gnu.org Subject: Re: Urgent GCC ABI backend maintainer ping re zero width bitfield passing (PR102024) Message-ID: Reply-To: Jakub Jelinek References: <121930f1-4c90-eb69-a87f-7158000f1592@foss.arm.com> <1dacb6db-29e3-125f-b8bd-7259331cfc1e@foss.arm.com> MIME-Version: 1.0 In-Reply-To: <1dacb6db-29e3-125f-b8bd-7259331cfc1e@foss.arm.com> X-Scanned-By: MIMEDefang 2.84 on 10.11.54.1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Status: No, score=-4.0 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham 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@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Mar 2022 14:47:17 -0000 On Fri, Mar 25, 2022 at 02:26:56PM +0000, Richard Earnshaw wrote: > Just to confirm that this is our final position. The 'int:0 field should be > ignored for the purposes of determining the parameter passing as it has no > effect on the layout of the type. > > We do not feel that an update to the AAPCS or AAPCS64 is needed as the > wording already covers this. Ok. So on the GCC side you need for both arm and aarch64 something similar to the r12-6418-g3159da6c46568a7c change (of course on the ARM/AArch64 side it will be in different spots etc.). But generally, if you see during TYPE_FIELDS walk for argument/return value passing decisions (both test whether something could be passed in registers or say alignment decisions for those) rather than layout DECL_BIT_FIELD (field) && integer_zerop (DECL_SIZE (field)) ignore it - if DECL_FIELD_CXX_ZERO_WIDTH_BIT_FIELD (field) then always, otherwise arrange for 2 invocations in which one ignores them and one doesn't and warns if the overall decisions change. Jakub