diff options
Diffstat (limited to 'src/arch/instruction.c')
-rw-r--r-- | src/arch/instruction.c | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/src/arch/instruction.c b/src/arch/instruction.c index d91e110..c8640b4 100644 --- a/src/arch/instruction.c +++ b/src/arch/instruction.c @@ -147,6 +147,26 @@ static void g_arch_instruction_finalize(GArchInstruction *instr) /****************************************************************************** * * +* Paramètres : instr = instruction quelconque à modifier. * +* suffix = chaîne de caractères fournie en complément. * +* * +* Description : Etend la désignation d'un nom d'instruction. * +* * +* Retour : - * +* * +* Remarques : - * +* * +******************************************************************************/ + +void g_arch_instruction_append_suffix(GArchInstruction *instr, const char *suffix) +{ + instr->suffix = suffix; + +} + + +/****************************************************************************** +* * * Paramètres : instr = instruction quelconque à modifier. * * address = adresse virtuelle et/ou position physique. * * length = taille de l'instruction. * @@ -662,7 +682,10 @@ size_t g_arch_instruction_compute_group_index(GArchInstruction **iter, GArchInst const char *g_arch_instruction_get_keyword(const GArchInstruction *instr, AsmSyntax syntax) { - return G_ARCH_INSTRUCTION_GET_CLASS(instr)->get_key(instr, syntax); + if (instr->cached_keyword == NULL) + G_ARCH_INSTRUCTION_GET_CLASS(instr)->build_key(instr, syntax); + + return instr->cached_keyword; } |