From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id bPQ/OWylz18PcgAAWB0awg (envelope-from ) for ; Tue, 08 Dec 2020 11:10:20 -0500 Received: by simark.ca (Postfix, from userid 112) id DB6171F096; Tue, 8 Dec 2020 11:10:20 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [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 355C41E552 for ; Tue, 8 Dec 2020 11:10:20 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 9681F3947C01; Tue, 8 Dec 2020 16:10:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9681F3947C01 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1607443819; bh=1kK7lr+ony9mJmmsLOiP0J0yboM7cRy54Vz3cRBCsoo=; 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=qBq8f70eJXDQ31peAQ3C0yvwJDfDtxcNTGz9DhYt3Kll9qmMUgesxPj457U8Dtg4K Vvy1i34fRa3/4TzlVerTlVa1J0m1GdzVMaL9EtgJJg2PrDE2o0vyKRU6eV4/G2Rcz+ m5CYjxguMrj5bPPZ2MvICCjwH3gjBdwi72O5rsFE= Received: from smtp.polymtl.ca (smtp.polymtl.ca [132.207.4.11]) by sourceware.org (Postfix) with ESMTPS id A69353865460 for ; Tue, 8 Dec 2020 16:10:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org A69353865460 Received: from simark.ca (simark.ca [158.69.221.121]) (authenticated bits=0) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id 0B8GA9MX003974 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 8 Dec 2020 11:10:14 -0500 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp.polymtl.ca 0B8GA9MX003974 Received: from [10.0.0.11] (173-246-6-90.qc.cable.ebox.net [173.246.6.90]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 4C9901E552; Tue, 8 Dec 2020 11:10:09 -0500 (EST) Subject: Re: [PATCH,v2] SVE/FPSIMD fixup for big endian To: Luis Machado , 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> Message-ID: <4f95c775-677c-8858-6fd7-41b405cd3099@polymtl.ca> Date: Tue, 8 Dec 2020 11:10:08 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.4.3 MIME-Version: 1.0 In-Reply-To: <33b1cca4-0f45-3999-36d3-d68e169e7acc@linaro.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Poly-FromMTA: (simark.ca [158.69.221.121]) at Tue, 8 Dec 2020 16:10:09 +0000 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: Simon Marchi via Gdb-patches Reply-To: Simon Marchi Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" 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. 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. Simon