* compile.c (decode): Distinguish inc/dec.[wl] and adds/subs
authorAndrew Cagney <cagney@redhat.com>
Thu, 27 Jul 2000 09:39:50 +0000 (09:39 +0000)
committerAndrew Cagney <cagney@redhat.com>
Thu, 27 Jul 2000 09:39:50 +0000 (09:39 +0000)
correctly.

sim/h8300/ChangeLog
sim/h8300/compile.c

index e3885dedb741e35f591b273afca651875e2394bb..46f9972287866a2028df3892b547207e61359f75 100644 (file)
@@ -1,3 +1,8 @@
+2000-06-15  Kazu Hirata  <kazu@hxi.com>
+
+       * compile.c (decode): Distinguish inc/dec.[wl] and adds/subs
+       correctly.
+
 2000-06-20  Frank Ch. Eigler  <fche@redhat.com>
 
        * compile.c: Don't include "wait.h".
index bbd28e50084f8a27442cae59fea677882fd60313..3a22190fefc65f2443bf99c76816606fbb05bed1 100644 (file)
@@ -219,7 +219,10 @@ decode (addr, data, dst)
 
              if (looking_for & DBIT)
                {
-                 if ((looking_for & 5) != (thisnib & 5))
+                 /* Exclude adds/subs by looking at bit 0 and 2, and
+                     make sure the operand size, either w or l,
+                     matches by looking at bit 1.  */
+                 if ((looking_for & 7) != (thisnib & 7))
                    goto fail;
 
                  abs = (thisnib & 0x8) ? 2 : 1;
@@ -292,6 +295,8 @@ decode (addr, data, dst)
                    case 0:
                      abs = 1;
                      break;
+                   default:
+                     goto fail;
                    }
                }
              else if (looking_for & L_8)