From: notaz Date: Mon, 17 Feb 2014 02:50:44 +0000 (+0200) Subject: cvt_data: allow to skip validation X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=77f3a833c8392583b5b5a1f374fc484af9d18f77;p=ia32rtools.git cvt_data: allow to skip validation --- diff --git a/tools/cvt_data.c b/tools/cvt_data.c index 7138da0..41e0b17 100644 --- a/tools/cvt_data.c +++ b/tools/cvt_data.c @@ -18,6 +18,7 @@ static int asmln; static const struct parsed_proto *g_func_sym_pp; static char g_comment[256]; static int g_warn_cnt; +static int g_cconv_novalidate; // note: must be in ascending order enum dx_type { @@ -259,9 +260,10 @@ static const struct parsed_proto *check_var(FILE *fhdr, { goto check_sym; } - if (pp->argc_reg != 2 - || !IS(pp->arg[0].reg, "ecx") - || !IS(pp->arg[1].reg, "edx")) + if (!g_cconv_novalidate + && (pp->argc_reg != 2 + || !IS(pp->arg[0].reg, "ecx") + || !IS(pp->arg[1].reg, "edx"))) { awarn("unhandled reg call: %s\n", fp_var); } @@ -357,7 +359,7 @@ int main(int argc, char *argv[]) if (argc < 4) { // -nd: no symbol decorations - printf("usage:\n%s [-nd] <.s> <.asm> [rlist]*\n", + printf("usage:\n%s [-nd] [-i] <.s> <.asm> [rlist]*\n", argv[0]); return 1; } @@ -365,6 +367,8 @@ int main(int argc, char *argv[]) for (arg = 1; arg < argc; arg++) { if (IS(argv[arg], "-nd")) no_decorations = 1; + else if (IS(argv[arg], "-i")) + g_cconv_novalidate = 1; else break; }