diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | src/arch/dalvik/instruction.c | 10 |
2 files changed, 6 insertions, 9 deletions
@@ -1,6 +1,11 @@ 12-11-13 Cyrille Bagard <nocbos@gmail.com> * src/arch/dalvik/instruction.c: + Optimize the decoding of Dalvik opcodes. + +12-11-13 Cyrille Bagard <nocbos@gmail.com> + + * src/arch/dalvik/instruction.c: Add links for 'goto' instructions too. * src/gtkext/graph/dot.c: diff --git a/src/arch/dalvik/instruction.c b/src/arch/dalvik/instruction.c index 065c67a..f0e679f 100644 --- a/src/arch/dalvik/instruction.c +++ b/src/arch/dalvik/instruction.c @@ -446,16 +446,8 @@ DalvikOpcodes g_dalvik_instruction_get_opcode(const GDalvikInstruction *instr) DalvikOpcodes dalvik_guess_next_instruction(const bin_t *data, off_t pos, off_t len) { DalvikOpcodes result; /* Identifiant à retourner */ - bin_t opcode; /* Opcode à trouver */ - opcode = data[pos]; - - for (result = 0; result < DOP_COUNT; result++) - { - if (_instructions[result].opcode == opcode) - break; - - } + result = (DalvikOpcodes)data[pos]; /* Si l'instruction est marquée comme non utilisée... */ if (_instructions[result].keyword == NULL) |