From: Sascha Wildner Date: Mon, 4 Apr 2011 00:45:07 +0000 (+0200) Subject: Upgrade GCC from 4.4.2 to 4.4.5 on the vendor branch. X-Git-Tag: v2.11.0~107^2 X-Git-Url: https://gitweb.dragonflybsd.org/dragonfly.git/commitdiff_plain/4b1e227d171bdc6e8a9d3d9dfe7dde140c14b2ca Upgrade GCC from 4.4.2 to 4.4.5 on the vendor branch. --- diff --git a/contrib/gcc-4.4/LAST_UPDATED b/contrib/gcc-4.4/LAST_UPDATED index 555a737866..0910906542 100644 --- a/contrib/gcc-4.4/LAST_UPDATED +++ b/contrib/gcc-4.4/LAST_UPDATED @@ -1 +1 @@ -Obtained from SVN: tags/gcc_4_4_2_release revision 152840 +Obtained from SVN: tags/gcc_4_4_5_release revision 164871 diff --git a/contrib/gcc-4.4/config.guess b/contrib/gcc-4.4/config.guess index aeb53233ec..d53e309f4b 100755 --- a/contrib/gcc-4.4/config.guess +++ b/contrib/gcc-4.4/config.guess @@ -1,10 +1,10 @@ #! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 # Free Software Foundation, Inc. -timestamp='2008-12-18' +timestamp='2009-11-19' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -27,16 +27,16 @@ timestamp='2008-12-18' # the same distribution terms that you use for the rest of that program. -# Originally written by Per Bothner . -# Please send patches to . Submit a context -# diff and a properly formatted ChangeLog entry. +# Originally written by Per Bothner. Please send patches (context +# diff format) to and include a ChangeLog +# entry. # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and # exits with 0. Otherwise, it exits with 1. # -# The plan is that this can be called by configure scripts if you -# don't specify an explicit build system type. +# You can get the latest version of this script from: +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD me=`echo "$0" | sed -e 's,.*/,,'` @@ -170,7 +170,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep __ELF__ >/dev/null + | grep -q __ELF__ then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? @@ -324,6 +324,9 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7; exit ;; esac ;; + s390x:SunOS:*:*) + echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; @@ -653,7 +656,7 @@ EOF # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | - grep __LP64__ >/dev/null + grep -q __LP64__ then HP_ARCH="hppa2.0w" else @@ -804,12 +807,12 @@ EOF i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; - *:Interix*:[3456]*) + *:Interix*:*) case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; - EM64T | authenticamd | genuineintel) + authenticamd | genuineintel | EM64T) echo x86_64-unknown-interix${UNAME_RELEASE} exit ;; IA64) @@ -819,6 +822,9 @@ EOF [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; + 8664:Windows_NT:*) + echo x86_64-pc-mks + exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we @@ -848,6 +854,20 @@ EOF i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; + alpha:Linux:*:*) + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + EV5) UNAME_MACHINE=alphaev5 ;; + EV56) UNAME_MACHINE=alphaev56 ;; + PCA56) UNAME_MACHINE=alphapca56 ;; + PCA57) UNAME_MACHINE=alphapca56 ;; + EV6) UNAME_MACHINE=alphaev6 ;; + EV67) UNAME_MACHINE=alphaev67 ;; + EV68*) UNAME_MACHINE=alphaev68 ;; + esac + objdump --private-headers /bin/sh | grep -q ld.so.1 + if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi + echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} + exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ @@ -870,6 +890,17 @@ EOF frv:Linux:*:*) echo frv-unknown-linux-gnu exit ;; + i*86:Linux:*:*) + LIBC=gnu + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #ifdef __dietlibc__ + LIBC=dietlibc + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` + echo "${UNAME_MACHINE}-pc-linux-${LIBC}" + exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; @@ -879,78 +910,34 @@ EOF m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; - mips:Linux:*:*) + mips:Linux:*:* | mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU - #undef mips - #undef mipsel + #undef ${UNAME_MACHINE} + #undef ${UNAME_MACHINE}el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=mipsel + CPU=${UNAME_MACHINE}el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=mips + CPU=${UNAME_MACHINE} #else CPU= #endif #endif EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^CPU/{ - s: ::g - p - }'`" - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } - ;; - mips64:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #undef CPU - #undef mips64 - #undef mips64el - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=mips64el - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=mips64 - #else - CPU= - #endif - #endif -EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^CPU/{ - s: ::g - p - }'`" + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; or32:Linux:*:*) echo or32-unknown-linux-gnu exit ;; - ppc:Linux:*:*) - echo powerpc-unknown-linux-gnu - exit ;; - ppc64:Linux:*:*) - echo powerpc64-unknown-linux-gnu - exit ;; - alpha:Linux:*:*) - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in - EV5) UNAME_MACHINE=alphaev5 ;; - EV56) UNAME_MACHINE=alphaev56 ;; - PCA56) UNAME_MACHINE=alphapca56 ;; - PCA57) UNAME_MACHINE=alphapca56 ;; - EV6) UNAME_MACHINE=alphaev6 ;; - EV67) UNAME_MACHINE=alphaev67 ;; - EV68*) UNAME_MACHINE=alphaev68 ;; - esac - objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null - if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} - exit ;; padre:Linux:*:*) echo sparc-unknown-linux-gnu exit ;; + parisc64:Linux:*:* | hppa64:Linux:*:*) + echo hppa64-unknown-linux-gnu + exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in @@ -959,8 +946,11 @@ EOF *) echo hppa-unknown-linux-gnu ;; esac exit ;; - parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-gnu + ppc64:Linux:*:*) + echo powerpc64-unknown-linux-gnu + exit ;; + ppc:Linux:*:*) + echo powerpc-unknown-linux-gnu exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux @@ -983,66 +973,6 @@ EOF xtensa*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; - i*86:Linux:*:*) - # The BFD linker knows what the default object file format is, so - # first see if it will tell us. cd to the root directory to prevent - # problems with other programs or directories called `ld' in the path. - # Set LC_ALL=C to ensure ld outputs messages in English. - ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ - | sed -ne '/supported targets:/!d - s/[ ][ ]*/ /g - s/.*supported targets: *// - s/ .*// - p'` - case "$ld_supported_targets" in - elf32-i386) - TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" - ;; - a.out-i386-linux) - echo "${UNAME_MACHINE}-pc-linux-gnuaout" - exit ;; - "") - # Either a pre-BFD a.out linker (linux-gnuoldld) or - # one that does not give us useful --help. - echo "${UNAME_MACHINE}-pc-linux-gnuoldld" - exit ;; - esac - # Determine whether the default compiler is a.out or elf - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - #ifdef __ELF__ - # ifdef __GLIBC__ - # if __GLIBC__ >= 2 - LIBC=gnu - # else - LIBC=gnulibc1 - # endif - # else - LIBC=gnulibc1 - # endif - #else - #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) - LIBC=gnu - #else - LIBC=gnuaout - #endif - #endif - #ifdef __dietlibc__ - LIBC=dietlibc - #endif -EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^LIBC/{ - s: ::g - p - }'`" - test x"${LIBC}" != x && { - echo "${UNAME_MACHINE}-pc-linux-${LIBC}" - exit - } - test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } - ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both @@ -1071,7 +1001,7 @@ EOF i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit ;; - i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) @@ -1115,8 +1045,11 @@ EOF pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about - # the processor, so we play safe by assuming i386. - echo i386-pc-msdosdjgpp + # the processor, so we play safe by assuming i586. + # Note: whatever this is, it MUST be the same as what config.sub + # prints for the "djgpp" host, or else GDB configury will decide that + # this is a cross-build. + echo i586-pc-msdosdjgpp exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 @@ -1154,6 +1087,16 @@ EOF 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; + NCR*:*:4.2:* | MPRAS*:*:4.2:*) + OS_REL='.3' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit ;; @@ -1166,7 +1109,7 @@ EOF rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit ;; - PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) @@ -1259,6 +1202,16 @@ EOF *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown case $UNAME_PROCESSOR in + i386) + eval $set_cc_for_build + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + UNAME_PROCESSOR="x86_64" + fi + fi ;; unknown) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} @@ -1340,6 +1293,9 @@ EOF i*86:rdos:*:*) echo ${UNAME_MACHINE}-pc-rdos exit ;; + i*86:AROS:*:*) + echo ${UNAME_MACHINE}-pc-aros + exit ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 diff --git a/contrib/gcc-4.4/config.sub b/contrib/gcc-4.4/config.sub index 9489dc7867..17c91458a8 100755 --- a/contrib/gcc-4.4/config.sub +++ b/contrib/gcc-4.4/config.sub @@ -1,10 +1,10 @@ #! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 # Free Software Foundation, Inc. -timestamp='2008-12-11' +timestamp='2009-11-07' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software @@ -32,13 +32,16 @@ timestamp='2008-12-11' # Please send patches to . Submit a context -# diff and a properly formatted ChangeLog entry. +# diff and a properly formatted GNU ChangeLog entry. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. +# You can get the latest version of this script from: +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD + # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. @@ -122,6 +125,7 @@ maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ + kopensolaris*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` @@ -148,10 +152,13 @@ case $os in -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple | -axis | -knuth | -cray) + -apple | -axis | -knuth | -cray | -microblaze) os= basic_machine=$1 ;; + -bluegene*) + os=-cnk + ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 @@ -271,6 +278,7 @@ case $basic_machine in | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ + | moxie \ | mt \ | msp430 \ | nios | nios2 \ @@ -279,6 +287,7 @@ case $basic_machine in | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ + | rx \ | score \ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ @@ -286,13 +295,14 @@ case $basic_machine in | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | spu | strongarm \ | tahoe | thumb | tic4x | tic80 | tron \ + | ubicom32 \ | v850 | v850e \ | we32k \ | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ | z8k | z80) basic_machine=$basic_machine-unknown ;; - m6811 | m68hc11 | m6812 | m68hc12) + m6811 | m68hc11 | m6812 | m68hc12 | picochip) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown os=-none @@ -335,7 +345,7 @@ case $basic_machine in | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ + | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ @@ -363,7 +373,7 @@ case $basic_machine in | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ - | romp-* | rs6000-* \ + | romp-* | rs6000-* | rx-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ @@ -372,6 +382,7 @@ case $basic_machine in | tahoe-* | thumb-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \ | tron-* \ + | ubicom32-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ @@ -445,6 +456,10 @@ case $basic_machine in basic_machine=m68k-apollo os=-bsd ;; + aros) + basic_machine=i386-pc + os=-aros + ;; aux) basic_machine=m68k-apple os=-aux @@ -461,6 +476,10 @@ case $basic_machine in basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; + bluegene*) + basic_machine=powerpc-ibm + os=-cnk + ;; c90) basic_machine=c90-cray os=-unicos @@ -713,6 +732,9 @@ case $basic_machine in basic_machine=ns32k-utek os=-sysv ;; + microblaze) + basic_machine=microblaze-xilinx + ;; mingw32) basic_machine=i386-pc os=-mingw32 @@ -1254,10 +1276,11 @@ case $os in # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ - | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ + | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ + | -kopensolaris* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ - | -aos* \ + | -aos* | -aros* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ @@ -1276,7 +1299,7 @@ case $os in | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ - | -skyos* | -haiku* | -rdos* | -toppers* | -drops*) + | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) @@ -1606,7 +1629,7 @@ case $basic_machine in -sunos*) vendor=sun ;; - -aix*) + -cnk*|-aix*) vendor=ibm ;; -beos*) diff --git a/contrib/gcc-4.4/configure b/contrib/gcc-4.4/configure index 8d2f7fb961..2925c1affc 100755 --- a/contrib/gcc-4.4/configure +++ b/contrib/gcc-4.4/configure @@ -7719,7 +7719,7 @@ fi done if test -z "$ac_cv_prog_RANLIB" ; then - RANLIB=":" + RANLIB="true" fi @@ -7849,7 +7849,7 @@ fi done if test -z "$ac_cv_prog_STRIP" ; then - STRIP=":" + STRIP="true" fi diff --git a/contrib/gcc-4.4/configure.ac b/contrib/gcc-4.4/configure.ac index f09ebb2765..2d00eb7fdd 100644 --- a/contrib/gcc-4.4/configure.ac +++ b/contrib/gcc-4.4/configure.ac @@ -1,6 +1,6 @@ # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -# 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 +# Free Software Foundation, Inc. # # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -2764,8 +2764,8 @@ NCN_STRICT_CHECK_TOOLS(DLLTOOL, dlltool) NCN_STRICT_CHECK_TOOLS(LD, ld) NCN_STRICT_CHECK_TOOLS(LIPO, lipo) NCN_STRICT_CHECK_TOOLS(NM, nm) -NCN_STRICT_CHECK_TOOLS(RANLIB, ranlib, :) -NCN_STRICT_CHECK_TOOLS(STRIP, strip, :) +NCN_STRICT_CHECK_TOOLS(RANLIB, ranlib, true) +NCN_STRICT_CHECK_TOOLS(STRIP, strip, true) NCN_STRICT_CHECK_TOOLS(WINDRES, windres) NCN_STRICT_CHECK_TOOLS(WINDMC, windmc) NCN_STRICT_CHECK_TOOLS(OBJCOPY, objcopy) @@ -2801,7 +2801,7 @@ ACX_CHECK_INSTALLED_TARGET_TOOL(LD_FOR_TARGET, ld) ACX_CHECK_INSTALLED_TARGET_TOOL(LIPO_FOR_TARGET, lipo) ACX_CHECK_INSTALLED_TARGET_TOOL(NM_FOR_TARGET, nm) ACX_CHECK_INSTALLED_TARGET_TOOL(OBJDUMP_FOR_TARGET, objdump) -ACX_CHECK_INSTALLED_TARGET_TOOL(RANLIB_FOR_TARGET, ranlib, :) +ACX_CHECK_INSTALLED_TARGET_TOOL(RANLIB_FOR_TARGET, ranlib) ACX_CHECK_INSTALLED_TARGET_TOOL(STRIP_FOR_TARGET, strip) ACX_CHECK_INSTALLED_TARGET_TOOL(WINDRES_FOR_TARGET, windres) ACX_CHECK_INSTALLED_TARGET_TOOL(WINDMC_FOR_TARGET, windmc) diff --git a/contrib/gcc-4.4/gcc/BASE-VER b/contrib/gcc-4.4/gcc/BASE-VER index 1d068c6ec6..fa1ba0458a 100644 --- a/contrib/gcc-4.4/gcc/BASE-VER +++ b/contrib/gcc-4.4/gcc/BASE-VER @@ -1 +1 @@ -4.4.2 +4.4.5 diff --git a/contrib/gcc-4.4/gcc/DATESTAMP b/contrib/gcc-4.4/gcc/DATESTAMP index e144899879..ee7bcadf81 100644 --- a/contrib/gcc-4.4/gcc/DATESTAMP +++ b/contrib/gcc-4.4/gcc/DATESTAMP @@ -1 +1 @@ -20091015 +20101001 diff --git a/contrib/gcc-4.4/gcc/Makefile.in b/contrib/gcc-4.4/gcc/Makefile.in index 2e57082c7b..727028436c 100644 --- a/contrib/gcc-4.4/gcc/Makefile.in +++ b/contrib/gcc-4.4/gcc/Makefile.in @@ -3,7 +3,7 @@ # Copyright (C) 1987, 1988, 1990, 1991, 1992, 1993, 1994, 1995, 1996, # 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -# 2008, 2009 Free Software Foundation, Inc. +# 2008, 2009, 2010 Free Software Foundation, Inc. #This file is part of GCC. @@ -2514,7 +2514,7 @@ expr.o : expr.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \ tree-pass.h $(DF_H) $(DIAGNOSTIC_H) vecprim.h dojump.o : dojump.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(TREE_H) \ $(FLAGS_H) $(FUNCTION_H) $(EXPR_H) $(OPTABS_H) $(INSN_ATTR_H) insn-config.h \ - langhooks.h $(GGC_H) gt-dojump.h vecprim.h $(BASIC_BLOCK_H) + langhooks.h $(GGC_H) gt-dojump.h vecprim.h $(BASIC_BLOCK_H) output.h builtins.o : builtins.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \ $(TREE_H) $(GIMPLE_H) $(FLAGS_H) $(TARGET_H) $(FUNCTION_H) $(REGS_H) \ $(EXPR_H) $(OPTABS_H) insn-config.h $(RECOG_H) output.h typeclass.h \ @@ -2718,7 +2718,7 @@ tree-switch-conversion.o : tree-switch-conversion.c $(CONFIG_H) $(SYSTEM_H) \ $(TREE_H) $(TM_P_H) $(TREE_FLOW_H) $(DIAGNOSTIC_H) $(TREE_INLINE_H) \ $(TIMEVAR_H) $(TM_H) coretypes.h $(TREE_DUMP_H) $(GIMPLE_H) \ tree-pass.h $(FLAGS_H) $(EXPR_H) $(BASIC_BLOCK_H) output.h \ - $(GGC_H) $(OBSTACK_H) $(PARAMS_H) $(CPPLIB_H) $(PARAMS_H) + $(GGC_H) $(OBSTACK_H) $(PARAMS_H) $(CPPLIB_H) $(PARAMS_H) langhooks.h tree-complex.o : tree-complex.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TREE_H) \ $(TM_H) $(RTL_H) $(REAL_H) $(FLAGS_H) $(TREE_FLOW_H) $(GIMPLE_H) \ tree-iterator.h tree-pass.h tree-ssa-propagate.h $(DIAGNOSTIC_H) diff --git a/contrib/gcc-4.4/gcc/alias.c b/contrib/gcc-4.4/gcc/alias.c index ea28fce0fd..3e55d8d4c2 100644 --- a/contrib/gcc-4.4/gcc/alias.c +++ b/contrib/gcc-4.4/gcc/alias.c @@ -2043,6 +2043,13 @@ nonoverlapping_memrefs_p (const_rtx x, const_rtx y) if (exprx == 0 || expry == 0) return 0; + /* For spill-slot accesses make sure we have valid offsets. */ + if ((exprx == get_spill_slot_decl (false) + && ! MEM_OFFSET (x)) + || (expry == get_spill_slot_decl (false) + && ! MEM_OFFSET (y))) + return 0; + /* If both are field references, we may be able to determine something. */ if (TREE_CODE (exprx) == COMPONENT_REF && TREE_CODE (expry) == COMPONENT_REF @@ -2214,8 +2221,18 @@ true_dependence (const_rtx mem, enum machine_mode mem_mode, const_rtx x, if (mem_mode == VOIDmode) mem_mode = GET_MODE (mem); - x_addr = get_addr (XEXP (x, 0)); - mem_addr = get_addr (XEXP (mem, 0)); + x_addr = XEXP (x, 0); + mem_addr = XEXP (mem, 0); + if (!((GET_CODE (x_addr) == VALUE + && GET_CODE (mem_addr) != VALUE + && reg_mentioned_p (x_addr, mem_addr)) + || (GET_CODE (x_addr) != VALUE + && GET_CODE (mem_addr) == VALUE + && reg_mentioned_p (mem_addr, x_addr)))) + { + x_addr = get_addr (x_addr); + mem_addr = get_addr (mem_addr); + } base = find_base_term (x_addr); if (base && (GET_CODE (base) == LABEL_REF @@ -2287,7 +2304,16 @@ canon_true_dependence (const_rtx mem, enum machine_mode mem_mode, rtx mem_addr, return 0; if (! x_addr) - x_addr = get_addr (XEXP (x, 0)); + { + x_addr = XEXP (x, 0); + if (!((GET_CODE (x_addr) == VALUE + && GET_CODE (mem_addr) != VALUE + && reg_mentioned_p (x_addr, mem_addr)) + || (GET_CODE (x_addr) != VALUE + && GET_CODE (mem_addr) == VALUE + && reg_mentioned_p (mem_addr, x_addr)))) + x_addr = get_addr (x_addr); + } if (! base_alias_check (x_addr, mem_addr, GET_MODE (x), mem_mode)) return 0; @@ -2347,8 +2373,18 @@ write_dependence_p (const_rtx mem, const_rtx x, int writep) if (nonoverlapping_memrefs_p (x, mem)) return 0; - x_addr = get_addr (XEXP (x, 0)); - mem_addr = get_addr (XEXP (mem, 0)); + x_addr = XEXP (x, 0); + mem_addr = XEXP (mem, 0); + if (!((GET_CODE (x_addr) == VALUE + && GET_CODE (mem_addr) != VALUE + && reg_mentioned_p (x_addr, mem_addr)) + || (GET_CODE (x_addr) != VALUE + && GET_CODE (mem_addr) == VALUE + && reg_mentioned_p (mem_addr, x_addr)))) + { + x_addr = get_addr (x_addr); + mem_addr = get_addr (mem_addr); + } if (! writep) { diff --git a/contrib/gcc-4.4/gcc/attribs.c b/contrib/gcc-4.4/gcc/attribs.c index be360d36bf..98cc5dcf8b 100644 --- a/contrib/gcc-4.4/gcc/attribs.c +++ b/contrib/gcc-4.4/gcc/attribs.c @@ -1,6 +1,6 @@ /* Functions dealing with attribute handling, used by most front ends. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, - 2002, 2003, 2004, 2005, 2007, 2008 Free Software Foundation, Inc. + 2002, 2003, 2004, 2005, 2007, 2008, 2010 Free Software Foundation, Inc. This file is part of GCC. @@ -277,6 +277,7 @@ decl_attributes (tree *node, tree attributes, int flags) tree *anode = node; const struct attribute_spec *spec = lookup_attribute_spec (name); bool no_add_attrs = 0; + int fn_ptr_quals = 0; tree fn_ptr_tmp = NULL_TREE; if (spec == NULL) @@ -344,6 +345,7 @@ decl_attributes (tree *node, tree attributes, int flags) This would all be simpler if attributes were part of the declarator, grumble grumble. */ fn_ptr_tmp = TREE_TYPE (*anode); + fn_ptr_quals = TYPE_QUALS (*anode); anode = &fn_ptr_tmp; flags &= ~(int) ATTR_FLAG_TYPE_IN_PLACE; } @@ -440,6 +442,8 @@ decl_attributes (tree *node, tree attributes, int flags) /* Rebuild the function pointer type and put it in the appropriate place. */ fn_ptr_tmp = build_pointer_type (fn_ptr_tmp); + if (fn_ptr_quals) + fn_ptr_tmp = build_qualified_type (fn_ptr_tmp, fn_ptr_quals); if (DECL_P (*node)) TREE_TYPE (*node) = fn_ptr_tmp; else diff --git a/contrib/gcc-4.4/gcc/builtins.c b/contrib/gcc-4.4/gcc/builtins.c index 02d7e98b3b..5a84ed4d16 100644 --- a/contrib/gcc-4.4/gcc/builtins.c +++ b/contrib/gcc-4.4/gcc/builtins.c @@ -1,6 +1,6 @@ /* Expand builtin functions. Copyright (C) 1988, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, - 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 + 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. This file is part of GCC. @@ -151,7 +151,7 @@ static rtx expand_builtin_expect (tree, rtx); static tree fold_builtin_constant_p (tree); static tree fold_builtin_expect (tree, tree); static tree fold_builtin_classify_type (tree); -static tree fold_builtin_strlen (tree); +static tree fold_builtin_strlen (tree, tree); static tree fold_builtin_inf (tree, int); static tree fold_builtin_nan (tree, tree, int); static tree rewrite_call_expr (tree, int, tree, int, ...); @@ -2275,6 +2275,8 @@ expand_builtin_interclass_mathfn (tree exp, rtx target, rtx subtarget) /* Before working hard, check whether the instruction is available. */ if (icode != CODE_FOR_nothing) { + rtx last = get_last_insn (); + tree orig_arg = arg; /* Make a suitable register to place result in. */ if (!target || GET_MODE (target) != TYPE_MODE (TREE_TYPE (exp))) @@ -2295,8 +2297,10 @@ expand_builtin_interclass_mathfn (tree exp, rtx target, rtx subtarget) /* Compute into TARGET. Set TARGET to wherever the result comes back. */ - emit_unop_insn (icode, target, op0, UNKNOWN); - return target; + if (maybe_emit_unop_insn (icode, target, op0, UNKNOWN)) + return target; + delete_insns_since (last); + CALL_EXPR_ARG (exp, 0) = orig_arg; } /* If there is no optab, try generic code. */ @@ -2987,7 +2991,10 @@ expand_builtin_pow (tree exp, rtx target, rtx subtarget) && ((flag_unsafe_math_optimizations && optimize_insn_for_speed_p () && powi_cost (n/2) <= POWI_MAX_MULTS) - || n == 1)) + /* Even the c==0.5 case cannot be done unconditionally + when we need to preserve signed zeros, as + pow (-0, 0.5) is +0, while sqrt(-0) is -0. */ + || (!HONOR_SIGNED_ZEROS (mode) && n == 1))) { tree call_expr = build_call_expr (fn, 1, narg0); /* Use expand_expr in case the newly built call expression @@ -3712,7 +3719,15 @@ expand_builtin_strcpy_args (tree fndecl, tree dest, tree src, { tree result = fold_builtin_strcpy (fndecl, dest, src, 0); if (result) - return expand_expr (result, target, mode, EXPAND_NORMAL); + { + while (TREE_CODE (result) == COMPOUND_EXPR) + { + expand_expr (TREE_OPERAND (result, 0), const0_rtx, VOIDmode, + EXPAND_NORMAL); + result = TREE_OPERAND (result, 1); + } + return expand_expr (result, target, mode, EXPAND_NORMAL); + } return expand_movstr (dest, src, target, /*endp=*/0); } @@ -5826,9 +5841,11 @@ expand_builtin_signbit (tree exp, rtx target) icode = signbit_optab->handlers [(int) fmode].insn_code; if (icode != CODE_FOR_nothing) { + rtx last = get_last_insn (); target = gen_reg_rtx (TYPE_MODE (TREE_TYPE (exp))); - emit_unop_insn (icode, target, temp, UNKNOWN); - return target; + if (maybe_emit_unop_insn (icode, target, temp, UNKNOWN)) + return target; + delete_insns_since (last); } /* For floating point formats without a sign bit, implement signbit @@ -7351,7 +7368,7 @@ fold_builtin_classify_type (tree arg) /* Fold a call to __builtin_strlen with argument ARG. */ static tree -fold_builtin_strlen (tree arg) +fold_builtin_strlen (tree type, tree arg) { if (!validate_arg (arg, POINTER_TYPE)) return NULL_TREE; @@ -7360,12 +7377,7 @@ fold_builtin_strlen (tree arg) tree len = c_strlen (arg, 0); if (len) - { - /* Convert from the internal "sizetype" type to "size_t". */ - if (size_type_node) - len = fold_convert (size_type_node, len); - return len; - } + return fold_convert (type, len); return NULL_TREE; } @@ -10126,7 +10138,7 @@ fold_builtin_1 (tree fndecl, tree arg0, bool ignore) return fold_builtin_classify_type (arg0); case BUILT_IN_STRLEN: - return fold_builtin_strlen (arg0); + return fold_builtin_strlen (type, arg0); CASE_FLT_FN (BUILT_IN_FABS): return fold_builtin_fabs (arg0, type); diff --git a/contrib/gcc-4.4/gcc/c-common.c b/contrib/gcc-4.4/gcc/c-common.c index eb3cd9bf73..5f4079054a 100644 --- a/contrib/gcc-4.4/gcc/c-common.c +++ b/contrib/gcc-4.4/gcc/c-common.c @@ -3397,20 +3397,7 @@ c_common_truthvalue_conversion (location_t location, tree expr) inner); return truthvalue_true_node; } - - /* If we still have a decl, it is possible for its address to - be NULL, so we cannot optimize. */ - if (DECL_P (inner)) - { - gcc_assert (DECL_WEAK (inner)); - break; - } - - if (TREE_SIDE_EFFECTS (inner)) - return build2 (COMPOUND_EXPR, truthvalue_type_node, - inner, truthvalue_true_node); - else - return truthvalue_true_node; + break; } case COMPLEX_EXPR: @@ -5957,10 +5944,12 @@ handle_aligned_attribute (tree *node, tree ARG_UNUSED (name), tree args, } else if (is_type) { + if ((flags & (int) ATTR_FLAG_TYPE_IN_PLACE)) + /* OK, modify the type in place. */; /* If we have a TYPE_DECL, then copy the type, so that we don't accidentally modify a builtin type. See pushdecl. */ - if (decl && TREE_TYPE (decl) != error_mark_node - && DECL_ORIGINAL_TYPE (decl) == NULL_TREE) + else if (decl && TREE_TYPE (decl) != error_mark_node + && DECL_ORIGINAL_TYPE (decl) == NULL_TREE) { tree tt = TREE_TYPE (decl); *type = build_variant_type_copy (*type); @@ -5969,7 +5958,7 @@ handle_aligned_attribute (tree *node, tree ARG_UNUSED (name), tree args, TREE_USED (*type) = TREE_USED (decl); TREE_TYPE (decl) = *type; } - else if (!(flags & (int) ATTR_FLAG_TYPE_IN_PLACE)) + else *type = build_variant_type_copy (*type); TYPE_ALIGN (*type) = (1 << i) * BITS_PER_UNIT; @@ -7633,15 +7622,14 @@ fold_offsetof_1 (tree expr, tree stop_ref) error ("cannot apply % when % is overloaded"); return error_mark_node; - case INTEGER_CST: - gcc_assert (integer_zerop (expr)); - return size_zero_node; - case NOP_EXPR: case INDIRECT_REF: - base = fold_offsetof_1 (TREE_OPERAND (expr, 0), stop_ref); - gcc_assert (base == error_mark_node || base == size_zero_node); - return base; + if (!integer_zerop (TREE_OPERAND (expr, 0))) + { + error ("cannot apply % to a non constant address"); + return error_mark_node; + } + return size_zero_node; case COMPONENT_REF: base = fold_offsetof_1 (TREE_OPERAND (expr, 0), stop_ref); diff --git a/contrib/gcc-4.4/gcc/c-decl.c b/contrib/gcc-4.4/gcc/c-decl.c index 7c9e2d1053..4d3e628f5e 100644 --- a/contrib/gcc-4.4/gcc/c-decl.c +++ b/contrib/gcc-4.4/gcc/c-decl.c @@ -1,6 +1,6 @@ /* Process declarations and variables for C compiler. Copyright (C) 1988, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, - 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 + 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. This file is part of GCC. @@ -3735,7 +3735,8 @@ build_compound_literal (tree type, tree init) tree complit; tree stmt; - if (type == error_mark_node) + if (type == error_mark_node + || init == error_mark_node) return error_mark_node; decl = build_decl (VAR_DECL, NULL_TREE, type); @@ -5255,6 +5256,11 @@ get_parm_info (bool ellipsis) type itself. FUNCTION_DECLs appear when there is an implicit function declaration in the parameter list. */ + /* When we reinsert this decl in the function body, we need + to reconstruct whether it was marked as nested. */ + gcc_assert (TREE_CODE (decl) == FUNCTION_DECL + ? b->nested + : !b->nested); TREE_CHAIN (decl) = others; others = decl; /* fall through */ @@ -6372,7 +6378,8 @@ store_parm_decls_newstyle (tree fndecl, const struct c_arg_info *arg_info) DECL_CONTEXT (decl) = current_function_decl; if (DECL_NAME (decl)) bind (DECL_NAME (decl), decl, current_scope, - /*invisible=*/false, /*nested=*/false); + /*invisible=*/false, + /*nested=*/(TREE_CODE (decl) == FUNCTION_DECL)); } /* And all the tag declarations. */ @@ -6777,6 +6784,8 @@ finish_function (void) && !current_function_returns_value && !current_function_returns_null /* Don't complain if we are no-return. */ && !current_function_returns_abnormally + /* Don't complain if we are declared noreturn. */ + && !TREE_THIS_VOLATILE (fndecl) /* Don't warn for main(). */ && !MAIN_NAME_P (DECL_NAME (fndecl)) /* Or if they didn't actually specify a return type. */ diff --git a/contrib/gcc-4.4/gcc/c-omp.c b/contrib/gcc-4.4/gcc/c-omp.c index 33f0a83e1a..183ff36b10 100644 --- a/contrib/gcc-4.4/gcc/c-omp.c +++ b/contrib/gcc-4.4/gcc/c-omp.c @@ -1,7 +1,7 @@ /* This file contains routines to construct GNU OpenMP constructs, called from parsing in the C and C++ front ends. - Copyright (C) 2005, 2007, 2008, 2009 Free Software Foundation, Inc. + Copyright (C) 2005, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. Contributed by Richard Henderson , Diego Novillo . @@ -281,7 +281,8 @@ c_finish_omp_for (location_t locus, tree declv, tree initv, tree condv, || TREE_CODE (cond) == LE_EXPR || TREE_CODE (cond) == GT_EXPR || TREE_CODE (cond) == GE_EXPR - || TREE_CODE (cond) == NE_EXPR) + || TREE_CODE (cond) == NE_EXPR + || TREE_CODE (cond) == EQ_EXPR) { tree op0 = TREE_OPERAND (cond, 0); tree op1 = TREE_OPERAND (cond, 1); @@ -326,18 +327,21 @@ c_finish_omp_for (location_t locus, tree declv, tree initv, tree condv, cond_ok = true; } - if (TREE_CODE (cond) == NE_EXPR) + if (TREE_CODE (cond) == NE_EXPR + || TREE_CODE (cond) == EQ_EXPR) { if (!INTEGRAL_TYPE_P (TREE_TYPE (decl))) cond_ok = false; else if (operand_equal_p (TREE_OPERAND (cond, 1), TYPE_MIN_VALUE (TREE_TYPE (decl)), 0)) - TREE_SET_CODE (cond, GT_EXPR); + TREE_SET_CODE (cond, TREE_CODE (cond) == NE_EXPR + ? GT_EXPR : LE_EXPR); else if (operand_equal_p (TREE_OPERAND (cond, 1), TYPE_MAX_VALUE (TREE_TYPE (decl)), 0)) - TREE_SET_CODE (cond, LT_EXPR); + TREE_SET_CODE (cond, TREE_CODE (cond) == NE_EXPR + ? LT_EXPR : GE_EXPR); else cond_ok = false; } diff --git a/contrib/gcc-4.4/gcc/c-parser.c b/contrib/gcc-4.4/gcc/c-parser.c index 0f047def1c..ca1d1e8b28 100644 --- a/contrib/gcc-4.4/gcc/c-parser.c +++ b/contrib/gcc-4.4/gcc/c-parser.c @@ -7457,6 +7457,42 @@ c_parser_omp_atomic (c_parser *parser) rhs = integer_one_node; break; + case COMPOUND_EXPR: + if (TREE_CODE (TREE_OPERAND (lhs, 0)) == SAVE_EXPR + && TREE_CODE (TREE_OPERAND (lhs, 1)) == COMPOUND_EXPR + && TREE_CODE (TREE_OPERAND (TREE_OPERAND (lhs, 1), 0)) == MODIFY_EXPR + && TREE_OPERAND (TREE_OPERAND (lhs, 1), 1) == TREE_OPERAND (lhs, 0) + && TREE_CODE (TREE_TYPE (TREE_OPERAND (TREE_OPERAND + (TREE_OPERAND (lhs, 1), 0), 0))) + == BOOLEAN_TYPE) + /* Undo effects of boolean_increment for post {in,de}crement. */ + lhs = TREE_OPERAND (TREE_OPERAND (lhs, 1), 0); + /* FALLTHRU */ + case MODIFY_EXPR: + if (TREE_CODE (lhs) == MODIFY_EXPR + && TREE_CODE (TREE_TYPE (TREE_OPERAND (lhs, 0))) == BOOLEAN_TYPE) + { + /* Undo effects of boolean_increment. */ + if (integer_onep (TREE_OPERAND (lhs, 1))) + { + /* This is pre or post increment. */ + rhs = TREE_OPERAND (lhs, 1); + lhs = TREE_OPERAND (lhs, 0); + code = NOP_EXPR; + break; + } + if (TREE_CODE (TREE_OPERAND (lhs, 1)) == TRUTH_NOT_EXPR + && TREE_OPERAND (lhs, 0) + == TREE_OPERAND (TREE_OPERAND (lhs, 1), 0)) + { + /* This is pre or post decrement. */ + rhs = TREE_OPERAND (lhs, 1); + lhs = TREE_OPERAND (lhs, 0); + code = NOP_EXPR; + break; + } + } + /* FALLTHRU */ default: switch (c_parser_peek_token (parser)->type) { diff --git a/contrib/gcc-4.4/gcc/c-pragma.c b/contrib/gcc-4.4/gcc/c-pragma.c index 2f2095ec81..f50582ff77 100644 --- a/contrib/gcc-4.4/gcc/c-pragma.c +++ b/contrib/gcc-4.4/gcc/c-pragma.c @@ -244,146 +244,6 @@ handle_pragma_pack (cpp_reader * ARG_UNUSED (dummy)) } #endif /* HANDLE_PRAGMA_PACK */ -struct def_pragma_macro_value GTY(()) -{ - struct def_pragma_macro_value *prev; - cpp_macro *value; -}; - -struct def_pragma_macro GTY(()) -{ - hashval_t hash; - const char *name; - struct def_pragma_macro_value value; -}; - -static GTY((param_is (struct def_pragma_macro))) htab_t pushed_macro_table; - -#ifdef HANDLE_PRAGMA_PUSH_POP_MACRO -/* Hash table control functions for pushed_macro_table. */ -static hashval_t -dpm_hash (const void *p) -{ - return ((const struct def_pragma_macro *)p)->hash; -} - -static int -dpm_eq (const void *pa, const void *pb) -{ - const struct def_pragma_macro *const a = (const struct def_pragma_macro *) pa, - *const b = (const struct def_pragma_macro *) pb; - return a->hash == b->hash && strcmp (a->name, b->name) == 0; -} - -/* #pragma push_macro("MACRO_NAME") - #pragma pop_macro("MACRO_NAME") */ - -static void -handle_pragma_push_macro (cpp_reader *reader) -{ - tree x, id = 0; - enum cpp_ttype token; - struct def_pragma_macro dummy, *c; - const char *macroname; - void **slot; - - if (pragma_lex (&x) != CPP_OPEN_PAREN) - GCC_BAD ("missing %<(%> after %<#pragma push_macro%> - ignored"); - - token = pragma_lex (&id); - - /* Silently ignore */ - if (token == CPP_CLOSE_PAREN) - return; - if (token != CPP_STRING) - GCC_BAD ("invalid constant in %<#pragma push_macro%> - ignored"); - - if (pragma_lex (&x) != CPP_CLOSE_PAREN) - GCC_BAD ("missing %<)%> after %<#pragma push_macro%> - ignored"); - - if (pragma_lex (&x) != CPP_EOF) - warning (OPT_Wpragmas, "junk at end of %<#pragma push_macro%>"); - - /* Check for empty string, and silently ignore. */ - if (TREE_STRING_LENGTH (id) < 1) - return; - macroname = TREE_STRING_POINTER (id); - - if (pushed_macro_table == NULL) - pushed_macro_table = htab_create_ggc (15, dpm_hash, dpm_eq, 0); - - dummy.hash = htab_hash_string (macroname); - dummy.name = macroname; - slot = htab_find_slot_with_hash (pushed_macro_table, &dummy, - dummy.hash, INSERT); - c = (struct def_pragma_macro *) *slot; - if (c == NULL) - { - *slot = c = GGC_NEW (struct def_pragma_macro); - c->hash = dummy.hash; - c->name = ggc_alloc_string (macroname, TREE_STRING_LENGTH (id) - 1); - c->value.prev = NULL; - } - else - { - struct def_pragma_macro_value *v; - v = GGC_NEW (struct def_pragma_macro_value); - *v = c->value; - c->value.prev = v; - } - - c->value.value = cpp_push_definition (reader, macroname); -} - -static void -handle_pragma_pop_macro (cpp_reader *reader) -{ - tree x, id = 0; - enum cpp_ttype token; - struct def_pragma_macro dummy, *c; - const char *macroname; - void **slot = NULL; - - if (pragma_lex (&x) != CPP_OPEN_PAREN) - GCC_BAD ("missing %<(%> after %<#pragma pop_macro%> - ignored"); - - token = pragma_lex (&id); - - /* Silently ignore */ - if (token == CPP_CLOSE_PAREN) - return; - if (token != CPP_STRING) - GCC_BAD ("invalid constant in %<#pragma pop_macro%> - ignored"); - - if (pragma_lex (&x) != CPP_CLOSE_PAREN) - GCC_BAD ("missing %<)%> after %<#pragma pop_macro%> - ignored"); - - if (pragma_lex (&x) != CPP_EOF) - warning (OPT_Wpragmas, "junk at end of %<#pragma pop_macro%>"); - - /* Check for empty string, and silently ignore. */ - if (TREE_STRING_LENGTH (id) < 1) - return; - macroname = TREE_STRING_POINTER (id); - - dummy.hash = htab_hash_string (macroname); - dummy.name = macroname; - if (pushed_macro_table) - slot = htab_find_slot_with_hash (pushed_macro_table, &dummy, - dummy.hash, NO_INSERT); - if (slot == NULL) - return; - c = (struct def_pragma_macro *) *slot; - - cpp_pop_definition (reader, c->name, c->value.value); - - if (c->value.prev) - c->value = *c->value.prev; - else - htab_clear_slot (pushed_macro_table, slot); -} -#endif /* HANDLE_PRAGMA_PUSH_POP_MACRO */ - static GTY(()) tree pending_weaks; #ifdef HANDLE_PRAGMA_WEAK @@ -1316,10 +1176,6 @@ init_pragma (void) c_register_pragma (0, "pack", handle_pragma_pack); #endif #endif -#ifdef HANDLE_PRAGMA_PUSH_POP_MACRO - c_register_pragma (0 ,"push_macro", handle_pragma_push_macro); - c_register_pragma (0 ,"pop_macro", handle_pragma_pop_macro); -#endif #ifdef HANDLE_PRAGMA_WEAK c_register_pragma (0, "weak", handle_pragma_weak); #endif diff --git a/contrib/gcc-4.4/gcc/c-typeck.c b/contrib/gcc-4.4/gcc/c-typeck.c index 006c40ea85..d9c0c1e221 100644 --- a/contrib/gcc-4.4/gcc/c-typeck.c +++ b/contrib/gcc-4.4/gcc/c-typeck.c @@ -2527,6 +2527,7 @@ convert_arguments (int nargs, tree *argarray, { tree typetail, valtail; int parmnum; + bool error_args = false; const bool type_generic = fundecl && lookup_attribute ("type generic", TYPE_ATTRIBUTES(TREE_TYPE (fundecl))); tree selector; @@ -2737,6 +2738,9 @@ convert_arguments (int nargs, tree *argarray, /* Convert `short' and `char' to full-size `int'. */ argarray[parmnum] = default_conversion (val); + if (argarray[parmnum] == error_mark_node) + error_args = true; + if (typetail) typetail = TREE_CHAIN (typetail); } @@ -2749,7 +2753,7 @@ convert_arguments (int nargs, tree *argarray, return -1; } - return parmnum; + return error_args ? -1 : parmnum; } /* This is the entry point used by the parser to build unary operators diff --git a/contrib/gcc-4.4/gcc/caller-save.c b/contrib/gcc-4.4/gcc/caller-save.c index 0c840c3080..07f0d0f47d 100644 --- a/contrib/gcc-4.4/gcc/caller-save.c +++ b/contrib/gcc-4.4/gcc/caller-save.c @@ -40,6 +40,9 @@ along with GCC; see the file COPYING3. If not see #include "df.h" #include "ggc.h" +/* True if caller-save has been initialized. */ +bool caller_save_initialized_p; + /* Call used hard registers which can not be saved because there is no insn for this. */ HARD_REG_SET no_caller_save_reg_set; @@ -204,6 +207,11 @@ init_caller_save (void) rtx address; int i, j; + if (caller_save_initialized_p) + return; + + caller_save_initialized_p = true; + CLEAR_HARD_REG_SET (no_caller_save_reg_set); /* First find all the registers that we need to deal with and all the modes that they can have. If we can't find a mode to use, diff --git a/contrib/gcc-4.4/gcc/cfgexpand.c b/contrib/gcc-4.4/gcc/cfgexpand.c index 3eaebd44bf..70325be170 100644 --- a/contrib/gcc-4.4/gcc/cfgexpand.c +++ b/contrib/gcc-4.4/gcc/cfgexpand.c @@ -1,5 +1,5 @@ /* A pass for lowering trees to RTL. - Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 + Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. This file is part of GCC. @@ -379,46 +379,6 @@ release_stmt_tree (gimple stmt, tree stmt_tree) } -/* Verify that there is exactly single jump instruction since last and attach - REG_BR_PROB note specifying probability. - ??? We really ought to pass the probability down to RTL expanders and let it - re-distribute it when the conditional expands into multiple conditionals. - This is however difficult to do. */ -void -add_reg_br_prob_note (rtx last, int probability) -{ - if (profile_status == PROFILE_ABSENT) - return; - for (last = NEXT_INSN (last); last && NEXT_INSN (last); last = NEXT_INSN (last)) - if (JUMP_P (last)) - { - /* It is common to emit condjump-around-jump sequence when we don't know - how to reverse the conditional. Special case this. */ - if (!any_condjump_p (last) - || !JUMP_P (NEXT_INSN (last)) - || !simplejump_p (NEXT_INSN (last)) - || !NEXT_INSN (NEXT_INSN (last)) - || !BARRIER_P (NEXT_INSN (NEXT_INSN (last))) - || !NEXT_INSN (NEXT_INSN (NEXT_INSN (last))) - || !LABEL_P (NEXT_INSN (NEXT_INSN (NEXT_INSN (last)))) - || NEXT_INSN (NEXT_INSN (NEXT_INSN (NEXT_INSN (last))))) - goto failed; - gcc_assert (!find_reg_note (last, REG_BR_PROB, 0)); - add_reg_note (last, REG_BR_PROB, - GEN_INT (REG_BR_PROB_BASE - probability)); - return; - } - if (!last || !JUMP_P (last) || !any_condjump_p (last)) - goto failed; - gcc_assert (!find_reg_note (last, REG_BR_PROB, 0)); - add_reg_note (last, REG_BR_PROB, GEN_INT (probability)); - return; -failed: - if (dump_file) - fprintf (dump_file, "Failed to add probability note\n"); -} - - #ifndef STACK_ALIGNMENT_NEEDED #define STACK_ALIGNMENT_NEEDED 1 #endif @@ -866,7 +826,7 @@ dump_stack_var_partition (void) static void expand_one_stack_var_at (tree decl, HOST_WIDE_INT offset) { - HOST_WIDE_INT align; + HOST_WIDE_INT align, max_align; rtx x; /* If this fails, we've overflowed the stack frame. Error nicely? */ @@ -879,8 +839,9 @@ expand_one_stack_var_at (tree decl, HOST_WIDE_INT offset) offset -= frame_phase; align = offset & -offset; align *= BITS_PER_UNIT; - if (align > STACK_BOUNDARY || align == 0) - align = STACK_BOUNDARY; + max_align = crtl->max_used_stack_slot_alignment; + if (align == 0 || align > max_align) + align = max_align; DECL_ALIGN (decl) = align; DECL_USER_ALIGN (decl) = 0; @@ -1116,6 +1077,14 @@ expand_one_var (tree var, bool toplevel, bool really_expand) if (really_expand) expand_one_register_var (var); } + else if (!host_integerp (DECL_SIZE_UNIT (var), 1)) + { + if (really_expand) + { + error ("size of variable %q+D is too large", var); + expand_one_error_var (var); + } + } else if (defer_stack_allocation (var, toplevel)) add_stack_var (var); else @@ -1661,8 +1630,8 @@ expand_gimple_cond (basic_block bb, gimple stmt) two-way jump that needs to be decomposed into two basic blocks. */ if (false_edge->dest == bb->next_bb) { - jumpif (pred, label_rtx_for_bb (true_edge->dest)); - add_reg_br_prob_note (last, true_edge->probability); + jumpif (pred, label_rtx_for_bb (true_edge->dest), + true_edge->probability); maybe_dump_rtl_for_gimple_stmt (stmt, last); if (true_edge->goto_locus) { @@ -1677,8 +1646,8 @@ expand_gimple_cond (basic_block bb, gimple stmt) } if (true_edge->dest == bb->next_bb) { - jumpifnot (pred, label_rtx_for_bb (false_edge->dest)); - add_reg_br_prob_note (last, false_edge->probability); + jumpifnot (pred, label_rtx_for_bb (false_edge->dest), + false_edge->probability); maybe_dump_rtl_for_gimple_stmt (stmt, last); if (false_edge->goto_locus) { @@ -1692,8 +1661,7 @@ expand_gimple_cond (basic_block bb, gimple stmt) return NULL; } - jumpif (pred, label_rtx_for_bb (true_edge->dest)); - add_reg_br_prob_note (last, true_edge->probability); + jumpif (pred, label_rtx_for_bb (true_edge->dest), true_edge->probability); last = get_last_insn (); if (false_edge->goto_locus) { diff --git a/contrib/gcc-4.4/gcc/cfgrtl.c b/contrib/gcc-4.4/gcc/cfgrtl.c index 7af4215a84..15cdd75ee6 100644 --- a/contrib/gcc-4.4/gcc/cfgrtl.c +++ b/contrib/gcc-4.4/gcc/cfgrtl.c @@ -1,6 +1,6 @@ /* Control flow graph manipulation code for GNU compiler. Copyright (C) 1987, 1988, 1992, 1993, 1994, 1995, 1996, 1997, 1998, - 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 + 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2010 Free Software Foundation, Inc. This file is part of GCC. @@ -435,7 +435,10 @@ rest_of_pass_free_cfg (void) /* The resource.c machinery uses DF but the CFG isn't guaranteed to be valid at that point so it would be too late to call df_analyze. */ if (optimize > 0 && flag_delayed_branch) - df_analyze (); + { + df_note_add_problem (); + df_analyze (); + } #endif free_bb_for_insn (); @@ -2951,7 +2954,7 @@ rtl_lv_add_condition_to_bb (basic_block first_head , op0 = force_operand (op0, NULL_RTX); op1 = force_operand (op1, NULL_RTX); do_compare_rtx_and_jump (op0, op1, comp, 0, - mode, NULL_RTX, NULL_RTX, label); + mode, NULL_RTX, NULL_RTX, label, -1); jump = get_last_insn (); JUMP_LABEL (jump) = label; LABEL_NUSES (label)++; diff --git a/contrib/gcc-4.4/gcc/cgraphunit.c b/contrib/gcc-4.4/gcc/cgraphunit.c index 07998d4af8..3a2f31ab42 100644 --- a/contrib/gcc-4.4/gcc/cgraphunit.c +++ b/contrib/gcc-4.4/gcc/cgraphunit.c @@ -1135,7 +1135,6 @@ static void cgraph_output_in_order (void) { int max; - size_t size; struct cgraph_order_sort *nodes; int i; struct cgraph_node *pf; @@ -1143,9 +1142,7 @@ cgraph_output_in_order (void) struct cgraph_asm_node *pa; max = cgraph_order; - size = max * sizeof (struct cgraph_order_sort); - nodes = (struct cgraph_order_sort *) alloca (size); - memset (nodes, 0, size); + nodes = XCNEWVEC (struct cgraph_order_sort, max); varpool_analyze_pending_decls (); @@ -1212,6 +1209,7 @@ cgraph_output_in_order (void) } cgraph_asm_nodes = NULL; + free (nodes); } /* Return true when function body of DECL still needs to be kept around @@ -1293,6 +1291,7 @@ cgraph_optimize (void) timevar_pop (TV_CGRAPHOPT); /* Output everything. */ + (*debug_hooks->assembly_start) (); if (!quiet_flag) fprintf (stderr, "Assembling functions:\n"); #ifdef ENABLE_CHECKING diff --git a/contrib/gcc-4.4/gcc/combine.c b/contrib/gcc-4.4/gcc/combine.c index bbb7135aa7..42a465ecc5 100644 --- a/contrib/gcc-4.4/gcc/combine.c +++ b/contrib/gcc-4.4/gcc/combine.c @@ -1,6 +1,6 @@ /* Optimize by combining instructions for GNU compiler. Copyright (C) 1987, 1988, 1992, 1993, 1994, 1995, 1996, 1997, 1998, - 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 + 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. This file is part of GCC. @@ -2445,10 +2445,16 @@ try_combine (rtx i3, rtx i2, rtx i1, int *new_direct_jump_p) i2dest = SET_DEST (temp); i2dest_killed = dead_or_set_p (i2, i2dest); + /* Replace the source in I2 with the new constant and make the + resulting insn the new pattern for I3. Then skip to + where we validate the pattern. Everything was set up above. */ SUBST (SET_SRC (temp), immed_double_const (olo, ohi, GET_MODE (SET_DEST (temp)))); newpat = PATTERN (i2); + + /* The dest of I3 has been replaced with the dest of I2. */ + changed_i3_dest = 1; goto validate_replacement; } } @@ -2820,8 +2826,6 @@ try_combine (rtx i3, rtx i2, rtx i1, int *new_direct_jump_p) } } - /* We come here when we are replacing a destination in I2 with the - destination of I3. */ validate_replacement: /* Note which hard regs this insn has as inputs. */ @@ -6527,8 +6531,10 @@ make_extraction (enum machine_mode mode, rtx inner, HOST_WIDE_INT pos, if (mode == tmode) return new_rtx; - if (GET_CODE (new_rtx) == CONST_INT) - return gen_int_mode (INTVAL (new_rtx), mode); + if (CONST_INT_P (new_rtx) + || GET_CODE (new_rtx) == CONST_DOUBLE) + return simplify_unary_operation (unsignedp ? ZERO_EXTEND : SIGN_EXTEND, + mode, new_rtx, tmode); /* If we know that no extraneous bits are set, and that the high bit is not set, convert the extraction to the cheaper of @@ -7039,15 +7045,14 @@ make_compound_operation (rtx x, enum rtx_code in_code) tem = make_compound_operation (SUBREG_REG (x), in_code); { - rtx simplified; - simplified = simplify_subreg (GET_MODE (x), tem, GET_MODE (tem), - SUBREG_BYTE (x)); + rtx simplified = simplify_subreg (mode, tem, GET_MODE (SUBREG_REG (x)), + SUBREG_BYTE (x)); if (simplified) tem = simplified; if (GET_CODE (tem) != GET_CODE (SUBREG_REG (x)) - && GET_MODE_SIZE (mode) < GET_MODE_SIZE (GET_MODE (tem)) + && GET_MODE_SIZE (mode) < GET_MODE_SIZE (GET_MODE (SUBREG_REG (x))) && subreg_lowpart_p (x)) { rtx newer = force_to_mode (tem, mode, ~(HOST_WIDE_INT) 0, @@ -8512,6 +8517,12 @@ distribute_and_simplify_rtx (rtx x, int n) enum rtx_code outer_code, inner_code; rtx decomposed, distributed, inner_op0, inner_op1, new_op0, new_op1, tmp; + /* Distributivity is not true for floating point as it can change the + value. So we don't do it unless -funsafe-math-optimizations. */ + if (FLOAT_MODE_P (GET_MODE (x)) + && ! flag_unsafe_math_optimizations) + return NULL_RTX; + decomposed = XEXP (x, n); if (!ARITHMETIC_P (decomposed)) return NULL_RTX; @@ -13035,4 +13046,3 @@ struct rtl_opt_pass pass_combine = TODO_ggc_collect, /* todo_flags_finish */ } }; - diff --git a/contrib/gcc-4.4/gcc/config.gcc b/contrib/gcc-4.4/gcc/config.gcc index 701fe4481c..6f72224c72 100644 --- a/contrib/gcc-4.4/gcc/config.gcc +++ b/contrib/gcc-4.4/gcc/config.gcc @@ -1,6 +1,6 @@ # GCC target-specific configuration file. # Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -# 2008, 2009 Free Software Foundation, Inc. +# 2008, 2009, 2010 Free Software Foundation, Inc. #This file is part of GCC. @@ -481,6 +481,12 @@ case ${target} in ;; esac fbsd_tm_file="${fbsd_tm_file} freebsd-spec.h freebsd.h" + case ${target} in + *-*-freebsd[345].*) + :;; + *) + default_use_cxa_atexit=yes;; + esac ;; *-*-linux* | frv-*-*linux* | *-*-kfreebsd*-gnu | *-*-knetbsd*-gnu | *-*-gnu* | *-*-kopensolaris*-gnu) extra_parts="crtbegin.o crtbeginS.o crtbeginT.o crtend.o crtendS.o" @@ -714,7 +720,7 @@ arm*-*-linux*) # ARM GNU/Linux with ELF case ${target} in arm*-*-linux-*eabi) tm_file="$tm_file arm/bpabi.h arm/linux-eabi.h" - tmake_file="$tmake_file arm/t-arm-elf arm/t-bpabi arm/t-linux-eabi" + tmake_file="$tmake_file arm/t-arm-elf arm/t-bpabi arm/t-linux-eabi t-slibgcc-libgcc" # The BPABI long long divmod functions return a 128-bit value in # registers r0-r3. Correctly modeling that requires the use of # TImode. @@ -1088,7 +1094,7 @@ i[34567]86-*-linux* | i[34567]86-*-kfreebsd*-gnu | i[34567]86-*-knetbsd*-gnu | i tmake_file="${tmake_file} i386/t-linux64" need_64bit_hwint=yes case X"${with_cpu}" in - Xgeneric|Xcore2|Xnocona|Xx86-64|Xamdfam10|Xbarcelona|Xk8|Xopteron|Xathlon64|Xathlon-fx) + Xgeneric|Xcore2|Xnocona|Xx86-64|Xamdfam10|Xbarcelona|Xk8|Xopteron|Xathlon64|Xathlon-fx|Xathlon64-sse3|Xk8-sse3|Xopteron-sse3) ;; X) if test x$with_cpu_64 = x; then @@ -1097,7 +1103,7 @@ i[34567]86-*-linux* | i[34567]86-*-kfreebsd*-gnu | i[34567]86-*-knetbsd*-gnu | i ;; *) echo "Unsupported CPU used in --with-cpu=$with_cpu, supported values:" 1>&2 - echo "generic core2 nocona x86-64 amdfam10 barcelona k8 opteron athlon64 athlon-fx" 1>&2 + echo "generic core2 nocona x86-64 amdfam10 barcelona k8 opteron athlon64 athlon-fx athlon64-sse3 k8-sse3 opteron-sse3" 1>&2 exit 1 ;; esac @@ -1177,6 +1183,12 @@ i[34567]86-*-solaris2*) ;; esac tm_file="${tm_file} i386/sol2.h" + if test x$gnu_ld = xyes; then + tm_file="${tm_file} sol2-gld.h" + fi + if test x$gas = xyes; then + tm_file="${tm_file} i386/sol2-gas.h" + fi tmake_file="${tmake_file} t-sol2 t-svr4" c_target_objs="${c_target_objs} sol2-c.o" cxx_target_objs="${cxx_target_objs} sol2-c.o" @@ -1202,7 +1214,7 @@ i[34567]86-*-solaris2*) # libgcc/configure.ac instead. need_64bit_hwint=yes case X"${with_cpu}" in - Xgeneric|Xcore2|Xnocona|Xx86-64|Xamdfam10|Xbarcelona|Xk8|Xopteron|Xathlon64|Xathlon-fx) + Xgeneric|Xcore2|Xnocona|Xx86-64|Xamdfam10|Xbarcelona|Xk8|Xopteron|Xathlon64|Xathlon-fx|Xathlon64-sse3|Xk8-sse3|Xopteron-sse3) ;; X) if test x$with_cpu_64 = x; then @@ -1211,7 +1223,7 @@ i[34567]86-*-solaris2*) ;; *) echo "Unsupported CPU used in --with-cpu=$with_cpu, supported values:" 1>&2 - echo "generic core2 nocona x86-64 amdfam10 barcelona k8 opteron athlon64 athlon-fx" 1>&2 + echo "generic core2 nocona x86-64 amdfam10 barcelona k8 opteron athlon64 athlon-fx athlon64-sse3 k8-sse3 opteron-sse3" 1>&2 exit 1 ;; esac @@ -2191,7 +2203,7 @@ sparc-*-elf*) extra_parts="crti.o crtn.o crtbegin.o crtend.o" ;; sparc-*-linux*) # SPARC's running GNU/Linux, libc6 - tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h linux.h" + tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sparc/gas.h linux.h" extra_options="${extra_options} sparc/long-double-switch.opt" tmake_file="${tmake_file} sparc/t-linux" if test x$enable_targets = xall; then @@ -2216,7 +2228,7 @@ sparc64-*-solaris2* | sparcv9-*-solaris2*) esac tm_file="${tm_file} sparc/sol2.h sparc/sol2-64.h sparc/sol2-bi.h" if test x$gnu_ld = xyes; then - tm_file="${tm_file} sparc/sol2-gld.h sparc/sol2-gld-bi.h" + tm_file="${tm_file} sol2-gld.h sparc/sol2-gld-bi.h" fi if test x$gas = xyes; then tm_file="${tm_file} sparc/sol2-gas.h sparc/sol2-gas-bi.h" @@ -2228,6 +2240,9 @@ sparc64-*-solaris2* | sparcv9-*-solaris2*) else tmake_file="$tmake_file t-slibgcc-sld" fi + if test x$gas = xyes; then + tm_file="usegas.h ${tm_file}" + fi c_target_objs="sol2-c.o" cxx_target_objs="sol2-c.o" extra_objs="sol2.o" @@ -2247,7 +2262,7 @@ sparc-*-solaris2*) esac tm_file="${tm_file} sparc/sol2.h" if test x$gnu_ld = xyes; then - tm_file="${tm_file} sparc/sol2-gld.h" + tm_file="${tm_file} sol2-gld.h" fi if test x$gas = xyes; then tm_file="${tm_file} sparc/sol2-gas.h" @@ -2265,6 +2280,9 @@ sparc-*-solaris2*) if test x$gas = xyes; then tm_file="${tm_file} sparc/sol2-gas-bi.h" fi + if test x$gas = xyes; then + tm_file="usegas.h ${tm_file}" + fi tm_file="${tm_file} tm-dwarf2.h" tmake_file="$tmake_file sparc/t-sol2-64" test x$with_cpu != x || with_cpu=v9 @@ -2303,7 +2321,7 @@ sparc64-*-freebsd*|ultrasparc-*-freebsd*) esac ;; sparc64-*-linux*) # 64-bit SPARC's running GNU/Linux - tm_file="sparc/biarch64.h ${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h linux.h sparc/linux64.h" + tm_file="sparc/biarch64.h ${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sparc/gas.h linux.h sparc/linux64.h" extra_options="${extra_options} sparc/long-double-switch.opt" tmake_file="${tmake_file} sparc/t-linux sparc/t-linux64 sparc/t-crtfm" ;; @@ -2472,7 +2490,10 @@ if test x$with_cpu = x ; then amdfam10-*|barcelona-*) with_cpu=amdfam10 ;; - k8-*|opteron-*|athlon_64-*) + k8_sse3-*|opteron_sse3-*|athlon64_sse3-*) + with_cpu=k8-sse3 + ;; + k8-*|opteron-*|athlon64-*|athlon_fx-*) with_cpu=k8 ;; athlon_xp-*|athlon_mp-*|athlon_4-*) @@ -2518,7 +2539,10 @@ if test x$with_cpu = x ; then amdfam10-*|barcelona-*) with_cpu=amdfam10 ;; - k8-*|opteron-*|athlon_64-*) + k8_sse3-*|opteron_sse3-*|athlon64_sse3-*) + with_cpu=k8-sse3 + ;; + k8-*|opteron-*|athlon64-*|athlon_fx-*) with_cpu=k8 ;; nocona-*) @@ -2675,7 +2699,7 @@ case "${target}" in case "$with_fpu" in "" \ - | fpa | fpe2 | fpe3 | maverick | vfp | vfp3 | neon ) + | fpa | fpe2 | fpe3 | maverick | vfp | vfp3 | vfpv3 | vfpv3-d16 | neon ) # OK ;; *) @@ -2812,7 +2836,7 @@ case "${target}" in esac # OK ;; - "" | amdfam10 | barcelona | k8 | opteron | athlon64 | athlon-fx | nocona | core2 | generic) + "" | amdfam10 | barcelona | k8-sse3 | opteron-sse3 | athlon64-sse3 | k8 | opteron | athlon64 | athlon-fx | nocona | core2 | generic) # OK ;; *) diff --git a/contrib/gcc-4.4/gcc/config.in b/contrib/gcc-4.4/gcc/config.in index cb4d82bc5f..ea43afbb16 100644 --- a/contrib/gcc-4.4/gcc/config.in +++ b/contrib/gcc-4.4/gcc/config.in @@ -274,7 +274,19 @@ #endif -/* Define if your assembler supports the sahf mnemonic. */ +/* Define if your assembler supports the .quad directive. */ +#ifndef USED_FOR_TARGET +#undef HAVE_AS_IX86_QUAD +#endif + + +/* Define true if the assembler supports 'rep , lock '. */ +#ifndef USED_FOR_TARGET +#undef HAVE_AS_IX86_REP_LOCK_PREFIX +#endif + + +/* Define if your assembler supports the sahf mnemonic in 64bit mode. */ #ifndef USED_FOR_TARGET #undef HAVE_AS_IX86_SAHF #endif @@ -839,6 +851,12 @@ #endif +/* Define 0/1 if your assembler supports .cfi_sections. */ +#ifndef USED_FOR_TARGET +#undef HAVE_GAS_CFI_SECTIONS_DIRECTIVE +#endif + + /* Define if your assembler uses the new HImode fild and fist notation. */ #ifndef USED_FOR_TARGET #undef HAVE_GAS_FILDS_FISTS @@ -1049,6 +1067,12 @@ #endif +/* Define if your linker supports the *_sol2 emulations. */ +#ifndef USED_FOR_TARGET +#undef HAVE_LD_SOL2_EMULATION +#endif + + /* Define if your linker supports -Bstatic/-Bdynamic option. */ #ifndef USED_FOR_TARGET #undef HAVE_LD_STATIC_DYNAMIC diff --git a/contrib/gcc-4.4/gcc/config/i386/i386-protos.h b/contrib/gcc-4.4/gcc/config/i386/i386-protos.h index 4b0e2c01cf..48e22f87e2 100644 --- a/contrib/gcc-4.4/gcc/config/i386/i386-protos.h +++ b/contrib/gcc-4.4/gcc/config/i386/i386-protos.h @@ -136,8 +136,8 @@ extern enum machine_mode ix86_fp_compare_mode (enum rtx_code); extern rtx ix86_libcall_value (enum machine_mode); extern bool ix86_function_value_regno_p (int); extern bool ix86_function_arg_regno_p (int); -extern int ix86_function_arg_boundary (enum machine_mode, tree); -extern bool ix86_sol10_return_in_memory (const_tree,const_tree); +extern int ix86_function_arg_boundary (enum machine_mode, const_tree); +extern bool ix86_solaris_return_in_memory (const_tree, const_tree); extern rtx ix86_force_to_memory (enum machine_mode, rtx); extern void ix86_free_from_memory (enum machine_mode); extern int ix86_cfun_abi (void); diff --git a/contrib/gcc-4.4/gcc/config/i386/i386.c b/contrib/gcc-4.4/gcc/config/i386/i386.c index ca067edf41..2fc0358622 100644 --- a/contrib/gcc-4.4/gcc/config/i386/i386.c +++ b/contrib/gcc-4.4/gcc/config/i386/i386.c @@ -1,6 +1,6 @@ /* Subroutines used for code generation on IA-32. Copyright (C) 1988, 1992, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, - 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 + 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. This file is part of GCC. @@ -2358,7 +2358,7 @@ ix86_target_string (int isa, int flags, const char *arch, const char *tune, if (flags && add_nl_p) { opts[num++][0] = target_other; - sprintf (target_other, "(other flags: 0x%x)", isa); + sprintf (target_other, "(other flags: 0x%x)", flags); } /* Add -fpmath= option. */ @@ -5657,9 +5657,8 @@ function_arg_advance_64 (CUMULATIVE_ARGS *cum, enum machine_mode mode, if (!named && VALID_AVX256_REG_MODE (mode)) return; - if (!examine_argument (mode, type, 0, &int_nregs, &sse_nregs)) - cum->words += words; - else if (sse_nregs <= cum->sse_nregs && int_nregs <= cum->nregs) + if (examine_argument (mode, type, 0, &int_nregs, &sse_nregs) + && sse_nregs <= cum->sse_nregs && int_nregs <= cum->nregs) { cum->nregs -= int_nregs; cum->sse_nregs -= sse_nregs; @@ -5667,7 +5666,11 @@ function_arg_advance_64 (CUMULATIVE_ARGS *cum, enum machine_mode mode, cum->sse_regno += sse_nregs; } else - cum->words += words; + { + int align = ix86_function_arg_boundary (mode, type) / BITS_PER_WORD; + cum->words = (cum->words + align - 1) & ~(align - 1); + cum->words += words; + } } static void @@ -5996,7 +5999,7 @@ ix86_pass_by_reference (CUMULATIVE_ARGS *cum ATTRIBUTE_UNUSED, /* Return true when TYPE should be 128bit aligned for 32bit argument passing ABI. */ static bool -contains_aligned_value_p (tree type) +contains_aligned_value_p (const_tree type) { enum machine_mode mode = TYPE_MODE (type); if (((TARGET_SSE && SSE_REG_MODE_P (mode)) @@ -6046,7 +6049,7 @@ contains_aligned_value_p (tree type) specified mode and type. */ int -ix86_function_arg_boundary (enum machine_mode mode, tree type) +ix86_function_arg_boundary (enum machine_mode mode, const_tree type) { int align; if (type) @@ -6362,12 +6365,12 @@ ix86_return_in_memory (const_tree type, const_tree fntype ATTRIBUTE_UNUSED) } /* Return false iff TYPE is returned in memory. This version is used - on Solaris 10. It is similar to the generic ix86_return_in_memory, + on Solaris 2. It is similar to the generic ix86_return_in_memory, but differs notably in that when MMX is available, 8-byte vectors are returned in memory, rather than in MMX registers. */ bool -ix86_sol10_return_in_memory (const_tree type, const_tree fntype ATTRIBUTE_UNUSED) +ix86_solaris_return_in_memory (const_tree type, const_tree fntype ATTRIBUTE_UNUSED) { int size; enum machine_mode mode = type_natural_mode (type, NULL); @@ -6588,6 +6591,10 @@ setup_incoming_varargs_64 (CUMULATIVE_ARGS *cum) if (ix86_varargs_fpr_size) { + /* Stack must be aligned to 16byte for FP register save area. */ + if (crtl->stack_alignment_needed < 128) + crtl->stack_alignment_needed = 128; + /* Now emit code to save SSE registers. The AX parameter contains number of SSE parameter registers used to call this function. We use sse_prologue_save insn template that produces computed jump across @@ -8280,13 +8287,10 @@ ix86_expand_prologue (void) GEN_INT (-allocate), -1); else { - /* Only valid for Win32. */ rtx eax = gen_rtx_REG (Pmode, AX_REG); bool eax_live; rtx t; - gcc_assert (!TARGET_64BIT || cfun->machine->call_abi == MS_ABI); - if (cfun->machine->call_abi == MS_ABI) eax_live = false; else @@ -8675,10 +8679,12 @@ ix86_expand_epilogue (int style) int param_ptr_offset = (call_used_regs[REGNO (crtl->drap_reg)] ? 0 : UNITS_PER_WORD); gcc_assert (stack_realign_drap); - emit_insn ((*ix86_gen_add3) (stack_pointer_rtx, - crtl->drap_reg, - GEN_INT (-(UNITS_PER_WORD - + param_ptr_offset)))); + emit_insn (gen_rtx_SET + (VOIDmode, stack_pointer_rtx, + gen_rtx_PLUS (Pmode, + crtl->drap_reg, + GEN_INT (-(UNITS_PER_WORD + + param_ptr_offset))))); if (!call_used_regs[REGNO (crtl->drap_reg)]) emit_insn ((*ix86_gen_pop1) (crtl->drap_reg)); @@ -8878,8 +8884,7 @@ ix86_decompose_address (rtx addr, struct ix86_address *out) to test cfun for being non-NULL. */ if (TARGET_K6 && cfun && optimize_function_for_speed_p (cfun) && base_reg && !index_reg && !disp - && REG_P (base_reg) - && REGNO_REG_CLASS (REGNO (base_reg)) == SIREG) + && REG_P (base_reg) && REGNO (base_reg) == SI_REG) disp = const0_rtx; /* Special case: encode reg+reg instead of reg*2. */ @@ -10379,7 +10384,7 @@ i386_output_dwarf_dtprel (FILE *file, int size, rtx x) static bool ix86_pic_register_p (rtx x) { - if (GET_CODE (x) == VALUE) + if (GET_CODE (x) == VALUE && CSELIB_VAL_PTR (x)) return (pic_offset_table_rtx && rtx_equal_for_cselib_p (x, pic_offset_table_rtx)); else @@ -10823,7 +10828,6 @@ get_some_local_dynamic_name (void) L,W,B,Q,S,T -- print the opcode suffix for specified size of operand. C -- print opcode suffix for set/cmov insn. c -- like C, but print reversed condition - E,e -- likewise, but for compare-and-branch fused insn. F,f -- likewise, but for floating-point. O -- if HAVE_AS_IX86_CMOV_SUN_SYNTAX, expand to "w.", "l." or "q.", otherwise nothing @@ -11180,14 +11184,6 @@ print_operand (FILE *file, rtx x, int code) put_condition_code (GET_CODE (x), GET_MODE (XEXP (x, 0)), 1, 1, file); return; - case 'E': - put_condition_code (GET_CODE (x), CCmode, 0, 0, file); - return; - - case 'e': - put_condition_code (GET_CODE (x), CCmode, 1, 0, file); - return; - case 'H': /* It doesn't actually matter what mode we use here, as we're only going to use this for printing. */ @@ -11285,10 +11281,8 @@ print_operand (FILE *file, rtx x, int code) return; case ';': -#if TARGET_MACHO - fputs (" ; ", file); -#else - fputc (' ', file); +#if TARGET_MACHO || !HAVE_AS_IX86_REP_LOCK_PREFIX + fputs (";", file); #endif return; @@ -11313,13 +11307,14 @@ print_operand (FILE *file, rtx x, int code) case 2: size = "WORD"; break; case 4: size = "DWORD"; break; case 8: size = "QWORD"; break; - case 12: size = "XWORD"; break; + case 12: size = "TBYTE"; break; case 16: if (GET_MODE (x) == XFmode) - size = "XWORD"; + size = "TBYTE"; else size = "XMMWORD"; break; + case 32: size = "YMMWORD"; break; default: gcc_unreachable (); } @@ -15674,8 +15669,9 @@ ix86_expand_int_vcond (rtx operands[]) } } - /* Unsigned parallel compare is not supported by the hardware. Play some - tricks to turn this into a signed comparison against 0. */ + /* Unsigned parallel compare is not supported by the hardware. + Play some tricks to turn this into a signed comparison + against 0. */ if (code == GTU) { cop0 = force_reg (mode, cop0); @@ -15684,32 +15680,26 @@ ix86_expand_int_vcond (rtx operands[]) { case V4SImode: case V2DImode: - { - rtx t1, t2, mask; - - /* Perform a parallel modulo subtraction. */ - t1 = gen_reg_rtx (mode); - emit_insn ((mode == V4SImode - ? gen_subv4si3 - : gen_subv2di3) (t1, cop0, cop1)); - - /* Extract the original sign bit of op0. */ - mask = ix86_build_signbit_mask (GET_MODE_INNER (mode), - true, false); - t2 = gen_reg_rtx (mode); - emit_insn ((mode == V4SImode - ? gen_andv4si3 - : gen_andv2di3) (t2, cop0, mask)); - - /* XOR it back into the result of the subtraction. This results - in the sign bit set iff we saw unsigned underflow. */ - x = gen_reg_rtx (mode); - emit_insn ((mode == V4SImode - ? gen_xorv4si3 - : gen_xorv2di3) (x, t1, t2)); - - code = GT; - } + { + rtx t1, t2, mask; + rtx (*gen_sub3) (rtx, rtx, rtx); + + /* Subtract (-(INT MAX) - 1) from both operands to make + them signed. */ + mask = ix86_build_signbit_mask (GET_MODE_INNER (mode), + true, false); + gen_sub3 = (mode == V4SImode + ? gen_subv4si3 : gen_subv2di3); + t1 = gen_reg_rtx (mode); + emit_insn (gen_sub3 (t1, cop0, mask)); + + t2 = gen_reg_rtx (mode); + emit_insn (gen_sub3 (t2, cop1, mask)); + + cop0 = t1; + cop1 = t2; + code = GT; + } break; case V16QImode: @@ -15719,6 +15709,8 @@ ix86_expand_int_vcond (rtx operands[]) emit_insn (gen_rtx_SET (VOIDmode, x, gen_rtx_US_MINUS (mode, cop0, cop1))); + cop0 = x; + cop1 = CONST0_RTX (mode); code = EQ; negate = !negate; break; @@ -15726,9 +15718,6 @@ ix86_expand_int_vcond (rtx operands[]) default: gcc_unreachable (); } - - cop0 = x; - cop1 = CONST0_RTX (mode); } } @@ -20631,6 +20620,7 @@ def_builtin (int mask, const char *name, tree type, enum ix86_builtins code) { ix86_builtins_isa[(int) code].isa = mask; + mask &= ~OPTION_MASK_ISA_64BIT; if ((mask & ix86_isa_flags) != 0 || (lang_hooks.builtin_function == lang_hooks.builtin_function_ext_scope)) @@ -26850,7 +26840,7 @@ x86_function_profiler (FILE *file, int labelno ATTRIBUTE_UNUSED) if (TARGET_64BIT) { #ifndef NO_PROFILE_COUNTERS - fprintf (file, "\tleaq\t%sP%d@(%%rip),%%r11\n", LPREFIX, labelno); + fprintf (file, "\tleaq\t%sP%d(%%rip),%%r11\n", LPREFIX, labelno); #endif if (DEFAULT_ABI == SYSV_ABI && flag_pic) diff --git a/contrib/gcc-4.4/gcc/config/i386/i386.md b/contrib/gcc-4.4/gcc/config/i386/i386.md index c22c508f90..17eddfd82c 100644 --- a/contrib/gcc-4.4/gcc/config/i386/i386.md +++ b/contrib/gcc-4.4/gcc/config/i386/i386.md @@ -77,14 +77,15 @@ (UNSPEC_TLSDESC 23) ; Other random patterns + (UNSPEC_EH_RETURN 29) (UNSPEC_SCAS 30) (UNSPEC_FNSTSW 31) (UNSPEC_SAHF 32) - (UNSPEC_FSTCW 33) - (UNSPEC_ADD_CARRY 34) - (UNSPEC_FLDCW 35) - (UNSPEC_REP 36) - (UNSPEC_EH_RETURN 37) + (UNSPEC_PARITY 33) + (UNSPEC_FSTCW 34) + (UNSPEC_ADD_CARRY 35) + (UNSPEC_FLDCW 36) + (UNSPEC_REP 37) (UNSPEC_LD_MPIC 38) ; load_macho_picbase (UNSPEC_TRUNC_NOOP 39) @@ -1314,11 +1315,12 @@ UNSPEC_SAHF))] "TARGET_SAHF" { -#ifdef HAVE_AS_IX86_SAHF - return "sahf"; -#else - return ".byte\t0x9e"; +#ifndef HAVE_AS_IX86_SAHF + if (TARGET_64BIT) + return ".byte\t0x9e"; + else #endif + return "sahf"; } [(set_attr "length" "1") (set_attr "athlon_decode" "vector") @@ -1563,7 +1565,7 @@ return "movd\t{%1, %0|%0, %1}"; case TYPE_LEA: - return "lea{l}\t{%1, %0|%0, %1}"; + return "lea{l}\t{%a1, %0|%0, %a1}"; default: gcc_assert (!flag_pic || LEGITIMATE_PIC_OPERAND_P (operands[1])); @@ -6487,7 +6489,7 @@ switch (get_attr_type (insn)) { case TYPE_LEA: - operands[2] = SET_SRC (XVECEXP (PATTERN (insn), 0, 0)); + operands[2] = XEXP (SET_SRC (XVECEXP (PATTERN (insn), 0, 0)), 0); return "lea{l}\t{%a2, %k0|%k0, %a2}"; case TYPE_INCDEC: @@ -7324,7 +7326,7 @@ } } [(set (attr "type") - (if_then_else (match_operand:HI 2 "incdec_operand" "") + (if_then_else (match_operand:QI 2 "incdec_operand" "") (const_string "incdec") (const_string "alu"))) (set_attr "mode" "QI")]) @@ -9880,7 +9882,7 @@ (const_int 8)))) (clobber (reg:CC FLAGS_REG))] "(!TARGET_PARTIAL_REG_STALL || optimize_function_for_size_p (cfun))" - "ior{b}\t{%h2, %h0|%h0, %h2}" + "or{b}\t{%h2, %h0|%h0, %h2}" [(set_attr "type" "alu") (set_attr "length_immediate" "0") (set_attr "mode" "QI")]) @@ -11585,7 +11587,7 @@ "TARGET_64BIT && reload_completed && true_regnum (operands[0]) != true_regnum (operands[1])" [(set (match_dup 0) (zero_extend:DI - (subreg:SI (mult:SI (match_dup 1) + (subreg:SI (mult:DI (match_dup 1) (match_dup 2)) 0)))] { operands[1] = gen_lowpart (Pmode, operands[1]); @@ -14941,6 +14943,10 @@ ;; checked for calls. This is a bug in the generic code, but it isn't that ;; easy to fix. Ignore it for now and be prepared to fix things up. +;; P6 processors will jump to the address after the decrement when %esp +;; is used as a call operand, so they will execute return address as a code. +;; See Pentium Pro errata 70, Pentium 2 errata A33 and Pentium 3 errata E17. + ;; Call subroutine returning no value. (define_expand "call_pop" @@ -14970,11 +14976,11 @@ [(set_attr "type" "call")]) (define_insn "*call_pop_1" - [(call (mem:QI (match_operand:SI 0 "call_insn_operand" "rsm")) + [(call (mem:QI (match_operand:SI 0 "call_insn_operand" "lsm")) (match_operand:SI 1 "" "")) (set (reg:SI SP_REG) (plus:SI (reg:SI SP_REG) (match_operand:SI 2 "immediate_operand" "i")))] - "!SIBLING_CALL_P (insn) && !TARGET_64BIT" + "!TARGET_64BIT && !SIBLING_CALL_P (insn)" { if (constant_call_address_operand (operands[0], Pmode)) return "call\t%P0"; @@ -14987,7 +14993,7 @@ (match_operand:SI 1 "" "")) (set (reg:SI SP_REG) (plus:SI (reg:SI SP_REG) (match_operand:SI 2 "immediate_operand" "i,i")))] - "SIBLING_CALL_P (insn) && !TARGET_64BIT" + "!TARGET_64BIT && SIBLING_CALL_P (insn)" "@ jmp\t%P0 jmp\t%A0" @@ -15026,9 +15032,9 @@ [(set_attr "type" "call")]) (define_insn "*call_1" - [(call (mem:QI (match_operand:SI 0 "call_insn_operand" "rsm")) + [(call (mem:QI (match_operand:SI 0 "call_insn_operand" "lsm")) (match_operand 1 "" ""))] - "!SIBLING_CALL_P (insn) && !TARGET_64BIT" + "!TARGET_64BIT && !SIBLING_CALL_P (insn)" { if (constant_call_address_operand (operands[0], Pmode)) return "call\t%P0"; @@ -15039,7 +15045,7 @@ (define_insn "*sibcall_1" [(call (mem:QI (match_operand:SI 0 "sibcall_insn_operand" "s,U")) (match_operand 1 "" ""))] - "SIBLING_CALL_P (insn) && !TARGET_64BIT" + "!TARGET_64BIT && SIBLING_CALL_P (insn)" "@ jmp\t%P0 jmp\t%A0" @@ -15048,7 +15054,7 @@ (define_insn "*call_1_rex64" [(call (mem:QI (match_operand:DI 0 "call_insn_operand" "rsm")) (match_operand 1 "" ""))] - "!SIBLING_CALL_P (insn) && TARGET_64BIT + "TARGET_64BIT && !SIBLING_CALL_P (insn) && ix86_cmodel != CM_LARGE && ix86_cmodel != CM_LARGE_PIC" { if (constant_call_address_operand (operands[0], Pmode)) @@ -15073,7 +15079,7 @@ (clobber (reg:TI XMM15_REG)) (clobber (reg:DI SI_REG)) (clobber (reg:DI DI_REG))] - "!SIBLING_CALL_P (insn) && TARGET_64BIT" + "TARGET_64BIT && !SIBLING_CALL_P (insn)" { if (constant_call_address_operand (operands[0], Pmode)) return "call\t%P0"; @@ -15084,14 +15090,14 @@ (define_insn "*call_1_rex64_large" [(call (mem:QI (match_operand:DI 0 "call_insn_operand" "rm")) (match_operand 1 "" ""))] - "!SIBLING_CALL_P (insn) && TARGET_64BIT" + "TARGET_64BIT && !SIBLING_CALL_P (insn)" "call\t%A0" [(set_attr "type" "call")]) (define_insn "*sibcall_1_rex64" [(call (mem:QI (match_operand:DI 0 "sibcall_insn_operand" "s,U")) (match_operand 1 "" ""))] - "SIBLING_CALL_P (insn) && TARGET_64BIT" + "TARGET_64BIT && SIBLING_CALL_P (insn)" "@ jmp\t%P0 jmp\t%A0" @@ -15768,7 +15774,8 @@ (define_insn_and_split "paritydi2_cmp" [(set (reg:CC FLAGS_REG) - (parity:CC (match_operand:DI 3 "register_operand" "0"))) + (unspec:CC [(match_operand:DI 3 "register_operand" "0")] + UNSPEC_PARITY)) (clobber (match_scratch:DI 0 "=r")) (clobber (match_scratch:SI 1 "=&r")) (clobber (match_scratch:HI 2 "=Q"))] @@ -15781,7 +15788,7 @@ (clobber (reg:CC FLAGS_REG))]) (parallel [(set (reg:CC FLAGS_REG) - (parity:CC (match_dup 1))) + (unspec:CC [(match_dup 1)] UNSPEC_PARITY)) (clobber (match_dup 1)) (clobber (match_dup 2))])] { @@ -15817,7 +15824,8 @@ (define_insn_and_split "paritysi2_cmp" [(set (reg:CC FLAGS_REG) - (parity:CC (match_operand:SI 2 "register_operand" "0"))) + (unspec:CC [(match_operand:SI 2 "register_operand" "0")] + UNSPEC_PARITY)) (clobber (match_scratch:SI 0 "=r")) (clobber (match_scratch:HI 1 "=&Q"))] "! TARGET_POPCNT" @@ -15829,7 +15837,7 @@ (clobber (reg:CC FLAGS_REG))]) (parallel [(set (reg:CC FLAGS_REG) - (parity:CC (match_dup 1))) + (unspec:CC [(match_dup 1)] UNSPEC_PARITY)) (clobber (match_dup 1))])] { operands[3] = gen_lowpart (HImode, operands[2]); @@ -15840,20 +15848,13 @@ (define_insn "*parityhi2_cmp" [(set (reg:CC FLAGS_REG) - (parity:CC (match_operand:HI 1 "register_operand" "0"))) + (unspec:CC [(match_operand:HI 1 "register_operand" "0")] + UNSPEC_PARITY)) (clobber (match_scratch:HI 0 "=Q"))] "! TARGET_POPCNT" "xor{b}\t{%h0, %b0|%b0, %h0}" [(set_attr "length" "2") (set_attr "mode" "HI")]) - -(define_insn "*parityqi2_cmp" - [(set (reg:CC FLAGS_REG) - (parity:CC (match_operand:QI 0 "register_operand" "q")))] - "! TARGET_POPCNT" - "test{b}\t%0, %0" - [(set_attr "length" "2") - (set_attr "mode" "QI")]) ;; Thread-local storage patterns for ELF. ;; @@ -19140,7 +19141,7 @@ (mem:BLK (match_dup 4))) (use (match_dup 5))] "TARGET_64BIT" - "rep movsq" + "rep{%;} movsq" [(set_attr "type" "str") (set_attr "prefix_rep" "1") (set_attr "memory" "both") @@ -19159,7 +19160,7 @@ (mem:BLK (match_dup 4))) (use (match_dup 5))] "!TARGET_64BIT" - "rep movs{l|d}" + "rep{%;} movs{l|d}" [(set_attr "type" "str") (set_attr "prefix_rep" "1") (set_attr "memory" "both") @@ -19178,7 +19179,7 @@ (mem:BLK (match_dup 4))) (use (match_dup 5))] "TARGET_64BIT" - "rep movs{l|d}" + "rep{%;} movs{l|d}" [(set_attr "type" "str") (set_attr "prefix_rep" "1") (set_attr "memory" "both") @@ -19195,7 +19196,7 @@ (mem:BLK (match_dup 4))) (use (match_dup 5))] "!TARGET_64BIT" - "rep movsb" + "rep{%;} movsb" [(set_attr "type" "str") (set_attr "prefix_rep" "1") (set_attr "memory" "both") @@ -19212,7 +19213,7 @@ (mem:BLK (match_dup 4))) (use (match_dup 5))] "TARGET_64BIT" - "rep movsb" + "rep{%;} movsb" [(set_attr "type" "str") (set_attr "prefix_rep" "1") (set_attr "memory" "both") @@ -19392,7 +19393,7 @@ (use (match_operand:DI 2 "register_operand" "a")) (use (match_dup 4))] "TARGET_64BIT" - "rep stosq" + "rep{%;} stosq" [(set_attr "type" "str") (set_attr "prefix_rep" "1") (set_attr "memory" "store") @@ -19409,7 +19410,7 @@ (use (match_operand:SI 2 "register_operand" "a")) (use (match_dup 4))] "!TARGET_64BIT" - "rep stos{l|d}" + "rep{%;} stos{l|d}" [(set_attr "type" "str") (set_attr "prefix_rep" "1") (set_attr "memory" "store") @@ -19426,7 +19427,7 @@ (use (match_operand:SI 2 "register_operand" "a")) (use (match_dup 4))] "TARGET_64BIT" - "rep stos{l|d}" + "rep{%;} stos{l|d}" [(set_attr "type" "str") (set_attr "prefix_rep" "1") (set_attr "memory" "store") @@ -19442,7 +19443,7 @@ (use (match_operand:QI 2 "register_operand" "a")) (use (match_dup 4))] "!TARGET_64BIT" - "rep stosb" + "rep{%;} stosb" [(set_attr "type" "str") (set_attr "prefix_rep" "1") (set_attr "memory" "store") @@ -19458,7 +19459,7 @@ (use (match_operand:QI 2 "register_operand" "a")) (use (match_dup 4))] "TARGET_64BIT" - "rep stosb" + "rep{%;} stosb" [(set_attr "type" "str") (set_attr "prefix_rep" "1") (set_attr "memory" "store") @@ -19570,7 +19571,7 @@ (clobber (match_operand:SI 1 "register_operand" "=D")) (clobber (match_operand:SI 2 "register_operand" "=c"))] "!TARGET_64BIT" - "repz cmpsb" + "repz{%;} cmpsb" [(set_attr "type" "str") (set_attr "mode" "QI") (set_attr "prefix_rep" "1")]) @@ -19585,7 +19586,7 @@ (clobber (match_operand:DI 1 "register_operand" "=D")) (clobber (match_operand:DI 2 "register_operand" "=c"))] "TARGET_64BIT" - "repz cmpsb" + "repz{%;} cmpsb" [(set_attr "type" "str") (set_attr "mode" "QI") (set_attr "prefix_rep" "1")]) @@ -19620,7 +19621,7 @@ (clobber (match_operand:SI 1 "register_operand" "=D")) (clobber (match_operand:SI 2 "register_operand" "=c"))] "!TARGET_64BIT" - "repz cmpsb" + "repz{%;} cmpsb" [(set_attr "type" "str") (set_attr "mode" "QI") (set_attr "prefix_rep" "1")]) @@ -19638,7 +19639,7 @@ (clobber (match_operand:DI 1 "register_operand" "=D")) (clobber (match_operand:DI 2 "register_operand" "=c"))] "TARGET_64BIT" - "repz cmpsb" + "repz{%;} cmpsb" [(set_attr "type" "str") (set_attr "mode" "QI") (set_attr "prefix_rep" "1")]) @@ -19685,7 +19686,7 @@ (clobber (match_operand:SI 1 "register_operand" "=D")) (clobber (reg:CC FLAGS_REG))] "!TARGET_64BIT" - "repnz scasb" + "repnz{%;} scasb" [(set_attr "type" "str") (set_attr "mode" "QI") (set_attr "prefix_rep" "1")]) @@ -19699,7 +19700,7 @@ (clobber (match_operand:DI 1 "register_operand" "=D")) (clobber (reg:CC FLAGS_REG))] "TARGET_64BIT" - "repnz scasb" + "repnz{%;} scasb" [(set_attr "type" "str") (set_attr "mode" "QI") (set_attr "prefix_rep" "1")]) @@ -21469,11 +21470,11 @@ (define_insn "*call_value_pop_1" [(set (match_operand 0 "" "") - (call (mem:QI (match_operand:SI 1 "call_insn_operand" "rsm")) + (call (mem:QI (match_operand:SI 1 "call_insn_operand" "lsm")) (match_operand:SI 2 "" ""))) (set (reg:SI SP_REG) (plus:SI (reg:SI SP_REG) (match_operand:SI 3 "immediate_operand" "i")))] - "!SIBLING_CALL_P (insn) && !TARGET_64BIT" + "!TARGET_64BIT && !SIBLING_CALL_P (insn)" { if (constant_call_address_operand (operands[1], Pmode)) return "call\t%P1"; @@ -21487,7 +21488,7 @@ (match_operand:SI 2 "" ""))) (set (reg:SI SP_REG) (plus:SI (reg:SI SP_REG) (match_operand:SI 3 "immediate_operand" "i,i")))] - "SIBLING_CALL_P (insn) && !TARGET_64BIT" + "!TARGET_64BIT && SIBLING_CALL_P (insn)" "@ jmp\t%P1 jmp\t%A1" @@ -21536,7 +21537,7 @@ (clobber (reg:TI XMM15_REG)) (clobber (reg:DI SI_REG)) (clobber (reg:DI DI_REG))] - "!SIBLING_CALL_P (insn) && TARGET_64BIT" + "TARGET_64BIT && !SIBLING_CALL_P (insn)" { if (SIBLING_CALL_P (insn)) return "jmp\t%P1"; @@ -21547,9 +21548,9 @@ (define_insn "*call_value_1" [(set (match_operand 0 "" "") - (call (mem:QI (match_operand:SI 1 "call_insn_operand" "rsm")) + (call (mem:QI (match_operand:SI 1 "call_insn_operand" "lsm")) (match_operand:SI 2 "" "")))] - "!SIBLING_CALL_P (insn) && !TARGET_64BIT" + "!TARGET_64BIT && !SIBLING_CALL_P (insn)" { if (constant_call_address_operand (operands[1], Pmode)) return "call\t%P1"; @@ -21561,7 +21562,7 @@ [(set (match_operand 0 "" "") (call (mem:QI (match_operand:SI 1 "sibcall_insn_operand" "s,U")) (match_operand:SI 2 "" "")))] - "SIBLING_CALL_P (insn) && !TARGET_64BIT" + "!TARGET_64BIT && SIBLING_CALL_P (insn)" "@ jmp\t%P1 jmp\t%A1" @@ -21571,7 +21572,7 @@ [(set (match_operand 0 "" "") (call (mem:QI (match_operand:DI 1 "call_insn_operand" "rsm")) (match_operand:DI 2 "" "")))] - "!SIBLING_CALL_P (insn) && TARGET_64BIT + "TARGET_64BIT && !SIBLING_CALL_P (insn) && ix86_cmodel != CM_LARGE && ix86_cmodel != CM_LARGE_PIC" { if (constant_call_address_operand (operands[1], Pmode)) @@ -21609,7 +21610,7 @@ [(set (match_operand 0 "" "") (call (mem:QI (match_operand:DI 1 "call_insn_operand" "rm")) (match_operand:DI 2 "" "")))] - "!SIBLING_CALL_P (insn) && TARGET_64BIT" + "TARGET_64BIT && !SIBLING_CALL_P (insn)" "call\t%A1" [(set_attr "type" "callv")]) @@ -21617,7 +21618,7 @@ [(set (match_operand 0 "" "") (call (mem:QI (match_operand:DI 1 "sibcall_insn_operand" "s,U")) (match_operand:DI 2 "" "")))] - "SIBLING_CALL_P (insn) && TARGET_64BIT" + "TARGET_64BIT && SIBLING_CALL_P (insn)" "@ jmp\t%P1 jmp\t%A1" @@ -21932,7 +21933,7 @@ [(set_attr "type" "multi")]) (define_mode_iterator CRC32MODE [QI HI SI]) -(define_mode_attr crc32modesuffix [(QI "b") (HI "w") (SI "l")]) +(define_mode_attr crc32modesuffix [(QI "{b}") (HI "{w}") (SI "{l}")]) (define_mode_attr crc32modeconstraint [(QI "qm") (HI "rm") (SI "rm")]) (define_insn "sse4_2_crc32" @@ -21955,7 +21956,7 @@ (match_operand:DI 2 "nonimmediate_operand" "rm")] UNSPEC_CRC32))] "TARGET_SSE4_2 && TARGET_64BIT" - "crc32q\t{%2, %0|%0, %2}" + "crc32{q}\t{%2, %0|%0, %2}" [(set_attr "type" "sselog1") (set_attr "prefix_rep" "1") (set_attr "prefix_extra" "1") diff --git a/contrib/gcc-4.4/gcc/config/i386/mmx.md b/contrib/gcc-4.4/gcc/config/i386/mmx.md index 5184b1d7f5..c0bf504384 100644 --- a/contrib/gcc-4.4/gcc/config/i386/mmx.md +++ b/contrib/gcc-4.4/gcc/config/i386/mmx.md @@ -336,7 +336,7 @@ "TARGET_3DNOW && !(MEM_P (operands[0]) && MEM_P (operands[1]))" "@ pfsub\t{%2, %0|%0, %2} - pfsubr\t{%2, %0|%0, %2}" + pfsubr\t{%1, %0|%0, %1}" [(set_attr "type" "mmxadd") (set_attr "mode" "V2SF")]) @@ -1202,7 +1202,10 @@ "TARGET_SSE || TARGET_3DNOW_A" { operands[3] = GEN_INT (exact_log2 (INTVAL (operands[3]))); - return "pinsrw\t{%3, %k2, %0|%0, %k2, %3}"; + if (MEM_P (operands[2])) + return "pinsrw\t{%3, %2, %0|%0, %2, %3}"; + else + return "pinsrw\t{%3, %k2, %0|%0, %k2, %3}"; } [(set_attr "type" "mmxcvt") (set_attr "mode" "DI")]) diff --git a/contrib/gcc-4.4/gcc/config/i386/predicates.md b/contrib/gcc-4.4/gcc/config/i386/predicates.md index f1c7103333..fce6cf3a3f 100644 --- a/contrib/gcc-4.4/gcc/config/i386/predicates.md +++ b/contrib/gcc-4.4/gcc/config/i386/predicates.md @@ -519,6 +519,22 @@ FIRST_PSEUDO_REGISTER, LAST_VIRTUAL_REGISTER)); }) +;; P6 processors will jump to the address after the decrement when %esp +;; is used as a call operand, so they will execute return address as a code. +;; See Pentium Pro errata 70, Pentium 2 errata A33 and Pentium 3 errata E17. + +(define_predicate "call_register_no_elim_operand" + (match_operand 0 "register_operand") +{ + if (GET_CODE (op) == SUBREG) + op = SUBREG_REG (op); + + if (!TARGET_64BIT && op == stack_pointer_rtx) + return 0; + + return register_no_elim_operand (op, mode); +}) + ;; Similarly, but include the stack pointer. This is used to prevent esp ;; from being used as an index reg. (define_predicate "index_register_operand" @@ -547,7 +563,7 @@ ;; Test for a valid operand for a call instruction. (define_predicate "call_insn_operand" (ior (match_operand 0 "constant_call_address_operand") - (ior (match_operand 0 "register_no_elim_operand") + (ior (match_operand 0 "call_register_no_elim_operand") (match_operand 0 "memory_operand")))) ;; Similarly, but for tail calls, in which we cannot allow memory references. diff --git a/contrib/gcc-4.4/gcc/config/i386/sse.md b/contrib/gcc-4.4/gcc/config/i386/sse.md index c2dd7f1317..686ba13153 100644 --- a/contrib/gcc-4.4/gcc/config/i386/sse.md +++ b/contrib/gcc-4.4/gcc/config/i386/sse.md @@ -2307,7 +2307,7 @@ (parallel [(const_int 0)]))] UNSPEC_FIX_NOTRUNC))] "TARGET_SSE && TARGET_64BIT" - "%vcvtss2siq\t{%1, %0|%0, %1}" + "%vcvtss2si{q}\t{%1, %0|%0, %1}" [(set_attr "type" "sseicvt") (set_attr "athlon_decode" "double,vector") (set_attr "prefix_rep" "1") @@ -2319,7 +2319,7 @@ (unspec:DI [(match_operand:SF 1 "nonimmediate_operand" "x,m")] UNSPEC_FIX_NOTRUNC))] "TARGET_SSE && TARGET_64BIT" - "%vcvtss2siq\t{%1, %0|%0, %1}" + "%vcvtss2si{q}\t{%1, %0|%0, %1}" [(set_attr "type" "sseicvt") (set_attr "athlon_decode" "double,vector") (set_attr "amdfam10_decode" "double,double") @@ -2349,7 +2349,7 @@ (match_operand:V4SF 1 "nonimmediate_operand" "x,m") (parallel [(const_int 0)]))))] "TARGET_SSE && TARGET_64BIT" - "%vcvttss2siq\t{%1, %0|%0, %1}" + "%vcvttss2si{q}\t{%1, %0|%0, %1}" [(set_attr "type" "sseicvt") (set_attr "athlon_decode" "double,vector") (set_attr "amdfam10_decode" "double,double") @@ -3767,7 +3767,7 @@ (parallel [(const_int 0) (const_int 1) (const_int 2) (const_int 3)])))] "TARGET_AVX" - "vextractf128\t{$0x1, %1, %0|%0, %1, 0x1}" + "vextractf128\t{$0x0, %1, %0|%0, %1, 0x0}" [(set_attr "type" "sselog") (set_attr "memory" "none,store") (set_attr "prefix" "vex") @@ -3795,7 +3795,7 @@ (const_int 4) (const_int 5) (const_int 6) (const_int 7)])))] "TARGET_AVX" - "vextractf128\t{$0x1, %1, %0|%0, %1, 0x1}" + "vextractf128\t{$0x0, %1, %0|%0, %1, 0x0}" [(set_attr "type" "sselog") (set_attr "memory" "none,store") (set_attr "prefix" "vex") @@ -3829,7 +3829,7 @@ (const_int 12) (const_int 13) (const_int 14) (const_int 15)])))] "TARGET_AVX" - "vextractf128\t{$0x1, %1, %0|%0, %1, 0x1}" + "vextractf128\t{$0x0, %1, %0|%0, %1, 0x0}" [(set_attr "type" "sselog") (set_attr "memory" "none,store") (set_attr "prefix" "vex") @@ -6590,7 +6590,10 @@ "TARGET_AVX" { operands[3] = GEN_INT (exact_log2 (INTVAL (operands[3]))); - return "vpinsr\t{%3, %k2, %1, %0|%0, %1, %k2, %3}"; + if (MEM_P (operands[2])) + return "vpinsr\t{%3, %2, %1, %0|%0, %1, %2, %3}"; + else + return "vpinsr\t{%3, %k2, %1, %0|%0, %1, %k2, %3}"; } [(set_attr "type" "sselog") (set_attr "prefix" "vex") @@ -6606,7 +6609,10 @@ "TARGET_SSE4_1" { operands[3] = GEN_INT (exact_log2 (INTVAL (operands[3]))); - return "pinsrb\t{%3, %k2, %0|%0, %k2, %3}"; + if (MEM_P (operands[2])) + return "pinsrb\t{%3, %2, %0|%0, %2, %3}"; + else + return "pinsrb\t{%3, %k2, %0|%0, %k2, %3}"; } [(set_attr "type" "sselog") (set_attr "prefix_extra" "1") @@ -6622,7 +6628,10 @@ "TARGET_SSE2" { operands[3] = GEN_INT (exact_log2 (INTVAL (operands[3]))); - return "pinsrw\t{%3, %k2, %0|%0, %k2, %3}"; + if (MEM_P (operands[2])) + return "pinsrw\t{%3, %2, %0|%0, %2, %3}"; + else + return "pinsrw\t{%3, %k2, %0|%0, %k2, %3}"; } [(set_attr "type" "sselog") (set_attr "prefix_data16" "1") @@ -9075,28 +9084,7 @@ [(set (match_operand:V8HI 0 "register_operand" "=x") (sign_extend:V8HI (vec_select:V8QI - (match_operand:V16QI 1 "register_operand" "x") - (parallel [(const_int 0) - (const_int 1) - (const_int 2) - (const_int 3) - (const_int 4) - (const_int 5) - (const_int 6) - (const_int 7)]))))] - "TARGET_SSE4_1" - "%vpmovsxbw\t{%1, %0|%0, %1}" - [(set_attr "type" "ssemov") - (set_attr "prefix_extra" "1") - (set_attr "prefix" "maybe_vex") - (set_attr "mode" "TI")]) - -(define_insn "*sse4_1_extendv8qiv8hi2" - [(set (match_operand:V8HI 0 "register_operand" "=x") - (sign_extend:V8HI - (vec_select:V8QI - (vec_duplicate:V16QI - (match_operand:V8QI 1 "nonimmediate_operand" "xm")) + (match_operand:V16QI 1 "nonimmediate_operand" "xm") (parallel [(const_int 0) (const_int 1) (const_int 2) @@ -9116,24 +9104,7 @@ [(set (match_operand:V4SI 0 "register_operand" "=x") (sign_extend:V4SI (vec_select:V4QI - (match_operand:V16QI 1 "register_operand" "x") - (parallel [(const_int 0) - (const_int 1) - (const_int 2) - (const_int 3)]))))] - "TARGET_SSE4_1" - "%vpmovsxbd\t{%1, %0|%0, %1}" - [(set_attr "type" "ssemov") - (set_attr "prefix_extra" "1") - (set_attr "prefix" "maybe_vex") - (set_attr "mode" "TI")]) - -(define_insn "*sse4_1_extendv4qiv4si2" - [(set (match_operand:V4SI 0 "register_operand" "=x") - (sign_extend:V4SI - (vec_select:V4QI - (vec_duplicate:V16QI - (match_operand:V4QI 1 "nonimmediate_operand" "xm")) + (match_operand:V16QI 1 "nonimmediate_operand" "xm") (parallel [(const_int 0) (const_int 1) (const_int 2) @@ -9149,22 +9120,7 @@ [(set (match_operand:V2DI 0 "register_operand" "=x") (sign_extend:V2DI (vec_select:V2QI - (match_operand:V16QI 1 "register_operand" "x") - (parallel [(const_int 0) - (const_int 1)]))))] - "TARGET_SSE4_1" - "%vpmovsxbq\t{%1, %0|%0, %1}" - [(set_attr "type" "ssemov") - (set_attr "prefix_extra" "1") - (set_attr "prefix" "maybe_vex") - (set_attr "mode" "TI")]) - -(define_insn "*sse4_1_extendv2qiv2di2" - [(set (match_operand:V2DI 0 "register_operand" "=x") - (sign_extend:V2DI - (vec_select:V2QI - (vec_duplicate:V16QI - (match_operand:V2QI 1 "nonimmediate_operand" "xm")) + (match_operand:V16QI 1 "nonimmediate_operand" "xm") (parallel [(const_int 0) (const_int 1)]))))] "TARGET_SSE4_1" @@ -9178,24 +9134,7 @@ [(set (match_operand:V4SI 0 "register_operand" "=x") (sign_extend:V4SI (vec_select:V4HI - (match_operand:V8HI 1 "register_operand" "x") - (parallel [(const_int 0) - (const_int 1) - (const_int 2) - (const_int 3)]))))] - "TARGET_SSE4_1" - "%vpmovsxwd\t{%1, %0|%0, %1}" - [(set_attr "type" "ssemov") - (set_attr "prefix_extra" "1") - (set_attr "prefix" "maybe_vex") - (set_attr "mode" "TI")]) - -(define_insn "*sse4_1_extendv4hiv4si2" - [(set (match_operand:V4SI 0 "register_operand" "=x") - (sign_extend:V4SI - (vec_select:V4HI - (vec_duplicate:V8HI - (match_operand:V2HI 1 "nonimmediate_operand" "xm")) + (match_operand:V8HI 1 "nonimmediate_operand" "xm") (parallel [(const_int 0) (const_int 1) (const_int 2) @@ -9211,22 +9150,7 @@ [(set (match_operand:V2DI 0 "register_operand" "=x") (sign_extend:V2DI (vec_select:V2HI - (match_operand:V8HI 1 "register_operand" "x") - (parallel [(const_int 0) - (const_int 1)]))))] - "TARGET_SSE4_1" - "%vpmovsxwq\t{%1, %0|%0, %1}" - [(set_attr "type" "ssemov") - (set_attr "prefix_extra" "1") - (set_attr "prefix" "maybe_vex") - (set_attr "mode" "TI")]) - -(define_insn "*sse4_1_extendv2hiv2di2" - [(set (match_operand:V2DI 0 "register_operand" "=x") - (sign_extend:V2DI - (vec_select:V2HI - (vec_duplicate:V8HI - (match_operand:V8HI 1 "nonimmediate_operand" "xm")) + (match_operand:V8HI 1 "nonimmediate_operand" "xm") (parallel [(const_int 0) (const_int 1)]))))] "TARGET_SSE4_1" @@ -9240,22 +9164,7 @@ [(set (match_operand:V2DI 0 "register_operand" "=x") (sign_extend:V2DI (vec_select:V2SI - (match_operand:V4SI 1 "register_operand" "x") - (parallel [(const_int 0) - (const_int 1)]))))] - "TARGET_SSE4_1" - "%vpmovsxdq\t{%1, %0|%0, %1}" - [(set_attr "type" "ssemov") - (set_attr "prefix_extra" "1") - (set_attr "prefix" "maybe_vex") - (set_attr "mode" "TI")]) - -(define_insn "*sse4_1_extendv2siv2di2" - [(set (match_operand:V2DI 0 "register_operand" "=x") - (sign_extend:V2DI - (vec_select:V2SI - (vec_duplicate:V4SI - (match_operand:V2SI 1 "nonimmediate_operand" "xm")) + (match_operand:V4SI 1 "nonimmediate_operand" "xm") (parallel [(const_int 0) (const_int 1)]))))] "TARGET_SSE4_1" @@ -9269,28 +9178,7 @@ [(set (match_operand:V8HI 0 "register_operand" "=x") (zero_extend:V8HI (vec_select:V8QI - (match_operand:V16QI 1 "register_operand" "x") - (parallel [(const_int 0) - (const_int 1) - (const_int 2) - (const_int 3) - (const_int 4) - (const_int 5) - (const_int 6) - (const_int 7)]))))] - "TARGET_SSE4_1" - "%vpmovzxbw\t{%1, %0|%0, %1}" - [(set_attr "type" "ssemov") - (set_attr "prefix_extra" "1") - (set_attr "prefix" "maybe_vex") - (set_attr "mode" "TI")]) - -(define_insn "*sse4_1_zero_extendv8qiv8hi2" - [(set (match_operand:V8HI 0 "register_operand" "=x") - (zero_extend:V8HI - (vec_select:V8QI - (vec_duplicate:V16QI - (match_operand:V8QI 1 "nonimmediate_operand" "xm")) + (match_operand:V16QI 1 "nonimmediate_operand" "xm") (parallel [(const_int 0) (const_int 1) (const_int 2) @@ -9310,24 +9198,7 @@ [(set (match_operand:V4SI 0 "register_operand" "=x") (zero_extend:V4SI (vec_select:V4QI - (match_operand:V16QI 1 "register_operand" "x") - (parallel [(const_int 0) - (const_int 1) - (const_int 2) - (const_int 3)]))))] - "TARGET_SSE4_1" - "%vpmovzxbd\t{%1, %0|%0, %1}" - [(set_attr "type" "ssemov") - (set_attr "prefix_extra" "1") - (set_attr "prefix" "maybe_vex") - (set_attr "mode" "TI")]) - -(define_insn "*sse4_1_zero_extendv4qiv4si2" - [(set (match_operand:V4SI 0 "register_operand" "=x") - (zero_extend:V4SI - (vec_select:V4QI - (vec_duplicate:V16QI - (match_operand:V4QI 1 "nonimmediate_operand" "xm")) + (match_operand:V16QI 1 "nonimmediate_operand" "xm") (parallel [(const_int 0) (const_int 1) (const_int 2) @@ -9343,22 +9214,7 @@ [(set (match_operand:V2DI 0 "register_operand" "=x") (zero_extend:V2DI (vec_select:V2QI - (match_operand:V16QI 1 "register_operand" "x") - (parallel [(const_int 0) - (const_int 1)]))))] - "TARGET_SSE4_1" - "%vpmovzxbq\t{%1, %0|%0, %1}" - [(set_attr "type" "ssemov") - (set_attr "prefix_extra" "1") - (set_attr "prefix" "maybe_vex") - (set_attr "mode" "TI")]) - -(define_insn "*sse4_1_zero_extendv2qiv2di2" - [(set (match_operand:V2DI 0 "register_operand" "=x") - (zero_extend:V2DI - (vec_select:V2QI - (vec_duplicate:V16QI - (match_operand:V2QI 1 "nonimmediate_operand" "xm")) + (match_operand:V16QI 1 "nonimmediate_operand" "xm") (parallel [(const_int 0) (const_int 1)]))))] "TARGET_SSE4_1" @@ -9372,24 +9228,7 @@ [(set (match_operand:V4SI 0 "register_operand" "=x") (zero_extend:V4SI (vec_select:V4HI - (match_operand:V8HI 1 "register_operand" "x") - (parallel [(const_int 0) - (const_int 1) - (const_int 2) - (const_int 3)]))))] - "TARGET_SSE4_1" - "%vpmovzxwd\t{%1, %0|%0, %1}" - [(set_attr "type" "ssemov") - (set_attr "prefix_extra" "1") - (set_attr "prefix" "maybe_vex") - (set_attr "mode" "TI")]) - -(define_insn "*sse4_1_zero_extendv4hiv4si2" - [(set (match_operand:V4SI 0 "register_operand" "=x") - (zero_extend:V4SI - (vec_select:V4HI - (vec_duplicate:V8HI - (match_operand:V4HI 1 "nonimmediate_operand" "xm")) + (match_operand:V8HI 1 "nonimmediate_operand" "xm") (parallel [(const_int 0) (const_int 1) (const_int 2) @@ -9405,22 +9244,7 @@ [(set (match_operand:V2DI 0 "register_operand" "=x") (zero_extend:V2DI (vec_select:V2HI - (match_operand:V8HI 1 "register_operand" "x") - (parallel [(const_int 0) - (const_int 1)]))))] - "TARGET_SSE4_1" - "%vpmovzxwq\t{%1, %0|%0, %1}" - [(set_attr "type" "ssemov") - (set_attr "prefix_extra" "1") - (set_attr "prefix" "maybe_vex") - (set_attr "mode" "TI")]) - -(define_insn "*sse4_1_zero_extendv2hiv2di2" - [(set (match_operand:V2DI 0 "register_operand" "=x") - (zero_extend:V2DI - (vec_select:V2HI - (vec_duplicate:V8HI - (match_operand:V2HI 1 "nonimmediate_operand" "xm")) + (match_operand:V8HI 1 "nonimmediate_operand" "xm") (parallel [(const_int 0) (const_int 1)]))))] "TARGET_SSE4_1" @@ -9434,22 +9258,7 @@ [(set (match_operand:V2DI 0 "register_operand" "=x") (zero_extend:V2DI (vec_select:V2SI - (match_operand:V4SI 1 "register_operand" "x") - (parallel [(const_int 0) - (const_int 1)]))))] - "TARGET_SSE4_1" - "%vpmovzxdq\t{%1, %0|%0, %1}" - [(set_attr "type" "ssemov") - (set_attr "prefix_extra" "1") - (set_attr "prefix" "maybe_vex") - (set_attr "mode" "TI")]) - -(define_insn "*sse4_1_zero_extendv2siv2di2" - [(set (match_operand:V2DI 0 "register_operand" "=x") - (zero_extend:V2DI - (vec_select:V2SI - (vec_duplicate:V4SI - (match_operand:V2SI 1 "nonimmediate_operand" "xm")) + (match_operand:V4SI 1 "nonimmediate_operand" "xm") (parallel [(const_int 0) (const_int 1)]))))] "TARGET_SSE4_1" diff --git a/contrib/gcc-4.4/gcc/config/i386/sync.md b/contrib/gcc-4.4/gcc/config/i386/sync.md index 05aad00ba9..fadc1572f2 100644 --- a/contrib/gcc-4.4/gcc/config/i386/sync.md +++ b/contrib/gcc-4.4/gcc/config/i386/sync.md @@ -1,5 +1,5 @@ ;; GCC machine description for i386 synchronization instructions. -;; Copyright (C) 2005, 2006, 2007, 2008, 2009 +;; Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 ;; Free Software Foundation, Inc. ;; ;; This file is part of GCC. @@ -51,7 +51,7 @@ (unspec:BLK [(match_dup 0)] UNSPEC_MFENCE)) (clobber (reg:CC FLAGS_REG))] "!(TARGET_64BIT || TARGET_SSE2)" - "lock{%;| }or{l}\t{$0, (%%esp)|DWORD PTR [esp], 0}" + "lock{%;} or{l}\t{$0, (%%esp)|DWORD PTR [esp], 0}" [(set_attr "memory" "unknown")]) ;; ??? It would be possible to use cmpxchg8b on pentium for DImode @@ -111,7 +111,7 @@ UNSPECV_CMPXCHG)) (clobber (reg:CC FLAGS_REG))] "TARGET_CMPXCHG" - "lock{%;| }cmpxchg{}\t{%3, %1|%1, %3}") + "lock{%;} cmpxchg{}\t{%3, %1|%1, %3}") (define_insn "sync_double_compare_and_swap" [(set (match_operand:DCASMODE 0 "register_operand" "=A") @@ -125,7 +125,7 @@ UNSPECV_CMPXCHG)) (clobber (reg:CC FLAGS_REG))] "" - "lock{%;| }cmpxchgb\t%1") + "lock{%;} cmpxchgb\t%1") ;; Theoretically we'd like to use constraint "r" (any reg) for operand ;; 3, but that includes ecx. If operand 3 and 4 are the same (like when @@ -148,7 +148,7 @@ UNSPECV_CMPXCHG)) (clobber (reg:CC FLAGS_REG))] "!TARGET_64BIT && TARGET_CMPXCHG8B && flag_pic" - "xchg{l}\t%%ebx, %3\;lock{%;| }cmpxchg8b\t%1\;xchg{l}\t%%ebx, %3") + "xchg{l}\t%%ebx, %3\;lock{%;} cmpxchg8b\t%1\;xchg{l}\t%%ebx, %3") (define_expand "sync_compare_and_swap_cc" [(parallel @@ -213,7 +213,7 @@ [(match_dup 1) (match_dup 2) (match_dup 3)] UNSPECV_CMPXCHG) (match_dup 2)))] "TARGET_CMPXCHG" - "lock{%;| }cmpxchg{}\t{%3, %1|%1, %3}") + "lock{%;} cmpxchg{}\t{%3, %1|%1, %3}") (define_insn "sync_double_compare_and_swap_cc" [(set (match_operand:DCASMODE 0 "register_operand" "=A") @@ -232,7 +232,7 @@ UNSPECV_CMPXCHG) (match_dup 2)))] "" - "lock{%;| }cmpxchgb\t%1") + "lock{%;} cmpxchgb\t%1") ;; See above for the explanation of using the constraint "SD" for ;; operand 3. @@ -253,7 +253,7 @@ UNSPECV_CMPXCHG) (match_dup 2)))] "!TARGET_64BIT && TARGET_CMPXCHG8B && flag_pic" - "xchg{l}\t%%ebx, %3\;lock{%;| }cmpxchg8b\t%1\;xchg{l}\t%%ebx, %3") + "xchg{l}\t%%ebx, %3\;lock{%;} cmpxchg8b\t%1\;xchg{l}\t%%ebx, %3") (define_insn "sync_old_add" [(set (match_operand:IMODE 0 "register_operand" "=") @@ -264,7 +264,7 @@ (match_operand:IMODE 2 "register_operand" "0"))) (clobber (reg:CC FLAGS_REG))] "TARGET_XADD" - "lock{%;| }xadd{}\t{%0, %1|%1, %0}") + "lock{%;} xadd{}\t{%0, %1|%1, %0}") ;; Recall that xchg implicitly sets LOCK#, so adding it again wastes space. (define_insn "sync_lock_test_and_set" @@ -288,12 +288,12 @@ if (TARGET_USE_INCDEC) { if (operands[1] == const1_rtx) - return "lock{%;| }inc{}\t%0"; + return "lock{%;} inc{}\t%0"; if (operands[1] == constm1_rtx) - return "lock{%;| }dec{}\t%0"; + return "lock{%;} dec{}\t%0"; } - return "lock{%;| }add{}\t{%1, %0|%0, %1}"; + return "lock{%;} add{}\t{%1, %0|%0, %1}"; }) (define_insn "sync_sub" @@ -308,12 +308,12 @@ if (TARGET_USE_INCDEC) { if (operands[1] == const1_rtx) - return "lock{%;| }dec{}\t%0"; + return "lock{%;} dec{}\t%0"; if (operands[1] == constm1_rtx) - return "lock{%;| }inc{}\t%0"; + return "lock{%;} inc{}\t%0"; } - return "lock{%;| }sub{}\t{%1, %0|%0, %1}"; + return "lock{%;} sub{}\t{%1, %0|%0, %1}"; }) (define_insn "sync_ior" @@ -324,7 +324,7 @@ UNSPECV_LOCK)) (clobber (reg:CC FLAGS_REG))] "" - "lock{%;| }or{}\t{%1, %0|%0, %1}") + "lock{%;} or{}\t{%1, %0|%0, %1}") (define_insn "sync_and" [(set (match_operand:IMODE 0 "memory_operand" "+m") @@ -334,7 +334,7 @@ UNSPECV_LOCK)) (clobber (reg:CC FLAGS_REG))] "" - "lock{%;| }and{}\t{%1, %0|%0, %1}") + "lock{%;} and{}\t{%1, %0|%0, %1}") (define_insn "sync_xor" [(set (match_operand:IMODE 0 "memory_operand" "+m") @@ -344,4 +344,4 @@ UNSPECV_LOCK)) (clobber (reg:CC FLAGS_REG))] "" - "lock{%;| }xor{}\t{%1, %0|%0, %1}") + "lock{%;} xor{}\t{%1, %0|%0, %1}") diff --git a/contrib/gcc-4.4/gcc/configure b/contrib/gcc-4.4/gcc/configure index 04775acf6e..64cdd91332 100755 --- a/contrib/gcc-4.4/gcc/configure +++ b/contrib/gcc-4.4/gcc/configure @@ -21359,7 +21359,35 @@ foobar:' > conftest.s echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } then - gcc_cv_as_hidden=yes + +# Solaris 9/x86 as incorrectly emits an alias for a hidden symbol with +# STV_HIDDEN, so disable .hidden support if so. +case "${target}" in + i?86-*-solaris2*) + if test x$gcc_cv_as != x && test x$gcc_cv_objdump != x; then + cat > conftest.s <