This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Look for FIR in the last FreeBSD/mips floating-point register.
- From: John Baldwin <jhb at freebsd dot org>
- To: gdb-patches at sourceware dot org
- Cc: Simon Marchi <simon dot marchi at polymtl dot ca>
- Date: Tue, 06 Jun 2017 10:46:34 -0700
- Subject: Re: [PATCH] Look for FIR in the last FreeBSD/mips floating-point register.
- Authentication-results: sourceware.org; auth=none
- References: <20170531165803.50633-1-jhb@FreeBSD.org> <bc561f0f53aa3438138166459bbf398e@polymtl.ca>
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