summaryrefslogtreecommitdiff
path: root/src/arch/operand.c
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2010-11-12 22:13:21 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2010-11-12 22:13:21 (GMT)
commitae8cf6257c8d929de1b7ee86e29fcb45ab4af91c (patch)
tree59fa356b2f83020e23df4cf6975ca5d97567df4d /src/arch/operand.c
parentabaf85fdc0edb2bfe67d07d52ae734d50c6fbf61 (diff)
Changed the display of the pseudo registers by using an index.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@192 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/arch/operand.c')
-rw-r--r--src/arch/operand.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/arch/operand.c b/src/arch/operand.c
index 16fc073..f3aecb6 100644
--- a/src/arch/operand.c
+++ b/src/arch/operand.c
@@ -117,3 +117,30 @@ void g_arch_operand_print(const GArchOperand *operand, GBufferLine *line, AsmSyn
return operand->print(operand, line, syntax);
}
+
+
+/******************************************************************************
+* *
+* Paramètres : a = premier opérande à consulter. *
+* b = second opérande à consulter. *
+* *
+* Description : Compare un opérande avec un autre. *
+* *
+* Retour : Bilan de la comparaison. *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+bool g_arch_operand_compare(const GArchOperand *a, const GArchOperand *b)
+{
+ bool result; /* Bilan à faire remonter */
+
+ result = (G_OBJECT_TYPE(G_OBJECT(a)) == G_OBJECT_TYPE(G_OBJECT(b)));
+
+ if (result)
+ result = a->compare(a, b);
+
+ return result;
+
+}