From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 56873 invoked by alias); 26 Feb 2019 18:40:27 -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 56854 invoked by uid 89); 26 Feb 2019 18:40:27 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-spam-relays-external:sk:mail-vk, H*RU:sk:mail-vk X-HELO: mail-vk1-f193.google.com Received: from mail-vk1-f193.google.com (HELO mail-vk1-f193.google.com) (209.85.221.193) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 26 Feb 2019 18:40:25 +0000 Received: by mail-vk1-f193.google.com with SMTP id w85so1331629vkw.11 for ; Tue, 26 Feb 2019 10:40:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=RfCku/BbzBZijH/IhzDfWMhREp17OTPx2M1f9OPeJD0=; b=CeQ3yuoxT5YqjWb4dnNs/xlD3j9Mnp5uOCDdaLKucpsQWLW3cPpIaMM7jCVeN3r/cL akb9h3E2WxESnf2WiSIVavAt+28g9cslELGYiN2JOK0rtyygAH5kfhCMh0uCKPM7FBnd bZ53FjLt1B65qeMz+j0/NNzvoK8NonS7Bix2ZiAcrj40Wi0umBMHT3evCdy/uxpop5Lf tOfGTA+d4WC7Re6ua6IHAuhs9c1LHKeQCUNlM/MYLHvMb53d4RlldXxDLosXwRPDGenf wYJkXjYV3OFz8ttVp1Bt2memizka1FOrIyYcEoeOhSsc5EL8k3Ock/gzA9qe8Ahxf2bu 8MEg== MIME-Version: 1.0 References: <20181108160745.24600-1-andrew.burgess@embecosm.com> <20181114145756.GM16539@embecosm.com> <87r2bz67ol.fsf@tromey.com> <20190223205116.GB15942@embecosm.com> <20190226050220.GA30982@adacore.com> <20190226182201.GH10887@embecosm.com> In-Reply-To: <20190226182201.GH10887@embecosm.com> From: Jim Wilson Date: Tue, 26 Feb 2019 18:40:00 -0000 Message-ID: Subject: Re: [PATCH] gdb/riscv: Add target description support To: Andrew Burgess Cc: Joel Brobecker , Tom Tromey , gdb-patches@sourceware.org, Palmer Dabbelt , John Baldwin Content-Type: text/plain; charset="UTF-8" X-SW-Source: 2019-02/txt/msg00448.txt.bz2 On Tue, Feb 26, 2019 at 10:22 AM Andrew Burgess wrote: > > * Jim Wilson [2019-02-26 09:26:04 -0800]: > > > On Mon, Feb 25, 2019 at 9:02 PM Joel Brobecker wrote: > > > I think if QEMU sends an XML with the various register description, > > > then whatever numbering GDB uses by default will no longer apply, > > > and so things should just-work(tm) regardless of what GDB decided > > > to do in terms of register numbering. > > > > Yes, it shouldn't affect qemu until we try to copy the new gdb xml > > files into qemu, at which point we might need to update the qemu > > gdbstub support to work with the changed register numbers. We can > > worry about this later. This issues doesn't need to delay any gdb > > work. > > Jim, if you're happy then I'll go ahead and merge the fix-up patch. > > I'll summarise the changes in the patch, and what impact I think they > will have now I've had a look at the QEMU code (all these changes are > identical for 32 and 64 bit)... > > (1) Added forced register number for register 'zero'. This will > have no impact the default register numbering before had the > x-registers numbered from 0. I added this just to make the > numbering explicit. > > (2) Added forced register number 33 to the first floating pointer > register ($ft0). Again, this should have no impact as the > f-registers were traditionally numbered after the 32 x-registers and > the program-counter. > > (3) Renumbered fflags, frm, and fcsr as 66, 67, and 68. This is > where the issues will appear for QEMU, Jim's QEMU patch had adopted > the "new" default numbering which placed these registers after the > floating point registers (so they had become 65, 66, and 67). > > If we want backward compatibility then we should merge this GDB patch, > and fix QEMU asap to avoid having two incompatible versions in the > wild. > > What I don't understand about all this is why QEMU appears to be > discarding one of the big benefits of xml register descriptions; the > ability to disconnect their register numbering from GDB's register > numbering. > > Jim: I think your comments above indicate you want my fix merged, but > if you could just confirm then I'll get it merged. > > Thanks, > Andrew