From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 119266 invoked by alias); 5 Jun 2018 23:37:05 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 119181 invoked by uid 89); 5 Jun 2018 23:37:03 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.1 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mx1.redhat.com Received: from mx3-rdu2.redhat.com (HELO mx1.redhat.com) (66.187.233.73) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 05 Jun 2018 23:37:01 +0000 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4DD83C12B7; Tue, 5 Jun 2018 23:37:00 +0000 (UTC) Received: from localhost (unused-10-15-17-196.yyz.redhat.com [10.15.17.196]) by smtp.corp.redhat.com (Postfix) with ESMTP id 193C92144B23; Tue, 5 Jun 2018 23:37:00 +0000 (UTC) From: Sergio Durigan Junior To: GDB Patches Cc: Alan Hayward , nd@arm.com Subject: Re: [PATCH] Guard declarations of 'sve_*_from_*' macros on Aarch64 (and unbreak build) References: <87zi09vw7m.fsf@redhat.com> <20180605220556.7418-1-sergiodj@redhat.com> Date: Tue, 05 Jun 2018 23:37:00 -0000 In-Reply-To: <20180605220556.7418-1-sergiodj@redhat.com> (Sergio Durigan Junior's message of "Tue, 5 Jun 2018 18:05:56 -0400") Message-ID: <87sh60x0tg.fsf@redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-IsSubscribed: yes X-SW-Source: 2018-06/txt/msg00133.txt.bz2 On Tuesday, June 05 2018, I wrote: > In order to fix this breakage, this commit guards the declaration of > the macros using #ifndef's. It is important to mention that the > system headers use a value to multiply/divide the vector > length (SVE_VQ_BYTES, defined as 16 on the system I'm using) which is > different than the values being used by the macros defined in GDB. I > wasn't sure how to consolidate that, so I chose to ignore this > discrepancy. Actually, I just saw that there's no discrepancy. The system header defines the following macros: #define SVE_VQ_BYTES 16 /* number of bytes per quadword */ ... #define sve_vq_from_vl(vl) ((vl) / SVE_VQ_BYTES) #define sve_vl_from_vq(vq) ((vq) * SVE_VQ_BYTES) and GDB does this: #ifndef sve_vq_from_vl #define sve_vq_from_vl(vl) ((vl) / 0x10) #endif #ifndef sve_vl_from_vq #define sve_vl_from_vq(vq) ((vq) * 0x10) #endif which is fine. I'll remove this comment from the commit log. Thanks, -- Sergio GPG key ID: 237A 54B1 0287 28BF 00EF 31F4 D0EB 7628 65FC 5E36 Please send encrypted e-mail if possible http://sergiodj.net/