From 77f3a833c8392583b5b5a1f374fc484af9d18f77 Mon Sep 17 00:00:00 2001 From: notaz Date: Mon, 17 Feb 2014 04:50:44 +0200 Subject: [PATCH] cvt_data: allow to skip validation --- tools/cvt_data.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) 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; } -- 2.39.5