* [Bug c++/54741] GCC 4.4, 4.5, 4.6 4.7 (probably 4.8) Generates un-usable code on AVX supported CPUs (FreeBSD)
2012-09-29 0:45 [Bug c++/54741] New: GCC 4.4, 4.5, 4.6 4.7 (probably 4.8) Generates un-usable code on AVX supported CPUs (FreeBSD) ace.of.zerosync at gmail dot com
@ 2012-09-29 1:08 ` pinskia at gcc dot gnu.org
2012-09-29 5:43 ` ace.of.zerosync at gmail dot com
` (18 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: pinskia at gcc dot gnu.org @ 2012-09-29 1:08 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54741
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |WAITING
Last reconfirmed| |2012-09-29
Ever Confirmed|0 |1
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-09-29 01:07:54 UTC ---
What is the instruction it is causing an illegal instruction signal?
Run the resulting program using gdb to find out.
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug c++/54741] GCC 4.4, 4.5, 4.6 4.7 (probably 4.8) Generates un-usable code on AVX supported CPUs (FreeBSD)
2012-09-29 0:45 [Bug c++/54741] New: GCC 4.4, 4.5, 4.6 4.7 (probably 4.8) Generates un-usable code on AVX supported CPUs (FreeBSD) ace.of.zerosync at gmail dot com
2012-09-29 1:08 ` [Bug c++/54741] " pinskia at gcc dot gnu.org
@ 2012-09-29 5:43 ` ace.of.zerosync at gmail dot com
2012-10-01 10:20 ` rguenth at gcc dot gnu.org
` (17 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: ace.of.zerosync at gmail dot com @ 2012-09-29 5:43 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54741
--- Comment #2 from M.S. Babaei <ace.of.zerosync at gmail dot com> 2012-09-29 05:43:13 UTC ---
(In reply to comment #1)
> What is the instruction it is causing an illegal instruction signal?
> Run the resulting program using gdb to find out.
As I mentiond above running the program inside gdb produces these:
Program received signal SIGILL, Illegal instruction.
0x00000000004011dc in std::_Hashtable<std::string, std::pair<std::string const,
std::string>, std::allocator<std::pair<std::string const, std::string> >,
std::_Select1st<std::pair<std::string const, std::string> >,
std::equal_to<std::string>, std::hash<std::string>,
std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash,
std::__detail::_Prime_rehash_policy, false, false, true>::_Hashtable ()
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug c++/54741] GCC 4.4, 4.5, 4.6 4.7 (probably 4.8) Generates un-usable code on AVX supported CPUs (FreeBSD)
2012-09-29 0:45 [Bug c++/54741] New: GCC 4.4, 4.5, 4.6 4.7 (probably 4.8) Generates un-usable code on AVX supported CPUs (FreeBSD) ace.of.zerosync at gmail dot com
2012-09-29 1:08 ` [Bug c++/54741] " pinskia at gcc dot gnu.org
2012-09-29 5:43 ` ace.of.zerosync at gmail dot com
@ 2012-10-01 10:20 ` rguenth at gcc dot gnu.org
2012-10-01 11:20 ` mikpe at it dot uu.se
` (16 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-10-01 10:20 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54741
--- Comment #3 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-10-01 10:20:43 UTC ---
use disassemble from inside gdb and look for the faulting instruction.
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug c++/54741] GCC 4.4, 4.5, 4.6 4.7 (probably 4.8) Generates un-usable code on AVX supported CPUs (FreeBSD)
2012-09-29 0:45 [Bug c++/54741] New: GCC 4.4, 4.5, 4.6 4.7 (probably 4.8) Generates un-usable code on AVX supported CPUs (FreeBSD) ace.of.zerosync at gmail dot com
` (2 preceding siblings ...)
2012-10-01 10:20 ` rguenth at gcc dot gnu.org
@ 2012-10-01 11:20 ` mikpe at it dot uu.se
2012-10-01 12:55 ` [Bug target/54741] " hjl.tools at gmail dot com
` (15 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: mikpe at it dot uu.se @ 2012-10-01 11:20 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54741
Mikael Pettersson <mikpe at it dot uu.se> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mikpe at it dot uu.se
--- Comment #4 from Mikael Pettersson <mikpe at it dot uu.se> 2012-10-01 11:20:21 UTC ---
I suspect that the BSD kernel in question doesn't support AVX, so CPUID reports
AVX but not OSXSAVE. That would cause any AVX insn to #UD. If this is the
case, then gcc's -march=native is in error for failing to check OSXSAVE.
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug target/54741] GCC 4.4, 4.5, 4.6 4.7 (probably 4.8) Generates un-usable code on AVX supported CPUs (FreeBSD)
2012-09-29 0:45 [Bug c++/54741] New: GCC 4.4, 4.5, 4.6 4.7 (probably 4.8) Generates un-usable code on AVX supported CPUs (FreeBSD) ace.of.zerosync at gmail dot com
` (3 preceding siblings ...)
2012-10-01 11:20 ` mikpe at it dot uu.se
@ 2012-10-01 12:55 ` hjl.tools at gmail dot com
2012-10-01 13:27 ` jakub at gcc dot gnu.org
` (14 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: hjl.tools at gmail dot com @ 2012-10-01 12:55 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54741
--- Comment #5 from H.J. Lu <hjl.tools at gmail dot com> 2012-10-01 12:55:07 UTC ---
Created attachment 28311
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28311
A patch
Please try this.
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug target/54741] GCC 4.4, 4.5, 4.6 4.7 (probably 4.8) Generates un-usable code on AVX supported CPUs (FreeBSD)
2012-09-29 0:45 [Bug c++/54741] New: GCC 4.4, 4.5, 4.6 4.7 (probably 4.8) Generates un-usable code on AVX supported CPUs (FreeBSD) ace.of.zerosync at gmail dot com
` (4 preceding siblings ...)
2012-10-01 12:55 ` [Bug target/54741] " hjl.tools at gmail dot com
@ 2012-10-01 13:27 ` jakub at gcc dot gnu.org
2012-10-01 13:33 ` hjl.tools at gmail dot com
` (13 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-10-01 13:27 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54741
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-10-01 13:26:54 UTC ---
s/FAM/FMA/ in the ChangeLog entry.
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug target/54741] GCC 4.4, 4.5, 4.6 4.7 (probably 4.8) Generates un-usable code on AVX supported CPUs (FreeBSD)
2012-09-29 0:45 [Bug c++/54741] New: GCC 4.4, 4.5, 4.6 4.7 (probably 4.8) Generates un-usable code on AVX supported CPUs (FreeBSD) ace.of.zerosync at gmail dot com
` (5 preceding siblings ...)
2012-10-01 13:27 ` jakub at gcc dot gnu.org
@ 2012-10-01 13:33 ` hjl.tools at gmail dot com
2012-10-02 7:15 ` ace.of.zerosync at gmail dot com
` (12 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: hjl.tools at gmail dot com @ 2012-10-01 13:33 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54741
H.J. Lu <hjl.tools at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #28311|0 |1
is obsolete| |
--- Comment #7 from H.J. Lu <hjl.tools at gmail dot com> 2012-10-01 13:32:51 UTC ---
Created attachment 28312
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28312
A patch with fixed ChangeLog
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug target/54741] GCC 4.4, 4.5, 4.6 4.7 (probably 4.8) Generates un-usable code on AVX supported CPUs (FreeBSD)
2012-09-29 0:45 [Bug c++/54741] New: GCC 4.4, 4.5, 4.6 4.7 (probably 4.8) Generates un-usable code on AVX supported CPUs (FreeBSD) ace.of.zerosync at gmail dot com
` (6 preceding siblings ...)
2012-10-01 13:33 ` hjl.tools at gmail dot com
@ 2012-10-02 7:15 ` ace.of.zerosync at gmail dot com
2012-10-02 7:18 ` ace.of.zerosync at gmail dot com
` (11 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: ace.of.zerosync at gmail dot com @ 2012-10-02 7:15 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54741
--- Comment #8 from M.S. Babaei <ace.of.zerosync at gmail dot com> 2012-10-02 07:14:32 UTC ---
(In reply to comment #3)
> use disassemble from inside gdb and look for the faulting instruction.
Sorry I'm not very familiar with GDB, but I assume you need this:
(gdb) disassemble main
Dump of assembler code for function main:
0x0000000000400bc4 <main+0>: push %rbp
0x0000000000400bc5 <main+1>: mov %rsp,%rbp
0x0000000000400bc8 <main+4>: push %rbx
0x0000000000400bc9 <main+5>: sub $0x48,%rsp
0x0000000000400bcd <main+9>: lea -0x13(%rbp),%rax
0x0000000000400bd1 <main+13>: mov %rax,%rdi
0x0000000000400bd4 <main+16>: callq 0x400e7c <_ZNSaISt4pairIKSsSsEEC2Ev>
0x0000000000400bd9 <main+21>: lea -0x13(%rbp),%rsi
0x0000000000400bdd <main+25>: lea -0x12(%rbp),%rcx
0x0000000000400be1 <main+29>: lea -0x11(%rbp),%rdx
0x0000000000400be5 <main+33>: lea -0x50(%rbp),%rax
0x0000000000400be9 <main+37>: mov %rsi,%r8
0x0000000000400bec <main+40>: mov $0xa,%esi
0x0000000000400bf1 <main+45>: mov %rax,%rdi
0x0000000000400bf4 <main+48>: callq 0x400eb0
<_ZNSt13unordered_mapISsSsSt4hashISsESt8equal_toISsESaISt4pairIKSsSsEEEC2EmRKS1_RKS3_RKS7_>
0x0000000000400bf9 <main+53>: lea -0x13(%rbp),%rax
0x0000000000400bfd <main+57>: mov %rax,%rdi
0x0000000000400c00 <main+60>: callq 0x400e96 <_ZNSaISt4pairIKSsSsEED2Ev>
0x0000000000400c05 <main+65>: mov $0x4016b2,%esi
0x0000000000400c0a <main+70>: mov $0x602c40,%edi
0x0000000000400c0f <main+75>: callq 0x4009f0 basic_ostreamIcT_ES5_PKc@plt>
0x0000000000400c14 <main+80>: mov $0x400a40,%esi
0x0000000000400c19 <main+85>: mov %rax,%rdi
0x0000000000400c1c <main+88>: callq 0x400a20 <_ZNSolsEPFRSoS_E@plt>
0x0000000000400c21 <main+93>: mov $0x0,%ebx
0x0000000000400c26 <main+98>: lea -0x50(%rbp),%rax
0x0000000000400c2a <main+102>: mov %rax,%rdi
0x0000000000400c2d <main+105>: callq 0x400dba
<_ZNSt13unordered_mapISsSsSt4hashISsESt8equal_toISsESaISt4pairIKSsSsEEED2Ev>
0x0000000000400c32 <main+110>: mov %ebx,%eax
0x0000000000400c34 <main+112>: add $0x48,%rsp
0x0000000000400c38 <main+116>: pop %rbx
0x0000000000400c39 <main+117>: pop %rbp
0x0000000000400c3a <main+118>: retq
0x0000000000400c3b <main+119>: mov %rax,%rbx
0x0000000000400c3e <main+122>: lea -0x13(%rbp),%rax
0x0000000000400c42 <main+126>: mov %rax,%rdi
0x0000000000400c45 <main+129>: callq 0x400e96 <_ZNSaISt4pairIKSsSsEED2Ev>
0x0000000000400c4a <main+134>: mov %rbx,%rax
0x0000000000400c4d <main+137>: mov %rax,%rdi
0x0000000000400c50 <main+140>: callq 0x400a80 <_Unwind_Resume@plt>
0x0000000000400c55 <main+145>: mov %rax,%rbx
0x0000000000400c58 <main+148>: lea -0x50(%rbp),%rax
0x0000000000400c5c <main+152>: mov %rax,%rdi
0x0000000000400c5f <main+155>: callq 0x400dba
<_ZNSt13unordered_mapISsSsSt4hashISsESt8equal_toISsESaISt4pairIKSsSsEEED2Ev>
0x0000000000400c64 <main+160>: mov %rbx,%rax
0x0000000000400c67 <main+163>: mov %rax,%rdi
0x0000000000400c6a <main+166>: callq 0x400a80 <_Unwind_Resume@plt>
End of assembler dump.
If not then tell me the steps and I'll post what you need.
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug target/54741] GCC 4.4, 4.5, 4.6 4.7 (probably 4.8) Generates un-usable code on AVX supported CPUs (FreeBSD)
2012-09-29 0:45 [Bug c++/54741] New: GCC 4.4, 4.5, 4.6 4.7 (probably 4.8) Generates un-usable code on AVX supported CPUs (FreeBSD) ace.of.zerosync at gmail dot com
` (7 preceding siblings ...)
2012-10-02 7:15 ` ace.of.zerosync at gmail dot com
@ 2012-10-02 7:18 ` ace.of.zerosync at gmail dot com
2012-10-02 9:59 ` ubizjak at gmail dot com
` (10 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: ace.of.zerosync at gmail dot com @ 2012-10-02 7:18 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54741
--- Comment #9 from M.S. Babaei <ace.of.zerosync at gmail dot com> 2012-10-02 07:18:23 UTC ---
(In reply to comment #7)
> Created attachment 28312 [details]
> A patch with fixed ChangeLog
Now I'm at work. I'll try your patch to build GCC and post later.
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug target/54741] GCC 4.4, 4.5, 4.6 4.7 (probably 4.8) Generates un-usable code on AVX supported CPUs (FreeBSD)
2012-09-29 0:45 [Bug c++/54741] New: GCC 4.4, 4.5, 4.6 4.7 (probably 4.8) Generates un-usable code on AVX supported CPUs (FreeBSD) ace.of.zerosync at gmail dot com
` (8 preceding siblings ...)
2012-10-02 7:18 ` ace.of.zerosync at gmail dot com
@ 2012-10-02 9:59 ` ubizjak at gmail dot com
2012-10-02 16:59 ` ace.of.zerosync at gmail dot com
` (9 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: ubizjak at gmail dot com @ 2012-10-02 9:59 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54741
--- Comment #10 from Uros Bizjak <ubizjak at gmail dot com> 2012-10-02 09:59:39 UTC ---
(In reply to comment #7)
> Created attachment 28312 [details]
> A patch with fixed ChangeLog
The patch looks OK, but please introduce some #defines:
#define XCR_XFEATURE_ENABLED_MASK 0x0
#define XSTATE_FP 0x1
#define XSTATE_SSE 0x2
#define XSTATE_YMM 0x4
(Please see testsuite/gcc.target/i386/avx-os-support.h)
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug target/54741] GCC 4.4, 4.5, 4.6 4.7 (probably 4.8) Generates un-usable code on AVX supported CPUs (FreeBSD)
2012-09-29 0:45 [Bug c++/54741] New: GCC 4.4, 4.5, 4.6 4.7 (probably 4.8) Generates un-usable code on AVX supported CPUs (FreeBSD) ace.of.zerosync at gmail dot com
` (9 preceding siblings ...)
2012-10-02 9:59 ` ubizjak at gmail dot com
@ 2012-10-02 16:59 ` ace.of.zerosync at gmail dot com
2012-10-02 17:00 ` ace.of.zerosync at gmail dot com
` (8 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: ace.of.zerosync at gmail dot com @ 2012-10-02 16:59 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54741
--- Comment #11 from M.S. Babaei <ace.of.zerosync at gmail dot com> 2012-10-02 16:58:57 UTC ---
Well well, something happened here!! This bug does not affect me anymore; Now
with or without your patch the above example code works just fine! I even tried
crypto++ which I had problem with in the past but it works fine too.
# uname -a
FreeBSD 13x17.localhost 9.1-PRERELEASE FreeBSD 9.1-PRERELEASE #0: Sat Sep 29
20:53:22 IRST 2012 babaei@13x17.localhost:/usr/obj/usr/src/sys/GENERIC
amd64
Two days ago I upgraded my system to 9-STABLE branch (a development branch),
looks like the FreeBSD folks implemented AVX support into thier kernel.
Hopefully I kept the old kernel. I rebuilt GCC 4.7 with your patch (GCC 4.6.4
is my system wide GCC and I'll won't mess with that one).
Then I booted to the old kernel and rebuilt the above example code and, hell
yeah!! Your patch does the job, the program finished normally with 'Hello,
World!' printed out on screen (Note: with old kernel without your patch, it
still get killed by SIGILL).
Since this is a development branch and is not out yet I believe your patch is
still relevant. Because out there 9.0, 8.3 and 7.4 is being used by people.
And one more thing. Your patch is little different from my 'driver-i386.c' file
(gcc-4.7-20120929) and my patch command failed to merge it. I merged your patch
manually which is attached.
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug target/54741] GCC 4.4, 4.5, 4.6 4.7 (probably 4.8) Generates un-usable code on AVX supported CPUs (FreeBSD)
2012-09-29 0:45 [Bug c++/54741] New: GCC 4.4, 4.5, 4.6 4.7 (probably 4.8) Generates un-usable code on AVX supported CPUs (FreeBSD) ace.of.zerosync at gmail dot com
` (10 preceding siblings ...)
2012-10-02 16:59 ` ace.of.zerosync at gmail dot com
@ 2012-10-02 17:00 ` ace.of.zerosync at gmail dot com
2012-10-02 19:49 ` hjl at gcc dot gnu.org
` (7 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: ace.of.zerosync at gmail dot com @ 2012-10-02 17:00 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54741
--- Comment #12 from M.S. Babaei <ace.of.zerosync at gmail dot com> 2012-10-02 17:00:28 UTC ---
Created attachment 28327
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28327
After applying patch - gcc4.7
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug target/54741] GCC 4.4, 4.5, 4.6 4.7 (probably 4.8) Generates un-usable code on AVX supported CPUs (FreeBSD)
2012-09-29 0:45 [Bug c++/54741] New: GCC 4.4, 4.5, 4.6 4.7 (probably 4.8) Generates un-usable code on AVX supported CPUs (FreeBSD) ace.of.zerosync at gmail dot com
` (11 preceding siblings ...)
2012-10-02 17:00 ` ace.of.zerosync at gmail dot com
@ 2012-10-02 19:49 ` hjl at gcc dot gnu.org
2012-10-02 20:25 ` hjl at gcc dot gnu.org
` (6 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: hjl at gcc dot gnu.org @ 2012-10-02 19:49 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54741
--- Comment #13 from hjl at gcc dot gnu.org <hjl at gcc dot gnu.org> 2012-10-02 19:49:05 UTC ---
Author: hjl
Date: Tue Oct 2 19:49:01 2012
New Revision: 191998
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=191998
Log:
Check SSE and YMM state support for -march=native
2012-10-02 H.J. Lu <hongjiu.lu@intel.com>
PR target/54741
* config/i386/driver-i386.c (XCR_XFEATURE_ENABLED_MASK): New.
(XSTATE_FP): Likewise.
(XSTATE_SSE): Likewise.
(XSTATE_YMM): Likewise.
(host_detect_local_cpu): Disable AVX, AVX2, FMA, FMA4 and XOP if
SSE and YMM states aren't supported.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/i386/driver-i386.c
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug target/54741] GCC 4.4, 4.5, 4.6 4.7 (probably 4.8) Generates un-usable code on AVX supported CPUs (FreeBSD)
2012-09-29 0:45 [Bug c++/54741] New: GCC 4.4, 4.5, 4.6 4.7 (probably 4.8) Generates un-usable code on AVX supported CPUs (FreeBSD) ace.of.zerosync at gmail dot com
` (12 preceding siblings ...)
2012-10-02 19:49 ` hjl at gcc dot gnu.org
@ 2012-10-02 20:25 ` hjl at gcc dot gnu.org
2012-10-02 20:31 ` hjl at gcc dot gnu.org
` (5 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: hjl at gcc dot gnu.org @ 2012-10-02 20:25 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54741
--- Comment #14 from hjl at gcc dot gnu.org <hjl at gcc dot gnu.org> 2012-10-02 20:25:13 UTC ---
Author: hjl
Date: Tue Oct 2 20:25:04 2012
New Revision: 192003
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=192003
Log:
Check SSE and YMM state support for -march=native
Backported from mainline
PR target/54741
* config/i386/driver-i386.c (XCR_XFEATURE_ENABLED_MASK): New.
(XSTATE_FP): Likewise.
(XSTATE_SSE): Likewise.
(XSTATE_YMM): Likewise.
(host_detect_local_cpu): Disable AVX, AVX2, FMA, FMA4 and XOP if
SSE and YMM states aren't supported.
Modified:
branches/gcc-4_7-branch/gcc/ChangeLog
branches/gcc-4_7-branch/gcc/config/i386/driver-i386.c
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug target/54741] GCC 4.4, 4.5, 4.6 4.7 (probably 4.8) Generates un-usable code on AVX supported CPUs (FreeBSD)
2012-09-29 0:45 [Bug c++/54741] New: GCC 4.4, 4.5, 4.6 4.7 (probably 4.8) Generates un-usable code on AVX supported CPUs (FreeBSD) ace.of.zerosync at gmail dot com
` (13 preceding siblings ...)
2012-10-02 20:25 ` hjl at gcc dot gnu.org
@ 2012-10-02 20:31 ` hjl at gcc dot gnu.org
2012-10-02 20:32 ` hjl.tools at gmail dot com
` (4 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: hjl at gcc dot gnu.org @ 2012-10-02 20:31 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54741
--- Comment #15 from hjl at gcc dot gnu.org <hjl at gcc dot gnu.org> 2012-10-02 20:31:43 UTC ---
Author: hjl
Date: Tue Oct 2 20:31:40 2012
New Revision: 192004
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=192004
Log:
Check SSE and YMM state support for -march=native
Backported from mainline
PR target/54741
* config/i386/driver-i386.c (XCR_XFEATURE_ENABLED_MASK): New.
(XSTATE_FP): Likewise.
(XSTATE_SSE): Likewise.
(XSTATE_YMM): Likewise.
(host_detect_local_cpu): Disable AVX, FMA, FMA4 and XOP if SSE
and YMM states aren't supported.
Modified:
branches/gcc-4_6-branch/gcc/ChangeLog
branches/gcc-4_6-branch/gcc/config/i386/driver-i386.c
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug target/54741] GCC 4.4, 4.5, 4.6 4.7 (probably 4.8) Generates un-usable code on AVX supported CPUs (FreeBSD)
2012-09-29 0:45 [Bug c++/54741] New: GCC 4.4, 4.5, 4.6 4.7 (probably 4.8) Generates un-usable code on AVX supported CPUs (FreeBSD) ace.of.zerosync at gmail dot com
` (14 preceding siblings ...)
2012-10-02 20:31 ` hjl at gcc dot gnu.org
@ 2012-10-02 20:32 ` hjl.tools at gmail dot com
2012-10-03 17:33 ` andrew.w.nosenko at gmail dot com
` (3 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: hjl.tools at gmail dot com @ 2012-10-02 20:32 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54741
H.J. Lu <hjl.tools at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.6.4
--- Comment #16 from H.J. Lu <hjl.tools at gmail dot com> 2012-10-02 20:32:39 UTC ---
Fixed.
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug target/54741] GCC 4.4, 4.5, 4.6 4.7 (probably 4.8) Generates un-usable code on AVX supported CPUs (FreeBSD)
2012-09-29 0:45 [Bug c++/54741] New: GCC 4.4, 4.5, 4.6 4.7 (probably 4.8) Generates un-usable code on AVX supported CPUs (FreeBSD) ace.of.zerosync at gmail dot com
` (15 preceding siblings ...)
2012-10-02 20:32 ` hjl.tools at gmail dot com
@ 2012-10-03 17:33 ` andrew.w.nosenko at gmail dot com
2012-10-03 17:36 ` andrew.w.nosenko at gmail dot com
` (2 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: andrew.w.nosenko at gmail dot com @ 2012-10-03 17:33 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54741
Andrew W. Nosenko <andrew.w.nosenko at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |andrew.w.nosenko at gmail
| |dot com
--- Comment #17 from Andrew W. Nosenko <andrew.w.nosenko at gmail dot com> 2012-10-03 17:32:51 UTC ---
Sorry, but commited patch does NOT fixes the problem.
It does just reverse -- disables AVX & Co on systems the has OSXSAVE,
XSTATE_SSE and XSTATE_YMM bits set, while the intention was to disable if any
of these bits are not set.
Proposed followup patch is attached.
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug target/54741] GCC 4.4, 4.5, 4.6 4.7 (probably 4.8) Generates un-usable code on AVX supported CPUs (FreeBSD)
2012-09-29 0:45 [Bug c++/54741] New: GCC 4.4, 4.5, 4.6 4.7 (probably 4.8) Generates un-usable code on AVX supported CPUs (FreeBSD) ace.of.zerosync at gmail dot com
` (16 preceding siblings ...)
2012-10-03 17:33 ` andrew.w.nosenko at gmail dot com
@ 2012-10-03 17:36 ` andrew.w.nosenko at gmail dot com
2012-10-03 18:06 ` jakub at gcc dot gnu.org
2012-10-03 18:48 ` jakub at gcc dot gnu.org
19 siblings, 0 replies; 21+ messages in thread
From: andrew.w.nosenko at gmail dot com @ 2012-10-03 17:36 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54741
--- Comment #18 from Andrew W. Nosenko <andrew.w.nosenko at gmail dot com> 2012-10-03 17:36:28 UTC ---
Created attachment 28342
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28342
Followup patch for config/i386/driver-i386.c
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug target/54741] GCC 4.4, 4.5, 4.6 4.7 (probably 4.8) Generates un-usable code on AVX supported CPUs (FreeBSD)
2012-09-29 0:45 [Bug c++/54741] New: GCC 4.4, 4.5, 4.6 4.7 (probably 4.8) Generates un-usable code on AVX supported CPUs (FreeBSD) ace.of.zerosync at gmail dot com
` (17 preceding siblings ...)
2012-10-03 17:36 ` andrew.w.nosenko at gmail dot com
@ 2012-10-03 18:06 ` jakub at gcc dot gnu.org
2012-10-03 18:48 ` jakub at gcc dot gnu.org
19 siblings, 0 replies; 21+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-10-03 18:06 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54741
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|FIXED |
--- Comment #19 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-10-03 18:06:29 UTC ---
The patch looks good to me, but patches should be posted to gcc-patches at
gcc.gnu.org mailing list instead.
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug target/54741] GCC 4.4, 4.5, 4.6 4.7 (probably 4.8) Generates un-usable code on AVX supported CPUs (FreeBSD)
2012-09-29 0:45 [Bug c++/54741] New: GCC 4.4, 4.5, 4.6 4.7 (probably 4.8) Generates un-usable code on AVX supported CPUs (FreeBSD) ace.of.zerosync at gmail dot com
` (18 preceding siblings ...)
2012-10-03 18:06 ` jakub at gcc dot gnu.org
@ 2012-10-03 18:48 ` jakub at gcc dot gnu.org
19 siblings, 0 replies; 21+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-10-03 18:48 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54741
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|REOPENED |RESOLVED
Resolution| |FIXED
--- Comment #20 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-10-03 18:48:30 UTC ---
Seems H.J. has committed this already:
http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=192044
http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=192045
http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=192046
^ permalink raw reply [flat|nested] 21+ messages in thread