Merge egcs 1.1.2 conflicts.
This commit is contained in:
parent
d3989ee704
commit
d2833781e6
36
gnu/dist/gcc/Makefile.in
vendored
36
gnu/dist/gcc/Makefile.in
vendored
@ -280,6 +280,8 @@ includedir = $(local_prefix)/include
|
||||
assertdir = $(tooldir)/include
|
||||
# where the info files go
|
||||
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.
|
||||
manext = .1
|
||||
objext = .o
|
||||
@ -383,6 +385,10 @@ LIB1FUNCS_EXTRA =
|
||||
# Assembler files should have names ending in `.asm'.
|
||||
LIB2FUNCS_EXTRA =
|
||||
|
||||
# Handle cpp installation.
|
||||
INSTALL_CPP=
|
||||
UNINSTALL_CPP=
|
||||
|
||||
# Default float.h source to use for cross-compiler.
|
||||
# This is overridden by configure.
|
||||
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) \
|
||||
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 \
|
||||
flags.h toplev.h
|
||||
|
||||
@ -2259,7 +2265,8 @@ install: $(INSTALL_TARGET) ; @true
|
||||
# Install the driver last so that the window when things are
|
||||
# broken is small.
|
||||
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
|
||||
# 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.
|
||||
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.
|
||||
# Run this on the target machine!
|
||||
install-float-h-cross: installdirs
|
||||
@ -2501,7 +2527,7 @@ install-collect2: collect2 installdirs
|
||||
$(INSTALL_PROGRAM) xgcc$(exeext) $(libsubdir)/gcc$(exeext)
|
||||
|
||||
# Cancel installation by deleting the installed files.
|
||||
uninstall: lang.uninstall
|
||||
uninstall: lang.uninstall $(UNINSTALL_CPP)
|
||||
-rm -rf $(libsubdir)
|
||||
-rm -rf $(bindir)/$(GCC_INSTALL_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 \
|
||||
if [ "`echo $$dir/*$(objext)`" != "$$dir/*$(objext)" ] ; then \
|
||||
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 stage$$stage/$$file > tmp-foo2 \
|
||||
&& (cmp tmp-foo1 tmp-foo2 > /dev/null 2>&1 || echo $$file differs >> .bad_compare) || true; \
|
||||
else true; fi; \
|
||||
done; \
|
||||
fi; \
|
||||
done
|
||||
@ -2779,7 +2807,9 @@ gnucompare gnucompare3 gnucompare4 gnucompare-lean gnucompare3-lean gnucompare4-
|
||||
for dir in tmp-foo $(SUBDIRS); do \
|
||||
if [ "`echo $$dir/*$(objext)`" != "$$dir/*$(objext)" ] ; then \
|
||||
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; \
|
||||
else true; fi; \
|
||||
done; \
|
||||
fi; \
|
||||
done
|
||||
|
6
gnu/dist/gcc/c-common.c
vendored
6
gnu/dist/gcc/c-common.c
vendored
@ -2376,6 +2376,12 @@ shorten_compare (op0_ptr, op1_ptr, restype_ptr, rescode_ptr)
|
||||
|
||||
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);
|
||||
minval = TYPE_MIN_VALUE (type);
|
||||
|
||||
|
24
gnu/dist/gcc/config/alpha/alpha.h
vendored
24
gnu/dist/gcc/config/alpha/alpha.h
vendored
@ -608,18 +608,20 @@ extern void override_options ();
|
||||
/* 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
|
||||
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,
|
||||
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. */
|
||||
or 8-bit values. */
|
||||
|
||||
#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
|
||||
when one has mode MODE1 and one has mode 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. */
|
||||
|
||||
#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.
|
||||
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) \
|
||||
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 \
|
||||
&& GET_CODE (XEXP (X, 0)) == REG \
|
||||
&& REGNO (XEXP (X, 0)) < FIRST_PSEUDO_REGISTER \
|
||||
|
390
gnu/dist/gcc/configure
vendored
390
gnu/dist/gcc/configure
vendored
File diff suppressed because it is too large
Load Diff
97
gnu/dist/gcc/configure.in
vendored
97
gnu/dist/gcc/configure.in
vendored
@ -201,10 +201,12 @@ AC_CACHE_VAL(gcc_cv_header_inttypes_h,
|
||||
[#include <sys/types.h>
|
||||
#include <inttypes.h>],
|
||||
[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)])
|
||||
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 \
|
||||
index rindex strchr strrchr kill getrlimit setrlimit atoll atoq \
|
||||
@ -240,6 +242,7 @@ host_xm_defines=
|
||||
host_xmake_file=
|
||||
host_truncate_target=
|
||||
host_exeext=
|
||||
cpp_install_dir=
|
||||
|
||||
# Decode the host machine, then the target machine.
|
||||
# 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
|
||||
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
|
||||
*-*-linux-gnu*)
|
||||
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
|
||||
|
||||
case $machine in
|
||||
@ -412,6 +427,12 @@ for machine in $build $host $target; do
|
||||
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*)
|
||||
if [[ x$stabs = xyes ]]
|
||||
then
|
||||
@ -568,6 +589,10 @@ for machine in $build $host $target; do
|
||||
h8300-*-*)
|
||||
float_format=i32
|
||||
;;
|
||||
hppa*-*-openbsd*)
|
||||
target_cpu_default="MASK_SNAKE"
|
||||
tmake_file=pa/t-openbsd
|
||||
;;
|
||||
hppa1.1-*-pro*)
|
||||
tm_file="pa/pa-pro.h ${tm_file} pa/pa-pro-end.h libgloss.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"
|
||||
xm_file=pa/xm-pahpux.h
|
||||
xmake_file=pa/x-pa-hpux
|
||||
tmake_file=pa/t-pa
|
||||
if [[ x$gas = xyes ]]
|
||||
then
|
||||
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"
|
||||
# On FreeBSD, the headers are already ok, except for math.h.
|
||||
fixincludes=fixinc.wrap
|
||||
extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
|
||||
tmake_file=i386/t-freebsd
|
||||
gas=yes
|
||||
gnu_ld=yes
|
||||
@ -876,6 +903,12 @@ for machine in $build $host $target; do
|
||||
fixincludes=fixinc.wrap
|
||||
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*)
|
||||
tm_file=i386/i386-coff.h
|
||||
tmake_file=i386/t-i386bare
|
||||
@ -951,6 +984,7 @@ for machine in $build $host $target; do
|
||||
fi
|
||||
;;
|
||||
i[[34567]]86-*-gnu*)
|
||||
float_format=i386
|
||||
;;
|
||||
i[[34567]]86-go32-msdos | i[[34567]]86-*-go32*)
|
||||
xm_file=i386/xm-go32.h
|
||||
@ -1031,7 +1065,7 @@ for machine in $build $host $target; do
|
||||
else
|
||||
tmake_file=i386/t-sco5
|
||||
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
|
||||
xm_file="${xm_file} i386/xm-sco.h"
|
||||
@ -1100,7 +1134,7 @@ for machine in $build $host $target; do
|
||||
tmake_file=i386/t-crtpic
|
||||
xmake_file=x-svr4
|
||||
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
|
||||
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
|
||||
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
|
||||
xm_file="xm-alloca.h ${xm_file}"
|
||||
xm_defines=USG
|
||||
@ -1767,6 +1806,9 @@ for machine in $build $host $target; do
|
||||
tmake_file=m88k/t-luna
|
||||
fi
|
||||
;;
|
||||
m88k-*-openbsd*)
|
||||
tmake_file="${tmake_file} m88k/t-luna-gas"
|
||||
;;
|
||||
m88k-*-sysv3*)
|
||||
tm_file=m88k/sysv3.h
|
||||
extra_parts="crtbegin.o crtend.o"
|
||||
@ -1964,6 +2006,16 @@ for machine in $build $host $target; do
|
||||
fixincludes=fixinc.wrap
|
||||
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.
|
||||
tm_file="mips/news4.h ${tm_file}"
|
||||
if [[ x$stabs = xyes ]]; then
|
||||
@ -2300,6 +2352,9 @@ for machine in $build $host $target; do
|
||||
;;
|
||||
pdp11-*-*)
|
||||
;;
|
||||
ns32k-*-openbsd*)
|
||||
# Nothing special
|
||||
;;
|
||||
pyramid-*-*)
|
||||
cpu_type=pyr
|
||||
xmake_file=pyr/x-pyr
|
||||
@ -2312,6 +2367,13 @@ for machine in $build $host $target; do
|
||||
xmake_file=romp/x-mach
|
||||
use_collect2=yes
|
||||
;;
|
||||
romp-*-openbsd*)
|
||||
# Nothing special
|
||||
;;
|
||||
powerpc-*-openbsd*)
|
||||
tmake_file="${tmake_file} rs6000/t-rs6000 rs6000/t-openbsd"
|
||||
xmake_file=none
|
||||
;;
|
||||
powerpc-*-beos*)
|
||||
cpu_type=rs6000
|
||||
tm_file=rs6000/beos.h
|
||||
@ -2604,6 +2666,10 @@ for machine in $build $host $target; do
|
||||
fixincludes=fixinc.wrap
|
||||
tmake_file=t-netbsd
|
||||
;;
|
||||
sparc-*-openbsd*)
|
||||
# we need collect2 until our bug is fixed...
|
||||
use_collect2=yes
|
||||
;;
|
||||
sparc-*-bsd*)
|
||||
tm_file=sparc/bsd.h
|
||||
;;
|
||||
@ -2804,6 +2870,9 @@ for machine in $build $host $target; do
|
||||
tmake_file=t-netbsd
|
||||
float_format=vax
|
||||
;;
|
||||
vax-*-openbsd*)
|
||||
tmake_file="${tm_file} vax/t-openbsd"
|
||||
;;
|
||||
vax-*-ultrix*) # vaxen running ultrix
|
||||
tm_file="${tm_file} vax/ultrix.h"
|
||||
use_collect2=yes
|
||||
@ -2874,7 +2943,7 @@ for machine in $build $host $target; do
|
||||
alpha*-*-*)
|
||||
case $machine in
|
||||
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*)
|
||||
target_cpu_default2="MASK_CPU_EV5|MASK_BWX|MASK_MAX"
|
||||
@ -3076,6 +3145,19 @@ then
|
||||
esac
|
||||
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.
|
||||
echo "Using \`$srcdir/config/$out_file' to output insns."
|
||||
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(install)
|
||||
AC_SUBST(symbolic_link)
|
||||
AC_SUBST(cpp_install_dir)
|
||||
|
||||
|
||||
AC_SUBST_FILE(target_overrides)
|
||||
AC_SUBST_FILE(host_overrides)
|
||||
@ -3773,4 +3857,5 @@ host_overrides='${host_overrides}'
|
||||
cross_defines='${cross_defines}'
|
||||
cross_overrides='${cross_overrides}'
|
||||
build_overrides='${build_overrides}'
|
||||
cpp_install_dir='${cpp_install_dir}'
|
||||
])
|
||||
|
6
gnu/dist/gcc/cp/decl2.c
vendored
6
gnu/dist/gcc/cp/decl2.c
vendored
@ -2946,6 +2946,12 @@ start_objects (method_type)
|
||||
NULL_TREE),
|
||||
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 ();
|
||||
pushlevel (0);
|
||||
clear_last_expr ();
|
||||
|
4
gnu/dist/gcc/explow.c
vendored
4
gnu/dist/gcc/explow.c
vendored
@ -1,5 +1,5 @@
|
||||
/* 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.
|
||||
|
||||
@ -1186,7 +1186,7 @@ allocate_dynamic_stack_space (size, target, known_align)
|
||||
/* Our optimization works based upon being able to perform a simple
|
||||
transformation of this RTL into a (set REG REG) so make sure things
|
||||
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);
|
||||
}
|
||||
|
||||
|
152
gnu/dist/gcc/expr.c
vendored
152
gnu/dist/gcc/expr.c
vendored
@ -1,5 +1,5 @@
|
||||
/* 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.
|
||||
|
||||
@ -1618,6 +1618,10 @@ emit_block_move (x, y, size, align)
|
||||
int align;
|
||||
{
|
||||
rtx retval = 0;
|
||||
#ifdef TARGET_MEM_FUNCTIONS
|
||||
static tree fn;
|
||||
tree call_expr, arg_list;
|
||||
#endif
|
||||
|
||||
if (GET_MODE (x) != BLKmode)
|
||||
abort ();
|
||||
@ -1691,13 +1695,60 @@ emit_block_move (x, y, size, align)
|
||||
}
|
||||
|
||||
#ifdef TARGET_MEM_FUNCTIONS
|
||||
retval
|
||||
= emit_library_call_value (memcpy_libfunc, NULL_RTX, 0,
|
||||
ptr_mode, 3, XEXP (x, 0), Pmode,
|
||||
XEXP (y, 0), Pmode,
|
||||
convert_to_mode (TYPE_MODE (sizetype), size,
|
||||
TREE_UNSIGNED (sizetype)),
|
||||
TYPE_MODE (sizetype));
|
||||
/* It is incorrect to use the libcall calling conventions to call
|
||||
memcpy in this context.
|
||||
|
||||
This could be a user call to memcpy and the user may wish to
|
||||
examine the return value from memcpy.
|
||||
|
||||
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
|
||||
emit_library_call (bcopy_libfunc, 0,
|
||||
VOIDmode, 3, XEXP (y, 0), Pmode,
|
||||
@ -2213,6 +2264,10 @@ clear_storage (object, size, align)
|
||||
rtx size;
|
||||
int align;
|
||||
{
|
||||
#ifdef TARGET_MEM_FUNCTIONS
|
||||
static tree fn;
|
||||
tree call_expr, arg_list;
|
||||
#endif
|
||||
rtx retval = 0;
|
||||
|
||||
if (GET_MODE (object) == BLKmode)
|
||||
@ -2277,16 +2332,60 @@ clear_storage (object, size, align)
|
||||
|
||||
|
||||
#ifdef TARGET_MEM_FUNCTIONS
|
||||
retval
|
||||
= emit_library_call_value (memset_libfunc, NULL_RTX, 0,
|
||||
ptr_mode, 3,
|
||||
XEXP (object, 0), Pmode,
|
||||
const0_rtx,
|
||||
TYPE_MODE (integer_type_node),
|
||||
convert_to_mode
|
||||
(TYPE_MODE (sizetype), size,
|
||||
TREE_UNSIGNED (sizetype)),
|
||||
TYPE_MODE (sizetype));
|
||||
/* It is incorrect to use the libcall calling conventions to call
|
||||
memset in this context.
|
||||
|
||||
This could be a user call to memset and the user may wish to
|
||||
examine the return value from memset.
|
||||
|
||||
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 ("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
|
||||
emit_library_call (bzero_libfunc, 0,
|
||||
VOIDmode, 2,
|
||||
@ -3457,10 +3556,21 @@ store_expr (exp, target, want_value)
|
||||
|
||||
/* If value was not generated in the target, store it there.
|
||||
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)
|
||||
|| side_effects_p (temp)
|
||||
|| side_effects_p (target))
|
||||
|| (temp != target && (side_effects_p (temp)
|
||||
|| side_effects_p (target))))
|
||||
&& TREE_CODE (exp) != ERROR_MARK)
|
||||
{
|
||||
target = protect_from_queue (target, 1);
|
||||
@ -8703,7 +8813,7 @@ expand_builtin (exp, target, subtarget, mode, ignore)
|
||||
if (! can_handle_constant_p)
|
||||
{
|
||||
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 gen_rtx_CONSTANT_P_RTX (TYPE_MODE (integer_type_node),
|
||||
|
26
gnu/dist/gcc/fold-const.c
vendored
26
gnu/dist/gcc/fold-const.c
vendored
@ -1,5 +1,5 @@
|
||||
/* 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.
|
||||
|
||||
@ -2785,21 +2785,33 @@ range_binop (code, type, arg0, upper0_p, arg1, upper1_p)
|
||||
return 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
|
||||
and comparing bounds to non-bounds as above. */
|
||||
for neither. In real maths, we cannot assume open ended ranges are
|
||||
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);
|
||||
sgn1 = arg1 != 0 ? 0 : (upper1_p ? 1 : -1);
|
||||
switch (code)
|
||||
{
|
||||
case EQ_EXPR: case NE_EXPR:
|
||||
result = (code == NE_EXPR);
|
||||
case EQ_EXPR:
|
||||
result = sgn0 == sgn1;
|
||||
break;
|
||||
case LT_EXPR: case LE_EXPR:
|
||||
case NE_EXPR:
|
||||
result = sgn0 != sgn1;
|
||||
break;
|
||||
case LT_EXPR:
|
||||
result = sgn0 < sgn1;
|
||||
break;
|
||||
case GT_EXPR: case GE_EXPR:
|
||||
case LE_EXPR:
|
||||
result = sgn0 <= sgn1;
|
||||
break;
|
||||
case GT_EXPR:
|
||||
result = sgn0 > sgn1;
|
||||
break;
|
||||
case GE_EXPR:
|
||||
result = sgn0 >= sgn1;
|
||||
break;
|
||||
default:
|
||||
abort ();
|
||||
}
|
||||
|
2
gnu/dist/gcc/gcc.1
vendored
2
gnu/dist/gcc/gcc.1
vendored
@ -22,7 +22,7 @@
|
||||
..
|
||||
.TH GCC 1 "\*(Dt" "GNU Tools" "GNU Tools"
|
||||
.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
|
||||
.B gcc
|
||||
.RI "[ " option " | " filename " ].\|.\|."
|
||||
|
8
gnu/dist/gcc/reg-stack.c
vendored
8
gnu/dist/gcc/reg-stack.c
vendored
@ -2349,6 +2349,10 @@ subst_stack_regs_pat (insn, regstack, pat)
|
||||
break;
|
||||
|
||||
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. */
|
||||
|
||||
/* 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. */
|
||||
if (get_hard_regnum (regstack, *dest) < FIRST_STACK_REG)
|
||||
regstack->reg[++regstack->top] = REGNO (*dest);
|
||||
/* Make dest the top of stack. */
|
||||
SET_HARD_REG_BIT (regstack->reg_set, REGNO (*dest));
|
||||
replace_reg (dest, FIRST_STACK_REG);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user