From: Quentin Neill Date: Tue, 7 Feb 2012 16:17:26 +0000 (+0000) Subject: backport: re PR target/48743 (-march=native mis-detects AMD K6-2+ / K6-3 as Athlon... X-Git-Tag: releases/gcc-4.5.4~237 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=67da9b6e892051d161e1332b0ff84855885d5df3;p=thirdparty%2Fgcc.git backport: re PR target/48743 (-march=native mis-detects AMD K6-2+ / K6-3 as Athlon - compiled C fails with "illegal instruction") 2012-02-07 Quentin Neill Backport from mainline: 2012-01-19 Quentin Neill PR target/48743 * config/i386/driver-i386.c (host_detect_local_cpu): Also check family to distinguish PROCESSOR_ATHLON. From-SVN: r183973 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 92e558b9a62a..a08b2e8ec692 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +2012-02-07 Quentin Neill + + Backport from mainline: + 2012-01-19 Quentin Neill + + PR target/48743 + * config/i386/driver-i386.c (host_detect_local_cpu): Also check + family to distinguish PROCESSOR_ATHLON. + 2012-02-07 Kai Tietz Dave Korn diff --git a/gcc/config/i386/driver-i386.c b/gcc/config/i386/driver-i386.c index 063279aa629e..9f3adcc923ec 100644 --- a/gcc/config/i386/driver-i386.c +++ b/gcc/config/i386/driver-i386.c @@ -494,7 +494,7 @@ const char *host_detect_local_cpu (int argc, const char **argv) processor = PROCESSOR_AMDFAM10; else if (has_sse2 || has_longmode) processor = PROCESSOR_K8; - else if (has_3dnowp) + else if (has_3dnowp && family == 6) processor = PROCESSOR_ATHLON; else if (has_mmx) processor = PROCESSOR_K6;