Patchwork MIPS/GDB: Correct stub handling of CP1 FIR

login
register
mail settings
Submitter Maciej W. Rozycki
Date June 8, 2012, 1:08 a.m.
Message ID <alpine.DEB.1.10.1206080138180.23962@tp.orcam.me.uk>
Download mbox | patch
Permalink /patch/163704/
State New
Headers show

Comments

Maciej W. Rozycki - June 8, 2012, 1:08 a.m.
The CP1 FIR register is read-only, ignore any write attempts from the GDB 
stub.

Signed-off-by: Maciej W. Rozycki <macro@codesourcery.com>
---

 Definitely obvious, please apply.

  Maciej

qemu-mips-fir.diff
Richard Henderson - June 12, 2012, 3:16 p.m.
On 2012-06-07 18:08, Maciej W. Rozycki wrote:
>  The CP1 FIR register is read-only, ignore any write attempts from the GDB 
> stub.
> 
> Signed-off-by: Maciej W. Rozycki <macro@codesourcery.com>

Reviewed-by: Richard Henderson <rth@twiddle.net>


r~

Patch

Index: qemu-git-trunk/gdbstub.c
===================================================================
--- qemu-git-trunk.orig/gdbstub.c	2012-06-08 01:11:04.000000000 +0100
+++ qemu-git-trunk/gdbstub.c	2012-06-08 01:42:22.865584444 +0100
@@ -1130,7 +1130,9 @@  static int cpu_gdb_write_register(CPUMIP
             /* set rounding mode */
             RESTORE_ROUNDING_MODE;
             break;
-        case 71: env->active_fpu.fcr0 = tmp; break;
+        case 71:
+            /* FIR is read-only.  Ignore writes.  */
+            break;
         }
         return sizeof(target_ulong);
     }