diff options
Diffstat (limited to 'src/arch/arm/v7/fetch.c')
-rw-r--r-- | src/arch/arm/v7/fetch.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/arch/arm/v7/fetch.c b/src/arch/arm/v7/fetch.c index 6ca98ca..206e6e6 100644 --- a/src/arch/arm/v7/fetch.c +++ b/src/arch/arm/v7/fetch.c @@ -368,7 +368,6 @@ void help_fetching_with_instruction_ldr_literal_with_orig(GArchInstruction *inst const mrange_t *range; /* Emplacementt d'instruction */ phys_t phys_pc; /* Position dans l'exécution */ GArchOperand *op; /* Opérande de surcouche */ - GArchOperand *sub_op; /* Opérande numérique en place */ uint32_t offset; /* Décallage encodé en dur */ bool ret; /* Bilan d'une récupération */ off_t val_offset; /* Position de valeur à lire */ @@ -411,11 +410,9 @@ void help_fetching_with_instruction_ldr_literal_with_orig(GArchInstruction *inst } op = g_arch_instruction_get_operand(instr, 1); - assert(G_IS_ARMV7_OFFSET_OPERAND(op)); + assert(G_IS_IMM_OPERAND(op)); - sub_op = g_armv7_offset_operand_get_value(G_ARMV7_OFFSET_OPERAND(op)); - - ret = g_imm_operand_get_value(G_IMM_OPERAND(sub_op), MDS_32_BITS_UNSIGNED, &offset); + ret = g_imm_operand_get_value(G_IMM_OPERAND(op), MDS_32_BITS_UNSIGNED, &offset); if (!ret) { assert(0); @@ -424,10 +421,7 @@ void help_fetching_with_instruction_ldr_literal_with_orig(GArchInstruction *inst /* Transformations et conservation d'une position de symbole */ - if (g_armv7_offset_operand_is_positive(G_ARMV7_OFFSET_OPERAND(op))) - val_offset = phys_pc + offset; - else - val_offset = phys_pc - offset; + val_offset = phys_pc + offset; if (!g_exe_format_translate_offset_into_vmpa(G_EXE_FORMAT(format), val_offset, &sym_addr)) { |