summaryrefslogtreecommitdiff
path: root/src/arch/register.h
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2014-10-07 22:07:27 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2014-10-07 22:07:27 (GMT)
commita5e162d47a574f334b172dfee3128a40e8d52fb3 (patch)
tree5816a46365d196f40ac39fed884a9ee20fb44194 /src/arch/register.h
parent1d5f7f28f92251dc4d3bff8d87b3e3052ab9cab2 (diff)
Created a compiler for architecture instruction definitions.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@410 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/arch/register.h')
-rw-r--r--src/arch/register.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/src/arch/register.h b/src/arch/register.h
index 4e9d447..f5841f7 100644
--- a/src/arch/register.h
+++ b/src/arch/register.h
@@ -30,10 +30,14 @@
#include "archbase.h"
+#include "operand.h"
#include "../glibext/gbufferline.h"
+/* ---------------------------- PUR REGISTRE DU MATERIEL ---------------------------- */
+
+
#define G_TYPE_ARCH_REGISTER g_arch_register_get_type()
#define G_ARCH_REGISTER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), g_arch_register_get_type(), GArchRegister))
#define G_IS_ARCH_REGISTER(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), g_arch_register_get_type()))
@@ -72,4 +76,39 @@ bool g_arch_register_is_stack_pointer(const GArchRegister *);
+/* ------------------------- REGISTRE SOUS FORME D'OPERANDE ------------------------- */
+
+
+#define G_TYPE_REGISTER_OPERAND g_register_operand_get_type()
+#define G_REGISTER_OPERAND(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), g_register_operand_get_type(), GRegisterOperand))
+#define G_IS_REGISTER_OPERAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), g_register_operand_get_type()))
+#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))
+
+
+/* Définition d'un opérande visant un registre (instance) */
+typedef struct _GRegisterOperand GRegisterOperand;
+
+/* Définition d'un opérande visant un registre (classe) */
+typedef struct _GRegisterOperandClass GRegisterOperandClass;
+
+
+/* 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 */