summaryrefslogtreecommitdiff
path: root/src/arch/dalvik/operand.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/dalvik/operand.c')
-rw-r--r--src/arch/dalvik/operand.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/arch/dalvik/operand.c b/src/arch/dalvik/operand.c
index 802ce1e..e1a910c 100644
--- a/src/arch/dalvik/operand.c
+++ b/src/arch/dalvik/operand.c
@@ -474,14 +474,13 @@ static bool dalvik_read_fixed_operands(GArchInstruction *instr, GDexFormat *form
/* Mise en place des arguments */
args = g_dalvik_args_operand_new();
- g_arch_instruction_attach_extra_operand(instr, args);
for (i = 0; i < MIN(a, 4); i++)
{
op = g_dalvik_register_operand_new(content, pos, low, MDS_4_BITS, endian);
if (op == NULL) goto err_registers;
- g_dalvik_args_operand_add(G_DALVIK_ARGS_OPERAND(args), op);
+ args = G_ARCH_OPERAND(g_dalvik_args_operand_add(G_DALVIK_ARGS_OPERAND(args), op, NULL));
}
@@ -494,7 +493,7 @@ static bool dalvik_read_fixed_operands(GArchInstruction *instr, GDexFormat *form
/* Rajout des éléments finaux déjà chargés */
if (a == 5)
- g_dalvik_args_operand_add(G_DALVIK_ARGS_OPERAND(args), opg);
+ args = G_ARCH_OPERAND(g_dalvik_args_operand_add(G_DALVIK_ARGS_OPERAND(args), opg, NULL));
else
{
@@ -502,6 +501,10 @@ static bool dalvik_read_fixed_operands(GArchInstruction *instr, GDexFormat *form
g_object_unref(G_OBJECT(opg));
}
+ g_arch_instruction_attach_extra_operand(instr, args);
+
+ /* Rajout de la cible */
+
g_arch_instruction_attach_extra_operand(instr, target);
return true;
@@ -564,17 +567,18 @@ static bool dalvik_read_variatic_operands(GArchInstruction *instr, GDexFormat *f
/* Mise en place des arguments */
args = g_dalvik_args_operand_new();
- g_arch_instruction_attach_extra_operand(instr, args);
for (i = 0; i < a; i++)
{
op = g_dalvik_register_operand_new_from_existing(g_dalvik_register_new(c + i));
if (op == NULL) goto drvo_registers;
- g_dalvik_args_operand_add(G_DALVIK_ARGS_OPERAND(args), op);
+ args = G_ARCH_OPERAND(g_dalvik_args_operand_add(G_DALVIK_ARGS_OPERAND(args), op, NULL));
}
+ g_arch_instruction_attach_extra_operand(instr, args);
+
/* Rajout de la cible */
g_arch_instruction_attach_extra_operand(instr, target);