diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2013-01-20 13:10:06 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2013-01-20 13:10:06 (GMT) |
commit | 37fd2f1329c56078bc8a8b2fc955aa001c109c01 (patch) | |
tree | 71bcce9a3eaf6b7569d1f1d3e057752ae517ebde /src/arch/register.c | |
parent | a9bbd894bd25f7c2bb72fb7d4064b19377d90c6d (diff) |
Took care of shared allocations between blocks when converting registers.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@326 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/arch/register.c')
-rw-r--r-- | src/arch/register.c | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/src/arch/register.c b/src/arch/register.c index 6631d4b..7c4f193 100644 --- a/src/arch/register.c +++ b/src/arch/register.c @@ -78,6 +78,25 @@ static void g_arch_register_init(GArchRegister *reg) /****************************************************************************** * * +* Paramètres : reg = opérande à consulter pour le calcul. * +* * +* Description : Produit une empreinte à partir d'un registre. * +* * +* Retour : Bilan de l'opération. * +* * +* Remarques : - * +* * +******************************************************************************/ + +guint g_arch_register_hash(const GArchRegister *reg) +{ + return reg->hash(reg); + +} + + +/****************************************************************************** +* * * Paramètres : a = premier opérande à consulter. * * b = second opérande à consulter. * * * @@ -98,6 +117,30 @@ int g_arch_register_compare(const GArchRegister *a, const GArchRegister *b) /****************************************************************************** * * +* Paramètres : a = premier opérande à consulter. * +* b = second opérande à consulter. * +* * +* Description : Détermine si un registre est égal à un autre. * +* * +* Retour : Bilan de la comparaison. * +* * +* Remarques : - * +* * +******************************************************************************/ + +gboolean g_arch_register_equal(const GArchRegister *a, const GArchRegister *b) +{ + int ret; /* Comparaison détaillée */ + + ret = g_arch_register_compare(a, b); + + return (ret == 0 ? TRUE : FALSE); + +} + + +/****************************************************************************** +* * * Paramètres : reg = registre à transcrire. * * line = ligne tampon où imprimer l'opérande donné. * * syntax = type de représentation demandée. * |