This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/49633] New: GCC -march=native on Intel Sandy Bridge causes some 'invalid opcode'


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]