{ X("no-grs-create-pattern"), &firm_ext_grs.create_pattern, 0, "firm: create patterns for simd optimization" },
#endif
-#ifdef FIRM_BACKEND
{ X("be-firm"), &firm_be_opt.selection, BE_FIRM_BE, "backend: firm backend facility" },
-#endif /* FIRM_BACKEND */
#ifdef FIRM2C_BACKEND
{ X("be-firm2c"), &firm_be_opt.selection, BE_FIRM2C, "backend: firm2C" },
#endif /* FIRM2C_BACKEND */
if (firm_opt.debug_mode == DBG_MODE_FULL)
disable_opts();
res = 1;
- res &= firm_be_option("omitfp=0");
- res &= firm_be_option("stabs");
+ res &= be_parse_arg("omitfp=0");
+ res &= be_parse_arg("stabs");
return res;
}
break;
return 0;
} /* firm_option */
-/**
- * Handles a firm backend option.
- *
- * The options are here only checked for validity and later transmitted
- * to the firm backend (in the hope they do not fail ...)
- */
-int firm_be_option(const char *opt) {
-#ifdef FIRM_BACKEND
- return be_parse_arg(opt);
-#else
- return 0;
-#endif /* FIRM_BACKEND */
-} /* firm_be_option */
-
/**
* prints the firm version number
*/
static void set_be_option(const char *arg)
{
- int res = firm_be_option(arg);
+ int res = be_parse_arg(arg);
(void) res;
assert(res);
}
} else if (option[0] == 'b') {
const char *opt;
GET_ARG_AFTER(opt, "-b");
- int res = firm_be_option(opt);
+ int res = be_parse_arg(opt);
if (res == 0) {
fprintf(stderr, "error: unknown Firm backend option '-b %s'\n",
opt);
if (strstart(opt, "arch=")) {
GET_ARG_AFTER(opt, "-march=");
snprintf(arch_opt, sizeof(arch_opt), "%s-arch=%s", cpu_arch, opt);
- int res = firm_be_option(arch_opt);
+ int res = be_parse_arg(arch_opt);
if (res == 0) {
fprintf(stderr, "Unknown architecture '%s'\n", arch_opt);
argument_errors = true;
} else {
snprintf(arch_opt, sizeof(arch_opt), "%s-opt=%s", cpu_arch, opt);
- int res = firm_be_option(arch_opt);
+ int res = be_parse_arg(arch_opt);
if (res == 0)
argument_errors = true;
}
} else if (strstart(opt, "tune=")) {
GET_ARG_AFTER(opt, "-mtune=");
snprintf(arch_opt, sizeof(arch_opt), "%s-opt=%s", cpu_arch, opt);
- int res = firm_be_option(arch_opt);
+ int res = be_parse_arg(arch_opt);
if (res == 0)
argument_errors = true;
} else if (strstart(opt, "cpu=")) {
GET_ARG_AFTER(opt, "-mcpu=");
snprintf(arch_opt, sizeof(arch_opt), "%s-arch=%s", cpu_arch, opt);
- int res = firm_be_option(arch_opt);
+ int res = be_parse_arg(arch_opt);
if (res == 0)
argument_errors = true;
} else if (strstart(opt, "fpmath=")) {
}
if (!argument_errors) {
snprintf(arch_opt, sizeof(arch_opt), "%s-fpunit=%s", cpu_arch, opt);
- int res = firm_be_option(arch_opt);
+ int res = be_parse_arg(arch_opt);
if (res == 0)
argument_errors = true;
}
} else if (strstart(opt, "preferred-stack-boundary=")) {
GET_ARG_AFTER(opt, "-mpreferred-stack-boundary=");
snprintf(arch_opt, sizeof(arch_opt), "%s-stackalign=%s", cpu_arch, opt);
- int res = firm_be_option(arch_opt);
+ int res = be_parse_arg(arch_opt);
if (res == 0)
argument_errors = true;
} else if (streq(opt, "omit-leaf-frame-pointer")) {