This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[patch] h8300.c: Revise a comment.
- From: Kazu Hirata <kazu at hxi dot com>
- To: gcc-patches at gcc dot gnu dot org
- Subject: [patch] h8300.c: Revise a comment.
Hi,
Attached is a patch to revise a comment in two_insn_adds_subs_operand
config/h8300/h8300.c. The patch also changes "mode != QImode" to
"mode == HImode" as this function is used only in HImode.
Tested on h8300 port. Committed.
Kazu Hirata
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.
Index: h8300.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/h8300/h8300.c,v
retrieving revision 1.109
diff -c -r1.109 h8300.c
*** h8300.c 2002/02/03 01:36:13 1.109
--- h8300.c 2002/02/08 00:22:13
***************
*** 632,643 ****
}
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
&& (value == 2 + 1
|| value == 2 + 2))
return 1;
--- 632,642 ----
}
else
{
! /* 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;