OSDN Git Service

* linux-target.c (mips_singlestep): Don't any consider cop0 or cop1x
authorkevinb <kevinb>
Fri, 9 May 2003 22:06:12 +0000 (22:06 +0000)
committerkevinb <kevinb>
Fri, 9 May 2003 22:06:12 +0000 (22:06 +0000)
instructions to be conditional branches.  Expand set of cop1
opcodes considered to be conditional branches.

rda/unix/ChangeLog
rda/unix/linux-target.c

index fbcb209..619e56c 100644 (file)
@@ -1,3 +1,9 @@
+2003-05-09  Kevin Buettner  <kevinb@redhat.com>
+
+       * linux-target.c (mips_singlestep): Don't any consider cop0 or cop1x
+       instructions to be conditional branches.  Expand set of cop1
+       opcodes considered to be conditional branches.
+
 2003-05-08  Kevin Buettner  <kevinb@redhat.com>
 
        * linux-target.c (mips_singlestep): Don't interpret all coprocessor
index 7f0122d..5291f76 100644 (file)
@@ -2640,18 +2640,29 @@ mips_singlestep (struct gdbserv *serv, pid_t pid, int sig)
     targ |= (insn.j_format.target << 2);
     break;
 
-  /* Some cop instructions are conditional... */
-  case cop0_op:
+  /* Some cop1 instructions are conditional branches.  */
   case cop1_op:
+    if (insn.i_format.rs == bc_op
+        || insn.i_format.rs == bc_op + 1  /* e.g, BC1ANY2 on MIPS-3D */
+       || insn.i_format.rs == bc_op + 2  /* e.g, BC1ANY4 on MIPS-3D */)
+      {
+       is_branch = is_cond = 1;
+       targ += 4 + (insn.i_format.simmediate << 2);
+      }
+    break;
+
+  /* Some cop2 instructions are conditional branches.  */
   case cop2_op:
-    if (insn.i_format.rs != bc_op)
-      break;
-    else
-      ; /* fall through... */
+    /* MIPS32 Architecture For Programmers Volume II, rev 1.90 documents
+       bc2f, bc2fl, bc2t, and bc2tl.  */
+    if (insn.i_format.rs == bc_op)
+      {
+       is_branch = is_cond = 1;
+       targ += 4 + (insn.i_format.simmediate << 2);
+      }
+    break;
 
-  /*
-   * These are conditional.
-   */
+  /* Other conditional branches...  */
   case beq_op:
   case beql_op:
   case bne_op:
@@ -2660,7 +2671,6 @@ mips_singlestep (struct gdbserv *serv, pid_t pid, int sig)
   case blezl_op:
   case bgtz_op:
   case bgtzl_op:
-  case cop1x_op:
     is_branch = is_cond = 1;
     targ += 4 + (insn.i_format.simmediate << 2);
     break;