Treat adds and subs as a special case
authorNick Clifton <nickc@redhat.com>
Thu, 15 Apr 2004 08:55:27 +0000 (08:55 +0000)
committerNick Clifton <nickc@redhat.com>
Thu, 15 Apr 2004 08:55:27 +0000 (08:55 +0000)
opcodes/ChangeLog
opcodes/h8300-dis.c

index 65b0898b0d1543fb1a6379c3ffc06747ad6c2c35..3c085ea12ded026c673d182511bbd23ffad8cda4 100644 (file)
@@ -1,3 +1,8 @@
+2004-04-15  Anil Paranjpe  <anilp1@kpitcummins.com>
+       
+       * h8300-dis.c (bfd_h8_disassemble) : Treat "adds" & "subs"
+       separately.
+
 2004-03-30  Kazuhiro Inaoka  <inaoka.kazuhiro@renesas.com>
 
        * m32r-asm.c: Regenerate.
index 895a9efbdc102d85013616d4b49de9b0d7e25cfd..258791984e728b7883af08d8f4a2e6a4508e5a97 100644 (file)
@@ -716,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++)