@@ -549,6 +549,9 @@ const char *host_detect_local_cpu (int argc, const char **argv)
case 0x26:
/* Atom. */
cpu = "atom";
+ /* No need to add -mssse3, -msse3. */
+ has_sse3 = 0;
+ has_ssse3 = 0;
break;
case 0x1a:
case 0x1e:
@@ -556,20 +559,34 @@ const char *host_detect_local_cpu (int argc, const char **argv)
case 0x2e:
/* FIXME: Optimize for Nehalem. */
cpu = "core2";
+ /* No need to add -mssse3, -msse3.
+ FIXME: No need for -msse4.2. */
+ has_sse3 = 0;
+ has_ssse3 = 0;
break;
case 0x25:
case 0x2f:
/* FIXME: Optimize for Westmere. */
cpu = "core2";
+ /* No need to add -mssse3, -msse3.
+ FIXME: No need for -msse4.2. */
+ has_sse3 = 0;
+ has_ssse3 = 0;
break;
case 0x17:
case 0x1d:
/* Penryn. FIXME: -mtune=core2 is slower than -mtune=generic */
cpu = "core2";
+ /* No need to add -mssse3, -msse3. */
+ has_sse3 = 0;
+ has_ssse3 = 0;
break;
case 0x0f:
/* Merom. FIXME: -mtune=core2 is slower than -mtune=generic */
cpu = "core2";
+ /* No need to add -mssse3, -msse3. */
+ has_sse3 = 0;
+ has_ssse3 = 0;
break;
default:
if (arch)
@@ -606,6 +623,8 @@ const char *host_detect_local_cpu (int argc, const char **argv)
cpu = "nocona";
else
cpu = "prescott";
+ /* No need to add -msse3. */
+ has_sse3 = 0;
}
else
cpu = "pentium4";
@@ -693,6 +712,10 @@ const char *host_detect_local_cpu (int argc, const char **argv)
options = concat (options, " -msse4.2", NULL);
else if (has_sse4_1)
options = concat (options, " -msse4.1", NULL);
+ else if (has_ssse3)
+ options = concat (options, " -mssse3", NULL);
+ else if (has_sse3)
+ options = concat (options, " -msse3", NULL);
}
done: