h8300.c (h8300_adjust_insn_length): Correct the length computation of movsi.
authorKazu Hirata <kazu@hxi.com>
Wed, 13 Feb 2002 12:51:53 +0000 (12:51 +0000)
committerKazu Hirata <kazu@gcc.gnu.org>
Wed, 13 Feb 2002 12:51:53 +0000 (12:51 +0000)
* config/h8300/h8300.c (h8300_adjust_insn_length): Correct the
length computation of movsi.
* config/h8300/h8300.md (movsi_h8300hs): Correct the length.

From-SVN: r49728

gcc/ChangeLog
gcc/config/h8300/h8300.c
gcc/config/h8300/h8300.md

index 02fa558cbf603c30f0c36f00cc8b435f7b61b660..6cfedfb6704b089512b6a512a77a83f0716ecb74 100644 (file)
@@ -1,3 +1,9 @@
+2002-02-13  Kazu Hirata  <kazu@hxi.com>
+
+       * config/h8300/h8300.c (h8300_adjust_insn_length): Correct the
+       length computation of movsi.
+       * config/h8300/h8300.md (movsi_h8300hs): Correct the length.
+
 2002-02-13  Kazu Hirata  <kazu@hxi.com>
 
        * config/h8300/h8300.md (subqi3): Tighten the predicate for
index dae7defb6f56b977b97f4a560a240972176a7088..85a87b006859ba93390b07cc0526a58ffaed4f4e 100644 (file)
@@ -3224,10 +3224,21 @@ h8300_adjust_insn_length (insn, length)
        {
          if (val == (val & 0xff)
              || val == (val & 0xff00))
-           return -6;
+           return 4 - 6;
 
-         if (val == -4 || val == -2 || val == -1)
-           return -6;
+         switch (val & 0xffffffff)
+           {
+           case 0xffffffff:
+           case 0xfffffffe:
+           case 0xfffffffc:
+           case 0x0000ffff:
+           case 0x0000fffe:
+           case 0xffff0000:
+           case 0xfffe0000:
+           case 0x00010000:
+           case 0x00020000:
+             return 4 - 6;
+           }
        }
     }
 
index 6cb1f5afe440871831de2d3e344574ccd06ffedf..883abd5c89e56fac86849465e3bb7bf08b0dbacc 100644 (file)
     }
    return \"mov.l      %S1,%S0\";
 }"
-  [(set_attr "length" "2,2,10,10,10,4,4,2,6,4")
+  [(set_attr "length" "2,2,6,10,10,4,4,2,6,4")
    (set_attr "cc" "set_zn,set_znv,clobber,set_znv,set_znv,set_znv,set_znv,none_0hit,none_0hit,set_znv")])
 
 (define_insn "movsf_h8300h"