summaryrefslogtreecommitdiff
path: root/src/arch/instruction.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/instruction.h')
-rw-r--r--src/arch/instruction.h35
1 files changed, 13 insertions, 22 deletions
diff --git a/src/arch/instruction.h b/src/arch/instruction.h
index d38bb62..bb2dc94 100644
--- a/src/arch/instruction.h
+++ b/src/arch/instruction.h
@@ -215,7 +215,7 @@ typedef struct _instr_link_t
/* Met à disposition un encadrement des accès aux liens. */
-void g_arch_instruction_lock_unlock_links(GArchInstruction *, bool, bool, bool);
+void g_arch_instruction_lock_unlock_links(GArchInstruction *, bool, bool);
/* Détermine si un lien est déjà établi entre deux instructions. */
bool g_arch_instruction_has_link_to(GArchInstruction *, const GArchInstruction *);
@@ -226,36 +226,27 @@ void g_arch_instruction_link_with(GArchInstruction *, GArchInstruction *, Instru
/* Change la nature d'un lien entre deux instructions. */
bool g_arch_instruction_change_link(GArchInstruction *, GArchInstruction *, InstructionLinkType, InstructionLinkType);
-#define g_arch_instruction_wlock_src(ins) g_arch_instruction_lock_unlock_links(ins, true, true, true)
-#define g_arch_instruction_wunlock_src(ins) g_arch_instruction_lock_unlock_links(ins, true, true, false)
+#define g_arch_instruction_lock_src(ins) g_arch_instruction_lock_unlock_links(ins, true, true)
+#define g_arch_instruction_unlock_src(ins) g_arch_instruction_lock_unlock_links(ins, true, false)
-#define g_arch_instruction_rlock_src(ins) g_arch_instruction_lock_unlock_links(ins, true, false, true)
-#define g_arch_instruction_runlock_src(ins) g_arch_instruction_lock_unlock_links(ins, true, false, false)
+/* Fournit la quantité d'instructions pointant vers une autre. */
+size_t g_arch_instruction_count_sources(const GArchInstruction *);
-/* Indique si l'instruction a une ou plusieurs origines. */
-bool g_arch_instruction_has_sources(GArchInstruction *);
+/* Fournit les détails d'une origine d'une instruction donnée. */
+instr_link_t *g_arch_instruction_get_source(GArchInstruction *, size_t);
-/* Fournit les origines d'une instruction donnée. */
-size_t g_arch_instruction_get_sources(GArchInstruction *, instr_link_t **);
+#define g_arch_instruction_lock_dest(ins) g_arch_instruction_lock_unlock_links(ins, false, true)
+#define g_arch_instruction_unlock_dest(ins) g_arch_instruction_lock_unlock_links(ins, false, false)
-#define g_arch_instruction_wlock_dest(ins) g_arch_instruction_lock_unlock_links(ins, false, true, true)
-#define g_arch_instruction_wunlock_dest(ins) g_arch_instruction_lock_unlock_links(ins, false, true, false)
+/* Donne le nombre d'instructions non naturellement suivantes. */
+size_t g_arch_instruction_count_destinations(const GArchInstruction *);
-#define g_arch_instruction_rlock_dest(ins) g_arch_instruction_lock_unlock_links(ins, false, false, true)
-#define g_arch_instruction_runlock_dest(ins) g_arch_instruction_lock_unlock_links(ins, false, false, false)
-
-/* Indique si l'instruction a une suite autre que la suivante. */
-bool g_arch_instruction_has_destinations(GArchInstruction *);
-
-/* Fournit les destinations d'une instruction donnée. */
-size_t g_arch_instruction_get_destinations(GArchInstruction *, instr_link_t **);
+/* Fournit les détails d'une destination d'une instruction. */
+instr_link_t *g_arch_instruction_get_destination(GArchInstruction *, size_t);
/* Fournit la destination d'une instruction et d'un type donné. */
GArchInstruction *g_arch_instruction_get_given_destination(GArchInstruction *, InstructionLinkType);
-/* Indique la position dans les instructions identiques. */
-size_t g_arch_instruction_compute_group_index(GArchInstruction **, GArchInstruction **, size_t);
-
/* --------------------- CONVERSIONS DU FORMAT DES INSTRUCTIONS --------------------- */