summaryrefslogtreecommitdiff
path: root/tools/d2c/syntax.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/d2c/syntax.c')
-rw-r--r--tools/d2c/syntax.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/d2c/syntax.c b/tools/d2c/syntax.c
index c0842a7..de1d693 100644
--- a/tools/d2c/syntax.c
+++ b/tools/d2c/syntax.c
@@ -284,6 +284,12 @@ bool write_encoding_syntax(const encoding_syntax *syntax, int fd, const char *ar
}
+ if (!alone)
+ {
+ dprintf(fd, "\t%sassert(result == NULL);\n", tab);
+ dprintf(fd, "\n");
+ }
+
dprintf(fd, "\t%sresult = g_%s_instruction_new(\"%s\");\n",
tab, arch, get_keyword_from_asm_pattern(syntax->pattern));