diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2016-05-22 15:43:43 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2016-05-22 15:43:43 (GMT) |
commit | 7577eadd4e871d467f747c4927a1b1984d6a7606 (patch) | |
tree | e72a2fd5c1619e60402a678b0559079ed267eab0 /src/arch/arm/v7/fetch.c | |
parent | 33aa90b022e7d711a733ca7eb62c0b285f974317 (diff) |
Extended the compiler to transform all the new ARMv7 encoding definitions.
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)) { |