public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/49633] New: GCC -march=native on Intel Sandy Bridge causes some 'invalid opcode'
@ 2011-07-04 20:48 nemykal at gmail dot com
  2011-07-05  1:33 ` [Bug target/49633] " hjl.tools at gmail dot com
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: nemykal at gmail dot com @ 2011-07-04 20:48 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49633

           Summary: GCC -march=native on Intel Sandy Bridge causes some
                    'invalid opcode'
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: nemykal@gmail.com


Hi,
Just noticed this on my gentoo system after compiling gawk.
Checked dmesg and saw these errors:

gawk[12982] general protection ip:400264 sp:7fffb95d8278 error:0 in
gawk[400000+16d000]
gawk[435] trap invalid opcode ip:442f27 sp:7fffeea30d10 error:0 in
gawk[400000+63000]

Using gcc version 4.7.0-alpha20110625 20110625

Seems pretty simple to me: the compiler adds -mfused-madd when it shouldn't be.
When I compiled gawk with -march=native, it caused the above errors. As soon as
I changed the CFLAGS to "-march=native -mno-fused-madd -O2 -pipe", gawk worked
properly.

I'm getting these errors on my system which has an Intel 2600k (sandy bridge)
I dont believe these have the fused multiply add instructions yet!

Here are the flags in /proc/cpuinfo:
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov
pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm
constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc
aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm
sse4_1 sse4_2 popcnt aes xsave avx lahf_lm ida arat epb xsaveopt pln pts dts
tpr_shadow vnmi flexpriority ept vpid


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug target/49633] GCC -march=native on Intel Sandy Bridge causes some 'invalid opcode'
  2011-07-04 20:48 [Bug c/49633] New: GCC -march=native on Intel Sandy Bridge causes some 'invalid opcode' nemykal at gmail dot com
@ 2011-07-05  1:33 ` hjl.tools at gmail dot com
  2011-07-05  2:15 ` hjl.tools at gmail dot com
  2013-11-10  5:59 ` pinskia at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: hjl.tools at gmail dot com @ 2011-07-05  1:33 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49633

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING
   Last reconfirmed|                            |2011.07.05 01:32:42
                 CC|                            |hjl.tools at gmail dot com,
                   |                            |sergos.gnu at gmail dot com
     Ever Confirmed|0                           |1

--- Comment #1 from H.J. Lu <hjl.tools at gmail dot com> 2011-07-05 01:32:42 UTC ---
Please provide the processed source file to show that
-march=native generates FMA instructions.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug target/49633] GCC -march=native on Intel Sandy Bridge causes some 'invalid opcode'
  2011-07-04 20:48 [Bug c/49633] New: GCC -march=native on Intel Sandy Bridge causes some 'invalid opcode' nemykal at gmail dot com
  2011-07-05  1:33 ` [Bug target/49633] " hjl.tools at gmail dot com
@ 2011-07-05  2:15 ` hjl.tools at gmail dot com
  2013-11-10  5:59 ` pinskia at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: hjl.tools at gmail dot com @ 2011-07-05  2:15 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49633

--- Comment #2 from H.J. Lu <hjl.tools at gmail dot com> 2011-07-05 02:14:40 UTC ---
I tried GCC 4.7.0 20110704 with -march=native on
gawk-3.1.8 on Intel Sandy Bridge.  I have no problems.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug target/49633] GCC -march=native on Intel Sandy Bridge causes some 'invalid opcode'
  2011-07-04 20:48 [Bug c/49633] New: GCC -march=native on Intel Sandy Bridge causes some 'invalid opcode' nemykal at gmail dot com
  2011-07-05  1:33 ` [Bug target/49633] " hjl.tools at gmail dot com
  2011-07-05  2:15 ` hjl.tools at gmail dot com
@ 2013-11-10  5:59 ` pinskia at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2013-11-10  5:59 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49633

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |RESOLVED
         Resolution|---                         |INVALID

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
No feedback in 2 years so closing.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-11-10  5:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-04 20:48 [Bug c/49633] New: GCC -march=native on Intel Sandy Bridge causes some 'invalid opcode' nemykal at gmail dot com
2011-07-05  1:33 ` [Bug target/49633] " hjl.tools at gmail dot com
2011-07-05  2:15 ` hjl.tools at gmail dot com
2013-11-10  5:59 ` pinskia at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).