Commit c2f17e19 by Uros Bizjak Committed by Uros Bizjak

i386.h (TARGET_CPU_DEFAULT_*): Substitute with ...

	* config/i386/i386.h (TARGET_CPU_DEFAULT_*): Substitute with ...
	(enum target_cpu_default): ... this enum.
	(TARGET_CPU_DEFAULT_NAMES): Remove macro.  Move initializer to ...
	* config/i386/i386.c (override_options): ... here.
	* config/i386/i386-interix.h (TARGET_CPU_DEFAULT): Use
	TARGET_CPU_DEFAULT_i486.

From-SVN: r130177
parent 35912544
2007-11-14 Uros Bizjak <ubizjak@gmail.com>
* config/i386/i386.h (TARGET_CPU_DEFAULT_*): Substitute with ...
(enum target_cpu_default): ... this enum.
(TARGET_CPU_DEFAULT_NAMES): Remove macro. Move initializer to ...
* config/i386/i386.c (override_options): ... here.
* config/i386/i386-interix.h (TARGET_CPU_DEFAULT): Use
TARGET_CPU_DEFAULT_i486.
2007-11-14 Rask Ingemann Lambertsen <rask@sygehus.dk> 2007-11-14 Rask Ingemann Lambertsen <rask@sygehus.dk>
* global.c (rest_of_handle_global_alloc): Fix comment typos. * global.c (rest_of_handle_global_alloc): Fix comment typos.
...@@ -43,7 +43,7 @@ along with GCC; see the file COPYING3. If not see ...@@ -43,7 +43,7 @@ along with GCC; see the file COPYING3. If not see
MASK_ALIGN_DOUBLE | MASK_MS_BITFIELD_LAYOUT) MASK_ALIGN_DOUBLE | MASK_MS_BITFIELD_LAYOUT)
#undef TARGET_CPU_DEFAULT #undef TARGET_CPU_DEFAULT
#define TARGET_CPU_DEFAULT 2 /* 486 */ #define TARGET_CPU_DEFAULT TARGET_CPU_DEFAULT_i486
#define WCHAR_TYPE_SIZE 16 #define WCHAR_TYPE_SIZE 16
#define WCHAR_TYPE "short unsigned int" #define WCHAR_TYPE "short unsigned int"
......
...@@ -1963,7 +1963,31 @@ override_options (void) ...@@ -1963,7 +1963,31 @@ override_options (void)
{&amdfam10_cost, 32, 24, 32, 7, 32} {&amdfam10_cost, 32, 24, 32, 7, 32}
}; };
static const char * const cpu_names[] = TARGET_CPU_DEFAULT_NAMES; static const char *const cpu_names[TARGET_CPU_DEFAULT_max] =
{
"generic",
"i386",
"i486",
"pentium",
"pentium-mmx",
"pentiumpro",
"pentium2",
"pentium3",
"pentium4",
"pentium-m",
"prescott",
"nocona",
"core2",
"geode",
"k6",
"k6-2",
"k6-3",
"athlon",
"athlon-4",
"k8",
"amdfam10"
};
enum pta_flags enum pta_flags
{ {
PTA_SSE = 1 << 0, PTA_SSE = 1 << 0,
...@@ -2138,7 +2162,7 @@ override_options (void) ...@@ -2138,7 +2162,7 @@ override_options (void)
ix86_tune_string = ix86_arch_string; ix86_tune_string = ix86_arch_string;
if (!ix86_tune_string) if (!ix86_tune_string)
{ {
ix86_tune_string = cpu_names [TARGET_CPU_DEFAULT]; ix86_tune_string = cpu_names[TARGET_CPU_DEFAULT];
ix86_tune_defaulted = 1; ix86_tune_defaulted = 1;
} }
......
...@@ -688,34 +688,34 @@ extern const char *host_detect_local_cpu (int argc, const char **argv); ...@@ -688,34 +688,34 @@ extern const char *host_detect_local_cpu (int argc, const char **argv);
} \ } \
while (0) while (0)
#define TARGET_CPU_DEFAULT_i386 0 enum target_cpu_default
#define TARGET_CPU_DEFAULT_i486 1 {
#define TARGET_CPU_DEFAULT_pentium 2 TARGET_CPU_DEFAULT_generic = 0,
#define TARGET_CPU_DEFAULT_pentium_mmx 3
#define TARGET_CPU_DEFAULT_pentiumpro 4 TARGET_CPU_DEFAULT_i386,
#define TARGET_CPU_DEFAULT_pentium2 5 TARGET_CPU_DEFAULT_i486,
#define TARGET_CPU_DEFAULT_pentium3 6 TARGET_CPU_DEFAULT_pentium,
#define TARGET_CPU_DEFAULT_pentium4 7 TARGET_CPU_DEFAULT_pentium_mmx,
#define TARGET_CPU_DEFAULT_geode 8 TARGET_CPU_DEFAULT_pentiumpro,
#define TARGET_CPU_DEFAULT_k6 9 TARGET_CPU_DEFAULT_pentium2,
#define TARGET_CPU_DEFAULT_k6_2 10 TARGET_CPU_DEFAULT_pentium3,
#define TARGET_CPU_DEFAULT_k6_3 11 TARGET_CPU_DEFAULT_pentium4,
#define TARGET_CPU_DEFAULT_athlon 12 TARGET_CPU_DEFAULT_pentium_m,
#define TARGET_CPU_DEFAULT_athlon_sse 13 TARGET_CPU_DEFAULT_prescott,
#define TARGET_CPU_DEFAULT_k8 14 TARGET_CPU_DEFAULT_nocona,
#define TARGET_CPU_DEFAULT_pentium_m 15 TARGET_CPU_DEFAULT_core2,
#define TARGET_CPU_DEFAULT_prescott 16
#define TARGET_CPU_DEFAULT_nocona 17 TARGET_CPU_DEFAULT_geode,
#define TARGET_CPU_DEFAULT_core2 18 TARGET_CPU_DEFAULT_k6,
#define TARGET_CPU_DEFAULT_generic 19 TARGET_CPU_DEFAULT_k6_2,
#define TARGET_CPU_DEFAULT_amdfam10 20 TARGET_CPU_DEFAULT_k6_3,
TARGET_CPU_DEFAULT_athlon,
#define TARGET_CPU_DEFAULT_NAMES {"i386", "i486", "pentium", "pentium-mmx",\ TARGET_CPU_DEFAULT_athlon_sse,
"pentiumpro", "pentium2", "pentium3", \ TARGET_CPU_DEFAULT_k8,
"pentium4", "geode", "k6", "k6-2", "k6-3", \ TARGET_CPU_DEFAULT_amdfam10,
"athlon", "athlon-4", "k8", \
"pentium-m", "prescott", "nocona", \ TARGET_CPU_DEFAULT_max
"core2", "generic", "amdfam10"} };
#ifndef CC1_SPEC #ifndef CC1_SPEC
#define CC1_SPEC "%(cc1_cpu) " #define CC1_SPEC "%(cc1_cpu) "
......
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