From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19843 invoked by alias); 16 Jun 2011 15:10:51 -0000 Received: (qmail 19830 invoked by uid 22791); 16 Jun 2011 15:10:49 -0000 X-SWARE-Spam-Status: No, hits=-2.7 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 16 Jun 2011 15:10:35 +0000 From: "gcc.gnu.org at stellar dot eclipse.co.uk" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/48743] -march=native mis-detects AMD K6-2+ / K6-3 as Athlon - compiled C fails with "illegal instruction" X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: gcc.gnu.org at stellar dot eclipse.co.uk X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Date: Thu, 16 Jun 2011 15:10:00 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2011-06/txt/msg01450.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48743 --- Comment #5 from Joe Stroller 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 - &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.