diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2012-11-13 21:42:09 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2012-11-13 21:42:09 (GMT) |
commit | 760e2e7346518dd1264126c1696f9ad88884d64c (patch) | |
tree | 4912592877b204d9d7765acd7c04dae65a764027 /src/arch/dalvik | |
parent | 866993263387f96ebe2e482d63c9c4225e2c6085 (diff) |
Optimized the decoding of Dalvik opcodes.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@284 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/arch/dalvik')
-rw-r--r-- | src/arch/dalvik/instruction.c | 10 |
1 files changed, 1 insertions, 9 deletions
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) |