diff options
Diffstat (limited to 'src/arch/register-int.h')
-rw-r--r-- | src/arch/register-int.h | 30 |
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 */ }; |