From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2985 invoked by alias); 17 Jul 2018 15:40:03 -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 2962 invoked by uid 89); 17 Jul 2018 15:40:02 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-4.4 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mail-wr1-f66.google.com Received: from mail-wr1-f66.google.com (HELO mail-wr1-f66.google.com) (209.85.221.66) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 17 Jul 2018 15:40:01 +0000 Received: by mail-wr1-f66.google.com with SMTP id h10-v6so1717781wre.6 for ; Tue, 17 Jul 2018 08:40:01 -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:user-agent; bh=NSv3EUdxBY3hosAM03PtCTIMv5lgIlJTvWp8Ld47Aow=; b=VAxxOmtRhgQsZh3AFulLmrla/A1kk3Y/rriKglVtdvqY0wQdkBRUMfh9d1F3MuTlm6 05MtNwBHtaP19Y7h4FDLO7zbl2Lh0OB4tGyjg8+B0XbNJCyahrUYiUjB1K/MGOz9YgtD Im7X+VR5dUUz5WBqS6y89SuyNAh2I5hjpp3AFxZ16wxGflrbfPMtqe1P0JJCrPfLyKld AtJWuORBCi+sQqPLHDeh3qOR9D5kbsAGZk52UPHWjAcSSaIsE/MQwarQOMSwU7soLNMW BgWPHKvwkZ3akUmlb5/rWjmW6k0eOl4WjVcIiSVay+p27RtIsGY/Zc3BD+wNX53XCDrL seWQ== Return-Path: Received: from localhost (host86-162-243-217.range86-162.btcentralplus.com. [86.162.243.217]) by smtp.gmail.com with ESMTPSA id u135-v6sm2427688wmf.2.2018.07.17.08.39.58 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 17 Jul 2018 08:39:58 -0700 (PDT) Date: Tue, 17 Jul 2018 15:40:00 -0000 From: Andrew Burgess To: Jim Wilson Cc: gdb-patches@sourceware.org Subject: Re: [PATCH] RISC-V: Correct legacy misa register number. Message-ID: <20180717153957.GH2888@embecosm.com> References: <20180704001334.27460-1-jimw@sifive.com> <20180704083410.GD2675@embecosm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Fortune: Do students of Zen Buddhism do Om-work? X-Editor: GNU Emacs [ http://www.gnu.org/software/emacs ] User-Agent: Mutt/1.9.2 (2017-12-15) X-IsSubscribed: yes X-SW-Source: 2018-07/txt/msg00519.txt.bz2 * Jim Wilson [2018-07-16 15:01:41 -0700]: > On Wed, Jul 4, 2018 at 1:34 AM, Andrew Burgess > wrote: > > * Jim Wilson [2018-07-03 17:13:34 -0700]: > > > >> The main purpose of this patch is to fix the legacy misa register number, which > >> is missing the +65 added to all of the other CSRs. > >> > >> This also changes DECLARE_CSR to use RISCV_FIRST_CSR_REGNUM instead of > >> RISCV_LAST_FP_REGNUM+1 to be consistent with riscv-tdep.c. > >> > >> I don't have access to legacy hardware that I can test the misa number change > >> with, but it has been tested on a riscv64-linux system using patched gdb and > >> patched kernel, since it isn't usable otherwise. > >> > >> Jim > >> > >> gdb/ > >> * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of > >> RISCV_LAST_FP_REGNUM + 1. > >> (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM. > > > > Regardless of the discussion about RISCV_CSR_LEGACY_MISA_REGNUM > > could you push the change to DECLARE_CSR anyway please. I think this > > is a good clean up and it's unrelated to the other change. > > Tim Newsome confirmed that there should be no special behavior in > OpenOCD to handle the legacy misa register number. I'd like approval > to commit the whole patch. It is a bug fix for live code, and a minor > consistency cleanup. I approve then :) Thanks, Andrew