This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Extra machine modes out of tm.h
- From: Zack Weinberg <zack at codesourcery dot com>
- To: Ulrich Weigand <Ulrich dot Weigand at de dot ibm dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 11 Jun 2002 10:19:15 -0700
- Subject: Re: Extra machine modes out of tm.h
- References: <OF92210C30.D0D41CD9-ONC1256BD5.005658FD@de.ibm.com>
On Tue, Jun 11, 2002 at 06:03:11PM +0200, Ulrich Weigand wrote:
>
> Zack Weinberg wrote:
>
> >As is done for $md_file, set $extra_modes_file in config.gcc and allow
> >target stanzas to override it. Would you like to write this patch, or
> >shall I?
>
> I'm not really familiar with the gcc configure mechanism, so I'd
> appreciate it if you could provide such a patch. I'll add the s390x
> specific bits and test it, of course.
Here. It already includes the s390x specific bit, but I have no way
of testing it properly.
m68hc11 is not affected as it doesn't need an extra modes file, but
strongarm and xscale are.
zw
* config.gcc: Make the name of the extra-modes file adjustable
by target stanzas.
(s390x, strongarm, xscale stanzas): Use this facility.
* configure.in: Update to match.
* configure: Regenerate.
===================================================================
Index: config.gcc
--- config.gcc 7 Jun 2002 23:31:04 -0000 1.207
+++ config.gcc 11 Jun 2002 17:17:23 -0000
@@ -69,6 +69,10 @@
# makefile-fragments, if different from
# "$cpu_type/t-$cpu_type".
#
+# extra_modes The name of the file containing a list of extra
+# machine modes, if necessary and different from
+# "$cpu_type/$cpu_type-modes.def".
+#
# float_format Set to the symbolic name for the floating-point
# formats used for this machine, if different from
# "i64". Used to derive a header file name to
@@ -287,6 +291,11 @@ if test -f ${srcdir}/config/${cpu_type}/
then
tm_p_file=${cpu_type}/${cpu_type}-protos.h
fi
+extra_modes=
+if test -f ${srcdir}/config/${cpu_type}/${cpu_type}-modes.def
+then
+ extra_modes=${cpu_type}/${cpu_type}-modes.def
+fi
case $machine in
x86_64-*-*)
@@ -2201,6 +2210,7 @@ s390x-*-linux*)
tm_file="s390/s390x.h s390/s390.h dbxelf.h elfos.h svr4.h linux.h s390/linux.h"
tm_p_file=s390/s390-protos.h
md_file=s390/s390.md
+ extra_modes=s390/s390-modes.def
out_file=s390/s390.c
tmake_file="t-slibgcc-elf-ver t-linux s390/t-linux s390/t-linux64"
extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o"
@@ -2582,18 +2592,21 @@ strongarm-*-elf*)
tmake_file=arm/t-strongarm-elf
out_file=arm/arm.c
md_file=arm/arm.md
+ extra_modes=arm/arm-modes.def
;;
strongarm-*-coff*)
tm_file="arm/semi.h arm/aout.h arm/coff.h arm/strongarm-coff.h arm/arm.h"
tmake_file=arm/t-strongarm-coff
out_file=arm/arm.c
md_file=arm/arm.md
+ extra_modes=arm/arm-modes.def
;;
strongarm-*-pe)
tm_file="arm/semi.h arm/aout.h arm/coff.h arm/strongarm-coff.h arm/arm.h arm/pe.h arm/strongarm-pe.h"
tmake_file=arm/t-strongarm-pe
out_file=arm/arm.c
md_file=arm/arm.md
+ extra_modes=arm/arm-modes.def
extra_objs=pe.o
;;
thumb*-*-*)
@@ -2666,12 +2679,14 @@ xscale-*-elf)
tmake_file=arm/t-xscale-elf
out_file=arm/arm.c
md_file=arm/arm.md
+ extra_modes=arm/arm-modes.def
;;
xscale-*-coff)
tm_file="arm/semi.h arm/aout.h arm/coff.h arm/xscale-coff.h arm/arm.h"
tmake_file=arm/t-xscale-coff
out_file=arm/arm.c
md_file=arm/arm.md
+ extra_modes=arm/arm-modes.def
;;
xstormy16-*-elf)
# For historical reasons, the target files omit the 'x'.
===================================================================
Index: configure.in
--- configure.in 10 Jun 2002 22:35:44 -0000 1.602
+++ configure.in 11 Jun 2002 17:17:24 -0000
@@ -870,11 +870,10 @@ if test x$thread_file = x; then
fi
# Look for a file containing extra machine modes.
-if test -f $srcdir/config/${cpu_type}/${cpu_type}-modes.def; then
- extra_modes_file='$(srcdir)/config/'${cpu_type}/${cpu_type}-modes.def
+if test -n "$extra_modes" && test -f $srcdir/config/$extra_modes; then
+ extra_modes_file='$(srcdir)'/config/${extra_modes)
AC_SUBST(extra_modes_file)
- AC_DEFINE_UNQUOTED(EXTRA_MODES_FILE,
- "${cpu_type}/${cpu_type}-modes.def",
+ AC_DEFINE_UNQUOTED(EXTRA_MODES_FILE, "$extra_modes",
[Define to the name of a file containing a list of extra machine modes
for this architecture.])
AC_DEFINE(EXTRA_CC_MODES, 1,