summaryrefslogtreecommitdiff
path: root/src/arch/dalvik/operand.c
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2011-10-05 19:34:00 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2011-10-05 19:34:00 (GMT)
commite8d2795d9ec2c8845641863fc42ce39f9e92906b (patch)
tree722b96e48843335f45735a5d01a8dcf0114c870d /src/arch/dalvik/operand.c
parent02cb3aa4e7b18b644b034a5c659c332becf99c9b (diff)
Supported a few more Dalvik opcodes.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@211 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/arch/dalvik/operand.c')
-rw-r--r--src/arch/dalvik/operand.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/arch/dalvik/operand.c b/src/arch/dalvik/operand.c
index f6392b3..7c245d8 100644
--- a/src/arch/dalvik/operand.c
+++ b/src/arch/dalvik/operand.c
@@ -36,6 +36,7 @@ typedef enum _DalvikOperandID
DOI_REGISTER_4,
DOI_REGISTER_8,
+ DOI_REGISTER_16,
DOI_IMMEDIATE_4,
DOI_IMMEDIATE_8,
@@ -199,6 +200,14 @@ static bool dalvik_read_basic_operands(GArchInstruction *instr, const bin_t *dat
};
break;
+ case DALVIK_OPT_22X:
+ types = (DalvikOperandID []) {
+ DOI_REGISTER_8,
+ DOI_REGISTER_16,
+ DOI_INVALID
+ };
+ break;
+
case DALVIK_OPT_23X:
types = (DalvikOperandID []) {
DOI_REGISTER_8,
@@ -223,6 +232,14 @@ static bool dalvik_read_basic_operands(GArchInstruction *instr, const bin_t *dat
};
break;
+ case DALVIK_OPT_31T:
+ types = (DalvikOperandID []) {
+ DOI_REGISTER_8,
+ DOI_TARGET_32,
+ DOI_INVALID
+ };
+ break;
+
case DALVIK_OPT_51L:
types = (DalvikOperandID []) {
DOI_REGISTER_8,
@@ -253,6 +270,10 @@ static bool dalvik_read_basic_operands(GArchInstruction *instr, const bin_t *dat
op = g_dalvik_register_operand_new(data, pos, len, NULL, MDS_8_BITS, endian);
break;
+ case DOI_REGISTER_16:
+ op = g_dalvik_register_operand_new(data, pos, len, NULL, MDS_16_BITS, endian);
+ break;
+
case DOI_IMMEDIATE_4:
op = _g_imm_operand_new_from_data(MDS_4_BITS, data, pos, len, low, endian);
break;
@@ -474,9 +495,11 @@ bool dalvik_read_operands(GArchInstruction *instr, const bin_t *data, off_t *pos
case DALVIK_OPT_22C:
case DALVIK_OPT_22S:
case DALVIK_OPT_22T:
+ case DALVIK_OPT_22X:
case DALVIK_OPT_23X:
case DALVIK_OPT_30T:
case DALVIK_OPT_31I:
+ case DALVIK_OPT_31T:
case DALVIK_OPT_51L:
va_start(ap, model);
result = dalvik_read_basic_operands(instr, data, pos, len, &low, endian, model, ap);