http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56866
--- Comment #5 from Winfried Magerl <winfried.mag...@t-online.de> 2013-04-11 21:07:43 UTC --- Hi, On Thu, Apr 11, 2013 at 08:46:34PM +0200, Winfried Magerl wrote: > > BTW: From your report it is not clear if the problem is indeed in the > > compiler, > > or in the system glibc. > > Because I can not guarantee that this bug is pure gcc bug. But from > test-suites (gcc-testsuite/glibc-testsuite) it looks like support > of bdver1/2 in gcc is not working well. > > The different test-fails on glibc when enabling bdver1 or bdver2 > (sha512-errors > only with -O3): > > make[2]: *** > [/home/winfried/glibc-cvs/glibc-2.17-xop-none/math/test-float.out] Error 1 > make[2]: *** > [/home/winfried/glibc-cvs/glibc-2.17-xop-none/math/test-double.out] Error 1 > make[2]: *** > [/home/winfried/glibc-cvs/glibc-2.17-xop-none/math/test-ifloat.out] Error 1 > make[2]: *** > [/home/winfried/glibc-cvs/glibc-2.17-xop-none/math/test-idouble.out] Error 1 > make[2]: *** > [/home/winfried/glibc-cvs/glibc-2.17-xop-none/crypt/sha512c-test.out] Error 1 > make[2]: *** > [/home/winfried/glibc-cvs/glibc-2.17-xop-none/crypt/sha512test.out] Error 1 > > Additional erors when compiling recent gcc-4.8.x with '--with-arch=bdver2' > (excluding > additional 203 FAILS for scan-asembler and friends): > > +FAIL: gcc.c-torture/execute/pr51581-1.c execution, -O3 -fomit-frame-pointer > +FAIL: gcc.c-torture/execute/pr51581-1.c execution, -O3 -fomit-frame-pointer > -funroll-loops > +FAIL: gcc.c-torture/execute/pr51581-1.c execution, -O3 -fomit-frame-pointer > -funroll-all-loops -finline-functions > +FAIL: gcc.c-torture/execute/pr51581-1.c execution, -O3 -g > +FAIL: gcc.c-torture/execute/pr51581-2.c execution, -O3 -fomit-frame-pointer > +FAIL: gcc.c-torture/execute/pr51581-2.c execution, -O3 -fomit-frame-pointer > -funroll-loops > +FAIL: gcc.c-torture/execute/pr51581-2.c execution, -O3 -fomit-frame-pointer > -funroll-all-loops -finline-functions > +FAIL: gcc.c-torture/execute/pr51581-2.c execution, -O3 -g > +FAIL: gcc.c-torture/execute/pr53645.c execution, -O1 > +FAIL: gcc.c-torture/execute/pr53645.c execution, -O2 > +FAIL: gcc.c-torture/execute/pr53645.c execution, -O3 -fomit-frame-pointer > +FAIL: gcc.c-torture/execute/pr53645.c execution, -O3 -fomit-frame-pointer > -funroll-loops > +FAIL: gcc.c-torture/execute/pr53645.c execution, -O3 -fomit-frame-pointer > -funroll-all-loops -finline-functions > +FAIL: gcc.c-torture/execute/pr53645.c execution, -O3 -g > +FAIL: gcc.c-torture/execute/pr53645.c execution, -Os > +FAIL: gcc.c-torture/execute/pr53645.c execution, -Og -g > +FAIL: gcc.c-torture/execute/pr53645.c execution, -O2 -flto > -fno-use-linker-plugin -flto-partition=none > +FAIL: gcc.c-torture/execute/pr53645.c execution, -O2 -flto > -fuse-linker-plugin -fno-fat-lto-objects > +FAIL: gcc.dg/vect/pr51581-1.c execution test > +FAIL: gcc.dg/vect/pr51581-2.c execution test > +FAIL: gcc.dg/vect/pr51581-3.c execution test > +FAIL: gcc.dg/vect/pr51581-1.c -flto execution test > +FAIL: gcc.dg/vect/pr51581-2.c -flto execution test > +FAIL: gcc.dg/vect/pr51581-3.c -flto execution test > +FAIL: gcc.target/i386/avx-mul-1.c execution test > +FAIL: gcc.target/i386/avx-pr51581-1.c execution test > +FAIL: gcc.target/i386/avx-pr51581-2.c execution test > +FAIL: gcc.target/i386/sse2-mul-1.c execution test > +FAIL: gcc.target/i386/sse4_1-mul-1.c execution test I've disabled XOP in the current gcc-4.8-branch with the following diff: --- gcc-4.8-branch/gcc/config/i386/i386.c 2013-04-03 08:09:26.409746225 +0200 +++ gcc-4.8-noxop/gcc/config/i386/i386.c 2013-04-11 20:55:21.671710214 +0200 @@ -2972,12 +2972,12 @@ PTA_64BIT | PTA_MMX | PTA_SSE | PTA_SSE2 | PTA_SSE3 | PTA_SSE4A | PTA_CX16 | PTA_ABM | PTA_SSSE3 | PTA_SSE4_1 | PTA_SSE4_2 | PTA_AES | PTA_PCLMUL | PTA_AVX | PTA_FMA4 - | PTA_XOP | PTA_LWP | PTA_PRFCHW | PTA_FXSR | PTA_XSAVE}, + | PTA_LWP | PTA_PRFCHW | PTA_FXSR | PTA_XSAVE}, {"bdver2", PROCESSOR_BDVER2, CPU_BDVER2, PTA_64BIT | PTA_MMX | PTA_SSE | PTA_SSE2 | PTA_SSE3 | PTA_SSE4A | PTA_CX16 | PTA_ABM | PTA_SSSE3 | PTA_SSE4_1 | PTA_SSE4_2 | PTA_AES | PTA_PCLMUL | PTA_AVX | PTA_FMA4 - | PTA_XOP | PTA_LWP | PTA_BMI | PTA_TBM | PTA_F16C + | PTA_LWP | PTA_BMI | PTA_TBM | PTA_F16C | PTA_FMA | PTA_PRFCHW | PTA_FXSR | PTA_XSAVE}, {"bdver3", PROCESSOR_BDVER3, CPU_BDVER3, PTA_64BIT | PTA_MMX | PTA_SSE | PTA_SSE2 | PTA_SSE3 After all the tests I've already done the result is not realy surprising: gcc-4.8 configured with '--with-arch=bdver2': all additional execution-errors listed above do no longer FAIL (still more then 200 scan-*-errors which might be a bug in the tests) glibc-2.17 compiled with '-O3' and the above compiler using '-march=bdver2' as default-optimisation: both sha512-errors are gone (still the scary double/float-errors but this tests are obviously not related to XOP) test-cases are enough in the gcc-source-tree as shown above and this test-cases most likely fullfill all requirements for the bug-list better then my extracted files from glibc. There's still a small chance that I'm a lucky owner of a AMD-CPU which has only problems with XOP-instructionset. Would be great if someone confirm this. Detailed CPU-Information from /proc/cpuinfo: cpu family : 21 model : 2 model name : AMD FX(tm)-6300 Six-Core Processor stepping : 0 microcode : 0x600081c and from dmesg: CPU0: AMD FX(tm)-6300 Six-Core Processor (fam: 15, model: 02, stepping: 00) regards winfried