diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2010-11-12 22:13:21 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2010-11-12 22:13:21 (GMT) |
commit | ae8cf6257c8d929de1b7ee86e29fcb45ab4af91c (patch) | |
tree | 59fa356b2f83020e23df4cf6975ca5d97567df4d /src/arch/dalvik/operand.c | |
parent | abaf85fdc0edb2bfe67d07d52ae734d50c6fbf61 (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/dalvik/operand.c')
-rw-r--r-- | src/arch/dalvik/operand.c | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/src/arch/dalvik/operand.c b/src/arch/dalvik/operand.c index 9c4a2c2..3227184 100644 --- a/src/arch/dalvik/operand.c +++ b/src/arch/dalvik/operand.c @@ -87,6 +87,9 @@ static void g_dalvik_register_operand_class_init(GDalvikRegisterOperandClass *); /* Initialise une instance d'opérande de registre Dalvik. */ static void g_dalvik_register_operand_init(GDalvikRegisterOperand *); +/* Compare un opérande avec un autre. */ +static bool g_dalvik_register_operand_compare(const GDalvikRegisterOperand *, const GDalvikRegisterOperand *); + /* Ajoute du texte simple à un fichier ouvert en écriture. */ static void g_dalvik_register_operand_add_text(const GDalvikRegisterOperand *, GRenderingOptions *, MainRendering, FILE *); @@ -325,13 +328,18 @@ static void g_dalvik_register_operand_class_init(GDalvikRegisterOperandClass *kl static void g_dalvik_register_operand_init(GDalvikRegisterOperand *operand) { - GContentExporter *parent; /* Instance parente */ + GContentExporter *parent; /* Instance parente #1 */ + GArchOperand *arch; /* Instance parente #2 */ parent = G_CONTENT_EXPORTER(operand); parent->add_text = (add_text_fc)g_dalvik_register_operand_add_text; parent->export_buffer = (export_buffer_fc)g_dalvik_register_operand_to_buffer; + arch = G_ARCH_OPERAND(operand); + + arch->compare = (operand_compare_fc)g_dalvik_register_operand_compare; + } @@ -400,6 +408,26 @@ GArchOperand *g_dalvik_register_operand_new(const bin_t *data, off_t *pos, off_t /****************************************************************************** * * +* 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 : - * +* * +******************************************************************************/ + +static bool g_dalvik_register_operand_compare(const GDalvikRegisterOperand *a, const GDalvikRegisterOperand *b) +{ + return g_dalvik_register_compare(a->reg, b->reg); + +} + + +/****************************************************************************** +* * * Paramètres : operand = opérande à transcrire. * * options = options de rendu. * * rendering = support effectif final des lignes de code. * |