Added pattern for cmp A,A
authorceriel <none@none>
Tue, 27 Feb 1990 16:31:10 +0000 (16:31 +0000)
committerceriel <none@none>
Tue, 27 Feb 1990 16:31:10 +0000 (16:31 +0000)
mach/m68020/top/table

index 719d8b5..d216995 100644 (file)
@@ -78,6 +78,10 @@ move.l DREG,DREG2 : ANY A,DREG2 : move.l DREG2,DREG
                {no_part(DREG2,A)}      ->      ANY A,DREG : move.l DREG,DREG2 ;
 
 /* change some compares to tests */
+cmp.w A,A                              ->      tst.w A ;
+cmp.l A,A                              ->      tst.l A ;
+cmp.b A,A                              ->      tst.b A ;
+
 cmp.w #0,D : beq LAB                   ->      tst.w D : beq LAB ;
 cmp.w #0,D : bne LAB                   ->      tst.w D : bne LAB ;
 cmp.w #0,D : blt LAB                   ->      tst.w D : bgt LAB ;
@@ -189,24 +193,14 @@ int isshift_once(s, c1, c2)
        register int i = 0;
        long val = atol(s), pow = 1;
 
-       while (i <= 8) {
-               if (pow & val) {
-                       val -= pow;
-                       sprintf(c1, "%d", i);
-                       strcpy(c2, "0");
-                       if (val == 0) return 1;
-                       return 0;
-               }
-               pow <<= 1;
-               i++;
-       }
-       i = 1;
-       strcpy(c1, "8");
-       while (i <= 8) {
+       while (i <= 16) {
                if (pow & val) {
                        val -= pow;
-                       sprintf(c2, "%d", i);
-                       if (val == 0) return 1;
+                       if (val == 0) {
+                               sprintf(c1, "%d", i <= 8 ? i : 8);
+                               strcpy(c2, "%d", i <= 8 ? 0 : i - 8);
+                               return 1;
+                       }
                        return 0;
                }
                pow <<= 1;