diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2018-06-19 18:19:56 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2018-06-19 18:19:56 (GMT) |
commit | ceeba88cafc4c7d2c625e53fb175b763e480f6ba (patch) | |
tree | f362ff9063a0733d7388ed6eacb3019a150a271d /src | |
parent | 9b7924c7c5d97f83f589f4e185cfabe971f72bc4 (diff) |
Provided instruction unique identifiers as requested.
Diffstat (limited to 'src')
-rw-r--r-- | src/arch/instruction.c | 23 | ||||
-rw-r--r-- | src/arch/instruction.h | 2 |
2 files changed, 24 insertions, 1 deletions
diff --git a/src/arch/instruction.c b/src/arch/instruction.c index e2d8d2a..212b5b5 100644 --- a/src/arch/instruction.c +++ b/src/arch/instruction.c @@ -273,6 +273,29 @@ bool g_arch_instruction_set_flag(GArchInstruction *instr, ArchInstrFlag flag) /****************************************************************************** * * +* Paramètres : instr = instruction quelconque à consulter. * +* * +* Description : Fournit l'identifiant unique pour un ensemble d'instructions.* +* * +* Retour : Identifiant unique par type d'instruction et architecture. * +* * +* Remarques : - * +* * +******************************************************************************/ + +itid_t g_arch_instruction_get_unique_id(const GArchInstruction *instr) +{ + itid_t result; /* Numéro à retourner */ + + result = instr->uid; + + return result; + +} + + +/****************************************************************************** +* * * Paramètres : instr = instruction quelconque à modifier. * * * * Description : Fournit les informations complémentaires d'une instruction. * diff --git a/src/arch/instruction.h b/src/arch/instruction.h index 2201dd5..d89158e 100644 --- a/src/arch/instruction.h +++ b/src/arch/instruction.h @@ -90,7 +90,7 @@ bool g_arch_instruction_set_flag(GArchInstruction *, ArchInstrFlag); ArchInstrFlag g_arch_instruction_get_flags(const GArchInstruction *); /* Fournit l'identifiant unique pour un ensemble d'instructions. */ -itid_t g_arch_instruction_get_type_id(const GArchInstruction *instr); +itid_t g_arch_instruction_get_unique_id(const GArchInstruction *); /** |