From e25f184300f9445894c8ddef1c933eb3b3be0c71 Mon Sep 17 00:00:00 2001 From: Michael Beck Date: Sat, 4 Dec 2010 09:26:10 +0000 Subject: [PATCH] Instead of panic() offer the native option only if running on x86 xpu. [r28180] --- ir/be/ia32/ia32_architecture.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/ir/be/ia32/ia32_architecture.c b/ir/be/ia32/ia32_architecture.c index ff0bd63c0..8f6fad756 100644 --- a/ir/be/ia32/ia32_architecture.c +++ b/ir/be/ia32/ia32_architecture.c @@ -204,7 +204,10 @@ static const lc_opt_enum_int_items_t arch_items[] = { { "generic", cpu_generic }, { "generic32", cpu_generic }, +#ifdef NATIVE_X86 { "native", cpu_autodetect }, +#endif + { NULL, 0 } }; @@ -749,12 +752,7 @@ static void autodetect_arch(void) arch = auto_arch; opt_arch = auto_arch; } -#else -static void autodetect_arch(void) -{ - panic("architecture autodetection only possible when compiling on target architecture"); -} -#endif +#endif /* NATIVE_X86 */ void ia32_setup_cg_config(void) { @@ -763,8 +761,10 @@ void ia32_setup_cg_config(void) set_arch_costs(); - if (arch == 0) +#ifdef NATIVE_X86 + if (arch == cpu_autodetect) autodetect_arch(); +#endif c->optimize_size = opt_size != 0; /* on newer intel cpus mov, pop is often faster than leave although it has a -- 2.20.1