summaryrefslogtreecommitdiff
path: root/src/arch/processor.c
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2015-02-09 20:15:52 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2015-02-09 20:15:52 (GMT)
commit8d326041a0379b87e54be44506d544367567e89b (patch)
treea3c3555c27c30858155fbee4df0ca236f33774f8 /src/arch/processor.c
parentb70f428256963385a140e9eb503624106df5aa9b (diff)
Registered all the supported processors in the system code.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@467 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/arch/processor.c')
-rw-r--r--src/arch/processor.c114
1 files changed, 0 insertions, 114 deletions
diff --git a/src/arch/processor.c b/src/arch/processor.c
index 2e678f6..0b33552 100644
--- a/src/arch/processor.c
+++ b/src/arch/processor.c
@@ -42,11 +42,6 @@
#include "artificial.h"
-#include "arm/processor.h"
-#include "dalvik/processor.h"
-#include "jvm/processor.h"
-#include "mips/processor.h"
-#include "x86/processor.h"
@@ -62,12 +57,6 @@ static void g_arch_processor_init(GArchProcessor *);
-/* ------------------------ ARCHITECTURES DANS LEUR ENSEMBLE ------------------------ */
-
-
-static GArchProcessor *_processors_list[APT_COUNT];
-
-
@@ -305,106 +294,3 @@ GArchInstruction *g_arch_processor_disassemble(const GArchProcessor *proc, GProc
return result;
}
-
-
-
-
-
-
-
-/* ---------------------------------------------------------------------------------- */
-/* ARCHITECTURES DANS LEUR ENSEMBLE */
-/* ---------------------------------------------------------------------------------- */
-
-
-/******************************************************************************
-* *
-* Paramètres : - *
-* *
-* Description : Procède au chargement des différentes architectures. *
-* *
-* Retour : Toujours true. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-bool init_all_processors(void)
-{
- _processors_list[APT_ARM] = g_armv7_processor_new();
- _processors_list[APT_DALVIK] = g_dalvik_processor_new();
- //_processors_list[APT_JVM] = g_jvm_processor_new();
- //_processors_list[APT_MIPS] = g_mips_processor_new();
- //_processors_list[APT_386] = g_x86_processor_new();
-
- return true;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : type = sorte de processeur recherché. *
-* *
-* Description : Fournit le processeur d'architecture correspondant à un type.*
-* *
-* Retour : Processeur d'architecture trouvé. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchProcessor *get_arch_processor_for_type(ArchProcessorType type)
-{
- return _processors_list[type];
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : format = exécutable d'origine. *
-* *
-* Description : Fournit le processeur d'architecture lié à un format. *
-* *
-* Retour : Processeur d'architecture trouvé. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchProcessor *get_arch_processor_from_format(const GExeFormat *format)
-{
- GArchProcessor *result; /* Conversion à retourner */
-
- switch (g_exe_format_get_target_machine(format))
- {
- case FTM_ARM:
- result = get_arch_processor_for_type(APT_ARM);
- break;
-
- case FTM_DALVIK:
- result = get_arch_processor_for_type(APT_DALVIK);
- break;
-
- case FTM_JVM:
- result = get_arch_processor_for_type(APT_JVM);
- break;
-
- case FTM_MIPS:
- result = get_arch_processor_for_type(APT_MIPS);
- break;
-
- case FTM_386:
- result = get_arch_processor_for_type(APT_386);
- break;
-
- default:
- result = NULL;
- break;
-
- }
-
- return result;
-
-}