summaryrefslogtreecommitdiff
path: root/src/arch/arm/v456/operands
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/arm/v456/operands')
-rw-r--r--src/arch/arm/v456/operands/Makefile.am16
-rw-r--r--src/arch/arm/v456/operands/content.c257
-rw-r--r--src/arch/arm/v456/operands/content.h70
-rw-r--r--src/arch/arm/v456/operands/register.c232
-rw-r--r--src/arch/arm/v456/operands/register.h69
5 files changed, 0 insertions, 644 deletions
diff --git a/src/arch/arm/v456/operands/Makefile.am b/src/arch/arm/v456/operands/Makefile.am
deleted file mode 100644
index 1179c99..0000000
--- a/src/arch/arm/v456/operands/Makefile.am
+++ /dev/null
@@ -1,16 +0,0 @@
-
-noinst_LTLIBRARIES = libarcharmv456operands.la
-
-libarcharmv456operands_la_SOURCES = \
- content.h content.c \
- register.h register.c
-
-libarcharmv456_la_CFLAGS = $(AM_CFLAGS)
-
-
-AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS)
-
-AM_CFLAGS = $(DEBUG_CFLAGS) $(WARNING_FLAGS) $(COMPLIANCE_FLAGS)
-
-
-SUBDIRS =
diff --git a/src/arch/arm/v456/operands/content.c b/src/arch/arm/v456/operands/content.c
deleted file mode 100644
index 105b74d..0000000
--- a/src/arch/arm/v456/operands/content.c
+++ /dev/null
@@ -1,257 +0,0 @@
-
-/* Chrysalide - Outil d'analyse de fichiers binaires
- * content.c - opérandes visant un registre ARM v4/5/6
- *
- * Copyright (C) 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 "content.h"
-
-
-#include "../../../operand-int.h"
-
-
-
-/* Définition d'un opérande visant un registre ARM v4/5/6 (instance) */
-struct _GArmV456ContentOperand
-{
- GArchOperand parent; /* Instance parente */
-
- GArmV456Register *reg; /* Registre représenté */
- GImmOperand *offset; /* Décallage à appliquer */
-
- bool add; /* Mise à jour du registre ? */
-
- bool is_written; /* Changement de contenu */
-
-};
-
-
-/* Définition d'un opérande visant un registre ARM v4/5/6 (classe) */
-struct _GArmV456ContentOperandClass
-{
- GArchOperandClass parent; /* Classe parente */
-
-};
-
-
-/* Initialise la classe des opérandes de registre ARM v4/5/6. */
-static void g_armv456_content_operand_class_init(GArmV456ContentOperandClass *);
-
-/* Initialise une instance d'opérande de registre ARM v4/5/6. */
-static void g_armv456_content_operand_init(GArmV456ContentOperand *);
-
-/* Compare un opérande avec un autre. */
-static bool g_armv456_content_operand_compare(const GArmV456ContentOperand *, const GArmV456ContentOperand *);
-
-/* Traduit un opérande en version humainement lisible. */
-static void g_armv456_content_operand_print(const GArmV456ContentOperand *, GBufferLine *, AsmSyntax);
-
-
-
-/* Indique le type défini par la GLib pour un opérande de registre ARM v4/5/6. */
-G_DEFINE_TYPE(GArmV456ContentOperand, g_armv456_content_operand, G_TYPE_ARCH_OPERAND);
-
-
-/******************************************************************************
-* *
-* Paramètres : klass = classe à initialiser. *
-* *
-* Description : Initialise la classe des opérandes de registre ARM v4/5/6. *
-* *
-* Retour : - *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-static void g_armv456_content_operand_class_init(GArmV456ContentOperandClass *klass)
-{
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : operand = instance à initialiser. *
-* *
-* Description : Initialise une instance d'opérande de registre ARM v4/5/6. *
-* *
-* Retour : - *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-static void g_armv456_content_operand_init(GArmV456ContentOperand *operand)
-{
- GArchOperand *parent; /* Instance parente */
-
- parent = G_ARCH_OPERAND(operand);
-
- parent->compare = (operand_compare_fc)g_armv456_content_operand_compare;
- parent->print = (operand_print_fc)g_armv456_content_operand_print;
-
- operand->is_written = false;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : reg = registre déjà en place. *
-* offset = décallage à appliquer. *
-* add = sens du décallage. *
-* *
-* Description : Crée un opérande visant un registre ARM v4/5/6. *
-* *
-* Retour : Opérande mis en place. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchOperand *g_armv456_content_operand_new(GArmV456Register *reg, GImmOperand *offset, bool add)
-{
- GArmV456ContentOperand *result; /* Structure à retourner */
-
- result = g_object_new(G_TYPE_ARMV456_CONTENT_OPERAND, NULL);
-
- result->reg = reg;
- result->offset = offset;
-
- result->add = add;
-
- return G_ARCH_OPERAND(result);
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : operand = opérande représentant un registre. *
-* *
-* Description : Fournit le registre ARM v4/5/6 associé à l'opérande. *
-* *
-* Retour : Représentation interne du registre. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArmV456Register *g_armv456_content_operand_get(const GArmV456ContentOperand *operand)
-{
- return operand->reg;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : a = premier opérande à consulter. *
-* b = second opérande à consulter. *
-* *
-* Description : Compare un opérande avec un autre. *
-* *
-* Retour : Bilan de la comparaison. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-static bool g_armv456_content_operand_compare(const GArmV456ContentOperand *a, const GArmV456ContentOperand *b)
-{
- return false;//(g_armv456_content_compare(a->reg, b->reg) == 0);
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : operand = opérande à traiter. *
-* line = ligne tampon où imprimer l'opérande donné. *
-* syntax = type de représentation demandée. *
-* *
-* Description : Traduit un opérande en version humainement lisible. *
-* *
-* Retour : - *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-static void g_armv456_content_operand_print(const GArmV456ContentOperand *operand, GBufferLine *line, AsmSyntax syntax)
-{
- g_buffer_line_insert_text(line, BLC_ASSEMBLY, "[", 1, RTT_HOOK);
-
- g_armv456_register_print(operand->reg, line, syntax);
-
- if (!g_imm_operand_is_null(operand->offset))
- {
- g_buffer_line_insert_text(line, BLC_ASSEMBLY, ",", 1, RTT_PUNCT);
- g_buffer_line_insert_text(line, BLC_ASSEMBLY, " ", 1, RTT_RAW);
-
- if (!operand->add)
- g_buffer_line_insert_text(line, BLC_ASSEMBLY, "-", 1, RTT_SIGNS);
-
- g_arch_operand_print(G_ARCH_OPERAND(operand->offset), line, syntax);
-
- }
-
- g_buffer_line_insert_text(line, BLC_ASSEMBLY, "]", 1, RTT_HOOK);
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : operand = opérande représentant un registre à mettre à jour. *
-* *
-* Description : Marque l'opérande comme étant écrit plutôt que consulté. *
-* *
-* Retour : - *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-void g_armv456_content_operand_mark_as_written(GArmV456ContentOperand *operand)
-{
- operand->is_written = true;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : operand = opérande représentant un registre à consulter. *
-* *
-* Description : Indique le type d'accès réalisé sur l'opérande. *
-* *
-* Retour : Type d'accès : true en cas d'écriture, false sinon. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-bool g_armv456_content_operand_is_written(const GArmV456ContentOperand *operand)
-{
- return operand->is_written;
-
-}
diff --git a/src/arch/arm/v456/operands/content.h b/src/arch/arm/v456/operands/content.h
deleted file mode 100644
index 7c3913b..0000000
--- a/src/arch/arm/v456/operands/content.h
+++ /dev/null
@@ -1,70 +0,0 @@
-
-/* Chrysalide - Outil d'analyse de fichiers binaires
- * content.h - prototypes pour les opérandes visant un registre ARM v4/5/6
- *
- * Copyright (C) 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/>.
- */
-
-
-#ifndef _ARCH_ARM_V456_OPERANDS_CONTENT_H
-#define _ARCH_ARM_V456_OPERANDS_CONTENT_H
-
-
-#include <glib-object.h>
-
-
-#include "../register.h"
-#include "../../../operand.h"
-#include "../../../../arch/immediate.h"
-#include "../../../../common/endianness.h"
-
-
-
-#define G_TYPE_ARMV456_CONTENT_OPERAND g_armv456_content_operand_get_type()
-#define G_ARMV456_CONTENT_OPERAND(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), g_armv456_content_operand_get_type(), GArmV456ContentOperand))
-#define G_IS_DALVIK_CONTENT_OPERAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), g_armv456_content_operand_get_type()))
-#define G_ARMV456_CONTENT_OPERAND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), G_TYPE_DALVIK_CONTENT_OPERAND, GArmV456ContentOperandClass))
-#define G_IS_DALVIK_CONTENT_OPERAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), G_TYPE_DALVIK_CONTENT_OPERAND))
-#define G_ARMV456_CONTENT_OPERAND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), G_TYPE_DALVIK_CONTENT_OPERAND, GArmV456ContentOperandClass))
-
-
-/* Définition d'un opérande visant un registre ARM v4/5/6 (instance) */
-typedef struct _GArmV456ContentOperand GArmV456ContentOperand;
-
-/* Définition d'un opérande visant un registre ARM v4/5/6 (classe) */
-typedef struct _GArmV456ContentOperandClass GArmV456ContentOperandClass;
-
-
-/* Indique le type défini par la GLib pour un opérande de registre ARM v4/5/6. */
-GType g_armv456_content_operand_get_type(void);
-
-/* Crée un opérande visant un registre ARM v4/5/6. */
-GArchOperand *g_armv456_content_operand_new(GArmV456Register *, GImmOperand *, bool);
-
-/* Fournit le registre ARM v4/5/6 associé à l'opérande. */
-GArmV456Register *g_armv456_content_operand_get(const GArmV456ContentOperand *);
-
-/* Marque l'opérande comme étant écrit plutôt que consulté. */
-void g_armv456_content_operand_mark_as_written(GArmV456ContentOperand *);
-
-/* Indique le type d'accès réalisé sur l'opérande. */
-bool g_armv456_content_operand_is_written(const GArmV456ContentOperand *);
-
-
-
-#endif /* _ARCH_ARM_V456_OPERANDS_CONTENT_H */
diff --git a/src/arch/arm/v456/operands/register.c b/src/arch/arm/v456/operands/register.c
deleted file mode 100644
index 4795363..0000000
--- a/src/arch/arm/v456/operands/register.c
+++ /dev/null
@@ -1,232 +0,0 @@
-
-/* Chrysalide - Outil d'analyse de fichiers binaires
- * register.c - opérandes visant un registre ARM v4/5/6
- *
- * Copyright (C) 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 "register.h"
-
-
-#include "../../../operand-int.h"
-
-
-
-/* Définition d'un opérande visant un registre ARM v4/5/6 (instance) */
-struct _GArmV456RegisterOperand
-{
- GArchOperand parent; /* Instance parente */
-
- GArmV456Register *reg; /* Registre représenté */
- bool is_written; /* Changement de contenu */
-
-};
-
-
-/* Définition d'un opérande visant un registre ARM v4/5/6 (classe) */
-struct _GArmV456RegisterOperandClass
-{
- GArchOperandClass parent; /* Classe parente */
-
-};
-
-
-/* Initialise la classe des opérandes de registre ARM v4/5/6. */
-static void g_armv456_register_operand_class_init(GArmV456RegisterOperandClass *);
-
-/* Initialise une instance d'opérande de registre ARM v4/5/6. */
-static void g_armv456_register_operand_init(GArmV456RegisterOperand *);
-
-/* Compare un opérande avec un autre. */
-static bool g_armv456_register_operand_compare(const GArmV456RegisterOperand *, const GArmV456RegisterOperand *);
-
-/* Traduit un opérande en version humainement lisible. */
-static void g_armv456_register_operand_print(const GArmV456RegisterOperand *, GBufferLine *, AsmSyntax);
-
-
-
-/* Indique le type défini par la GLib pour un opérande de registre ARM v4/5/6. */
-G_DEFINE_TYPE(GArmV456RegisterOperand, g_armv456_register_operand, G_TYPE_ARCH_OPERAND);
-
-
-/******************************************************************************
-* *
-* Paramètres : klass = classe à initialiser. *
-* *
-* Description : Initialise la classe des opérandes de registre ARM v4/5/6. *
-* *
-* Retour : - *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-static void g_armv456_register_operand_class_init(GArmV456RegisterOperandClass *klass)
-{
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : operand = instance à initialiser. *
-* *
-* Description : Initialise une instance d'opérande de registre ARM v4/5/6. *
-* *
-* Retour : - *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-static void g_armv456_register_operand_init(GArmV456RegisterOperand *operand)
-{
- GArchOperand *parent; /* Instance parente */
-
- parent = G_ARCH_OPERAND(operand);
-
- parent->compare = (operand_compare_fc)g_armv456_register_operand_compare;
- parent->print = (operand_print_fc)g_armv456_register_operand_print;
-
- operand->is_written = false;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : reg = registre déjà en place. *
-* *
-* Description : Crée un opérande visant un registre ARM v4/5/6. *
-* *
-* Retour : Opérande mis en place. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArchOperand *g_armv456_register_operand_new_from_existing(GArmV456Register *reg)
-{
- GArmV456RegisterOperand *result; /* Structure à retourner */
-
- result = g_object_new(G_TYPE_ARMV456_REGISTER_OPERAND, NULL);
-
- result->reg = reg;
-
- return G_ARCH_OPERAND(result);
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : operand = opérande représentant un registre. *
-* *
-* Description : Fournit le registre ARM v4/5/6 associé à l'opérande. *
-* *
-* Retour : Représentation interne du registre. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-GArmV456Register *g_armv456_register_operand_get(const GArmV456RegisterOperand *operand)
-{
- return operand->reg;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : a = premier opérande à consulter. *
-* b = second opérande à consulter. *
-* *
-* Description : Compare un opérande avec un autre. *
-* *
-* Retour : Bilan de la comparaison. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-static bool g_armv456_register_operand_compare(const GArmV456RegisterOperand *a, const GArmV456RegisterOperand *b)
-{
- return (g_armv456_register_compare(a->reg, b->reg) == 0);
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : operand = opérande à traiter. *
-* line = ligne tampon où imprimer l'opérande donné. *
-* syntax = type de représentation demandée. *
-* *
-* Description : Traduit un opérande en version humainement lisible. *
-* *
-* Retour : - *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-static void g_armv456_register_operand_print(const GArmV456RegisterOperand *operand, GBufferLine *line, AsmSyntax syntax)
-{
- g_armv456_register_print(operand->reg, line, syntax);
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : operand = opérande représentant un registre à mettre à jour. *
-* *
-* Description : Marque l'opérande comme étant écrit plutôt que consulté. *
-* *
-* Retour : - *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-void g_armv456_register_operand_mark_as_written(GArmV456RegisterOperand *operand)
-{
- operand->is_written = true;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : operand = opérande représentant un registre à consulter. *
-* *
-* Description : Indique le type d'accès réalisé sur l'opérande. *
-* *
-* Retour : Type d'accès : true en cas d'écriture, false sinon. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-bool g_armv456_register_operand_is_written(const GArmV456RegisterOperand *operand)
-{
- return operand->is_written;
-
-}
diff --git a/src/arch/arm/v456/operands/register.h b/src/arch/arm/v456/operands/register.h
deleted file mode 100644
index b680349..0000000
--- a/src/arch/arm/v456/operands/register.h
+++ /dev/null
@@ -1,69 +0,0 @@
-
-/* Chrysalide - Outil d'analyse de fichiers binaires
- * register.h - prototypes pour les opérandes visant un registre ARM v4/5/6
- *
- * Copyright (C) 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/>.
- */
-
-
-#ifndef _ARCH_ARM_V456_OPERANDS_REGISTER_H
-#define _ARCH_ARM_V456_OPERANDS_REGISTER_H
-
-
-#include <glib-object.h>
-
-
-#include "../register.h"
-#include "../../../operand.h"
-#include "../../../../common/endianness.h"
-
-
-
-#define G_TYPE_ARMV456_REGISTER_OPERAND g_armv456_register_operand_get_type()
-#define G_ARMV456_REGISTER_OPERAND(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), g_armv456_register_operand_get_type(), GArmV456RegisterOperand))
-#define G_IS_DALVIK_REGISTER_OPERAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), g_armv456_register_operand_get_type()))
-#define G_ARMV456_REGISTER_OPERAND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), G_TYPE_DALVIK_REGISTER_OPERAND, GArmV456RegisterOperandClass))
-#define G_IS_DALVIK_REGISTER_OPERAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), G_TYPE_DALVIK_REGISTER_OPERAND))
-#define G_ARMV456_REGISTER_OPERAND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), G_TYPE_DALVIK_REGISTER_OPERAND, GArmV456RegisterOperandClass))
-
-
-/* Définition d'un opérande visant un registre ARM v4/5/6 (instance) */
-typedef struct _GArmV456RegisterOperand GArmV456RegisterOperand;
-
-/* Définition d'un opérande visant un registre ARM v4/5/6 (classe) */
-typedef struct _GArmV456RegisterOperandClass GArmV456RegisterOperandClass;
-
-
-/* Indique le type défini par la GLib pour un opérande de registre ARM v4/5/6. */
-GType g_armv456_register_operand_get_type(void);
-
-/* Crée un opérande visant un registre ARM v4/5/6. */
-GArchOperand *g_armv456_register_operand_new_from_existing(GArmV456Register *);
-
-/* Fournit le registre ARM v4/5/6 associé à l'opérande. */
-GArmV456Register *g_armv456_register_operand_get(const GArmV456RegisterOperand *);
-
-/* Marque l'opérande comme étant écrit plutôt que consulté. */
-void g_armv456_register_operand_mark_as_written(GArmV456RegisterOperand *);
-
-/* Indique le type d'accès réalisé sur l'opérande. */
-bool g_armv456_register_operand_is_written(const GArmV456RegisterOperand *);
-
-
-
-#endif /* _ARCH_ARM_V456_OPERANDS_REGISTER_H */