From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id qTNeE4HSz1/ZdgAAWB0awg (envelope-from ) for ; Tue, 08 Dec 2020 14:22:41 -0500 Received: by simark.ca (Postfix, from userid 112) id 42E6C1F096; Tue, 8 Dec 2020 14:22:41 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RDNS_NONE,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.2 Received: from sourceware.org (unknown [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id BAE3A1E590 for ; Tue, 8 Dec 2020 14:22:40 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id F3CB73844072; Tue, 8 Dec 2020 19:22:39 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F3CB73844072 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1607455360; bh=9zwb6l3NYYtgKJJjs+OGs+H5GWJGPCTgL25uXJ4c9hQ=; h=Subject:To:References:Date:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=b/IUnZC9EU5FNBlWArx0iKGNOsmLSwaio58Uq+luiaHBiIArEfFeymaEt6l9OEAsV XgfkbuXRnE9lHIOYGG7M4JwVcv9h7yDNMicoC8FzJWoiN8E10xfpmW7hyYLA5M+Y6U +gVYtmenIh5d8UjcIiYHG0sgbh8ehmUkr6owAyio= Received: from mail-qk1-x736.google.com (mail-qk1-x736.google.com [IPv6:2607:f8b0:4864:20::736]) by sourceware.org (Postfix) with ESMTPS id B0C82386188A for ; Tue, 8 Dec 2020 19:22:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org B0C82386188A Received: by mail-qk1-x736.google.com with SMTP id 186so3119864qkj.3 for ; Tue, 08 Dec 2020 11:22:37 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=9zwb6l3NYYtgKJJjs+OGs+H5GWJGPCTgL25uXJ4c9hQ=; b=F9AzUP+Sci5USWCfpLCxIlPUyYP5c6epVvosJsOCqxqKGWg7+sXnNlUH5lJuWsyGbF 9bwCfisZf+aJ993iUkRMuOSvzzPktC6EInnWnzYIUFcmScHAgAYjRypu84bTptykikFK sSNcSPmyhmjAW1vd1GR6OlIwBhgBxZXZ1f44+b41Qc1UFST7cZoADvdazU2oom7ChXf1 XOI4vrKyBxzrea6agL3bVgLbs9Hx8sgwnBg5sVYhLPASTbOjDkE/i9OvsLBekzW7l2Iq n+5LLLpJ9qq2/LaXRYR/x9iwe/aBcvvMacG+VSC0POMEbfc/FzW+aINlQ0W6gWFK3+u+ 61Eg== X-Gm-Message-State: AOAM5331hJS98E1GIfxIfBmsWaB3cMf4x0CRObK0GanmFNlnBR98m+fG W8LE8RcxMERukumxLHaTZ6Pd9t/2HvXO0w== X-Google-Smtp-Source: ABdhPJzIiMrlISdAjz9ge20+f4xXU1jeYPsK7SxrcbORWSlguxEFCJylNKvc7QedUt/pAkUmKPjq3w== X-Received: by 2002:ae9:e647:: with SMTP id x7mr16372476qkl.411.1607455356967; Tue, 08 Dec 2020 11:22:36 -0800 (PST) Received: from ?IPv6:2804:7f0:8284:370e:e4c6:831b:a52b:a990? ([2804:7f0:8284:370e:e4c6:831b:a52b:a990]) by smtp.gmail.com with ESMTPSA id 68sm14892665qkf.97.2020.12.08.11.22.35 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 08 Dec 2020 11:22:36 -0800 (PST) Subject: Re: [PATCH,v2] SVE/FPSIMD fixup for big endian To: Simon Marchi , gdb-patches@sourceware.org References: <20201130185545.940242-1-luis.machado@linaro.org> <20201202175718.1034781-1-luis.machado@linaro.org> <33b1cca4-0f45-3999-36d3-d68e169e7acc@linaro.org> <4f95c775-677c-8858-6fd7-41b405cd3099@polymtl.ca> Message-ID: Date: Tue, 8 Dec 2020 16:22:34 -0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <4f95c775-677c-8858-6fd7-41b405cd3099@polymtl.ca> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Luis Machado via Gdb-patches Reply-To: Luis Machado Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" On 12/8/20 1:10 PM, Simon Marchi wrote: > On 2020-12-04 9:22 a.m., Luis Machado via Gdb-patches wrote: >> With the AArch64-specific parts approved, do the global maintainers have any comments on the trad-frame changes, or does it look good? > > The changes in trad-frame look good to me. If you feel like it, you could > change the bytes/size parameters in the functions' prototypes to use > gdb::array_view. I agree. The current interface is being abused a little. I'll push this fix first, then I'll do it as a separate patch. Might be useful for other targets as well, like ones that have larger vector types. > > While reading your patch, I spotted some cleanups I'd like to see happening > to make the code cleaner/safer (ideas for future patches). The first one > would be to make the fields private and add getters that assert that the kind > of value you are getting is indeed the one stored, a bit like I did for the > dynamic_prop structure. That could catch some problems where we set value as > bytes but fetch it as a register number. > > The second one is: instead of overloading the realreg field to hold the kind > of value that is stored in the object, and overloading the "addr" field for > both LONGEST values and addresses, it would be much clearer to have a kind > field + a union: > > struct trad_frame_saved_reg > { > trad_frame_saved_reg_kind kind; > > union > { > CORE_ADDR addr; > LONGEST value; > int regnum; > gdb_byte *data; > }; > }; > > It would take less space, too. Thanks. That's good feedback. I'll take notes and will work on something to improve these structures/mechanisms.