Merge egcs 1.1.2 conflicts.

This commit is contained in:
tv 1999-04-06 16:04:00 +00:00
parent d3989ee704
commit d2833781e6
11 changed files with 603 additions and 174 deletions

View File

@ -280,6 +280,8 @@ includedir = $(local_prefix)/include
assertdir = $(tooldir)/include assertdir = $(tooldir)/include
# where the info files go # where the info files go
infodir = @infodir@ infodir = @infodir@
# Where cpp should go besides $prefix/bin if necessary
cpp_install_dir = @cpp_install_dir@
# Extension (if any) to put in installed man-page filename. # Extension (if any) to put in installed man-page filename.
manext = .1 manext = .1
objext = .o objext = .o
@ -383,6 +385,10 @@ LIB1FUNCS_EXTRA =
# Assembler files should have names ending in `.asm'. # Assembler files should have names ending in `.asm'.
LIB2FUNCS_EXTRA = LIB2FUNCS_EXTRA =
# Handle cpp installation.
INSTALL_CPP=
UNINSTALL_CPP=
# Default float.h source to use for cross-compiler. # Default float.h source to use for cross-compiler.
# This is overridden by configure. # This is overridden by configure.
CROSS_FLOAT_H=$(srcdir)/config/float-@float_format@.h CROSS_FLOAT_H=$(srcdir)/config/float-@float_format@.h
@ -1429,7 +1435,7 @@ integrate.o : integrate.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) flags.h \
jump.o : jump.c $(CONFIG_H) system.h $(RTL_H) flags.h hard-reg-set.h $(REGS_H) \ jump.o : jump.c $(CONFIG_H) system.h $(RTL_H) flags.h hard-reg-set.h $(REGS_H) \
insn-config.h insn-flags.h $(RECOG_H) $(EXPR_H) real.h except.h \ insn-config.h insn-flags.h $(RECOG_H) $(EXPR_H) real.h except.h \
toplev.h toplev.h insn-attr.h
stupid.o : stupid.c $(CONFIG_H) system.h $(RTL_H) $(REGS_H) hard-reg-set.h \ stupid.o : stupid.c $(CONFIG_H) system.h $(RTL_H) $(REGS_H) hard-reg-set.h \
flags.h toplev.h flags.h toplev.h
@ -2259,7 +2265,8 @@ install: $(INSTALL_TARGET) ; @true
# Install the driver last so that the window when things are # Install the driver last so that the window when things are
# broken is small. # broken is small.
install-normal: install-common $(INSTALL_HEADERS) $(INSTALL_LIBGCC) \ install-normal: install-common $(INSTALL_HEADERS) $(INSTALL_LIBGCC) \
install-man install-info lang.install-normal install-driver $(INSTALL_CPP) install-man install-info lang.install-normal \
install-driver
# Do nothing while making gcc with a cross-compiler. The person who # Do nothing while making gcc with a cross-compiler. The person who
# makes gcc for the target machine has to know how to put a complete # makes gcc for the target machine has to know how to put a complete
@ -2271,6 +2278,25 @@ install-build: force
# to finish installation of cross compiler. # to finish installation of cross compiler.
install-cross-rest: install-float-h-cross install-cross-rest: install-float-h-cross
# Handle cpp installation.
install-cpp: cpp.sh
-rm -f $(bindir)/cpp
$(INSTALL_PROGRAM) -m 755 cpp.sh $(bindir)/cpp
if [ x$(cpp_install_dir) != x ]; then \
rm -f $(cpp_install_dir)/cpp; \
$(INSTALL_PROGRAM) -m 755 cpp.sh $(cpp_install_dir)/cpp; \
else true; fi
cpp.sh: $(srcdir)/cpp.in Makefile
sed -e 's%@GCC@%'$(GCC_INSTALL_NAME)'%' $(srcdir)/cpp.in > xcpp.T
mv -f xcpp.T cpp.sh
uninstall-cpp:
-rm -f $(bindir)/cpp
-if [ x$(cpp_install_dir) != x ]; then \
rm -f $(cpp_install_dir)/cpp; \
else true; fi
# Install float.h for cross compiler. # Install float.h for cross compiler.
# Run this on the target machine! # Run this on the target machine!
install-float-h-cross: installdirs install-float-h-cross: installdirs
@ -2501,7 +2527,7 @@ install-collect2: collect2 installdirs
$(INSTALL_PROGRAM) xgcc$(exeext) $(libsubdir)/gcc$(exeext) $(INSTALL_PROGRAM) xgcc$(exeext) $(libsubdir)/gcc$(exeext)
# Cancel installation by deleting the installed files. # Cancel installation by deleting the installed files.
uninstall: lang.uninstall uninstall: lang.uninstall $(UNINSTALL_CPP)
-rm -rf $(libsubdir) -rm -rf $(libsubdir)
-rm -rf $(bindir)/$(GCC_INSTALL_NAME)$(exeext) -rm -rf $(bindir)/$(GCC_INSTALL_NAME)$(exeext)
-rm -rf $(bindir)/$(GCC_CROSS_NAME)$(exeext) -rm -rf $(bindir)/$(GCC_CROSS_NAME)$(exeext)
@ -2746,9 +2772,11 @@ compare compare3 compare4 compare-lean compare3-lean compare4-lean: force
for dir in tmp-foo $(SUBDIRS); do \ for dir in tmp-foo $(SUBDIRS); do \
if [ "`echo $$dir/*$(objext)`" != "$$dir/*$(objext)" ] ; then \ if [ "`echo $$dir/*$(objext)`" != "$$dir/*$(objext)" ] ; then \
for file in $$dir/*$(objext); do \ for file in $$dir/*$(objext); do \
if [ $$file != objc/NXConstStr.o -a $$file != objc/Object.o -a $$file != objc/Protocol.o -a $$file != objc/linking.o ] ; then \
tail +16c ./$$file > tmp-foo1; \ tail +16c ./$$file > tmp-foo1; \
tail +16c stage$$stage/$$file > tmp-foo2 \ tail +16c stage$$stage/$$file > tmp-foo2 \
&& (cmp tmp-foo1 tmp-foo2 > /dev/null 2>&1 || echo $$file differs >> .bad_compare) || true; \ && (cmp tmp-foo1 tmp-foo2 > /dev/null 2>&1 || echo $$file differs >> .bad_compare) || true; \
else true; fi; \
done; \ done; \
fi; \ fi; \
done done
@ -2779,7 +2807,9 @@ gnucompare gnucompare3 gnucompare4 gnucompare-lean gnucompare3-lean gnucompare4-
for dir in tmp-foo $(SUBDIRS); do \ for dir in tmp-foo $(SUBDIRS); do \
if [ "`echo $$dir/*$(objext)`" != "$$dir/*$(objext)" ] ; then \ if [ "`echo $$dir/*$(objext)`" != "$$dir/*$(objext)" ] ; then \
for file in $$dir/*$(objext); do \ for file in $$dir/*$(objext); do \
if [ $$file != objc/NXConstStr.o -a $$file != objc/Object.o -a $$file != objc/Protocol.o -a $$file != objc/linking.o ] ; then \
(cmp --ignore-initial=16 $$file stage$$stage/$$file > /dev/null 2>&1 || echo $$file differs >> .bad_compare) || true; \ (cmp --ignore-initial=16 $$file stage$$stage/$$file > /dev/null 2>&1 || echo $$file differs >> .bad_compare) || true; \
else true; fi; \
done; \ done; \
fi; \ fi; \
done done

View File

@ -2376,6 +2376,12 @@ shorten_compare (op0_ptr, op1_ptr, restype_ptr, rescode_ptr)
type = signed_or_unsigned_type (unsignedp0, TREE_TYPE (primop0)); type = signed_or_unsigned_type (unsignedp0, TREE_TYPE (primop0));
/* If TYPE is an enumeration, then we need to get its min/max
values from it's underlying integral type, not the enumerated
type itself. */
if (TREE_CODE (type) == ENUMERAL_TYPE)
type = type_for_size (TYPE_PRECISION (type), unsignedp0);
maxval = TYPE_MAX_VALUE (type); maxval = TYPE_MAX_VALUE (type);
minval = TYPE_MIN_VALUE (type); minval = TYPE_MIN_VALUE (type);

