summaryrefslogtreecommitdiff
path: root/src/arch/register.h
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2018-05-28 17:37:46 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2018-05-28 17:37:46 (GMT)
commit9f5ed46de568d3db882c939c8ca9d0117bff3369 (patch)
tree9d2090cd640e54379dc1b982e03dc284b2d23ae7 /src/arch/register.h
parent2fd186a84cba4f39f6f1bb8bd34d52b4e1d4f814 (diff)
Relied on register objects as often as possible.
Diffstat (limited to 'src/arch/register.h')
-rw-r--r--src/arch/register.h41
1 files changed, 10 insertions, 31 deletions
diff --git a/src/arch/register.h b/src/arch/register.h
index fb3741e..5a97682 100644
--- a/src/arch/register.h
+++ b/src/arch/register.h
@@ -21,8 +21,8 @@
*/
-#ifndef _ARCH_ARCH_REGISTER_H
-#define _ARCH_ARCH_REGISTER_H
+#ifndef _ARCH_REGISTER_H
+#define _ARCH_REGISTER_H
#include <glib-object.h>
@@ -30,7 +30,6 @@
#include "archbase.h"
-#include "operand.h"
#include "../glibext/gbufferline.h"
@@ -73,39 +72,19 @@ bool g_arch_register_is_stack_pointer(const GArchRegister *);
-/* ------------------------- REGISTRE SOUS FORME D'OPERANDE ------------------------- */
+/* --------------------- TRANSPOSITIONS VIA CACHE DES REGISTRES --------------------- */
-#define G_TYPE_REGISTER_OPERAND g_register_operand_get_type()
-#define G_REGISTER_OPERAND(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), G_TYPE_REGISTER_OPERAND, GRegisterOperand))
-#define G_IS_REGISTER_OPERAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), G_TYPE_REGISTER_OPERAND))
-#define G_REGISTER_OPERAND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), G_TYPE_REGISTER_OPERAND, GRegisterOperandClass))
-#define G_IS_REGISTER_OPERAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), G_TYPE_REGISTER_OPERAND))
-#define G_REGISTER_OPERAND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), G_TYPE_REGISTER_OPERAND, GRegisterOperandClass))
+/* Depuis "storage.h" : définition d'une conservation d'instructions d'assemblage (instance) */
+typedef struct _GAsmStorage GAsmStorage;
-/* Définition d'un opérande visant un registre (instance) */
-typedef struct _GRegisterOperand GRegisterOperand;
+/* Charge un registre depuis une mémoire tampon. */
+GArchRegister *g_arch_register_load(GAsmStorage *, packed_buffer *);
-/* Définition d'un opérande visant un registre (classe) */
-typedef struct _GRegisterOperandClass GRegisterOperandClass;
+/* Sauvegarde un registre dans une mémoire tampon. */
+bool g_arch_register_store(const GArchRegister *, GAsmStorage *, packed_buffer *);
-/* Indique le type défini par la GLib pour un opérande de registre. */
-GType g_register_operand_get_type(void);
-/* Crée un opérande visant un registre. */
-GArchOperand *g_register_operand_new(GArchRegister *);
-
-/* Fournit le registre associé à l'opérande. */
-GArchRegister *g_register_operand_get_register(const GRegisterOperand *);
-
-/* Marque l'opérande comme étant écrit plutôt que consulté. */
-void g_register_operand_mark_as_written(GRegisterOperand *);
-
-/* Indique le type d'accès réalisé sur l'opérande. */
-bool g_register_operand_is_written(const GRegisterOperand *);
-
-
-
-#endif /* _ARCH_ARCH_REGISTER_H */
+#endif /* _ARCH_REGISTER_H */