From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33550) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XpD2C-0002Yq-9w for qemu-devel@nongnu.org; Fri, 14 Nov 2014 04:19:20 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XpD27-0002Vy-Px for qemu-devel@nongnu.org; Fri, 14 Nov 2014 04:19:16 -0500 Received: from mailapp01.imgtec.com ([195.59.15.196]:38723) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XpD27-0002Vs-JY for qemu-devel@nongnu.org; Fri, 14 Nov 2014 04:19:11 -0500 Message-ID: <5465C905.8050303@imgtec.com> Date: Fri, 14 Nov 2014 09:19:01 +0000 From: Leon Alrae MIME-Version: 1.0 References: In-Reply-To: Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] mips/gdbstub: Correct the handling of register #72 on writes List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Maciej W. Rozycki" , qemu-devel@nongnu.org Cc: Aurelien Jarno On 03/11/2014 18:47, Maciej W. Rozycki wrote: > Fix an off-by-one error in `mips_cpu_gdb_write_register' for register > #72 that is handled further down in that function rather than here, > matching how `mips_cpu_gdb_read_register' handles it. This register > slot is a fake anyway, there's nothing in hardware that corresponds to > it. > > Signed-off-by: Maciej W. Rozycki > --- > I have a further change down the queue to clean up > `mips_cpu_gdb_read_register' and `mips_cpu_gdb_write_register' and make > them more consistent with respect to each other as far as the handling > of FP registers is concerned. For now please apply this obvious change. > Thanks. > > Maciej > > qemu-mips-fpreg72.diff > Index: qemu-git-trunk/target-mips/gdbstub.c > =================================================================== > --- qemu-git-trunk.orig/target-mips/gdbstub.c 2013-07-29 11:23:07.048742983 +0100 > +++ qemu-git-trunk/target-mips/gdbstub.c 2014-10-27 04:17:19.159003270 +0000 > @@ -97,7 +97,7 @@ int mips_cpu_gdb_write_register(CPUState > return sizeof(target_ulong); > } > if (env->CP0_Config1 & (1 << CP0C1_FP) > - && n >= 38 && n < 73) { > + && n >= 38 && n < 72) { > if (n < 70) { > if (env->CP0_Status & (1 << CP0St_FR)) { > env->active_fpu.fpr[n - 38].d = tmp; > Reviewed-by: Leon Alrae