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 target/48743] -march=native mis-detects AMD K6-2+ / K6-3 as Athlon - compiled C fails with "illegal instruction"


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

--- Comment #5 from Joe Stroller <gcc.gnu.org at stellar dot eclipse.co.uk> 2011-06-16 15:10:30 UTC ---
(In reply to comment #4)
> Does this solve your problem?

Yes! Thank you, Mikael, and apologies for not testing sooner.

The fix in attachment 24326 works perfectly.

I tested it on gcc 4.5.2, and the "if" that is changed is at line 509 on that
version, but the structure is exactly the same. 

Now:

# echo | gcc -dM -E - -march=native gcc -v -Q --help=target -march=native 2>&1
| grep march
 /usr/libexec/gcc/i586-pc-linux-gnu/4.5.2/cc1 -E -v help-dummy
-D_FORTIFY_SOURCE=2 -march=k6-3 --param l1-cache-size=32 --param
l1-cache-line-size=32 --param l2-cache-size=128 -mtune=k6 -fhelp=target -dM
  -march=                               k6-3
# cc -march=native -E -v - </dev/null 2>&1 | grep cc1
 /usr/libexec/gcc/i586-pc-linux-gnu/4.5.2/cc1 -E -quiet -v -
-D_FORTIFY_SOURCE=2 -march=k6-3 --param l1-cache-size=32 --param
l1-cache-line-size=32 --param l2-cache-size=128 -mtune=k6
#

Additionally I have recompiled my whole system with -march=native, and it is
working perfectly.

I would be very grateful if this were able to be incorporated into gcc.


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