View File

@ -608,18 +608,20 @@ extern void override_options ();
/* Value is 1 if hard register REGNO can hold a value of machine-mode MODE. /* Value is 1 if hard register REGNO can hold a value of machine-mode MODE.
On Alpha, the integer registers can hold any mode. The floating-point On Alpha, the integer registers can hold any mode. The floating-point
registers can hold 32-bit and 64-bit integers as well, but not 16-bit registers can hold 32-bit and 64-bit integers as well, but not 16-bit
or 8-bit values. If we only allowed the larger integers into FP registers, or 8-bit values. */
we'd have to say that QImode and SImode aren't tiable, which is a
pain. So say all registers can hold everything and see how that works. */
#define HARD_REGNO_MODE_OK(REGNO, MODE) 1 #define HARD_REGNO_MODE_OK(REGNO, MODE) \
((REGNO) < 32 || ((MODE) != QImode && (MODE) != HImode))
/* Value is 1 if it is a good idea to tie two pseudo registers /* Value is 1 if it is a good idea to tie two pseudo registers
when one has mode MODE1 and one has mode MODE2. when one has mode MODE1 and one has mode MODE2.
If HARD_REGNO_MODE_OK could produce different values for MODE1 and MODE2, If HARD_REGNO_MODE_OK could produce different values for MODE1 and MODE2,
for any hard reg, then this must be 0 for correct output. */ for any hard reg, then this must be 0 for correct output. */
#define MODES_TIEABLE_P(MODE1, MODE2) 1 #define MODES_TIEABLE_P(MODE1, MODE2) \
((MODE1) == QImode || (MODE1) == HImode \
? (MODE2) == QImode || (MODE2) == HImode \
: 1)
/* Specify the registers used for certain standard purposes. /* Specify the registers used for certain standard purposes.
The values of these macros are register numbers. */ The values of these macros are register numbers. */
@ -1497,6 +1499,18 @@ extern void alpha_init_expanders ();
#define LEGITIMIZE_RELOAD_ADDRESS(X,MODE,OPNUM,TYPE,IND_LEVELS,WIN) \ #define LEGITIMIZE_RELOAD_ADDRESS(X,MODE,OPNUM,TYPE,IND_LEVELS,WIN) \
do { \ do { \
/* We must recognize output that we have already generated ourselves. */ \
if (GET_CODE (X) == PLUS \
&& GET_CODE (XEXP (X, 0)) == PLUS \
&& GET_CODE (XEXP (XEXP (X, 0), 0)) == REG \
&& GET_CODE (XEXP (XEXP (X, 0), 1)) == CONST_INT \
&& GET_CODE (XEXP (X, 1)) == CONST_INT) \
{ \
push_reload (XEXP (X, 0), NULL_RTX, &XEXP (X, 0), NULL_PTR, \
BASE_REG_CLASS, GET_MODE (X), VOIDmode, 0, 0, \
OPNUM, TYPE); \
goto WIN; \
} \
if (GET_CODE (X) == PLUS \ if (GET_CODE (X) == PLUS \
&& GET_CODE (XEXP (X, 0)) == REG \ && GET_CODE (XEXP (X, 0)) == REG \
&& REGNO (XEXP (X, 0)) < FIRST_PSEUDO_REGISTER \ && REGNO (XEXP (X, 0)) < FIRST_PSEUDO_REGISTER \

404
gnu/dist/gcc/configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -201,10 +201,12 @@ AC_CACHE_VAL(gcc_cv_header_inttypes_h,
[#include <sys/types.h> [#include <sys/types.h>
#include <inttypes.h>], #include <inttypes.h>],
[intmax_t i = -1;], [intmax_t i = -1;],
[AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H) [gcc_cv_header_inttypes_h=yes],
gcc_cv_header_inttypes_h=yes],
gcc_cv_header_inttypes_h=no)]) gcc_cv_header_inttypes_h=no)])
AC_MSG_RESULT($gcc_cv_header_inttypes_h) AC_MSG_RESULT($gcc_cv_header_inttypes_h)
if test $gcc_cv_header_inttypes_h = yes; then
AC_DEFINE(HAVE_INTTYPES_H)
fi
AC_CHECK_FUNCS(strtoul bsearch strerror putenv popen bcopy bzero bcmp \ AC_CHECK_FUNCS(strtoul bsearch strerror putenv popen bcopy bzero bcmp \
index rindex strchr strrchr kill getrlimit setrlimit atoll atoq \ index rindex strchr strrchr kill getrlimit setrlimit atoll atoq \
@ -240,6 +242,7 @@ host_xm_defines=
host_xmake_file= host_xmake_file=
host_truncate_target= host_truncate_target=
host_exeext= host_exeext=
cpp_install_dir=
# Decode the host machine, then the target machine. # Decode the host machine, then the target machine.
# For the host machine, we save the xm_file variable as host_xm_file; # For the host machine, we save the xm_file variable as host_xm_file;
@ -326,11 +329,23 @@ for machine in $build $host $target; do
tm_file=${cpu_type}/${cpu_type}.h tm_file=${cpu_type}/${cpu_type}.h
xm_file=${cpu_type}/xm-${cpu_type}.h xm_file=${cpu_type}/xm-${cpu_type}.h
# Set the default macros to define for GNU/Linux systems. # Common parts for linux-gnu and openbsd systems
case $machine in case $machine in
*-*-linux-gnu*) *-*-linux-gnu*)
xm_defines="HAVE_ATEXIT POSIX BSTRING" xm_defines="HAVE_ATEXIT POSIX BSTRING"
;; ;;
*-*-openbsd*)
tm_file=${cpu_type}/openbsd.h
# On OpenBSD systems, the headers are okay
fixincludes=Makefile.in
tmake_file="t-libc-ok t-openbsd"
# avoid surprises, always provide an xm-openbsd file
xm_file=${cpu_type}/xm-openbsd.h
if test x$enable_threads = xyes; then
thread_file='posix'
tmake_file="${tmake_file} t-openbsd-thread"
fi
;;
esac esac
case $machine in case $machine in
@ -412,6 +427,12 @@ for machine in $build $host $target; do
gas=yes gnu_ld=yes gas=yes gnu_ld=yes
;; ;;
alpha*-*-openbsd*)
# default x-alpha is only appropriate for dec-osf.
target_cpu_default="MASK_GAS"
xmake_file=none
;;
alpha*-dec-osf*) alpha*-dec-osf*)
if [[ x$stabs = xyes ]] if [[ x$stabs = xyes ]]
then then
@ -568,6 +589,10 @@ for machine in $build $host $target; do
h8300-*-*) h8300-*-*)
float_format=i32 float_format=i32
;; ;;
hppa*-*-openbsd*)
target_cpu_default="MASK_SNAKE"
tmake_file=pa/t-openbsd
;;
hppa1.1-*-pro*) hppa1.1-*-pro*)
tm_file="pa/pa-pro.h ${tm_file} pa/pa-pro-end.h libgloss.h" tm_file="pa/pa-pro.h ${tm_file} pa/pa-pro-end.h libgloss.h"
xm_file=pa/xm-papro.h xm_file=pa/xm-papro.h
@ -683,6 +708,7 @@ for machine in $build $host $target; do
tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux10.h" tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux10.h"
xm_file=pa/xm-pahpux.h xm_file=pa/xm-pahpux.h
xmake_file=pa/x-pa-hpux xmake_file=pa/x-pa-hpux
tmake_file=pa/t-pa
if [[ x$gas = xyes ]] if [[ x$gas = xyes ]]
then then
tm_file="${tm_file} pa/pa-gas.h" tm_file="${tm_file} pa/pa-gas.h"
@ -851,6 +877,7 @@ for machine in $build $host $target; do
tm_file="i386/i386.h i386/att.h linux.h i386/freebsd-elf.h i386/perform.h" tm_file="i386/i386.h i386/att.h linux.h i386/freebsd-elf.h i386/perform.h"
# On FreeBSD, the headers are already ok, except for math.h. # On FreeBSD, the headers are already ok, except for math.h.
fixincludes=fixinc.wrap fixincludes=fixinc.wrap
extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
tmake_file=i386/t-freebsd tmake_file=i386/t-freebsd
gas=yes gas=yes
gnu_ld=yes gnu_ld=yes
@ -876,6 +903,12 @@ for machine in $build $host $target; do
fixincludes=fixinc.wrap fixincludes=fixinc.wrap
tmake_file=t-netbsd tmake_file=t-netbsd
;; ;;
i[[34567]]86-*-openbsd*)
# Remove when the math emulator is fixed
target_cpu_default="MASK_NO_FANCY_MATH_387"
# we need collect2 until our bug is fixed...
use_collect2=yes
;;
i[[34567]]86-*-coff*) i[[34567]]86-*-coff*)
tm_file=i386/i386-coff.h tm_file=i386/i386-coff.h
tmake_file=i386/t-i386bare tmake_file=i386/t-i386bare
@ -951,6 +984,7 @@ for machine in $build $host $target; do
fi fi
;; ;;
i[[34567]]86-*-gnu*) i[[34567]]86-*-gnu*)
float_format=i386
;; ;;
i[[34567]]86-go32-msdos | i[[34567]]86-*-go32*) i[[34567]]86-go32-msdos | i[[34567]]86-*-go32*)
xm_file=i386/xm-go32.h xm_file=i386/xm-go32.h
@ -1031,7 +1065,7 @@ for machine in $build $host $target; do
else else
tmake_file=i386/t-sco5 tmake_file=i386/t-sco5
fi fi
extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o" extra_parts="crti.o crtbegin.o crtend.o crtbeginS.o crtendS.o"
;; ;;
i[[34567]]86-*-sco3.2v4*) # 80386 running SCO 3.2v4 system i[[34567]]86-*-sco3.2v4*) # 80386 running SCO 3.2v4 system
xm_file="${xm_file} i386/xm-sco.h" xm_file="${xm_file} i386/xm-sco.h"
@ -1100,7 +1134,7 @@ for machine in $build $host $target; do
tmake_file=i386/t-crtpic tmake_file=i386/t-crtpic
xmake_file=x-svr4 xmake_file=x-svr4
extra_parts="crtbegin.o crtend.o" extra_parts="crtbegin.o crtend.o"
fixincludes=Makefile.in # The headers are just fine, thank you. fixincludes=fixinc.svr4
;; ;;
i[[34567]]86-*-sysv4*) # Intel 80386's running system V.4 i[[34567]]86-*-sysv4*) # Intel 80386's running system V.4
xm_file="xm-siglist.h xm-alloca.h ${xm_file}" xm_file="xm-siglist.h xm-alloca.h ${xm_file}"
@ -1644,6 +1678,11 @@ for machine in $build $host $target; do
tmake_file=t-netbsd tmake_file=t-netbsd
float_format=m68k float_format=m68k
;; ;;
m68k*-*-openbsd*)
float_format=m68k
# we need collect2 until our bug is fixed...
use_collect2=yes
;;
m68k-*-sysv3*) # Motorola m68k's running system V.3 m68k-*-sysv3*) # Motorola m68k's running system V.3
xm_file="xm-alloca.h ${xm_file}" xm_file="xm-alloca.h ${xm_file}"
xm_defines=USG xm_defines=USG
@ -1767,6 +1806,9 @@ for machine in $build $host $target; do
tmake_file=m88k/t-luna tmake_file=m88k/t-luna
fi fi
;; ;;
m88k-*-openbsd*)
tmake_file="${tmake_file} m88k/t-luna-gas"
;;
m88k-*-sysv3*) m88k-*-sysv3*)
tm_file=m88k/sysv3.h tm_file=m88k/sysv3.h
extra_parts="crtbegin.o crtend.o" extra_parts="crtbegin.o crtend.o"
@ -1964,6 +2006,16 @@ for machine in $build $host $target; do
fixincludes=fixinc.wrap fixincludes=fixinc.wrap
tmake_file=t-netbsd tmake_file=t-netbsd
;; ;;
mips*el-*-openbsd*) # mips little endian
target_cpu_default="MASK_GAS|MASK_ABICALLS"
tm_file=mips/openbsd.h
xmake_file=none
;;
mips*-*-openbsd*) # mips big endian
target_cpu_default="MASK_GAS|MASK_ABICALLS"
tm_file=mips/openbsd-be.h
xmake_file=none
;;
mips-sony-bsd* | mips-sony-newsos*) # Sony NEWS 3600 or risc/news. mips-sony-bsd* | mips-sony-newsos*) # Sony NEWS 3600 or risc/news.
tm_file="mips/news4.h ${tm_file}" tm_file="mips/news4.h ${tm_file}"
if [[ x$stabs = xyes ]]; then if [[ x$stabs = xyes ]]; then
@ -2300,6 +2352,9 @@ for machine in $build $host $target; do
;; ;;
pdp11-*-*) pdp11-*-*)
;; ;;
ns32k-*-openbsd*)
# Nothing special
;;
pyramid-*-*) pyramid-*-*)
cpu_type=pyr cpu_type=pyr
xmake_file=pyr/x-pyr xmake_file=pyr/x-pyr
@ -2312,6 +2367,13 @@ for machine in $build $host $target; do
xmake_file=romp/x-mach xmake_file=romp/x-mach
use_collect2=yes use_collect2=yes
;; ;;
romp-*-openbsd*)
# Nothing special
;;
powerpc-*-openbsd*)
tmake_file="${tmake_file} rs6000/t-rs6000 rs6000/t-openbsd"
xmake_file=none
;;
powerpc-*-beos*) powerpc-*-beos*)
cpu_type=rs6000 cpu_type=rs6000
tm_file=rs6000/beos.h tm_file=rs6000/beos.h
@ -2604,6 +2666,10 @@ for machine in $build $host $target; do
fixincludes=fixinc.wrap fixincludes=fixinc.wrap
tmake_file=t-netbsd tmake_file=t-netbsd
;; ;;
sparc-*-openbsd*)
# we need collect2 until our bug is fixed...
use_collect2=yes
;;
sparc-*-bsd*) sparc-*-bsd*)
tm_file=sparc/bsd.h tm_file=sparc/bsd.h
;; ;;
@ -2804,6 +2870,9 @@ for machine in $build $host $target; do
tmake_file=t-netbsd tmake_file=t-netbsd
float_format=vax float_format=vax
;; ;;
vax-*-openbsd*)
tmake_file="${tm_file} vax/t-openbsd"
;;
vax-*-ultrix*) # vaxen running ultrix vax-*-ultrix*) # vaxen running ultrix
tm_file="${tm_file} vax/ultrix.h" tm_file="${tm_file} vax/ultrix.h"
use_collect2=yes use_collect2=yes
@ -2874,7 +2943,7 @@ for machine in $build $host $target; do
alpha*-*-*) alpha*-*-*)
case $machine in case $machine in
alphaev6*) alphaev6*)
target_cpu_default2="MASK_CPU_EV6|MASK_BXW|MASK_CIX|MASK_MAX" target_cpu_default2="MASK_CPU_EV6|MASK_BWX|MASK_CIX|MASK_MAX"
;; ;;
alphapca56*) alphapca56*)
target_cpu_default2="MASK_CPU_EV5|MASK_BWX|MASK_MAX" target_cpu_default2="MASK_CPU_EV5|MASK_BWX|MASK_MAX"
@ -3076,6 +3145,19 @@ then
esac esac
fi fi
# Handle cpp installation.
if [[ x$enable_cpp != x ]]
then
tmake_file="$tmake_file t-install-cpp"
case x$enable_cpp in
xyes | xno) ;;
x/*) cpp_install_dir=$enable_cpp ;;
x.*) echo "alternate cpp script installation directory must be an absolute path" 1>&2
exit 1
;;
esac
fi
# Say what files are being used for the output code and MD file. # Say what files are being used for the output code and MD file.
echo "Using \`$srcdir/config/$out_file' to output insns." echo "Using \`$srcdir/config/$out_file' to output insns."
echo "Using \`$srcdir/config/$md_file' as machine description file." echo "Using \`$srcdir/config/$md_file' as machine description file."
@ -3669,6 +3751,8 @@ AC_SUBST(cc_set_by_configure)
AC_SUBST(stage_prefix_set_by_configure) AC_SUBST(stage_prefix_set_by_configure)
AC_SUBST(install) AC_SUBST(install)
AC_SUBST(symbolic_link) AC_SUBST(symbolic_link)
AC_SUBST(cpp_install_dir)
AC_SUBST_FILE(target_overrides) AC_SUBST_FILE(target_overrides)
AC_SUBST_FILE(host_overrides) AC_SUBST_FILE(host_overrides)
@ -3773,4 +3857,5 @@ host_overrides='${host_overrides}'
cross_defines='${cross_defines}' cross_defines='${cross_defines}'
cross_overrides='${cross_overrides}' cross_overrides='${cross_overrides}'
build_overrides='${build_overrides}' build_overrides='${build_overrides}'
cpp_install_dir='${cpp_install_dir}'
]) ])

View File

@ -2946,6 +2946,12 @@ start_objects (method_type)
NULL_TREE), NULL_TREE),
NULL_TREE, 0); NULL_TREE, 0);
#if defined(ASM_OUTPUT_CONSTRUCTOR) && defined(ASM_OUTPUT_DESTRUCTOR)
/* It can be a static function as long as collect2 does not have
to scan the object file to find its ctor/dtor routine. */
TREE_PUBLIC (current_function_decl) = 0;
#endif
store_parm_decls (); store_parm_decls ();
pushlevel (0); pushlevel (0);
clear_last_expr (); clear_last_expr ();

