X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;ds=sidebyside;f=driver%2Ffirm_cmdline.c;h=d7e7075a421584229ee89d77cc9f29e6db0e8f7b;hb=2c26c7a7885635fc12bda81d06b334f9726a70df;hp=0b8cc872b8f7b973c675b6bf2836a06479ec05c8;hpb=321d7bff758a89eee73d2d51f6c6c54dd9a60f96;p=cparser diff --git a/driver/firm_cmdline.c b/driver/firm_cmdline.c index 0b8cc87..d7e7075 100644 --- a/driver/firm_cmdline.c +++ b/driver/firm_cmdline.c @@ -13,21 +13,12 @@ #include #include -#if defined(_WIN32) || defined(__CYGWIN__) -#define DEFAULT_OS OS_SUPPORT_MINGW -#elif defined(__APPLE__) -#define DEFAULT_OS OS_SUPPORT_MACHO -#else -#define DEFAULT_OS OS_SUPPORT_LINUX -#endif - /* optimization settings */ struct a_firm_opt firm_opt = { /* enabled = */ TRUE, /* debug_mode = */ DBG_MODE_NONE, /* const_folding = */ TRUE, /* cse = */ TRUE, - /* control_flow = */ TRUE, /* gcse = */ TRUE, /* confirm = */ TRUE, /* muls = */ TRUE, @@ -37,12 +28,10 @@ struct a_firm_opt firm_opt = { /* strict_alias = */ FALSE, /* no_alias = */ FALSE, /* cc_opt = */ TRUE, - /* freestanding; = */ FALSE, /* fp_model = */ fp_model_precise, /* verify = */ FIRM_VERIFICATION_ON, /* check_all = */ FALSE, /* lower = */ TRUE, - /* os_support = */ DEFAULT_OS, /* honor_restrict = */ TRUE, /* lower_bitfields = */ TRUE, /* pic = */ FALSE, @@ -104,8 +93,6 @@ static const struct params { { X("no-cse"), &firm_opt.cse, 0, "firm: disable common subexpression elimination" }, { X("const-fold"), &firm_opt.const_folding, 1, "firm: enable constant folding" }, { X("no-const-fold"), &firm_opt.const_folding, 0, "firm: disable constant folding" }, - { X("control_flow"), &firm_opt.control_flow, 1, "firm: enable control flow optimization" }, - { X("no-control-flow"), &firm_opt.control_flow, 0, "firm: disable control flow optimization" }, { X("gcse"), &firm_opt.gcse, 1, "firm: enable global common subexpression elimination" }, { X("no-gcse"), &firm_opt.gcse, 0, "firm: disable global common subexpression elimination" }, { X("inline-max-size="), NULL, 0, "firm: set maximum size for function inlining" }, @@ -130,8 +117,6 @@ static const struct params { { X("fp-strict"), &firm_opt.fp_model, fp_model_strict, "firm: strict fp model" }, { X("opt-cc"), &firm_opt.cc_opt, 1, "firm: enable calling conventions optimization" }, { X("no-opt-cc"), &firm_opt.cc_opt, 0, "firm: disable calling conventions optimization" }, - { X("freestanding"), &firm_opt.freestanding, 1, "firm: freestanding environment" }, - { X("hosted"), &firm_opt.freestanding, 0, "firm: hosted environment" }, /* other firm regarding options */ { X("restrict"), &firm_opt.honor_restrict, 1, "firm: honor restrict keyword" }, @@ -179,9 +164,6 @@ static const struct params { { X("stat-final"), &firm_dump.statistic, STAT_FINAL, "misc: Firm statistic after code generation" }, { 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("win32"), &firm_opt.os_support, OS_SUPPORT_MINGW, "misc: generate MinGW 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" }, /* string options */ { X("dump-filter="), NULL, 0, "misc: set dumper filter" }, @@ -219,7 +201,6 @@ static void disable_opts(void) { firm_opt.strict_alias = FALSE; firm_opt.no_alias = FALSE; firm_opt.cc_opt = FALSE; - firm_opt.freestanding = TRUE; disable_all_opts(); } /* disable_opts */ @@ -301,22 +282,23 @@ int firm_option(const char *opt) /** * prints the firm version number */ -void print_firm_version(FILE *f) { - const char *revision = ir_get_version_revision(); - const char *build = ir_get_version_build(); +void print_firm_version(FILE *f) +{ + const char *revision = ir_get_version_revision(); + const char *build = ir_get_version_build(); - fprintf(f, "Firm C-Compiler using libFirm (%u.%u", - ir_get_version_major(), ir_get_version_minor()); - if (revision[0] != 0) { - fputc(' ', f); - fputs(revision, f); - } - if(build[0] != 0) { - fputc(' ', f); - fputs(build, f); - } - fprintf(f, "}\n" - "(C) 2005-2008 Michael Beck\n" - "(C) 1995-2008 University of Karlsruhe\n" - "Using "); + fprintf(f, "Firm C-Compiler using libFirm (%u.%u", + ir_get_version_major(), ir_get_version_minor()); + if (revision[0] != 0) { + fputc(' ', f); + fputs(revision, f); + } + if (build[0] != 0) { + fputc(' ', f); + fputs(build, f); + } + fprintf(f, "}\n" + "(C) 2005-2008 Michael Beck\n" + "(C) 1995-2008 University of Karlsruhe\n" + "Using "); } /* print_firm_version */