diff options
Diffstat (limited to 'src/arch/operand.c')
-rw-r--r-- | src/arch/operand.c | 27 |
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; + +} |