X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;ds=sidebyside;f=driver%2Ffirm_cmdline.c;h=c7f563bf932584a14b5591a3135ac73fe84c1711;hb=9a2fa0297379908605bafee1aaa9ac4c7ffb227e;hp=df0527e7b7c187fca2143b14c532ee6faa75ddca;hpb=df14ae28d51bffb7d020622feaae5029befc9ee6;p=cparser diff --git a/driver/firm_cmdline.c b/driver/firm_cmdline.c index df0527e..c7f563b 100644 --- a/driver/firm_cmdline.c +++ b/driver/firm_cmdline.c @@ -12,6 +12,12 @@ #include #include +#ifdef _WIN32 +#define DEFAULT_OS OS_SUPPORT_WIN32 +#else +#define DEFAULT_OS OS_SUPPORT_LINUX +#endif + /* optimization settings */ struct a_firm_opt firm_opt = { /* enabled = */ TRUE, @@ -24,7 +30,6 @@ struct a_firm_opt firm_opt = { /* gvn_pre = */ FALSE, /* currently buggy */ /* cond_eval = */ FALSE, /* if_conversion = */ FALSE, - /* loop_unrolling = */ FALSE, /* currently buggy */ /* func_calls = */ TRUE, /* do_inline = */ FALSE, /* auto_inline = */ TRUE, @@ -57,8 +62,10 @@ struct a_firm_opt firm_opt = { /* vrfy = */ FIRM_VERIFICATION_ON, /* check_all = */ FALSE, /* lower = */ TRUE, - /* os_support = */ OS_SUPPORT_LINUX, + /* os_support = */ DEFAULT_OS, /* honor_restrict = */ TRUE, + /* lower_bitfields = */ TRUE, + /* pic = */ FALSE, /* ycomp_dbg = */ FALSE, /* ycomp_host = */ FIRM_YCOMP_DEFAULT_HOST, /* ycomp_port = */ FIRM_YCOMP_DEFAULT_PORT, @@ -111,6 +118,7 @@ static const struct params { { X("help"), NULL, 0, "print FCC related help options" }, /* firm optimization options */ + { X("pic"), &firm_opt.pic, 1, "firm: generate position independent code" }, { X("g0"), &firm_opt.debug_mode, DBG_MODE_BACKSTORE, "firm: Debug Mode: use back stores" }, { X("g1"), &firm_opt.debug_mode, DBG_MODE_FULL, "firm: Debug Mode: no register variables" }, { X("no-opt"), NULL, 0, "firm: disable all FIRM optimizations" }, @@ -128,8 +136,6 @@ static const struct params { { X("no-cond-eval"), &firm_opt.cond_eval, 0, "firm: disable partial condition evaluation optimization" }, { X("if-conv"), &firm_opt.if_conversion, 1, "firm: enable if-conversion optimization" }, { X("no-if-conv"), &firm_opt.if_conversion, 0, "firm: disable if-conversion optimization" }, - { X("opt-loop-unrolling"), &firm_opt.loop_unrolling, 1, "firm: enable loop-unrolling optimization" }, - { X("no-opt-loop-unrolling"), &firm_opt.loop_unrolling, 0, "firm: disable loop-unrolling optimization" }, { X("opt-func-call"), &firm_opt.func_calls, 1, "firm: enable function call optimization" }, { X("no-opt-func-call"), &firm_opt.func_calls, 0, "firm: disable function call optimization" }, { X("reassociation"), &firm_opt.reassoc, 1, "firm: enable reassociation" }, @@ -239,7 +245,9 @@ static const struct params { { X("stat-pattern"), &firm_dump.stat_pattern, 1, "misc: Firm statistic calculates most used pattern" }, { X("stat-dag"), &firm_dump.stat_dag, 1, "misc: Firm calculates DAG statistics" }, { X("firm-asm"), &firm_dump.gen_firm_asm, 1, "misc: output Firm assembler" }, - { X("win32"), &firm_opt.os_support, OS_SUPPORT_MINGW, "misc: generate MinGW code" }, + { X("win32"), &firm_opt.os_support, OS_SUPPORT_WIN32, "misc: generate Win32 code" }, + { X("mac"), &firm_opt.os_support, OS_SUPPORT_MACHO, "misc: generate MacOS code" }, + { X("linux"), &firm_opt.os_support, OS_SUPPORT_LINUX, "misc: generate Linux-ELF code" }, { X("ycomp"), &firm_opt.ycomp_dbg, 1, "misc: enable yComp debugger extension" }, { X("ycomp-host="), NULL, 0, "misc: yComp host" }, { X("ycomp-port="), NULL, 0, "misc: yComp port" }, @@ -286,7 +294,6 @@ static void disable_opts(void) { firm_opt.gvn_pre = FALSE; firm_opt.cond_eval = FALSE; firm_opt.if_conversion = FALSE; - firm_opt.loop_unrolling = FALSE; firm_opt.func_calls = FALSE; firm_opt.do_inline = FALSE; firm_opt.auto_inline = FALSE; @@ -372,12 +379,6 @@ int firm_option(const char *opt) #endif /* FIRM_BACKEND */ return res; } -#ifdef FIRM_BACKEND - /* OS option must be set to the backend */ - else if (firm_options[i].flag == &firm_opt.os_support) - firm_be_option(firm_opt.os_support == OS_SUPPORT_MINGW ? - "ia32-gasmode=mingw" : "ia32-gasmode=linux"); -#endif /* FIRM_BACKEND */ break; } } @@ -410,7 +411,7 @@ void print_firm_version(FILE *f) { firm_get_version(&version); fprintf(f, "Firm C-Compiler using libFirm (%u.%u", version.major, version.minor); - if(version.revision[0] != 0) { + if (version.revision[0] != 0) { fputc(' ', f); fputs(version.revision, f); } @@ -418,8 +419,8 @@ void print_firm_version(FILE *f) { fputc(' ', f); fputs(version.build, f); } - fputs(")\n", f); - fprintf(f, "(C) 2006-2007 Michael Beck\n" - "(C) 1995-2007 University of Karlsruhe\n" + fprintf(f, "}\n" + "(C) 2005-2008 Michael Beck\n" + "(C) 1995-2008 University of Karlsruhe\n" "Using "); } /* print_firm_version */