diff options
Diffstat (limited to 'src/arch/link.c')
-rw-r--r-- | src/arch/link.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/arch/link.c b/src/arch/link.c index bc80e39..02cda22 100644 --- a/src/arch/link.c +++ b/src/arch/link.c @@ -79,6 +79,7 @@ void handle_jump_as_link(GArchInstruction *instr, GArchProcessor *proc, GProcCon * proc = représentation de l'architecture utilisée. * * context = contexte associé à la phase de désassemblage. * * format = acès aux données du binaire d'origine. * +* index = indice de l'opérande à traiter dans l'instruction. * * * * Description : Etablit un lien d'appel selon une instruction donnée. * * * @@ -87,8 +88,8 @@ void handle_jump_as_link(GArchInstruction *instr, GArchProcessor *proc, GProcCon * Remarques : - * * * ******************************************************************************/ -#include "instruction-int.h" -void handle_branch_if_true_as_link(GArchInstruction *instr, GArchProcessor *proc, GProcContext *context, GBinFormat *format) +#include "instruction-int.h" // REMME +void handle_branch_as_link(GArchInstruction *instr, GArchProcessor *proc, GProcContext *context, GBinFormat *format, size_t index) { GArchOperand *op; /* Opérande numérique en place */ virt_t virt; /* Adresse virtuelle */ @@ -96,9 +97,9 @@ void handle_branch_if_true_as_link(GArchInstruction *instr, GArchProcessor *proc GArchInstruction *target; /* Ligne visée par la référence*/ GArchInstruction *list; /* Ensemble des instructions */ - assert(g_arch_instruction_count_operands(instr) > 0); + assert(g_arch_instruction_count_operands(instr) > index); - op = g_arch_instruction_get_operand(instr, 0); + op = g_arch_instruction_get_operand(instr, index); virt = VMPA_NO_VIRTUAL; |