summaryrefslogtreecommitdiff
path: root/src/arch/register-int.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-int.h
parent2fd186a84cba4f39f6f1bb8bd34d52b4e1d4f814 (diff)
Relied on register objects as often as possible.
Diffstat (limited to 'src/arch/register-int.h')
-rw-r--r--src/arch/register-int.h30
1 files changed, 7 insertions, 23 deletions
diff --git a/src/arch/register-int.h b/src/arch/register-int.h
index 173e6e0..fb9534b 100644
--- a/src/arch/register-int.h
+++ b/src/arch/register-int.h
@@ -47,6 +47,11 @@ typedef bool (* reg_is_base_pointer_fc) (const GArchRegister *);
/* Indique si le registre correspond à esp ou similaire. */
typedef bool (* reg_is_stack_pointer_fc) (const GArchRegister *);
+/* Charge un registre depuis une mémoire tampon. */
+typedef GArchRegister * (* reg_unserialize_fc) (GArchRegister *, GAsmStorage *, packed_buffer *);
+
+/* Sauvegarde un registre dans une mémoire tampon. */
+typedef bool (* reg_serialize_fc) (const GArchRegister *, GAsmStorage *, packed_buffer *);
/* Représentation d'un registre (instance) */
@@ -56,7 +61,6 @@ struct _GArchRegister
};
-
/* Représentation d'un registre (classe) */
struct _GArchRegisterClass
{
@@ -68,28 +72,8 @@ struct _GArchRegisterClass
reg_is_base_pointer_fc is_bp; /* Correspondance avec ebp */
reg_is_stack_pointer_fc is_sp; /* Correspondance avec esp */
-};
-
-
-
-/* ------------------------- REGISTRE SOUS FORME D'OPERANDE ------------------------- */
-
-
-/* Définition d'un opérande visant un registre (instance) */
-struct _GRegisterOperand
-{
- GArchOperand parent; /* Instance parente */
-
- GArchRegister *reg; /* Registre représenté */
- bool is_written; /* Changement de contenu */
-
-};
-
-
-/* Définition d'un opérande visant un registre (classe) */
-struct _GRegisterOperandClass
-{
- GArchOperandClass parent; /* Classe parente */
+ reg_unserialize_fc unserialize; /* Chargement depuis un tampon */
+ reg_serialize_fc serialize; /* Conservation dans un tampon */
};