aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH.J. Lu <hongjiu.lu@intel.com>2013-12-26 16:10:55 +0000
committerH.J. Lu <hjl@gcc.gnu.org>2013-12-26 08:10:55 -0800
commitdd908cc5d8ee9e775c45b5a7078e1276f321d134 (patch)
tree5e04ea8d3cc906ed0fbca194c85c51b9f43c8ef5
parent806ac507476f414a3accae49e8ced8789a2190a3 (diff)
downloadgcc-dd908cc5d8ee9e775c45b5a7078e1276f321d134.zip
gcc-dd908cc5d8ee9e775c45b5a7078e1276f321d134.tar.gz
gcc-dd908cc5d8ee9e775c45b5a7078e1276f321d134.tar.bz2
Don't check/change generic/i686 tuning
gcc/ PR target/59588 * config/i386/i386.c (ix86_option_override_internal): Don't check generic tuning. Don't change i686 tuning. gcc/testsuite/ PR target/59588 * gcc.target/i386/pr59588-1.c: New file. * gcc.target/i386/pr59588-2.c: Likewise. From-SVN: r206213
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/config/i386/i386.c20
-rw-r--r--gcc/testsuite/ChangeLog6
-rw-r--r--gcc/testsuite/gcc.target/i386/pr59588-1.c7
-rw-r--r--gcc/testsuite/gcc.target/i386/pr59588-2.c7
5 files changed, 30 insertions, 16 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 186fa1c..d8c272a 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,11 @@
2013-12-26 H.J. Lu <hongjiu.lu@intel.com>
+ PR target/59588
+ * config/i386/i386.c (ix86_option_override_internal): Don't
+ check generic tuning. Don't change i686 tuning.
+
+2013-12-26 H.J. Lu <hongjiu.lu@intel.com>
+
PR target/59601
* config/i386/i386.c (get_builtin_code_for_version): Map
PROCESSOR_NEHALEM to "corei7".
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 71063bb..0cf0a9d 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -3283,23 +3283,13 @@ ix86_option_override_internal (bool main_args_p,
/* Need to check -mtune=generic first. */
if (opts->x_ix86_tune_string)
{
- if (!strcmp (opts->x_ix86_tune_string, "generic")
- || !strcmp (opts->x_ix86_tune_string, "i686")
- /* As special support for cross compilers we read -mtune=native
+ /* As special support for cross compilers we read -mtune=native
as -mtune=generic. With native compilers we won't see the
-mtune=native, as it was changed by the driver. */
- || !strcmp (opts->x_ix86_tune_string, "native"))
+ if (!strcmp (opts->x_ix86_tune_string, "native"))
{
opts->x_ix86_tune_string = "generic";
}
- /* If this call is for setting the option attribute, allow the
- generic that was previously set. */
- else if (!main_args_p
- && !strcmp (opts->x_ix86_tune_string, "generic"))
- ;
- else if (!strncmp (opts->x_ix86_tune_string, "generic", 7))
- error ("bad value (%s) for %stune=%s %s",
- opts->x_ix86_tune_string, prefix, suffix, sw);
else if (!strcmp (opts->x_ix86_tune_string, "x86-64"))
warning (OPT_Wdeprecated, "%stune=x86-64%s is deprecated; use "
"%stune=k8%s or %stune=generic%s instead as appropriate",
@@ -3318,9 +3308,7 @@ ix86_option_override_internal (bool main_args_p,
/* opts->x_ix86_tune_string is set to opts->x_ix86_arch_string
or defaulted. We need to use a sensible tune option. */
- if (!strcmp (opts->x_ix86_tune_string, "generic")
- || !strcmp (opts->x_ix86_tune_string, "x86-64")
- || !strcmp (opts->x_ix86_tune_string, "i686"))
+ if (!strcmp (opts->x_ix86_tune_string, "x86-64"))
{
opts->x_ix86_tune_string = "generic";
}
@@ -3600,7 +3588,7 @@ ix86_option_override_internal (bool main_args_p,
else if (!strcmp (opts->x_ix86_arch_string, "intel"))
error ("intel CPU can be used only for %stune=%s %s",
prefix, suffix, sw);
- else if (!strncmp (opts->x_ix86_arch_string, "generic", 7) || i == pta_size)
+ else if (i == pta_size)
error ("bad value (%s) for %sarch=%s %s",
opts->x_ix86_arch_string, prefix, suffix, sw);
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 51be98c..c64a552 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+2013-12-26 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR target/59588
+ * gcc.target/i386/pr59588-1.c: New file.
+ * gcc.target/i386/pr59588-2.c: Likewise.
+
2013-12-26 Uros Bizjak <ubizjak@gmail.com>
H.J. Lu <hongjiu.lu@intel.com>
diff --git a/gcc/testsuite/gcc.target/i386/pr59588-1.c b/gcc/testsuite/gcc.target/i386/pr59588-1.c
new file mode 100644
index 0000000..6f5fb72
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr59588-1.c
@@ -0,0 +1,7 @@
+/* { dg-do preprocess } */
+/* { dg-require-effective-target ia32 } */
+/* { dg-options "-march=i686" } */
+
+#ifndef __tune_i686__
+#error "__tune_i686__ should be defined for this test"
+#endif
diff --git a/gcc/testsuite/gcc.target/i386/pr59588-2.c b/gcc/testsuite/gcc.target/i386/pr59588-2.c
new file mode 100644
index 0000000..7c427e3
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr59588-2.c
@@ -0,0 +1,7 @@
+/* { dg-do preprocess } */
+/* { dg-require-effective-target ia32 } */
+/* { dg-options "-mtune=i686" } */
+
+#ifndef __tune_i686__
+#error "__tune_i686__ should be defined for this test"
+#endif