This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[patch] Fix typos and warnings in h8300 port.
- From: Kazu Hirata <kazu at hxi dot com>
- To: gcc-patches at gcc dot gnu dot org
- Subject: [patch] Fix typos and warnings in h8300 port.
Hi,
Attached is a patch to fix typos and warnings in h8300 port.
Tested and committed.
Kazu Hirata
2002-01-02 Kazu Hirata <kazu@hxi.com>
* config/h8300/fixunssfsi.c: Update copyright.
Fix comment typos.
Fix formatting.
* config/h8300/h8300.c: Update copyright.
Eliminate warnings.
Index: fixunssfsi.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/h8300/fixunssfsi.c,v
retrieving revision 1.1
diff -u -r1.1 fixunssfsi.c
--- fixunssfsi.c 2001/08/30 17:51:04 1.1
+++ fixunssfsi.c 2002/01/02 07:52:54
@@ -1,6 +1,6 @@
/* More subroutines needed by GCC output code on some machines. */
/* Compile this one with gcc. */
-/* Copyright (C) 1989, 1992, 2001 Free Software Foundation, Inc.
+/* Copyright (C) 1989, 1992, 2001, 2002 Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -29,15 +29,15 @@
Boston, MA 02111-1307, USA. */
/* The libgcc2.c implementation gets confused by our type setup and creates
- a directly recursive call, so we do our own implementation. For the h8300,
- that's in lib1funcs.asm, for h8300h / h8s, it's here. */
+ a directly recursive call, so we do our own implementation. For
+ the H8/300, that's in lib1funcs.asm, for H8/300H and H8/S, it's here. */
#ifndef __H8300__
long
__fixunssfsi (float a)
{
if (a >= (float) 32768L)
- return (long) (a -32768L) +32768L;
+ return (long) (a - 32768L) + 32768L;
return (long) a;
}
#endif
Index: h8300.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/h8300/h8300.c,v
retrieving revision 1.89
diff -u -r1.89 h8300.c
--- h8300.c 2001/12/18 05:12:29 1.89
+++ h8300.c 2002/01/02 07:52:55
@@ -1,6 +1,6 @@
/* Subroutines for insn-output.c for Hitachi H8/300.
- Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
- Free Software Foundation, Inc.
+ Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+ 2001, 2002 Free Software Foundation, Inc.
Contributed by Steve Chamberlain (sac@cygnus.com),
Jim Wilson (wilson@cygnus.com), and Doug Evans (dje@cygnus.com).
@@ -2519,6 +2519,8 @@
case SHIFT_LSHIFTRT:
info->special = "shll.w\t%e0\n\tmov.w\t%e0,%f0\n\txor.w\t%e0,%e0\n\trotxl.l\t%S0";
goto end;
+ case SHIFT_ASHIFTRT:
+ abort ();
}
}
else if ((TARGET_H8300 && count == 16)
@@ -2933,7 +2935,7 @@
/* Determine the faster direction. After this phase, amount will be
at most a half of GET_MODE_BITSIZE (mode). */
- if ((unsigned int) amount > GET_MODE_BITSIZE (mode) / 2)
+ if ((unsigned int) amount > GET_MODE_BITSIZE (mode) / 2U)
{
/* Flip the direction. */
amount = GET_MODE_BITSIZE (mode) - amount;
@@ -3435,7 +3437,7 @@
/* Determine the faster direction. After this phase, amount
will be at most a half of GET_MODE_BITSIZE (mode). */
- if ((unsigned int) amount > GET_MODE_BITSIZE (mode) / 2)
+ if ((unsigned int) amount > GET_MODE_BITSIZE (mode) / 2U)
/* Flip the direction. */
amount = GET_MODE_BITSIZE (mode) - amount;