From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-x42d.google.com (mail-wr1-x42d.google.com [IPv6:2a00:1450:4864:20::42d]) by sourceware.org (Postfix) with ESMTPS id BB0BE383F871 for ; Tue, 9 Jun 2020 22:47:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org BB0BE383F871 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=embecosm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=andrew.burgess@embecosm.com Received: by mail-wr1-x42d.google.com with SMTP id r7so131788wro.1 for ; Tue, 09 Jun 2020 15:47:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=1RbAxbk/oW52lChozAc6XZe8iDyonxijgj7CZHKtC2U=; b=Od3QX1VYKUiN/PBJb411+9lnI8JjTljPhyR2ERoecWtBPwZj8Lf5eb34299h8/RTym MhzRBvCoXvqeUcYSi0xCpJ2xnnIZ+RZZNJu/aTrkXC173c+VRMWa0IK65EOp94yqv4B4 uCfksgK2uQD4Xea0SP77sFrxXGOJWRT9zgoSt4BIpv3zAMcX9wTMq/xMMq9pvg+sIQGP ypECDrZg0E4CoySLG0Nai/S4y+tmHQgaQcy5QnS4+KWKYpjf5+Un/RbjfFtkZyefggKr dGx2dz5MudBkNr9UexUIIq7x1EcyNqFSGh8TTU5zVfuRhhajsjixWaDDP1jicvda4Cyn i1/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=1RbAxbk/oW52lChozAc6XZe8iDyonxijgj7CZHKtC2U=; b=ajt6x3/NpcWOxTfDd5/mp2MaBu79VFbhHZOvFzKilcCqVKaZ3CaAEamoVggs8InF2s pq1f6dGB9YYmhPndaXyb3v0gGBDBGqYJ7kL51xdwRrylCKMsTVkzseAQ8bpkL2PIn/hi XPVatJpmsWXaGhtMj9MWu/w7HEG0NdrJ4re1CwvWkFCLfZ5ynDktaEp3vp1O6pl8exzZ QmzRfNB4GukTf/UMl9lWpaFFskI6hPGIfeVukTdv6FyGs9a/2r2ycGGBaHl/1V/Tnahn hIcCfIRYwY8njnLbL9Gk8UzzKQEuMTylSpd0a7Ao6nqb8EpPPfEoIrScIBuAplkSeNVN caZQ== X-Gm-Message-State: AOAM531aLukwYsaWsddoN/kjwQ0rBZr4+1jIwEuiLxV0L4HHVBKMotnp GiMu2u0YvJM0HFcfwLEWmpXqEg== X-Google-Smtp-Source: ABdhPJyZEqeE8JGLDt1SDzcl1u4Uzct1P87Barg4cx3ZjYlOPsVlWnSpUfNGW3E+bV4p6JEsd8sTWg== X-Received: by 2002:adf:82cf:: with SMTP id 73mr121544wrc.382.1591742845751; Tue, 09 Jun 2020 15:47:25 -0700 (PDT) Received: from localhost (host86-128-12-16.range86-128.btcentralplus.com. [86.128.12.16]) by smtp.gmail.com with ESMTPSA id o9sm4438905wmh.37.2020.06.09.15.47.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jun 2020 15:47:24 -0700 (PDT) Date: Tue, 9 Jun 2020 23:47:23 +0100 From: Andrew Burgess To: Jim Wilson Cc: Tom Tromey , gdb-patches@sourceware.org Subject: Re: [RFC] gdb/riscv: Improved register alias name creation Message-ID: <20200609224723.GG2737@embecosm.com> References: <1584007257-14466-1-git-send-email-nelson.chu@sifive.com> <87r1upefg8.fsf@tromey.com> <20200609173040.GE2737@embecosm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Operating-System: Linux/5.6.15-200.fc31.x86_64 (x86_64) X-Uptime: 23:44:04 up 1 day, 12:50, X-Editor: GNU Emacs [ http://www.gnu.org/software/emacs ] X-Spam-Status: No, score=-5.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org 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: , X-List-Received-Date: Tue, 09 Jun 2020 22:47:28 -0000 * Jim Wilson [2020-06-09 13:14:58 -0700]: > On Tue, Jun 9, 2020 at 10:30 AM Andrew Burgess > wrote: > > Looking then at the final PRIV_SPEC_CLASS_* field for each alias then > > we can see that currently we only want to take the alias from > > PRIV_SPEC_CLASS_1P11. For now then this is what I'm using to filter > > the aliases within GDB. > > This will do the right thing, but looks a little funny. It isn't > quite the right way to express what we want. I do think it is OK for > now, but we will have to be careful when maintaining binutils that we > don't break this assumption, or remember to update it when necessary. I agree. I certainly open to any other ideas. Without making changes to the DECLARE_CSR_ALIAS macro (and I don't know what changes I would make) I saw my options as either: - Ignore DECLARE_CSR_ALIAS, and hard code the "approved" aliases into GDB. Then it'll never break, we just need to remember to update the hard coded list when riscv-opc.h changes, or - Filter the alias list from riscv-opc.h. I went with the second option, partly because, if, from now on RISC-V doesn't reuse old CSR offsets for new CSRs, then any new aliases should be compatible.... I hope. Anyway, always happy to take suggestions. Thanks, Andrew