diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2010-05-19 23:30:05 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2010-05-19 23:30:05 (GMT) |
commit | 6511f2fe4551c2ea231115d6c659c99e15b3a23b (patch) | |
tree | aeb6d8a50480063e8d75a9096c0ab98420830dad /src/arch/dalvik/operand.c | |
parent | 8aca52bcbb6b9c710771087dddeadf4adb05dc66 (diff) |
Added support for a few more Dalvik instructions.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@160 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/arch/dalvik/operand.c')
-rw-r--r-- | src/arch/dalvik/operand.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/arch/dalvik/operand.c b/src/arch/dalvik/operand.c index 7b58b1d..7e8bf43 100644 --- a/src/arch/dalvik/operand.c +++ b/src/arch/dalvik/operand.c @@ -180,6 +180,7 @@ typedef enum _DalvikOperandID DOI_REGISTER_8, DOI_IMMEDIATE_4, + DOI_IMMEDIATE_8, DOI_IMMEDIATE_16, DOI_IMMEDIATE_H16, @@ -916,6 +917,24 @@ static bool dalvik_read_basic_operands(GArchInstruction *instr, const bin_t *dat }; break; + case DALVIK_OPT_22B: + types = (DalvikOperandID []) { + DOI_REGISTER_8, + DOI_REGISTER_8, + DOI_IMMEDIATE_8, + DOI_INVALID + }; + break; + + case DALVIK_OPT_22C: + types = (DalvikOperandID []) { + DOI_REGISTER_4, + DOI_REGISTER_4, + DOI_POOL_CONST, + DOI_INVALID + }; + break; + default: types = (DalvikOperandID []) { DOI_INVALID @@ -942,6 +961,10 @@ static bool dalvik_read_basic_operands(GArchInstruction *instr, const bin_t *dat op = _g_imm_operand_new_from_data(MDS_4_BITS, data, pos, len, low, endian); break; + case DOI_IMMEDIATE_8: + op = g_imm_operand_new_from_data(MDS_8_BITS, data, pos, len, endian); + break; + case DOI_IMMEDIATE_16: op = g_imm_operand_new_from_data(MDS_16_BITS, data, pos, len, endian); break; @@ -1124,6 +1147,8 @@ bool dalvik_read_operands(GArchInstruction *instr, const bin_t *data, off_t *pos case DALVIK_OPT_21C: case DALVIK_OPT_21H: case DALVIK_OPT_21S: + case DALVIK_OPT_22B: + case DALVIK_OPT_22C: result = dalvik_read_basic_operands(instr, data, pos, len, &low, endian, model); break; |