Message ID | CAAs8Hmz2iRtgbPVBqSqvU+1XHbChhzigHmXEscU6rPrbMDYysg@mail.gmail.com |
---|---|
State | New |
Headers | show |
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).
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
On Thu, Oct 17, 2013 at 11:48 AM, Jakub Jelinek <jakub@redhat.com> wrote: > 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) I did not see these failures, I bootstrapped and tested for parity on i?86-linux. I will look at this again. In particular pr57756.c and pr57756_2.c were added as part of this patch and passed. Sri > > 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
On Thu, Oct 17, 2013 at 12:08 PM, Sriraman Tallam <tmsriram@google.com> wrote: > On Thu, Oct 17, 2013 at 11:48 AM, Jakub Jelinek <jakub@redhat.com> wrote: >> 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) I checked my build again for these tests and they all pass. Looking at the test results mailing list, I see pr57756.c reported failing http://gcc.gnu.org/ml/gcc-testresults/2013-10/msg01177.html on i686-pc-linux-gnu in rev. 203635. I do not see any other tests reported as failing. What am I missing? I also see "SSE instruction set disabled, using 387 arithmetics" warning in your messages. Is this the problem? Sri > > I did not see these failures, I bootstrapped and tested for parity on > i?86-linux. I will look at this again. In particular pr57756.c and > pr57756_2.c were added as part of this patch and passed. > > Sri > > >> >> 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
On Thu, Oct 17, 2013 at 12:30:46PM -0700, Sriraman Tallam wrote:
> I checked my build again for these tests and they all pass.
Perhaps it is the question of the default arch/tuning selection,
What do you get with ./cc1 -E -dD /dev/null | grep SSE in the 32-bit
cc1? Try compiling the testcases with -march=i386, -march=i686 -mno-sse
or similar?
Jakub
On Oct 17, 2013, at 10:23 AM, Sriraman Tallam <tmsriram@google.com> wrote: >> You probably want to do something similar to what I did in the powerpc. > > 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. For changes that only need a compile to ensure one didn't brake a port, a configure and build of a target is 2 minutes. Over night (6 hours), you can 180 targets. Before you laugh, there are people that have done this sort of building in the past as well. The hardest part, literally, would be to come up with the list of targets.
On Thu, Oct 17, 2013 at 12:30:46PM -0700, Sriraman Tallam wrote:
> I checked my build again for these tests and they all pass.
Even on x86_64-linux I can reproduce all of those with
-m32 -mno-sse.
Jakub
On Thu, Oct 17, 2013 at 3:10 PM, Jakub Jelinek <jakub@redhat.com> wrote: > On Thu, Oct 17, 2013 at 12:30:46PM -0700, Sriraman Tallam wrote: >> I checked my build again for these tests and they all pass. > > Even on x86_64-linux I can reproduce all of those with > -m32 -mno-sse. Ok, I never tested for no-sse. I will take a look at it. > > Jakub
Index: opth-gen.awk =================================================================== --- opth-gen.awk (revision 203779) +++ opth-gen.awk (working copy) @@ -114,6 +114,7 @@ print "};" print "extern struct gcc_options global_options;" print "extern const struct gcc_options global_options_init;" print "extern struct gcc_options global_options_set;" +print "#define target_flags_explicit global_options_set.x_target_flags" print "#endif" print "#endif" print ""