+2008-11-04 Uros Bizjak <ubizjak@gmail.com>
+
+ * config/i386/driver-i386.c (enum vendor_signatures): New enum.
+ (host_detect_local_cpu): Use it instead of casted strings to
+ compare vendor signatures.
+
2008-11-03 Mikael Pettersson <mikpe@it.uu.se>
PR target/37989
* tree-inline.c (tree_inlinable_function_p): Remove tuples
debugging hack.
- * gimplify.c (gimplify_expr): Drop TREE_OVERFLOW from
- INTEGER_CSTs.
+ * gimplify.c (gimplify_expr): Drop TREE_OVERFLOW from INTEGER_CSTs.
PR debug/37020
* c-decl.c (merge_decls): Don't call outlining_inline_function hook.
return describe_cache (level1, level2);
}
+enum vendor_signatures
+{
+ SIG_INTEL = 0x756e6547 /* Genu */,
+ SIG_AMD = 0x68747541 /* Auth */,
+ SIG_GEODE = 0x646f6547 /* Geod */
+};
+
/* This will be called by the spec parser in gcc.c when it sees
a %:local_cpu_detect(args) construct. Currently it will be called
with either "arch" or "tune" as argument depending on if -march=native
if (!arch)
{
- if (vendor == *(const unsigned int*) "Auth")
+ if (vendor == SIG_AMD)
cache = detect_caches_amd (ext_level);
- else if (vendor == *(const unsigned int*) "Genu")
+ else if (vendor == SIG_INTEL)
{
bool xeon_mp = (family == 15 && model == 6);
cache = detect_caches_intel (xeon_mp, max_level, ext_level);
}
}
- if (vendor == *(const unsigned int*) "Auth")
+ if (vendor == SIG_AMD)
{
processor = PROCESSOR_PENTIUM;
if (has_sse4a)
processor = PROCESSOR_AMDFAM10;
}
- else if (vendor == *(const unsigned int*) "Geod")
+ else if (vendor == SIG_GEODE)
processor = PROCESSOR_GEODE;
else
{