View File

@ -1,5 +1,5 @@
/* Subroutines for manipulating rtx's in semantically interesting ways. /* Subroutines for manipulating rtx's in semantically interesting ways.
Copyright (C) 1987, 91, 94-97, 1998 Free Software Foundation, Inc. Copyright (C) 1987, 91, 94-98, 1999 Free Software Foundation, Inc.
This file is part of GNU CC. This file is part of GNU CC.
@ -1186,7 +1186,7 @@ allocate_dynamic_stack_space (size, target, known_align)
/* Our optimization works based upon being able to perform a simple /* Our optimization works based upon being able to perform a simple
transformation of this RTL into a (set REG REG) so make sure things transformation of this RTL into a (set REG REG) so make sure things
did in fact end up in a REG. */ did in fact end up in a REG. */
if (!arith_operand (setjmpless_size, Pmode)) if (!register_operand (setjmpless_size, Pmode))
setjmpless_size = force_reg (Pmode, setjmpless_size); setjmpless_size = force_reg (Pmode, setjmpless_size);
} }

152
gnu/dist/gcc/expr.c vendored
View File

@ -1,5 +1,5 @@
/* Convert tree expression to rtl instructions, for GNU compiler. /* Convert tree expression to rtl instructions, for GNU compiler.
Copyright (C) 1988, 92-97, 1998 Free Software Foundation, Inc. Copyright (C) 1988, 92-98, 1999 Free Software Foundation, Inc.
This file is part of GNU CC. This file is part of GNU CC.
@ -1618,6 +1618,10 @@ emit_block_move (x, y, size, align)
int align; int align;
{ {
rtx retval = 0; rtx retval = 0;
#ifdef TARGET_MEM_FUNCTIONS
static tree fn;
tree call_expr, arg_list;
#endif
if (GET_MODE (x) != BLKmode) if (GET_MODE (x) != BLKmode)
abort (); abort ();
@ -1691,13 +1695,60 @@ emit_block_move (x, y, size, align)
} }
#ifdef TARGET_MEM_FUNCTIONS #ifdef TARGET_MEM_FUNCTIONS
retval /* It is incorrect to use the libcall calling conventions to call
= emit_library_call_value (memcpy_libfunc, NULL_RTX, 0, memcpy in this context.
ptr_mode, 3, XEXP (x, 0), Pmode,
XEXP (y, 0), Pmode, This could be a user call to memcpy and the user may wish to
convert_to_mode (TYPE_MODE (sizetype), size, examine the return value from memcpy.
TREE_UNSIGNED (sizetype)),
TYPE_MODE (sizetype)); For targets where libcalls and normal calls have different conventions
for returning pointers, we could end up generating incorrect code.
So instead of using a libcall sequence we build up a suitable
CALL_EXPR and expand the call in the normal fashion. */
if (fn == NULL_TREE)
{
tree fntype;
/* This was copied from except.c, I don't know if all this is
necessary in this context or not. */
fn = get_identifier ("memcpy");
push_obstacks_nochange ();
end_temporary_allocation ();
fntype = build_pointer_type (void_type_node);
fntype = build_function_type (fntype, NULL_TREE);
fn = build_decl (FUNCTION_DECL, fn, fntype);
DECL_EXTERNAL (fn) = 1;
TREE_PUBLIC (fn) = 1;
DECL_ARTIFICIAL (fn) = 1;
make_decl_rtl (fn, NULL_PTR, 1);
assemble_external (fn);
pop_obstacks ();
}
/* We need to make an argument list for the function call.
memcpy has three arguments, the first two are void * addresses and
the last is a size_t byte count for the copy. */
arg_list
= build_tree_list (NULL_TREE,
make_tree (build_pointer_type (void_type_node),
XEXP (x, 0)));
TREE_CHAIN (arg_list)
= build_tree_list (NULL_TREE,
make_tree (build_pointer_type (void_type_node),
XEXP (y, 0)));
TREE_CHAIN (TREE_CHAIN (arg_list))
= build_tree_list (NULL_TREE, make_tree (sizetype, size));
TREE_CHAIN (TREE_CHAIN (TREE_CHAIN (arg_list))) = NULL_TREE;
/* Now we have to build up the CALL_EXPR itself. */
call_expr = build1 (ADDR_EXPR, build_pointer_type (TREE_TYPE (fn)), fn);
call_expr = build (CALL_EXPR, TREE_TYPE (TREE_TYPE (fn)),
call_expr, arg_list, NULL_TREE);
TREE_SIDE_EFFECTS (call_expr) = 1;
retval = expand_expr (call_expr, NULL_RTX, VOIDmode, 0);
#else #else
emit_library_call (bcopy_libfunc, 0, emit_library_call (bcopy_libfunc, 0,
VOIDmode, 3, XEXP (y, 0), Pmode, VOIDmode, 3, XEXP (y, 0), Pmode,
@ -2213,6 +2264,10 @@ clear_storage (object, size, align)
rtx size; rtx size;
int align; int align;
{ {
#ifdef TARGET_MEM_FUNCTIONS
static tree fn;
tree call_expr, arg_list;
#endif
rtx retval = 0; rtx retval = 0;
if (GET_MODE (object) == BLKmode) if (GET_MODE (object) == BLKmode)
@ -2277,16 +2332,60 @@ clear_storage (object, size, align)
#ifdef TARGET_MEM_FUNCTIONS #ifdef TARGET_MEM_FUNCTIONS
retval /* It is incorrect to use the libcall calling conventions to call
= emit_library_call_value (memset_libfunc, NULL_RTX, 0, memset in this context.
ptr_mode, 3,
XEXP (object, 0), Pmode, This could be a user call to memset and the user may wish to
const0_rtx, examine the return value from memset.
TYPE_MODE (integer_type_node),
convert_to_mode For targets where libcalls and normal calls have different conventions
(TYPE_MODE (sizetype), size, for returning pointers, we could end up generating incorrect code.
TREE_UNSIGNED (sizetype)),
TYPE_MODE (sizetype)); So instead of using a libcall sequence we build up a suitable
CALL_EXPR and expand the call in the normal fashion. */
if (fn == NULL_TREE)
{
tree fntype;
/* This was copied from except.c, I don't know if all this is
necessary in this context or not. */
fn = get_identifier ("memset");
push_obstacks_nochange ();
end_temporary_allocation ();
fntype = build_pointer_type (void_type_node);
fntype = build_function_type (fntype, NULL_TREE);
fn = build_decl (FUNCTION_DECL, fn, fntype);
DECL_EXTERNAL (fn) = 1;
TREE_PUBLIC (fn) = 1;
DECL_ARTIFICIAL (fn) = 1;
make_decl_rtl (fn, NULL_PTR, 1);
assemble_external (fn);
pop_obstacks ();
}
/* We need to make an argument list for the function call.
memset has three arguments, the first is a void * addresses, the
second a integer with the initialization value, the last is a size_t
byte count for the copy. */
arg_list
= build_tree_list (NULL_TREE,
make_tree (build_pointer_type (void_type_node),
XEXP (object, 0)));
TREE_CHAIN (arg_list)
= build_tree_list (NULL_TREE,
make_tree (integer_type_node, const0_rtx));
TREE_CHAIN (TREE_CHAIN (arg_list))
= build_tree_list (NULL_TREE, make_tree (sizetype, size));
TREE_CHAIN (TREE_CHAIN (TREE_CHAIN (arg_list))) = NULL_TREE;
/* Now we have to build up the CALL_EXPR itself. */
call_expr = build1 (ADDR_EXPR, build_pointer_type (TREE_TYPE (fn)), fn);
call_expr = build (CALL_EXPR, TREE_TYPE (TREE_TYPE (fn)),
call_expr, arg_list, NULL_TREE);
TREE_SIDE_EFFECTS (call_expr) = 1;
retval = expand_expr (call_expr, NULL_RTX, VOIDmode, 0);
#else #else
emit_library_call (bzero_libfunc, 0, emit_library_call (bzero_libfunc, 0,
VOIDmode, 2, VOIDmode, 2,
@ -3457,10 +3556,21 @@ store_expr (exp, target, want_value)
/* If value was not generated in the target, store it there. /* If value was not generated in the target, store it there.
Convert the value to TARGET's type first if nec. */ Convert the value to TARGET's type first if nec. */
/* If TEMP and TARGET compare equal according to rtx_equal_p, but
one or both of them are volatile memory refs, we have to distinguish
two cases:
- expand_expr has used TARGET. In this case, we must not generate
another copy. This can be detected by TARGET being equal according
to == .
- expand_expr has not used TARGET - that means that the source just
happens to have the same RTX form. Since temp will have been created
by expand_expr, it will compare unequal according to == .
We must generate a copy in this case, to reach the correct number
of volatile memory references. */
if ((! rtx_equal_p (temp, target) if ((! rtx_equal_p (temp, target)
|| side_effects_p (temp) || (temp != target && (side_effects_p (temp)
|| side_effects_p (target)) || side_effects_p (target))))
&& TREE_CODE (exp) != ERROR_MARK) && TREE_CODE (exp) != ERROR_MARK)
{ {
target = protect_from_queue (target, 1); target = protect_from_queue (target, 1);
@ -8703,7 +8813,7 @@ expand_builtin (exp, target, subtarget, mode, ignore)
if (! can_handle_constant_p) if (! can_handle_constant_p)
{ {
warning ("Delayed evaluation of __builtin_constant_p not supported on this target."); warning ("Delayed evaluation of __builtin_constant_p not supported on this target.");
warning ("Please report this as a bug to egcs-bugs@cygnus.com."); warning ("Please report this as a bug to egcs-bugs@egcs.cygnus.com.");
return const0_rtx; return const0_rtx;
} }
return gen_rtx_CONSTANT_P_RTX (TYPE_MODE (integer_type_node), return gen_rtx_CONSTANT_P_RTX (TYPE_MODE (integer_type_node),

View File

@ -1,5 +1,5 @@
/* Fold a constant sub-tree into a single node for C-compiler /* Fold a constant sub-tree into a single node for C-compiler
Copyright (C) 1987, 88, 92-97, 1998 Free Software Foundation, Inc. Copyright (C) 1987, 88, 92-98, 1999 Free Software Foundation, Inc.
This file is part of GNU CC. This file is part of GNU CC.
@ -2785,21 +2785,33 @@ range_binop (code, type, arg0, upper0_p, arg1, upper1_p)
return 0; return 0;
/* Set SGN[01] to -1 if ARG[01] is a lower bound, 1 for upper, and 0 /* Set SGN[01] to -1 if ARG[01] is a lower bound, 1 for upper, and 0
for neither. Then compute our result treating them as never equal for neither. In real maths, we cannot assume open ended ranges are
and comparing bounds to non-bounds as above. */ the same. But, this is computer arithmetic, where numbers are finite.
We can therefore make the transformation of any unbounded range with
the value Z, Z being greater than any representable number. This permits
us to treat unbounded ranges as equal. */
sgn0 = arg0 != 0 ? 0 : (upper0_p ? 1 : -1); sgn0 = arg0 != 0 ? 0 : (upper0_p ? 1 : -1);
sgn1 = arg1 != 0 ? 0 : (upper1_p ? 1 : -1); sgn1 = arg1 != 0 ? 0 : (upper1_p ? 1 : -1);
switch (code) switch (code)
{ {
case EQ_EXPR: case NE_EXPR: case EQ_EXPR:
result = (code == NE_EXPR); result = sgn0 == sgn1;
break; break;
case LT_EXPR: case LE_EXPR: case NE_EXPR:
result = sgn0 != sgn1;
break;
case LT_EXPR:
result = sgn0 < sgn1; result = sgn0 < sgn1;
break; break;
case GT_EXPR: case GE_EXPR: case LE_EXPR:
result = sgn0 <= sgn1;
break;
case GT_EXPR:
result = sgn0 > sgn1; result = sgn0 > sgn1;
break; break;
case GE_EXPR:
result = sgn0 >= sgn1;
break;
default: default:
abort (); abort ();
} }

2
gnu/dist/gcc/gcc.1 vendored
View File

@ -22,7 +22,7 @@
.. ..
.TH GCC 1 "\*(Dt" "GNU Tools" "GNU Tools" .TH GCC 1 "\*(Dt" "GNU Tools" "GNU Tools"
.SH NAME .SH NAME
gcc, g++ \- GNU project C and C++ Compiler (egcs-1.1.1) gcc, g++ \- GNU project C and C++ Compiler (egcs-1.1.2)
.SH SYNOPSIS .SH SYNOPSIS
.B gcc .B gcc
.RI "[ " option " | " filename " ].\|.\|." .RI "[ " option " | " filename " ].\|.\|."

View File

@ -2349,6 +2349,10 @@ subst_stack_regs_pat (insn, regstack, pat)
break; break;
case IF_THEN_ELSE: case IF_THEN_ELSE:
/* dest has to be on stack. */
if (get_hard_regnum (regstack, *dest) < FIRST_STACK_REG)
abort ();
/* This insn requires the top of stack to be the destination. */ /* This insn requires the top of stack to be the destination. */
/* If the comparison operator is an FP comparison operator, /* If the comparison operator is an FP comparison operator,
@ -2402,9 +2406,7 @@ subst_stack_regs_pat (insn, regstack, pat)
} }
} }
/* Make dest the top of stack. Add dest to regstack if not present. */ /* Make dest the top of stack. */
if (get_hard_regnum (regstack, *dest) < FIRST_STACK_REG)
regstack->reg[++regstack->top] = REGNO (*dest);
SET_HARD_REG_BIT (regstack->reg_set, REGNO (*dest)); SET_HARD_REG_BIT (regstack->reg_set, REGNO (*dest));
replace_reg (dest, FIRST_STACK_REG); replace_reg (dest, FIRST_STACK_REG);