summaryrefslogtreecommitdiff
path: root/src/arch/dalvik/opcodes
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2012-08-03 07:52:52 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2012-08-03 07:52:52 (GMT)
commit7d2b7ca95966c2d687526cd75a96d1ea67d3f503 (patch)
tree256999a2e94c05f0769e415043e8c348279e5789 /src/arch/dalvik/opcodes
parent8e1f2335773a9025cd46d45a33261725707af3ba (diff)
Supported all kinds of add/sub/mul opcodes.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@254 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/arch/dalvik/opcodes')
-rw-r--r--src/arch/dalvik/opcodes/add.c185
-rw-r--r--src/arch/dalvik/opcodes/mul.c148
-rw-r--r--src/arch/dalvik/opcodes/opcodes.h50
-rw-r--r--src/arch/dalvik/opcodes/sub.c259
4 files changed, 642 insertions, 0 deletions
diff --git a/src/arch/dalvik/opcodes/add.c b/src/arch/dalvik/opcodes/add.c
index b1431a9..792eacd 100644
--- a/src/arch/dalvik/opcodes/add.c
+++ b/src/arch/dalvik/opcodes/add.c
@@ -38,6 +38,80 @@
* proc = architecture ciblée par le désassemblage. *
* fmt = format du fichier contenant le code. *
* *
+* Description : Décode une instruction de type 'add-double'. *
+* *
+* Retour : Instruction mise en place ou NULL. *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+GArchInstruction *dalvik_read_instr_add_double(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc, const GDexFormat *fmt)
+{
+ GArchInstruction *result; /* Instruction à retourner */
+ SourceEndian endian; /* Boutisme lié au binaire */
+
+ result = g_dalvik_instruction_new(DOP_ADD_DOUBLE);
+
+ endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
+
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_23X))
+ {
+ g_object_unref(G_OBJECT(result));
+ return NULL;
+ }
+
+ return result;
+
+}
+
+
+/******************************************************************************
+* *
+* Paramètres : data = flux de données à analyser. *
+* pos = position courante dans ce flux. [OUT] *
+* len = taille totale des données à analyser. *
+* addr = adresse virtuelle de l'instruction. *
+* proc = architecture ciblée par le désassemblage. *
+* fmt = format du fichier contenant le code. *
+* *
+* Description : Décode une instruction de type 'add-double/2addr'. *
+* *
+* Retour : Instruction mise en place ou NULL. *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+GArchInstruction *dalvik_read_instr_add_double_2addr(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc, const GDexFormat *fmt)
+{
+ GArchInstruction *result; /* Instruction à retourner */
+ SourceEndian endian; /* Boutisme lié au binaire */
+
+ result = g_dalvik_instruction_new(DOP_ADD_DOUBLE_2ADDR);
+
+ endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
+
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_12X))
+ {
+ g_object_unref(G_OBJECT(result));
+ return NULL;
+ }
+
+ return result;
+
+}
+
+
+/******************************************************************************
+* *
+* Paramètres : data = flux de données à analyser. *
+* pos = position courante dans ce flux. [OUT] *
+* len = taille totale des données à analyser. *
+* addr = adresse virtuelle de l'instruction. *
+* proc = architecture ciblée par le désassemblage. *
+* fmt = format du fichier contenant le code. *
+* *
* Description : Décode une instruction de type 'add-int'. *
* *
* Retour : Instruction mise en place ou NULL. *
@@ -186,6 +260,117 @@ GArchInstruction *dalvik_read_instr_add_int_lit16(const bin_t *data, off_t *pos,
* proc = architecture ciblée par le désassemblage. *
* fmt = format du fichier contenant le code. *
* *
+* Description : Décode une instruction de type 'add-float'. *
+* *
+* Retour : Instruction mise en place ou NULL. *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+GArchInstruction *dalvik_read_instr_add_float(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc, const GDexFormat *fmt)
+{
+ GArchInstruction *result; /* Instruction à retourner */
+ SourceEndian endian; /* Boutisme lié au binaire */
+
+ result = g_dalvik_instruction_new(DOP_ADD_FLOAT);
+
+ endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
+
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_23X))
+ {
+ g_object_unref(G_OBJECT(result));
+ return NULL;
+ }
+
+ return result;
+
+}
+
+
+/******************************************************************************
+* *
+* Paramètres : data = flux de données à analyser. *
+* pos = position courante dans ce flux. [OUT] *
+* len = taille totale des données à analyser. *
+* addr = adresse virtuelle de l'instruction. *
+* proc = architecture ciblée par le désassemblage. *
+* fmt = format du fichier contenant le code. *
+* *
+* Description : Décode une instruction de type 'add-float/2addr'. *
+* *
+* Retour : Instruction mise en place ou NULL. *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+GArchInstruction *dalvik_read_instr_add_float_2addr(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc, const GDexFormat *fmt)
+{
+ GArchInstruction *result; /* Instruction à retourner */
+ SourceEndian endian; /* Boutisme lié au binaire */
+
+ result = g_dalvik_instruction_new(DOP_ADD_FLOAT_2ADDR);
+
+ endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
+
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_12X))
+ {
+ g_object_unref(G_OBJECT(result));
+ return NULL;
+ }
+
+ return result;
+
+}
+
+
+/******************************************************************************
+* *
+* Paramètres : data = flux de données à analyser. *
+* pos = position courante dans ce flux. [OUT] *
+* len = taille totale des données à analyser. *
+* addr = adresse virtuelle de l'instruction. *
+* proc = architecture ciblée par le désassemblage. *
+* fmt = format du fichier contenant le code. *
+* *
+* Description : Décode une instruction de type 'add-long'. *
+* *
+* Retour : Instruction mise en place ou NULL. *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+GArchInstruction *dalvik_read_instr_add_long(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc, const GDexFormat *fmt)
+{
+ GArchInstruction *result; /* Instruction à retourner */
+ SourceEndian endian; /* Boutisme lié au binaire */
+
+ result = g_dalvik_instruction_new(DOP_ADD_LONG);
+
+ endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
+
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_23X))
+ {
+ g_object_unref(G_OBJECT(result));
+ return NULL;
+ }
+
+ return result;
+
+}
+
+
+/******************************************************************************
+* *
+* Paramètres : data = flux de données à analyser. *
+* pos = position courante dans ce flux. [OUT] *
+* len = taille totale des données à analyser. *
+* addr = adresse virtuelle de l'instruction. *
+* proc = architecture ciblée par le désassemblage. *
+* fmt = format du fichier contenant le code. *
+* *
* Description : Décode une instruction de type 'add-long/2addr'. *
* *
* Retour : Instruction mise en place ou NULL. *
diff --git a/src/arch/dalvik/opcodes/mul.c b/src/arch/dalvik/opcodes/mul.c
index 334f568..aeddd14 100644
--- a/src/arch/dalvik/opcodes/mul.c
+++ b/src/arch/dalvik/opcodes/mul.c
@@ -38,6 +38,43 @@
* proc = architecture ciblée par le désassemblage. *
* fmt = format du fichier contenant le code. *
* *
+* Description : Décode une instruction de type 'mul-double'. *
+* *
+* Retour : Instruction mise en place ou NULL. *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+GArchInstruction *dalvik_read_instr_mul_double(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc, const GDexFormat *fmt)
+{
+ GArchInstruction *result; /* Instruction à retourner */
+ SourceEndian endian; /* Boutisme lié au binaire */
+
+ result = g_dalvik_instruction_new(DOP_MUL_DOUBLE);
+
+ endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
+
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_23X))
+ {
+ g_object_unref(G_OBJECT(result));
+ return NULL;
+ }
+
+ return result;
+
+}
+
+
+/******************************************************************************
+* *
+* Paramètres : data = flux de données à analyser. *
+* pos = position courante dans ce flux. [OUT] *
+* len = taille totale des données à analyser. *
+* addr = adresse virtuelle de l'instruction. *
+* proc = architecture ciblée par le désassemblage. *
+* fmt = format du fichier contenant le code. *
+* *
* Description : Décode une instruction de type 'mul-double/2addr'. *
* *
* Retour : Instruction mise en place ou NULL. *
@@ -223,6 +260,80 @@ GArchInstruction *dalvik_read_instr_mul_int_lit16(const bin_t *data, off_t *pos,
* proc = architecture ciblée par le désassemblage. *
* fmt = format du fichier contenant le code. *
* *
+* Description : Décode une instruction de type 'mul-float'. *
+* *
+* Retour : Instruction mise en place ou NULL. *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+GArchInstruction *dalvik_read_instr_mul_float(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc, const GDexFormat *fmt)
+{
+ GArchInstruction *result; /* Instruction à retourner */
+ SourceEndian endian; /* Boutisme lié au binaire */
+
+ result = g_dalvik_instruction_new(DOP_MUL_FLOAT);
+
+ endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
+
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_23X))
+ {
+ g_object_unref(G_OBJECT(result));
+ return NULL;
+ }
+
+ return result;
+
+}
+
+
+/******************************************************************************
+* *
+* Paramètres : data = flux de données à analyser. *
+* pos = position courante dans ce flux. [OUT] *
+* len = taille totale des données à analyser. *
+* addr = adresse virtuelle de l'instruction. *
+* proc = architecture ciblée par le désassemblage. *
+* fmt = format du fichier contenant le code. *
+* *
+* Description : Décode une instruction de type 'mul-float/2addr'. *
+* *
+* Retour : Instruction mise en place ou NULL. *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+GArchInstruction *dalvik_read_instr_mul_float_2addr(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc, const GDexFormat *fmt)
+{
+ GArchInstruction *result; /* Instruction à retourner */
+ SourceEndian endian; /* Boutisme lié au binaire */
+
+ result = g_dalvik_instruction_new(DOP_MUL_FLOAT_2ADDR);
+
+ endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
+
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_12X))
+ {
+ g_object_unref(G_OBJECT(result));
+ return NULL;
+ }
+
+ return result;
+
+}
+
+
+/******************************************************************************
+* *
+* Paramètres : data = flux de données à analyser. *
+* pos = position courante dans ce flux. [OUT] *
+* len = taille totale des données à analyser. *
+* addr = adresse virtuelle de l'instruction. *
+* proc = architecture ciblée par le désassemblage. *
+* fmt = format du fichier contenant le code. *
+* *
* Description : Décode une instruction de type 'mul-long'. *
* *
* Retour : Instruction mise en place ou NULL. *
@@ -249,3 +360,40 @@ GArchInstruction *dalvik_read_instr_mul_long(const bin_t *data, off_t *pos, off_
return result;
}
+
+
+/******************************************************************************
+* *
+* Paramètres : data = flux de données à analyser. *
+* pos = position courante dans ce flux. [OUT] *
+* len = taille totale des données à analyser. *
+* addr = adresse virtuelle de l'instruction. *
+* proc = architecture ciblée par le désassemblage. *
+* fmt = format du fichier contenant le code. *
+* *
+* Description : Décode une instruction de type 'mul-long/2addr'. *
+* *
+* Retour : Instruction mise en place ou NULL. *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+GArchInstruction *dalvik_read_instr_mul_long_2addr(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc, const GDexFormat *fmt)
+{
+ GArchInstruction *result; /* Instruction à retourner */
+ SourceEndian endian; /* Boutisme lié au binaire */
+
+ result = g_dalvik_instruction_new(DOP_MUL_LONG_2ADDR);
+
+ endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
+
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_12X))
+ {
+ g_object_unref(G_OBJECT(result));
+ return NULL;
+ }
+
+ return result;
+
+}
diff --git a/src/arch/dalvik/opcodes/opcodes.h b/src/arch/dalvik/opcodes/opcodes.h
index 45457e3..5a6d157 100644
--- a/src/arch/dalvik/opcodes/opcodes.h
+++ b/src/arch/dalvik/opcodes/opcodes.h
@@ -36,6 +36,12 @@ typedef GArchInstruction * (* dalvik_read_instr) (const bin_t *, off_t *, off_t,
+/* Décode une instruction de type 'add-double'. */
+GArchInstruction *dalvik_read_instr_add_double(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
+
+/* Décode une instruction de type 'add-double/2addr'. */
+GArchInstruction *dalvik_read_instr_add_double_2addr(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
+
/* Décode une instruction de type 'add-int'. */
GArchInstruction *dalvik_read_instr_add_int(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
@@ -48,6 +54,15 @@ GArchInstruction *dalvik_read_instr_add_int_lit8(const bin_t *, off_t *, off_t,
/* Décode une instruction de type 'add-int/lit16'. */
GArchInstruction *dalvik_read_instr_add_int_lit16(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
+/* Décode une instruction de type 'add-float'. */
+GArchInstruction *dalvik_read_instr_add_float(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
+
+/* Décode une instruction de type 'add-float/2addr'. */
+GArchInstruction *dalvik_read_instr_add_float_2addr(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
+
+/* Décode une instruction de type 'add-long'. */
+GArchInstruction *dalvik_read_instr_add_long(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
+
/* Décode une instruction de type 'add-long/2addr'. */
GArchInstruction *dalvik_read_instr_add_long_2addr(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
@@ -360,6 +375,9 @@ GArchInstruction *dalvik_read_instr_move_result_wide(const bin_t *, off_t *, off
GArchInstruction *dalvik_read_instr_move_wide_from_16(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
+/* Décode une instruction de type 'mul-double'. */
+GArchInstruction *dalvik_read_instr_mul_double(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
+
/* Décode une instruction de type 'mul-double/2addr'. */
GArchInstruction *dalvik_read_instr_mul_double_2addr(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
@@ -375,9 +393,18 @@ GArchInstruction *dalvik_read_instr_mul_int_lit8(const bin_t *, off_t *, off_t,
/* Décode une instruction de type 'mul-int/lit16'. */
GArchInstruction *dalvik_read_instr_mul_int_lit16(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
+/* Décode une instruction de type 'mul-float'. */
+GArchInstruction *dalvik_read_instr_mul_float(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
+
+/* Décode une instruction de type 'mul-float/2addr'. */
+GArchInstruction *dalvik_read_instr_mul_float_2addr(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
+
/* Décode une instruction de type 'mul-long'. */
GArchInstruction *dalvik_read_instr_mul_long(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
+/* Décode une instruction de type 'mul-long/2addr'. */
+GArchInstruction *dalvik_read_instr_mul_long_2addr(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
+
/* Décode une instruction de type 'new-array'. */
@@ -529,9 +556,32 @@ GArchInstruction *dalvik_read_instr_sput_wide(const bin_t *, off_t *, off_t, vmp
+/* Décode une instruction de type 'sub-double'. */
+GArchInstruction *dalvik_read_instr_sub_double(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
+
+/* Décode une instruction de type 'sub-double/2addr'. */
+GArchInstruction *dalvik_read_instr_sub_double_2addr(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
+
/* Décode une instruction de type 'sub-int'. */
GArchInstruction *dalvik_read_instr_sub_int(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
+/* Décode une instruction de type 'sub-int/2addr'. */
+GArchInstruction *dalvik_read_instr_sub_int_2addr(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
+
+/* Décode une instruction de type 'sub-float'. */
+GArchInstruction *dalvik_read_instr_sub_float(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
+
+/* Décode une instruction de type 'sub-float/2addr'. */
+GArchInstruction *dalvik_read_instr_sub_float_2addr(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
+
+/* Décode une instruction de type 'sub-long'. */
+GArchInstruction *dalvik_read_instr_sub_long(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
+
+/* Décode une instruction de type 'sub-long/2addr'. */
+GArchInstruction *dalvik_read_instr_sub_long_2addr(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
+
+
+
/* Décode une instruction de type 'int-to-byte'. */
diff --git a/src/arch/dalvik/opcodes/sub.c b/src/arch/dalvik/opcodes/sub.c
index 8d42899..c35b9fd 100644
--- a/src/arch/dalvik/opcodes/sub.c
+++ b/src/arch/dalvik/opcodes/sub.c
@@ -38,6 +38,80 @@
* proc = architecture ciblée par le désassemblage. *
* fmt = format du fichier contenant le code. *
* *
+* Description : Décode une instruction de type 'sub-double'. *
+* *
+* Retour : Instruction mise en place ou NULL. *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+GArchInstruction *dalvik_read_instr_sub_double(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc, const GDexFormat *fmt)
+{
+ GArchInstruction *result; /* Instruction à retourner */
+ SourceEndian endian; /* Boutisme lié au binaire */
+
+ result = g_dalvik_instruction_new(DOP_SUB_DOUBLE);
+
+ endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
+
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_23X))
+ {
+ g_object_unref(G_OBJECT(result));
+ return NULL;
+ }
+
+ return result;
+
+}
+
+
+/******************************************************************************
+* *
+* Paramètres : data = flux de données à analyser. *
+* pos = position courante dans ce flux. [OUT] *
+* len = taille totale des données à analyser. *
+* addr = adresse virtuelle de l'instruction. *
+* proc = architecture ciblée par le désassemblage. *
+* fmt = format du fichier contenant le code. *
+* *
+* Description : Décode une instruction de type 'sub-double/2addr'. *
+* *
+* Retour : Instruction mise en place ou NULL. *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+GArchInstruction *dalvik_read_instr_sub_double_2addr(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc, const GDexFormat *fmt)
+{
+ GArchInstruction *result; /* Instruction à retourner */
+ SourceEndian endian; /* Boutisme lié au binaire */
+
+ result = g_dalvik_instruction_new(DOP_SUB_DOUBLE_2ADDR);
+
+ endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
+
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_12X))
+ {
+ g_object_unref(G_OBJECT(result));
+ return NULL;
+ }
+
+ return result;
+
+}
+
+
+/******************************************************************************
+* *
+* Paramètres : data = flux de données à analyser. *
+* pos = position courante dans ce flux. [OUT] *
+* len = taille totale des données à analyser. *
+* addr = adresse virtuelle de l'instruction. *
+* proc = architecture ciblée par le désassemblage. *
+* fmt = format du fichier contenant le code. *
+* *
* Description : Décode une instruction de type 'sub-int'. *
* *
* Retour : Instruction mise en place ou NULL. *
@@ -64,3 +138,188 @@ GArchInstruction *dalvik_read_instr_sub_int(const bin_t *data, off_t *pos, off_t
return result;
}
+
+
+/******************************************************************************
+* *
+* Paramètres : data = flux de données à analyser. *
+* pos = position courante dans ce flux. [OUT] *
+* len = taille totale des données à analyser. *
+* addr = adresse virtuelle de l'instruction. *
+* proc = architecture ciblée par le désassemblage. *
+* fmt = format du fichier contenant le code. *
+* *
+* Description : Décode une instruction de type 'sub-int/2addr'. *
+* *
+* Retour : Instruction mise en place ou NULL. *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+GArchInstruction *dalvik_read_instr_sub_int_2addr(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc, const GDexFormat *fmt)
+{
+ GArchInstruction *result; /* Instruction à retourner */
+ SourceEndian endian; /* Boutisme lié au binaire */
+
+ result = g_dalvik_instruction_new(DOP_SUB_INT_2ADDR);
+
+ endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
+
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_12X))
+ {
+ g_object_unref(G_OBJECT(result));
+ return NULL;
+ }
+
+ return result;
+
+}
+
+
+/******************************************************************************
+* *
+* Paramètres : data = flux de données à analyser. *
+* pos = position courante dans ce flux. [OUT] *
+* len = taille totale des données à analyser. *
+* addr = adresse virtuelle de l'instruction. *
+* proc = architecture ciblée par le désassemblage. *
+* fmt = format du fichier contenant le code. *
+* *
+* Description : Décode une instruction de type 'sub-float'. *
+* *
+* Retour : Instruction mise en place ou NULL. *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+GArchInstruction *dalvik_read_instr_sub_float(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc, const GDexFormat *fmt)
+{
+ GArchInstruction *result; /* Instruction à retourner */
+ SourceEndian endian; /* Boutisme lié au binaire */
+
+ result = g_dalvik_instruction_new(DOP_SUB_FLOAT);
+
+ endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
+
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_23X))
+ {
+ g_object_unref(G_OBJECT(result));
+ return NULL;
+ }
+
+ return result;
+
+}
+
+
+/******************************************************************************
+* *
+* Paramètres : data = flux de données à analyser. *
+* pos = position courante dans ce flux. [OUT] *
+* len = taille totale des données à analyser. *
+* addr = adresse virtuelle de l'instruction. *
+* proc = architecture ciblée par le désassemblage. *
+* fmt = format du fichier contenant le code. *
+* *
+* Description : Décode une instruction de type 'sub-float/2addr'. *
+* *
+* Retour : Instruction mise en place ou NULL. *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+GArchInstruction *dalvik_read_instr_sub_float_2addr(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc, const GDexFormat *fmt)
+{
+ GArchInstruction *result; /* Instruction à retourner */
+ SourceEndian endian; /* Boutisme lié au binaire */
+
+ result = g_dalvik_instruction_new(DOP_SUB_FLOAT_2ADDR);
+
+ endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
+
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_12X))
+ {
+ g_object_unref(G_OBJECT(result));
+ return NULL;
+ }
+
+ return result;
+
+}
+
+
+/******************************************************************************
+* *
+* Paramètres : data = flux de données à analyser. *
+* pos = position courante dans ce flux. [OUT] *
+* len = taille totale des données à analyser. *
+* addr = adresse virtuelle de l'instruction. *
+* proc = architecture ciblée par le désassemblage. *
+* fmt = format du fichier contenant le code. *
+* *
+* Description : Décode une instruction de type 'sub-long'. *
+* *
+* Retour : Instruction mise en place ou NULL. *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+GArchInstruction *dalvik_read_instr_sub_long(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc, const GDexFormat *fmt)
+{
+ GArchInstruction *result; /* Instruction à retourner */
+ SourceEndian endian; /* Boutisme lié au binaire */
+
+ result = g_dalvik_instruction_new(DOP_SUB_LONG);
+
+ endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
+
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_23X))
+ {
+ g_object_unref(G_OBJECT(result));
+ return NULL;
+ }
+
+ return result;
+
+}
+
+
+/******************************************************************************
+* *
+* Paramètres : data = flux de données à analyser. *
+* pos = position courante dans ce flux. [OUT] *
+* len = taille totale des données à analyser. *
+* addr = adresse virtuelle de l'instruction. *
+* proc = architecture ciblée par le désassemblage. *
+* fmt = format du fichier contenant le code. *
+* *
+* Description : Décode une instruction de type 'sub-long/2addr'. *
+* *
+* Retour : Instruction mise en place ou NULL. *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+GArchInstruction *dalvik_read_instr_sub_long_2addr(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc, const GDexFormat *fmt)
+{
+ GArchInstruction *result; /* Instruction à retourner */
+ SourceEndian endian; /* Boutisme lié au binaire */
+
+ result = g_dalvik_instruction_new(DOP_SUB_LONG_2ADDR);
+
+ endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
+
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_12X))
+ {
+ g_object_unref(G_OBJECT(result));
+ return NULL;
+ }
+
+ return result;
+
+}