Commit fb112177 by H.J. Lu Committed by H.J. Lu

Revert the last change on driver-i386.c

	PR target/61570
	* config/i386/driver-i386.c (host_detect_local_cpu): Revert
	the last change.

From-SVN: r211943
parent 1eb68d2d
2014-06-24 H.J. Lu <hongjiu.lu@intel.com>
PR target/61570
* config/i386/driver-i386.c (host_detect_local_cpu): Revert
the last change.
2014-06-24 Trevor Saunders <tsaunders@mozilla.com> 2014-06-24 Trevor Saunders <tsaunders@mozilla.com>
* alloc-pool.c (alloc_pool_hash): Use hash_map instead of hash_table. * alloc-pool.c (alloc_pool_hash): Use hash_map instead of hash_table.
......
...@@ -415,7 +415,6 @@ const char *host_detect_local_cpu (int argc, const char **argv) ...@@ -415,7 +415,6 @@ const char *host_detect_local_cpu (int argc, const char **argv)
bool arch; bool arch;
unsigned int l2sizekb = 0; unsigned int l2sizekb = 0;
unsigned int arch_64bit = 1;
if (argc < 1) if (argc < 1)
return NULL; return NULL;
...@@ -657,14 +656,11 @@ const char *host_detect_local_cpu (int argc, const char **argv) ...@@ -657,14 +656,11 @@ const char *host_detect_local_cpu (int argc, const char **argv)
{ {
case PROCESSOR_I386: case PROCESSOR_I386:
/* Default. */ /* Default. */
arch_64bit = 0;
break; break;
case PROCESSOR_I486: case PROCESSOR_I486:
arch_64bit = 0;
cpu = "i486"; cpu = "i486";
break; break;
case PROCESSOR_PENTIUM: case PROCESSOR_PENTIUM:
arch_64bit = 0;
if (arch && has_mmx) if (arch && has_mmx)
cpu = "pentium-mmx"; cpu = "pentium-mmx";
else else
...@@ -749,25 +745,21 @@ const char *host_detect_local_cpu (int argc, const char **argv) ...@@ -749,25 +745,21 @@ const char *host_detect_local_cpu (int argc, const char **argv)
/* Assume Core 2. */ /* Assume Core 2. */
cpu = "core2"; cpu = "core2";
} }
else if (has_sse3)
/* It is Core Duo. */
cpu = "pentium-m";
else if (has_sse2)
/* It is Pentium M. */
cpu = "pentium-m";
else if (has_sse)
/* It is Pentium III. */
cpu = "pentium3";
else if (has_mmx)
/* It is Pentium II. */
cpu = "pentium2";
else else
{ /* Default to Pentium Pro. */
arch_64bit = 0; cpu = "pentiumpro";
if (has_sse3)
/* It is Core Duo. */
cpu = "pentium-m";
else if (has_sse2)
/* It is Pentium M. */
cpu = "pentium-m";
else if (has_sse)
/* It is Pentium III. */
cpu = "pentium3";
else if (has_mmx)
/* It is Pentium II. */
cpu = "pentium2";
else
/* Default to Pentium Pro. */
cpu = "pentiumpro";
}
} }
else else
/* For -mtune, we default to -mtune=generic. */ /* For -mtune, we default to -mtune=generic. */
...@@ -781,30 +773,21 @@ const char *host_detect_local_cpu (int argc, const char **argv) ...@@ -781,30 +773,21 @@ const char *host_detect_local_cpu (int argc, const char **argv)
if (has_longmode) if (has_longmode)
cpu = "nocona"; cpu = "nocona";
else else
{ cpu = "prescott";
cpu = "prescott";
arch_64bit = 0;
}
} }
else else
{ cpu = "pentium4";
cpu = "pentium4";
arch_64bit = 0;
}
break; break;
case PROCESSOR_GEODE: case PROCESSOR_GEODE:
arch_64bit = 0;
cpu = "geode"; cpu = "geode";
break; break;
case PROCESSOR_K6: case PROCESSOR_K6:
arch_64bit = 0;
if (arch && has_3dnow) if (arch && has_3dnow)
cpu = "k6-3"; cpu = "k6-3";
else else
cpu = "k6"; cpu = "k6";
break; break;
case PROCESSOR_ATHLON: case PROCESSOR_ATHLON:
arch_64bit = 0;
if (arch && has_sse) if (arch && has_sse)
cpu = "athlon-4"; cpu = "athlon-4";
else else
...@@ -913,10 +896,6 @@ const char *host_detect_local_cpu (int argc, const char **argv) ...@@ -913,10 +896,6 @@ const char *host_detect_local_cpu (int argc, const char **argv)
const char *xsavec = has_xsavec ? " -mxsavec" : " -mno-xsavec"; const char *xsavec = has_xsavec ? " -mxsavec" : " -mno-xsavec";
const char *xsaves = has_xsaves ? " -mxsaves" : " -mno-xsaves"; const char *xsaves = has_xsaves ? " -mxsaves" : " -mno-xsaves";
/* Assume x86-64 if a 32-bit processor supports SSE2 and 64-bit. */
if (arch_64bit == 0 && has_sse2 && has_longmode)
cpu = "x86-64";
options = concat (options, mmx, mmx3dnow, sse, sse2, sse3, ssse3, options = concat (options, mmx, mmx3dnow, sse, sse2, sse3, ssse3,
sse4a, cx16, sahf, movbe, aes, sha, pclmul, sse4a, cx16, sahf, movbe, aes, sha, pclmul,
popcnt, abm, lwp, fma, fma4, xop, bmi, bmi2, popcnt, abm, lwp, fma, fma4, xop, bmi, bmi2,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment