aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKazu Hirata <kazu@hxi.com>2002-02-08 00:26:36 +0000
committerKazu Hirata <kazu@gcc.gnu.org>2002-02-08 00:26:36 +0000
commitae19f5ef347c0606bc2b87cb6fd98953a6000b83 (patch)
tree37a719d6b1ccb425bf04075676a94bf3ac8ccce5
parent21e0995208e685804f2a1ef173b94a50c0a597c7 (diff)
downloadgcc-ae19f5ef347c0606bc2b87cb6fd98953a6000b83.zip
gcc-ae19f5ef347c0606bc2b87cb6fd98953a6000b83.tar.gz
gcc-ae19f5ef347c0606bc2b87cb6fd98953a6000b83.tar.bz2
h8300.c (two_insn_adds_subs_operand): Revise a comment.
* config/h8300/h8300.c (two_insn_adds_subs_operand): Revise a comment. Accept HImode only if TARGET_H8300. From-SVN: r49597
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config/h8300/h8300.c11
2 files changed, 10 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 319bbd0..6b5136a 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2002-02-07 Kazu Hirata <kazu@hxi.com>
+
+ * config/h8300/h8300.c (two_insn_adds_subs_operand): Revise a
+ comment. Accept HImode only if TARGET_H8300.
+
2002-02-07 Eric Christopher <echristo@redhat.com>
* config/mips/crtn.asm: Cleanup #ifdefs.
diff --git a/gcc/config/h8300/h8300.c b/gcc/config/h8300/h8300.c
index ea673fc..f861290 100644
--- a/gcc/config/h8300/h8300.c
+++ b/gcc/config/h8300/h8300.c
@@ -632,12 +632,11 @@ two_insn_adds_subs_operand (op, mode)
}
else
{
- /* A constant addition/subtraction takes 2 states in
- QImode. It takes 6 states in HImode, requiring the
- constant to be loaded to a register first, and a lot more
- in SImode. Thus the only case we can win is when either
- HImode or SImode is used. */
- if (mode != QImode
+ /* We do not profit directly by splitting addition or
+ subtraction of 3 and 4. However, since these are
+ implemented as a sequence of adds or subs, they do not
+ clobber (cc0) unlike a sequence of add.b and add.x. */
+ if (mode == HImode
&& (value == 2 + 1
|| value == 2 + 2))
return 1;