summaryrefslogtreecommitdiff
path: root/src/arch/dalvik/opcodes
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2016-02-01 00:53:14 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2016-02-01 00:53:14 (GMT)
commit7162a683b66b02c16b42a177600468a1ff56149d (patch)
tree23d5119850d049f38182ce8b3b956a44233d8906 /src/arch/dalvik/opcodes
parent792b330c1bbe573a591687d25e14d4cd1eccd3c6 (diff)
Defined all Dalvik instructions to get generated by d2c.
Diffstat (limited to 'src/arch/dalvik/opcodes')
-rw-r--r--src/arch/dalvik/opcodes/Makefile.am49
-rw-r--r--src/arch/dalvik/opcodes/add.c419
-rw-r--r--src/arch/dalvik/opcodes/aget.c302
-rw-r--r--src/arch/dalvik/opcodes/and.c263
-rw-r--r--src/arch/dalvik/opcodes/aput.c288
-rw-r--r--src/arch/dalvik/opcodes/array.c179
-rw-r--r--src/arch/dalvik/opcodes/check.c66
-rw-r--r--src/arch/dalvik/opcodes/cmp.c224
-rw-r--r--src/arch/dalvik/opcodes/const.c458
-rw-r--r--src/arch/dalvik/opcodes/div.c419
-rw-r--r--src/arch/dalvik/opcodes/goto.c140
-rw-r--r--src/arch/dalvik/opcodes/if.c473
-rw-r--r--src/arch/dalvik/opcodes/iget.c302
-rw-r--r--src/arch/dalvik/opcodes/instanceof.c68
-rw-r--r--src/arch/dalvik/opcodes/invoke.c399
-rw-r--r--src/arch/dalvik/opcodes/iput.c288
-rw-r--r--src/arch/dalvik/opcodes/monitor.c103
-rw-r--r--src/arch/dalvik/opcodes/move.c536
-rw-r--r--src/arch/dalvik/opcodes/mul.c419
-rw-r--r--src/arch/dalvik/opcodes/neg.c185
-rw-r--r--src/arch/dalvik/opcodes/new.c107
-rw-r--r--src/arch/dalvik/opcodes/nop.c66
-rw-r--r--src/arch/dalvik/opcodes/not.c107
-rw-r--r--src/arch/dalvik/opcodes/opcodes.h693
-rw-r--r--src/arch/dalvik/opcodes/or.c263
-rw-r--r--src/arch/dalvik/opcodes/rem.c419
-rw-r--r--src/arch/dalvik/opcodes/ret.c177
-rw-r--r--src/arch/dalvik/opcodes/rsub.c107
-rw-r--r--src/arch/dalvik/opcodes/sget.c302
-rw-r--r--src/arch/dalvik/opcodes/shl.c224
-rw-r--r--src/arch/dalvik/opcodes/shr.c224
-rw-r--r--src/arch/dalvik/opcodes/sput.c288
-rw-r--r--src/arch/dalvik/opcodes/sub.c341
-rw-r--r--src/arch/dalvik/opcodes/switch.c103
-rw-r--r--src/arch/dalvik/opcodes/throw.c66
-rw-r--r--src/arch/dalvik/opcodes/to.c614
-rw-r--r--src/arch/dalvik/opcodes/ushr.c224
-rw-r--r--src/arch/dalvik/opcodes/xor.c263
38 files changed, 11 insertions, 10157 deletions
diff --git a/src/arch/dalvik/opcodes/Makefile.am b/src/arch/dalvik/opcodes/Makefile.am
index 8632c0e..e4f90da 100644
--- a/src/arch/dalvik/opcodes/Makefile.am
+++ b/src/arch/dalvik/opcodes/Makefile.am
@@ -1,44 +1,17 @@
+# Initialement, ce Makefile est conçu sans définition de am__depfiles_maybe.
+# Est-ce parce que GENERATED_FILES est vide et qu'il n'y a donc pas de code
+# source ? En tout cas, au premier écrasement de gencode.mk, tous les fichiers
+# sont regénérés, et am__depfiles_maybe apparaît enfin. Mais trop tard :
+# des fichiers .Plo sont attendus mais non créés par l'ancien Makefile.
+# On force les choses ici.
+am__depfiles_maybe = depfiles
+
+include gencode.mk
+
noinst_LTLIBRARIES = libarchdalvikopcodes.la
-libarchdalvikopcodes_la_SOURCES = \
- add.c \
- aget.c \
- and.c \
- aput.c \
- array.c \
- check.c \
- cmp.c \
- const.c \
- div.c \
- goto.c \
- if.c \
- iget.c \
- instanceof.c \
- invoke.c \
- iput.c \
- monitor.c \
- move.c \
- mul.c \
- neg.c \
- new.c \
- nop.c \
- not.c \
- opcodes.h \
- or.c \
- rem.c \
- ret.c \
- rsub.c \
- sget.c \
- shl.c \
- shr.c \
- sput.c \
- sub.c \
- switch.c \
- throw.c \
- to.c \
- ushr.c \
- xor.c
+libarchdalvikopcodes_la_SOURCES = $(GENERATED_FILES)
libarchdalvikopcodes_la_LIBADD =
diff --git a/src/arch/dalvik/opcodes/add.c b/src/arch/dalvik/opcodes/add.c
deleted file mode 100644
index 4d93df9..0000000
--- a/src/arch/dalvik/opcodes/add.c
+++ /dev/null
@@ -1,419 +0,0 @@
-
-/* Chrysalide - Outil d'analyse de fichiers binaires
- * add.c - décodage des opérations d'addition
- *
- * Copyright (C) 2010-2012 Cyrille Bagard
- *
- * This file is part of Chrysalide.
- *
- * OpenIDA is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- *
- * OpenIDA is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Foobar. If not, see <http://www.gnu.org/licenses/>.
- */
-
-
-#include "opcodes.h"
-
-
-#include "../instruction.h"
-#include "../operand.h"
-
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_add_double(const bin_t *data, off_t *pos, off_t end, 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, end, endian, DALVIK_OPT_23X))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 end, 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, end, endian, DALVIK_OPT_12X))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_add_int(const bin_t *data, off_t *pos, off_t end, 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_INT);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_23X))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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/2addr'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_add_int_2addr(const bin_t *data, off_t *pos, off_t end, 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_INT_2ADDR);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_12X))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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/lit8'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_add_int_lit8(const bin_t *data, off_t *pos, off_t end, 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_INT_LIT8);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_22B))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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/lit16'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_add_int_lit16(const bin_t *data, off_t *pos, off_t end, 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_INT_LIT16);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_22S))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_add_float(const bin_t *data, off_t *pos, off_t end, 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, end, endian, DALVIK_OPT_23X))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 end, 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, end, endian, DALVIK_OPT_12X))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 end, 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, end, endian, DALVIK_OPT_23X))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_add_long_2addr(const bin_t *data, off_t *pos, off_t end, 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_2ADDR);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_12X))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
diff --git a/src/arch/dalvik/opcodes/aget.c b/src/arch/dalvik/opcodes/aget.c
deleted file mode 100644
index e5033aa..0000000
--- a/src/arch/dalvik/opcodes/aget.c
+++ /dev/null
@@ -1,302 +0,0 @@
-
-/* Chrysalide - Outil d'analyse de fichiers binaires
- * aget.c - décodage des instructions manipulant des tableaux (chargement)
- *
- * Copyright (C) 2010-2012 Cyrille Bagard
- *
- * This file is part of Chrysalide.
- *
- * OpenIDA is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- *
- * OpenIDA is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Foobar. If not, see <http://www.gnu.org/licenses/>.
- */
-
-
-#include "opcodes.h"
-
-
-#include "../instruction.h"
-#include "../operand.h"
-
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'aget'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_aget(const bin_t *data, off_t *pos, off_t end, 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_AGET);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_23X))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'aget-boolean'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_aget_boolean(const bin_t *data, off_t *pos, off_t end, 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_AGET_BOOLEAN);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_23X))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'aget-byte'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_aget_byte(const bin_t *data, off_t *pos, off_t end, 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_AGET_BYTE);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_23X))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'aget-char'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_aget_char(const bin_t *data, off_t *pos, off_t end, 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_AGET_CHAR);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_23X))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'aget-object'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_aget_object(const bin_t *data, off_t *pos, off_t end, 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_AGET_OBJECT);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_23X))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'aget-short'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_aget_short(const bin_t *data, off_t *pos, off_t end, 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_AGET_SHORT);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_23X))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'aget-wide'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_aget_wide(const bin_t *data, off_t *pos, off_t end, 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_AGET_WIDE);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_23X))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
diff --git a/src/arch/dalvik/opcodes/and.c b/src/arch/dalvik/opcodes/and.c
deleted file mode 100644
index d5162bf..0000000
--- a/src/arch/dalvik/opcodes/and.c
+++ /dev/null
@@ -1,263 +0,0 @@
-
-/* Chrysalide - Outil d'analyse de fichiers binaires
- * and.c - décodage des opérations de ET logiques
- *
- * Copyright (C) 2010-2012 Cyrille Bagard
- *
- * This file is part of Chrysalide.
- *
- * OpenIDA is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- *
- * OpenIDA is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Foobar. If not, see <http://www.gnu.org/licenses/>.
- */
-
-
-#include "opcodes.h"
-
-
-#include "../instruction.h"
-#include "../operand.h"
-
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'and-int'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_and_int(const bin_t *data, off_t *pos, off_t end, 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_AND_INT);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_23X))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'and-int/2addr'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_and_int_2addr(const bin_t *data, off_t *pos, off_t end, 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_AND_INT_2ADDR);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_12X))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'and-int/lit8'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_and_int_lit8(const bin_t *data, off_t *pos, off_t end, 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_AND_INT_LIT8);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_22B))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'and-int/lit16'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_and_int_lit16(const bin_t *data, off_t *pos, off_t end, 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_AND_INT_LIT16);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_22S))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'and-long'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_and_long(const bin_t *data, off_t *pos, off_t end, 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_AND_LONG);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_23X))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'and-long/2addr'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_and_long_2addr(const bin_t *data, off_t *pos, off_t end, 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_AND_LONG_2ADDR);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_12X))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
diff --git a/src/arch/dalvik/opcodes/aput.c b/src/arch/dalvik/opcodes/aput.c
deleted file mode 100644
index 6cdde65..0000000
--- a/src/arch/dalvik/opcodes/aput.c
+++ /dev/null
@@ -1,288 +0,0 @@
-
-/* Chrysalide - Outil d'analyse de fichiers binaires
- * aput.c - décodage des instructions manipulant des tableaux (enregistrement)
- *
- * Copyright (C) 2010-2012 Cyrille Bagard
- *
- * This file is part of Chrysalide.
- *
- * OpenIDA is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- *
- * OpenIDA is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Foobar. If not, see <http://www.gnu.org/licenses/>.
- */
-
-
-#include "opcodes.h"
-
-
-#include "../instruction.h"
-#include "../operand.h"
-
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'aput'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_aput(const bin_t *data, off_t *pos, off_t end, 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_APUT);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, 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] *
-* end = limite 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 'aput-boolean'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_aput_boolean(const bin_t *data, off_t *pos, off_t end, 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_APUT_BOOLEAN);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, 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] *
-* end = limite 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 'aput-byte'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_aput_byte(const bin_t *data, off_t *pos, off_t end, 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_APUT_BYTE);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, 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] *
-* end = limite 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 'aput-char'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_aput_char(const bin_t *data, off_t *pos, off_t end, 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_APUT_CHAR);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, 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] *
-* end = limite 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 'aput-object'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_aput_object(const bin_t *data, off_t *pos, off_t end, 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_APUT_OBJECT);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, 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] *
-* end = limite 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 'aput-short'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_aput_short(const bin_t *data, off_t *pos, off_t end, 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_APUT_SHORT);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, 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] *
-* end = limite 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 'aput-wide'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_aput_wide(const bin_t *data, off_t *pos, off_t end, 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_APUT_WIDE);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_23X))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- return result;
-
-}
diff --git a/src/arch/dalvik/opcodes/array.c b/src/arch/dalvik/opcodes/array.c
deleted file mode 100644
index efa40b7..0000000
--- a/src/arch/dalvik/opcodes/array.c
+++ /dev/null
@@ -1,179 +0,0 @@
-
-/* Chrysalide - Outil d'analyse de fichiers binaires
- * array.c - décodage de l'opération récupérant la longueur d'un tableau
- *
- * Copyright (C) 2010-2012 Cyrille Bagard
- *
- * This file is part of Chrysalide.
- *
- * OpenIDA is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- *
- * OpenIDA is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Foobar. If not, see <http://www.gnu.org/licenses/>.
- */
-
-
-#include "opcodes.h"
-
-
-#include "../instruction.h"
-#include "../operand.h"
-
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'array-length'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_array_length(const bin_t *data, off_t *pos, off_t end, 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_ARRAY_LENGTH);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_12X))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'fill-array-data'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_fill_array_data(const bin_t *data, off_t *pos, off_t end, 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_FILL_ARRAY_DATA);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_31T))
- {
- 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] *
-* end = limite 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 'filled-new-array'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_filled_new_array(const bin_t *data, off_t *pos, off_t end, 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_FILLED_NEW_ARRAY);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_35C | DALVIK_OP_POOL(DPT_TYPE)))
- {
- 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] *
-* end = limite 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 'filled-new-array/range'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_filled_new_array_range(const bin_t *data, off_t *pos, off_t end, 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_FILLED_NEW_ARRAY_RANGE);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_3RC | DALVIK_OP_POOL(DPT_TYPE)))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- return result;
-
-}
diff --git a/src/arch/dalvik/opcodes/check.c b/src/arch/dalvik/opcodes/check.c
deleted file mode 100644
index 725f336..0000000
--- a/src/arch/dalvik/opcodes/check.c
+++ /dev/null
@@ -1,66 +0,0 @@
-
-/* Chrysalide - Outil d'analyse de fichiers binaires
- * check.c - décodage des vérifications de types
- *
- * Copyright (C) 2010-2012 Cyrille Bagard
- *
- * This file is part of Chrysalide.
- *
- * OpenIDA is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- *
- * OpenIDA is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Foobar. If not, see <http://www.gnu.org/licenses/>.
- */
-
-
-#include "opcodes.h"
-
-
-#include "../instruction.h"
-#include "../operand.h"
-
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'check-cast'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_check_cast(const bin_t *data, off_t *pos, off_t end, 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_CHECK_CAST);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_21C | DALVIK_OP_POOL(DPT_TYPE)))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- return result;
-
-}
diff --git a/src/arch/dalvik/opcodes/cmp.c b/src/arch/dalvik/opcodes/cmp.c
deleted file mode 100644
index e6de13c..0000000
--- a/src/arch/dalvik/opcodes/cmp.c
+++ /dev/null
@@ -1,224 +0,0 @@
-
-/* Chrysalide - Outil d'analyse de fichiers binaires
- * cmp.c - décodage des instructions de comparaison
- *
- * Copyright (C) 2010-2012 Cyrille Bagard
- *
- * This file is part of Chrysalide.
- *
- * OpenIDA is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- *
- * OpenIDA is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Foobar. If not, see <http://www.gnu.org/licenses/>.
- */
-
-
-#include "opcodes.h"
-
-
-#include "../instruction.h"
-#include "../operand.h"
-
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'cmp-long'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_cmp_long(const bin_t *data, off_t *pos, off_t end, 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_CMP_LONG);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_12X))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'cmpg-double'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_cmpg_double(const bin_t *data, off_t *pos, off_t end, 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_CMPG_DOUBLE);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_12X))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'cmpg-float'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_cmpg_float(const bin_t *data, off_t *pos, off_t end, 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_CMPG_FLOAT);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_12X))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'cmpl-double'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_cmpl_double(const bin_t *data, off_t *pos, off_t end, 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_CMPL_DOUBLE);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_12X))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'cmpl-float'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_cmpl_float(const bin_t *data, off_t *pos, off_t end, 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_CMPL_FLOAT);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_12X))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
diff --git a/src/arch/dalvik/opcodes/const.c b/src/arch/dalvik/opcodes/const.c
deleted file mode 100644
index 5097804..0000000
--- a/src/arch/dalvik/opcodes/const.c
+++ /dev/null
@@ -1,458 +0,0 @@
-
-/* Chrysalide - Outil d'analyse de fichiers binaires
- * const.c - décodage des chargements de constantes
- *
- * Copyright (C) 2010-2012 Cyrille Bagard
- *
- * This file is part of Chrysalide.
- *
- * OpenIDA is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- *
- * OpenIDA is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Foobar. If not, see <http://www.gnu.org/licenses/>.
- */
-
-
-#include "opcodes.h"
-
-
-#include "../instruction.h"
-#include "../operand.h"
-
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'const'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_const(const bin_t *data, off_t *pos, off_t end, 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_CONST);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_31I))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'const/16'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_const_16(const bin_t *data, off_t *pos, off_t end, 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_CONST_16);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_21S))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'const/4'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_const_4(const bin_t *data, off_t *pos, off_t end, 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_CONST_4);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_11N))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'const-class'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_const_class(const bin_t *data, off_t *pos, off_t end, 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_CONST_CLASS);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_21C | DALVIK_OP_POOL(DPT_TYPE)))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'const/high16'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_const_high16(const bin_t *data, off_t *pos, off_t end, 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_CONST_HIGH16);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_21H))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'const-string'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_const_string(const bin_t *data, off_t *pos, off_t end, 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_CONST_STRING);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_21C | DALVIK_OP_POOL(DPT_STRING)))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'const-string/jumbo'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_const_string_jumbo(const bin_t *data, off_t *pos, off_t end, 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_CONST_STRING_JUMBO);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_31C | DALVIK_OP_POOL(DPT_STRING)))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'const-wide'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_const_wide(const bin_t *data, off_t *pos, off_t end, 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_CONST_WIDE);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_51L))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'const-wide/16'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_const_wide_16(const bin_t *data, off_t *pos, off_t end, 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_CONST_WIDE_16);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_21S))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'const-wide/32'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_const_wide_32(const bin_t *data, off_t *pos, off_t end, 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_CONST_WIDE_32);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_31I))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'const-wide/high16'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_const_wide_high16(const bin_t *data, off_t *pos, off_t end, 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_CONST_WIDE_HIGH16);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_21H))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
diff --git a/src/arch/dalvik/opcodes/div.c b/src/arch/dalvik/opcodes/div.c
deleted file mode 100644
index a20968b..0000000
--- a/src/arch/dalvik/opcodes/div.c
+++ /dev/null
@@ -1,419 +0,0 @@
-
-/* Chrysalide - Outil d'analyse de fichiers binaires
- * div.c - décodage des opérations de divisions
- *
- * Copyright (C) 2010-2012 Cyrille Bagard
- *
- * This file is part of Chrysalide.
- *
- * OpenIDA is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- *
- * OpenIDA is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Foobar. If not, see <http://www.gnu.org/licenses/>.
- */
-
-
-#include "opcodes.h"
-
-
-#include "../instruction.h"
-#include "../operand.h"
-
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'div-double'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_div_double(const bin_t *data, off_t *pos, off_t end, 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_DIV_DOUBLE);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_23X))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'div-double/2addr'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_div_double_2addr(const bin_t *data, off_t *pos, off_t end, 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_DIV_DOUBLE_2ADDR);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_12X))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'div-float'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_div_float(const bin_t *data, off_t *pos, off_t end, 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_DIV_FLOAT);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_23X))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'div-float/2addr'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_div_float_2addr(const bin_t *data, off_t *pos, off_t end, 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_DIV_FLOAT_2ADDR);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_12X))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'div-int'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_div_int(const bin_t *data, off_t *pos, off_t end, 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_DIV_INT);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_23X))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'div-int/2addr'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_div_int_2addr(const bin_t *data, off_t *pos, off_t end, 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_DIV_INT_2ADDR);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_12X))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'div-int/lit8'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_div_int_lit8(const bin_t *data, off_t *pos, off_t end, 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_DIV_INT_LIT8);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_22B))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'div-int/lit16'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_div_int_lit16(const bin_t *data, off_t *pos, off_t end, 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_DIV_INT_LIT16);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_22S))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'div-long'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_div_long(const bin_t *data, off_t *pos, off_t end, 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_DIV_LONG);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_23X))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'div-long/2addr'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_div_long_2addr(const bin_t *data, off_t *pos, off_t end, 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_DIV_LONG_2ADDR);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_12X))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
diff --git a/src/arch/dalvik/opcodes/goto.c b/src/arch/dalvik/opcodes/goto.c
deleted file mode 100644
index f74774a..0000000
--- a/src/arch/dalvik/opcodes/goto.c
+++ /dev/null
@@ -1,140 +0,0 @@
-
-/* Chrysalide - Outil d'analyse de fichiers binaires
- * goto.c - décodage des branchements inconditionnels
- *
- * Copyright (C) 2010-2012 Cyrille Bagard
- *
- * This file is part of Chrysalide.
- *
- * OpenIDA is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- *
- * OpenIDA is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Foobar. If not, see <http://www.gnu.org/licenses/>.
- */
-
-
-#include "opcodes.h"
-
-
-#include "../instruction.h"
-#include "../operand.h"
-
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'goto'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_goto(const bin_t *data, off_t *pos, off_t end, 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_GOTO);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_10T, addr))
- {
- 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] *
-* end = limite 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 'goto/16'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_goto_16(const bin_t *data, off_t *pos, off_t end, 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_GOTO_16);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_20T, addr))
- {
- 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] *
-* end = limite 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 'goto/32'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_goto_32(const bin_t *data, off_t *pos, off_t end, 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_GOTO_32);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_30T, addr))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- return result;
-
-}
diff --git a/src/arch/dalvik/opcodes/if.c b/src/arch/dalvik/opcodes/if.c
deleted file mode 100644
index ad8b49a..0000000
--- a/src/arch/dalvik/opcodes/if.c
+++ /dev/null
@@ -1,473 +0,0 @@
-
-/* Chrysalide - Outil d'analyse de fichiers binaires
- * if.c - décodage des branchements conditionnels
- *
- * Copyright (C) 2010-2012 Cyrille Bagard
- *
- * This file is part of Chrysalide.
- *
- * OpenIDA is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- *
- * OpenIDA is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Foobar. If not, see <http://www.gnu.org/licenses/>.
- */
-
-
-#include "opcodes.h"
-
-
-#include "../instruction.h"
-#include "../operand.h"
-
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'if-eq'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_if_eq(const bin_t *data, off_t *pos, off_t end, 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_IF_EQ);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_22T, addr))
- {
- 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] *
-* end = limite 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 'if-eqz'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_if_eqz(const bin_t *data, off_t *pos, off_t end, 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_IF_EQZ);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_21T, addr))
- {
- 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] *
-* end = limite 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 'if-ge'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_if_ge(const bin_t *data, off_t *pos, off_t end, 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_IF_GE);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_22T, addr))
- {
- 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] *
-* end = limite 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 'if-gez'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_if_gez(const bin_t *data, off_t *pos, off_t end, 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_IF_GEZ);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_21T, addr))
- {
- 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] *
-* end = limite 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 'if-gt'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_if_gt(const bin_t *data, off_t *pos, off_t end, 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_IF_GT);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_22T, addr))
- {
- 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] *
-* end = limite 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 'if-gtz'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_if_gtz(const bin_t *data, off_t *pos, off_t end, 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_IF_GTZ);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_21T, addr))
- {
- 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] *
-* end = limite 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 'if-le'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_if_le(const bin_t *data, off_t *pos, off_t end, 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_IF_LE);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_22T, addr))
- {
- 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] *
-* end = limite 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 'if-lez'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_if_lez(const bin_t *data, off_t *pos, off_t end, 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_IF_LEZ);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_21T, addr))
- {
- 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] *
-* end = limite 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 'if-lt'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_if_lt(const bin_t *data, off_t *pos, off_t end, 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_IF_LT);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_22T, addr))
- {
- 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] *
-* end = limite 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 'if-ltz'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_if_ltz(const bin_t *data, off_t *pos, off_t end, 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_IF_LTZ);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_21T, addr))
- {
- 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] *
-* end = limite 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 'if-ne'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_if_ne(const bin_t *data, off_t *pos, off_t end, 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_IF_NE);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_22T, addr))
- {
- 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] *
-* end = limite 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 'if-nez'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_if_nez(const bin_t *data, off_t *pos, off_t end, 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_IF_NEZ);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_21T, addr))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- return result;
-
-}
diff --git a/src/arch/dalvik/opcodes/iget.c b/src/arch/dalvik/opcodes/iget.c
deleted file mode 100644
index f83bb96..0000000
--- a/src/arch/dalvik/opcodes/iget.c
+++ /dev/null
@@ -1,302 +0,0 @@
-
-/* Chrysalide - Outil d'analyse de fichiers binaires
- * iget.c - décodage des chargements de champs d'instance
- *
- * Copyright (C) 2010-2012 Cyrille Bagard
- *
- * This file is part of Chrysalide.
- *
- * OpenIDA is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- *
- * OpenIDA is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Foobar. If not, see <http://www.gnu.org/licenses/>.
- */
-
-
-#include "opcodes.h"
-
-
-#include "../instruction.h"
-#include "../operand.h"
-
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'iget'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_iget(const bin_t *data, off_t *pos, off_t end, 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_IGET);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_22C | DALVIK_OP_POOL(DPT_FIELD)))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'iget-boolean'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_iget_boolean(const bin_t *data, off_t *pos, off_t end, 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_IGET_BOOLEAN);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_22C | DALVIK_OP_POOL(DPT_FIELD)))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'iget-byte'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_iget_byte(const bin_t *data, off_t *pos, off_t end, 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_IGET_BYTE);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_22C | DALVIK_OP_POOL(DPT_FIELD)))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'iget-char'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_iget_char(const bin_t *data, off_t *pos, off_t end, 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_IGET_CHAR);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_22C | DALVIK_OP_POOL(DPT_FIELD)))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'iget-object'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_iget_object(const bin_t *data, off_t *pos, off_t end, 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_IGET_OBJECT);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_22C | DALVIK_OP_POOL(DPT_FIELD)))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'iget-short'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_iget_short(const bin_t *data, off_t *pos, off_t end, 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_IGET_SHORT);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_22C | DALVIK_OP_POOL(DPT_FIELD)))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'iget-wide'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_iget_wide(const bin_t *data, off_t *pos, off_t end, 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_IGET_WIDE);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_22C | DALVIK_OP_POOL(DPT_FIELD)))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
diff --git a/src/arch/dalvik/opcodes/instanceof.c b/src/arch/dalvik/opcodes/instanceof.c
deleted file mode 100644
index d65c6bd..0000000
--- a/src/arch/dalvik/opcodes/instanceof.c
+++ /dev/null
@@ -1,68 +0,0 @@
-
-/* Chrysalide - Outil d'analyse de fichiers binaires
- * instanceof.c - décodage des opérations d'interrogation sur une instance
- *
- * Copyright (C) 2012 Cyrille Bagard
- *
- * This file is part of Chrysalide.
- *
- * OpenIDA is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- *
- * OpenIDA is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Foobar. If not, see <http://www.gnu.org/licenses/>.
- */
-
-
-#include "opcodes.h"
-
-
-#include "../instruction.h"
-#include "../operand.h"
-
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'instance-of'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_instance_of(const bin_t *data, off_t *pos, off_t end, 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_INSTANCE_OF);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_22C | DALVIK_OP_POOL(DPT_TYPE)))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
diff --git a/src/arch/dalvik/opcodes/invoke.c b/src/arch/dalvik/opcodes/invoke.c
deleted file mode 100644
index 9133e79..0000000
--- a/src/arch/dalvik/opcodes/invoke.c
+++ /dev/null
@@ -1,399 +0,0 @@
-
-/* Chrysalide - Outil d'analyse de fichiers binaires
- * invoke.c - décodage des appels de méthode
- *
- * Copyright (C) 2010-2012 Cyrille Bagard
- *
- * This file is part of Chrysalide.
- *
- * OpenIDA is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- *
- * OpenIDA is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Foobar. If not, see <http://www.gnu.org/licenses/>.
- */
-
-
-#include "opcodes.h"
-
-
-#include "../instruction.h"
-#include "../operand.h"
-
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'invoke-direct'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_invoke_direct(const bin_t *data, off_t *pos, off_t end, 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_INVOKE_DIRECT);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_35C | DALVIK_OP_POOL(DPT_METHOD)))
- {
- 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] *
-* end = limite 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 'invoke-direct/range'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_invoke_direct_range(const bin_t *data, off_t *pos, off_t end, 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_INVOKE_DIRECT_RANGE);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_3RC | DALVIK_OP_POOL(DPT_METHOD)))
- {
- 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] *
-* end = limite 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 'invoke-interface'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_invoke_interface(const bin_t *data, off_t *pos, off_t end, 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_INVOKE_INTERFACE);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_35C | DALVIK_OP_POOL(DPT_METHOD)))
- {
- 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] *
-* end = limite 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 'invoke-interface/range'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_invoke_interface_range(const bin_t *data, off_t *pos, off_t end, 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_INVOKE_INTERFACE_RANGE);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_3RC | DALVIK_OP_POOL(DPT_METHOD)))
- {
- 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] *
-* end = limite 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 'invoke-static'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_invoke_static(const bin_t *data, off_t *pos, off_t end, 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_INVOKE_STATIC);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_35C | DALVIK_OP_POOL(DPT_METHOD)))
- {
- 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] *
-* end = limite 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 'invoke-static/range'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_invoke_static_range(const bin_t *data, off_t *pos, off_t end, 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_INVOKE_STATIC_RANGE);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_3RC | DALVIK_OP_POOL(DPT_METHOD)))
- {
- 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] *
-* end = limite 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 'invoke-super'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_invoke_super(const bin_t *data, off_t *pos, off_t end, 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_INVOKE_SUPER);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_35C | DALVIK_OP_POOL(DPT_METHOD)))
- {
- 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] *
-* end = limite 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 'invoke-super/range'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_invoke_super_range(const bin_t *data, off_t *pos, off_t end, 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_INVOKE_SUPER_RANGE);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_3RC | DALVIK_OP_POOL(DPT_METHOD)))
- {
- 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] *
-* end = limite 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 'invoke-virtual'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_invoke_virtual(const bin_t *data, off_t *pos, off_t end, 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_INVOKE_VIRTUAL);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_35C | DALVIK_OP_POOL(DPT_METHOD)))
- {
- 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] *
-* end = limite 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 'invoke-virtual/range'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_invoke_virtual_range(const bin_t *data, off_t *pos, off_t end, 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_INVOKE_VIRTUAL_RANGE);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_3RC | DALVIK_OP_POOL(DPT_METHOD)))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- return result;
-
-}
diff --git a/src/arch/dalvik/opcodes/iput.c b/src/arch/dalvik/opcodes/iput.c
deleted file mode 100644
index 434eec7..0000000
--- a/src/arch/dalvik/opcodes/iput.c
+++ /dev/null
@@ -1,288 +0,0 @@
-
-/* Chrysalide - Outil d'analyse de fichiers binaires
- * iput.c - décodage des enregistrements de champs d'instance
- *
- * Copyright (C) 2010-2012 Cyrille Bagard
- *
- * This file is part of Chrysalide.
- *
- * OpenIDA is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- *
- * OpenIDA is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Foobar. If not, see <http://www.gnu.org/licenses/>.
- */
-
-
-#include "opcodes.h"
-
-
-#include "../instruction.h"
-#include "../operand.h"
-
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'iput'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_iput(const bin_t *data, off_t *pos, off_t end, 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_IPUT);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_22C | DALVIK_OP_POOL(DPT_FIELD)))
- {
- 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] *
-* end = limite 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 'iput-boolean'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_iput_boolean(const bin_t *data, off_t *pos, off_t end, 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_IPUT_BOOLEAN);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_22C | DALVIK_OP_POOL(DPT_FIELD)))
- {
- 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] *
-* end = limite 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 'iput-byte'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_iput_byte(const bin_t *data, off_t *pos, off_t end, 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_IPUT_BYTE);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_22C | DALVIK_OP_POOL(DPT_FIELD)))
- {
- 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] *
-* end = limite 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 'iput-char'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_iput_char(const bin_t *data, off_t *pos, off_t end, 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_IPUT_CHAR);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_22C | DALVIK_OP_POOL(DPT_FIELD)))
- {
- 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] *
-* end = limite 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 'iput-object'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_iput_object(const bin_t *data, off_t *pos, off_t end, 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_IPUT_OBJECT);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_22C | DALVIK_OP_POOL(DPT_FIELD)))
- {
- 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] *
-* end = limite 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 'iput-short'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_iput_short(const bin_t *data, off_t *pos, off_t end, 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_IPUT_SHORT);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_22C | DALVIK_OP_POOL(DPT_FIELD)))
- {
- 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] *
-* end = limite 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 'iput-wide'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_iput_wide(const bin_t *data, off_t *pos, off_t end, 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_IPUT_WIDE);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_22C | DALVIK_OP_POOL(DPT_FIELD)))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- return result;
-
-}
diff --git a/src/arch/dalvik/opcodes/monitor.c b/src/arch/dalvik/opcodes/monitor.c
deleted file mode 100644
index 866e984..0000000
--- a/src/arch/dalvik/opcodes/monitor.c
+++ /dev/null
@@ -1,103 +0,0 @@
-
-/* Chrysalide - Outil d'analyse de fichiers binaires
- * monitor.c - décodage des opérations de débogage
- *
- * Copyright (C) 2012 Cyrille Bagard
- *
- * This file is part of Chrysalide.
- *
- * OpenIDA is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- *
- * OpenIDA is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Foobar. If not, see <http://www.gnu.org/licenses/>.
- */
-
-
-#include "opcodes.h"
-
-
-#include "../instruction.h"
-#include "../operand.h"
-
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'monitor-enter'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_monitor_enter(const bin_t *data, off_t *pos, off_t end, 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_MONITOR_ENTER);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_11X))
- {
- 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] *
-* end = limite 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 'monitor-exit'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_monitor_exit(const bin_t *data, off_t *pos, off_t end, 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_MONITOR_EXIT);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_11X))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- return result;
-
-}
diff --git a/src/arch/dalvik/opcodes/move.c b/src/arch/dalvik/opcodes/move.c
deleted file mode 100644
index ba2d89b..0000000
--- a/src/arch/dalvik/opcodes/move.c
+++ /dev/null
@@ -1,536 +0,0 @@
-
-/* Chrysalide - Outil d'analyse de fichiers binaires
- * move.c - décodage des opérations de déplacement
- *
- * Copyright (C) 2010-2012 Cyrille Bagard
- *
- * This file is part of Chrysalide.
- *
- * OpenIDA is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- *
- * OpenIDA is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Foobar. If not, see <http://www.gnu.org/licenses/>.
- */
-
-
-#include "opcodes.h"
-
-
-#include "../instruction.h"
-#include "../operand.h"
-
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'move'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_move(const bin_t *data, off_t *pos, off_t end, 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_MOVE);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_12X))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'move-exception'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_move_exception(const bin_t *data, off_t *pos, off_t end, 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_MOVE_EXCEPTION);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_11X))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'move/16'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_move_16(const bin_t *data, off_t *pos, off_t end, 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_MOVE_16);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_32X))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'move/from16'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_move_from_16(const bin_t *data, off_t *pos, off_t end, 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_MOVE_FROM_16);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_22X))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'move-object'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_move_object(const bin_t *data, off_t *pos, off_t end, 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_MOVE_OBJECT);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_12X))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'move-object/16'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_move_object_16(const bin_t *data, off_t *pos, off_t end, 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_MOVE_OBJECT_16);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_32X))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'move-object/from16'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_move_object_from_16(const bin_t *data, off_t *pos, off_t end, 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_MOVE_OBJECT_FROM_16);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_22X))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'move-result'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_move_result(const bin_t *data, off_t *pos, off_t end, 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_MOVE_RESULT);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_11X))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'move-result-object'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_move_result_object(const bin_t *data, off_t *pos, off_t end, 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_MOVE_RESULT_OBJECT);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_11X))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'move-result-wide'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_move_result_wide(const bin_t *data, off_t *pos, off_t end, 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_MOVE_RESULT_WIDE);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_11X))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'move-wide'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_move_wide(const bin_t *data, off_t *pos, off_t end, 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_MOVE_WIDE);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_12X))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'move-wide/16'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_move_wide_16(const bin_t *data, off_t *pos, off_t end, 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_MOVE_WIDE_16);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_32X))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'move-wide/from16'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_move_wide_from_16(const bin_t *data, off_t *pos, off_t end, 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_MOVE_WIDE_FROM_16);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_22X))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
diff --git a/src/arch/dalvik/opcodes/mul.c b/src/arch/dalvik/opcodes/mul.c
deleted file mode 100644
index 67a343b..0000000
--- a/src/arch/dalvik/opcodes/mul.c
+++ /dev/null
@@ -1,419 +0,0 @@
-
-/* Chrysalide - Outil d'analyse de fichiers binaires
- * mul.c - décodage des opérations de multiplications
- *
- * Copyright (C) 2010-2012 Cyrille Bagard
- *
- * This file is part of Chrysalide.
- *
- * OpenIDA is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- *
- * OpenIDA is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Foobar. If not, see <http://www.gnu.org/licenses/>.
- */
-
-
-#include "opcodes.h"
-
-
-#include "../instruction.h"
-#include "../operand.h"
-
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_mul_double(const bin_t *data, off_t *pos, off_t end, 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, end, endian, DALVIK_OPT_23X))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_mul_double_2addr(const bin_t *data, off_t *pos, off_t end, 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_2ADDR);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_12X))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_mul_float(const bin_t *data, off_t *pos, off_t end, 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, end, endian, DALVIK_OPT_23X))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 end, 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, end, endian, DALVIK_OPT_12X))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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-int'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_mul_int(const bin_t *data, off_t *pos, off_t end, 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_INT);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_23X))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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-int/2addr'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_mul_int_2addr(const bin_t *data, off_t *pos, off_t end, 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_INT_2ADDR);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_12X))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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-int/lit8'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_mul_int_lit8(const bin_t *data, off_t *pos, off_t end, 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_INT_LIT8);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_22B))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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-int/lit16'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_mul_int_lit16(const bin_t *data, off_t *pos, off_t end, 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_INT_LIT16);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_22S))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_mul_long(const bin_t *data, off_t *pos, off_t end, 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);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_23X))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 end, 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, end, endian, DALVIK_OPT_12X))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
diff --git a/src/arch/dalvik/opcodes/neg.c b/src/arch/dalvik/opcodes/neg.c
deleted file mode 100644
index 5f9a985..0000000
--- a/src/arch/dalvik/opcodes/neg.c
+++ /dev/null
@@ -1,185 +0,0 @@
-
-/* Chrysalide - Outil d'analyse de fichiers binaires
- * neg.c - décodage des instructions de négations
- *
- * Copyright (C) 2012 Cyrille Bagard
- *
- * This file is part of Chrysalide.
- *
- * OpenIDA is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- *
- * OpenIDA is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Foobar. If not, see <http://www.gnu.org/licenses/>.
- */
-
-
-#include "opcodes.h"
-
-
-#include "../instruction.h"
-#include "../operand.h"
-
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'neg-double'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_neg_double(const bin_t *data, off_t *pos, off_t end, 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_NEG_DOUBLE);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_12X))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'neg-float'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_neg_float(const bin_t *data, off_t *pos, off_t end, 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_NEG_FLOAT);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_12X))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'neg-int'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_neg_int(const bin_t *data, off_t *pos, off_t end, 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_NEG_INT);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_12X))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'neg-long'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_neg_long(const bin_t *data, off_t *pos, off_t end, 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_NEG_LONG);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_12X))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
diff --git a/src/arch/dalvik/opcodes/new.c b/src/arch/dalvik/opcodes/new.c
deleted file mode 100644
index 3320540..0000000
--- a/src/arch/dalvik/opcodes/new.c
+++ /dev/null
@@ -1,107 +0,0 @@
-
-/* Chrysalide - Outil d'analyse de fichiers binaires
- * new.c - décodage des créations de nouvelles instances
- *
- * Copyright (C) 2010-2012 Cyrille Bagard
- *
- * This file is part of Chrysalide.
- *
- * OpenIDA is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- *
- * OpenIDA is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Foobar. If not, see <http://www.gnu.org/licenses/>.
- */
-
-
-#include "opcodes.h"
-
-
-#include "../instruction.h"
-#include "../operand.h"
-
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'new-array'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_new_array(const bin_t *data, off_t *pos, off_t end, 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_NEW_ARRAY);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_22C | DALVIK_OP_POOL(DPT_TYPE)))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'new-instance'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_new_instance(const bin_t *data, off_t *pos, off_t end, 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_NEW_INSTANCE);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_21C | DALVIK_OP_POOL(DPT_TYPE)))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
diff --git a/src/arch/dalvik/opcodes/nop.c b/src/arch/dalvik/opcodes/nop.c
deleted file mode 100644
index b90c350..0000000
--- a/src/arch/dalvik/opcodes/nop.c
+++ /dev/null
@@ -1,66 +0,0 @@
-
-/* Chrysalide - Outil d'analyse de fichiers binaires
- * ret.c - décodage de l'instruction nulle
- *
- * Copyright (C) 2010-2012 Cyrille Bagard
- *
- * This file is part of Chrysalide.
- *
- * OpenIDA is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- *
- * OpenIDA is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Foobar. If not, see <http://www.gnu.org/licenses/>.
- */
-
-
-#include "opcodes.h"
-
-
-#include "../instruction.h"
-#include "../operand.h"
-
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'nop'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_nop(const bin_t *data, off_t *pos, off_t end, 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_NOP);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_10X))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- return result;
-
-}
diff --git a/src/arch/dalvik/opcodes/not.c b/src/arch/dalvik/opcodes/not.c
deleted file mode 100644
index 41ae2d4..0000000
--- a/src/arch/dalvik/opcodes/not.c
+++ /dev/null
@@ -1,107 +0,0 @@
-
-/* Chrysalide - Outil d'analyse de fichiers binaires
- * not.c - décodage des instructions de négations booléennes
- *
- * Copyright (C) 2012 Cyrille Bagard
- *
- * This file is part of Chrysalide.
- *
- * OpenIDA is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- *
- * OpenIDA is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Foobar. If not, see <http://www.gnu.org/licenses/>.
- */
-
-
-#include "opcodes.h"
-
-
-#include "../instruction.h"
-#include "../operand.h"
-
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'not-int'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_not_int(const bin_t *data, off_t *pos, off_t end, 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_NOT_INT);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_12X))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'not-long'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_not_long(const bin_t *data, off_t *pos, off_t end, 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_NOT_LONG);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_12X))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
diff --git a/src/arch/dalvik/opcodes/opcodes.h b/src/arch/dalvik/opcodes/opcodes.h
deleted file mode 100644
index 3f89970..0000000
--- a/src/arch/dalvik/opcodes/opcodes.h
+++ /dev/null
@@ -1,693 +0,0 @@
-
-/* Chrysalide - Outil d'analyse de fichiers binaires
- * opcodes.h - prototypes pour la liste de tous les opcodes de l'architecture Dalvik
- *
- * Copyright (C) 2010-2012 Cyrille Bagard
- *
- * This file is part of Chrysalide.
- *
- * OpenIDA is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- *
- * OpenIDA is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Foobar. If not, see <http://www.gnu.org/licenses/>.
- */
-
-
-#ifndef _ARCH_DALVIK_OPCODES_H
-#define _ARCH_DALVIK_OPCODES_H
-
-
-#include "../instruction.h"
-#include "../processor.h"
-#include "../../../format/dex/dex.h"
-
-
-
-/* Prototype de décodage d'une instruction Dalvik. */
-typedef GArchInstruction * (* dalvik_read_instr) (const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* 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 *);
-
-/* Décode une instruction de type 'add-int/2addr'. */
-GArchInstruction *dalvik_read_instr_add_int_2addr(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'add-int/lit8'. */
-GArchInstruction *dalvik_read_instr_add_int_lit8(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* 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 *);
-
-/* Décode une instruction de type 'aget'. */
-GArchInstruction *dalvik_read_instr_aget(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'aget-boolean'. */
-GArchInstruction *dalvik_read_instr_aget_boolean(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'aget-byte'. */
-GArchInstruction *dalvik_read_instr_aget_byte(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'aget-char'. */
-GArchInstruction *dalvik_read_instr_aget_char(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'aget-object'. */
-GArchInstruction *dalvik_read_instr_aget_object(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'aget-short'. */
-GArchInstruction *dalvik_read_instr_aget_short(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'aget-wide'. */
-GArchInstruction *dalvik_read_instr_aget_wide(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'and-int'. */
-GArchInstruction *dalvik_read_instr_and_int(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'and-int/2addr'. */
-GArchInstruction *dalvik_read_instr_and_int_2addr(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'and-int/lit8'. */
-GArchInstruction *dalvik_read_instr_and_int_lit8(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'and-int/lit16'. */
-GArchInstruction *dalvik_read_instr_and_int_lit16(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'and-long'. */
-GArchInstruction *dalvik_read_instr_and_long(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'and-long/2addr'. */
-GArchInstruction *dalvik_read_instr_and_long_2addr(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'aput'. */
-GArchInstruction *dalvik_read_instr_aput(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'aput-boolean'. */
-GArchInstruction *dalvik_read_instr_aput_boolean(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'aput-byte'. */
-GArchInstruction *dalvik_read_instr_aput_byte(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'aput-char'. */
-GArchInstruction *dalvik_read_instr_aput_char(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'aput-object'. */
-GArchInstruction *dalvik_read_instr_aput_object(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'aput-short'. */
-GArchInstruction *dalvik_read_instr_aput_short(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'aput-wide'. */
-GArchInstruction *dalvik_read_instr_aput_wide(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'array-length'. */
-GArchInstruction *dalvik_read_instr_array_length(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'check-cast'. */
-GArchInstruction *dalvik_read_instr_check_cast(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'cmp-long'. */
-GArchInstruction *dalvik_read_instr_cmp_long(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'cmpg-double'. */
-GArchInstruction *dalvik_read_instr_cmpg_double(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'cmpg-float'. */
-GArchInstruction *dalvik_read_instr_cmpg_float(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'cmpl-double'. */
-GArchInstruction *dalvik_read_instr_cmpl_double(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'cmpl-float'. */
-GArchInstruction *dalvik_read_instr_cmpl_float(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'const'. */
-GArchInstruction *dalvik_read_instr_const(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'const/16'. */
-GArchInstruction *dalvik_read_instr_const_16(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'const/4'. */
-GArchInstruction *dalvik_read_instr_const_4(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'const-class'. */
-GArchInstruction *dalvik_read_instr_const_class(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'const/high16'. */
-GArchInstruction *dalvik_read_instr_const_high16(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'const-string'. */
-GArchInstruction *dalvik_read_instr_const_string(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'const-string/jumbo'. */
-GArchInstruction *dalvik_read_instr_const_string_jumbo(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'const-wide'. */
-GArchInstruction *dalvik_read_instr_const_wide(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'const-wide/16'. */
-GArchInstruction *dalvik_read_instr_const_wide_16(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'const-wide/32'. */
-GArchInstruction *dalvik_read_instr_const_wide_32(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'const-wide/high16'. */
-GArchInstruction *dalvik_read_instr_const_wide_high16(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'div-double'. */
-GArchInstruction *dalvik_read_instr_div_double(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'div-double/2addr'. */
-GArchInstruction *dalvik_read_instr_div_double_2addr(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'div-float'. */
-GArchInstruction *dalvik_read_instr_div_float(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'div-float/2addr'. */
-GArchInstruction *dalvik_read_instr_div_float_2addr(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'div-int'. */
-GArchInstruction *dalvik_read_instr_div_int(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'div-int/2addr'. */
-GArchInstruction *dalvik_read_instr_div_int_2addr(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'div-int/lit8'. */
-GArchInstruction *dalvik_read_instr_div_int_lit8(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'div-int/lit16'. */
-GArchInstruction *dalvik_read_instr_div_int_lit16(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'div-long'. */
-GArchInstruction *dalvik_read_instr_div_long(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'div-long/2addr'. */
-GArchInstruction *dalvik_read_instr_div_long_2addr(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'fill-array-data'. */
-GArchInstruction *dalvik_read_instr_fill_array_data(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'filled-new-array'. */
-GArchInstruction *dalvik_read_instr_filled_new_array(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'filled-new-array/range'. */
-GArchInstruction *dalvik_read_instr_filled_new_array_range(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'goto'. */
-GArchInstruction *dalvik_read_instr_goto(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'goto/16'. */
-GArchInstruction *dalvik_read_instr_goto_16(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'goto/32'. */
-GArchInstruction *dalvik_read_instr_goto_32(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'if-eq'. */
-GArchInstruction *dalvik_read_instr_if_eq(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'if-eqz'. */
-GArchInstruction *dalvik_read_instr_if_eqz(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'if-ge'. */
-GArchInstruction *dalvik_read_instr_if_ge(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'if-gez'. */
-GArchInstruction *dalvik_read_instr_if_gez(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'if-gt'. */
-GArchInstruction *dalvik_read_instr_if_gt(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'if-gtz'. */
-GArchInstruction *dalvik_read_instr_if_gtz(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'if-le'. */
-GArchInstruction *dalvik_read_instr_if_le(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'if-lez'. */
-GArchInstruction *dalvik_read_instr_if_lez(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'if-lt'. */
-GArchInstruction *dalvik_read_instr_if_lt(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'if-ltz'. */
-GArchInstruction *dalvik_read_instr_if_ltz(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'if-ne'. */
-GArchInstruction *dalvik_read_instr_if_ne(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'if-nez'. */
-GArchInstruction *dalvik_read_instr_if_nez(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'iget'. */
-GArchInstruction *dalvik_read_instr_iget(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'iget-boolean'. */
-GArchInstruction *dalvik_read_instr_iget_boolean(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'iget-byte'. */
-GArchInstruction *dalvik_read_instr_iget_byte(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'iget-char'. */
-GArchInstruction *dalvik_read_instr_iget_char(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'iget-object'. */
-GArchInstruction *dalvik_read_instr_iget_object(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'iget-short'. */
-GArchInstruction *dalvik_read_instr_iget_short(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'iget-wide'. */
-GArchInstruction *dalvik_read_instr_iget_wide(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'instance-of'. */
-GArchInstruction *dalvik_read_instr_instance_of(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'invoke-direct'. */
-GArchInstruction *dalvik_read_instr_invoke_direct(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'invoke-direct/range'. */
-GArchInstruction *dalvik_read_instr_invoke_direct_range(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'invoke-interface'. */
-GArchInstruction *dalvik_read_instr_invoke_interface(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'invoke-interface/range'. */
-GArchInstruction *dalvik_read_instr_invoke_interface_range(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'invoke-static'. */
-GArchInstruction *dalvik_read_instr_invoke_static(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'invoke-static/range'. */
-GArchInstruction *dalvik_read_instr_invoke_static_range(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'invoke-super'. */
-GArchInstruction *dalvik_read_instr_invoke_super(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'invoke-super/range'. */
-GArchInstruction *dalvik_read_instr_invoke_super_range(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'invoke-virtual'. */
-GArchInstruction *dalvik_read_instr_invoke_virtual(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'invoke-virtual/range'. */
-GArchInstruction *dalvik_read_instr_invoke_virtual_range(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'iput'. */
-GArchInstruction *dalvik_read_instr_iput(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'iput-boolean'. */
-GArchInstruction *dalvik_read_instr_iput_boolean(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'iput-byte'. */
-GArchInstruction *dalvik_read_instr_iput_byte(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'iput-char'. */
-GArchInstruction *dalvik_read_instr_iput_char(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'iput-object'. */
-GArchInstruction *dalvik_read_instr_iput_object(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'iput-short'. */
-GArchInstruction *dalvik_read_instr_iput_short(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'iput-wide'. */
-GArchInstruction *dalvik_read_instr_iput_wide(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'monitor-enter'. */
-GArchInstruction *dalvik_read_instr_monitor_enter(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'monitor-exit'. */
-GArchInstruction *dalvik_read_instr_monitor_exit(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'move'. */
-GArchInstruction *dalvik_read_instr_move(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'move-exception'. */
-GArchInstruction *dalvik_read_instr_move_exception(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'move/16'. */
-GArchInstruction *dalvik_read_instr_move_16(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'move/from16'. */
-GArchInstruction *dalvik_read_instr_move_from_16(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'move-object'. */
-GArchInstruction *dalvik_read_instr_move_object(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'move-object/16'. */
-GArchInstruction *dalvik_read_instr_move_object_16(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'move-object/from16'. */
-GArchInstruction *dalvik_read_instr_move_object_from_16(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'move-result'. */
-GArchInstruction *dalvik_read_instr_move_result(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'move-result-object'. */
-GArchInstruction *dalvik_read_instr_move_result_object(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'move-result-wide'. */
-GArchInstruction *dalvik_read_instr_move_result_wide(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'move-wide'. */
-GArchInstruction *dalvik_read_instr_move_wide(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'move-wide/16'. */
-GArchInstruction *dalvik_read_instr_move_wide_16(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'move-wide/from16'. */
-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 *);
-
-/* 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-int'. */
-GArchInstruction *dalvik_read_instr_mul_int(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'mul-int/2addr'. */
-GArchInstruction *dalvik_read_instr_mul_int_2addr(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'mul-int/lit8'. */
-GArchInstruction *dalvik_read_instr_mul_int_lit8(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* 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-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 'neg-double'. */
-GArchInstruction *dalvik_read_instr_neg_double(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'neg-float'. */
-GArchInstruction *dalvik_read_instr_neg_float(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'neg-int'. */
-GArchInstruction *dalvik_read_instr_neg_int(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'neg-long'. */
-GArchInstruction *dalvik_read_instr_neg_long(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'new-array'. */
-GArchInstruction *dalvik_read_instr_new_array(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'new-instance'. */
-GArchInstruction *dalvik_read_instr_new_instance(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'nop'. */
-GArchInstruction *dalvik_read_instr_nop(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'not-int'. */
-GArchInstruction *dalvik_read_instr_not_int(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'not-long'. */
-GArchInstruction *dalvik_read_instr_not_long(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'or-int'. */
-GArchInstruction *dalvik_read_instr_or_int(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'or-int/2addr'. */
-GArchInstruction *dalvik_read_instr_or_int_2addr(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'or-int/lit8'. */
-GArchInstruction *dalvik_read_instr_or_int_lit8(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'or-int/lit16'. */
-GArchInstruction *dalvik_read_instr_or_int_lit16(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'or-long'. */
-GArchInstruction *dalvik_read_instr_or_long(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'or-long/2addr'. */
-GArchInstruction *dalvik_read_instr_or_long_2addr(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'packed-switch'. */
-GArchInstruction *dalvik_read_instr_packed_switch(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'rem-double'. */
-GArchInstruction *dalvik_read_instr_rem_double(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'rem-double/2addr'. */
-GArchInstruction *dalvik_read_instr_rem_double_2addr(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'rem-float'. */
-GArchInstruction *dalvik_read_instr_rem_float(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'rem-float/2addr'. */
-GArchInstruction *dalvik_read_instr_rem_float_2addr(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'rem-int'. */
-GArchInstruction *dalvik_read_instr_rem_int(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'rem-int/2addr'. */
-GArchInstruction *dalvik_read_instr_rem_int_2addr(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'rem-int/lit8'. */
-GArchInstruction *dalvik_read_instr_rem_int_lit8(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'rem-int/lit16'. */
-GArchInstruction *dalvik_read_instr_rem_int_lit16(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'rem-long'. */
-GArchInstruction *dalvik_read_instr_rem_long(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'rem-long/2addr'. */
-GArchInstruction *dalvik_read_instr_rem_long_2addr(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'rsub-int'. */
-GArchInstruction *dalvik_read_instr_rsub_int(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'rsub-int/lit8'. */
-GArchInstruction *dalvik_read_instr_rsub_int_lit8(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'return'. */
-GArchInstruction *dalvik_read_instr_return(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'return-object'. */
-GArchInstruction *dalvik_read_instr_return_object(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'return-void'. */
-GArchInstruction *dalvik_read_instr_return_void(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'return-wide'. */
-GArchInstruction *dalvik_read_instr_return_wide(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'sget'. */
-GArchInstruction *dalvik_read_instr_sget(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'sget-boolean'. */
-GArchInstruction *dalvik_read_instr_sget_boolean(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'sget-byte'. */
-GArchInstruction *dalvik_read_instr_sget_byte(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'sget-char'. */
-GArchInstruction *dalvik_read_instr_sget_char(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'sget-object'. */
-GArchInstruction *dalvik_read_instr_sget_object(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'sget-short'. */
-GArchInstruction *dalvik_read_instr_sget_short(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'sget-wide'. */
-GArchInstruction *dalvik_read_instr_sget_wide(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'shl-int'. */
-GArchInstruction *dalvik_read_instr_shl_int(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'shl-int/2addr'. */
-GArchInstruction *dalvik_read_instr_shl_int_2addr(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'shl-int/lit8'. */
-GArchInstruction *dalvik_read_instr_shl_int_lit8(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'shl-long'. */
-GArchInstruction *dalvik_read_instr_shl_long(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'shl-long/2addr'. */
-GArchInstruction *dalvik_read_instr_shl_long_2addr(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'shr-int'. */
-GArchInstruction *dalvik_read_instr_shr_int(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'shr-int/2addr'. */
-GArchInstruction *dalvik_read_instr_shr_int_2addr(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'shr-int/lit8'. */
-GArchInstruction *dalvik_read_instr_shr_int_lit8(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'shr-long'. */
-GArchInstruction *dalvik_read_instr_shr_long(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'shr-long/2addr'. */
-GArchInstruction *dalvik_read_instr_shr_long_2addr(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'sparse-switch'. */
-GArchInstruction *dalvik_read_instr_sparse_switch(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'sput'. */
-GArchInstruction *dalvik_read_instr_sput(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'sput-boolean'. */
-GArchInstruction *dalvik_read_instr_sput_boolean(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'sput-byte'. */
-GArchInstruction *dalvik_read_instr_sput_byte(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'sput-char'. */
-GArchInstruction *dalvik_read_instr_sput_char(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'sput-object'. */
-GArchInstruction *dalvik_read_instr_sput_object(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'sput-short'. */
-GArchInstruction *dalvik_read_instr_sput_short(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'sput-wide'. */
-GArchInstruction *dalvik_read_instr_sput_wide(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* 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-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-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-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'. */
-GArchInstruction *dalvik_read_instr_to_int_byte(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'int-to-char'. */
-GArchInstruction *dalvik_read_instr_to_int_char(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'int-to-double'. */
-GArchInstruction *dalvik_read_instr_to_int_double(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'int-to-float'. */
-GArchInstruction *dalvik_read_instr_to_int_float(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'int-to-long'. */
-GArchInstruction *dalvik_read_instr_to_int_long(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'int-to-short'. */
-GArchInstruction *dalvik_read_instr_to_int_short(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'double-to-float'. */
-GArchInstruction *dalvik_read_instr_to_double_float(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'double-to-int'. */
-GArchInstruction *dalvik_read_instr_to_double_int(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'double-to-long'. */
-GArchInstruction *dalvik_read_instr_to_double_long(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'float-to-double'. */
-GArchInstruction *dalvik_read_instr_to_float_double(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'float-to-int'. */
-GArchInstruction *dalvik_read_instr_to_float_int(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'float-to-long'. */
-GArchInstruction *dalvik_read_instr_to_float_long(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'long-to-double'. */
-GArchInstruction *dalvik_read_instr_to_long_double(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'long-to-float'. */
-GArchInstruction *dalvik_read_instr_to_long_float(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'long-to-int'. */
-GArchInstruction *dalvik_read_instr_to_long_int(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'throw'. */
-GArchInstruction *dalvik_read_instr_throw(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'ushr-int'. */
-GArchInstruction *dalvik_read_instr_ushr_int(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'ushr-int/2addr'. */
-GArchInstruction *dalvik_read_instr_ushr_int_2addr(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'ushr-int/lit8'. */
-GArchInstruction *dalvik_read_instr_ushr_int_lit8(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'ushr-long'. */
-GArchInstruction *dalvik_read_instr_ushr_long(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'ushr-long/2addr'. */
-GArchInstruction *dalvik_read_instr_ushr_long_2addr(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'xor-int'. */
-GArchInstruction *dalvik_read_instr_xor_int(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'xor-int/2addr'. */
-GArchInstruction *dalvik_read_instr_xor_int_2addr(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'xor-int/lit8'. */
-GArchInstruction *dalvik_read_instr_xor_int_lit8(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'xor-int/lit16'. */
-GArchInstruction *dalvik_read_instr_xor_int_lit16(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'xor-long'. */
-GArchInstruction *dalvik_read_instr_xor_long(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-/* Décode une instruction de type 'xor-long/2addr'. */
-GArchInstruction *dalvik_read_instr_xor_long_2addr(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
-
-
-
-#endif /* _ARCH_DALVIK_OPCODES_H */
diff --git a/src/arch/dalvik/opcodes/or.c b/src/arch/dalvik/opcodes/or.c
deleted file mode 100644
index 8904f48..0000000
--- a/src/arch/dalvik/opcodes/or.c
+++ /dev/null
@@ -1,263 +0,0 @@
-
-/* Chrysalide - Outil d'analyse de fichiers binaires
- * or.c - décodage des opérations de OU logiques
- *
- * Copyright (C) 2010-2012 Cyrille Bagard
- *
- * This file is part of Chrysalide.
- *
- * OpenIDA is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- *
- * OpenIDA is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Foobar. If not, see <http://www.gnu.org/licenses/>.
- */
-
-
-#include "opcodes.h"
-
-
-#include "../instruction.h"
-#include "../operand.h"
-
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'or-int'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_or_int(const bin_t *data, off_t *pos, off_t end, 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_OR_INT);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_23X))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'or-int/2addr'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_or_int_2addr(const bin_t *data, off_t *pos, off_t end, 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_OR_INT_2ADDR);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_12X))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'or-int/lit8'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_or_int_lit8(const bin_t *data, off_t *pos, off_t end, 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_OR_INT_LIT8);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_22B))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'or-int/lit16'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_or_int_lit16(const bin_t *data, off_t *pos, off_t end, 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_OR_INT_LIT16);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_22S))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'or-long'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_or_long(const bin_t *data, off_t *pos, off_t end, 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_OR_LONG);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_23X))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'or-long/2addr'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_or_long_2addr(const bin_t *data, off_t *pos, off_t end, 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_OR_LONG_2ADDR);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_12X))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
diff --git a/src/arch/dalvik/opcodes/rem.c b/src/arch/dalvik/opcodes/rem.c
deleted file mode 100644
index 0ba12de..0000000
--- a/src/arch/dalvik/opcodes/rem.c
+++ /dev/null
@@ -1,419 +0,0 @@
-
-/* Chrysalide - Outil d'analyse de fichiers binaires
- * rem.c - décodage des opérations de restes de division
- *
- * Copyright (C) 2010-2012 Cyrille Bagard
- *
- * This file is part of Chrysalide.
- *
- * OpenIDA is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- *
- * OpenIDA is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Foobar. If not, see <http://www.gnu.org/licenses/>.
- */
-
-
-#include "opcodes.h"
-
-
-#include "../instruction.h"
-#include "../operand.h"
-
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'rem-double'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_rem_double(const bin_t *data, off_t *pos, off_t end, 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_REM_DOUBLE);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_23X))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'rem-double/2addr'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_rem_double_2addr(const bin_t *data, off_t *pos, off_t end, 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_REM_DOUBLE_2ADDR);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_12X))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'rem-float'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_rem_float(const bin_t *data, off_t *pos, off_t end, 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_REM_FLOAT);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_23X))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'rem-float/2addr'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_rem_float_2addr(const bin_t *data, off_t *pos, off_t end, 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_REM_FLOAT_2ADDR);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_12X))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'rem-int'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_rem_int(const bin_t *data, off_t *pos, off_t end, 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_REM_INT);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_23X))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'rem-int/2addr'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_rem_int_2addr(const bin_t *data, off_t *pos, off_t end, 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_REM_INT_2ADDR);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_12X))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'rem-int/lit8'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_rem_int_lit8(const bin_t *data, off_t *pos, off_t end, 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_REM_INT_LIT8);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_22B))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'rem-int/lit16'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_rem_int_lit16(const bin_t *data, off_t *pos, off_t end, 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_REM_INT_LIT16);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_22S))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'rem-long'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_rem_long(const bin_t *data, off_t *pos, off_t end, 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_REM_LONG);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_23X))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'rem-long/2addr'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_rem_long_2addr(const bin_t *data, off_t *pos, off_t end, 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_REM_LONG_2ADDR);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_12X))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
diff --git a/src/arch/dalvik/opcodes/ret.c b/src/arch/dalvik/opcodes/ret.c
deleted file mode 100644
index 7e53ada..0000000
--- a/src/arch/dalvik/opcodes/ret.c
+++ /dev/null
@@ -1,177 +0,0 @@
-
-/* Chrysalide - Outil d'analyse de fichiers binaires
- * ret.c - décodage des ordres de retour
- *
- * Copyright (C) 2010-2012 Cyrille Bagard
- *
- * This file is part of Chrysalide.
- *
- * OpenIDA is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- *
- * OpenIDA is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Foobar. If not, see <http://www.gnu.org/licenses/>.
- */
-
-
-#include "opcodes.h"
-
-
-#include "../instruction.h"
-#include "../operand.h"
-
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'return'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_return(const bin_t *data, off_t *pos, off_t end, 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_RETURN);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_11X))
- {
- 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] *
-* end = limite 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 'return-object'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_return_object(const bin_t *data, off_t *pos, off_t end, 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_RETURN_OBJECT);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_11X))
- {
- 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] *
-* end = limite 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 'return-void'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_return_void(const bin_t *data, off_t *pos, off_t end, 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_RETURN_VOID);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_10X))
- {
- 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] *
-* end = limite 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 'return-wide'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_return_wide(const bin_t *data, off_t *pos, off_t end, 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_RETURN_WIDE);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_11X))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- return result;
-
-}
diff --git a/src/arch/dalvik/opcodes/rsub.c b/src/arch/dalvik/opcodes/rsub.c
deleted file mode 100644
index 9ee9331..0000000
--- a/src/arch/dalvik/opcodes/rsub.c
+++ /dev/null
@@ -1,107 +0,0 @@
-
-/* Chrysalide - Outil d'analyse de fichiers binaires
- * rsub.c - décodage des opérations de soustractions inverses
- *
- * Copyright (C) 2010-2012 Cyrille Bagard
- *
- * This file is part of Chrysalide.
- *
- * OpenIDA is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- *
- * OpenIDA is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Foobar. If not, see <http://www.gnu.org/licenses/>.
- */
-
-
-#include "opcodes.h"
-
-
-#include "../instruction.h"
-#include "../operand.h"
-
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'rsub-int'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_rsub_int(const bin_t *data, off_t *pos, off_t end, 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_RSUB_INT);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_22S))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'rsub-int/lit8'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_rsub_int_lit8(const bin_t *data, off_t *pos, off_t end, 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_RSUB_INT_LIT8);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_22B))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
diff --git a/src/arch/dalvik/opcodes/sget.c b/src/arch/dalvik/opcodes/sget.c
deleted file mode 100644
index bc1aca0..0000000
--- a/src/arch/dalvik/opcodes/sget.c
+++ /dev/null
@@ -1,302 +0,0 @@
-
-/* Chrysalide - Outil d'analyse de fichiers binaires
- * sget.c - décodage des instructions manipulant des champs statiques (chargement)
- *
- * Copyright (C) 2010-2012 Cyrille Bagard
- *
- * This file is part of Chrysalide.
- *
- * OpenIDA is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- *
- * OpenIDA is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Foobar. If not, see <http://www.gnu.org/licenses/>.
- */
-
-
-#include "opcodes.h"
-
-
-#include "../instruction.h"
-#include "../operand.h"
-
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'sget'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_sget(const bin_t *data, off_t *pos, off_t end, 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_SGET);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_21C | DALVIK_OP_POOL(DPT_FIELD)))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'sget-boolean'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_sget_boolean(const bin_t *data, off_t *pos, off_t end, 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_SGET_BOOLEAN);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_21C | DALVIK_OP_POOL(DPT_FIELD)))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'sget-byte'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_sget_byte(const bin_t *data, off_t *pos, off_t end, 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_SGET_BYTE);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_21C | DALVIK_OP_POOL(DPT_FIELD)))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'sget-char'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_sget_char(const bin_t *data, off_t *pos, off_t end, 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_SGET_CHAR);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_21C | DALVIK_OP_POOL(DPT_FIELD)))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'sget-object'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_sget_object(const bin_t *data, off_t *pos, off_t end, 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_SGET_OBJECT);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_21C | DALVIK_OP_POOL(DPT_FIELD)))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'sget-short'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_sget_short(const bin_t *data, off_t *pos, off_t end, 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_SGET_SHORT);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_21C | DALVIK_OP_POOL(DPT_FIELD)))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'sget-wide'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_sget_wide(const bin_t *data, off_t *pos, off_t end, 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_SGET_WIDE);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_21C | DALVIK_OP_POOL(DPT_FIELD)))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
diff --git a/src/arch/dalvik/opcodes/shl.c b/src/arch/dalvik/opcodes/shl.c
deleted file mode 100644
index 3ee88b8..0000000
--- a/src/arch/dalvik/opcodes/shl.c
+++ /dev/null
@@ -1,224 +0,0 @@
-
-/* Chrysalide - Outil d'analyse de fichiers binaires
- * shl.c - décodage des opérations de décalage à gauche
- *
- * Copyright (C) 2011-2012 Cyrille Bagard
- *
- * This file is part of Chrysalide.
- *
- * OpenIDA is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- *
- * OpenIDA is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Foobar. If not, see <http://www.gnu.org/licenses/>.
- */
-
-
-#include "opcodes.h"
-
-
-#include "../instruction.h"
-#include "../operand.h"
-
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'shl-int'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_shl_int(const bin_t *data, off_t *pos, off_t end, 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_SHL_INT);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_23X))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'shl-int/2addr'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_shl_int_2addr(const bin_t *data, off_t *pos, off_t end, 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_SHL_INT_2ADDR);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_12X))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'shl-int/lit8'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_shl_int_lit8(const bin_t *data, off_t *pos, off_t end, 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_SHL_INT_LIT8);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_22B))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'shl-long'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_shl_long(const bin_t *data, off_t *pos, off_t end, 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_SHL_LONG);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_23X))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'shl-long/2addr'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_shl_long_2addr(const bin_t *data, off_t *pos, off_t end, 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_SHL_LONG_2ADDR);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_12X))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
diff --git a/src/arch/dalvik/opcodes/shr.c b/src/arch/dalvik/opcodes/shr.c
deleted file mode 100644
index 1656164..0000000
--- a/src/arch/dalvik/opcodes/shr.c
+++ /dev/null
@@ -1,224 +0,0 @@
-
-/* Chrysalide - Outil d'analyse de fichiers binaires
- * shr.c - décodage des opérations de décalage à droite signé
- *
- * Copyright (C) 2011-2012 Cyrille Bagard
- *
- * This file is part of Chrysalide.
- *
- * OpenIDA is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- *
- * OpenIDA is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Foobar. If not, see <http://www.gnu.org/licenses/>.
- */
-
-
-#include "opcodes.h"
-
-
-#include "../instruction.h"
-#include "../operand.h"
-
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'shr-int'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_shr_int(const bin_t *data, off_t *pos, off_t end, 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_SHR_INT);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_23X))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'shr-int/2addr'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_shr_int_2addr(const bin_t *data, off_t *pos, off_t end, 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_SHR_INT_2ADDR);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_12X))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'shr-int/lit8'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_shr_int_lit8(const bin_t *data, off_t *pos, off_t end, 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_SHR_INT_LIT8);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_22B))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'shr-long'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_shr_long(const bin_t *data, off_t *pos, off_t end, 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_SHR_LONG);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_23X))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'shr-long/2addr'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_shr_long_2addr(const bin_t *data, off_t *pos, off_t end, 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_SHR_LONG_2ADDR);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_12X))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
diff --git a/src/arch/dalvik/opcodes/sput.c b/src/arch/dalvik/opcodes/sput.c
deleted file mode 100644
index 281df25..0000000
--- a/src/arch/dalvik/opcodes/sput.c
+++ /dev/null
@@ -1,288 +0,0 @@
-
-/* Chrysalide - Outil d'analyse de fichiers binaires
- * sput.c - décodage des instructions manipulant des champs statiques (enregistrement)
- *
- * Copyright (C) 2010-2012 Cyrille Bagard
- *
- * This file is part of Chrysalide.
- *
- * OpenIDA is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- *
- * OpenIDA is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Foobar. If not, see <http://www.gnu.org/licenses/>.
- */
-
-
-#include "opcodes.h"
-
-
-#include "../instruction.h"
-#include "../operand.h"
-
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'sput'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_sput(const bin_t *data, off_t *pos, off_t end, 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_SPUT);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_21C | DALVIK_OP_POOL(DPT_FIELD)))
- {
- 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] *
-* end = limite 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 'sput-boolean'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_sput_boolean(const bin_t *data, off_t *pos, off_t end, 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_SPUT_BOOLEAN);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_21C | DALVIK_OP_POOL(DPT_FIELD)))
- {
- 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] *
-* end = limite 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 'sput-byte'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_sput_byte(const bin_t *data, off_t *pos, off_t end, 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_SPUT_BYTE);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_21C | DALVIK_OP_POOL(DPT_FIELD)))
- {
- 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] *
-* end = limite 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 'sput-char'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_sput_char(const bin_t *data, off_t *pos, off_t end, 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_SPUT_CHAR);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_21C | DALVIK_OP_POOL(DPT_FIELD)))
- {
- 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] *
-* end = limite 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 'sput-object'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_sput_object(const bin_t *data, off_t *pos, off_t end, 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_SPUT_OBJECT);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_21C | DALVIK_OP_POOL(DPT_FIELD)))
- {
- 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] *
-* end = limite 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 'sput-short'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_sput_short(const bin_t *data, off_t *pos, off_t end, 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_SPUT_SHORT);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_21C | DALVIK_OP_POOL(DPT_FIELD)))
- {
- 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] *
-* end = limite 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 'sput-wide'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_sput_wide(const bin_t *data, off_t *pos, off_t end, 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_SPUT_WIDE);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_21C | DALVIK_OP_POOL(DPT_FIELD)))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- return result;
-
-}
diff --git a/src/arch/dalvik/opcodes/sub.c b/src/arch/dalvik/opcodes/sub.c
deleted file mode 100644
index 98af25e..0000000
--- a/src/arch/dalvik/opcodes/sub.c
+++ /dev/null
@@ -1,341 +0,0 @@
-
-/* Chrysalide - Outil d'analyse de fichiers binaires
- * sub.c - décodage des opérations de soustraction
- *
- * Copyright (C) 2010-2012 Cyrille Bagard
- *
- * This file is part of Chrysalide.
- *
- * OpenIDA is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- *
- * OpenIDA is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Foobar. If not, see <http://www.gnu.org/licenses/>.
- */
-
-
-#include "opcodes.h"
-
-
-#include "../instruction.h"
-#include "../operand.h"
-
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_sub_double(const bin_t *data, off_t *pos, off_t end, 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, end, endian, DALVIK_OPT_23X))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 end, 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, end, endian, DALVIK_OPT_12X))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 end, 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, end, endian, DALVIK_OPT_23X))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 end, 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, end, endian, DALVIK_OPT_12X))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_sub_int(const bin_t *data, off_t *pos, off_t end, 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);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_23X))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 end, 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, end, endian, DALVIK_OPT_12X))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 end, 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, end, endian, DALVIK_OPT_23X))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 end, 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, end, endian, DALVIK_OPT_12X))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
diff --git a/src/arch/dalvik/opcodes/switch.c b/src/arch/dalvik/opcodes/switch.c
deleted file mode 100644
index 8b3c7a6..0000000
--- a/src/arch/dalvik/opcodes/switch.c
+++ /dev/null
@@ -1,103 +0,0 @@
-
-/* Chrysalide - Outil d'analyse de fichiers binaires
- * switch.c - décompilation des branchements multiples
- *
- * Copyright (C) 2011-2013 Cyrille Bagard
- *
- * This file is part of Chrysalide.
- *
- * OpenIDA is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- *
- * OpenIDA is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Foobar. If not, see <http://www.gnu.org/licenses/>.
- */
-
-
-#include "opcodes.h"
-
-
-#include "../instruction.h"
-#include "../operand.h"
-
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'packed-switch'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_packed_switch(const bin_t *data, off_t *pos, off_t end, 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_PACKED_SWITCH);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_31T))
- {
- 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] *
-* end = limite 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 'sparse-switch'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_sparse_switch(const bin_t *data, off_t *pos, off_t end, 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_SPARSE_SWITCH);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_31T))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- return result;
-
-}
diff --git a/src/arch/dalvik/opcodes/throw.c b/src/arch/dalvik/opcodes/throw.c
deleted file mode 100644
index 18602bc..0000000
--- a/src/arch/dalvik/opcodes/throw.c
+++ /dev/null
@@ -1,66 +0,0 @@
-
-/* Chrysalide - Outil d'analyse de fichiers binaires
- * monitor.c - décodage des opérations d'envoi d'exceptions
- *
- * Copyright (C) 2012 Cyrille Bagard
- *
- * This file is part of Chrysalide.
- *
- * OpenIDA is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- *
- * OpenIDA is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Foobar. If not, see <http://www.gnu.org/licenses/>.
- */
-
-
-#include "opcodes.h"
-
-
-#include "../instruction.h"
-#include "../operand.h"
-
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'throw'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_throw(const bin_t *data, off_t *pos, off_t end, 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_THROW);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_11X))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- return result;
-
-}
diff --git a/src/arch/dalvik/opcodes/to.c b/src/arch/dalvik/opcodes/to.c
deleted file mode 100644
index a8d3962..0000000
--- a/src/arch/dalvik/opcodes/to.c
+++ /dev/null
@@ -1,614 +0,0 @@
-
-/* Chrysalide - Outil d'analyse de fichiers binaires
- * to.c - décodage des instructions de conversions forcées
- *
- * Copyright (C) 2010-2012 Cyrille Bagard
- *
- * This file is part of Chrysalide.
- *
- * OpenIDA is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- *
- * OpenIDA is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Foobar. If not, see <http://www.gnu.org/licenses/>.
- */
-
-
-#include "opcodes.h"
-
-
-#include "../instruction.h"
-#include "../operand.h"
-
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'int-to-byte'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_to_int_byte(const bin_t *data, off_t *pos, off_t end, 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_TO_INT_BYTE);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_12X))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'int-to-char'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_to_int_char(const bin_t *data, off_t *pos, off_t end, 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_TO_INT_CHAR);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_12X))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'int-to-double'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_to_int_double(const bin_t *data, off_t *pos, off_t end, 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_TO_INT_DOUBLE);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_12X))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'int-to-float'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_to_int_float(const bin_t *data, off_t *pos, off_t end, 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_TO_INT_FLOAT);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_12X))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'int-to-long'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_to_int_long(const bin_t *data, off_t *pos, off_t end, 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_TO_INT_LONG);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_12X))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'int-to-short'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_to_int_short(const bin_t *data, off_t *pos, off_t end, 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_TO_INT_SHORT);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_12X))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'double-to-float'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_to_double_float(const bin_t *data, off_t *pos, off_t end, 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_TO_DOUBLE_FLOAT);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_12X))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'double-to-int'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_to_double_int(const bin_t *data, off_t *pos, off_t end, 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_TO_DOUBLE_INT);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_12X))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'double-to-long'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_to_double_long(const bin_t *data, off_t *pos, off_t end, 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_TO_DOUBLE_LONG);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_12X))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'float-to-double'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_to_float_double(const bin_t *data, off_t *pos, off_t end, 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_TO_FLOAT_DOUBLE);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_12X))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'float-to-int'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_to_float_int(const bin_t *data, off_t *pos, off_t end, 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_TO_FLOAT_INT);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_12X))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'float-to-long'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_to_float_long(const bin_t *data, off_t *pos, off_t end, 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_TO_FLOAT_LONG);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_12X))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'long-to-double'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_to_long_double(const bin_t *data, off_t *pos, off_t end, 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_TO_LONG_DOUBLE);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_12X))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'long-to-float'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_to_long_float(const bin_t *data, off_t *pos, off_t end, 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_TO_LONG_FLOAT);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_12X))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'long-to-int'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_to_long_int(const bin_t *data, off_t *pos, off_t end, 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_TO_LONG_INT);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_12X))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
diff --git a/src/arch/dalvik/opcodes/ushr.c b/src/arch/dalvik/opcodes/ushr.c
deleted file mode 100644
index ed377de..0000000
--- a/src/arch/dalvik/opcodes/ushr.c
+++ /dev/null
@@ -1,224 +0,0 @@
-
-/* Chrysalide - Outil d'analyse de fichiers binaires
- * ushr.c - décodage des opérations de décalage à droite non signé
- *
- * Copyright (C) 2011-2012 Cyrille Bagard
- *
- * This file is part of Chrysalide.
- *
- * OpenIDA is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- *
- * OpenIDA is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Foobar. If not, see <http://www.gnu.org/licenses/>.
- */
-
-
-#include "opcodes.h"
-
-
-#include "../instruction.h"
-#include "../operand.h"
-
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'ushr-int'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_ushr_int(const bin_t *data, off_t *pos, off_t end, 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_USHR_INT);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_23X))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'ushr-int/2addr'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_ushr_int_2addr(const bin_t *data, off_t *pos, off_t end, 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_USHR_INT_2ADDR);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_12X))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'ushr-int/lit8'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_ushr_int_lit8(const bin_t *data, off_t *pos, off_t end, 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_USHR_INT_LIT8);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_22B))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'ushr-long'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_ushr_long(const bin_t *data, off_t *pos, off_t end, 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_USHR_LONG);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_23X))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'ushr-long/2addr'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_ushr_long_2addr(const bin_t *data, off_t *pos, off_t end, 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_USHR_LONG_2ADDR);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_12X))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
diff --git a/src/arch/dalvik/opcodes/xor.c b/src/arch/dalvik/opcodes/xor.c
deleted file mode 100644
index bf41560..0000000
--- a/src/arch/dalvik/opcodes/xor.c
+++ /dev/null
@@ -1,263 +0,0 @@
-
-/* Chrysalide - Outil d'analyse de fichiers binaires
- * xor.c - décodage des opérations de OU exclusifs et logiques
- *
- * Copyright (C) 2010-2012 Cyrille Bagard
- *
- * This file is part of Chrysalide.
- *
- * OpenIDA is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- *
- * OpenIDA is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Foobar. If not, see <http://www.gnu.org/licenses/>.
- */
-
-
-#include "opcodes.h"
-
-
-#include "../instruction.h"
-#include "../operand.h"
-
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'xor-int'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_xor_int(const bin_t *data, off_t *pos, off_t end, 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_XOR_INT);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_23X))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'xor-int/2addr'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_xor_int_2addr(const bin_t *data, off_t *pos, off_t end, 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_XOR_INT_2ADDR);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_12X))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'xor-int/lit8'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_xor_int_lit8(const bin_t *data, off_t *pos, off_t end, 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_XOR_INT_LIT8);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_22B))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'xor-int/lit16'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_xor_int_lit16(const bin_t *data, off_t *pos, off_t end, 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_XOR_INT_LIT16);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_22S))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'xor-long'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_xor_long(const bin_t *data, off_t *pos, off_t end, 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_XOR_LONG);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_23X))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* end = limite 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 'xor-long/2addr'. *
-* *
-* Retour : Instruction mise en place ou NULL. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchInstruction *dalvik_read_instr_xor_long_2addr(const bin_t *data, off_t *pos, off_t end, 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_XOR_LONG_2ADDR);
-
- endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
-
- if (!dalvik_read_operands(result, fmt, data, pos, end, endian, DALVIK_OPT_12X))
- {
- g_object_unref(G_OBJECT(result));
- return NULL;
- }
-
- dalvik_mark_first_operand_as_written(result);
-
- return result;
-
-}