* gdb.base/attach.exp (do_attach_tests): Don't forget to kill second
[deliverable/binutils-gdb.git] / opcodes / h8300-dis.c
index ea8d30b457c657a7f39550cc3717322a4d332526..258791984e728b7883af08d8f4a2e6a4508e5a97 100644 (file)
@@ -45,25 +45,6 @@ static void extract_immediate PARAMS ((FILE *,
                                       int *, int *,
                                       const struct h8_opcode *));
 
-static void print_colon_thingie PARAMS ((op_type *));
-
-static void
-print_colon_thingie (op_type *nib)
-{
-  switch (*nib & SIZE) {
-  case L_2:    fprintf (stdout, "2");  break;
-  case L_3:
-  case L_3NZ:  fprintf (stdout, "3");  break;
-  case L_4:    fprintf (stdout, "4");  break;
-  case L_5:    fprintf (stdout, "5");  break;
-  case L_8:    fprintf (stdout, "8");  break;
-  case L_16:
-  case L_16U:  fprintf (stdout, "16"); break;
-  case L_24:   fprintf (stdout, "24"); break;
-  case L_32:   fprintf (stdout, "32"); break;
-  }
-}
-
 /* Run through the opcodes and sort them into order to make them easy
    to disassemble.  */
 
@@ -735,6 +716,17 @@ bfd_h8_disassemble (addr, info, mach)
                    int hadone = 0;
                    int nargs;
 
+                   /* Special case handling for the adds and subs instructions
+                      since in H8 mode thay can only take the r0-r7 registers but
+                      in other (higher) modes they can take the er0-er7 registers
+                      as well.  */
+                   if (strcmp (qi->opcode->name, "adds") == 0
+                       || strcmp (qi->opcode->name, "subs") == 0)
+                     {
+                       outfn (stream, "#%d,%s", cst[0], pregnames[regno[1] & 0x7]);
+                       return qi->length;
+                     }
+
                    for (nargs = 0; 
                         nargs < 3 && args[nargs] != (op_type) E; 
                         nargs++)
This page took 0.026716 seconds and 4 git commands to generate.