Compare commits
12 Commits
Author | SHA1 | Date |
---|---|---|
Fedora Release Engineering | c85b508c0e | |
Bill Nottingham | 99c170daf6 | |
Jakub Jelinek | a4dde828cd | |
Jakub Jelinek | ff4c956886 | |
Jakub Jelinek | 6636b57642 | |
Jakub Jelinek | b03a15ac61 | |
Jakub Jelinek | 614bd41946 | |
Jakub Jelinek | fbde678bbe | |
Jakub Jelinek | 6cf12a2ed2 | |
Jakub Jelinek | 6c02716f78 | |
Jakub Jelinek | a98693e527 | |
Jesse Keating | d1805071c3 |
|
@ -1,2 +0,0 @@
|
||||||
fastjar-0.97.tar.gz
|
|
||||||
gcc-4.4.0-20090414.tar.bz2
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
fastjar-0.97.tar.gz
|
||||||
|
gcc-4.4.1-20090729.tar.bz2
|
21
Makefile
21
Makefile
|
@ -1,21 +0,0 @@
|
||||||
# Makefile for source rpm: gcc
|
|
||||||
# $Id: Makefile,v 1.1 2004/09/09 04:57:24 cvsdist Exp $
|
|
||||||
NAME := gcc
|
|
||||||
SPECFILE = $(firstword $(wildcard *.spec))
|
|
||||||
|
|
||||||
define find-makefile-common
|
|
||||||
for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
|
|
||||||
endef
|
|
||||||
|
|
||||||
MAKEFILE_COMMON := $(shell $(find-makefile-common))
|
|
||||||
|
|
||||||
ifeq ($(MAKEFILE_COMMON),)
|
|
||||||
# attempt a checkout
|
|
||||||
define checkout-makefile-common
|
|
||||||
test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2
|
|
||||||
endef
|
|
||||||
|
|
||||||
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
|
|
||||||
endif
|
|
||||||
|
|
||||||
include $(MAKEFILE_COMMON)
|
|
508
gcc.spec
508
gcc.spec
|
@ -1,58 +1,59 @@
|
||||||
%define DATE 20090414
|
%global DATE 20090729
|
||||||
%define SVNREV 146037
|
%global SVNREV 150210
|
||||||
%define gcc_version 4.4.0
|
%global gcc_version 4.4.1
|
||||||
# Note, gcc_release must be integer, if you want to add suffixes to
|
# Note, gcc_release must be integer, if you want to add suffixes to
|
||||||
# %{release}, append them after %{gcc_release} on Release: line.
|
# %{release}, append them after %{gcc_release} on Release: line.
|
||||||
%define gcc_release 0.34
|
%global gcc_release 2
|
||||||
%define _unpackaged_files_terminate_build 0
|
%global _unpackaged_files_terminate_build 0
|
||||||
%define multilib_64_archs sparc64 ppc64 s390x x86_64
|
%global multilib_64_archs sparc64 ppc64 s390x x86_64
|
||||||
%define include_gappletviewer 1
|
%global include_gappletviewer 1
|
||||||
%ifarch %{ix86} x86_64 ia64 ppc ppc64 alpha
|
%ifarch %{ix86} x86_64 ia64 ppc ppc64 alpha
|
||||||
%define build_ada 1
|
%global build_ada 1
|
||||||
%else
|
%else
|
||||||
%define build_ada 0
|
%global build_ada 0
|
||||||
%endif
|
%endif
|
||||||
%define build_java 1
|
%global build_java 1
|
||||||
%ifarch %{sparc}
|
%ifarch %{sparc}
|
||||||
%define build_cloog 0
|
%global build_cloog 0
|
||||||
%else
|
%else
|
||||||
%define build_cloog 1
|
%global build_cloog 1
|
||||||
%endif
|
%endif
|
||||||
|
%global build_libstdcxx_docs 1
|
||||||
# If you don't have already a usable gcc-java and libgcj for your arch,
|
# If you don't have already a usable gcc-java and libgcj for your arch,
|
||||||
# do on some arch which has it rpmbuild -bc --with java_tar gcc41.spec
|
# do on some arch which has it rpmbuild -bc --with java_tar gcc41.spec
|
||||||
# which creates libjava-classes-%{version}-%{release}.tar.bz2
|
# which creates libjava-classes-%{version}-%{release}.tar.bz2
|
||||||
# With this then on the new arch do rpmbuild -ba -v --with java_bootstrap gcc41.spec
|
# With this then on the new arch do rpmbuild -ba -v --with java_bootstrap gcc41.spec
|
||||||
%define bootstrap_java %{?_with_java_bootstrap:%{build_java}}%{!?_with_java_bootstrap:0}
|
%global bootstrap_java %{?_with_java_bootstrap:%{build_java}}%{!?_with_java_bootstrap:0}
|
||||||
%define build_java_tar %{?_with_java_tar:%{build_java}}%{!?_with_java_tar:0}
|
%global build_java_tar %{?_with_java_tar:%{build_java}}%{!?_with_java_tar:0}
|
||||||
%ifarch s390x
|
%ifarch s390x
|
||||||
%define multilib_32_arch s390
|
%global multilib_32_arch s390
|
||||||
%endif
|
%endif
|
||||||
%ifarch sparc64
|
%ifarch sparc64
|
||||||
%define multilib_32_arch sparcv9
|
%global multilib_32_arch sparcv9
|
||||||
%endif
|
%endif
|
||||||
%ifarch ppc64
|
%ifarch ppc64
|
||||||
%define multilib_32_arch ppc
|
%global multilib_32_arch ppc
|
||||||
%endif
|
%endif
|
||||||
%ifarch x86_64
|
%ifarch x86_64
|
||||||
%define multilib_32_arch i586
|
%global multilib_32_arch i586
|
||||||
%endif
|
%endif
|
||||||
Summary: Various compilers (C, C++, Objective-C, Java, ...)
|
Summary: Various compilers (C, C++, Objective-C, Java, ...)
|
||||||
Name: gcc
|
Name: gcc
|
||||||
Version: %{gcc_version}
|
Version: %{gcc_version}
|
||||||
Release: %{gcc_release}
|
Release: %{gcc_release}%{?dist}
|
||||||
# libgcc, libgfortran, libmudflap, libgomp, libstdc++ and crtstuff have
|
# libgcc, libgfortran, libmudflap, libgomp, libstdc++ and crtstuff have
|
||||||
# GCC Runtime Exception.
|
# GCC Runtime Exception.
|
||||||
License: GPLv3+, GPLv3+ with exceptions and GPLv2+ with exceptions
|
License: GPLv3+, GPLv3+ with exceptions and GPLv2+ with exceptions
|
||||||
Group: Development/Languages
|
Group: Development/Languages
|
||||||
# The source for this package was pulled from upstream's vcs. Use the
|
# The source for this package was pulled from upstream's vcs. Use the
|
||||||
# following commands to generate the tarball:
|
# following commands to generate the tarball:
|
||||||
# svn export svn://gcc.gnu.org/svn/gcc/branches/redhat/gcc-4_4-branch@%{SVNREV} gcc-%{version}-%{DATE}
|
# svn export svn://gcc.gnu.org/svn/gcc/branches/redhat/fc11-4_4-branch@%{SVNREV} gcc-%{version}-%{DATE}
|
||||||
# tar cf - gcc-%{version}-%{DATE} | bzip2 -9 > gcc-%{version}-%{DATE}.tar.bz2
|
# tar cf - gcc-%{version}-%{DATE} | bzip2 -9 > gcc-%{version}-%{DATE}.tar.bz2
|
||||||
Source0: gcc-%{version}-%{DATE}.tar.bz2
|
Source0: gcc-%{version}-%{DATE}.tar.bz2
|
||||||
Source1: libgcc_post_upgrade.c
|
Source1: libgcc_post_upgrade.c
|
||||||
Source2: README.libgcjwebplugin.so
|
Source2: README.libgcjwebplugin.so
|
||||||
Source3: protoize.1
|
Source3: protoize.1
|
||||||
%define fastjar_ver 0.97
|
%global fastjar_ver 0.97
|
||||||
Source4: http://download.savannah.nongnu.org/releases/fastjar/fastjar-%{fastjar_ver}.tar.gz
|
Source4: http://download.savannah.nongnu.org/releases/fastjar/fastjar-%{fastjar_ver}.tar.gz
|
||||||
URL: http://gcc.gnu.org
|
URL: http://gcc.gnu.org
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
|
@ -99,6 +100,10 @@ BuildRequires: libunwind >= 0.98
|
||||||
%if %{build_cloog}
|
%if %{build_cloog}
|
||||||
BuildRequires: ppl >= 0.10, ppl-devel >= 0.10, cloog-ppl >= 0.15, cloog-ppl-devel >= 0.15
|
BuildRequires: ppl >= 0.10, ppl-devel >= 0.10, cloog-ppl >= 0.15, cloog-ppl-devel >= 0.15
|
||||||
%endif
|
%endif
|
||||||
|
%if %{build_libstdcxx_docs}
|
||||||
|
BuildRequires: doxygen
|
||||||
|
BuildRequires: graphviz
|
||||||
|
%endif
|
||||||
Requires: cpp = %{version}-%{release}
|
Requires: cpp = %{version}-%{release}
|
||||||
# Need .eh_frame ld optimizations
|
# Need .eh_frame ld optimizations
|
||||||
# Need proper visibility support
|
# Need proper visibility support
|
||||||
|
@ -127,7 +132,8 @@ Obsoletes: libgnat < %{version}-%{release}
|
||||||
%if %{build_cloog}
|
%if %{build_cloog}
|
||||||
Requires: cloog-ppl >= 0.15
|
Requires: cloog-ppl >= 0.15
|
||||||
%endif
|
%endif
|
||||||
Prereq: /sbin/install-info
|
Requires(post): /sbin/install-info
|
||||||
|
Requires(preun): /sbin/install-info
|
||||||
AutoReq: true
|
AutoReq: true
|
||||||
|
|
||||||
Patch0: gcc44-hack.patch
|
Patch0: gcc44-hack.patch
|
||||||
|
@ -146,27 +152,30 @@ Patch16: gcc44-libgomp-omp_h-multilib.patch
|
||||||
Patch20: gcc44-libtool-no-rpath.patch
|
Patch20: gcc44-libtool-no-rpath.patch
|
||||||
Patch21: gcc44-cloog-dl.patch
|
Patch21: gcc44-cloog-dl.patch
|
||||||
Patch22: gcc44-raw-string.patch
|
Patch22: gcc44-raw-string.patch
|
||||||
Patch24: gcc44-atom.patch
|
Patch24: gcc44-unwind-debug-hook.patch
|
||||||
Patch26: gcc44-power7.patch
|
Patch25: gcc44-power7.patch
|
||||||
|
Patch26: gcc44-power7-2.patch
|
||||||
|
Patch27: gcc44-power7-3.patch
|
||||||
Patch28: gcc44-pr38757.patch
|
Patch28: gcc44-pr38757.patch
|
||||||
Patch30: gcc44-pr39543.patch
|
Patch29: gcc44-libstdc++-docs.patch
|
||||||
Patch31: gcc44-pr39763.patch
|
Patch30: gcc44-rh503816-1.patch
|
||||||
|
Patch31: gcc44-rh503816-2.patch
|
||||||
|
|
||||||
Patch1000: fastjar-0.97-segfault.patch
|
Patch1000: fastjar-0.97-segfault.patch
|
||||||
|
|
||||||
# On ARM EABI systems, we do want -gnueabi to be part of the
|
# On ARM EABI systems, we do want -gnueabi to be part of the
|
||||||
# target triple.
|
# target triple.
|
||||||
%ifnarch %{arm}
|
%ifnarch %{arm}
|
||||||
%define _gnu %{nil}
|
%global _gnu %{nil}
|
||||||
%endif
|
%endif
|
||||||
%ifarch sparcv9
|
%ifarch sparcv9
|
||||||
%define gcc_target_platform sparc64-%{_vendor}-%{_target_os}
|
%global gcc_target_platform sparc64-%{_vendor}-%{_target_os}
|
||||||
%endif
|
%endif
|
||||||
%ifarch ppc
|
%ifarch ppc
|
||||||
%define gcc_target_platform ppc64-%{_vendor}-%{_target_os}
|
%global gcc_target_platform ppc64-%{_vendor}-%{_target_os}
|
||||||
%endif
|
%endif
|
||||||
%ifnarch sparcv9 ppc
|
%ifnarch sparcv9 ppc
|
||||||
%define gcc_target_platform %{_target_platform}
|
%global gcc_target_platform %{_target_platform}
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%description
|
%description
|
||||||
|
@ -215,6 +224,15 @@ This is the GNU implementation of the standard C++ libraries. This
|
||||||
package includes the header files and libraries needed for C++
|
package includes the header files and libraries needed for C++
|
||||||
development. This includes rewritten implementation of STL.
|
development. This includes rewritten implementation of STL.
|
||||||
|
|
||||||
|
%package -n libstdc++-docs
|
||||||
|
Summary: Documentation for the GNU standard C++ library
|
||||||
|
Group: Development/Libraries
|
||||||
|
Autoreq: true
|
||||||
|
|
||||||
|
%description -n libstdc++-docs
|
||||||
|
Manual, doxygen generated API information and Frequently Asked Questions
|
||||||
|
for the GNU standard C++ library.
|
||||||
|
|
||||||
%package objc
|
%package objc
|
||||||
Summary: Objective-C support for GCC
|
Summary: Objective-C support for GCC
|
||||||
Group: Development/Languages
|
Group: Development/Languages
|
||||||
|
@ -251,7 +269,8 @@ Group: Development/Languages
|
||||||
Requires: gcc = %{version}-%{release}
|
Requires: gcc = %{version}-%{release}
|
||||||
Requires: libgfortran = %{version}-%{release}
|
Requires: libgfortran = %{version}-%{release}
|
||||||
BuildRequires: gmp-devel >= 4.1.2-8, mpfr-devel >= 2.2.1
|
BuildRequires: gmp-devel >= 4.1.2-8, mpfr-devel >= 2.2.1
|
||||||
Prereq: /sbin/install-info
|
Requires(post): /sbin/install-info
|
||||||
|
Requires(preun): /sbin/install-info
|
||||||
Autoreq: true
|
Autoreq: true
|
||||||
|
|
||||||
%description gfortran
|
%description gfortran
|
||||||
|
@ -270,7 +289,8 @@ Fortran dynamically linked programs.
|
||||||
%package -n libgomp
|
%package -n libgomp
|
||||||
Summary: GCC OpenMP v3.0 shared support library
|
Summary: GCC OpenMP v3.0 shared support library
|
||||||
Group: System Environment/Libraries
|
Group: System Environment/Libraries
|
||||||
Prereq: /sbin/install-info
|
Requires(post): /sbin/install-info
|
||||||
|
Requires(preun): /sbin/install-info
|
||||||
|
|
||||||
%description -n libgomp
|
%description -n libgomp
|
||||||
This package contains GCC shared support library which is needed
|
This package contains GCC shared support library which is needed
|
||||||
|
@ -305,7 +325,8 @@ Requires: gcc = %{version}-%{release}
|
||||||
Requires: libgcj = %{version}-%{release}
|
Requires: libgcj = %{version}-%{release}
|
||||||
Requires: libgcj-devel = %{version}-%{release}
|
Requires: libgcj-devel = %{version}-%{release}
|
||||||
Requires: /usr/share/java/eclipse-ecj.jar
|
Requires: /usr/share/java/eclipse-ecj.jar
|
||||||
Prereq: /sbin/install-info
|
Requires(post): /sbin/install-info
|
||||||
|
Requires(preun): /sbin/install-info
|
||||||
Autoreq: true
|
Autoreq: true
|
||||||
|
|
||||||
%description java
|
%description java
|
||||||
|
@ -315,7 +336,8 @@ bytecode into native code.
|
||||||
%package -n libgcj
|
%package -n libgcj
|
||||||
Summary: Java runtime library for gcc
|
Summary: Java runtime library for gcc
|
||||||
Group: System Environment/Libraries
|
Group: System Environment/Libraries
|
||||||
Prereq: /sbin/install-info
|
Requires(post): /sbin/install-info
|
||||||
|
Requires(preun): /sbin/install-info
|
||||||
Requires: zip >= 2.1
|
Requires: zip >= 2.1
|
||||||
Requires: gtk2 >= 2.4.0
|
Requires: gtk2 >= 2.4.0
|
||||||
Requires: glib2 >= 2.4.0
|
Requires: glib2 >= 2.4.0
|
||||||
|
@ -360,7 +382,8 @@ The Java(tm) runtime library sources for use in Eclipse.
|
||||||
%package -n cpp
|
%package -n cpp
|
||||||
Summary: The C Preprocessor
|
Summary: The C Preprocessor
|
||||||
Group: Development/Languages
|
Group: Development/Languages
|
||||||
Prereq: /sbin/install-info
|
Requires(post): /sbin/install-info
|
||||||
|
Requires(preun): /sbin/install-info
|
||||||
Autoreq: true
|
Autoreq: true
|
||||||
|
|
||||||
%description -n cpp
|
%description -n cpp
|
||||||
|
@ -390,7 +413,8 @@ Summary: Ada 95 support for GCC
|
||||||
Group: Development/Languages
|
Group: Development/Languages
|
||||||
Requires: gcc = %{version}-%{release}
|
Requires: gcc = %{version}-%{release}
|
||||||
Requires: libgnat = %{version}-%{release}, libgnat-devel = %{version}-%{release}
|
Requires: libgnat = %{version}-%{release}, libgnat-devel = %{version}-%{release}
|
||||||
Prereq: /sbin/install-info
|
Requires(post): /sbin/install-info
|
||||||
|
Requires(preun): /sbin/install-info
|
||||||
Autoreq: true
|
Autoreq: true
|
||||||
|
|
||||||
%description gnat
|
%description gnat
|
||||||
|
@ -435,11 +459,16 @@ which are required to compile with the GNAT.
|
||||||
%patch21 -p0 -b .cloog-dl~
|
%patch21 -p0 -b .cloog-dl~
|
||||||
%endif
|
%endif
|
||||||
%patch22 -p0 -b .raw-string~
|
%patch22 -p0 -b .raw-string~
|
||||||
%patch24 -p0 -b .atom~
|
%patch24 -p0 -b .unwind-debug-hook~
|
||||||
%patch26 -p0 -b .power7~
|
%patch25 -p0 -b .power7~
|
||||||
|
%patch26 -p0 -b .power7-2~
|
||||||
|
%patch27 -p0 -b .power7-3~
|
||||||
%patch28 -p0 -b .pr38757~
|
%patch28 -p0 -b .pr38757~
|
||||||
#%patch30 -p0 -b .pr39543~
|
%if %{build_libstdcxx_docs}
|
||||||
%patch31 -p0 -b .pr39763~
|
%patch29 -p0 -b .libstdc++-docs~
|
||||||
|
%endif
|
||||||
|
%patch30 -p0 -b .rh503816-1~
|
||||||
|
%patch31 -p0 -b .rh503816-2~
|
||||||
|
|
||||||
# This testcase doesn't compile.
|
# This testcase doesn't compile.
|
||||||
rm libjava/testsuite/libjava.lang/PR35020*
|
rm libjava/testsuite/libjava.lang/PR35020*
|
||||||
|
@ -452,7 +481,7 @@ tar xzf %{SOURCE4}
|
||||||
tar xjf %{SOURCE10}
|
tar xjf %{SOURCE10}
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
sed -i -e 's/4\.4\.1/4.4.0/' gcc/BASE-VER
|
sed -i -e 's/4\.4\.2/4.4.1/' gcc/BASE-VER
|
||||||
echo 'Red Hat %{version}-%{gcc_release}' > gcc/DEV-PHASE
|
echo 'Red Hat %{version}-%{gcc_release}' > gcc/DEV-PHASE
|
||||||
|
|
||||||
cp -a libstdc++-v3/config/cpu/i{4,3}86/atomicity.h
|
cp -a libstdc++-v3/config/cpu/i{4,3}86/atomicity.h
|
||||||
|
@ -493,7 +522,7 @@ fi
|
||||||
# fastjar, build it anyway.
|
# fastjar, build it anyway.
|
||||||
mkdir fastjar-%{fastjar_ver}/obj-%{gcc_target_platform}
|
mkdir fastjar-%{fastjar_ver}/obj-%{gcc_target_platform}
|
||||||
cd fastjar-%{fastjar_ver}/obj-%{gcc_target_platform}
|
cd fastjar-%{fastjar_ver}/obj-%{gcc_target_platform}
|
||||||
../configure CFLAGS="$RPM_OPT_FLAGS" --prefix=%{_prefix} --mandir=%{_mandir} --infodir=%{_infodir}
|
../configure CFLAGS="%{optflags}" --prefix=%{_prefix} --mandir=%{_mandir} --infodir=%{_infodir}
|
||||||
make %{?_smp_mflags}
|
make %{?_smp_mflags}
|
||||||
export PATH=`pwd`${PATH:+:$PATH}
|
export PATH=`pwd`${PATH:+:$PATH}
|
||||||
cd ../../
|
cd ../../
|
||||||
|
@ -533,7 +562,7 @@ cd ..
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
CC=gcc
|
CC=gcc
|
||||||
OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/\(-Wp,\)\?-D_FORTIFY_SOURCE=[12]//g'`
|
OPT_FLAGS=`echo %{optflags}|sed -e 's/\(-Wp,\)\?-D_FORTIFY_SOURCE=[12]//g'`
|
||||||
OPT_FLAGS=`echo $OPT_FLAGS|sed -e 's/-m64//g;s/-m32//g;s/-m31//g'`
|
OPT_FLAGS=`echo $OPT_FLAGS|sed -e 's/-m64//g;s/-m32//g;s/-m31//g'`
|
||||||
%ifarch sparc
|
%ifarch sparc
|
||||||
OPT_FLAGS=`echo $OPT_FLAGS|sed -e 's/-mcpu=ultrasparc/-mtune=ultrasparc/g;s/-mcpu=v[78]//g'`
|
OPT_FLAGS=`echo $OPT_FLAGS|sed -e 's/-mcpu=ultrasparc/-mtune=ultrasparc/g;s/-mcpu=v[78]//g'`
|
||||||
|
@ -632,19 +661,6 @@ CC="$CC" CFLAGS="$OPT_FLAGS" CXXFLAGS="`echo $OPT_FLAGS | sed 's/ -Wall / /g'`"
|
||||||
#GCJFLAGS="$OPT_FLAGS" make %{?_smp_mflags} BOOT_CFLAGS="$OPT_FLAGS" bootstrap
|
#GCJFLAGS="$OPT_FLAGS" make %{?_smp_mflags} BOOT_CFLAGS="$OPT_FLAGS" bootstrap
|
||||||
GCJFLAGS="$OPT_FLAGS" make %{?_smp_mflags} BOOT_CFLAGS="$OPT_FLAGS" profiledbootstrap
|
GCJFLAGS="$OPT_FLAGS" make %{?_smp_mflags} BOOT_CFLAGS="$OPT_FLAGS" profiledbootstrap
|
||||||
|
|
||||||
# run the tests.
|
|
||||||
make %{?_smp_mflags} -k check ALT_CC_UNDER_TEST=gcc ALT_CXX_UNDER_TEST=g++ RUNTESTFLAGS="--target_board=unix/'{,-fstack-protector}'" || :
|
|
||||||
echo ====================TESTING=========================
|
|
||||||
( ../contrib/test_summary || : ) 2>&1 | sed -n '/^cat.*EOF/,/^EOF/{/^cat.*EOF/d;/^EOF/d;/^LAST_UPDATED:/d;p;}'
|
|
||||||
echo ====================TESTING END=====================
|
|
||||||
mkdir testlogs-%{_target_platform}-%{version}-%{release}
|
|
||||||
for i in `find . -name \*.log | grep -F testsuite/ | grep -v 'config.log\|acats\|ada'`; do
|
|
||||||
ln $i testlogs-%{_target_platform}-%{version}-%{release}/ || :
|
|
||||||
done
|
|
||||||
tar cf - testlogs-%{_target_platform}-%{version}-%{release} | bzip2 -9c \
|
|
||||||
| uuencode testlogs-%{_target_platform}.tar.bz2 || :
|
|
||||||
rm -rf testlogs-%{_target_platform}-%{version}-%{release}
|
|
||||||
|
|
||||||
# Make protoize
|
# Make protoize
|
||||||
make -C gcc CC="./xgcc -B ./ -O2" proto
|
make -C gcc CC="./xgcc -B ./ -O2" proto
|
||||||
|
|
||||||
|
@ -656,6 +672,14 @@ done
|
||||||
make -C gcc generated-manpages
|
make -C gcc generated-manpages
|
||||||
for i in ../gcc/doc/*.texi; do mv -f $i.orig $i; done
|
for i in ../gcc/doc/*.texi; do mv -f $i.orig $i; done
|
||||||
|
|
||||||
|
# Make generated doxygen pages.
|
||||||
|
%if %{build_libstdcxx_docs}
|
||||||
|
cd %{gcc_target_platform}/libstdc++-v3
|
||||||
|
make doc-html-doxygen
|
||||||
|
make doc-man-doxygen
|
||||||
|
cd ../..
|
||||||
|
%endif
|
||||||
|
|
||||||
# Copy various doc files here and there
|
# Copy various doc files here and there
|
||||||
cd ..
|
cd ..
|
||||||
mkdir -p rpm.doc/gfortran rpm.doc/objc
|
mkdir -p rpm.doc/gfortran rpm.doc/objc
|
||||||
|
@ -704,11 +728,7 @@ tar cf - -T libjava-classes.list | bzip2 -9 > $RPM_SOURCE_DIR/libjava-classes-%{
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%install
|
%install
|
||||||
rm -fr $RPM_BUILD_ROOT
|
rm -fr %{buildroot}
|
||||||
|
|
||||||
perl -pi -e \
|
|
||||||
's~href="l(ibstdc|atest)~href="http://gcc.gnu.org/onlinedocs/libstdc++/l\1~' \
|
|
||||||
libstdc++-v3/doc/html/api.html
|
|
||||||
|
|
||||||
cd obj-%{gcc_target_platform}
|
cd obj-%{gcc_target_platform}
|
||||||
|
|
||||||
|
@ -724,31 +744,31 @@ TARGET_PLATFORM=%{gcc_target_platform}
|
||||||
# There are some MP bugs in libstdc++ Makefiles
|
# There are some MP bugs in libstdc++ Makefiles
|
||||||
make -C %{gcc_target_platform}/libstdc++-v3
|
make -C %{gcc_target_platform}/libstdc++-v3
|
||||||
|
|
||||||
make prefix=$RPM_BUILD_ROOT%{_prefix} mandir=$RPM_BUILD_ROOT%{_mandir} \
|
make prefix=%{buildroot}%{_prefix} mandir=%{buildroot}%{_mandir} \
|
||||||
infodir=$RPM_BUILD_ROOT%{_infodir} install
|
infodir=%{buildroot}%{_infodir} install
|
||||||
%if %{build_java}
|
%if %{build_java}
|
||||||
make DESTDIR=$RPM_BUILD_ROOT -C %{gcc_target_platform}/libjava install-src.zip
|
make DESTDIR=%{buildroot} -C %{gcc_target_platform}/libjava install-src.zip
|
||||||
%endif
|
%endif
|
||||||
%if %{build_ada}
|
%if %{build_ada}
|
||||||
chmod 644 $RPM_BUILD_ROOT%{_infodir}/gnat*
|
chmod 644 %{buildroot}%{_infodir}/gnat*
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
FULLPATH=$RPM_BUILD_ROOT%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}
|
FULLPATH=%{buildroot}%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}
|
||||||
FULLEPATH=$RPM_BUILD_ROOT%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}
|
FULLEPATH=%{buildroot}%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}
|
||||||
|
|
||||||
# fix some things
|
# fix some things
|
||||||
ln -sf gcc $RPM_BUILD_ROOT%{_prefix}/bin/cc
|
ln -sf gcc %{buildroot}%{_prefix}/bin/cc
|
||||||
mkdir -p $RPM_BUILD_ROOT/lib
|
mkdir -p %{buildroot}/lib
|
||||||
ln -sf ..%{_prefix}/bin/cpp $RPM_BUILD_ROOT/lib/cpp
|
ln -sf ..%{_prefix}/bin/cpp %{buildroot}/lib/cpp
|
||||||
ln -sf gfortran $RPM_BUILD_ROOT%{_prefix}/bin/f95
|
ln -sf gfortran %{buildroot}%{_prefix}/bin/f95
|
||||||
rm -f $RPM_BUILD_ROOT%{_infodir}/dir
|
rm -f %{buildroot}%{_infodir}/dir
|
||||||
gzip -9 $RPM_BUILD_ROOT%{_infodir}/*.info*
|
gzip -9 %{buildroot}%{_infodir}/*.info*
|
||||||
ln -sf gcc $RPM_BUILD_ROOT%{_prefix}/bin/gnatgcc
|
ln -sf gcc %{buildroot}%{_prefix}/bin/gnatgcc
|
||||||
|
|
||||||
cxxconfig="`find %{gcc_target_platform}/libstdc++-v3/include -name c++config.h`"
|
cxxconfig="`find %{gcc_target_platform}/libstdc++-v3/include -name c++config.h`"
|
||||||
for i in `find %{gcc_target_platform}/[36]*/libstdc++-v3/include -name c++config.h 2>/dev/null`; do
|
for i in `find %{gcc_target_platform}/[36]*/libstdc++-v3/include -name c++config.h 2>/dev/null`; do
|
||||||
if ! diff -up $cxxconfig $i; then
|
if ! diff -up $cxxconfig $i; then
|
||||||
cat > $RPM_BUILD_ROOT%{_prefix}/include/c++/%{gcc_version}/%{gcc_target_platform}/bits/c++config.h <<EOF
|
cat > %{buildroot}%{_prefix}/include/c++/%{gcc_version}/%{gcc_target_platform}/bits/c++config.h <<EOF
|
||||||
#ifndef _CPP_CPPCONFIG_WRAPPER
|
#ifndef _CPP_CPPCONFIG_WRAPPER
|
||||||
#define _CPP_CPPCONFIG_WRAPPER 1
|
#define _CPP_CPPCONFIG_WRAPPER 1
|
||||||
#include <bits/wordsize.h>
|
#include <bits/wordsize.h>
|
||||||
|
@ -771,7 +791,7 @@ EOF
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
for f in `find $RPM_BUILD_ROOT%{_prefix}/include/c++/%{gcc_version}/%{gcc_target_platform}/ -name c++config.h`; do
|
for f in `find %{buildroot}%{_prefix}/include/c++/%{gcc_version}/%{gcc_target_platform}/ -name c++config.h`; do
|
||||||
for i in 1 2 4 8; do
|
for i in 1 2 4 8; do
|
||||||
sed -i -e 's/#define _GLIBCXX_ATOMIC_BUILTINS_'$i' 1/#ifdef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_'$i'\
|
sed -i -e 's/#define _GLIBCXX_ATOMIC_BUILTINS_'$i' 1/#ifdef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_'$i'\
|
||||||
&\
|
&\
|
||||||
|
@ -788,15 +808,25 @@ done
|
||||||
# 4) it is huge
|
# 4) it is huge
|
||||||
# People can always precompile on their own whatever they want, but
|
# People can always precompile on their own whatever they want, but
|
||||||
# shipping this for everybody is unnecessary.
|
# shipping this for everybody is unnecessary.
|
||||||
rm -rf $RPM_BUILD_ROOT%{_prefix}/include/c++/%{gcc_version}/%{gcc_target_platform}/bits/stdc++.h.gch
|
rm -rf %{buildroot}%{_prefix}/include/c++/%{gcc_version}/%{gcc_target_platform}/bits/stdc++.h.gch
|
||||||
|
|
||||||
|
%if %{build_libstdcxx_docs}
|
||||||
|
libstdcxx_doc_builddir=%{gcc_target_platform}/libstdc++-v3/doc/doxygen
|
||||||
|
mkdir -p ../rpm.doc/libstdc++-v3
|
||||||
|
cp -r -p ../libstdc++-v3/doc/html ../rpm.doc/libstdc++-v3/html
|
||||||
|
mv $libstdcxx_doc_builddir/html ../rpm.doc/libstdc++-v3/html/api
|
||||||
|
mkdir -p %{buildroot}%{_mandir}
|
||||||
|
mv $libstdcxx_doc_builddir/man/man3 %{buildroot}%{_mandir}/man3/
|
||||||
|
find ../rpm.doc/libstdc++-v3 -name \*~ | xargs rm
|
||||||
|
%endif
|
||||||
|
|
||||||
%ifarch sparcv9 sparc64
|
%ifarch sparcv9 sparc64
|
||||||
ln -f $RPM_BUILD_ROOT%{_prefix}/bin/%{gcc_target_platform}-gcc \
|
ln -f %{buildroot}%{_prefix}/bin/%{gcc_target_platform}-gcc \
|
||||||
$RPM_BUILD_ROOT%{_prefix}/bin/sparc-%{_vendor}-%{_target_os}-gcc
|
%{buildroot}%{_prefix}/bin/sparc-%{_vendor}-%{_target_os}-gcc
|
||||||
%endif
|
%endif
|
||||||
%ifarch ppc ppc64
|
%ifarch ppc ppc64
|
||||||
ln -f $RPM_BUILD_ROOT%{_prefix}/bin/%{gcc_target_platform}-gcc \
|
ln -f %{buildroot}%{_prefix}/bin/%{gcc_target_platform}-gcc \
|
||||||
$RPM_BUILD_ROOT%{_prefix}/bin/ppc-%{_vendor}-%{_target_os}-gcc
|
%{buildroot}%{_prefix}/bin/ppc-%{_vendor}-%{_target_os}-gcc
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%ifarch sparcv9 ppc
|
%ifarch sparcv9 ppc
|
||||||
|
@ -811,24 +841,24 @@ else
|
||||||
FULLLPATH=$FULLPATH
|
FULLLPATH=$FULLPATH
|
||||||
fi
|
fi
|
||||||
|
|
||||||
find $RPM_BUILD_ROOT -name \*.la | xargs rm -f
|
find %{buildroot} -name \*.la | xargs rm -f
|
||||||
%if %{build_java}
|
%if %{build_java}
|
||||||
# gcj -static doesn't work properly anyway, unless using --whole-archive
|
# gcj -static doesn't work properly anyway, unless using --whole-archive
|
||||||
# and saving 35MB is not bad.
|
# and saving 35MB is not bad.
|
||||||
find $RPM_BUILD_ROOT -name libgcj.a -o -name libgtkpeer.a \
|
find %{buildroot} -name libgcj.a -o -name libgtkpeer.a \
|
||||||
-o -name libgjsmalsa.a -o -name libgcj-tools.a -o -name libjvm.a \
|
-o -name libgjsmalsa.a -o -name libgcj-tools.a -o -name libjvm.a \
|
||||||
-o -name libgij.a -o -name libgcj_bc.a -o -name libjavamath.a \
|
-o -name libgij.a -o -name libgcj_bc.a -o -name libjavamath.a \
|
||||||
| xargs rm -f
|
| xargs rm -f
|
||||||
|
|
||||||
mv $RPM_BUILD_ROOT%{_prefix}/lib/libgcj.spec $FULLPATH/
|
mv %{buildroot}%{_prefix}/lib/libgcj.spec $FULLPATH/
|
||||||
sed -i -e 's/lib: /&%%{static:%%eJava programs cannot be linked statically}/' \
|
sed -i -e 's/lib: /&%%{static:%%eJava programs cannot be linked statically}/' \
|
||||||
$FULLPATH/libgcj.spec
|
$FULLPATH/libgcj.spec
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
mkdir -p $RPM_BUILD_ROOT/%{_lib}
|
mkdir -p %{buildroot}/%{_lib}
|
||||||
mv -f $RPM_BUILD_ROOT%{_prefix}/%{_lib}/libgcc_s.so.1 $RPM_BUILD_ROOT/%{_lib}/libgcc_s-%{gcc_version}-%{DATE}.so.1
|
mv -f %{buildroot}%{_prefix}/%{_lib}/libgcc_s.so.1 %{buildroot}/%{_lib}/libgcc_s-%{gcc_version}-%{DATE}.so.1
|
||||||
chmod 755 $RPM_BUILD_ROOT/%{_lib}/libgcc_s-%{gcc_version}-%{DATE}.so.1
|
chmod 755 %{buildroot}/%{_lib}/libgcc_s-%{gcc_version}-%{DATE}.so.1
|
||||||
ln -sf libgcc_s-%{gcc_version}-%{DATE}.so.1 $RPM_BUILD_ROOT/%{_lib}/libgcc_s.so.1
|
ln -sf libgcc_s-%{gcc_version}-%{DATE}.so.1 %{buildroot}/%{_lib}/libgcc_s.so.1
|
||||||
ln -sf /%{_lib}/libgcc_s.so.1 $FULLPATH/libgcc_s.so
|
ln -sf /%{_lib}/libgcc_s.so.1 $FULLPATH/libgcc_s.so
|
||||||
%ifarch sparcv9 ppc
|
%ifarch sparcv9 ppc
|
||||||
ln -sf /lib64/libgcc_s.so.1 $FULLPATH/64/libgcc_s.so
|
ln -sf /lib64/libgcc_s.so.1 $FULLPATH/64/libgcc_s.so
|
||||||
|
@ -837,30 +867,30 @@ ln -sf /lib64/libgcc_s.so.1 $FULLPATH/64/libgcc_s.so
|
||||||
ln -sf /lib/libgcc_s.so.1 $FULLPATH/32/libgcc_s.so
|
ln -sf /lib/libgcc_s.so.1 $FULLPATH/32/libgcc_s.so
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
mv -f $RPM_BUILD_ROOT%{_prefix}/%{_lib}/libgomp.spec $FULLPATH/
|
mv -f %{buildroot}%{_prefix}/%{_lib}/libgomp.spec $FULLPATH/
|
||||||
|
|
||||||
%if %{build_ada}
|
%if %{build_ada}
|
||||||
mv -f $FULLPATH/adalib/libgnarl-*.so $RPM_BUILD_ROOT%{_prefix}/%{_lib}/
|
mv -f $FULLPATH/adalib/libgnarl-*.so %{buildroot}%{_prefix}/%{_lib}/
|
||||||
mv -f $FULLPATH/adalib/libgnat-*.so $RPM_BUILD_ROOT%{_prefix}/%{_lib}/
|
mv -f $FULLPATH/adalib/libgnat-*.so %{buildroot}%{_prefix}/%{_lib}/
|
||||||
rm -f $FULLPATH/adalib/libgnarl.so* $FULLPATH/adalib/libgnat.so*
|
rm -f $FULLPATH/adalib/libgnarl.so* $FULLPATH/adalib/libgnat.so*
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
mkdir -p $RPM_BUILD_ROOT%{_prefix}/libexec/getconf
|
mkdir -p %{buildroot}%{_prefix}/libexec/getconf
|
||||||
if gcc/xgcc -B gcc/ -E -dD -xc /dev/null | grep __LONG_MAX__.*2147483647; then
|
if gcc/xgcc -B gcc/ -E -dD -xc /dev/null | grep __LONG_MAX__.*2147483647; then
|
||||||
ln -sf POSIX_V6_ILP32_OFF32 $RPM_BUILD_ROOT%{_prefix}/libexec/getconf/default
|
ln -sf POSIX_V6_ILP32_OFF32 %{buildroot}%{_prefix}/libexec/getconf/default
|
||||||
else
|
else
|
||||||
ln -sf POSIX_V6_LP64_OFF64 $RPM_BUILD_ROOT%{_prefix}/libexec/getconf/default
|
ln -sf POSIX_V6_LP64_OFF64 %{buildroot}%{_prefix}/libexec/getconf/default
|
||||||
fi
|
fi
|
||||||
|
|
||||||
%if %{build_java}
|
%if %{build_java}
|
||||||
pushd ../fastjar-%{fastjar_ver}/obj-%{gcc_target_platform}
|
pushd ../fastjar-%{fastjar_ver}/obj-%{gcc_target_platform}
|
||||||
make install DESTDIR=$RPM_BUILD_ROOT
|
make install DESTDIR=%{buildroot}
|
||||||
popd
|
popd
|
||||||
|
|
||||||
if [ "%{_lib}" != "lib" ]; then
|
if [ "%{_lib}" != "lib" ]; then
|
||||||
mkdir -p $RPM_BUILD_ROOT%{_prefix}/%{_lib}/pkgconfig
|
mkdir -p %{buildroot}%{_prefix}/%{_lib}/pkgconfig
|
||||||
sed '/^libdir/s/lib$/%{_lib}/' $RPM_BUILD_ROOT%{_prefix}/lib/pkgconfig/libgcj-*.pc \
|
sed '/^libdir/s/lib$/%{_lib}/' %{buildroot}%{_prefix}/lib/pkgconfig/libgcj-*.pc \
|
||||||
> $RPM_BUILD_ROOT%{_prefix}/%{_lib}/pkgconfig/`basename $RPM_BUILD_ROOT%{_prefix}/lib/pkgconfig/libgcj-*.pc`
|
> %{buildroot}%{_prefix}/%{_lib}/pkgconfig/`basename %{buildroot}%{_prefix}/lib/pkgconfig/libgcj-*.pc`
|
||||||
fi
|
fi
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
@ -891,14 +921,14 @@ ln -sf ../../../../%{_lib}/libgij.so.10.* libgij.so
|
||||||
%endif
|
%endif
|
||||||
fi
|
fi
|
||||||
%if %{build_java}
|
%if %{build_java}
|
||||||
mv -f $RPM_BUILD_ROOT%{_prefix}/%{_lib}/libgcj_bc.so $FULLLPATH/
|
mv -f %{buildroot}%{_prefix}/%{_lib}/libgcj_bc.so $FULLLPATH/
|
||||||
%endif
|
%endif
|
||||||
mv -f $RPM_BUILD_ROOT%{_prefix}/%{_lib}/libstdc++.*a $FULLLPATH/
|
mv -f %{buildroot}%{_prefix}/%{_lib}/libstdc++.*a $FULLLPATH/
|
||||||
mv -f $RPM_BUILD_ROOT%{_prefix}/%{_lib}/libsupc++.*a .
|
mv -f %{buildroot}%{_prefix}/%{_lib}/libsupc++.*a .
|
||||||
mv -f $RPM_BUILD_ROOT%{_prefix}/%{_lib}/libgfortran.*a .
|
mv -f %{buildroot}%{_prefix}/%{_lib}/libgfortran.*a .
|
||||||
mv -f $RPM_BUILD_ROOT%{_prefix}/%{_lib}/libobjc.*a .
|
mv -f %{buildroot}%{_prefix}/%{_lib}/libobjc.*a .
|
||||||
mv -f $RPM_BUILD_ROOT%{_prefix}/%{_lib}/libgomp.*a .
|
mv -f %{buildroot}%{_prefix}/%{_lib}/libgomp.*a .
|
||||||
mv -f $RPM_BUILD_ROOT%{_prefix}/%{_lib}/libmudflap{,th}.*a $FULLLPATH/
|
mv -f %{buildroot}%{_prefix}/%{_lib}/libmudflap{,th}.*a $FULLLPATH/
|
||||||
|
|
||||||
%if %{build_ada}
|
%if %{build_ada}
|
||||||
%ifarch sparcv9 ppc
|
%ifarch sparcv9 ppc
|
||||||
|
@ -956,10 +986,10 @@ ln -sf ../`echo ../../../../lib/libgij.so.10.* | sed s~/lib/~/lib64/~` 64/libgij
|
||||||
ln -sf lib32/libgcj_bc.so libgcj_bc.so
|
ln -sf lib32/libgcj_bc.so libgcj_bc.so
|
||||||
ln -sf ../lib64/libgcj_bc.so 64/libgcj_bc.so
|
ln -sf ../lib64/libgcj_bc.so 64/libgcj_bc.so
|
||||||
%endif
|
%endif
|
||||||
mv -f $RPM_BUILD_ROOT%{_prefix}/lib64/libsupc++.*a 64/
|
mv -f %{buildroot}%{_prefix}/lib64/libsupc++.*a 64/
|
||||||
mv -f $RPM_BUILD_ROOT%{_prefix}/lib64/libgfortran.*a 64/
|
mv -f %{buildroot}%{_prefix}/lib64/libgfortran.*a 64/
|
||||||
mv -f $RPM_BUILD_ROOT%{_prefix}/lib64/libobjc.*a 64/
|
mv -f %{buildroot}%{_prefix}/lib64/libobjc.*a 64/
|
||||||
mv -f $RPM_BUILD_ROOT%{_prefix}/lib64/libgomp.*a 64/
|
mv -f %{buildroot}%{_prefix}/lib64/libgomp.*a 64/
|
||||||
ln -sf lib32/libstdc++.a libstdc++.a
|
ln -sf lib32/libstdc++.a libstdc++.a
|
||||||
ln -sf ../lib64/libstdc++.a 64/libstdc++.a
|
ln -sf ../lib64/libstdc++.a 64/libstdc++.a
|
||||||
ln -sf lib32/libmudflap.a libmudflap.a
|
ln -sf lib32/libmudflap.a libmudflap.a
|
||||||
|
@ -989,10 +1019,10 @@ ln -sf ../`echo ../../../../lib64/libgcj.so.10.* | sed s~/../lib64/~/~` 32/libgc
|
||||||
ln -sf ../`echo ../../../../lib64/libgcj-tools.so.10.* | sed s~/../lib64/~/~` 32/libgcj-tools.so
|
ln -sf ../`echo ../../../../lib64/libgcj-tools.so.10.* | sed s~/../lib64/~/~` 32/libgcj-tools.so
|
||||||
ln -sf ../`echo ../../../../lib64/libgij.so.10.* | sed s~/../lib64/~/~` 32/libgij.so
|
ln -sf ../`echo ../../../../lib64/libgij.so.10.* | sed s~/../lib64/~/~` 32/libgij.so
|
||||||
%endif
|
%endif
|
||||||
mv -f $RPM_BUILD_ROOT%{_prefix}/lib/libsupc++.*a 32/
|
mv -f %{buildroot}%{_prefix}/lib/libsupc++.*a 32/
|
||||||
mv -f $RPM_BUILD_ROOT%{_prefix}/lib/libgfortran.*a 32/
|
mv -f %{buildroot}%{_prefix}/lib/libgfortran.*a 32/
|
||||||
mv -f $RPM_BUILD_ROOT%{_prefix}/lib/libobjc.*a 32/
|
mv -f %{buildroot}%{_prefix}/lib/libobjc.*a 32/
|
||||||
mv -f $RPM_BUILD_ROOT%{_prefix}/lib/libgomp.*a 32/
|
mv -f %{buildroot}%{_prefix}/lib/libgomp.*a 32/
|
||||||
%endif
|
%endif
|
||||||
%ifarch sparc64 ppc64
|
%ifarch sparc64 ppc64
|
||||||
ln -sf ../lib32/libstdc++.a 32/libstdc++.a
|
ln -sf ../lib32/libstdc++.a 32/libstdc++.a
|
||||||
|
@ -1031,14 +1061,14 @@ strip -g `find . \( -name libgfortran.a -o -name libobjc.a -o -name libgomp.a \
|
||||||
-o -name libmudflap.a -o -name libmudflapth.a \
|
-o -name libmudflap.a -o -name libmudflapth.a \
|
||||||
-o -name libgcc.a -o -name libgcov.a \) -a -type f`
|
-o -name libgcc.a -o -name libgcov.a \) -a -type f`
|
||||||
popd
|
popd
|
||||||
chmod 755 $RPM_BUILD_ROOT%{_prefix}/%{_lib}/libgfortran.so.3.*
|
chmod 755 %{buildroot}%{_prefix}/%{_lib}/libgfortran.so.3.*
|
||||||
chmod 755 $RPM_BUILD_ROOT%{_prefix}/%{_lib}/libgomp.so.1.*
|
chmod 755 %{buildroot}%{_prefix}/%{_lib}/libgomp.so.1.*
|
||||||
chmod 755 $RPM_BUILD_ROOT%{_prefix}/%{_lib}/libmudflap{,th}.so.0.*
|
chmod 755 %{buildroot}%{_prefix}/%{_lib}/libmudflap{,th}.so.0.*
|
||||||
chmod 755 $RPM_BUILD_ROOT%{_prefix}/%{_lib}/libobjc.so.2.*
|
chmod 755 %{buildroot}%{_prefix}/%{_lib}/libobjc.so.2.*
|
||||||
|
|
||||||
%if %{build_ada}
|
%if %{build_ada}
|
||||||
chmod 755 $RPM_BUILD_ROOT%{_prefix}/%{_lib}/libgnarl*so*
|
chmod 755 %{buildroot}%{_prefix}/%{_lib}/libgnarl*so*
|
||||||
chmod 755 $RPM_BUILD_ROOT%{_prefix}/%{_lib}/libgnat*so*
|
chmod 755 %{buildroot}%{_prefix}/%{_lib}/libgnat*so*
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
mv $FULLPATH/include-fixed/syslimits.h $FULLPATH/include/syslimits.h
|
mv $FULLPATH/include-fixed/syslimits.h $FULLPATH/include/syslimits.h
|
||||||
|
@ -1051,7 +1081,7 @@ for h in `find $FULLPATH/include -name \*.h`; do
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
cat > $RPM_BUILD_ROOT%{_prefix}/bin/c89 <<"EOF"
|
cat > %{buildroot}%{_prefix}/bin/c89 <<"EOF"
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
fl="-std=c89"
|
fl="-std=c89"
|
||||||
for opt; do
|
for opt; do
|
||||||
|
@ -1063,7 +1093,7 @@ for opt; do
|
||||||
done
|
done
|
||||||
exec gcc $fl ${1+"$@"}
|
exec gcc $fl ${1+"$@"}
|
||||||
EOF
|
EOF
|
||||||
cat > $RPM_BUILD_ROOT%{_prefix}/bin/c99 <<"EOF"
|
cat > %{buildroot}%{_prefix}/bin/c99 <<"EOF"
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
fl="-std=c99"
|
fl="-std=c99"
|
||||||
for opt; do
|
for opt; do
|
||||||
|
@ -1075,11 +1105,11 @@ for opt; do
|
||||||
done
|
done
|
||||||
exec gcc $fl ${1+"$@"}
|
exec gcc $fl ${1+"$@"}
|
||||||
EOF
|
EOF
|
||||||
chmod 755 $RPM_BUILD_ROOT%{_prefix}/bin/c?9
|
chmod 755 %{buildroot}%{_prefix}/bin/c?9
|
||||||
|
|
||||||
mkdir -p $RPM_BUILD_ROOT%{_prefix}/sbin
|
mkdir -p %{buildroot}%{_prefix}/sbin
|
||||||
gcc -static -Os %{SOURCE1} -o $RPM_BUILD_ROOT%{_prefix}/sbin/libgcc_post_upgrade
|
gcc -static -Os %{SOURCE1} -o %{buildroot}%{_prefix}/sbin/libgcc_post_upgrade
|
||||||
strip $RPM_BUILD_ROOT%{_prefix}/sbin/libgcc_post_upgrade
|
strip %{buildroot}%{_prefix}/sbin/libgcc_post_upgrade
|
||||||
|
|
||||||
cd ..
|
cd ..
|
||||||
%find_lang %{name}
|
%find_lang %{name}
|
||||||
|
@ -1087,38 +1117,54 @@ cd ..
|
||||||
|
|
||||||
# Remove binaries we will not be including, so that they don't end up in
|
# Remove binaries we will not be including, so that they don't end up in
|
||||||
# gcc-debuginfo
|
# gcc-debuginfo
|
||||||
rm -f $RPM_BUILD_ROOT%{_prefix}/%{_lib}/{libffi*,libiberty.a}
|
rm -f %{buildroot}%{_prefix}/%{_lib}/{libffi*,libiberty.a}
|
||||||
rm -f $FULLEPATH/install-tools/{mkheaders,fixincl}
|
rm -f $FULLEPATH/install-tools/{mkheaders,fixincl}
|
||||||
rm -f $RPM_BUILD_ROOT%{_prefix}/lib/{32,64}/libiberty.a
|
rm -f %{buildroot}%{_prefix}/lib/{32,64}/libiberty.a
|
||||||
rm -f $RPM_BUILD_ROOT%{_prefix}/%{_lib}/libssp*
|
rm -f %{buildroot}%{_prefix}/%{_lib}/libssp*
|
||||||
rm -f $RPM_BUILD_ROOT%{_prefix}/bin/gnative2ascii
|
rm -f %{buildroot}%{_prefix}/bin/gnative2ascii
|
||||||
|
|
||||||
%ifarch %{multilib_64_archs}
|
%ifarch %{multilib_64_archs}
|
||||||
# Remove libraries for the other arch on multilib arches
|
# Remove libraries for the other arch on multilib arches
|
||||||
rm -f $RPM_BUILD_ROOT%{_prefix}/lib/lib*.so*
|
rm -f %{buildroot}%{_prefix}/lib/lib*.so*
|
||||||
rm -f $RPM_BUILD_ROOT%{_prefix}/lib/lib*.a
|
rm -f %{buildroot}%{_prefix}/lib/lib*.a
|
||||||
%else
|
%else
|
||||||
%ifarch sparcv9 ppc
|
%ifarch sparcv9 ppc
|
||||||
rm -f $RPM_BUILD_ROOT%{_prefix}/lib64/lib*.so*
|
rm -f %{buildroot}%{_prefix}/lib64/lib*.so*
|
||||||
rm -f $RPM_BUILD_ROOT%{_prefix}/lib64/lib*.a
|
rm -f %{buildroot}%{_prefix}/lib64/lib*.a
|
||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if %{build_java}
|
%if %{build_java}
|
||||||
mkdir -p $RPM_BUILD_ROOT%{_prefix}/share/java/gcj-endorsed \
|
mkdir -p %{buildroot}%{_prefix}/share/java/gcj-endorsed \
|
||||||
$RPM_BUILD_ROOT%{_prefix}/%{_lib}/gcj-%{version}/classmap.db.d
|
%{buildroot}%{_prefix}/%{_lib}/gcj-%{version}/classmap.db.d
|
||||||
chmod 755 $RPM_BUILD_ROOT%{_prefix}/share/java/gcj-endorsed \
|
chmod 755 %{buildroot}%{_prefix}/share/java/gcj-endorsed \
|
||||||
$RPM_BUILD_ROOT%{_prefix}/%{_lib}/gcj-%{version} \
|
%{buildroot}%{_prefix}/%{_lib}/gcj-%{version} \
|
||||||
$RPM_BUILD_ROOT%{_prefix}/%{_lib}/gcj-%{version}/classmap.db.d
|
%{buildroot}%{_prefix}/%{_lib}/gcj-%{version}/classmap.db.d
|
||||||
touch $RPM_BUILD_ROOT%{_prefix}/%{_lib}/gcj-%{version}/classmap.db
|
touch %{buildroot}%{_prefix}/%{_lib}/gcj-%{version}/classmap.db
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
install -m644 %{SOURCE3} $RPM_BUILD_ROOT%{_mandir}/man1/protoize.1
|
install -m644 %{SOURCE3} %{buildroot}%{_mandir}/man1/protoize.1
|
||||||
echo '.so man1/protoize.1' > $RPM_BUILD_ROOT%{_mandir}/man1/unprotoize.1
|
echo '.so man1/protoize.1' > %{buildroot}%{_mandir}/man1/unprotoize.1
|
||||||
chmod 644 $RPM_BUILD_ROOT%{_mandir}/man1/unprotoize.1
|
chmod 644 %{buildroot}%{_mandir}/man1/unprotoize.1
|
||||||
|
|
||||||
|
%check
|
||||||
|
cd obj-%{gcc_target_platform}
|
||||||
|
|
||||||
|
# run the tests.
|
||||||
|
make %{?_smp_mflags} -k check ALT_CC_UNDER_TEST=gcc ALT_CXX_UNDER_TEST=g++ RUNTESTFLAGS="--target_board=unix/'{,-fstack-protector}'" || :
|
||||||
|
echo ====================TESTING=========================
|
||||||
|
( LC_ALL=C ../contrib/test_summary || : ) 2>&1 | sed -n '/^cat.*EOF/,/^EOF/{/^cat.*EOF/d;/^EOF/d;/^LAST_UPDATED:/d;p;}'
|
||||||
|
echo ====================TESTING END=====================
|
||||||
|
mkdir testlogs-%{_target_platform}-%{version}-%{release}
|
||||||
|
for i in `find . -name \*.log | grep -F testsuite/ | grep -v 'config.log\|acats\|ada'`; do
|
||||||
|
ln $i testlogs-%{_target_platform}-%{version}-%{release}/ || :
|
||||||
|
done
|
||||||
|
tar cf - testlogs-%{_target_platform}-%{version}-%{release} | bzip2 -9c \
|
||||||
|
| uuencode testlogs-%{_target_platform}.tar.bz2 || :
|
||||||
|
rm -rf testlogs-%{_target_platform}-%{version}-%{release}
|
||||||
|
|
||||||
%clean
|
%clean
|
||||||
rm -rf $RPM_BUILD_ROOT
|
rm -rf %{buildroot}
|
||||||
|
|
||||||
%post
|
%post
|
||||||
/sbin/install-info \
|
/sbin/install-info \
|
||||||
|
@ -1164,7 +1210,7 @@ fi
|
||||||
/sbin/install-info \
|
/sbin/install-info \
|
||||||
--info-dir=%{_infodir} %{_infodir}/gnat_rm.info.gz || :
|
--info-dir=%{_infodir} %{_infodir}/gnat_rm.info.gz || :
|
||||||
/sbin/install-info \
|
/sbin/install-info \
|
||||||
--info-dir=%{_infodir} %{_infodir}/gnat_ugn_unw.info.gz || :
|
--info-dir=%{_infodir} %{_infodir}/gnat_ugn.info.gz || :
|
||||||
/sbin/install-info \
|
/sbin/install-info \
|
||||||
--info-dir=%{_infodir} %{_infodir}/gnat-style.info.gz || :
|
--info-dir=%{_infodir} %{_infodir}/gnat-style.info.gz || :
|
||||||
|
|
||||||
|
@ -1173,7 +1219,7 @@ if [ $1 = 0 ]; then
|
||||||
/sbin/install-info --delete \
|
/sbin/install-info --delete \
|
||||||
--info-dir=%{_infodir} %{_infodir}/gnat_rm.info.gz || :
|
--info-dir=%{_infodir} %{_infodir}/gnat_rm.info.gz || :
|
||||||
/sbin/install-info --delete \
|
/sbin/install-info --delete \
|
||||||
--info-dir=%{_infodir} %{_infodir}/gnat_ugn_unw.info.gz || :
|
--info-dir=%{_infodir} %{_infodir}/gnat_ugn.info.gz || :
|
||||||
/sbin/install-info --delete \
|
/sbin/install-info --delete \
|
||||||
--info-dir=%{_infodir} %{_infodir}/gnat-style.info.gz || :
|
--info-dir=%{_infodir} %{_infodir}/gnat-style.info.gz || :
|
||||||
fi
|
fi
|
||||||
|
@ -1234,7 +1280,7 @@ fi
|
||||||
%postun -n libmudflap -p /sbin/ldconfig
|
%postun -n libmudflap -p /sbin/ldconfig
|
||||||
|
|
||||||
%files -f %{name}.lang
|
%files -f %{name}.lang
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root,-)
|
||||||
%{_prefix}/bin/cc
|
%{_prefix}/bin/cc
|
||||||
%{_prefix}/bin/c89
|
%{_prefix}/bin/c89
|
||||||
%{_prefix}/bin/c99
|
%{_prefix}/bin/c99
|
||||||
|
@ -1357,7 +1403,7 @@ fi
|
||||||
%doc gcc/README* rpm.doc/changelogs/gcc/ChangeLog* gcc/COPYING*
|
%doc gcc/README* rpm.doc/changelogs/gcc/ChangeLog* gcc/COPYING*
|
||||||
|
|
||||||
%files -n cpp -f cpplib.lang
|
%files -n cpp -f cpplib.lang
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root,-)
|
||||||
/lib/cpp
|
/lib/cpp
|
||||||
%{_prefix}/bin/cpp
|
%{_prefix}/bin/cpp
|
||||||
%{_mandir}/man1/cpp.1*
|
%{_mandir}/man1/cpp.1*
|
||||||
|
@ -1368,14 +1414,14 @@ fi
|
||||||
%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/cc1
|
%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/cc1
|
||||||
|
|
||||||
%files -n libgcc
|
%files -n libgcc
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root,-)
|
||||||
/%{_lib}/libgcc_s-%{gcc_version}-%{DATE}.so.1
|
/%{_lib}/libgcc_s-%{gcc_version}-%{DATE}.so.1
|
||||||
/%{_lib}/libgcc_s.so.1
|
/%{_lib}/libgcc_s.so.1
|
||||||
%{_prefix}/sbin/libgcc_post_upgrade
|
%{_prefix}/sbin/libgcc_post_upgrade
|
||||||
%doc gcc/COPYING.LIB
|
%doc gcc/COPYING.LIB
|
||||||
|
|
||||||
%files c++
|
%files c++
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root,-)
|
||||||
%{_prefix}/bin/%{gcc_target_platform}-*++
|
%{_prefix}/bin/%{gcc_target_platform}-*++
|
||||||
%{_prefix}/bin/g++
|
%{_prefix}/bin/g++
|
||||||
%{_prefix}/bin/c++
|
%{_prefix}/bin/c++
|
||||||
|
@ -1409,11 +1455,11 @@ fi
|
||||||
%doc rpm.doc/changelogs/gcc/cp/ChangeLog*
|
%doc rpm.doc/changelogs/gcc/cp/ChangeLog*
|
||||||
|
|
||||||
%files -n libstdc++
|
%files -n libstdc++
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root,-)
|
||||||
%{_prefix}/%{_lib}/libstdc++.so.6*
|
%{_prefix}/%{_lib}/libstdc++.so.6*
|
||||||
|
|
||||||
%files -n libstdc++-devel
|
%files -n libstdc++-devel
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root,-)
|
||||||
%dir %{_prefix}/include/c++
|
%dir %{_prefix}/include/c++
|
||||||
%dir %{_prefix}/include/c++/%{gcc_version}
|
%dir %{_prefix}/include/c++/%{gcc_version}
|
||||||
%{_prefix}/include/c++/%{gcc_version}/[^gjos]*
|
%{_prefix}/include/c++/%{gcc_version}/[^gjos]*
|
||||||
|
@ -1437,10 +1483,17 @@ fi
|
||||||
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/libstdc++.so
|
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/libstdc++.so
|
||||||
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/libsupc++.a
|
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/libsupc++.a
|
||||||
%endif
|
%endif
|
||||||
%doc rpm.doc/changelogs/libstdc++-v3/ChangeLog* libstdc++-v3/README* libstdc++-v3/doc/html/
|
%doc rpm.doc/changelogs/libstdc++-v3/ChangeLog* libstdc++-v3/README*
|
||||||
|
|
||||||
|
%if %{build_libstdcxx_docs}
|
||||||
|
%files -n libstdc++-docs
|
||||||
|
%defattr(-,root,root)
|
||||||
|
%{_mandir}/man3/*
|
||||||
|
%doc rpm.doc/libstdc++-v3/html
|
||||||
|
%endif
|
||||||
|
|
||||||
%files objc
|
%files objc
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root,-)
|
||||||
%dir %{_prefix}/lib/gcc
|
%dir %{_prefix}/lib/gcc
|
||||||
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}
|
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}
|
||||||
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}
|
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}
|
||||||
|
@ -1466,18 +1519,18 @@ fi
|
||||||
%doc libobjc/THREADS* rpm.doc/changelogs/libobjc/ChangeLog*
|
%doc libobjc/THREADS* rpm.doc/changelogs/libobjc/ChangeLog*
|
||||||
|
|
||||||
%files objc++
|
%files objc++
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root,-)
|
||||||
%dir %{_prefix}/libexec/gcc
|
%dir %{_prefix}/libexec/gcc
|
||||||
%dir %{_prefix}/libexec/gcc/%{gcc_target_platform}
|
%dir %{_prefix}/libexec/gcc/%{gcc_target_platform}
|
||||||
%dir %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}
|
%dir %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}
|
||||||
%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/cc1objplus
|
%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/cc1objplus
|
||||||
|
|
||||||
%files -n libobjc
|
%files -n libobjc
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root,-)
|
||||||
%{_prefix}/%{_lib}/libobjc.so.2*
|
%{_prefix}/%{_lib}/libobjc.so.2*
|
||||||
|
|
||||||
%files gfortran
|
%files gfortran
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root,-)
|
||||||
%{_prefix}/bin/gfortran
|
%{_prefix}/bin/gfortran
|
||||||
%{_prefix}/bin/f95
|
%{_prefix}/bin/f95
|
||||||
%{_mandir}/man1/gfortran.1*
|
%{_mandir}/man1/gfortran.1*
|
||||||
|
@ -1512,12 +1565,12 @@ fi
|
||||||
%doc rpm.doc/gfortran/*
|
%doc rpm.doc/gfortran/*
|
||||||
|
|
||||||
%files -n libgfortran
|
%files -n libgfortran
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root,-)
|
||||||
%{_prefix}/%{_lib}/libgfortran.so.3*
|
%{_prefix}/%{_lib}/libgfortran.so.3*
|
||||||
|
|
||||||
%if %{build_java}
|
%if %{build_java}
|
||||||
%files java
|
%files java
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root,-)
|
||||||
%{_prefix}/bin/gcj
|
%{_prefix}/bin/gcj
|
||||||
%{_prefix}/bin/gjavah
|
%{_prefix}/bin/gjavah
|
||||||
%{_prefix}/bin/gcjh
|
%{_prefix}/bin/gcjh
|
||||||
|
@ -1559,7 +1612,7 @@ fi
|
||||||
%doc rpm.doc/changelogs/gcc/java/ChangeLog*
|
%doc rpm.doc/changelogs/gcc/java/ChangeLog*
|
||||||
|
|
||||||
%files -n libgcj
|
%files -n libgcj
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root,-)
|
||||||
%{_prefix}/bin/jv-convert
|
%{_prefix}/bin/jv-convert
|
||||||
%{_prefix}/bin/gij
|
%{_prefix}/bin/gij
|
||||||
%{_prefix}/bin/gjar
|
%{_prefix}/bin/gjar
|
||||||
|
@ -1620,7 +1673,7 @@ fi
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%files -n libgcj-devel
|
%files -n libgcj-devel
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root,-)
|
||||||
%dir %{_prefix}/lib/gcc
|
%dir %{_prefix}/lib/gcc
|
||||||
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}
|
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}
|
||||||
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}
|
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}
|
||||||
|
@ -1653,7 +1706,7 @@ fi
|
||||||
%doc rpm.doc/libjava/*
|
%doc rpm.doc/libjava/*
|
||||||
|
|
||||||
%files -n libgcj-src
|
%files -n libgcj-src
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root,-)
|
||||||
%dir %{_prefix}/share/java
|
%dir %{_prefix}/share/java
|
||||||
%{_prefix}/share/java/src*.zip
|
%{_prefix}/share/java/src*.zip
|
||||||
%{_prefix}/share/java/libgcj-tools-%{version}.jar
|
%{_prefix}/share/java/libgcj-tools-%{version}.jar
|
||||||
|
@ -1661,7 +1714,7 @@ fi
|
||||||
|
|
||||||
%if %{build_ada}
|
%if %{build_ada}
|
||||||
%files gnat
|
%files gnat
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root,-)
|
||||||
%{_prefix}/bin/gnat*
|
%{_prefix}/bin/gnat*
|
||||||
%{_infodir}/gnat*
|
%{_infodir}/gnat*
|
||||||
%dir %{_prefix}/lib/gcc
|
%dir %{_prefix}/lib/gcc
|
||||||
|
@ -1688,12 +1741,12 @@ fi
|
||||||
%doc rpm.doc/changelogs/gcc/ada/ChangeLog*
|
%doc rpm.doc/changelogs/gcc/ada/ChangeLog*
|
||||||
|
|
||||||
%files -n libgnat
|
%files -n libgnat
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root,-)
|
||||||
%{_prefix}/%{_lib}/libgnat-*.so
|
%{_prefix}/%{_lib}/libgnat-*.so
|
||||||
%{_prefix}/%{_lib}/libgnarl-*.so
|
%{_prefix}/%{_lib}/libgnarl-*.so
|
||||||
|
|
||||||
%files -n libgnat-devel
|
%files -n libgnat-devel
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root,-)
|
||||||
%dir %{_prefix}/lib/gcc
|
%dir %{_prefix}/lib/gcc
|
||||||
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}
|
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}
|
||||||
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}
|
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}
|
||||||
|
@ -1714,18 +1767,18 @@ fi
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%files -n libgomp
|
%files -n libgomp
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root,-)
|
||||||
%{_prefix}/%{_lib}/libgomp.so.1*
|
%{_prefix}/%{_lib}/libgomp.so.1*
|
||||||
%{_infodir}/libgomp.info*
|
%{_infodir}/libgomp.info*
|
||||||
%doc rpm.doc/changelogs/libgomp/ChangeLog*
|
%doc rpm.doc/changelogs/libgomp/ChangeLog*
|
||||||
|
|
||||||
%files -n libmudflap
|
%files -n libmudflap
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root,-)
|
||||||
%{_prefix}/%{_lib}/libmudflap.so.0*
|
%{_prefix}/%{_lib}/libmudflap.so.0*
|
||||||
%{_prefix}/%{_lib}/libmudflapth.so.0*
|
%{_prefix}/%{_lib}/libmudflapth.so.0*
|
||||||
|
|
||||||
%files -n libmudflap-devel
|
%files -n libmudflap-devel
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root,-)
|
||||||
%dir %{_prefix}/lib/gcc
|
%dir %{_prefix}/lib/gcc
|
||||||
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}
|
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}
|
||||||
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}
|
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}
|
||||||
|
@ -1750,6 +1803,123 @@ fi
|
||||||
%doc rpm.doc/changelogs/libmudflap/ChangeLog*
|
%doc rpm.doc/changelogs/libmudflap/ChangeLog*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Jul 29 2009 Jakub Jelinek <jakub@redhat.com> 4.4.1-2.fc11
|
||||||
|
- update from gcc-4_4-branch
|
||||||
|
- GCC 4.4.1 release
|
||||||
|
- PRs fortran/40727, rtl-optimization/40710, target/40832,
|
||||||
|
tree-optimization/40321, libfortran/40714, target/39943, target/40809,
|
||||||
|
tree-optimization/40792, c++/40740, libstdc++/40691, middle-end/40747,
|
||||||
|
c++/36628, c++/37206, c++/40502, c++/40684, c++/40689, fortran/40440,
|
||||||
|
rtl-optimization/40667, target/40668, c++/35828, c++/37816, c++/37946,
|
||||||
|
c++/40557, c++/40633, c++/40639, debug/40666, target/38900, c++/40274,
|
||||||
|
c++/40342, c++/40566, c++/40595, c++/40619, c/39902, fortran/40443,
|
||||||
|
fortran/40551, fortran/40576, fortran/40594, fortran/40638,
|
||||||
|
libfortran/40576, libstdc++/40297, libstdc++/40600, middle-end/40585,
|
||||||
|
middle-end/40669, other/40024, target/40587, tree-optimization/40493,
|
||||||
|
tree-optimization/40542, tree-optimization/40550,
|
||||||
|
tree-optimization/40579, tree-optimization/40582,
|
||||||
|
tree-optimization/40640, fortran/39800, fortran/40402,
|
||||||
|
libstdc++/40497, middle-end/40389, middle-end/40404, middle-end/40446,
|
||||||
|
middle-end/40460, objc/28050, target/40470, tree-optimization/40492,
|
||||||
|
fortran/40168, c++/40381, libfortran/40330, ada/40166,
|
||||||
|
bootstrap/40027, c++/38064, c++/39754, c++/40007,
|
||||||
|
c++/40139, c/40172, c++/40306, c++/40307, c++/40308, c++/40311,
|
||||||
|
c++/40370, c++/40372, c++/40373, debug/40109, fortran/22423,
|
||||||
|
fortran/38654, fortran/39893, fortran/40019, fortran/40195,
|
||||||
|
libfortran/25561, libfortran/37754, libfortran/38668,
|
||||||
|
libfortran/39665, libfortran/39667, libfortran/39702,
|
||||||
|
libfortran/39709, libfortran/39782, libfortran/40334,
|
||||||
|
libgfortran/39664, libgomp/40174, libstdc++/36211, libstdc++/40192,
|
||||||
|
libstdc++/40296, libstdc++/40299, middle-end/32950, middle-end/40147,
|
||||||
|
middle-end/40204, middle-end/40233, middle-end/40252,
|
||||||
|
middle-end/40291, middle-end/40328, middle-end/40340,
|
||||||
|
rtl-optimization/40105, target/40017, target/40153, target/40266,
|
||||||
|
testsuite/39907, tree-optimization/39999, tree-optimization/40087,
|
||||||
|
tree-optimization/40238, tree-optimization/40254
|
||||||
|
- fix ICE in gsi_insert_seq_nodes_after (#505798,
|
||||||
|
PR tree-optimization/40813)
|
||||||
|
- fix ICE in gimplify_conversion (#511229, PR c++/40780)
|
||||||
|
- fix Fortran MINLOC/MAXLOC/MINVAL/MAXVAL handling of infinities and NaNs,
|
||||||
|
speed them up (PRs fortran/40643, fortran/31067)
|
||||||
|
- fix ICE with Fortran data xfer without io unit (PR fortran/40839)
|
||||||
|
- vectorize unsigned int -> {float,double} conversions on x86/x86_64
|
||||||
|
(PR target/40811)
|
||||||
|
- avoid overlapping entries in .debug_ranges section (PR debug/40713)
|
||||||
|
- speed up polyhedron NF (PR middle-end/34163)
|
||||||
|
- fix debug info for inlines (PR debug/40573)
|
||||||
|
- optimize assuming allocatable arrays in the innermost
|
||||||
|
dimension are always stride 1 (PR fortran/32131)
|
||||||
|
- decrease memory consumption and speed up var-tracking pass (#503816)
|
||||||
|
- add -mcrc32 support on ix86
|
||||||
|
- fix up ix86 padding for branch mispredicts
|
||||||
|
- improve .debug_loc generation
|
||||||
|
- support Atom for -march=native
|
||||||
|
- add -mmovbe support for Atom
|
||||||
|
- improve ix86 instruction length computation, remove some unneeded padding
|
||||||
|
- add unwind debug hook for gdb
|
||||||
|
|
||||||
|
* Thu May 14 2009 Jakub Jelinek <jakub@redhat.com> 4.4.0-5
|
||||||
|
- update from gcc-4_4-branch
|
||||||
|
- PRs c++/17395, c/39983, fortran/38863, fortran/38956, fortran/39879,
|
||||||
|
fortran/40018, libstdc++/39546, libstdc++/40038, middle-end/39986,
|
||||||
|
middle-end/40021, middle-end/40023, middle-end/40043,
|
||||||
|
middle-end/40057, middle-end/40080, target/37179,
|
||||||
|
tree-optimization/40062, tree-optimization/40074
|
||||||
|
- fix Fortran FMT= character array arguments (#492209, PR fortran/39865)
|
||||||
|
- allow putting breakpoints on Fortran END{SUBROUTINE,FUNCTION}
|
||||||
|
(PR fortran/34153)
|
||||||
|
- incorporate changes suggested in gcc44 package review (#498911)
|
||||||
|
|
||||||
|
* Wed May 6 2009 Jakub Jelinek <jakub@redhat.com> 4.4.0-4
|
||||||
|
- update from gcc-4_4-branch
|
||||||
|
- PRs c++/40013, libgcj/39899, libstdc++/39868, libstdc++/39880,
|
||||||
|
libstdc++/39881, libstdc++/39882, libstdc++/39909, middle-end/39937,
|
||||||
|
rtl-optimization/39914, target/39565, testsuite/39769,
|
||||||
|
testsuite/39776, testsuite/39790, testsuite/39807,
|
||||||
|
tree-optimization/39941
|
||||||
|
- fix phiprop tuplification (#496400, PR tree-optimization/40022)
|
||||||
|
- don't add artificial default case label if switch labels already
|
||||||
|
cover the whole range (PR middle-end/39666)
|
||||||
|
- fix DSE with block reads (PR middle-end/40035)
|
||||||
|
- fix debuginfo for C++ typedef struct {...} T (PR debug/35463)
|
||||||
|
- remove some unnecessary padding on x86_64/i386 added for >= 4 control
|
||||||
|
flow insns in a 16-byte block (PR target/39942)
|
||||||
|
- don't create invalid DWARF location lists containing DW_OP_reg*
|
||||||
|
followed by DW_OP_deref*, instead use DW_OP_breg* 0 (#481675)
|
||||||
|
- add libstdc++-docs subpackage, move html manual to it, add doxygen
|
||||||
|
generated html and man pages
|
||||||
|
|
||||||
|
* Mon Apr 27 2009 Jakub Jelinek <jakub@redhat.com> 4.4.0-3
|
||||||
|
- update from gcc-4_4-branch
|
||||||
|
- PR bootstrap/39739
|
||||||
|
- fix -Wunused-value (#497545, PR c/39889)
|
||||||
|
- backport further power7-meissner branch changes (#497816)
|
||||||
|
- fix reg-stack ICE on SPEC2k6 453.povray with -m32 -O3 -msse3
|
||||||
|
(PR target/39856)
|
||||||
|
- fix x86_64 ICE on passing structure with flexible array member
|
||||||
|
(PR target/39903)
|
||||||
|
|
||||||
|
* Fri Apr 24 2009 Jakub Jelinek <jakub@redhat.com> 4.4.0-2
|
||||||
|
- update from gcc-4_4-branch
|
||||||
|
- PR c++/38228
|
||||||
|
- fix folding of cond expr with comparison to MAX/MIN (PR middle-end/39867)
|
||||||
|
- fix up gcc-gnat install-info arguments (#452783)
|
||||||
|
|
||||||
|
* Thu Apr 23 2009 Jakub Jelinek <jakub@redhat.com> 4.4.0-1
|
||||||
|
- update from gcc-4_4-branch
|
||||||
|
- GCC 4.4.0 release
|
||||||
|
- PRs libstdc++/39802, c++/39639, c/39855, rtl-optimization/39762,
|
||||||
|
testsuite/39781, tree-optimization/39824
|
||||||
|
- fix up DSE (PR rtl-optimization/39794)
|
||||||
|
- debuginfo fixes for VLA and nested/contained functions (#459374)
|
||||||
|
- improve -ftree-switch-conversion optimization if the constant is the
|
||||||
|
same in all cases
|
||||||
|
|
||||||
|
* Mon Apr 20 2009 Jakub Jelinek <jakub@redhat.com> 4.4.0-0.35
|
||||||
|
- update from gcc-4_4-branch
|
||||||
|
- PRs middle-end/39804, target/39678, target/39767, tree-optimization/39675,
|
||||||
|
tree-optimization/39764
|
||||||
|
|
||||||
* Tue Apr 14 2009 Jakub Jelinek <jakub@redhat.com> 4.4.0-0.34
|
* Tue Apr 14 2009 Jakub Jelinek <jakub@redhat.com> 4.4.0-0.34
|
||||||
- update from gcc-4_4-branch
|
- update from gcc-4_4-branch
|
||||||
- GCC 4.4.0-rc1
|
- GCC 4.4.0-rc1
|
||||||
|
@ -1787,7 +1957,7 @@ fi
|
||||||
tree-optimization/39557
|
tree-optimization/39557
|
||||||
- emit debuginfo for block local externs in C (PR debug/39563)
|
- emit debuginfo for block local externs in C (PR debug/39563)
|
||||||
- fix -maltivec conditional vector macro (PR target/39558)
|
- fix -maltivec conditional vector macro (PR target/39558)
|
||||||
- teach fwprop to handle asm (PR rtl-optimization/39543)
|
- teach fwprop to handle asm (PR inline-asm/39543)
|
||||||
|
|
||||||
* Tue Mar 24 2009 Jakub Jelinek <jakub@redhat.com> 4.4.0-0.29
|
* Tue Mar 24 2009 Jakub Jelinek <jakub@redhat.com> 4.4.0-0.29
|
||||||
- update from trunk
|
- update from trunk
|
||||||
|
@ -1824,7 +1994,7 @@ fi
|
||||||
- fix memcmp builtin asm redirection (PR middle-end/39443)
|
- fix memcmp builtin asm redirection (PR middle-end/39443)
|
||||||
- fix sparcv9 profiledbootstrap (PR bootstrap/39454)
|
- fix sparcv9 profiledbootstrap (PR bootstrap/39454)
|
||||||
|
|
||||||
* Thu Mar 12 2009 Dennis Gilmore <dennis@ausil.us>
|
* Thu Mar 12 2009 Dennis Gilmore <dennis@ausil.us>
|
||||||
- don't build with graphite support on sparc arches
|
- don't build with graphite support on sparc arches
|
||||||
- still missing some deps
|
- still missing some deps
|
||||||
|
|
||||||
|
|
|
@ -2409,7 +2409,7 @@
|
||||||
| m_NOCONA | m_CORE2 | m_GENERIC;
|
| m_NOCONA | m_CORE2 | m_GENERIC;
|
||||||
|
|
||||||
static enum stringop_alg stringop_alg = no_stringop;
|
static enum stringop_alg stringop_alg = no_stringop;
|
||||||
@@ -1952,7 +2038,8 @@ static const struct ptt processor_target
|
@@ -1953,7 +2039,8 @@ static const struct ptt processor_target
|
||||||
{&core2_cost, 16, 10, 16, 10, 16},
|
{&core2_cost, 16, 10, 16, 10, 16},
|
||||||
{&generic32_cost, 16, 7, 16, 7, 16},
|
{&generic32_cost, 16, 7, 16, 7, 16},
|
||||||
{&generic64_cost, 16, 10, 16, 10, 16},
|
{&generic64_cost, 16, 10, 16, 10, 16},
|
||||||
|
@ -2419,7 +2419,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
static const char *const cpu_names[TARGET_CPU_DEFAULT_max] =
|
static const char *const cpu_names[TARGET_CPU_DEFAULT_max] =
|
||||||
@@ -1970,6 +2057,7 @@ static const char *const cpu_names[TARGE
|
@@ -1971,6 +2058,7 @@ static const char *const cpu_names[TARGE
|
||||||
"prescott",
|
"prescott",
|
||||||
"nocona",
|
"nocona",
|
||||||
"core2",
|
"core2",
|
||||||
|
@ -2427,7 +2427,7 @@
|
||||||
"geode",
|
"geode",
|
||||||
"k6",
|
"k6",
|
||||||
"k6-2",
|
"k6-2",
|
||||||
@@ -2528,6 +2616,9 @@ override_options (bool main_args_p)
|
@@ -2529,6 +2617,9 @@ override_options (bool main_args_p)
|
||||||
{"core2", PROCESSOR_CORE2, CPU_CORE2,
|
{"core2", PROCESSOR_CORE2, CPU_CORE2,
|
||||||
PTA_64BIT | PTA_MMX | PTA_SSE | PTA_SSE2 | PTA_SSE3
|
PTA_64BIT | PTA_MMX | PTA_SSE | PTA_SSE2 | PTA_SSE3
|
||||||
| PTA_SSSE3 | PTA_CX16},
|
| PTA_SSSE3 | PTA_CX16},
|
||||||
|
@ -2437,7 +2437,7 @@
|
||||||
{"geode", PROCESSOR_GEODE, CPU_GEODE,
|
{"geode", PROCESSOR_GEODE, CPU_GEODE,
|
||||||
PTA_MMX | PTA_3DNOW | PTA_3DNOW_A |PTA_PREFETCH_SSE},
|
PTA_MMX | PTA_3DNOW | PTA_3DNOW_A |PTA_PREFETCH_SSE},
|
||||||
{"k6", PROCESSOR_K6, CPU_K6, PTA_MMX},
|
{"k6", PROCESSOR_K6, CPU_K6, PTA_MMX},
|
||||||
@@ -12866,6 +12957,263 @@ ix86_expand_unary_operator (enum rtx_cod
|
@@ -12903,6 +12994,263 @@ ix86_expand_unary_operator (enum rtx_cod
|
||||||
emit_move_insn (operands[0], dst);
|
emit_move_insn (operands[0], dst);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2701,7 +2701,7 @@
|
||||||
/* Return TRUE or FALSE depending on whether the unary operator meets the
|
/* Return TRUE or FALSE depending on whether the unary operator meets the
|
||||||
appropriate constraints. */
|
appropriate constraints. */
|
||||||
|
|
||||||
@@ -18985,6 +19333,7 @@ ix86_issue_rate (void)
|
@@ -19022,6 +19370,7 @@ ix86_issue_rate (void)
|
||||||
switch (ix86_tune)
|
switch (ix86_tune)
|
||||||
{
|
{
|
||||||
case PROCESSOR_PENTIUM:
|
case PROCESSOR_PENTIUM:
|
||||||
|
@ -2709,7 +2709,7 @@
|
||||||
case PROCESSOR_K6:
|
case PROCESSOR_K6:
|
||||||
return 2;
|
return 2;
|
||||||
|
|
||||||
@@ -19051,41 +19400,21 @@ ix86_flags_dependent (rtx insn, rtx dep_
|
@@ -19088,41 +19437,21 @@ ix86_flags_dependent (rtx insn, rtx dep_
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2764,7 +2764,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
@@ -19113,8 +19442,19 @@ ix86_adjust_cost (rtx insn, rtx link, rt
|
@@ -19150,8 +19479,19 @@ ix86_adjust_cost (rtx insn, rtx link, rt
|
||||||
{
|
{
|
||||||
case PROCESSOR_PENTIUM:
|
case PROCESSOR_PENTIUM:
|
||||||
/* Address Generation Interlock adds a cycle of latency. */
|
/* Address Generation Interlock adds a cycle of latency. */
|
||||||
|
@ -2786,7 +2786,7 @@
|
||||||
|
|
||||||
/* ??? Compares pair with jump/setcc. */
|
/* ??? Compares pair with jump/setcc. */
|
||||||
if (ix86_flags_dependent (insn, dep_insn, insn_type))
|
if (ix86_flags_dependent (insn, dep_insn, insn_type))
|
||||||
@@ -19123,7 +19463,7 @@ ix86_adjust_cost (rtx insn, rtx link, rt
|
@@ -19160,7 +19500,7 @@ ix86_adjust_cost (rtx insn, rtx link, rt
|
||||||
/* Floating point stores require value to be ready one cycle earlier. */
|
/* Floating point stores require value to be ready one cycle earlier. */
|
||||||
if (insn_type == TYPE_FMOV
|
if (insn_type == TYPE_FMOV
|
||||||
&& get_attr_memory (insn) == MEMORY_STORE
|
&& get_attr_memory (insn) == MEMORY_STORE
|
||||||
|
@ -2795,7 +2795,7 @@
|
||||||
cost += 1;
|
cost += 1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -19146,7 +19486,7 @@ ix86_adjust_cost (rtx insn, rtx link, rt
|
@@ -19183,7 +19523,7 @@ ix86_adjust_cost (rtx insn, rtx link, rt
|
||||||
in parallel with previous instruction in case
|
in parallel with previous instruction in case
|
||||||
previous instruction is not needed to compute the address. */
|
previous instruction is not needed to compute the address. */
|
||||||
if ((memory == MEMORY_LOAD || memory == MEMORY_BOTH)
|
if ((memory == MEMORY_LOAD || memory == MEMORY_BOTH)
|
||||||
|
@ -2804,7 +2804,7 @@
|
||||||
{
|
{
|
||||||
/* Claim moves to take one cycle, as core can issue one load
|
/* Claim moves to take one cycle, as core can issue one load
|
||||||
at time and the next load can start cycle later. */
|
at time and the next load can start cycle later. */
|
||||||
@@ -19175,7 +19515,7 @@ ix86_adjust_cost (rtx insn, rtx link, rt
|
@@ -19212,7 +19552,7 @@ ix86_adjust_cost (rtx insn, rtx link, rt
|
||||||
in parallel with previous instruction in case
|
in parallel with previous instruction in case
|
||||||
previous instruction is not needed to compute the address. */
|
previous instruction is not needed to compute the address. */
|
||||||
if ((memory == MEMORY_LOAD || memory == MEMORY_BOTH)
|
if ((memory == MEMORY_LOAD || memory == MEMORY_BOTH)
|
||||||
|
@ -2813,7 +2813,7 @@
|
||||||
{
|
{
|
||||||
/* Claim moves to take one cycle, as core can issue one load
|
/* Claim moves to take one cycle, as core can issue one load
|
||||||
at time and the next load can start cycle later. */
|
at time and the next load can start cycle later. */
|
||||||
@@ -19192,6 +19532,7 @@ ix86_adjust_cost (rtx insn, rtx link, rt
|
@@ -19229,6 +19569,7 @@ ix86_adjust_cost (rtx insn, rtx link, rt
|
||||||
case PROCESSOR_ATHLON:
|
case PROCESSOR_ATHLON:
|
||||||
case PROCESSOR_K8:
|
case PROCESSOR_K8:
|
||||||
case PROCESSOR_AMDFAM10:
|
case PROCESSOR_AMDFAM10:
|
||||||
|
@ -2821,7 +2821,7 @@
|
||||||
case PROCESSOR_GENERIC32:
|
case PROCESSOR_GENERIC32:
|
||||||
case PROCESSOR_GENERIC64:
|
case PROCESSOR_GENERIC64:
|
||||||
memory = get_attr_memory (insn);
|
memory = get_attr_memory (insn);
|
||||||
@@ -19200,7 +19541,7 @@ ix86_adjust_cost (rtx insn, rtx link, rt
|
@@ -19237,7 +19578,7 @@ ix86_adjust_cost (rtx insn, rtx link, rt
|
||||||
in parallel with previous instruction in case
|
in parallel with previous instruction in case
|
||||||
previous instruction is not needed to compute the address. */
|
previous instruction is not needed to compute the address. */
|
||||||
if ((memory == MEMORY_LOAD || memory == MEMORY_BOTH)
|
if ((memory == MEMORY_LOAD || memory == MEMORY_BOTH)
|
||||||
|
|
|
@ -0,0 +1,47 @@
|
||||||
|
--- libstdc++-v3/doc/html/index.html 2009-01-14 12:06:37.000000000 +0100
|
||||||
|
+++ libstdc++-v3/doc/html/index.html 2009-05-06 09:17:30.000000000 +0200
|
||||||
|
@@ -12,7 +12,8 @@
|
||||||
|
<div>
|
||||||
|
<h1>The GNU C++ Library Documentation</h1>
|
||||||
|
|
||||||
|
-<p>Copyright 2008 FSF</p>
|
||||||
|
+<p>Release 4.4.0</p>
|
||||||
|
+<p>Copyright 2008, 2009 FSF</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Permission is granted to copy, distribute and/or modify this
|
||||||
|
--- libstdc++-v3/doc/html/api.html 2009-04-20 21:21:15.000000000 +0200
|
||||||
|
+++ libstdc++-v3/doc/html/api.html 2009-05-06 09:17:24.000000000 +0200
|
||||||
|
@@ -17,27 +17,12 @@ useful for examining the signatures of p
|
||||||
|
the library classes, finding out what is in a particular include
|
||||||
|
file, looking at inheritance diagrams, etc.
|
||||||
|
</p><p>
|
||||||
|
-The source-level documentation for the most recent releases can be
|
||||||
|
-viewed online:
|
||||||
|
-</p><div class="itemizedlist"><ul type="disc"><li><p>
|
||||||
|
- <a class="ulink" href="libstdc++-html-USERS-3.4/index.html" target="_top">for the 3.4 release
|
||||||
|
+The source-level documentation can be viewed here:
|
||||||
|
+</p>
|
||||||
|
+<div class="itemizedlist"><ul type="disc">
|
||||||
|
+ <li><p>
|
||||||
|
+ <a class="ulink" href="api/index.html" target="_top">for the 4.4 release
|
||||||
|
</a>
|
||||||
|
- </p></li><li><p>
|
||||||
|
- <a class="ulink" href="libstdc++-html-USERS-4.1/index.html" target="_top">for the 4.1 release
|
||||||
|
- </a>
|
||||||
|
- </p></li><li><p>
|
||||||
|
- <a class="ulink" href="libstdc++-html-USERS-4.2/index.html" target="_top">for the 4.2 release
|
||||||
|
- </a>
|
||||||
|
- </p></li><li><p>
|
||||||
|
- <a class="ulink" href="libstdc++-html-USERS-4.3/index.html" target="_top">for the 4.3 release
|
||||||
|
- </a>
|
||||||
|
- </p></li><li><p>
|
||||||
|
- <a class="ulink" href="libstdc++-html-USERS-4.4/index.html" target="_top">for the 4.4 release
|
||||||
|
- </a>
|
||||||
|
- </p></li><li><p>
|
||||||
|
- <a class="ulink" href="latest-doxygen/index.html" target="_top">"the latest collection"
|
||||||
|
- </a>
|
||||||
|
- (For the main development tree; see the date on the first page.)
|
||||||
|
</p></li></ul></div><p>
|
||||||
|
This generated HTML collection, as above, is also available for download in the libstdc++ snapshots directory at
|
||||||
|
<code class="literal"><URL:ftp://gcc.gnu.org/pub/gcc/libstdc++/doxygen/></code>.
|
|
@ -0,0 +1,267 @@
|
||||||
|
2009-04-14 Michael Meissner <meissner@linux.vnet.ibm.com>
|
||||||
|
|
||||||
|
* config/rs6000/rs6000.c (rs6000_secondary_reload_inner): Handle
|
||||||
|
more possible combinations of addresses.
|
||||||
|
|
||||||
|
* config/rs6000/vector.md (vec_reload_and_plus_<mptrsize>): Allow
|
||||||
|
register+small constant in addition to register+register, and
|
||||||
|
restrict the insn to only match during reload and afterwards.
|
||||||
|
(vec_reload_and_reg_<mptrsize>): Allow for and of register
|
||||||
|
indirect to not generate insn not found message.
|
||||||
|
|
||||||
|
--- gcc/config/rs6000/vector.md (revision 146069)
|
||||||
|
+++ gcc/config/rs6000/vector.md (revision 146118)
|
||||||
|
@@ -129,14 +129,15 @@ (define_expand "reload_<VEC_R:mode>_<P:m
|
||||||
|
})
|
||||||
|
|
||||||
|
;; Reload sometimes tries to move the address to a GPR, and can generate
|
||||||
|
-;; invalid RTL for addresses involving AND -16.
|
||||||
|
+;; invalid RTL for addresses involving AND -16. Allow addresses involving
|
||||||
|
+;; reg+reg, reg+small constant, or just reg, all wrapped in an AND -16.
|
||||||
|
|
||||||
|
(define_insn_and_split "*vec_reload_and_plus_<mptrsize>"
|
||||||
|
[(set (match_operand:P 0 "gpc_reg_operand" "=b")
|
||||||
|
(and:P (plus:P (match_operand:P 1 "gpc_reg_operand" "r")
|
||||||
|
- (match_operand:P 2 "gpc_reg_operand" "r"))
|
||||||
|
+ (match_operand:P 2 "reg_or_cint_operand" "rI"))
|
||||||
|
(const_int -16)))]
|
||||||
|
- "TARGET_ALTIVEC || TARGET_VSX"
|
||||||
|
+ "(TARGET_ALTIVEC || TARGET_VSX) && (reload_in_progress || reload_completed)"
|
||||||
|
"#"
|
||||||
|
"&& reload_completed"
|
||||||
|
[(set (match_dup 0)
|
||||||
|
@@ -146,6 +147,21 @@ (define_insn_and_split "*vec_reload_and_
|
||||||
|
(and:P (match_dup 0)
|
||||||
|
(const_int -16)))
|
||||||
|
(clobber:CC (scratch:CC))])])
|
||||||
|
+
|
||||||
|
+;; The normal ANDSI3/ANDDI3 won't match if reload decides to move an AND -16
|
||||||
|
+;; address to a register because there is no clobber of a (scratch), so we add
|
||||||
|
+;; it here.
|
||||||
|
+(define_insn_and_split "*vec_reload_and_reg_<mptrsize>"
|
||||||
|
+ [(set (match_operand:P 0 "gpc_reg_operand" "=b")
|
||||||
|
+ (and:P (match_operand:P 1 "gpc_reg_operand" "r")
|
||||||
|
+ (const_int -16)))]
|
||||||
|
+ "(TARGET_ALTIVEC || TARGET_VSX) && (reload_in_progress || reload_completed)"
|
||||||
|
+ "#"
|
||||||
|
+ "&& reload_completed"
|
||||||
|
+ [(parallel [(set (match_dup 0)
|
||||||
|
+ (and:P (match_dup 1)
|
||||||
|
+ (const_int -16)))
|
||||||
|
+ (clobber:CC (scratch:CC))])])
|
||||||
|
|
||||||
|
;; Generic floating point vector arithmetic support
|
||||||
|
(define_expand "add<mode>3"
|
||||||
|
--- gcc/config/rs6000/rs6000.c (revision 146069)
|
||||||
|
+++ gcc/config/rs6000/rs6000.c (revision 146118)
|
||||||
|
@@ -12574,6 +12574,11 @@ rs6000_secondary_reload_inner (rtx reg,
|
||||||
|
enum reg_class rclass;
|
||||||
|
rtx addr;
|
||||||
|
rtx and_op2 = NULL_RTX;
|
||||||
|
+ rtx addr_op1;
|
||||||
|
+ rtx addr_op2;
|
||||||
|
+ rtx scratch_or_premodify = scratch;
|
||||||
|
+ rtx and_rtx;
|
||||||
|
+ rtx cc_clobber;
|
||||||
|
|
||||||
|
if (TARGET_DEBUG_ADDR)
|
||||||
|
{
|
||||||
|
@@ -12595,7 +12600,8 @@ rs6000_secondary_reload_inner (rtx reg,
|
||||||
|
|
||||||
|
switch (rclass)
|
||||||
|
{
|
||||||
|
- /* Move reg+reg addresses into a scratch register for GPRs. */
|
||||||
|
+ /* GPRs can handle reg + small constant, all other addresses need to use
|
||||||
|
+ the scratch register. */
|
||||||
|
case GENERAL_REGS:
|
||||||
|
case BASE_REGS:
|
||||||
|
if (GET_CODE (addr) == AND)
|
||||||
|
@@ -12603,70 +12609,152 @@ rs6000_secondary_reload_inner (rtx reg,
|
||||||
|
and_op2 = XEXP (addr, 1);
|
||||||
|
addr = XEXP (addr, 0);
|
||||||
|
}
|
||||||
|
+
|
||||||
|
+ if (GET_CODE (addr) == PRE_MODIFY)
|
||||||
|
+ {
|
||||||
|
+ scratch_or_premodify = XEXP (addr, 0);
|
||||||
|
+ gcc_assert (REG_P (scratch_or_premodify));
|
||||||
|
+ gcc_assert (GET_CODE (XEXP (addr, 1)) == PLUS);
|
||||||
|
+ addr = XEXP (addr, 1);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
if (GET_CODE (addr) == PLUS
|
||||||
|
&& (!rs6000_legitimate_offset_address_p (TImode, addr, true)
|
||||||
|
|| and_op2 != NULL_RTX))
|
||||||
|
{
|
||||||
|
- if (GET_CODE (addr) == SYMBOL_REF || GET_CODE (addr) == CONST
|
||||||
|
- || GET_CODE (addr) == CONST_INT)
|
||||||
|
- rs6000_emit_move (scratch, addr, GET_MODE (addr));
|
||||||
|
- else
|
||||||
|
- emit_insn (gen_rtx_SET (VOIDmode, scratch, addr));
|
||||||
|
- addr = scratch;
|
||||||
|
+ addr_op1 = XEXP (addr, 0);
|
||||||
|
+ addr_op2 = XEXP (addr, 1);
|
||||||
|
+ gcc_assert (legitimate_indirect_address_p (addr_op1, true));
|
||||||
|
+
|
||||||
|
+ if (!REG_P (addr_op2)
|
||||||
|
+ && (GET_CODE (addr_op2) != CONST_INT
|
||||||
|
+ || !satisfies_constraint_I (addr_op2)))
|
||||||
|
+ {
|
||||||
|
+ rs6000_emit_move (scratch, addr_op2, Pmode);
|
||||||
|
+ addr_op2 = scratch;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ emit_insn (gen_rtx_SET (VOIDmode,
|
||||||
|
+ scratch_or_premodify,
|
||||||
|
+ gen_rtx_PLUS (Pmode,
|
||||||
|
+ addr_op1,
|
||||||
|
+ addr_op2)));
|
||||||
|
+
|
||||||
|
+ addr = scratch_or_premodify;
|
||||||
|
+ scratch_or_premodify = scratch;
|
||||||
|
}
|
||||||
|
- else if (GET_CODE (addr) == PRE_MODIFY
|
||||||
|
- && REG_P (XEXP (addr, 0))
|
||||||
|
- && GET_CODE (XEXP (addr, 1)) == PLUS)
|
||||||
|
+ else if (!legitimate_indirect_address_p (addr, true)
|
||||||
|
+ && !rs6000_legitimate_offset_address_p (TImode, addr, true))
|
||||||
|
{
|
||||||
|
- emit_insn (gen_rtx_SET (VOIDmode, XEXP (addr, 0), XEXP (addr, 1)));
|
||||||
|
- addr = XEXP (addr, 0);
|
||||||
|
+ rs6000_emit_move (scratch_or_premodify, addr, Pmode);
|
||||||
|
+ addr = scratch_or_premodify;
|
||||||
|
+ scratch_or_premodify = scratch;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
+ /* Float/Altivec registers can only handle reg+reg addressing. Move
|
||||||
|
+ other addresses into a scratch register. */
|
||||||
|
+ case FLOAT_REGS:
|
||||||
|
+ case VSX_REGS:
|
||||||
|
+ case ALTIVEC_REGS:
|
||||||
|
+
|
||||||
|
/* With float regs, we need to handle the AND ourselves, since we can't
|
||||||
|
use the Altivec instruction with an implicit AND -16. Allow scalar
|
||||||
|
loads to float registers to use reg+offset even if VSX. */
|
||||||
|
- case FLOAT_REGS:
|
||||||
|
- case VSX_REGS:
|
||||||
|
- if (GET_CODE (addr) == AND)
|
||||||
|
+ if (GET_CODE (addr) == AND
|
||||||
|
+ && (rclass != ALTIVEC_REGS || GET_MODE_SIZE (mode) != 16))
|
||||||
|
{
|
||||||
|
and_op2 = XEXP (addr, 1);
|
||||||
|
addr = XEXP (addr, 0);
|
||||||
|
}
|
||||||
|
- /* fall through */
|
||||||
|
|
||||||
|
- /* Move reg+offset addresses into a scratch register. */
|
||||||
|
- case ALTIVEC_REGS:
|
||||||
|
- if (!legitimate_indirect_address_p (addr, true)
|
||||||
|
- && !legitimate_indexed_address_p (addr, true)
|
||||||
|
- && (GET_CODE (addr) != PRE_MODIFY
|
||||||
|
- || !legitimate_indexed_address_p (XEXP (addr, 1), true))
|
||||||
|
- && (rclass != FLOAT_REGS
|
||||||
|
- || GET_MODE_SIZE (mode) != 8
|
||||||
|
+ /* If we aren't using a VSX load, save the PRE_MODIFY register and use it
|
||||||
|
+ as the address later. */
|
||||||
|
+ if (GET_CODE (addr) == PRE_MODIFY
|
||||||
|
+ && (!VECTOR_MEM_VSX_P (mode)
|
||||||
|
|| and_op2 != NULL_RTX
|
||||||
|
- || !rs6000_legitimate_offset_address_p (mode, addr, true)))
|
||||||
|
+ || !legitimate_indexed_address_p (XEXP (addr, 1), true)))
|
||||||
|
{
|
||||||
|
- if (GET_CODE (addr) == SYMBOL_REF || GET_CODE (addr) == CONST
|
||||||
|
- || GET_CODE (addr) == CONST_INT)
|
||||||
|
- rs6000_emit_move (scratch, addr, GET_MODE (addr));
|
||||||
|
- else
|
||||||
|
- emit_insn (gen_rtx_SET (VOIDmode, scratch, addr));
|
||||||
|
- addr = scratch;
|
||||||
|
+ scratch_or_premodify = XEXP (addr, 0);
|
||||||
|
+ gcc_assert (legitimate_indirect_address_p (scratch_or_premodify,
|
||||||
|
+ true));
|
||||||
|
+ gcc_assert (GET_CODE (XEXP (addr, 1)) == PLUS);
|
||||||
|
+ addr = XEXP (addr, 1);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ if (legitimate_indirect_address_p (addr, true) /* reg */
|
||||||
|
+ || legitimate_indexed_address_p (addr, true) /* reg+reg */
|
||||||
|
+ || GET_CODE (addr) == PRE_MODIFY /* VSX pre-modify */
|
||||||
|
+ || GET_CODE (addr) == AND /* Altivec memory */
|
||||||
|
+ || (rclass == FLOAT_REGS /* legacy float mem */
|
||||||
|
+ && GET_MODE_SIZE (mode) == 8
|
||||||
|
+ && and_op2 == NULL_RTX
|
||||||
|
+ && scratch_or_premodify == scratch
|
||||||
|
+ && rs6000_legitimate_offset_address_p (mode, addr, true)))
|
||||||
|
+ ;
|
||||||
|
+
|
||||||
|
+ else if (GET_CODE (addr) == PLUS)
|
||||||
|
+ {
|
||||||
|
+ addr_op1 = XEXP (addr, 0);
|
||||||
|
+ addr_op2 = XEXP (addr, 1);
|
||||||
|
+ gcc_assert (REG_P (addr_op1));
|
||||||
|
+
|
||||||
|
+ rs6000_emit_move (scratch, addr_op2, Pmode);
|
||||||
|
+ emit_insn (gen_rtx_SET (VOIDmode,
|
||||||
|
+ scratch_or_premodify,
|
||||||
|
+ gen_rtx_PLUS (Pmode,
|
||||||
|
+ addr_op1,
|
||||||
|
+ scratch)));
|
||||||
|
+ addr = scratch_or_premodify;
|
||||||
|
+ scratch_or_premodify = scratch;
|
||||||
|
}
|
||||||
|
+
|
||||||
|
+ else if (GET_CODE (addr) == SYMBOL_REF || GET_CODE (addr) == CONST
|
||||||
|
+ || GET_CODE (addr) == CONST_INT)
|
||||||
|
+ {
|
||||||
|
+ rs6000_emit_move (scratch_or_premodify, addr, Pmode);
|
||||||
|
+ addr = scratch_or_premodify;
|
||||||
|
+ scratch_or_premodify = scratch;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ else
|
||||||
|
+ gcc_unreachable ();
|
||||||
|
+
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
gcc_unreachable ();
|
||||||
|
}
|
||||||
|
|
||||||
|
- /* If the original address involved an AND -16 that is part of the Altivec
|
||||||
|
- addresses, recreate the and now. */
|
||||||
|
+ /* If the original address involved a pre-modify that we couldn't use the VSX
|
||||||
|
+ memory instruction with update, and we haven't taken care of already,
|
||||||
|
+ store the address in the pre-modify register and use that as the
|
||||||
|
+ address. */
|
||||||
|
+ if (scratch_or_premodify != scratch && scratch_or_premodify != addr)
|
||||||
|
+ {
|
||||||
|
+ emit_insn (gen_rtx_SET (VOIDmode, scratch_or_premodify, addr));
|
||||||
|
+ addr = scratch_or_premodify;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ /* If the original address involved an AND -16 and we couldn't use an ALTIVEC
|
||||||
|
+ memory instruction, recreate the AND now, including the clobber which is
|
||||||
|
+ generated by the general ANDSI3/ANDDI3 patterns for the
|
||||||
|
+ andi. instruction. */
|
||||||
|
if (and_op2 != NULL_RTX)
|
||||||
|
{
|
||||||
|
- rtx and_rtx = gen_rtx_SET (VOIDmode,
|
||||||
|
- scratch,
|
||||||
|
- gen_rtx_AND (Pmode, addr, and_op2));
|
||||||
|
- rtx cc_clobber = gen_rtx_CLOBBER (CCmode, gen_rtx_SCRATCH (CCmode));
|
||||||
|
+ if (! legitimate_indirect_address_p (addr, true))
|
||||||
|
+ {
|
||||||
|
+ emit_insn (gen_rtx_SET (VOIDmode, scratch, addr));
|
||||||
|
+ addr = scratch;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ and_rtx = gen_rtx_SET (VOIDmode,
|
||||||
|
+ scratch,
|
||||||
|
+ gen_rtx_AND (Pmode,
|
||||||
|
+ addr,
|
||||||
|
+ and_op2));
|
||||||
|
+
|
||||||
|
+ cc_clobber = gen_rtx_CLOBBER (CCmode, gen_rtx_SCRATCH (CCmode));
|
||||||
|
emit_insn (gen_rtx_PARALLEL (VOIDmode,
|
||||||
|
gen_rtvec (2, and_rtx, cc_clobber)));
|
||||||
|
addr = scratch;
|
File diff suppressed because it is too large
Load Diff
|
@ -3434,7 +3434,7 @@
|
||||||
+ "du2_power7,VSU_power7")
|
+ "du2_power7,VSU_power7")
|
||||||
--- gcc/config/rs6000/rs6000-c.c (.../trunk) (revision 145777)
|
--- gcc/config/rs6000/rs6000-c.c (.../trunk) (revision 145777)
|
||||||
+++ gcc/config/rs6000/rs6000-c.c (.../branches/ibm/power7-meissner) (revision 146027)
|
+++ gcc/config/rs6000/rs6000-c.c (.../branches/ibm/power7-meissner) (revision 146027)
|
||||||
@@ -105,11 +105,14 @@ altivec_categorize_keyword (const cpp_to
|
@@ -106,14 +106,17 @@ altivec_categorize_keyword (const cpp_to
|
||||||
if (ident == C_CPP_HASHNODE (vector_keyword))
|
if (ident == C_CPP_HASHNODE (vector_keyword))
|
||||||
return C_CPP_HASHNODE (__vector_keyword);
|
return C_CPP_HASHNODE (__vector_keyword);
|
||||||
|
|
||||||
|
@ -3449,11 +3449,16 @@
|
||||||
- return C_CPP_HASHNODE (__bool_keyword);
|
- return C_CPP_HASHNODE (__bool_keyword);
|
||||||
+ if (ident == C_CPP_HASHNODE (bool_keyword))
|
+ if (ident == C_CPP_HASHNODE (bool_keyword))
|
||||||
+ return C_CPP_HASHNODE (__bool_keyword);
|
+ return C_CPP_HASHNODE (__bool_keyword);
|
||||||
|
|
||||||
|
- if (ident == C_CPP_HASHNODE (_Bool_keyword))
|
||||||
|
- return C_CPP_HASHNODE (__bool_keyword);
|
||||||
|
+ if (ident == C_CPP_HASHNODE (_Bool_keyword))
|
||||||
|
+ return C_CPP_HASHNODE (__bool_keyword);
|
||||||
+ }
|
+ }
|
||||||
|
|
||||||
return ident;
|
return ident;
|
||||||
}
|
}
|
||||||
@@ -127,20 +130,23 @@ init_vector_keywords (void)
|
@@ -131,23 +134,26 @@ init_vector_keywords (void)
|
||||||
__vector_keyword = get_identifier ("__vector");
|
__vector_keyword = get_identifier ("__vector");
|
||||||
C_CPP_HASHNODE (__vector_keyword)->flags |= NODE_CONDITIONAL;
|
C_CPP_HASHNODE (__vector_keyword)->flags |= NODE_CONDITIONAL;
|
||||||
|
|
||||||
|
@ -3475,19 +3480,24 @@
|
||||||
+
|
+
|
||||||
+ __bool_keyword = get_identifier ("__bool");
|
+ __bool_keyword = get_identifier ("__bool");
|
||||||
+ C_CPP_HASHNODE (__bool_keyword)->flags |= NODE_CONDITIONAL;
|
+ C_CPP_HASHNODE (__bool_keyword)->flags |= NODE_CONDITIONAL;
|
||||||
+
|
|
||||||
+ pixel_keyword = get_identifier ("pixel");
|
|
||||||
+ C_CPP_HASHNODE (pixel_keyword)->flags |= NODE_CONDITIONAL;
|
|
||||||
|
|
||||||
- bool_keyword = get_identifier ("bool");
|
- bool_keyword = get_identifier ("bool");
|
||||||
- C_CPP_HASHNODE (bool_keyword)->flags |= NODE_CONDITIONAL;
|
- C_CPP_HASHNODE (bool_keyword)->flags |= NODE_CONDITIONAL;
|
||||||
|
+ pixel_keyword = get_identifier ("pixel");
|
||||||
|
+ C_CPP_HASHNODE (pixel_keyword)->flags |= NODE_CONDITIONAL;
|
||||||
|
|
||||||
|
- _Bool_keyword = get_identifier ("_Bool");
|
||||||
|
- C_CPP_HASHNODE (_Bool_keyword)->flags |= NODE_CONDITIONAL;
|
||||||
+ bool_keyword = get_identifier ("bool");
|
+ bool_keyword = get_identifier ("bool");
|
||||||
+ C_CPP_HASHNODE (bool_keyword)->flags |= NODE_CONDITIONAL;
|
+ C_CPP_HASHNODE (bool_keyword)->flags |= NODE_CONDITIONAL;
|
||||||
|
+
|
||||||
|
+ _Bool_keyword = get_identifier ("_Bool");
|
||||||
|
+ C_CPP_HASHNODE (_Bool_keyword)->flags |= NODE_CONDITIONAL;
|
||||||
+ }
|
+ }
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Called to decide whether a conditional macro should be expanded.
|
/* Called to decide whether a conditional macro should be expanded.
|
||||||
@@ -207,7 +213,8 @@ rs6000_macro_to_expand (cpp_reader *pfil
|
@@ -214,7 +220,8 @@ rs6000_macro_to_expand (cpp_reader *pfil
|
||||||
if (rid_code == RID_UNSIGNED || rid_code == RID_LONG
|
if (rid_code == RID_UNSIGNED || rid_code == RID_LONG
|
||||||
|| rid_code == RID_SHORT || rid_code == RID_SIGNED
|
|| rid_code == RID_SHORT || rid_code == RID_SIGNED
|
||||||
|| rid_code == RID_INT || rid_code == RID_CHAR
|
|| rid_code == RID_INT || rid_code == RID_CHAR
|
||||||
|
@ -3497,7 +3507,7 @@
|
||||||
{
|
{
|
||||||
expand_this = C_CPP_HASHNODE (__vector_keyword);
|
expand_this = C_CPP_HASHNODE (__vector_keyword);
|
||||||
/* If the next keyword is bool or pixel, it
|
/* If the next keyword is bool or pixel, it
|
||||||
@@ -277,13 +284,14 @@ rs6000_cpu_cpp_builtins (cpp_reader *pfi
|
@@ -284,13 +291,14 @@ rs6000_cpu_cpp_builtins (cpp_reader *pfi
|
||||||
builtin_define ("_ARCH_PWR6X");
|
builtin_define ("_ARCH_PWR6X");
|
||||||
if (! TARGET_POWER && ! TARGET_POWER2 && ! TARGET_POWERPC)
|
if (! TARGET_POWER && ! TARGET_POWER2 && ! TARGET_POWERPC)
|
||||||
builtin_define ("_ARCH_COM");
|
builtin_define ("_ARCH_COM");
|
||||||
|
@ -3513,13 +3523,16 @@
|
||||||
builtin_define ("__pixel=__attribute__((altivec(pixel__))) unsigned short");
|
builtin_define ("__pixel=__attribute__((altivec(pixel__))) unsigned short");
|
||||||
builtin_define ("__bool=__attribute__((altivec(bool__))) unsigned");
|
builtin_define ("__bool=__attribute__((altivec(bool__))) unsigned");
|
||||||
|
|
||||||
@@ -292,9 +300,18 @@ rs6000_cpu_cpp_builtins (cpp_reader *pfi
|
@@ -298,11 +306,20 @@ rs6000_cpu_cpp_builtins (cpp_reader *pfi
|
||||||
|
{
|
||||||
/* Define this when supporting context-sensitive keywords. */
|
/* Define this when supporting context-sensitive keywords. */
|
||||||
builtin_define ("__APPLE_ALTIVEC__");
|
builtin_define ("__APPLE_ALTIVEC__");
|
||||||
|
-
|
||||||
- builtin_define ("vector=vector");
|
- builtin_define ("vector=vector");
|
||||||
|
+
|
||||||
builtin_define ("pixel=pixel");
|
builtin_define ("pixel=pixel");
|
||||||
builtin_define ("bool=bool");
|
builtin_define ("bool=bool");
|
||||||
|
builtin_define ("_Bool=_Bool");
|
||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
+ if (TARGET_ALTIVEC || TARGET_VSX)
|
+ if (TARGET_ALTIVEC || TARGET_VSX)
|
||||||
|
@ -3533,7 +3546,7 @@
|
||||||
init_vector_keywords ();
|
init_vector_keywords ();
|
||||||
|
|
||||||
/* Enable context-sensitive macros. */
|
/* Enable context-sensitive macros. */
|
||||||
@@ -318,6 +335,8 @@ rs6000_cpu_cpp_builtins (cpp_reader *pfi
|
@@ -326,6 +343,8 @@ rs6000_cpu_cpp_builtins (cpp_reader *pfi
|
||||||
/* Used by libstdc++. */
|
/* Used by libstdc++. */
|
||||||
if (TARGET_NO_LWSYNC)
|
if (TARGET_NO_LWSYNC)
|
||||||
builtin_define ("__NO_LWSYNC__");
|
builtin_define ("__NO_LWSYNC__");
|
||||||
|
@ -3542,7 +3555,7 @@
|
||||||
|
|
||||||
/* May be overridden by target configuration. */
|
/* May be overridden by target configuration. */
|
||||||
RS6000_CPU_CPP_ENDIAN_BUILTINS();
|
RS6000_CPU_CPP_ENDIAN_BUILTINS();
|
||||||
@@ -496,6 +515,8 @@ const struct altivec_builtin_types altiv
|
@@ -504,6 +523,8 @@ const struct altivec_builtin_types altiv
|
||||||
RS6000_BTI_unsigned_V4SI, RS6000_BTI_unsigned_V4SI, RS6000_BTI_unsigned_V4SI, 0 },
|
RS6000_BTI_unsigned_V4SI, RS6000_BTI_unsigned_V4SI, RS6000_BTI_unsigned_V4SI, 0 },
|
||||||
{ ALTIVEC_BUILTIN_VEC_ADD, ALTIVEC_BUILTIN_VADDFP,
|
{ ALTIVEC_BUILTIN_VEC_ADD, ALTIVEC_BUILTIN_VADDFP,
|
||||||
RS6000_BTI_V4SF, RS6000_BTI_V4SF, RS6000_BTI_V4SF, 0 },
|
RS6000_BTI_V4SF, RS6000_BTI_V4SF, RS6000_BTI_V4SF, 0 },
|
||||||
|
@ -3551,7 +3564,7 @@
|
||||||
{ ALTIVEC_BUILTIN_VEC_VADDFP, ALTIVEC_BUILTIN_VADDFP,
|
{ ALTIVEC_BUILTIN_VEC_VADDFP, ALTIVEC_BUILTIN_VADDFP,
|
||||||
RS6000_BTI_V4SF, RS6000_BTI_V4SF, RS6000_BTI_V4SF, 0 },
|
RS6000_BTI_V4SF, RS6000_BTI_V4SF, RS6000_BTI_V4SF, 0 },
|
||||||
{ ALTIVEC_BUILTIN_VEC_VADDUWM, ALTIVEC_BUILTIN_VADDUWM,
|
{ ALTIVEC_BUILTIN_VEC_VADDUWM, ALTIVEC_BUILTIN_VADDUWM,
|
||||||
@@ -639,6 +660,12 @@ const struct altivec_builtin_types altiv
|
@@ -647,6 +668,12 @@ const struct altivec_builtin_types altiv
|
||||||
{ ALTIVEC_BUILTIN_VEC_AND, ALTIVEC_BUILTIN_VAND,
|
{ ALTIVEC_BUILTIN_VEC_AND, ALTIVEC_BUILTIN_VAND,
|
||||||
RS6000_BTI_V4SF, RS6000_BTI_bool_V4SI, RS6000_BTI_V4SF, 0 },
|
RS6000_BTI_V4SF, RS6000_BTI_bool_V4SI, RS6000_BTI_V4SF, 0 },
|
||||||
{ ALTIVEC_BUILTIN_VEC_AND, ALTIVEC_BUILTIN_VAND,
|
{ ALTIVEC_BUILTIN_VEC_AND, ALTIVEC_BUILTIN_VAND,
|
||||||
|
@ -3564,7 +3577,7 @@
|
||||||
RS6000_BTI_bool_V4SI, RS6000_BTI_bool_V4SI, RS6000_BTI_bool_V4SI, 0 },
|
RS6000_BTI_bool_V4SI, RS6000_BTI_bool_V4SI, RS6000_BTI_bool_V4SI, 0 },
|
||||||
{ ALTIVEC_BUILTIN_VEC_AND, ALTIVEC_BUILTIN_VAND,
|
{ ALTIVEC_BUILTIN_VEC_AND, ALTIVEC_BUILTIN_VAND,
|
||||||
RS6000_BTI_V4SI, RS6000_BTI_bool_V4SI, RS6000_BTI_V4SI, 0 },
|
RS6000_BTI_V4SI, RS6000_BTI_bool_V4SI, RS6000_BTI_V4SI, 0 },
|
||||||
@@ -687,6 +714,12 @@ const struct altivec_builtin_types altiv
|
@@ -695,6 +722,12 @@ const struct altivec_builtin_types altiv
|
||||||
{ ALTIVEC_BUILTIN_VEC_ANDC, ALTIVEC_BUILTIN_VANDC,
|
{ ALTIVEC_BUILTIN_VEC_ANDC, ALTIVEC_BUILTIN_VANDC,
|
||||||
RS6000_BTI_V4SF, RS6000_BTI_bool_V4SI, RS6000_BTI_V4SF, 0 },
|
RS6000_BTI_V4SF, RS6000_BTI_bool_V4SI, RS6000_BTI_V4SF, 0 },
|
||||||
{ ALTIVEC_BUILTIN_VEC_ANDC, ALTIVEC_BUILTIN_VANDC,
|
{ ALTIVEC_BUILTIN_VEC_ANDC, ALTIVEC_BUILTIN_VANDC,
|
||||||
|
@ -3577,7 +3590,7 @@
|
||||||
RS6000_BTI_bool_V4SI, RS6000_BTI_bool_V4SI, RS6000_BTI_bool_V4SI, 0 },
|
RS6000_BTI_bool_V4SI, RS6000_BTI_bool_V4SI, RS6000_BTI_bool_V4SI, 0 },
|
||||||
{ ALTIVEC_BUILTIN_VEC_ANDC, ALTIVEC_BUILTIN_VANDC,
|
{ ALTIVEC_BUILTIN_VEC_ANDC, ALTIVEC_BUILTIN_VANDC,
|
||||||
RS6000_BTI_V4SI, RS6000_BTI_bool_V4SI, RS6000_BTI_V4SI, 0 },
|
RS6000_BTI_V4SI, RS6000_BTI_bool_V4SI, RS6000_BTI_V4SI, 0 },
|
||||||
@@ -1190,6 +1223,8 @@ const struct altivec_builtin_types altiv
|
@@ -1198,6 +1231,8 @@ const struct altivec_builtin_types altiv
|
||||||
RS6000_BTI_V4SI, RS6000_BTI_V4SI, RS6000_BTI_V4SI, 0 },
|
RS6000_BTI_V4SI, RS6000_BTI_V4SI, RS6000_BTI_V4SI, 0 },
|
||||||
{ ALTIVEC_BUILTIN_VEC_MAX, ALTIVEC_BUILTIN_VMAXFP,
|
{ ALTIVEC_BUILTIN_VEC_MAX, ALTIVEC_BUILTIN_VMAXFP,
|
||||||
RS6000_BTI_V4SF, RS6000_BTI_V4SF, RS6000_BTI_V4SF, 0 },
|
RS6000_BTI_V4SF, RS6000_BTI_V4SF, RS6000_BTI_V4SF, 0 },
|
||||||
|
@ -3586,7 +3599,7 @@
|
||||||
{ ALTIVEC_BUILTIN_VEC_VMAXFP, ALTIVEC_BUILTIN_VMAXFP,
|
{ ALTIVEC_BUILTIN_VEC_VMAXFP, ALTIVEC_BUILTIN_VMAXFP,
|
||||||
RS6000_BTI_V4SF, RS6000_BTI_V4SF, RS6000_BTI_V4SF, 0 },
|
RS6000_BTI_V4SF, RS6000_BTI_V4SF, RS6000_BTI_V4SF, 0 },
|
||||||
{ ALTIVEC_BUILTIN_VEC_VMAXSW, ALTIVEC_BUILTIN_VMAXSW,
|
{ ALTIVEC_BUILTIN_VEC_VMAXSW, ALTIVEC_BUILTIN_VMAXSW,
|
||||||
@@ -1366,6 +1401,8 @@ const struct altivec_builtin_types altiv
|
@@ -1374,6 +1409,8 @@ const struct altivec_builtin_types altiv
|
||||||
RS6000_BTI_V4SI, RS6000_BTI_V4SI, RS6000_BTI_V4SI, 0 },
|
RS6000_BTI_V4SI, RS6000_BTI_V4SI, RS6000_BTI_V4SI, 0 },
|
||||||
{ ALTIVEC_BUILTIN_VEC_MIN, ALTIVEC_BUILTIN_VMINFP,
|
{ ALTIVEC_BUILTIN_VEC_MIN, ALTIVEC_BUILTIN_VMINFP,
|
||||||
RS6000_BTI_V4SF, RS6000_BTI_V4SF, RS6000_BTI_V4SF, 0 },
|
RS6000_BTI_V4SF, RS6000_BTI_V4SF, RS6000_BTI_V4SF, 0 },
|
||||||
|
@ -3595,7 +3608,7 @@
|
||||||
{ ALTIVEC_BUILTIN_VEC_VMINFP, ALTIVEC_BUILTIN_VMINFP,
|
{ ALTIVEC_BUILTIN_VEC_VMINFP, ALTIVEC_BUILTIN_VMINFP,
|
||||||
RS6000_BTI_V4SF, RS6000_BTI_V4SF, RS6000_BTI_V4SF, 0 },
|
RS6000_BTI_V4SF, RS6000_BTI_V4SF, RS6000_BTI_V4SF, 0 },
|
||||||
{ ALTIVEC_BUILTIN_VEC_VMINSW, ALTIVEC_BUILTIN_VMINSW,
|
{ ALTIVEC_BUILTIN_VEC_VMINSW, ALTIVEC_BUILTIN_VMINSW,
|
||||||
@@ -1451,6 +1488,8 @@ const struct altivec_builtin_types altiv
|
@@ -1459,6 +1496,8 @@ const struct altivec_builtin_types altiv
|
||||||
{ ALTIVEC_BUILTIN_VEC_NOR, ALTIVEC_BUILTIN_VNOR,
|
{ ALTIVEC_BUILTIN_VEC_NOR, ALTIVEC_BUILTIN_VNOR,
|
||||||
RS6000_BTI_V4SF, RS6000_BTI_V4SF, RS6000_BTI_V4SF, 0 },
|
RS6000_BTI_V4SF, RS6000_BTI_V4SF, RS6000_BTI_V4SF, 0 },
|
||||||
{ ALTIVEC_BUILTIN_VEC_NOR, ALTIVEC_BUILTIN_VNOR,
|
{ ALTIVEC_BUILTIN_VEC_NOR, ALTIVEC_BUILTIN_VNOR,
|
||||||
|
@ -3604,7 +3617,7 @@
|
||||||
RS6000_BTI_V4SI, RS6000_BTI_V4SI, RS6000_BTI_V4SI, 0 },
|
RS6000_BTI_V4SI, RS6000_BTI_V4SI, RS6000_BTI_V4SI, 0 },
|
||||||
{ ALTIVEC_BUILTIN_VEC_NOR, ALTIVEC_BUILTIN_VNOR,
|
{ ALTIVEC_BUILTIN_VEC_NOR, ALTIVEC_BUILTIN_VNOR,
|
||||||
RS6000_BTI_unsigned_V4SI, RS6000_BTI_unsigned_V4SI, RS6000_BTI_unsigned_V4SI, 0 },
|
RS6000_BTI_unsigned_V4SI, RS6000_BTI_unsigned_V4SI, RS6000_BTI_unsigned_V4SI, 0 },
|
||||||
@@ -1475,6 +1514,12 @@ const struct altivec_builtin_types altiv
|
@@ -1483,6 +1522,12 @@ const struct altivec_builtin_types altiv
|
||||||
{ ALTIVEC_BUILTIN_VEC_OR, ALTIVEC_BUILTIN_VOR,
|
{ ALTIVEC_BUILTIN_VEC_OR, ALTIVEC_BUILTIN_VOR,
|
||||||
RS6000_BTI_V4SF, RS6000_BTI_bool_V4SI, RS6000_BTI_V4SF, 0 },
|
RS6000_BTI_V4SF, RS6000_BTI_bool_V4SI, RS6000_BTI_V4SF, 0 },
|
||||||
{ ALTIVEC_BUILTIN_VEC_OR, ALTIVEC_BUILTIN_VOR,
|
{ ALTIVEC_BUILTIN_VEC_OR, ALTIVEC_BUILTIN_VOR,
|
||||||
|
@ -3617,7 +3630,7 @@
|
||||||
RS6000_BTI_bool_V4SI, RS6000_BTI_bool_V4SI, RS6000_BTI_bool_V4SI, 0 },
|
RS6000_BTI_bool_V4SI, RS6000_BTI_bool_V4SI, RS6000_BTI_bool_V4SI, 0 },
|
||||||
{ ALTIVEC_BUILTIN_VEC_OR, ALTIVEC_BUILTIN_VOR,
|
{ ALTIVEC_BUILTIN_VEC_OR, ALTIVEC_BUILTIN_VOR,
|
||||||
RS6000_BTI_V4SI, RS6000_BTI_bool_V4SI, RS6000_BTI_V4SI, 0 },
|
RS6000_BTI_V4SI, RS6000_BTI_bool_V4SI, RS6000_BTI_V4SI, 0 },
|
||||||
@@ -1932,6 +1977,8 @@ const struct altivec_builtin_types altiv
|
@@ -1940,6 +1985,8 @@ const struct altivec_builtin_types altiv
|
||||||
RS6000_BTI_unsigned_V4SI, RS6000_BTI_unsigned_V4SI, RS6000_BTI_unsigned_V4SI, 0 },
|
RS6000_BTI_unsigned_V4SI, RS6000_BTI_unsigned_V4SI, RS6000_BTI_unsigned_V4SI, 0 },
|
||||||
{ ALTIVEC_BUILTIN_VEC_SUB, ALTIVEC_BUILTIN_VSUBFP,
|
{ ALTIVEC_BUILTIN_VEC_SUB, ALTIVEC_BUILTIN_VSUBFP,
|
||||||
RS6000_BTI_V4SF, RS6000_BTI_V4SF, RS6000_BTI_V4SF, 0 },
|
RS6000_BTI_V4SF, RS6000_BTI_V4SF, RS6000_BTI_V4SF, 0 },
|
||||||
|
@ -3626,7 +3639,7 @@
|
||||||
{ ALTIVEC_BUILTIN_VEC_VSUBFP, ALTIVEC_BUILTIN_VSUBFP,
|
{ ALTIVEC_BUILTIN_VEC_VSUBFP, ALTIVEC_BUILTIN_VSUBFP,
|
||||||
RS6000_BTI_V4SF, RS6000_BTI_V4SF, RS6000_BTI_V4SF, 0 },
|
RS6000_BTI_V4SF, RS6000_BTI_V4SF, RS6000_BTI_V4SF, 0 },
|
||||||
{ ALTIVEC_BUILTIN_VEC_VSUBUWM, ALTIVEC_BUILTIN_VSUBUWM,
|
{ ALTIVEC_BUILTIN_VEC_VSUBUWM, ALTIVEC_BUILTIN_VSUBUWM,
|
||||||
@@ -2091,6 +2138,12 @@ const struct altivec_builtin_types altiv
|
@@ -2099,6 +2146,12 @@ const struct altivec_builtin_types altiv
|
||||||
{ ALTIVEC_BUILTIN_VEC_XOR, ALTIVEC_BUILTIN_VXOR,
|
{ ALTIVEC_BUILTIN_VEC_XOR, ALTIVEC_BUILTIN_VXOR,
|
||||||
RS6000_BTI_V4SF, RS6000_BTI_bool_V4SI, RS6000_BTI_V4SF, 0 },
|
RS6000_BTI_V4SF, RS6000_BTI_bool_V4SI, RS6000_BTI_V4SF, 0 },
|
||||||
{ ALTIVEC_BUILTIN_VEC_XOR, ALTIVEC_BUILTIN_VXOR,
|
{ ALTIVEC_BUILTIN_VEC_XOR, ALTIVEC_BUILTIN_VXOR,
|
||||||
|
@ -3639,7 +3652,7 @@
|
||||||
RS6000_BTI_bool_V4SI, RS6000_BTI_bool_V4SI, RS6000_BTI_bool_V4SI, 0 },
|
RS6000_BTI_bool_V4SI, RS6000_BTI_bool_V4SI, RS6000_BTI_bool_V4SI, 0 },
|
||||||
{ ALTIVEC_BUILTIN_VEC_XOR, ALTIVEC_BUILTIN_VXOR,
|
{ ALTIVEC_BUILTIN_VEC_XOR, ALTIVEC_BUILTIN_VXOR,
|
||||||
RS6000_BTI_V4SI, RS6000_BTI_bool_V4SI, RS6000_BTI_V4SI, 0 },
|
RS6000_BTI_V4SI, RS6000_BTI_bool_V4SI, RS6000_BTI_V4SI, 0 },
|
||||||
@@ -2981,8 +3034,10 @@ altivec_resolve_overloaded_builtin (tree
|
@@ -2989,8 +3042,10 @@ altivec_resolve_overloaded_builtin (tree
|
||||||
const struct altivec_builtin_types *desc;
|
const struct altivec_builtin_types *desc;
|
||||||
int n;
|
int n;
|
||||||
|
|
||||||
|
|
|
@ -1,293 +0,0 @@
|
||||||
2009-04-10 Jakub Jelinek <jakub@redhat.com>
|
|
||||||
|
|
||||||
PR rtl-optimization/39543
|
|
||||||
* fwprop.c (forward_propagate_asm): New function.
|
|
||||||
(forward_propagate_and_simplify): Propagate also into __asm, if it
|
|
||||||
doesn't increase the number of referenced registers.
|
|
||||||
|
|
||||||
* gcc.target/i386/pr39543-1.c: New test.
|
|
||||||
* gcc.target/i386/pr39543-2.c: New test.
|
|
||||||
* gcc.target/i386/pr39543-3.c: New test.
|
|
||||||
|
|
||||||
--- gcc/fwprop.c.jj 2009-03-30 12:45:45.000000000 +0200
|
|
||||||
+++ gcc/fwprop.c 2009-04-10 16:19:36.000000000 +0200
|
|
||||||
@@ -1,5 +1,5 @@
|
|
||||||
/* RTL-based forward propagation pass for GNU compiler.
|
|
||||||
- Copyright (C) 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
|
|
||||||
+ Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
|
|
||||||
Contributed by Paolo Bonzini and Steven Bosscher.
|
|
||||||
|
|
||||||
This file is part of GCC.
|
|
||||||
@@ -852,6 +852,80 @@ forward_propagate_subreg (df_ref use, rt
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
+/* Try to replace USE with SRC (defined in DEF_INSN) in __asm. */
|
|
||||||
+
|
|
||||||
+static bool
|
|
||||||
+forward_propagate_asm (df_ref use, rtx def_insn, rtx def_set, rtx reg)
|
|
||||||
+{
|
|
||||||
+ rtx use_insn = DF_REF_INSN (use), src, use_pat, asm_operands, new_rtx, *loc;
|
|
||||||
+ int speed_p, i;
|
|
||||||
+ df_ref *use_vec;
|
|
||||||
+
|
|
||||||
+ gcc_assert ((DF_REF_FLAGS (use) & DF_REF_IN_NOTE) == 0);
|
|
||||||
+
|
|
||||||
+ src = SET_SRC (def_set);
|
|
||||||
+ use_pat = PATTERN (use_insn);
|
|
||||||
+
|
|
||||||
+ /* In __asm don't replace if src might need more registers than
|
|
||||||
+ reg, as that could increase register pressure on the __asm. */
|
|
||||||
+ use_vec = DF_INSN_USES (def_insn);
|
|
||||||
+ if (use_vec[0] && use_vec[1])
|
|
||||||
+ return false;
|
|
||||||
+
|
|
||||||
+ speed_p = optimize_bb_for_speed_p (BLOCK_FOR_INSN (use_insn));
|
|
||||||
+ asm_operands = NULL_RTX;
|
|
||||||
+ switch (GET_CODE (use_pat))
|
|
||||||
+ {
|
|
||||||
+ case ASM_OPERANDS:
|
|
||||||
+ asm_operands = use_pat;
|
|
||||||
+ break;
|
|
||||||
+ case SET:
|
|
||||||
+ if (MEM_P (SET_DEST (use_pat)))
|
|
||||||
+ {
|
|
||||||
+ loc = &SET_DEST (use_pat);
|
|
||||||
+ new_rtx = propagate_rtx (*loc, GET_MODE (*loc), reg, src, speed_p);
|
|
||||||
+ if (new_rtx)
|
|
||||||
+ validate_unshare_change (use_insn, loc, new_rtx, true);
|
|
||||||
+ }
|
|
||||||
+ asm_operands = SET_SRC (use_pat);
|
|
||||||
+ break;
|
|
||||||
+ case PARALLEL:
|
|
||||||
+ for (i = 0; i < XVECLEN (use_pat, 0); i++)
|
|
||||||
+ if (GET_CODE (XVECEXP (use_pat, 0, i)) == SET)
|
|
||||||
+ {
|
|
||||||
+ if (MEM_P (SET_DEST (XVECEXP (use_pat, 0, i))))
|
|
||||||
+ {
|
|
||||||
+ loc = &SET_DEST (XVECEXP (use_pat, 0, i));
|
|
||||||
+ new_rtx = propagate_rtx (*loc, GET_MODE (*loc), reg,
|
|
||||||
+ src, speed_p);
|
|
||||||
+ if (new_rtx)
|
|
||||||
+ validate_unshare_change (use_insn, loc, new_rtx, true);
|
|
||||||
+ }
|
|
||||||
+ asm_operands = SET_SRC (XVECEXP (use_pat, 0, i));
|
|
||||||
+ }
|
|
||||||
+ else if (GET_CODE (XVECEXP (use_pat, 0, i)) == ASM_OPERANDS)
|
|
||||||
+ asm_operands = XVECEXP (use_pat, 0, i);
|
|
||||||
+ break;
|
|
||||||
+ default:
|
|
||||||
+ gcc_unreachable ();
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ gcc_assert (asm_operands && GET_CODE (asm_operands) == ASM_OPERANDS);
|
|
||||||
+ for (i = 0; i < ASM_OPERANDS_INPUT_LENGTH (asm_operands); i++)
|
|
||||||
+ {
|
|
||||||
+ loc = &ASM_OPERANDS_INPUT (asm_operands, i);
|
|
||||||
+ new_rtx = propagate_rtx (*loc, GET_MODE (*loc), reg, src, speed_p);
|
|
||||||
+ if (new_rtx)
|
|
||||||
+ validate_unshare_change (use_insn, loc, new_rtx, true);
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ if (num_changes_pending () == 0 || !apply_change_group ())
|
|
||||||
+ return false;
|
|
||||||
+
|
|
||||||
+ num_changes++;
|
|
||||||
+ return true;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
/* Try to replace USE with SRC (defined in DEF_INSN) and simplify the
|
|
||||||
result. */
|
|
||||||
|
|
||||||
@@ -863,12 +937,16 @@ forward_propagate_and_simplify (df_ref u
|
|
||||||
rtx src, reg, new_rtx, *loc;
|
|
||||||
bool set_reg_equal;
|
|
||||||
enum machine_mode mode;
|
|
||||||
+ int asm_use = -1;
|
|
||||||
+
|
|
||||||
+ if (INSN_CODE (use_insn) < 0)
|
|
||||||
+ asm_use = asm_noperands (PATTERN (use_insn));
|
|
||||||
|
|
||||||
- if (!use_set)
|
|
||||||
+ if (!use_set && asm_use < 0)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
/* Do not propagate into PC, CC0, etc. */
|
|
||||||
- if (GET_MODE (SET_DEST (use_set)) == VOIDmode)
|
|
||||||
+ if (use_set && GET_MODE (SET_DEST (use_set)) == VOIDmode)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
/* If def and use are subreg, check if they match. */
|
|
||||||
@@ -900,7 +978,7 @@ forward_propagate_and_simplify (df_ref u
|
|
||||||
if (MEM_P (src) && MEM_READONLY_P (src))
|
|
||||||
{
|
|
||||||
rtx x = avoid_constant_pool_reference (src);
|
|
||||||
- if (x != src)
|
|
||||||
+ if (x != src && use_set)
|
|
||||||
{
|
|
||||||
rtx note = find_reg_note (use_insn, REG_EQUAL, NULL_RTX);
|
|
||||||
rtx old_rtx = note ? XEXP (note, 0) : SET_SRC (use_set);
|
|
||||||
@@ -911,6 +989,9 @@ forward_propagate_and_simplify (df_ref u
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
+ if (asm_use >= 0)
|
|
||||||
+ return forward_propagate_asm (use, def_insn, def_set, reg);
|
|
||||||
+
|
|
||||||
/* Else try simplifying. */
|
|
||||||
|
|
||||||
if (DF_REF_TYPE (use) == DF_REF_REG_MEM_STORE)
|
|
||||||
--- gcc/testsuite/gcc.target/i386/pr39543-1.c.jj 2009-04-09 09:47:16.000000000 +0200
|
|
||||||
+++ gcc/testsuite/gcc.target/i386/pr39543-1.c 2009-04-09 09:47:16.000000000 +0200
|
|
||||||
@@ -0,0 +1,52 @@
|
|
||||||
+/* PR rtl-optimization/39543 */
|
|
||||||
+/* { dg-do compile } */
|
|
||||||
+/* { dg-options "-O3 -fomit-frame-pointer" } */
|
|
||||||
+
|
|
||||||
+float __attribute__ ((aligned (16))) s0[128];
|
|
||||||
+const float s1 = 0.707;
|
|
||||||
+float s2[8] __attribute__ ((aligned (16)));
|
|
||||||
+float s3[8] __attribute__ ((aligned (16)));
|
|
||||||
+float s4[16] __attribute__ ((aligned (16)));
|
|
||||||
+float s5[16] __attribute__ ((aligned (16)));
|
|
||||||
+
|
|
||||||
+void
|
|
||||||
+foo (int k, float *x, float *y, const float *d, const float *z)
|
|
||||||
+{
|
|
||||||
+ float *a, *b, *c, *e;
|
|
||||||
+
|
|
||||||
+ a = x + 2 * k;
|
|
||||||
+ b = a + 2 * k;
|
|
||||||
+ c = b + 2 * k;
|
|
||||||
+ e = y + 2 * k;
|
|
||||||
+ __asm__ volatile (""
|
|
||||||
+ : "=m" (x[0]), "=m" (b[0]), "=m" (a[0]), "=m" (c[0])
|
|
||||||
+ : "m" (y[0]), "m" (y[k * 2]), "m" (x[0]), "m" (a[0])
|
|
||||||
+ : "memory");
|
|
||||||
+ for (;;)
|
|
||||||
+ {
|
|
||||||
+ __asm__ volatile (""
|
|
||||||
+ :
|
|
||||||
+ : "m" (y[2]), "m" (d[2]), "m" (e[2]), "m" (z[2])
|
|
||||||
+ : "memory");
|
|
||||||
+ if (!--k)
|
|
||||||
+ break;
|
|
||||||
+ }
|
|
||||||
+ __asm__ volatile (""
|
|
||||||
+ : "=m" (x[2]), "=m" (x[10]), "=m" (x[6]), "=m" (x[14])
|
|
||||||
+ : "m" (y[2]), "m" (y[6]), "m" (x[2]), "m" (x[6]),
|
|
||||||
+ "m" (y[18]), "m" (s1)
|
|
||||||
+ : "memory");
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+void
|
|
||||||
+bar (float *a)
|
|
||||||
+{
|
|
||||||
+ foo (4, a, a + 16, s2, s3);
|
|
||||||
+ foo (8, a, a + 32, s4, s5);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+void
|
|
||||||
+baz (void)
|
|
||||||
+{
|
|
||||||
+ bar (s0);
|
|
||||||
+}
|
|
||||||
--- gcc/testsuite/gcc.target/i386/pr39543-2.c.jj 2009-04-09 09:47:16.000000000 +0200
|
|
||||||
+++ gcc/testsuite/gcc.target/i386/pr39543-2.c 2009-04-09 09:47:16.000000000 +0200
|
|
||||||
@@ -0,0 +1,51 @@
|
|
||||||
+/* PR rtl-optimization/39543 */
|
|
||||||
+/* { dg-do compile } */
|
|
||||||
+/* { dg-options "-O3" } */
|
|
||||||
+
|
|
||||||
+float __attribute__ ((aligned (16))) s0[128];
|
|
||||||
+const float s1 = 0.707;
|
|
||||||
+float s2[8] __attribute__ ((aligned (16)));
|
|
||||||
+float s3[8] __attribute__ ((aligned (16)));
|
|
||||||
+float s4[16] __attribute__ ((aligned (16)));
|
|
||||||
+float s5[16] __attribute__ ((aligned (16)));
|
|
||||||
+
|
|
||||||
+void
|
|
||||||
+foo (int k, float *x, float *y, const float *d, const float *z)
|
|
||||||
+{
|
|
||||||
+ float *a, *b, *c, *e;
|
|
||||||
+
|
|
||||||
+ a = x + 2 * k;
|
|
||||||
+ b = a + 2 * k;
|
|
||||||
+ c = b + 2 * k;
|
|
||||||
+ e = y + 2 * k;
|
|
||||||
+ __asm__ volatile (""
|
|
||||||
+ : "=m" (x[0]), "=m" (b[0]), "=m" (a[0]), "=m" (c[0])
|
|
||||||
+ : "m" (y[0]), "m" (y[k * 2]), "m" (x[0]), "m" (a[0])
|
|
||||||
+ : "memory");
|
|
||||||
+ for (;;)
|
|
||||||
+ {
|
|
||||||
+ __asm__ volatile (""
|
|
||||||
+ :
|
|
||||||
+ : "m" (y[2]), "m" (d[2]), "m" (e[2]), "m" (z[2])
|
|
||||||
+ : "memory");
|
|
||||||
+ if (!--k)
|
|
||||||
+ break;
|
|
||||||
+ }
|
|
||||||
+ __asm__ volatile (""
|
|
||||||
+ : "=m" (x[2]), "=m" (x[10]), "=m" (x[6]), "=m" (x[14])
|
|
||||||
+ : "m" (y[2]), "m" (y[6]), "m" (x[2]), "m" (x[6]), "m" (s1)
|
|
||||||
+ : "memory");
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+void
|
|
||||||
+bar (float *a)
|
|
||||||
+{
|
|
||||||
+ foo (4, a, a + 16, s2, s3);
|
|
||||||
+ foo (8, a, a + 32, s4, s5);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+void
|
|
||||||
+baz (void)
|
|
||||||
+{
|
|
||||||
+ bar (s0);
|
|
||||||
+}
|
|
||||||
--- gcc/testsuite/gcc.target/i386/pr39543-3.c.jj 2009-04-09 09:47:16.000000000 +0200
|
|
||||||
+++ gcc/testsuite/gcc.target/i386/pr39543-3.c 2009-04-09 09:47:16.000000000 +0200
|
|
||||||
@@ -0,0 +1,42 @@
|
|
||||||
+/* PR rtl-optimization/39543 */
|
|
||||||
+/* { dg-do compile } */
|
|
||||||
+/* { dg-options "-O2" } */
|
|
||||||
+
|
|
||||||
+int s[128];
|
|
||||||
+
|
|
||||||
+void
|
|
||||||
+f1 (void)
|
|
||||||
+{
|
|
||||||
+ int i;
|
|
||||||
+ asm volatile ("# %0 %1 %2 %3 %4 %5 %6 %7 %8 %9 %10 %11 %12 %13 %14 %15 %16 %17"
|
|
||||||
+ : "=r" (i)
|
|
||||||
+ : "m" (s[0]), "m" (s[2]), "m" (s[4]), "m" (s[6]), "m" (s[8]),
|
|
||||||
+ "m" (s[10]), "m" (s[12]), "m" (s[14]), "m" (s[16]), "m" (s[18]),
|
|
||||||
+ "m" (s[20]), "m" (s[22]), "m" (s[24]), "m" (s[26]), "m" (s[28]),
|
|
||||||
+ "m" (s[30]), "m" (s[32]));
|
|
||||||
+ asm volatile ("# %0 %1 %2 %3 %4 %5 %6 %7 %8 %9 %10 %11 %12 %13 %14 %15 %16 %17"
|
|
||||||
+ : "=r" (i)
|
|
||||||
+ : "m" (s[0]), "m" (s[2]), "m" (s[4]), "m" (s[6]), "m" (s[8]),
|
|
||||||
+ "m" (s[10]), "m" (s[12]), "m" (s[14]), "m" (s[16]), "m" (s[18]),
|
|
||||||
+ "m" (s[20]), "m" (s[22]), "m" (s[24]), "m" (s[26]), "m" (s[28]),
|
|
||||||
+ "m" (s[30]), "m" (s[32]));
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+void
|
|
||||||
+f2 (int *q)
|
|
||||||
+{
|
|
||||||
+ int i;
|
|
||||||
+ int *p = q + 32;
|
|
||||||
+ asm volatile ("# %0 %1 %2 %3 %4 %5 %6 %7 %8 %9 %10 %11 %12 %13 %14 %15 %16 %17"
|
|
||||||
+ : "=r" (i)
|
|
||||||
+ : "m" (p[0]), "m" (p[2]), "m" (p[4]), "m" (p[6]), "m" (p[8]),
|
|
||||||
+ "m" (p[10]), "m" (p[12]), "m" (p[14]), "m" (p[16]), "m" (p[18]),
|
|
||||||
+ "m" (p[20]), "m" (p[22]), "m" (p[24]), "m" (p[26]), "m" (p[28]),
|
|
||||||
+ "m" (p[30]), "m" (p[32]));
|
|
||||||
+ asm volatile ("# %0 %1 %2 %3 %4 %5 %6 %7 %8 %9 %10 %11 %12 %13 %14 %15 %16 %17"
|
|
||||||
+ : "=r" (i)
|
|
||||||
+ : "m" (p[0]), "m" (p[2]), "m" (p[4]), "m" (p[6]), "m" (p[8]),
|
|
||||||
+ "m" (p[10]), "m" (p[12]), "m" (p[14]), "m" (p[16]), "m" (p[18]),
|
|
||||||
+ "m" (p[20]), "m" (p[22]), "m" (p[24]), "m" (p[26]), "m" (p[28]),
|
|
||||||
+ "m" (p[30]), "m" (p[32]));
|
|
||||||
+}
|
|
|
@ -1,68 +0,0 @@
|
||||||
2009-04-14 Jason Merrill <jason@redhat.com>
|
|
||||||
|
|
||||||
PR c++/39763
|
|
||||||
* name-lookup.c (pushdecl_maybe_friend): Avoid all warnings
|
|
||||||
about shadowing by tentative parms.
|
|
||||||
|
|
||||||
* g++.dg/warn/Wshadow-4.C: Extend.
|
|
||||||
|
|
||||||
--- gcc/cp/name-lookup.c (revision 146053)
|
|
||||||
+++ gcc/cp/name-lookup.c (revision 146054)
|
|
||||||
@@ -1002,13 +1002,18 @@ pushdecl_maybe_friend (tree x, bool is_f
|
|
||||||
&& TREE_PUBLIC (x))
|
|
||||||
TREE_PUBLIC (name) = 1;
|
|
||||||
|
|
||||||
+ /* Don't complain about the parms we push and then pop
|
|
||||||
+ while tentatively parsing a function declarator. */
|
|
||||||
+ if (TREE_CODE (x) == PARM_DECL && DECL_CONTEXT (x) == NULL_TREE)
|
|
||||||
+ /* Ignore. */;
|
|
||||||
+
|
|
||||||
/* Warn if shadowing an argument at the top level of the body. */
|
|
||||||
- if (oldlocal != NULL_TREE && !DECL_EXTERNAL (x)
|
|
||||||
- /* Inline decls shadow nothing. */
|
|
||||||
- && !DECL_FROM_INLINE (x)
|
|
||||||
- && TREE_CODE (oldlocal) == PARM_DECL
|
|
||||||
- /* Don't check the `this' parameter. */
|
|
||||||
- && !DECL_ARTIFICIAL (oldlocal))
|
|
||||||
+ else if (oldlocal != NULL_TREE && !DECL_EXTERNAL (x)
|
|
||||||
+ /* Inline decls shadow nothing. */
|
|
||||||
+ && !DECL_FROM_INLINE (x)
|
|
||||||
+ && TREE_CODE (oldlocal) == PARM_DECL
|
|
||||||
+ /* Don't check the `this' parameter. */
|
|
||||||
+ && !DECL_ARTIFICIAL (oldlocal))
|
|
||||||
{
|
|
||||||
bool err = false;
|
|
||||||
|
|
||||||
@@ -1032,10 +1037,7 @@ pushdecl_maybe_friend (tree x, bool is_f
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
- if (warn_shadow && !err
|
|
||||||
- /* Don't complain about the parms we push and then pop
|
|
||||||
- while tentatively parsing a function declarator. */
|
|
||||||
- && !(TREE_CODE (x) == PARM_DECL && DECL_CONTEXT (x) == NULL_TREE))
|
|
||||||
+ if (warn_shadow && !err)
|
|
||||||
{
|
|
||||||
warning (OPT_Wshadow, "declaration of %q#D shadows a parameter", x);
|
|
||||||
warning (OPT_Wshadow, "%Jshadowed declaration is here", oldlocal);
|
|
||||||
--- gcc/testsuite/g++.dg/warn/Wshadow-4.C (revision 146053)
|
|
||||||
+++ gcc/testsuite/g++.dg/warn/Wshadow-4.C (revision 146054)
|
|
||||||
@@ -18,3 +18,15 @@ int foo(int infoo) // { dg-warning "sha
|
|
||||||
};
|
|
||||||
return outfoo;
|
|
||||||
}
|
|
||||||
+
|
|
||||||
+// PR c++/39763
|
|
||||||
+int foo2(void)
|
|
||||||
+{
|
|
||||||
+ int infoo = 0; // { dg-warning "shadowed declaration" }
|
|
||||||
+ int outfoo( INetURLObject( infoo ).GetMainURL()); // { dg-bogus "shadows" }
|
|
||||||
+ struct A
|
|
||||||
+ {
|
|
||||||
+ void f(int infoo) { } // { dg-warning "shadows a previous local" }
|
|
||||||
+ };
|
|
||||||
+ return outfoo;
|
|
||||||
+}
|
|
||||||
2009-04-13 Jason Merrill <jason@redhat.com>
|
|
||||||
|
|
||||||
PR c++/39480
|
|
|
@ -0,0 +1,43 @@
|
||||||
|
2009-04-24 Vladimir Makarov <vmakarov@redhat.com>
|
||||||
|
|
||||||
|
PR target/39856
|
||||||
|
* reg-stack.c (subst_stack_regs_pat): Remove gcc_assert for note
|
||||||
|
for clobber.
|
||||||
|
|
||||||
|
--- gcc/reg-stack.c (revision 146648)
|
||||||
|
+++ gcc/reg-stack.c (working copy)
|
||||||
|
@@ -1371,21 +1371,23 @@ subst_stack_regs_pat (rtx insn, stack re
|
||||||
|
|
||||||
|
if (pat != PATTERN (insn))
|
||||||
|
{
|
||||||
|
- /* The fix_truncdi_1 pattern wants to be able to allocate
|
||||||
|
- its own scratch register. It does this by clobbering
|
||||||
|
- an fp reg so that it is assured of an empty reg-stack
|
||||||
|
- register. If the register is live, kill it now.
|
||||||
|
- Remove the DEAD/UNUSED note so we don't try to kill it
|
||||||
|
- later too. */
|
||||||
|
+ /* The fix_truncdi_1 pattern wants to be able to
|
||||||
|
+ allocate its own scratch register. It does this by
|
||||||
|
+ clobbering an fp reg so that it is assured of an
|
||||||
|
+ empty reg-stack register. If the register is live,
|
||||||
|
+ kill it now. Remove the DEAD/UNUSED note so we
|
||||||
|
+ don't try to kill it later too.
|
||||||
|
+
|
||||||
|
+ In reality the UNUSED note can be absent in some
|
||||||
|
+ complicated cases when the register is reused for
|
||||||
|
+ partially set variable. */
|
||||||
|
|
||||||
|
if (note)
|
||||||
|
emit_pop_insn (insn, regstack, *dest, EMIT_BEFORE);
|
||||||
|
else
|
||||||
|
- {
|
||||||
|
- note = find_reg_note (insn, REG_UNUSED, *dest);
|
||||||
|
- gcc_assert (note);
|
||||||
|
- }
|
||||||
|
- remove_note (insn, note);
|
||||||
|
+ note = find_reg_note (insn, REG_UNUSED, *dest);
|
||||||
|
+ if (note)
|
||||||
|
+ remove_note (insn, note);
|
||||||
|
replace_reg (dest, FIRST_STACK_REG + 1);
|
||||||
|
}
|
||||||
|
else
|
|
@ -0,0 +1,33 @@
|
||||||
|
2009-05-05 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
|
PR target/39942
|
||||||
|
* config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Don't emit second
|
||||||
|
.p2align 3 if MAX_SKIP is smaller than 7.
|
||||||
|
* config/i386/linux.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
|
||||||
|
|
||||||
|
--- gcc/config/i386/x86-64.h.jj 2009-05-05 08:33:20.000000000 +0200
|
||||||
|
+++ gcc/config/i386/x86-64.h 2009-05-05 16:37:13.000000000 +0200
|
||||||
|
@@ -74,7 +74,9 @@ see the files COPYING3 and COPYING.RUNTI
|
||||||
|
fprintf ((FILE), "\t.p2align %d,,%d\n", (LOG), (MAX_SKIP)); \
|
||||||
|
/* Make sure that we have at least 8 byte alignment if > 8 byte \
|
||||||
|
alignment is preferred. */ \
|
||||||
|
- if ((LOG) > 3 && (1 << (LOG)) > ((MAX_SKIP) + 1)) \
|
||||||
|
+ if ((LOG) > 3 \
|
||||||
|
+ && (1 << (LOG)) > ((MAX_SKIP) + 1) \
|
||||||
|
+ && (MAX_SKIP) >= 7) \
|
||||||
|
fprintf ((FILE), "\t.p2align 3\n"); \
|
||||||
|
} \
|
||||||
|
} \
|
||||||
|
--- gcc/config/i386/linux.h.jj 2009-05-05 08:33:20.000000000 +0200
|
||||||
|
+++ gcc/config/i386/linux.h 2009-05-05 16:37:13.000000000 +0200
|
||||||
|
@@ -153,7 +153,9 @@ along with GCC; see the file COPYING3.
|
||||||
|
fprintf ((FILE), "\t.p2align %d,,%d\n", (LOG), (MAX_SKIP)); \
|
||||||
|
/* Make sure that we have at least 8 byte alignment if > 8 byte \
|
||||||
|
alignment is preferred. */ \
|
||||||
|
- if ((LOG) > 3 && (1 << (LOG)) > ((MAX_SKIP) + 1)) \
|
||||||
|
+ if ((LOG) > 3 \
|
||||||
|
+ && (1 << (LOG)) > ((MAX_SKIP) + 1) \
|
||||||
|
+ && (MAX_SKIP) >= 7) \
|
||||||
|
fprintf ((FILE), "\t.p2align 3\n"); \
|
||||||
|
} \
|
||||||
|
} \
|
|
@ -3,20 +3,20 @@
|
||||||
* Makefile.am (libgcj_tools_la_LIBADD): Add.
|
* Makefile.am (libgcj_tools_la_LIBADD): Add.
|
||||||
* Makefile.in: Regenerated.
|
* Makefile.in: Regenerated.
|
||||||
|
|
||||||
--- libjava/Makefile.am.jj 2007-03-17 09:20:30.000000000 +0100
|
--- libjava/Makefile.am.jj 2009-05-06 08:14:50.000000000 +0200
|
||||||
+++ libjava/Makefile.am 2007-10-16 15:45:14.000000000 +0200
|
+++ libjava/Makefile.am 2009-05-06 10:26:43.000000000 +0200
|
||||||
@@ -277,6 +277,8 @@ EXTRA_libgcj_la_SOURCES = java/lang/Obje
|
@@ -314,6 +314,8 @@ libgcj_tools_la_SOURCES = classpath/tool
|
||||||
|
libgcj_tools_la_GCJFLAGS = $(AM_GCJFLAGS) -findirect-dispatch \
|
||||||
libgcj_tools_la_SOURCES = classpath/tools/tools.zip
|
-fno-bootstrap-classes -fno-indirect-classes \
|
||||||
libgcj_tools_la_GCJFLAGS = $(AM_GCJFLAGS) -findirect-dispatch -fno-indirect-classes -fsource-filename=$(here)/classpath/tools/all-classes.lst
|
-fsource-filename=$(here)/classpath/tools/all-classes.lst
|
||||||
+## See jv_convert_LDADD.
|
+## See jv_convert_LDADD.
|
||||||
+libgcj_tools_la_LIBADD = -L$(here)/.libs libgcj.la
|
+libgcj_tools_la_LIBADD = -L$(here)/.libs libgcj.la
|
||||||
libgcj_tools_la_LDFLAGS = -rpath $(toolexeclibdir) \
|
libgcj_tools_la_LDFLAGS = -rpath $(toolexeclibdir) \
|
||||||
-version-info `grep -v '^\#' $(srcdir)/libtool-version` \
|
-version-info `grep -v '^\#' $(srcdir)/libtool-version` \
|
||||||
$(LIBGCJ_LD_SYMBOLIC_FUNCTIONS)
|
$(LIBGCJ_LD_SYMBOLIC_FUNCTIONS)
|
||||||
--- libjava/Makefile.in.jj 2007-07-04 21:11:11.000000000 +0200
|
--- libjava/Makefile.in.jj 2009-05-06 08:14:49.000000000 +0200
|
||||||
+++ libjava/Makefile.in 2007-10-16 15:56:07.000000000 +0200
|
+++ libjava/Makefile.in 2009-05-06 10:27:18.000000000 +0200
|
||||||
@@ -153,7 +153,6 @@ am__objects_1 = gnu/gcj/xlib/lib_gnu_awt
|
@@ -160,7 +160,6 @@ am__objects_1 = gnu/gcj/xlib/lib_gnu_awt
|
||||||
am_lib_gnu_awt_xlib_la_OBJECTS = $(am__objects_1)
|
am_lib_gnu_awt_xlib_la_OBJECTS = $(am__objects_1)
|
||||||
lib_gnu_awt_xlib_la_OBJECTS = $(am_lib_gnu_awt_xlib_la_OBJECTS)
|
lib_gnu_awt_xlib_la_OBJECTS = $(am_lib_gnu_awt_xlib_la_OBJECTS)
|
||||||
@XLIB_AWT_TRUE@am_lib_gnu_awt_xlib_la_rpath = -rpath $(toolexeclibdir)
|
@XLIB_AWT_TRUE@am_lib_gnu_awt_xlib_la_rpath = -rpath $(toolexeclibdir)
|
||||||
|
@ -24,10 +24,10 @@
|
||||||
am_libgcj_tools_la_OBJECTS = classpath/tools/libgcj_tools_la-tools.lo
|
am_libgcj_tools_la_OBJECTS = classpath/tools/libgcj_tools_la-tools.lo
|
||||||
libgcj_tools_la_OBJECTS = $(am_libgcj_tools_la_OBJECTS)
|
libgcj_tools_la_OBJECTS = $(am_libgcj_tools_la_OBJECTS)
|
||||||
@INTERPRETER_TRUE@am__DEPENDENCIES_1 = gnu/classpath/jdwp.lo \
|
@INTERPRETER_TRUE@am__DEPENDENCIES_1 = gnu/classpath/jdwp.lo \
|
||||||
@@ -941,6 +940,7 @@ libgcj_la_LINK = $(LIBLINK)
|
@@ -1041,6 +1040,7 @@ libgcj_tools_la_GCJFLAGS = $(AM_GCJFLAGS
|
||||||
EXTRA_libgcj_la_SOURCES = java/lang/Object.java
|
-fno-bootstrap-classes -fno-indirect-classes \
|
||||||
libgcj_tools_la_SOURCES = classpath/tools/tools.zip
|
-fsource-filename=$(here)/classpath/tools/all-classes.lst
|
||||||
libgcj_tools_la_GCJFLAGS = $(AM_GCJFLAGS) -findirect-dispatch -fno-indirect-classes -fsource-filename=$(here)/classpath/tools/all-classes.lst
|
|
||||||
+libgcj_tools_la_LIBADD = -L$(here)/.libs libgcj.la
|
+libgcj_tools_la_LIBADD = -L$(here)/.libs libgcj.la
|
||||||
libgcj_tools_la_LDFLAGS = -rpath $(toolexeclibdir) \
|
libgcj_tools_la_LDFLAGS = -rpath $(toolexeclibdir) \
|
||||||
-version-info `grep -v '^\#' $(srcdir)/libtool-version` \
|
-version-info `grep -v '^\#' $(srcdir)/libtool-version` \
|
||||||
|
|
|
@ -0,0 +1,827 @@
|
||||||
|
2009-06-21 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
|
* var-tracking.c (struct shared_hash_def, shared_hash): New types.
|
||||||
|
(dataflow_set): Change vars type from htab_t to shared_hash.
|
||||||
|
(shared_hash_pool, empty_shared_hash): New variables.
|
||||||
|
(vars_clear): Removed.
|
||||||
|
(shared_hash_shared, shared_hash_htab, shared_hash_copy,
|
||||||
|
shared_hash_find_slot_unshare, shared_hash_find_slot,
|
||||||
|
shared_hash_find_slot_noinsert, shared_hash_find): New
|
||||||
|
static inlines.
|
||||||
|
(shared_hash_unshare, shared_hash_destroy): New functions.
|
||||||
|
(unshare_variable): Unshare set->vars if shared, use
|
||||||
|
shared_hash_htab.
|
||||||
|
(vars_copy): Use htab_traverse_noresize instead of htab_traverse.
|
||||||
|
(get_init_value, find_src_set_src, dump_dataflow_set,
|
||||||
|
clobber_variable_part, emit_notes_for_differences): Use
|
||||||
|
shared_hash_htab.
|
||||||
|
(dataflow_set_init): Remove second argument, set vars to
|
||||||
|
empty_shared_hash instead of creating a new htab.
|
||||||
|
(dataflow_set_clear): Call shared_hash_destroy and set vars
|
||||||
|
to empty_shared_hash instead of calling vars_clear.
|
||||||
|
(dataflow_set_copy): Don't call vars_copy, instead just share
|
||||||
|
the src htab with dst.
|
||||||
|
(variable_union): Use shared_hash_*, use initially NO_INSERT
|
||||||
|
lookup if set->vars is shared. Don't keep slot cleared before
|
||||||
|
calling unshare_variable. Unshare set->vars if needed.
|
||||||
|
Even ->refcount == 1 vars must be unshared if set->vars is shared
|
||||||
|
and var needs to be modified.
|
||||||
|
(variable_canonicalize): New function.
|
||||||
|
(dataflow_set_union): If dst->vars is empty, just share src->vars
|
||||||
|
with dst->vars and traverse with variable_canonicalize to canonicalize
|
||||||
|
and unshare what is needed.
|
||||||
|
(dataflow_set_different): If old_set and new_set use the same shared
|
||||||
|
htab, they aren't different. If number of htab elements is different,
|
||||||
|
htabs are different. Use shared_hash_*.
|
||||||
|
(dataflow_set_destroy): Call shared_hash_destroy instead of
|
||||||
|
htab_delete.
|
||||||
|
(compute_bb_dataflow, emit_notes_in_bb, vt_emit_notes): Don't pass
|
||||||
|
second argument to dataflow_set_init.
|
||||||
|
(vt_initialize): Likewise. Initialize shared_hash_pool and
|
||||||
|
empty_shared_hash, move bb in/out initialization afterwards.
|
||||||
|
Use variable_htab_free instead of NULL as changed_variables del hook.
|
||||||
|
(variable_was_changed): Change type of second argument to pointer to
|
||||||
|
dataflow_set. When inserting var into changed_variables, bump
|
||||||
|
refcount. Unshare set->vars if set is shared htab and slot needs to
|
||||||
|
be cleared.
|
||||||
|
(set_variable_part): Use shared_hash_*, use initially NO_INSERT
|
||||||
|
lookup if set->vars is shared. Unshare set->vars if needed.
|
||||||
|
Even ->refcount == 1 vars must be unshared if set->vars is shared
|
||||||
|
and var needs to be modified. Adjust variable_was_changed caller.
|
||||||
|
(delete_variable_part): Use shared_hash_*. Even ->refcount == 1
|
||||||
|
vars must be unshared if set->vars is shared and var needs to be
|
||||||
|
modified. Adjust variable_was_changed caller.
|
||||||
|
(emit_note_insn_var_location): Don't pool_free var.
|
||||||
|
(emit_notes_for_differences_1): Initialize empty_var->refcount to 0
|
||||||
|
instead of 1.
|
||||||
|
(vt_finalize): Call htab_delete on empty_shared_hash->htab and
|
||||||
|
free_alloc_pool on shared_hash_pool.
|
||||||
|
|
||||||
|
* hashtab.c (htab_traverse): Don't call htab_expand for
|
||||||
|
nearly empty hashtabs with sizes 7, 13 or 31.
|
||||||
|
|
||||||
|
--- gcc/var-tracking.c (revision 148758)
|
||||||
|
+++ gcc/var-tracking.c (revision 148760)
|
||||||
|
@@ -182,6 +182,17 @@ typedef struct attrs_def
|
||||||
|
HOST_WIDE_INT offset;
|
||||||
|
} *attrs;
|
||||||
|
|
||||||
|
+/* Structure holding a refcounted hash table. If refcount > 1,
|
||||||
|
+ it must be first unshared before modified. */
|
||||||
|
+typedef struct shared_hash_def
|
||||||
|
+{
|
||||||
|
+ /* Reference count. */
|
||||||
|
+ int refcount;
|
||||||
|
+
|
||||||
|
+ /* Actual hash table. */
|
||||||
|
+ htab_t htab;
|
||||||
|
+} *shared_hash;
|
||||||
|
+
|
||||||
|
/* Structure holding the IN or OUT set for a basic block. */
|
||||||
|
typedef struct dataflow_set_def
|
||||||
|
{
|
||||||
|
@@ -192,7 +203,7 @@ typedef struct dataflow_set_def
|
||||||
|
attrs regs[FIRST_PSEUDO_REGISTER];
|
||||||
|
|
||||||
|
/* Variable locations. */
|
||||||
|
- htab_t vars;
|
||||||
|
+ shared_hash vars;
|
||||||
|
} dataflow_set;
|
||||||
|
|
||||||
|
/* The structure (one for each basic block) containing the information
|
||||||
|
@@ -280,12 +291,18 @@ static alloc_pool var_pool;
|
||||||
|
/* Alloc pool for struct location_chain_def. */
|
||||||
|
static alloc_pool loc_chain_pool;
|
||||||
|
|
||||||
|
+/* Alloc pool for struct shared_hash_def. */
|
||||||
|
+static alloc_pool shared_hash_pool;
|
||||||
|
+
|
||||||
|
/* Changed variables, notes will be emitted for them. */
|
||||||
|
static htab_t changed_variables;
|
||||||
|
|
||||||
|
/* Shall notes be emitted? */
|
||||||
|
static bool emit_notes;
|
||||||
|
|
||||||
|
+/* Empty shared hashtable. */
|
||||||
|
+static shared_hash empty_shared_hash;
|
||||||
|
+
|
||||||
|
/* Local function prototypes. */
|
||||||
|
static void stack_adjust_offset_pre_post (rtx, HOST_WIDE_INT *,
|
||||||
|
HOST_WIDE_INT *);
|
||||||
|
@@ -305,7 +322,6 @@ static void attrs_list_insert (attrs *,
|
||||||
|
static void attrs_list_copy (attrs *, attrs);
|
||||||
|
static void attrs_list_union (attrs *, attrs);
|
||||||
|
|
||||||
|
-static void vars_clear (htab_t);
|
||||||
|
static variable unshare_variable (dataflow_set *set, variable var,
|
||||||
|
enum var_init_status);
|
||||||
|
static int vars_copy_1 (void **, void *);
|
||||||
|
@@ -321,11 +337,12 @@ static void var_mem_delete_and_set (data
|
||||||
|
enum var_init_status, rtx);
|
||||||
|
static void var_mem_delete (dataflow_set *, rtx, bool);
|
||||||
|
|
||||||
|
-static void dataflow_set_init (dataflow_set *, int);
|
||||||
|
+static void dataflow_set_init (dataflow_set *);
|
||||||
|
static void dataflow_set_clear (dataflow_set *);
|
||||||
|
static void dataflow_set_copy (dataflow_set *, dataflow_set *);
|
||||||
|
static int variable_union_info_cmp_pos (const void *, const void *);
|
||||||
|
static int variable_union (void **, void *);
|
||||||
|
+static int variable_canonicalize (void **, void *);
|
||||||
|
static void dataflow_set_union (dataflow_set *, dataflow_set *);
|
||||||
|
static bool variable_part_different_p (variable_part *, variable_part *);
|
||||||
|
static bool variable_different_p (variable, variable, bool);
|
||||||
|
@@ -352,7 +369,7 @@ static void dump_vars (htab_t);
|
||||||
|
static void dump_dataflow_set (dataflow_set *);
|
||||||
|
static void dump_dataflow_sets (void);
|
||||||
|
|
||||||
|
-static void variable_was_changed (variable, htab_t);
|
||||||
|
+static void variable_was_changed (variable, dataflow_set *);
|
||||||
|
static void set_variable_part (dataflow_set *, rtx, tree, HOST_WIDE_INT,
|
||||||
|
enum var_init_status, rtx);
|
||||||
|
static void clobber_variable_part (dataflow_set *, rtx, tree, HOST_WIDE_INT,
|
||||||
|
@@ -742,12 +759,107 @@ attrs_list_union (attrs *dstp, attrs src
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
-/* Delete all variables from hash table VARS. */
|
||||||
|
+/* Shared hashtable support. */
|
||||||
|
+
|
||||||
|
+/* Return true if VARS is shared. */
|
||||||
|
+
|
||||||
|
+static inline bool
|
||||||
|
+shared_hash_shared (shared_hash vars)
|
||||||
|
+{
|
||||||
|
+ return vars->refcount > 1;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+/* Return the hash table for VARS. */
|
||||||
|
+
|
||||||
|
+static inline htab_t
|
||||||
|
+shared_hash_htab (shared_hash vars)
|
||||||
|
+{
|
||||||
|
+ return vars->htab;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+/* Copy variables into a new hash table. */
|
||||||
|
+
|
||||||
|
+static shared_hash
|
||||||
|
+shared_hash_unshare (shared_hash vars)
|
||||||
|
+{
|
||||||
|
+ shared_hash new_vars = (shared_hash) pool_alloc (shared_hash_pool);
|
||||||
|
+ gcc_assert (vars->refcount > 1);
|
||||||
|
+ new_vars->refcount = 1;
|
||||||
|
+ new_vars->htab
|
||||||
|
+ = htab_create (htab_elements (vars->htab) + 3, variable_htab_hash,
|
||||||
|
+ variable_htab_eq, variable_htab_free);
|
||||||
|
+ vars_copy (new_vars->htab, vars->htab);
|
||||||
|
+ vars->refcount--;
|
||||||
|
+ return new_vars;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+/* Increment reference counter on VARS and return it. */
|
||||||
|
+
|
||||||
|
+static inline shared_hash
|
||||||
|
+shared_hash_copy (shared_hash vars)
|
||||||
|
+{
|
||||||
|
+ vars->refcount++;
|
||||||
|
+ return vars;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+/* Decrement reference counter and destroy hash table if not shared
|
||||||
|
+ anymore. */
|
||||||
|
|
||||||
|
static void
|
||||||
|
-vars_clear (htab_t vars)
|
||||||
|
+shared_hash_destroy (shared_hash vars)
|
||||||
|
{
|
||||||
|
- htab_empty (vars);
|
||||||
|
+ gcc_assert (vars->refcount > 0);
|
||||||
|
+ if (--vars->refcount == 0)
|
||||||
|
+ {
|
||||||
|
+ htab_delete (vars->htab);
|
||||||
|
+ pool_free (shared_hash_pool, vars);
|
||||||
|
+ }
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+/* Unshare *PVARS if shared and return slot for DECL. If INS is
|
||||||
|
+ INSERT, insert it if not already present. */
|
||||||
|
+
|
||||||
|
+static inline void **
|
||||||
|
+shared_hash_find_slot_unshare (shared_hash *pvars, tree decl,
|
||||||
|
+ enum insert_option ins)
|
||||||
|
+{
|
||||||
|
+ if (shared_hash_shared (*pvars))
|
||||||
|
+ *pvars = shared_hash_unshare (*pvars);
|
||||||
|
+ return htab_find_slot_with_hash (shared_hash_htab (*pvars), decl,
|
||||||
|
+ VARIABLE_HASH_VAL (decl), ins);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+/* Return slot for DECL, if it is already present in the hash table.
|
||||||
|
+ If it is not present, insert it only VARS is not shared, otherwise
|
||||||
|
+ return NULL. */
|
||||||
|
+
|
||||||
|
+static inline void **
|
||||||
|
+shared_hash_find_slot (shared_hash vars, tree decl)
|
||||||
|
+{
|
||||||
|
+ return htab_find_slot_with_hash (shared_hash_htab (vars), decl,
|
||||||
|
+ VARIABLE_HASH_VAL (decl),
|
||||||
|
+ shared_hash_shared (vars)
|
||||||
|
+ ? NO_INSERT : INSERT);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+/* Return slot for DECL only if it is already present in the hash table. */
|
||||||
|
+
|
||||||
|
+static inline void **
|
||||||
|
+shared_hash_find_slot_noinsert (shared_hash vars, tree decl)
|
||||||
|
+{
|
||||||
|
+ return htab_find_slot_with_hash (shared_hash_htab (vars), decl,
|
||||||
|
+ VARIABLE_HASH_VAL (decl), NO_INSERT);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+/* Return variable for DECL or NULL if not already present in the hash
|
||||||
|
+ table. */
|
||||||
|
+
|
||||||
|
+static inline variable
|
||||||
|
+shared_hash_find (shared_hash vars, tree decl)
|
||||||
|
+{
|
||||||
|
+ return (variable)
|
||||||
|
+ htab_find_with_hash (shared_hash_htab (vars), decl,
|
||||||
|
+ VARIABLE_HASH_VAL (decl));
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Return a copy of a variable VAR and insert it to dataflow set SET. */
|
||||||
|
@@ -801,9 +913,7 @@ unshare_variable (dataflow_set *set, var
|
||||||
|
new_var->var_part[i].cur_loc = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
- slot = htab_find_slot_with_hash (set->vars, new_var->decl,
|
||||||
|
- VARIABLE_HASH_VAL (new_var->decl),
|
||||||
|
- INSERT);
|
||||||
|
+ slot = shared_hash_find_slot_unshare (&set->vars, new_var->decl, INSERT);
|
||||||
|
*slot = new_var;
|
||||||
|
return new_var;
|
||||||
|
}
|
||||||
|
@@ -834,8 +944,7 @@ vars_copy_1 (void **slot, void *data)
|
||||||
|
static void
|
||||||
|
vars_copy (htab_t dst, htab_t src)
|
||||||
|
{
|
||||||
|
- vars_clear (dst);
|
||||||
|
- htab_traverse (src, vars_copy_1, dst);
|
||||||
|
+ htab_traverse_noresize (src, vars_copy_1, dst);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Map a decl to its main debug decl. */
|
||||||
|
@@ -874,7 +983,6 @@ var_reg_set (dataflow_set *set, rtx loc,
|
||||||
|
static int
|
||||||
|
get_init_value (dataflow_set *set, rtx loc, tree decl)
|
||||||
|
{
|
||||||
|
- void **slot;
|
||||||
|
variable var;
|
||||||
|
int i;
|
||||||
|
int ret_val = VAR_INIT_STATUS_UNKNOWN;
|
||||||
|
@@ -882,11 +990,9 @@ get_init_value (dataflow_set *set, rtx l
|
||||||
|
if (! flag_var_tracking_uninit)
|
||||||
|
return VAR_INIT_STATUS_INITIALIZED;
|
||||||
|
|
||||||
|
- slot = htab_find_slot_with_hash (set->vars, decl, VARIABLE_HASH_VAL (decl),
|
||||||
|
- NO_INSERT);
|
||||||
|
- if (slot)
|
||||||
|
+ var = shared_hash_find (set->vars, decl);
|
||||||
|
+ if (var)
|
||||||
|
{
|
||||||
|
- var = * (variable *) slot;
|
||||||
|
for (i = 0; i < var->n_var_parts && ret_val == VAR_INIT_STATUS_UNKNOWN; i++)
|
||||||
|
{
|
||||||
|
location_chain nextp;
|
||||||
|
@@ -1050,11 +1156,10 @@ var_mem_delete (dataflow_set *set, rtx l
|
||||||
|
VARS_SIZE is the initial size of hash table VARS. */
|
||||||
|
|
||||||
|
static void
|
||||||
|
-dataflow_set_init (dataflow_set *set, int vars_size)
|
||||||
|
+dataflow_set_init (dataflow_set *set)
|
||||||
|
{
|
||||||
|
init_attrs_list_set (set->regs);
|
||||||
|
- set->vars = htab_create (vars_size, variable_htab_hash, variable_htab_eq,
|
||||||
|
- variable_htab_free);
|
||||||
|
+ set->vars = shared_hash_copy (empty_shared_hash);
|
||||||
|
set->stack_adjust = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -1068,7 +1173,8 @@ dataflow_set_clear (dataflow_set *set)
|
||||||
|
for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
|
||||||
|
attrs_list_clear (&set->regs[i]);
|
||||||
|
|
||||||
|
- vars_clear (set->vars);
|
||||||
|
+ shared_hash_destroy (set->vars);
|
||||||
|
+ set->vars = shared_hash_copy (empty_shared_hash);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Copy the contents of dataflow set SRC to DST. */
|
||||||
|
@@ -1081,7 +1187,8 @@ dataflow_set_copy (dataflow_set *dst, da
|
||||||
|
for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
|
||||||
|
attrs_list_copy (&dst->regs[i], src->regs[i]);
|
||||||
|
|
||||||
|
- vars_copy (dst->vars, src->vars);
|
||||||
|
+ shared_hash_destroy (dst->vars);
|
||||||
|
+ dst->vars = shared_hash_copy (src->vars);
|
||||||
|
dst->stack_adjust = src->stack_adjust;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -1129,15 +1236,14 @@ variable_union_info_cmp_pos (const void
|
||||||
|
static int
|
||||||
|
variable_union (void **slot, void *data)
|
||||||
|
{
|
||||||
|
- variable src, dst, *dstp;
|
||||||
|
+ variable src, dst;
|
||||||
|
+ void **dstp;
|
||||||
|
dataflow_set *set = (dataflow_set *) data;
|
||||||
|
int i, j, k;
|
||||||
|
|
||||||
|
src = *(variable *) slot;
|
||||||
|
- dstp = (variable *) htab_find_slot_with_hash (set->vars, src->decl,
|
||||||
|
- VARIABLE_HASH_VAL (src->decl),
|
||||||
|
- INSERT);
|
||||||
|
- if (!*dstp)
|
||||||
|
+ dstp = shared_hash_find_slot (set->vars, src->decl);
|
||||||
|
+ if (!dstp || !*dstp)
|
||||||
|
{
|
||||||
|
src->refcount++;
|
||||||
|
|
||||||
|
@@ -1162,16 +1268,23 @@ variable_union (void **slot, void *data)
|
||||||
|
if (! flag_var_tracking_uninit)
|
||||||
|
status = VAR_INIT_STATUS_INITIALIZED;
|
||||||
|
|
||||||
|
+ if (dstp)
|
||||||
|
+ *dstp = (void *) src;
|
||||||
|
unshare_variable (set, src, status);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
- *dstp = src;
|
||||||
|
+ {
|
||||||
|
+ if (!dstp)
|
||||||
|
+ dstp = shared_hash_find_slot_unshare (&set->vars, src->decl,
|
||||||
|
+ INSERT);
|
||||||
|
+ *dstp = (void *) src;
|
||||||
|
+ }
|
||||||
|
|
||||||
|
/* Continue traversing the hash table. */
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
- dst = *dstp;
|
||||||
|
+ dst = (variable) *dstp;
|
||||||
|
|
||||||
|
gcc_assert (src->n_var_parts);
|
||||||
|
|
||||||
|
@@ -1196,7 +1309,8 @@ variable_union (void **slot, void *data)
|
||||||
|
thus there are at most MAX_VAR_PARTS different offsets. */
|
||||||
|
gcc_assert (k <= MAX_VAR_PARTS);
|
||||||
|
|
||||||
|
- if (dst->refcount > 1 && dst->n_var_parts != k)
|
||||||
|
+ if ((dst->refcount > 1 || shared_hash_shared (set->vars))
|
||||||
|
+ && dst->n_var_parts != k)
|
||||||
|
{
|
||||||
|
enum var_init_status status = VAR_INIT_STATUS_UNKNOWN;
|
||||||
|
|
||||||
|
@@ -1226,7 +1340,7 @@ variable_union (void **slot, void *data)
|
||||||
|
/* If DST is shared compare the location chains.
|
||||||
|
If they are different we will modify the chain in DST with
|
||||||
|
high probability so make a copy of DST. */
|
||||||
|
- if (dst->refcount > 1)
|
||||||
|
+ if (dst->refcount > 1 || shared_hash_shared (set->vars))
|
||||||
|
{
|
||||||
|
for (node = src->var_part[i].loc_chain,
|
||||||
|
node2 = dst->var_part[j].loc_chain; node && node2;
|
||||||
|
@@ -1379,6 +1493,46 @@ variable_union (void **slot, void *data)
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
+/* Like variable_union, but only used when doing dataflow_set_union
|
||||||
|
+ into an empty hashtab. To allow sharing, dst is initially shared
|
||||||
|
+ with src (so all variables are "copied" from src to dst hashtab),
|
||||||
|
+ so only unshare_variable for variables that need canonicalization
|
||||||
|
+ are needed. */
|
||||||
|
+
|
||||||
|
+static int
|
||||||
|
+variable_canonicalize (void **slot, void *data)
|
||||||
|
+{
|
||||||
|
+ variable src;
|
||||||
|
+ dataflow_set *set = (dataflow_set *) data;
|
||||||
|
+ int k;
|
||||||
|
+
|
||||||
|
+ src = *(variable *) slot;
|
||||||
|
+
|
||||||
|
+ /* If CUR_LOC of some variable part is not the first element of
|
||||||
|
+ the location chain we are going to change it so we have to make
|
||||||
|
+ a copy of the variable. */
|
||||||
|
+ for (k = 0; k < src->n_var_parts; k++)
|
||||||
|
+ {
|
||||||
|
+ gcc_assert (!src->var_part[k].loc_chain == !src->var_part[k].cur_loc);
|
||||||
|
+ if (src->var_part[k].loc_chain)
|
||||||
|
+ {
|
||||||
|
+ gcc_assert (src->var_part[k].cur_loc);
|
||||||
|
+ if (src->var_part[k].cur_loc != src->var_part[k].loc_chain->loc)
|
||||||
|
+ break;
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ if (k < src->n_var_parts)
|
||||||
|
+ {
|
||||||
|
+ enum var_init_status status = VAR_INIT_STATUS_UNKNOWN;
|
||||||
|
+
|
||||||
|
+ if (! flag_var_tracking_uninit)
|
||||||
|
+ status = VAR_INIT_STATUS_INITIALIZED;
|
||||||
|
+
|
||||||
|
+ unshare_variable (set, src, status);
|
||||||
|
+ }
|
||||||
|
+ return 1;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
/* Compute union of dataflow sets SRC and DST and store it to DST. */
|
||||||
|
|
||||||
|
static void
|
||||||
|
@@ -1389,7 +1543,14 @@ dataflow_set_union (dataflow_set *dst, d
|
||||||
|
for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
|
||||||
|
attrs_list_union (&dst->regs[i], src->regs[i]);
|
||||||
|
|
||||||
|
- htab_traverse (src->vars, variable_union, dst);
|
||||||
|
+ if (dst->vars == empty_shared_hash)
|
||||||
|
+ {
|
||||||
|
+ shared_hash_destroy (dst->vars);
|
||||||
|
+ dst->vars = shared_hash_copy (src->vars);
|
||||||
|
+ htab_traverse (shared_hash_htab (src->vars), variable_canonicalize, dst);
|
||||||
|
+ }
|
||||||
|
+ else
|
||||||
|
+ htab_traverse (shared_hash_htab (src->vars), variable_union, dst);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Flag whether two dataflow sets being compared contain different data. */
|
||||||
|
@@ -1522,15 +1683,24 @@ dataflow_set_different_2 (void **slot, v
|
||||||
|
static bool
|
||||||
|
dataflow_set_different (dataflow_set *old_set, dataflow_set *new_set)
|
||||||
|
{
|
||||||
|
+ if (old_set->vars == new_set->vars)
|
||||||
|
+ return false;
|
||||||
|
+
|
||||||
|
+ if (htab_elements (shared_hash_htab (old_set->vars))
|
||||||
|
+ != htab_elements (shared_hash_htab (new_set->vars)))
|
||||||
|
+ return true;
|
||||||
|
+
|
||||||
|
dataflow_set_different_value = false;
|
||||||
|
|
||||||
|
- htab_traverse (old_set->vars, dataflow_set_different_1, new_set->vars);
|
||||||
|
+ htab_traverse (shared_hash_htab (old_set->vars), dataflow_set_different_1,
|
||||||
|
+ shared_hash_htab (new_set->vars));
|
||||||
|
if (!dataflow_set_different_value)
|
||||||
|
{
|
||||||
|
/* We have compared the variables which are in both hash tables
|
||||||
|
so now only check whether there are some variables in NEW_SET->VARS
|
||||||
|
which are not in OLD_SET->VARS. */
|
||||||
|
- htab_traverse (new_set->vars, dataflow_set_different_2, old_set->vars);
|
||||||
|
+ htab_traverse (shared_hash_htab (new_set->vars), dataflow_set_different_2,
|
||||||
|
+ shared_hash_htab (old_set->vars));
|
||||||
|
}
|
||||||
|
return dataflow_set_different_value;
|
||||||
|
}
|
||||||
|
@@ -1545,7 +1715,7 @@ dataflow_set_destroy (dataflow_set *set)
|
||||||
|
for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
|
||||||
|
attrs_list_clear (&set->regs[i]);
|
||||||
|
|
||||||
|
- htab_delete (set->vars);
|
||||||
|
+ shared_hash_destroy (set->vars);
|
||||||
|
set->vars = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -1985,7 +2155,6 @@ find_src_set_src (dataflow_set *set, rtx
|
||||||
|
{
|
||||||
|
tree decl = NULL_TREE; /* The variable being copied around. */
|
||||||
|
rtx set_src = NULL_RTX; /* The value for "decl" stored in "src". */
|
||||||
|
- void **slot;
|
||||||
|
variable var;
|
||||||
|
location_chain nextp;
|
||||||
|
int i;
|
||||||
|
@@ -1998,12 +2167,9 @@ find_src_set_src (dataflow_set *set, rtx
|
||||||
|
|
||||||
|
if (src && decl)
|
||||||
|
{
|
||||||
|
- slot = htab_find_slot_with_hash (set->vars, decl,
|
||||||
|
- VARIABLE_HASH_VAL (decl), NO_INSERT);
|
||||||
|
-
|
||||||
|
- if (slot)
|
||||||
|
+ var = shared_hash_find (set->vars, decl);
|
||||||
|
+ if (var)
|
||||||
|
{
|
||||||
|
- var = *(variable *) slot;
|
||||||
|
found = false;
|
||||||
|
for (i = 0; i < var->n_var_parts && !found; i++)
|
||||||
|
for (nextp = var->var_part[i].loc_chain; nextp && !found;
|
||||||
|
@@ -2031,7 +2197,7 @@ compute_bb_dataflow (basic_block bb)
|
||||||
|
dataflow_set *in = &VTI (bb)->in;
|
||||||
|
dataflow_set *out = &VTI (bb)->out;
|
||||||
|
|
||||||
|
- dataflow_set_init (&old_out, htab_elements (VTI (bb)->out.vars) + 3);
|
||||||
|
+ dataflow_set_init (&old_out);
|
||||||
|
dataflow_set_copy (&old_out, out);
|
||||||
|
dataflow_set_copy (out, in);
|
||||||
|
|
||||||
|
@@ -2323,7 +2489,7 @@ dump_dataflow_set (dataflow_set *set)
|
||||||
|
dump_attrs_list (set->regs[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
- dump_vars (set->vars);
|
||||||
|
+ dump_vars (shared_hash_htab (set->vars));
|
||||||
|
fprintf (dump_file, "\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -2345,10 +2511,10 @@ dump_dataflow_sets (void)
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Add variable VAR to the hash table of changed variables and
|
||||||
|
- if it has no locations delete it from hash table HTAB. */
|
||||||
|
+ if it has no locations delete it from SET's hash table. */
|
||||||
|
|
||||||
|
static void
|
||||||
|
-variable_was_changed (variable var, htab_t htab)
|
||||||
|
+variable_was_changed (variable var, dataflow_set *set)
|
||||||
|
{
|
||||||
|
hashval_t hash = VARIABLE_HASH_VAL (var->decl);
|
||||||
|
|
||||||
|
@@ -2359,36 +2525,39 @@ variable_was_changed (variable var, htab
|
||||||
|
slot = (variable *) htab_find_slot_with_hash (changed_variables,
|
||||||
|
var->decl, hash, INSERT);
|
||||||
|
|
||||||
|
- if (htab && var->n_var_parts == 0)
|
||||||
|
+ if (set && var->n_var_parts == 0)
|
||||||
|
{
|
||||||
|
variable empty_var;
|
||||||
|
- void **old;
|
||||||
|
|
||||||
|
empty_var = (variable) pool_alloc (var_pool);
|
||||||
|
empty_var->decl = var->decl;
|
||||||
|
empty_var->refcount = 1;
|
||||||
|
empty_var->n_var_parts = 0;
|
||||||
|
*slot = empty_var;
|
||||||
|
-
|
||||||
|
- old = htab_find_slot_with_hash (htab, var->decl, hash,
|
||||||
|
- NO_INSERT);
|
||||||
|
- if (old)
|
||||||
|
- htab_clear_slot (htab, old);
|
||||||
|
+ goto drop_var;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
+ var->refcount++;
|
||||||
|
*slot = var;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
- gcc_assert (htab);
|
||||||
|
+ gcc_assert (set);
|
||||||
|
if (var->n_var_parts == 0)
|
||||||
|
{
|
||||||
|
- void **slot = htab_find_slot_with_hash (htab, var->decl, hash,
|
||||||
|
- NO_INSERT);
|
||||||
|
+ void **slot;
|
||||||
|
+
|
||||||
|
+ drop_var:
|
||||||
|
+ slot = shared_hash_find_slot_noinsert (set->vars, var->decl);
|
||||||
|
if (slot)
|
||||||
|
- htab_clear_slot (htab, slot);
|
||||||
|
+ {
|
||||||
|
+ if (shared_hash_shared (set->vars))
|
||||||
|
+ slot = shared_hash_find_slot_unshare (&set->vars, var->decl,
|
||||||
|
+ NO_INSERT);
|
||||||
|
+ htab_clear_slot (shared_hash_htab (set->vars), slot);
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@@ -2438,12 +2607,12 @@ set_variable_part (dataflow_set *set, rt
|
||||||
|
location_chain node, next;
|
||||||
|
location_chain *nextp;
|
||||||
|
variable var;
|
||||||
|
- void **slot;
|
||||||
|
-
|
||||||
|
- slot = htab_find_slot_with_hash (set->vars, decl,
|
||||||
|
- VARIABLE_HASH_VAL (decl), INSERT);
|
||||||
|
- if (!*slot)
|
||||||
|
+ void **slot = shared_hash_find_slot (set->vars, decl);
|
||||||
|
+
|
||||||
|
+ if (!slot || !*slot)
|
||||||
|
{
|
||||||
|
+ if (!slot)
|
||||||
|
+ slot = shared_hash_find_slot_unshare (&set->vars, decl, INSERT);
|
||||||
|
/* Create new variable information. */
|
||||||
|
var = (variable) pool_alloc (var_pool);
|
||||||
|
var->decl = decl;
|
||||||
|
@@ -2479,13 +2648,12 @@ set_variable_part (dataflow_set *set, rt
|
||||||
|
if (set_src != NULL)
|
||||||
|
node->set_src = set_src;
|
||||||
|
|
||||||
|
- *slot = var;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* We have to make a copy of a shared variable. */
|
||||||
|
- if (var->refcount > 1)
|
||||||
|
+ if (var->refcount > 1 || shared_hash_shared (set->vars))
|
||||||
|
var = unshare_variable (set, var, initialized);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@@ -2494,7 +2662,7 @@ set_variable_part (dataflow_set *set, rt
|
||||||
|
/* We have not found the location part, new one will be created. */
|
||||||
|
|
||||||
|
/* We have to make a copy of the shared variable. */
|
||||||
|
- if (var->refcount > 1)
|
||||||
|
+ if (var->refcount > 1 || shared_hash_shared (set->vars))
|
||||||
|
var = unshare_variable (set, var, initialized);
|
||||||
|
|
||||||
|
/* We track only variables whose size is <= MAX_VAR_PARTS bytes
|
||||||
|
@@ -2548,7 +2716,7 @@ set_variable_part (dataflow_set *set, rt
|
||||||
|
if (var->var_part[pos].cur_loc == NULL)
|
||||||
|
{
|
||||||
|
var->var_part[pos].cur_loc = loc;
|
||||||
|
- variable_was_changed (var, set->vars);
|
||||||
|
+ variable_was_changed (var, set);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -2561,16 +2729,14 @@ static void
|
||||||
|
clobber_variable_part (dataflow_set *set, rtx loc, tree decl,
|
||||||
|
HOST_WIDE_INT offset, rtx set_src)
|
||||||
|
{
|
||||||
|
- void **slot;
|
||||||
|
+ variable var;
|
||||||
|
|
||||||
|
if (! decl || ! DECL_P (decl))
|
||||||
|
return;
|
||||||
|
|
||||||
|
- slot = htab_find_slot_with_hash (set->vars, decl, VARIABLE_HASH_VAL (decl),
|
||||||
|
- NO_INSERT);
|
||||||
|
- if (slot)
|
||||||
|
+ var = shared_hash_find (set->vars, decl);
|
||||||
|
+ if (var)
|
||||||
|
{
|
||||||
|
- variable var = (variable) *slot;
|
||||||
|
int pos = find_variable_location_part (var, offset, NULL);
|
||||||
|
|
||||||
|
if (pos >= 0)
|
||||||
|
@@ -2627,13 +2793,9 @@ static void
|
||||||
|
delete_variable_part (dataflow_set *set, rtx loc, tree decl,
|
||||||
|
HOST_WIDE_INT offset)
|
||||||
|
{
|
||||||
|
- void **slot;
|
||||||
|
-
|
||||||
|
- slot = htab_find_slot_with_hash (set->vars, decl, VARIABLE_HASH_VAL (decl),
|
||||||
|
- NO_INSERT);
|
||||||
|
- if (slot)
|
||||||
|
+ variable var = shared_hash_find (set->vars, decl);;
|
||||||
|
+ if (var)
|
||||||
|
{
|
||||||
|
- variable var = (variable) *slot;
|
||||||
|
int pos = find_variable_location_part (var, offset, NULL);
|
||||||
|
|
||||||
|
if (pos >= 0)
|
||||||
|
@@ -2642,7 +2804,7 @@ delete_variable_part (dataflow_set *set,
|
||||||
|
location_chain *nextp;
|
||||||
|
bool changed;
|
||||||
|
|
||||||
|
- if (var->refcount > 1)
|
||||||
|
+ if (var->refcount > 1 || shared_hash_shared (set->vars))
|
||||||
|
{
|
||||||
|
/* If the variable contains the location part we have to
|
||||||
|
make a copy of the variable. */
|
||||||
|
@@ -2705,7 +2867,7 @@ delete_variable_part (dataflow_set *set,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (changed)
|
||||||
|
- variable_was_changed (var, set->vars);
|
||||||
|
+ variable_was_changed (var, set);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@@ -2864,14 +3026,6 @@ emit_note_insn_var_location (void **varp
|
||||||
|
|
||||||
|
htab_clear_slot (changed_variables, varp);
|
||||||
|
|
||||||
|
- /* When there are no location parts the variable has been already
|
||||||
|
- removed from hash table and a new empty variable was created.
|
||||||
|
- Free the empty variable. */
|
||||||
|
- if (var->n_var_parts == 0)
|
||||||
|
- {
|
||||||
|
- pool_free (var_pool, var);
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
/* Continue traversing the hash table. */
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
@@ -2910,7 +3064,7 @@ emit_notes_for_differences_1 (void **slo
|
||||||
|
|
||||||
|
empty_var = (variable) pool_alloc (var_pool);
|
||||||
|
empty_var->decl = old_var->decl;
|
||||||
|
- empty_var->refcount = 1;
|
||||||
|
+ empty_var->refcount = 0;
|
||||||
|
empty_var->n_var_parts = 0;
|
||||||
|
variable_was_changed (empty_var, NULL);
|
||||||
|
}
|
||||||
|
@@ -2952,8 +3106,12 @@ static void
|
||||||
|
emit_notes_for_differences (rtx insn, dataflow_set *old_set,
|
||||||
|
dataflow_set *new_set)
|
||||||
|
{
|
||||||
|
- htab_traverse (old_set->vars, emit_notes_for_differences_1, new_set->vars);
|
||||||
|
- htab_traverse (new_set->vars, emit_notes_for_differences_2, old_set->vars);
|
||||||
|
+ htab_traverse (shared_hash_htab (old_set->vars),
|
||||||
|
+ emit_notes_for_differences_1,
|
||||||
|
+ shared_hash_htab (new_set->vars));
|
||||||
|
+ htab_traverse (shared_hash_htab (new_set->vars),
|
||||||
|
+ emit_notes_for_differences_2,
|
||||||
|
+ shared_hash_htab (old_set->vars));
|
||||||
|
emit_notes_for_changes (insn, EMIT_NOTE_BEFORE_INSN);
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -2965,7 +3123,7 @@ emit_notes_in_bb (basic_block bb)
|
||||||
|
int i;
|
||||||
|
dataflow_set set;
|
||||||
|
|
||||||
|
- dataflow_set_init (&set, htab_elements (VTI (bb)->in.vars) + 3);
|
||||||
|
+ dataflow_set_init (&set);
|
||||||
|
dataflow_set_copy (&set, &VTI (bb)->in);
|
||||||
|
|
||||||
|
for (i = 0; i < VTI (bb)->n_mos; i++)
|
||||||
|
@@ -3098,7 +3256,7 @@ vt_emit_notes (void)
|
||||||
|
delete_variable_part). */
|
||||||
|
emit_notes = true;
|
||||||
|
|
||||||
|
- dataflow_set_init (&empty, 7);
|
||||||
|
+ dataflow_set_init (&empty);
|
||||||
|
last_out = ∅
|
||||||
|
|
||||||
|
FOR_EACH_BB (bb)
|
||||||
|
@@ -3343,14 +3501,6 @@ vt_initialize (void)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
- /* Init the IN and OUT sets. */
|
||||||
|
- FOR_ALL_BB (bb)
|
||||||
|
- {
|
||||||
|
- VTI (bb)->visited = false;
|
||||||
|
- dataflow_set_init (&VTI (bb)->in, 7);
|
||||||
|
- dataflow_set_init (&VTI (bb)->out, 7);
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
attrs_pool = create_alloc_pool ("attrs_def pool",
|
||||||
|
sizeof (struct attrs_def), 1024);
|
||||||
|
var_pool = create_alloc_pool ("variable_def pool",
|
||||||
|
@@ -3358,8 +3508,24 @@ vt_initialize (void)
|
||||||
|
loc_chain_pool = create_alloc_pool ("location_chain_def pool",
|
||||||
|
sizeof (struct location_chain_def),
|
||||||
|
1024);
|
||||||
|
+ shared_hash_pool = create_alloc_pool ("shared_hash_def pool",
|
||||||
|
+ sizeof (struct shared_hash_def), 256);
|
||||||
|
+ empty_shared_hash = (shared_hash) pool_alloc (shared_hash_pool);
|
||||||
|
+ empty_shared_hash->refcount = 1;
|
||||||
|
+ empty_shared_hash->htab
|
||||||
|
+ = htab_create (1, variable_htab_hash, variable_htab_eq,
|
||||||
|
+ variable_htab_free);
|
||||||
|
changed_variables = htab_create (10, variable_htab_hash, variable_htab_eq,
|
||||||
|
- NULL);
|
||||||
|
+ variable_htab_free);
|
||||||
|
+
|
||||||
|
+ /* Init the IN and OUT sets. */
|
||||||
|
+ FOR_ALL_BB (bb)
|
||||||
|
+ {
|
||||||
|
+ VTI (bb)->visited = false;
|
||||||
|
+ dataflow_set_init (&VTI (bb)->in);
|
||||||
|
+ dataflow_set_init (&VTI (bb)->out);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
vt_add_function_parameters ();
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -3381,10 +3547,12 @@ vt_finalize (void)
|
||||||
|
dataflow_set_destroy (&VTI (bb)->out);
|
||||||
|
}
|
||||||
|
free_aux_for_blocks ();
|
||||||
|
+ htab_delete (empty_shared_hash->htab);
|
||||||
|
+ htab_delete (changed_variables);
|
||||||
|
free_alloc_pool (attrs_pool);
|
||||||
|
free_alloc_pool (var_pool);
|
||||||
|
free_alloc_pool (loc_chain_pool);
|
||||||
|
- htab_delete (changed_variables);
|
||||||
|
+ free_alloc_pool (shared_hash_pool);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* The entry point to variable tracking pass. */
|
||||||
|
--- libiberty/hashtab.c (revision 148758)
|
||||||
|
+++ libiberty/hashtab.c (revision 148760)
|
||||||
|
@@ -759,7 +759,8 @@ htab_traverse_noresize (htab_t htab, hta
|
||||||
|
void
|
||||||
|
htab_traverse (htab_t htab, htab_trav callback, PTR info)
|
||||||
|
{
|
||||||
|
- if (htab_elements (htab) * 8 < htab_size (htab))
|
||||||
|
+ size_t size = htab_size (htab);
|
||||||
|
+ if (htab_elements (htab) * 8 < size && size > 32)
|
||||||
|
htab_expand (htab);
|
||||||
|
|
||||||
|
htab_traverse_noresize (htab, callback, info);
|
|
@ -0,0 +1,491 @@
|
||||||
|
2009-06-23 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
|
* var-tracking.c (unshare_variable): Force initialized to
|
||||||
|
be VAR_INIT_STATUS_INITIALIZED unless flag_var_tracking_uninit.
|
||||||
|
(set_variable_part): Likewise.
|
||||||
|
(struct variable_union_info): Remove pos_src field.
|
||||||
|
(vui_vec, vui_allocated): New variables.
|
||||||
|
(variable_union): Pass VAR_INIT_STATUS_UNKNOWN to unshare_variable
|
||||||
|
unconditionally. Avoid XCVECNEW/free for every sorting, for dst_l
|
||||||
|
== 1 use a simpler sorting algorithm. Compute pos field right
|
||||||
|
away, don't fill in pos_src. For dst_l == 2 avoid qsort.
|
||||||
|
Avoid quadratic comparison if !flag_var_tracking_uninit.
|
||||||
|
(variable_canonicalize): Pass VAR_INIT_STATUS_UNKNOWN to
|
||||||
|
unshare_variable unconditionally.
|
||||||
|
(dataflow_set_different_2): Removed.
|
||||||
|
(dataflow_set_different): Don't traverse second hash table.
|
||||||
|
(compute_bb_dataflow): Pass VAR_INIT_STATUS_UNINITIALIZED
|
||||||
|
unconditionally to var_reg_set or var_mem_set.
|
||||||
|
(emit_notes_in_bb): Likewise.
|
||||||
|
(delete_variable_part): Pass VAR_INIT_STATUS_UNKNOWN to
|
||||||
|
unshare_variable.
|
||||||
|
(emit_note_insn_var_location): Don't set initialized to
|
||||||
|
VAR_INIT_STATUS_INITIALIZED early.
|
||||||
|
(vt_finalize): Free vui_vec if needed, clear vui_vec and
|
||||||
|
vui_allocated.
|
||||||
|
|
||||||
|
--- gcc/var-tracking.c (revision 148851)
|
||||||
|
+++ gcc/var-tracking.c (revision 148852)
|
||||||
|
@@ -347,7 +347,6 @@ static void dataflow_set_union (dataflow
|
||||||
|
static bool variable_part_different_p (variable_part *, variable_part *);
|
||||||
|
static bool variable_different_p (variable, variable, bool);
|
||||||
|
static int dataflow_set_different_1 (void **, void *);
|
||||||
|
-static int dataflow_set_different_2 (void **, void *);
|
||||||
|
static bool dataflow_set_different (dataflow_set *, dataflow_set *);
|
||||||
|
static void dataflow_set_destroy (dataflow_set *);
|
||||||
|
|
||||||
|
@@ -878,6 +877,9 @@ unshare_variable (dataflow_set *set, var
|
||||||
|
var->refcount--;
|
||||||
|
new_var->n_var_parts = var->n_var_parts;
|
||||||
|
|
||||||
|
+ if (! flag_var_tracking_uninit)
|
||||||
|
+ initialized = VAR_INIT_STATUS_INITIALIZED;
|
||||||
|
+
|
||||||
|
for (i = 0; i < var->n_var_parts; i++)
|
||||||
|
{
|
||||||
|
location_chain node;
|
||||||
|
@@ -1202,11 +1204,14 @@ struct variable_union_info
|
||||||
|
/* The sum of positions in the input chains. */
|
||||||
|
int pos;
|
||||||
|
|
||||||
|
- /* The position in the chains of SRC and DST dataflow sets. */
|
||||||
|
- int pos_src;
|
||||||
|
+ /* The position in the chain of DST dataflow set. */
|
||||||
|
int pos_dst;
|
||||||
|
};
|
||||||
|
|
||||||
|
+/* Buffer for location list sorting and its allocated size. */
|
||||||
|
+static struct variable_union_info *vui_vec;
|
||||||
|
+static int vui_allocated;
|
||||||
|
+
|
||||||
|
/* Compare function for qsort, order the structures by POS element. */
|
||||||
|
|
||||||
|
static int
|
||||||
|
@@ -1263,14 +1268,9 @@ variable_union (void **slot, void *data)
|
||||||
|
}
|
||||||
|
if (k < src->n_var_parts)
|
||||||
|
{
|
||||||
|
- enum var_init_status status = VAR_INIT_STATUS_UNKNOWN;
|
||||||
|
-
|
||||||
|
- if (! flag_var_tracking_uninit)
|
||||||
|
- status = VAR_INIT_STATUS_INITIALIZED;
|
||||||
|
-
|
||||||
|
if (dstp)
|
||||||
|
*dstp = (void *) src;
|
||||||
|
- unshare_variable (set, src, status);
|
||||||
|
+ unshare_variable (set, src, VAR_INIT_STATUS_UNKNOWN);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
@@ -1311,13 +1311,7 @@ variable_union (void **slot, void *data)
|
||||||
|
|
||||||
|
if ((dst->refcount > 1 || shared_hash_shared (set->vars))
|
||||||
|
&& dst->n_var_parts != k)
|
||||||
|
- {
|
||||||
|
- enum var_init_status status = VAR_INIT_STATUS_UNKNOWN;
|
||||||
|
-
|
||||||
|
- if (! flag_var_tracking_uninit)
|
||||||
|
- status = VAR_INIT_STATUS_INITIALIZED;
|
||||||
|
- dst = unshare_variable (set, dst, status);
|
||||||
|
- }
|
||||||
|
+ dst = unshare_variable (set, dst, VAR_INIT_STATUS_UNKNOWN);
|
||||||
|
|
||||||
|
i = src->n_var_parts - 1;
|
||||||
|
j = dst->n_var_parts - 1;
|
||||||
|
@@ -1366,70 +1360,152 @@ variable_union (void **slot, void *data)
|
||||||
|
dst_l = 0;
|
||||||
|
for (node = dst->var_part[j].loc_chain; node; node = node->next)
|
||||||
|
dst_l++;
|
||||||
|
- vui = XCNEWVEC (struct variable_union_info, src_l + dst_l);
|
||||||
|
|
||||||
|
- /* Fill in the locations from DST. */
|
||||||
|
- for (node = dst->var_part[j].loc_chain, jj = 0; node;
|
||||||
|
- node = node->next, jj++)
|
||||||
|
+ if (dst_l == 1)
|
||||||
|
{
|
||||||
|
- vui[jj].lc = node;
|
||||||
|
- vui[jj].pos_dst = jj;
|
||||||
|
+ /* The most common case, much simpler, no qsort is needed. */
|
||||||
|
+ location_chain dstnode = dst->var_part[j].loc_chain;
|
||||||
|
+ dst->var_part[k].loc_chain = dstnode;
|
||||||
|
+ dst->var_part[k].offset = dst->var_part[j].offset;
|
||||||
|
+ node2 = dstnode;
|
||||||
|
+ for (node = src->var_part[i].loc_chain; node; node = node->next)
|
||||||
|
+ if (!((REG_P (dstnode->loc)
|
||||||
|
+ && REG_P (node->loc)
|
||||||
|
+ && REGNO (dstnode->loc) == REGNO (node->loc))
|
||||||
|
+ || rtx_equal_p (dstnode->loc, node->loc)))
|
||||||
|
+ {
|
||||||
|
+ location_chain new_node;
|
||||||
|
|
||||||
|
- /* Value larger than a sum of 2 valid positions. */
|
||||||
|
- vui[jj].pos_src = src_l + dst_l;
|
||||||
|
+ /* Copy the location from SRC. */
|
||||||
|
+ new_node = (location_chain) pool_alloc (loc_chain_pool);
|
||||||
|
+ new_node->loc = node->loc;
|
||||||
|
+ new_node->init = node->init;
|
||||||
|
+ if (!node->set_src || MEM_P (node->set_src))
|
||||||
|
+ new_node->set_src = NULL;
|
||||||
|
+ else
|
||||||
|
+ new_node->set_src = node->set_src;
|
||||||
|
+ node2->next = new_node;
|
||||||
|
+ node2 = new_node;
|
||||||
|
+ }
|
||||||
|
+ node2->next = NULL;
|
||||||
|
}
|
||||||
|
-
|
||||||
|
- /* Fill in the locations from SRC. */
|
||||||
|
- n = dst_l;
|
||||||
|
- for (node = src->var_part[i].loc_chain, ii = 0; node;
|
||||||
|
- node = node->next, ii++)
|
||||||
|
+ else
|
||||||
|
{
|
||||||
|
- /* Find location from NODE. */
|
||||||
|
- for (jj = 0; jj < dst_l; jj++)
|
||||||
|
+ if (src_l + dst_l > vui_allocated)
|
||||||
|
{
|
||||||
|
- if ((REG_P (vui[jj].lc->loc)
|
||||||
|
- && REG_P (node->loc)
|
||||||
|
- && REGNO (vui[jj].lc->loc) == REGNO (node->loc))
|
||||||
|
- || rtx_equal_p (vui[jj].lc->loc, node->loc))
|
||||||
|
- {
|
||||||
|
- vui[jj].pos_src = ii;
|
||||||
|
- break;
|
||||||
|
- }
|
||||||
|
+ vui_allocated = MAX (vui_allocated * 2, src_l + dst_l);
|
||||||
|
+ vui_vec = XRESIZEVEC (struct variable_union_info, vui_vec,
|
||||||
|
+ vui_allocated);
|
||||||
|
}
|
||||||
|
- if (jj >= dst_l) /* The location has not been found. */
|
||||||
|
+ vui = vui_vec;
|
||||||
|
+
|
||||||
|
+ /* Fill in the locations from DST. */
|
||||||
|
+ for (node = dst->var_part[j].loc_chain, jj = 0; node;
|
||||||
|
+ node = node->next, jj++)
|
||||||
|
{
|
||||||
|
- location_chain new_node;
|
||||||
|
+ vui[jj].lc = node;
|
||||||
|
+ vui[jj].pos_dst = jj;
|
||||||
|
|
||||||
|
- /* Copy the location from SRC. */
|
||||||
|
- new_node = (location_chain) pool_alloc (loc_chain_pool);
|
||||||
|
- new_node->loc = node->loc;
|
||||||
|
- new_node->init = node->init;
|
||||||
|
- if (!node->set_src || MEM_P (node->set_src))
|
||||||
|
- new_node->set_src = NULL;
|
||||||
|
- else
|
||||||
|
- new_node->set_src = node->set_src;
|
||||||
|
- vui[n].lc = new_node;
|
||||||
|
- vui[n].pos_src = ii;
|
||||||
|
- vui[n].pos_dst = src_l + dst_l;
|
||||||
|
- n++;
|
||||||
|
+ /* Pos plus value larger than a sum of 2 valid positions. */
|
||||||
|
+ vui[jj].pos = jj + src_l + dst_l;
|
||||||
|
}
|
||||||
|
- }
|
||||||
|
|
||||||
|
- for (ii = 0; ii < src_l + dst_l; ii++)
|
||||||
|
- vui[ii].pos = vui[ii].pos_src + vui[ii].pos_dst;
|
||||||
|
+ /* Fill in the locations from SRC. */
|
||||||
|
+ n = dst_l;
|
||||||
|
+ for (node = src->var_part[i].loc_chain, ii = 0; node;
|
||||||
|
+ node = node->next, ii++)
|
||||||
|
+ {
|
||||||
|
+ /* Find location from NODE. */
|
||||||
|
+ for (jj = 0; jj < dst_l; jj++)
|
||||||
|
+ {
|
||||||
|
+ if ((REG_P (vui[jj].lc->loc)
|
||||||
|
+ && REG_P (node->loc)
|
||||||
|
+ && REGNO (vui[jj].lc->loc) == REGNO (node->loc))
|
||||||
|
+ || rtx_equal_p (vui[jj].lc->loc, node->loc))
|
||||||
|
+ {
|
||||||
|
+ vui[jj].pos = jj + ii;
|
||||||
|
+ break;
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ if (jj >= dst_l) /* The location has not been found. */
|
||||||
|
+ {
|
||||||
|
+ location_chain new_node;
|
||||||
|
|
||||||
|
- qsort (vui, n, sizeof (struct variable_union_info),
|
||||||
|
- variable_union_info_cmp_pos);
|
||||||
|
+ /* Copy the location from SRC. */
|
||||||
|
+ new_node = (location_chain) pool_alloc (loc_chain_pool);
|
||||||
|
+ new_node->loc = node->loc;
|
||||||
|
+ new_node->init = node->init;
|
||||||
|
+ if (!node->set_src || MEM_P (node->set_src))
|
||||||
|
+ new_node->set_src = NULL;
|
||||||
|
+ else
|
||||||
|
+ new_node->set_src = node->set_src;
|
||||||
|
+ vui[n].lc = new_node;
|
||||||
|
+ vui[n].pos_dst = src_l + dst_l;
|
||||||
|
+ vui[n].pos = ii + src_l + dst_l;
|
||||||
|
+ n++;
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
|
||||||
|
- /* Reconnect the nodes in sorted order. */
|
||||||
|
- for (ii = 1; ii < n; ii++)
|
||||||
|
- vui[ii - 1].lc->next = vui[ii].lc;
|
||||||
|
- vui[n - 1].lc->next = NULL;
|
||||||
|
+ if (dst_l == 2)
|
||||||
|
+ {
|
||||||
|
+ /* Special case still very common case. For dst_l == 2
|
||||||
|
+ all entries dst_l ... n-1 are sorted, with for i >= dst_l
|
||||||
|
+ vui[i].pos == i + src_l + dst_l. */
|
||||||
|
+ if (vui[0].pos > vui[1].pos)
|
||||||
|
+ {
|
||||||
|
+ /* Order should be 1, 0, 2... */
|
||||||
|
+ dst->var_part[k].loc_chain = vui[1].lc;
|
||||||
|
+ vui[1].lc->next = vui[0].lc;
|
||||||
|
+ if (n >= 3)
|
||||||
|
+ {
|
||||||
|
+ vui[0].lc->next = vui[2].lc;
|
||||||
|
+ vui[n - 1].lc->next = NULL;
|
||||||
|
+ }
|
||||||
|
+ else
|
||||||
|
+ vui[0].lc->next = NULL;
|
||||||
|
+ ii = 3;
|
||||||
|
+ }
|
||||||
|
+ else
|
||||||
|
+ {
|
||||||
|
+ dst->var_part[k].loc_chain = vui[0].lc;
|
||||||
|
+ if (n >= 3 && vui[2].pos < vui[1].pos)
|
||||||
|
+ {
|
||||||
|
+ /* Order should be 0, 2, 1, 3... */
|
||||||
|
+ vui[0].lc->next = vui[2].lc;
|
||||||
|
+ vui[2].lc->next = vui[1].lc;
|
||||||
|
+ if (n >= 4)
|
||||||
|
+ {
|
||||||
|
+ vui[1].lc->next = vui[3].lc;
|
||||||
|
+ vui[n - 1].lc->next = NULL;
|
||||||
|
+ }
|
||||||
|
+ else
|
||||||
|
+ vui[1].lc->next = NULL;
|
||||||
|
+ ii = 4;
|
||||||
|
+ }
|
||||||
|
+ else
|
||||||
|
+ {
|
||||||
|
+ /* Order should be 0, 1, 2... */
|
||||||
|
+ ii = 1;
|
||||||
|
+ vui[n - 1].lc->next = NULL;
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ for (; ii < n; ii++)
|
||||||
|
+ vui[ii - 1].lc->next = vui[ii].lc;
|
||||||
|
+ }
|
||||||
|
+ else
|
||||||
|
+ {
|
||||||
|
+ qsort (vui, n, sizeof (struct variable_union_info),
|
||||||
|
+ variable_union_info_cmp_pos);
|
||||||
|
|
||||||
|
- dst->var_part[k].loc_chain = vui[0].lc;
|
||||||
|
- dst->var_part[k].offset = dst->var_part[j].offset;
|
||||||
|
+ /* Reconnect the nodes in sorted order. */
|
||||||
|
+ for (ii = 1; ii < n; ii++)
|
||||||
|
+ vui[ii - 1].lc->next = vui[ii].lc;
|
||||||
|
+ vui[n - 1].lc->next = NULL;
|
||||||
|
+ dst->var_part[k].loc_chain = vui[0].lc;
|
||||||
|
+ }
|
||||||
|
|
||||||
|
- free (vui);
|
||||||
|
+ dst->var_part[k].offset = dst->var_part[j].offset;
|
||||||
|
+ }
|
||||||
|
i--;
|
||||||
|
j--;
|
||||||
|
}
|
||||||
|
@@ -1477,17 +1553,18 @@ variable_union (void **slot, void *data)
|
||||||
|
dst->var_part[k].cur_loc = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
- for (i = 0; i < src->n_var_parts && i < dst->n_var_parts; i++)
|
||||||
|
- {
|
||||||
|
- location_chain node, node2;
|
||||||
|
- for (node = src->var_part[i].loc_chain; node; node = node->next)
|
||||||
|
- for (node2 = dst->var_part[i].loc_chain; node2; node2 = node2->next)
|
||||||
|
- if (rtx_equal_p (node->loc, node2->loc))
|
||||||
|
- {
|
||||||
|
- if (node->init > node2->init)
|
||||||
|
- node2->init = node->init;
|
||||||
|
- }
|
||||||
|
- }
|
||||||
|
+ if (flag_var_tracking_uninit)
|
||||||
|
+ for (i = 0; i < src->n_var_parts && i < dst->n_var_parts; i++)
|
||||||
|
+ {
|
||||||
|
+ location_chain node, node2;
|
||||||
|
+ for (node = src->var_part[i].loc_chain; node; node = node->next)
|
||||||
|
+ for (node2 = dst->var_part[i].loc_chain; node2; node2 = node2->next)
|
||||||
|
+ if (rtx_equal_p (node->loc, node2->loc))
|
||||||
|
+ {
|
||||||
|
+ if (node->init > node2->init)
|
||||||
|
+ node2->init = node->init;
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
|
||||||
|
/* Continue traversing the hash table. */
|
||||||
|
return 1;
|
||||||
|
@@ -1522,14 +1599,7 @@ variable_canonicalize (void **slot, void
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (k < src->n_var_parts)
|
||||||
|
- {
|
||||||
|
- enum var_init_status status = VAR_INIT_STATUS_UNKNOWN;
|
||||||
|
-
|
||||||
|
- if (! flag_var_tracking_uninit)
|
||||||
|
- status = VAR_INIT_STATUS_INITIALIZED;
|
||||||
|
-
|
||||||
|
- unshare_variable (set, src, status);
|
||||||
|
- }
|
||||||
|
+ unshare_variable (set, src, VAR_INIT_STATUS_UNKNOWN);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -1650,34 +1720,6 @@ dataflow_set_different_1 (void **slot, v
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
-/* Compare variable *SLOT with the same variable in hash table DATA
|
||||||
|
- and set DATAFLOW_SET_DIFFERENT_VALUE if they are different. */
|
||||||
|
-
|
||||||
|
-static int
|
||||||
|
-dataflow_set_different_2 (void **slot, void *data)
|
||||||
|
-{
|
||||||
|
- htab_t htab = (htab_t) data;
|
||||||
|
- variable var1, var2;
|
||||||
|
-
|
||||||
|
- var1 = *(variable *) slot;
|
||||||
|
- var2 = (variable) htab_find_with_hash (htab, var1->decl,
|
||||||
|
- VARIABLE_HASH_VAL (var1->decl));
|
||||||
|
- if (!var2)
|
||||||
|
- {
|
||||||
|
- dataflow_set_different_value = true;
|
||||||
|
-
|
||||||
|
- /* Stop traversing the hash table. */
|
||||||
|
- return 0;
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- /* If both variables are defined they have been already checked for
|
||||||
|
- equivalence. */
|
||||||
|
- gcc_assert (!variable_different_p (var1, var2, false));
|
||||||
|
-
|
||||||
|
- /* Continue traversing the hash table. */
|
||||||
|
- return 1;
|
||||||
|
-}
|
||||||
|
-
|
||||||
|
/* Return true if dataflow sets OLD_SET and NEW_SET differ. */
|
||||||
|
|
||||||
|
static bool
|
||||||
|
@@ -1694,14 +1736,9 @@ dataflow_set_different (dataflow_set *ol
|
||||||
|
|
||||||
|
htab_traverse (shared_hash_htab (old_set->vars), dataflow_set_different_1,
|
||||||
|
shared_hash_htab (new_set->vars));
|
||||||
|
- if (!dataflow_set_different_value)
|
||||||
|
- {
|
||||||
|
- /* We have compared the variables which are in both hash tables
|
||||||
|
- so now only check whether there are some variables in NEW_SET->VARS
|
||||||
|
- which are not in OLD_SET->VARS. */
|
||||||
|
- htab_traverse (shared_hash_htab (new_set->vars), dataflow_set_different_2,
|
||||||
|
- shared_hash_htab (old_set->vars));
|
||||||
|
- }
|
||||||
|
+ /* No need to traverse the second hashtab, if both have the same number
|
||||||
|
+ of elements and the second one had all entries found in the first one,
|
||||||
|
+ then it can't have any extra entries. */
|
||||||
|
return dataflow_set_different_value;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -2215,15 +2252,11 @@ compute_bb_dataflow (basic_block bb)
|
||||||
|
case MO_USE:
|
||||||
|
{
|
||||||
|
rtx loc = VTI (bb)->mos[i].u.loc;
|
||||||
|
- enum var_init_status status = VAR_INIT_STATUS_UNINITIALIZED;
|
||||||
|
-
|
||||||
|
- if (! flag_var_tracking_uninit)
|
||||||
|
- status = VAR_INIT_STATUS_INITIALIZED;
|
||||||
|
|
||||||
|
if (GET_CODE (loc) == REG)
|
||||||
|
- var_reg_set (out, loc, status, NULL);
|
||||||
|
+ var_reg_set (out, loc, VAR_INIT_STATUS_UNINITIALIZED, NULL);
|
||||||
|
else if (GET_CODE (loc) == MEM)
|
||||||
|
- var_mem_set (out, loc, status, NULL);
|
||||||
|
+ var_mem_set (out, loc, VAR_INIT_STATUS_UNINITIALIZED, NULL);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
@@ -2262,10 +2295,12 @@ compute_bb_dataflow (basic_block bb)
|
||||||
|
if (! flag_var_tracking_uninit)
|
||||||
|
src_status = VAR_INIT_STATUS_INITIALIZED;
|
||||||
|
else
|
||||||
|
- src_status = find_src_status (in, set_src);
|
||||||
|
+ {
|
||||||
|
+ src_status = find_src_status (in, set_src);
|
||||||
|
|
||||||
|
- if (src_status == VAR_INIT_STATUS_UNKNOWN)
|
||||||
|
- src_status = find_src_status (out, set_src);
|
||||||
|
+ if (src_status == VAR_INIT_STATUS_UNKNOWN)
|
||||||
|
+ src_status = find_src_status (out, set_src);
|
||||||
|
+ }
|
||||||
|
|
||||||
|
set_src = find_src_set_src (in, set_src);
|
||||||
|
|
||||||
|
@@ -2609,6 +2644,9 @@ set_variable_part (dataflow_set *set, rt
|
||||||
|
variable var;
|
||||||
|
void **slot = shared_hash_find_slot (set->vars, decl);
|
||||||
|
|
||||||
|
+ if (! flag_var_tracking_uninit)
|
||||||
|
+ initialized = VAR_INIT_STATUS_INITIALIZED;
|
||||||
|
+
|
||||||
|
if (!slot || !*slot)
|
||||||
|
{
|
||||||
|
if (!slot)
|
||||||
|
@@ -2815,10 +2853,8 @@ delete_variable_part (dataflow_set *set,
|
||||||
|
&& REGNO (node->loc) == REGNO (loc))
|
||||||
|
|| rtx_equal_p (node->loc, loc))
|
||||||
|
{
|
||||||
|
- enum var_init_status status = VAR_INIT_STATUS_UNKNOWN;
|
||||||
|
- if (! flag_var_tracking_uninit)
|
||||||
|
- status = VAR_INIT_STATUS_INITIALIZED;
|
||||||
|
- var = unshare_variable (set, var, status);
|
||||||
|
+ var = unshare_variable (set, var,
|
||||||
|
+ VAR_INIT_STATUS_UNKNOWN);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@@ -2893,9 +2929,6 @@ emit_note_insn_var_location (void **varp
|
||||||
|
|
||||||
|
gcc_assert (var->decl);
|
||||||
|
|
||||||
|
- if (! flag_var_tracking_uninit)
|
||||||
|
- initialized = VAR_INIT_STATUS_INITIALIZED;
|
||||||
|
-
|
||||||
|
complete = true;
|
||||||
|
last_limit = 0;
|
||||||
|
n_var_parts = 0;
|
||||||
|
@@ -3148,14 +3181,11 @@ emit_notes_in_bb (basic_block bb)
|
||||||
|
case MO_USE:
|
||||||
|
{
|
||||||
|
rtx loc = VTI (bb)->mos[i].u.loc;
|
||||||
|
-
|
||||||
|
- enum var_init_status status = VAR_INIT_STATUS_UNINITIALIZED;
|
||||||
|
- if (! flag_var_tracking_uninit)
|
||||||
|
- status = VAR_INIT_STATUS_INITIALIZED;
|
||||||
|
+
|
||||||
|
if (GET_CODE (loc) == REG)
|
||||||
|
- var_reg_set (&set, loc, status, NULL);
|
||||||
|
+ var_reg_set (&set, loc, VAR_INIT_STATUS_UNINITIALIZED, NULL);
|
||||||
|
else
|
||||||
|
- var_mem_set (&set, loc, status, NULL);
|
||||||
|
+ var_mem_set (&set, loc, VAR_INIT_STATUS_UNINITIALIZED, NULL);
|
||||||
|
|
||||||
|
emit_notes_for_changes (insn, EMIT_NOTE_AFTER_INSN);
|
||||||
|
}
|
||||||
|
@@ -3553,6 +3583,10 @@ vt_finalize (void)
|
||||||
|
free_alloc_pool (var_pool);
|
||||||
|
free_alloc_pool (loc_chain_pool);
|
||||||
|
free_alloc_pool (shared_hash_pool);
|
||||||
|
+ if (vui_vec)
|
||||||
|
+ free (vui_vec);
|
||||||
|
+ vui_vec = NULL;
|
||||||
|
+ vui_allocated = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* The entry point to variable tracking pass. */
|
|
@ -0,0 +1,46 @@
|
||||||
|
2009-05-27 Tom Tromey <tromey@redhat.com>
|
||||||
|
|
||||||
|
* unwind-dw2.c (_Unwind_DebugHook): New function.
|
||||||
|
(uw_install_context): Call _Unwind_DebugHook.
|
||||||
|
|
||||||
|
--- gcc/unwind-dw2.c (revision 147933)
|
||||||
|
+++ gcc/unwind-dw2.c (revision 147934)
|
||||||
|
@@ -1473,18 +1473,31 @@ uw_init_context_1 (struct _Unwind_Contex
|
||||||
|
context->ra = __builtin_extract_return_addr (outer_ra);
|
||||||
|
}
|
||||||
|
|
||||||
|
+static void _Unwind_DebugHook (void *, void *) __attribute__ ((__noinline__));
|
||||||
|
+
|
||||||
|
+/* This function is called during unwinding. It is intended as a hook
|
||||||
|
+ for a debugger to intercept exceptions. CFA is the CFA of the
|
||||||
|
+ target frame. HANDLER is the PC to which control will be
|
||||||
|
+ transferred. */
|
||||||
|
+static void
|
||||||
|
+_Unwind_DebugHook (void *cfa __attribute__ ((__unused__)),
|
||||||
|
+ void *handler __attribute__ ((__unused__)))
|
||||||
|
+{
|
||||||
|
+ asm ("");
|
||||||
|
+}
|
||||||
|
|
||||||
|
/* Install TARGET into CURRENT so that we can return to it. This is a
|
||||||
|
macro because __builtin_eh_return must be invoked in the context of
|
||||||
|
our caller. */
|
||||||
|
|
||||||
|
-#define uw_install_context(CURRENT, TARGET) \
|
||||||
|
- do \
|
||||||
|
- { \
|
||||||
|
- long offset = uw_install_context_1 ((CURRENT), (TARGET)); \
|
||||||
|
- void *handler = __builtin_frob_return_addr ((TARGET)->ra); \
|
||||||
|
- __builtin_eh_return (offset, handler); \
|
||||||
|
- } \
|
||||||
|
+#define uw_install_context(CURRENT, TARGET) \
|
||||||
|
+ do \
|
||||||
|
+ { \
|
||||||
|
+ long offset = uw_install_context_1 ((CURRENT), (TARGET)); \
|
||||||
|
+ void *handler = __builtin_frob_return_addr ((TARGET)->ra); \
|
||||||
|
+ _Unwind_DebugHook ((TARGET)->cfa, handler); \
|
||||||
|
+ __builtin_eh_return (offset, handler); \
|
||||||
|
+ } \
|
||||||
|
while (0)
|
||||||
|
|
||||||
|
static long
|
|
@ -1 +0,0 @@
|
||||||
gcc-4_4_0-0_3:HEAD:gcc-4.4.0-0.3.src.rpm:1232130841
|
|
Loading…
Reference in New Issue