This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH][i386]Fix PR 57756
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Michael Meissner <meissner at linux dot vnet dot ibm dot com>, Sriraman Tallam <tmsriram at google dot com>, Steve Ellcey <sellcey at mips dot com>, Diego Novillo <dnovillo at google dot com>, David Edelsohn <dje dot gcc at gmail dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>, David Edelsohn <dje at gcc dot gnu dot org>, David Li <davidxl at google dot com>, Richard Biener <richard dot guenther at gmail dot com>
- Date: Thu, 17 Oct 2013 20:48:03 +0200
- Subject: Re: [PATCH][i386]Fix PR 57756
- Authentication-results: sourceware.org; auth=none
- References: <CAD_=9DRW+3ZrSa8mqqCdLrSHODHeKzx6uUV4EkgX6O1EQaOm9Q at mail dot gmail dot com> <1382027306 dot 2558 dot 16 dot camel at ubuntu-sellcey> <20131017165206 dot GA25894 at ibm-tiger dot the-meissners dot org> <CAAs8Hmz2iRtgbPVBqSqvU+1XHbChhzigHmXEscU6rPrbMDYysg at mail dot gmail dot com> <20131017182257 dot GA7646 at ibm-tiger dot the-meissners dot org>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Thu, Oct 17, 2013 at 02:22:57PM -0400, Michael Meissner wrote:
> On Thu, Oct 17, 2013 at 10:23:27AM -0700, Sriraman Tallam wrote:
> > I would need the help of target maintainers to fix it this way since
> > it touches every target and it would take time for me to build and
> > test every target.
> >
> > Michael, OTOH, I dont see any other targets other than i386 and rs6000
> > (grepping for "specific_save" and "specific_restore") using
> > function_specific save and restore functions. Would it be easier then
> > to just add back that line to "opth-gen.awk"?,the patch is below.
> > Since, they are not using function specific opts, they presumably
> > should not be validating target options a lot.
>
> I believe only x86 and powerpc use the target specific feature (that I added
> for x86 in the 4.3 time frame, and then added to powerpc last year).
>
> In terms of target_flags and target_flags_explicit, the powerpc no longer uses
> this field, since we have more than 32 flag bits, and needed to move the flag
> processing to something that is HOST_WIDE_INT sized instead of int sized. So,
> it won't matter if you redefine the flag once again. I don't believe the x86
> uses it either (for much the same reason). So, if it fixes the other ports, I
> would say it is ok (but I haven't looked in detail at it).
BTW, I believe the patch caused also various regressions on i?86-linux, in
particular:
+FAIL: gcc.target/i386/avx-inline.c (test for excess errors)
+FAIL: gcc.target/i386/fastcall-sseregparm.c (test for excess errors)
+UNRESOLVED: gcc.target/i386/fastcall-sseregparm.c compilation failed to produce executable
+FAIL: gcc.target/i386/pr57756_2.c (test for excess errors)
+UNRESOLVED: gcc.target/i386/pr57756_2.c compilation failed to produce executable
+FAIL: g++.dg/ext/mv2.C -std=gnu++98 (test for excess errors)
+FAIL: g++.dg/ext/mv2.C -std=gnu++11 (test for excess errors)
+FAIL: g++.dg/ext/mv3.C -std=gnu++98 (test for excess errors)
+FAIL: g++.dg/ext/mv3.C -std=gnu++11 (test for excess errors)
+FAIL: g++.dg/ext/mv4.C -std=gnu++98 (test for excess errors)
+FAIL: g++.dg/ext/mv4.C -std=gnu++11 (test for excess errors)
The errors are:
/usr/src/gcc/gcc/testsuite/gcc.target/i386/avx-inline.c: In function 'caller':
/usr/src/gcc/gcc/testsuite/gcc.target/i386/avx-inline.c:6:12: error: inlining failed in call to always_inline 'callee': target specific option mismatch
/usr/src/gcc/gcc/testsuite/gcc.target/i386/avx-inline.c:14:3: error: called from here
In file included from /usr/src/gcc/obj737/gcc/include/xmmintrin.h:31:0,
from /usr/src/gcc/gcc/testsuite/gcc.target/i386/m128-check.h:2,
from /usr/src/gcc/gcc/testsuite/gcc.target/i386/sse-check.h:2,
from /usr/src/gcc/gcc/testsuite/gcc.target/i386/fastcall-sseregparm.c:6:
/usr/src/gcc/obj737/gcc/include/mmintrin.h:317:1: error: -mpreferred-stack-boundary=0 is not between 2 and 12
...
/usr/src/gcc/gcc/testsuite/gcc.target/i386/pr57756_2.c:19:1: warning: SSE instruction set disabled, using 387 arithmetics [enabled by default]
/usr/src/gcc/gcc/testsuite/gcc.target/i386/pr57756_2.c:24:14: error: inlining failed in call to always_inline 'c4': target specific option mismatch
/usr/src/gcc/gcc/testsuite/gcc.target/i386/pr57756_2.c:98:3: error: called from here
/usr/src/gcc/gcc/testsuite/g++.dg/ext/mv2.C:103:6: warning: SSE instruction set disabled, using 387 arithmetics [enabled by default]
and similarly for mv{3,4}.C.
This was on x86_64-linux, configured with:
mkdir ~/hbin
cat > ~/hbin/gcc <<\EOF
#!/bin/sh
exec /usr/bin/gcc -m32 "$@"
EOF
cat > ~/hbin/g++ <<\EOF
#!/bin/sh
exec /usr/bin/g++ -m32 "$@"
EOF
cat > ~/hbin/as <<\EOF
#!/bin/sh
exec /usr/bin/as --32 "$@"
EOF
cat > ~/hbin/ld <<\EOF2
#!/bin/sh
case "$*" in
--version) cat <<\EOF
GNU ld version 2.20.52.0.1-10.fc17 20100131
Copyright 2012 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later version.
This program has absolutely no warranty.
EOF
exit 0;;
esac
exec /usr/bin/ld -m elf_i386 -L /usr/lib/ "$@"
EOF2
chmod 755 ~/hbin/{gcc,g++,as,ld}
PATH=~/hbin:$PATH i386 ../configure --enable-languages=all,obj-c++,lto,go --enable-checking=yes,rtl
PATH=~/hbin:$PATH i386 make -j48 > LOG 2>&1 && PATH=~/hbin:$PATH i386 make -j48 -k check > LOGC 2>&1; ../contrib/test_summary > LOGT 2>&1
Jakub