aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorKazu Hirata <kazu@cs.umass.edu>2003-06-08 19:30:59 +0000
committerKazu Hirata <kazu@gcc.gnu.org>2003-06-08 19:30:59 +0000
commit5d39821d113805e918072e3bb6c91a28a6f66188 (patch)
tree4ae6ed0645bbea77e156417be6247731a8f3f94f /gcc
parent8fc98a46677ab101cc28d7a95e80706e71bd6b69 (diff)
downloadgcc-5d39821d113805e918072e3bb6c91a28a6f66188.zip
gcc-5d39821d113805e918072e3bb6c91a28a6f66188.tar.gz
gcc-5d39821d113805e918072e3bb6c91a28a6f66188.tar.bz2
h8300.h (LONG_LONG_TYPE_SIZE): Set to 64.
* config/h8300/h8300.h (LONG_LONG_TYPE_SIZE): Set to 64. * config/h8300/t-h8300 (LIB1ASMFUNCS): Remove _floatdisf _fixsfdi _fixunssfdi. (LIB2FUNCS_EXTRA): Add entries for clzhi2, ctzhi2, parityhi2, popcounthi2. (TARGET_LIBGCC2_CFLAGS): Remove -DDI=SI. * config/h8300/clzhi2.c: New. * config/h8300/ctzhi2.c: Likewise. * config/h8300/parityhi2.c: Likewise. * config/h8300/popcounthi2.c: Likewise. From-SVN: r67636
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog13
-rw-r--r--gcc/config/h8300/clzhi2.c38
-rw-r--r--gcc/config/h8300/ctzhi2.c38
-rw-r--r--gcc/config/h8300/h8300.h2
-rw-r--r--gcc/config/h8300/parityhi2.c39
-rw-r--r--gcc/config/h8300/popcounthi2.c39
-rw-r--r--gcc/config/h8300/t-h830013
7 files changed, 177 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 85a12db..33c4a23 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,16 @@
+2003-06-08 Kazu Hirata <kazu@cs.umass.edu>
+
+ * config/h8300/h8300.h (LONG_LONG_TYPE_SIZE): Set to 64.
+ * config/h8300/t-h8300 (LIB1ASMFUNCS): Remove _floatdisf
+ _fixsfdi _fixunssfdi.
+ (LIB2FUNCS_EXTRA): Add entries for clzhi2, ctzhi2, parityhi2,
+ popcounthi2.
+ (TARGET_LIBGCC2_CFLAGS): Remove -DDI=SI.
+ * config/h8300/clzhi2.c: New.
+ * config/h8300/ctzhi2.c: Likewise.
+ * config/h8300/parityhi2.c: Likewise.
+ * config/h8300/popcounthi2.c: Likewise.
+
Sun Jun 8 15:52:17 CEST 2003 Jan Hubicka <jh@suse.cz>
* i386.md (subsi_3_zext, sse2_nandv2di3): Fix predicates.
diff --git a/gcc/config/h8300/clzhi2.c b/gcc/config/h8300/clzhi2.c
new file mode 100644
index 0000000..b6e5861
--- /dev/null
+++ b/gcc/config/h8300/clzhi2.c
@@ -0,0 +1,38 @@
+/* The implementation of __clzhi2.
+ Copyright (C) 2003 Free Software Foundation, Inc.
+
+This file is part of GNU CC.
+
+GNU CC is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+In addition to the permissions in the GNU General Public License, the
+Free Software Foundation gives you unlimited permission to link the
+compiled version of this file into combinations with other programs,
+and to distribute those combinations without any restriction coming
+from the use of this file. (The General Public License restrictions
+do apply in other respects; for example, they cover modification of
+the file, and distribution when not linked into a combine
+executable.)
+
+GNU CC is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU CC; see the file COPYING. If not, write to
+the Free Software Foundation, 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA. */
+
+int
+__clzhi2 (unsigned short x)
+{
+ int i;
+ for (i = 0; i < 16; i++)
+ if (x & ((unsigned short) 1 << (15 - i)))
+ break;
+ return i;
+}
diff --git a/gcc/config/h8300/ctzhi2.c b/gcc/config/h8300/ctzhi2.c
new file mode 100644
index 0000000..b487fc5
--- /dev/null
+++ b/gcc/config/h8300/ctzhi2.c
@@ -0,0 +1,38 @@
+/* The implementation of __ctzhi2.
+ Copyright (C) 2003 Free Software Foundation, Inc.
+
+This file is part of GNU CC.
+
+GNU CC is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+In addition to the permissions in the GNU General Public License, the
+Free Software Foundation gives you unlimited permission to link the
+compiled version of this file into combinations with other programs,
+and to distribute those combinations without any restriction coming
+from the use of this file. (The General Public License restrictions
+do apply in other respects; for example, they cover modification of
+the file, and distribution when not linked into a combine
+executable.)
+
+GNU CC is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU CC; see the file COPYING. If not, write to
+the Free Software Foundation, 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA. */
+
+int
+__ctzhi2 (unsigned short x)
+{
+ int i;
+ for (i = 0; i < 16; i++)
+ if (x & ((unsigned short) 1 << i))
+ break;
+ return i;
+}
diff --git a/gcc/config/h8300/h8300.h b/gcc/config/h8300/h8300.h
index e979e97..82b4d76 100644
--- a/gcc/config/h8300/h8300.h
+++ b/gcc/config/h8300/h8300.h
@@ -244,7 +244,7 @@ extern int target_flags;
#define SHORT_TYPE_SIZE 16
#define INT_TYPE_SIZE (TARGET_INT32 ? 32 : 16)
#define LONG_TYPE_SIZE 32
-#define LONG_LONG_TYPE_SIZE 32
+#define LONG_LONG_TYPE_SIZE 64
#define FLOAT_TYPE_SIZE 32
#define DOUBLE_TYPE_SIZE 32
#define LONG_DOUBLE_TYPE_SIZE DOUBLE_TYPE_SIZE
diff --git a/gcc/config/h8300/parityhi2.c b/gcc/config/h8300/parityhi2.c
new file mode 100644
index 0000000..d1be003
--- /dev/null
+++ b/gcc/config/h8300/parityhi2.c
@@ -0,0 +1,39 @@
+/* The implementation of __parityhi2.
+ Copyright (C) 2003 Free Software Foundation, Inc.
+
+This file is part of GNU CC.
+
+GNU CC is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+In addition to the permissions in the GNU General Public License, the
+Free Software Foundation gives you unlimited permission to link the
+compiled version of this file into combinations with other programs,
+and to distribute those combinations without any restriction coming
+from the use of this file. (The General Public License restrictions
+do apply in other respects; for example, they cover modification of
+the file, and distribution when not linked into a combine
+executable.)
+
+GNU CC is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU CC; see the file COPYING. If not, write to
+the Free Software Foundation, 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA. */
+
+int
+__parityhi2 (unsigned short x)
+{
+ int i;
+ int count = 0;
+ for (i = 0; i < 16; i++)
+ if (x & ((unsigned short) 1 << i))
+ count++;
+ return count & 1;
+}
diff --git a/gcc/config/h8300/popcounthi2.c b/gcc/config/h8300/popcounthi2.c
new file mode 100644
index 0000000..22566a3
--- /dev/null
+++ b/gcc/config/h8300/popcounthi2.c
@@ -0,0 +1,39 @@
+/* The implementation of __popcounthi2.
+ Copyright (C) 2003 Free Software Foundation, Inc.
+
+This file is part of GNU CC.
+
+GNU CC is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+In addition to the permissions in the GNU General Public License, the
+Free Software Foundation gives you unlimited permission to link the
+compiled version of this file into combinations with other programs,
+and to distribute those combinations without any restriction coming
+from the use of this file. (The General Public License restrictions
+do apply in other respects; for example, they cover modification of
+the file, and distribution when not linked into a combine
+executable.)
+
+GNU CC is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU CC; see the file COPYING. If not, write to
+the Free Software Foundation, 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA. */
+
+int
+__popcounthi2 (unsigned short x)
+{
+ int i;
+ int count = 0;
+ for (i = 0; i < 16; i++)
+ if (x & ((unsigned short) 1 << i))
+ count++;
+ return count;
+}
diff --git a/gcc/config/h8300/t-h8300 b/gcc/config/h8300/t-h8300
index d8cbd4f..a8b2981 100644
--- a/gcc/config/h8300/t-h8300
+++ b/gcc/config/h8300/t-h8300
@@ -3,12 +3,17 @@
# from libgcc2.c. They do not actually exist in lib1funcs.asm.
LIB1ASMSRC = h8300/lib1funcs.asm
LIB1ASMFUNCS = _cmpsi2 _ucmpsi2 _divhi3 _divsi3 _mulhi3 _mulsi3 \
- _floatdisf _fixsfdi _fixunssfdi _fixunssfsi_asm
+ _fixunssfsi_asm
-LIB2FUNCS_EXTRA = $(srcdir)/config/h8300/fixunssfsi.c
+LIB2FUNCS_EXTRA = \
+ $(srcdir)/config/h8300/clzhi2.c \
+ $(srcdir)/config/h8300/ctzhi2.c \
+ $(srcdir)/config/h8300/parityhi2.c \
+ $(srcdir)/config/h8300/popcounthi2.c \
+ $(srcdir)/config/h8300/fixunssfsi.c
-# We do not have DF or DI types, so fake out the libgcc2 compilation.
-TARGET_LIBGCC2_CFLAGS = -DDF=SF -DDI=SI
+# We do not have DF type, so fake out the libgcc2 compilation.
+TARGET_LIBGCC2_CFLAGS = -DDF=SF
# We want fine grained libraries, so use the new code to build the
# floating point emulation libraries.