aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorUros Bizjak <ubizjak@gmail.com>2013-05-16 21:53:36 +0200
committerUros Bizjak <uros@gcc.gnu.org>2013-05-16 21:53:36 +0200
commit19db293ad5760f49869e5c23823598c98a30d0f8 (patch)
tree7a466f05fd866a4e34193eb525e7a25909fbe6da /gcc
parent251a41b97801ec2cffc490286fe6da9c5b8f65f5 (diff)
downloadgcc-19db293ad5760f49869e5c23823598c98a30d0f8.zip
gcc-19db293ad5760f49869e5c23823598c98a30d0f8.tar.gz
gcc-19db293ad5760f49869e5c23823598c98a30d0f8.tar.bz2
re PR target/45359 (poor -march=native choices for VIA C7 Esther processors)
PR target/45359 PR target/46396 * config/i386/driver-i386.c (host_detect_local_cpu): Detect VIA/Centaur processors and determine their cache parameters using detect_caches_amd. Co-Authored-By: Dzianis Kahanovich <mahatma@eu.by> From-SVN: r198987
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog11
-rw-r--r--gcc/config/i386/driver-i386.c29
2 files changed, 38 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 574694c..e3051b7 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,12 @@
+2013-05-16 Uros Bizjak <ubizjak@gmail.com>
+ Dzianis Kahanovich <mahatma@eu.by>
+
+ PR target/45359
+ PR target/46396
+ * config/i386/driver-i386.c (host_detect_local_cpu): Detect
+ VIA/Centaur processors and determine their cache parameters
+ using detect_caches_amd.
+
2013-05-16 Teresa Johnson <tejohnson@google.com>
* cfgrtl.c (verify_hot_cold_block_grouping): Return err.
@@ -111,7 +120,7 @@
2013-05-15 Uros Bizjak <ubizjak@gmail.com>
- * config/i386/i386.c (iy86_option_override_internal): Update
+ * config/i386/i386.c (ix86_option_override_internal): Update
processor_alias_table for missing PTA_PRFCHW and PTA_FXSR flags. Add
PTA_POPCNT to corei7 entry and remove PTA_SSE from athlon-4 entry.
Do not enable SSE prefetch on non-SSE 3dNow! targets. Enable
diff --git a/gcc/config/i386/driver-i386.c b/gcc/config/i386/driver-i386.c
index 256cb6a..7a7b357 100644
--- a/gcc/config/i386/driver-i386.c
+++ b/gcc/config/i386/driver-i386.c
@@ -517,7 +517,8 @@ const char *host_detect_local_cpu (int argc, const char **argv)
if (!arch)
{
- if (vendor == signature_AMD_ebx)
+ if (vendor == signature_AMD_ebx
+ || vendor == signature_CENTAUR_ebx)
cache = detect_caches_amd (ext_level);
else if (vendor == signature_INTEL_ebx)
{
@@ -560,6 +561,32 @@ const char *host_detect_local_cpu (int argc, const char **argv)
else
processor = PROCESSOR_PENTIUM;
}
+ else if (vendor == signature_CENTAUR_ebx)
+ {
+ if (arch)
+ {
+ if (family == 6)
+ {
+ if (model > 9)
+ /* Use the default detection procedure. */
+ processor = PROCESSOR_GENERIC32;
+ else if (model == 9)
+ cpu = "c3-2";
+ else if (model >= 6)
+ cpu = "c3";
+ else
+ /* 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
{
switch (family)