From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 128906 invoked by alias); 6 Jun 2017 17:49:02 -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 127207 invoked by uid 89); 6 Jun 2017 17:48:56 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_SOFTFAIL autolearn=no version=3.3.2 spammy=H*F:D*freebsd.org, Monday X-HELO: mail.baldwin.cx Received: from bigwig.baldwin.cx (HELO mail.baldwin.cx) (96.47.65.170) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 06 Jun 2017 17:48:53 +0000 Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by mail.baldwin.cx (Postfix) with ESMTPSA id BBD9810AFA3; Tue, 6 Jun 2017 13:48:55 -0400 (EDT) From: John Baldwin To: gdb-patches@sourceware.org Cc: Simon Marchi Subject: Re: [PATCH] Look for FIR in the last FreeBSD/mips floating-point register. Date: Tue, 06 Jun 2017 17:49:00 -0000 Message-ID: <5015074.IOQvVsxonZ@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.0-STABLE; KDE/4.14.10; amd64; ; ) In-Reply-To: References: <20170531165803.50633-1-jhb@FreeBSD.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-IsSubscribed: yes X-SW-Source: 2017-06/txt/msg00153.txt.bz2 On Monday, June 05, 2017 10:27:48 PM Simon Marchi wrote: > On 2017-05-31 18:58, John Baldwin wrote: > > + for (i = 0; i < 32; i++) > > + if (regnum == fp0num + i || regnum == -1) > > + mips_fbsd_collect_reg (regcache, fp0num + i, > > + regs + i * regsize, regsize); > > + if (regnum == mips_regnum (gdbarch)->fp_control_status || regnum == > > -1) > > + mips_fbsd_collect_reg (regcache, mips_regnum > > (gdbarch)->fp_control_status, > > + regs + 32 * regsize, regsize); > > + if (regnum == mips_regnum (gdbarch)->fp_implementation_revision > > + || regnum == -1) > > + mips_fbsd_collect_reg (regcache, > > + mips_regnum (gdbarch)->fp_implementation_revision, > > + regs + 33 * regsize, regsize); > > I'm just curious to know why you changed this. They previous code > assumed that the 32 floating-point registers and the control register > were contiguous their numbering. Is this no longer true with the new > register, or is it just for clarity that you separately handle the > different kinds of registers? Just for clarity. mips-tdep.c does happen to layout the registers such that fsr and fir are consecutive after fp31, but fsr and fir do have separate entries in the mips_regnum structure. -- John Baldwin