diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2012-11-05 19:45:08 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2012-11-05 19:45:08 (GMT) |
commit | c35d5d4ce62b812ec0aa4a5ebbacb84cd0901d53 (patch) | |
tree | ca0262ce4f0a24bdfbc1b9a4ffa1bbb202d47820 /src/arch/x86/operands/register.c | |
parent | f5df6496fa50927d3d274c939a888afde652b7ad (diff) |
Removed the old interface for rendering lines.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@278 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/arch/x86/operands/register.c')
-rw-r--r-- | src/arch/x86/operands/register.c | 42 |
1 files changed, 20 insertions, 22 deletions
diff --git a/src/arch/x86/operands/register.c b/src/arch/x86/operands/register.c index a70ea60..4ca695f 100644 --- a/src/arch/x86/operands/register.c +++ b/src/arch/x86/operands/register.c @@ -52,11 +52,11 @@ static void g_x86_register_operand_class_init(GX86RegisterOperandClass *); /* Initialise une instance d'opérande de registre x86. */ static void g_x86_register_operand_init(GX86RegisterOperand *); -/* Ajoute du texte simple à un fichier ouvert en écriture. */ -static void g_x86_register_operand_add_text(const GX86RegisterOperand *, GRenderingOptions *, MainRendering, FILE *); +/* Compare un opérande avec un autre. */ +static bool g_x86_register_operand_compare(const GX86RegisterOperand *, const GX86RegisterOperand *); -/* Ajoute à un tampon GLib le contenu de l'instance spécifiée. */ -static void g_x86_register_operand_to_buffer(const GX86RegisterOperand *, GBufferLine *, GRenderingOptions *); +/* Traduit un opérande en version humainement lisible. */ +static void g_x86_register_operand_print(const GX86RegisterOperand *, GBufferLine *, AsmSyntax); @@ -96,12 +96,12 @@ static void g_x86_register_operand_class_init(GX86RegisterOperandClass *klass) static void g_x86_register_operand_init(GX86RegisterOperand *operand) { - GContentExporter *parent; /* Instance parente */ + GArchOperand *parent; /* Instance parente */ - parent = G_CONTENT_EXPORTER(operand); + parent = G_ARCH_OPERAND(operand); - parent->add_text = (add_text_fc)g_x86_register_operand_add_text; - parent->export_buffer = (export_buffer_fc)g_x86_register_operand_to_buffer; + parent->compare = (operand_compare_fc)g_x86_register_operand_compare; + parent->print = (operand_print_fc)g_x86_register_operand_print; } @@ -224,33 +224,31 @@ GArchOperand *g_x86_register_operand_new_from_index(bin_t index, MemoryDataSize /****************************************************************************** * * -* Paramètres : operand = opérande à transcrire. * -* options = options de rendu. * -* rendering = support effectif final des lignes de code. * -* stream = flux ouvert en écriture. * +* Paramètres : a = premier opérande à consulter. * +* b = second opérande à consulter. * * * -* Description : Ajoute du texte simple à un fichier ouvert en écriture. * +* Description : Compare un opérande avec un autre. * * * -* Retour : - * +* Retour : Bilan de la comparaison. * * * * Remarques : - * * * ******************************************************************************/ -static void g_x86_register_operand_add_text(const GX86RegisterOperand *operand, GRenderingOptions *options, MainRendering rendering, FILE *stream) +static bool g_x86_register_operand_compare(const GX86RegisterOperand *a, const GX86RegisterOperand *b) { - g_content_exporter_add_text(G_CONTENT_EXPORTER(operand->reg), options, rendering, stream); + return g_x86_register_compare(a->reg, b->reg); } /****************************************************************************** * * -* Paramètres : operand = opérande à transcrire. * -* buffer = espace où placer ledit contenu. * -* options = options de rendu. * +* Paramètres : operand = opérande à traiter. * +* line = ligne tampon où imprimer l'opérande donné. * +* syntax = type de représentation demandée. * * * -* Description : Ajoute à un tampon GLib le contenu de l'instance spécifiée. * +* Description : Traduit un opérande en version humainement lisible. * * * * Retour : - * * * @@ -258,8 +256,8 @@ static void g_x86_register_operand_add_text(const GX86RegisterOperand *operand, * * ******************************************************************************/ -static void g_x86_register_operand_to_buffer(const GX86RegisterOperand *operand, GBufferLine *buffer, GRenderingOptions *options) +static void g_x86_register_operand_print(const GX86RegisterOperand *operand, GBufferLine *line, AsmSyntax syntax) { - g_content_exporter_to_buffer(G_CONTENT_EXPORTER(operand->reg), buffer, options); + g_x86_pool_operand_print(operand->reg, line, syntax); } |