summaryrefslogtreecommitdiff
path: root/tools/d2c/spec.c
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2014-12-04 22:59:30 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2014-12-04 22:59:30 (GMT)
commit12154652c576144405011b5bd267c15c9667f223 (patch)
treebe552b2b7bc563a58892e8950afd920a45132a6e /tools/d2c/spec.c
parent6803c5d5b86416d1748d4d37a5cc5cb44fe007b1 (diff)
Provided a new way to build the full name of each instruction and cached it.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@435 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'tools/d2c/spec.c')
-rw-r--r--tools/d2c/spec.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/d2c/spec.c b/tools/d2c/spec.c
index 867df37..9990881 100644
--- a/tools/d2c/spec.c
+++ b/tools/d2c/spec.c
@@ -266,6 +266,7 @@ bool write_encoding_spec_disass(const encoding_spec *spec, int fd, const char *a
bool result; /* Bilan à retourner */
char *keyword; /* Mot clef appelable en code */
bool exit; /* Inclusion de sortie rapide ?*/
+ const char *new_ins; /* Nouvelle définition de nom */
result = true;
@@ -306,7 +307,9 @@ bool write_encoding_spec_disass(const encoding_spec *spec, int fd, const char *a
/* Création de l'instruction en elle-même */
- dprintf(fd, "\t\tinstr = g_%s_instruction_new(\"%s\");\n", arch, ins);
+ new_ins = get_new_keyword_from_syntax_items(spec->syntax);
+
+ dprintf(fd, "\t\tinstr = g_%s_instruction_new(\"%s\");\n", arch, new_ins != NULL ? new_ins : ins);
dprintf(fd, "\n");