aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorKazu Hirata <kazu@hxi.com>2002-02-13 12:51:53 +0000
committerKazu Hirata <kazu@gcc.gnu.org>2002-02-13 12:51:53 +0000
commit860391008114d895cce4bcf5d5cd33b503c2262f (patch)
tree3ba20eb512703ab8ebeaa8c0c5524db90d6bf751 /gcc
parente1429da0269cfdcdc4ffeb2914efc978f6b4488d (diff)
downloadgcc-860391008114d895cce4bcf5d5cd33b503c2262f.zip
gcc-860391008114d895cce4bcf5d5cd33b503c2262f.tar.gz
gcc-860391008114d895cce4bcf5d5cd33b503c2262f.tar.bz2
h8300.c (h8300_adjust_insn_length): Correct the length computation of movsi.
* 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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/config/h8300/h8300.c17
-rw-r--r--gcc/config/h8300/h8300.md2
3 files changed, 21 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 02fa558..6cfedfb 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,11 @@
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
operands[2] to register_operand.
diff --git a/gcc/config/h8300/h8300.c b/gcc/config/h8300/h8300.c
index dae7def..85a87b0 100644
--- a/gcc/config/h8300/h8300.c
+++ b/gcc/config/h8300/h8300.c
@@ -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;
+ }
}
}
diff --git a/gcc/config/h8300/h8300.md b/gcc/config/h8300/h8300.md
index 6cb1f5a..883abd5 100644
--- a/gcc/config/h8300/h8300.md
+++ b/gcc/config/h8300/h8300.md
@@ -535,7 +535,7 @@
}
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"