aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUros Bizjak <ubizjak@gmail.com>2013-05-16 23:41:26 +0200
committerUros Bizjak <uros@gcc.gnu.org>2013-05-16 23:41:26 +0200
commitaf0e415bd096a857158d0f1a39abe8c17deb40cf (patch)
tree443dcb5420eacd7ba204787d7ec318ed029ff899
parent749dee7e60df58dea8e780134c641a9f67b9fe18 (diff)
downloadgcc-af0e415bd096a857158d0f1a39abe8c17deb40cf.zip
gcc-af0e415bd096a857158d0f1a39abe8c17deb40cf.tar.gz
gcc-af0e415bd096a857158d0f1a39abe8c17deb40cf.tar.bz2
driver-i386.c (host_detect_local_cpu): Determine cache parameters using detect_caches_amd also for CYRIX...
* config/i386/driver-i386.c (host_detect_local_cpu): Determine cache parameters using detect_caches_amd also for CYRIX, NSC and TM2 signatures. From-SVN: r198989
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/config/i386/driver-i386.c28
2 files changed, 24 insertions, 10 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index e3051b7..39f8615 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,4 +1,10 @@
2013-05-16 Uros Bizjak <ubizjak@gmail.com>
+
+ * config/i386/driver-i386.c (host_detect_local_cpu): Determine
+ cache parameters using detect_caches_amd also for CYRIX,
+ NSC and TM2 signatures.
+
+2013-05-16 Uros Bizjak <ubizjak@gmail.com>
Dzianis Kahanovich <mahatma@eu.by>
PR target/45359
diff --git a/gcc/config/i386/driver-i386.c b/gcc/config/i386/driver-i386.c
index 7a7b357..49db3be 100644
--- a/gcc/config/i386/driver-i386.c
+++ b/gcc/config/i386/driver-i386.c
@@ -518,7 +518,10 @@ const char *host_detect_local_cpu (int argc, const char **argv)
if (!arch)
{
if (vendor == signature_AMD_ebx
- || vendor == signature_CENTAUR_ebx)
+ || vendor == signature_CENTAUR_ebx
+ || vendor == signature_CYRIX_ebx
+ || vendor == signature_NSC_ebx
+ || vendor == signature_TM2_ebx)
cache = detect_caches_amd (ext_level);
else if (vendor == signature_INTEL_ebx)
{
@@ -565,8 +568,9 @@ const char *host_detect_local_cpu (int argc, const char **argv)
{
if (arch)
{
- if (family == 6)
+ switch (family)
{
+ case 6:
if (model > 9)
/* Use the default detection procedure. */
processor = PROCESSOR_GENERIC32;
@@ -575,16 +579,20 @@ const char *host_detect_local_cpu (int argc, const char **argv)
else if (model >= 6)
cpu = "c3";
else
- /* We have no idea. */
processor = PROCESSOR_GENERIC32;
+ break;
+ case 5:
+ if (has_3dnow)
+ cpu = "winchip2";
+ else if (has_mmx)
+ cpu = "winchip2-c6";
+ else
+ processor = PROCESSOR_GENERIC32;
+ break;
+ default:
+ /* We have no idea. */
+ processor = PROCESSOR_GENERIC32;
}
- else if (has_3dnow)
- cpu = "winchip2";
- else if (has_mmx)
- cpu = "winchip2-c6";
- else
- /* We have no idea. */
- processor = PROCESSOR_GENERIC32;
}
}
else