public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/57688] New: -O3 -march=native generates illegal opcode on AMD
@ 2013-06-23 16:14 dcb314 at hotmail dot com
  2013-06-23 16:48 ` [Bug c++/57688] " mikpe at it dot uu.se
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: dcb314 at hotmail dot com @ 2013-06-23 16:14 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 57688
           Summary: -O3 -march=native generates illegal opcode on AMD
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dcb314 at hotmail dot com

Created attachment 30347
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30347&action=edit
C++ source code

I just noticed that -march=native support broke from
date 20130621 to 20130623 for AMD Phenom as follows

[dcb@localhost foundBugs]$ ../results/bin/g++ -g -O3 -Wall bug113.cc
[dcb@localhost foundBugs]$ ./a.out
Time for caxpy1 = 0.16 seconds [5120 Mflops]
[dcb@localhost foundBugs]$ ../results/bin/g++ -g -O3 -march=native -Wall
bug113.cc
[dcb@localhost foundBugs]$ ./a.out
Illegal instruction (core dumped)
[dcb@localhost foundBugs]$

Valgrind helps out with this

vex amd64->IR: unhandled instruction bytes: 0x8F 0xEA 0xF8 0x10 0xD2 0x2 0x1E
0x0
vex amd64->IR:   REX=0 REX.W=0 REX.R=0 REX.X=0 REX.B=0
vex amd64->IR:   VEX=0 VEX.L=0 VEX.nVVVV=0x0 ESC=NONE
vex amd64->IR:   PFX.66=0 PFX.F2=0 PFX.F3=0
==23912== valgrind: Unrecognised instruction at address 0x4045e2.
==23912==    at 0x4045E2: caxpy3(Vector<Complex>&, Vector<Complex>&, Complex)
(bug113.cc:52)
==23912==    by 0x4012C0: main (bug113.cc:258)
==23912== Your program just tried to execute an instruction that Valgrind
==23912== did not recognise.  There are two possible reasons for this.
==23912== 1. Your program has a bug and erroneously jumped to a non-code
==23912==    location.  If you are running Memcheck and you just saw a
==23912==    warning about a bad jump, it's probably your program's fault.
==23912== 2. The instruction is legitimate but Valgrind doesn't handle it,
==23912==    i.e. it's Valgrind's fault.  If you think this is the case or
==23912==    you are not sure, please let us know and we'll try to fix it.
==23912== Either way, Valgrind will now raise a SIGILL signal which will
==23912== probably kill your program.
==23912==
==23912== Process terminating with default action of signal 4 (SIGILL)
==23912==  Illegal opcode at address 0x4045E2
==23912==    at 0x4045E2: caxpy3(Vector<Complex>&, Vector<Complex>&, Complex)
(bug113.cc:52)

Also

[dcb@localhost foundBugs]$ head /proc/cpuinfo
processor   : 0
vendor_id   : AuthenticAMD
cpu family  : 16
model       : 4
model name  : AMD Phenom(tm) II X4 970 Processor
stepping    : 3
microcode   : 0x10000c8
cpu MHz     : 3500.000
cache size  : 512 KB
physical id : 0


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

end of thread, other threads:[~2013-06-23 19:01 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-23 16:14 [Bug c++/57688] New: -O3 -march=native generates illegal opcode on AMD dcb314 at hotmail dot com
2013-06-23 16:48 ` [Bug c++/57688] " mikpe at it dot uu.se
2013-06-23 17:23 ` [Bug target/57688] " paolo.carlini at oracle dot com
2013-06-23 18:12 ` jakub at gcc dot gnu.org
2013-06-23 18:41 ` dcb314 at hotmail dot com
2013-06-23 18:44 ` pinskia at gcc dot gnu.org
2013-06-23 18:46 ` dcb314 at hotmail dot com
2013-06-23 18:48 ` dcb314 at hotmail dot com
2013-06-23 18:51 ` [Bug target/57688] -O3 -march=native generates illegal opcode on AMD Phenom dcb314 at hotmail dot com
2013-06-23 19:01 ` mikpe at it dot uu.se

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).