summaryrefslogtreecommitdiff
path: root/src/arch/x86
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2012-11-05 19:45:08 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2012-11-05 19:45:08 (GMT)
commitc35d5d4ce62b812ec0aa4a5ebbacb84cd0901d53 (patch)
treeca0262ce4f0a24bdfbc1b9a4ffa1bbb202d47820 /src/arch/x86
parentf5df6496fa50927d3d274c939a888afde652b7ad (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')
-rw-r--r--src/arch/x86/Makefile.am2
-rw-r--r--src/arch/x86/operands/data.c16
-rw-r--r--src/arch/x86/operands/modrm.c15
-rw-r--r--src/arch/x86/operands/modrm.h2
-rw-r--r--src/arch/x86/operands/moffs.c14
-rw-r--r--src/arch/x86/operands/register.c42
-rw-r--r--src/arch/x86/operands/register.h2
-rw-r--r--src/arch/x86/operands/relative.c14
-rw-r--r--src/arch/x86/register.c (renamed from src/arch/x86/registers.c)157
-rw-r--r--src/arch/x86/register.h (renamed from src/arch/x86/registers.h)15
10 files changed, 114 insertions, 165 deletions
diff --git a/src/arch/x86/Makefile.am b/src/arch/x86/Makefile.am
index b7b72d6..e657699 100644
--- a/src/arch/x86/Makefile.am
+++ b/src/arch/x86/Makefile.am
@@ -5,7 +5,7 @@ libarchx86_la_SOURCES = \
instruction.h instruction.c \
operand.h operand.c \
processor.h processor.c \
- registers.h registers.c
+ register.h register.c
libarchx86_la_LIBADD = \
opcodes/libarchx86opcodes.la \
diff --git a/src/arch/x86/operands/data.c b/src/arch/x86/operands/data.c
index 22f16b7..32b9bcd 100644
--- a/src/arch/x86/operands/data.c
+++ b/src/arch/x86/operands/data.c
@@ -24,7 +24,7 @@
#include "data.h"
-#include "../registers.h"
+#include "../register.h"
#include "../../operand-int.h"
@@ -53,12 +53,6 @@ static void g_x86_data_operand_class_init(GX86DataOperandClass *);
/* Initialise une instance d'opérande x86 pointant des données. */
static void g_x86_data_operand_init(GX86DataOperand *);
-/* Ajoute du texte simple à un fichier ouvert en écriture. */
-static void g_x86_data_operand_add_text(const GX86DataOperand *, GRenderingOptions *, MainRendering, FILE *);
-
-/* Ajoute à un tampon GLib le contenu de l'instance spécifiée. */
-static void g_x86_data_operand_to_buffer(const GX86DataOperand *, GBufferLine *, GRenderingOptions *);
-
/* Indique le type défini par la GLib pour un opérande x86 de manipulation de données. */
@@ -97,12 +91,6 @@ static void g_x86_data_operand_class_init(GX86DataOperandClass *klass)
static void g_x86_data_operand_init(GX86DataOperand *operand)
{
- GContentExporter *parent; /* Instance parente */
-
- parent = G_CONTENT_EXPORTER(operand);
-
- parent->add_text = (add_text_fc)g_x86_data_operand_add_text;
- parent->export_buffer = (export_buffer_fc)g_x86_data_operand_to_buffer;
}
@@ -134,6 +122,7 @@ GArchOperand *g_x86_data_operand_new(MemoryDataSize size, bool dest)
}
+#if 0
/******************************************************************************
* *
* Paramètres : operand = opérande à transcrire. *
@@ -205,3 +194,4 @@ static void g_x86_data_operand_to_buffer(const GX86DataOperand *operand, GBuffer
"]", 1, RTT_HOOK);
}
+#endif
diff --git a/src/arch/x86/operands/modrm.c b/src/arch/x86/operands/modrm.c
index 892d5dc..e23f499 100644
--- a/src/arch/x86/operands/modrm.c
+++ b/src/arch/x86/operands/modrm.c
@@ -59,12 +59,6 @@ static void g_x86_mod_rm_operand_class_init(GX86ModRMOperandClass *);
/* Initialise une instance d'opérande x86 de type ModRM. */
static void g_x86_mod_rm_operand_init(GX86ModRMOperand *);
-/* Ajoute du texte simple à un fichier ouvert en écriture. */
-static void g_x86_mod_rm_operand_add_text(const GX86ModRMOperand *, GRenderingOptions *, MainRendering, FILE *);
-
-/* Ajoute à un tampon GLib le contenu de l'instance spécifiée. */
-static void g_x86_mod_rm_operand_to_buffer(const GX86ModRMOperand *, GBufferLine *, GRenderingOptions *);
-
/* Indique le type défini par la GLib pour un opérande x86 de type ModRM. */
@@ -103,12 +97,6 @@ static void g_x86_mod_rm_operand_class_init(GX86ModRMOperandClass *klass)
static void g_x86_mod_rm_operand_init(GX86ModRMOperand *operand)
{
- GContentExporter *parent; /* Instance parente */
-
- parent = G_CONTENT_EXPORTER(operand);
-
- parent->add_text = (add_text_fc)g_x86_mod_rm_operand_add_text;
- parent->export_buffer = (export_buffer_fc)g_x86_mod_rm_operand_to_buffer;
}
@@ -215,7 +203,7 @@ GArchOperand *g_x86_mod_rm_operand_new(const bin_t *data, off_t *pos, off_t len,
}
-
+#if 0
/******************************************************************************
* *
* Paramètres : operand = opérande à transcrire. *
@@ -374,6 +362,7 @@ static void g_x86_mod_rm_operand_to_buffer(const GX86ModRMOperand *operand, GBuf
}
}
+#endif
/******************************************************************************
diff --git a/src/arch/x86/operands/modrm.h b/src/arch/x86/operands/modrm.h
index 89a274f..428d481 100644
--- a/src/arch/x86/operands/modrm.h
+++ b/src/arch/x86/operands/modrm.h
@@ -28,7 +28,7 @@
#include <glib-object.h>
-#include "../registers.h"
+#include "../register.h"
#include "../../immediate.h"
#include "../../operand.h"
#include "../../../common/endianness.h"
diff --git a/src/arch/x86/operands/moffs.c b/src/arch/x86/operands/moffs.c
index 3754e79..4d3c57b 100644
--- a/src/arch/x86/operands/moffs.c
+++ b/src/arch/x86/operands/moffs.c
@@ -52,12 +52,6 @@ static void g_x86_moffs_operand_class_init(GX86MOffsOperandClass *);
/* Initialise une instance d'opérande d'emplacement mémoire x86. */
static void g_x86_moffs_operand_init(GX86MOffsOperand *);
-/* Ajoute du texte simple à un fichier ouvert en écriture. */
-static void g_x86_moffs_operand_add_text(const GX86MOffsOperand *, GRenderingOptions *, MainRendering, FILE *);
-
-/* Ajoute à un tampon GLib le contenu de l'instance spécifiée. */
-static void g_x86_moffs_operand_to_buffer(const GX86MOffsOperand *, GBufferLine *, GRenderingOptions *);
-
/* Indique le type défini par la GLib pour un opérande d'emplacement mémoire x86. */
@@ -96,12 +90,6 @@ static void g_x86_moffs_operand_class_init(GX86MOffsOperandClass *klass)
static void g_x86_moffs_operand_init(GX86MOffsOperand *operand)
{
- GContentExporter *parent; /* Instance parente */
-
- parent = G_CONTENT_EXPORTER(operand);
-
- parent->add_text = (add_text_fc)g_x86_moffs_operand_add_text;
- parent->export_buffer = (export_buffer_fc)g_x86_moffs_operand_to_buffer;
}
@@ -141,6 +129,7 @@ GArchOperand *g_x86_moffs_operand_new(const bin_t *data, off_t *pos, off_t len,
}
+#if 0
/******************************************************************************
* *
* Paramètres : operand = opérande à transcrire. *
@@ -187,3 +176,4 @@ static void g_x86_moffs_operand_to_buffer(const GX86MOffsOperand *operand, GBuff
g_content_exporter_to_buffer(G_CONTENT_EXPORTER(operand->offset), buffer, options);
}
+#endif
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);
}
diff --git a/src/arch/x86/operands/register.h b/src/arch/x86/operands/register.h
index 11bc87e..e679410 100644
--- a/src/arch/x86/operands/register.h
+++ b/src/arch/x86/operands/register.h
@@ -28,7 +28,7 @@
#include <glib-object.h>
-#include "../registers.h"
+#include "../register.h"
#include "../../operand.h"
#include "../../../common/endianness.h"
diff --git a/src/arch/x86/operands/relative.c b/src/arch/x86/operands/relative.c
index 3235a0d..cd69748 100644
--- a/src/arch/x86/operands/relative.c
+++ b/src/arch/x86/operands/relative.c
@@ -51,12 +51,6 @@ static void g_x86_relative_operand_class_init(GX86RelativeOperandClass *);
/* Initialise une instance d'opérande x86 d'adresse relative. */
static void g_x86_relative_operand_init(GX86RelativeOperand *);
-/* Ajoute du texte simple à un fichier ouvert en écriture. */
-static void g_x86_relative_operand_add_text(const GX86RelativeOperand *, GRenderingOptions *, MainRendering, FILE *);
-
-/* Ajoute à un tampon GLib le contenu de l'instance spécifiée. */
-static void g_x86_relative_operand_to_buffer(const GX86RelativeOperand *, GBufferLine *, GRenderingOptions *);
-
/* Indique le type défini par la GLib pour un opérande x86 d'adresse relative. */
@@ -95,12 +89,6 @@ static void g_x86_relative_operand_class_init(GX86RelativeOperandClass *klass)
static void g_x86_relative_operand_init(GX86RelativeOperand *operand)
{
- GContentExporter *parent; /* Instance parente */
-
- parent = G_CONTENT_EXPORTER(operand);
-
- parent->add_text = (add_text_fc)g_x86_relative_operand_add_text;
- parent->export_buffer = (export_buffer_fc)g_x86_relative_operand_to_buffer;
}
@@ -159,6 +147,7 @@ GArchOperand *g_x86_relative_operand_new(const bin_t *data, off_t *pos, off_t le
}
+#if 0
/******************************************************************************
* *
* Paramètres : operand = opérande à transcrire. *
@@ -200,6 +189,7 @@ static void g_x86_relative_operand_to_buffer(const GX86RelativeOperand *operand,
g_content_exporter_to_buffer(G_CONTENT_EXPORTER(operand->immediate), buffer, options);
}
+#endif
/******************************************************************************
diff --git a/src/arch/x86/registers.c b/src/arch/x86/register.c
index e0a4df1..53b9b2e 100644
--- a/src/arch/x86/registers.c
+++ b/src/arch/x86/register.c
@@ -1,6 +1,6 @@
/* OpenIDA - Outil d'analyse de fichiers binaires
- * registers.c - aides auxiliaires relatives aux registres x86
+ * register.c - aides auxiliaires relatives aux registres x86
*
* Copyright (C) 2009-2010 Cyrille Bagard
*
@@ -21,7 +21,7 @@
*/
-#include "registers.h"
+#include "register.h"
#include <stdio.h>
@@ -109,26 +109,23 @@ struct _GX86RegisterClass
#define MAX_REGNAME_LEN 5
-/* Construit la chaîne de caractères correspondant à l'opérande. */
-static void g_x86_register_to_string(const GX86Register *, AsmSyntax, char [MAX_REGNAME_LEN], size_t *);
+/* Initialise la classe des registres x86. */
+static void g_x86_register_class_init(GX86RegisterClass *);
-/* Ajoute du texte simple à un fichier ouvert en écriture. */
-static void g_x86_register_add_text(const GX86Register *, GRenderingOptions *, MainRendering, FILE *);
-
-/* Ajoute à un tampon GLib le contenu de l'instance spécifiée. */
-static void g_x86_register_to_buffer(const GX86Register *, GBufferLine *, GRenderingOptions *);
+/* Initialise une instance de registre x86. */
+static void g_x86_register_init(GX86Register *);
/* Indique le type défini pour une représentation d'un registre x86. */
-G_DEFINE_TYPE(GX86Register, g_x86_register, G_TYPE_CONTENT_EXPORTER);
+G_DEFINE_TYPE(GX86Register, g_x86_register, G_TYPE_ARCH_OPERAND);
/******************************************************************************
* *
* Paramètres : klass = classe à initialiser. *
* *
-* Description : Initialise la classe des lignes de représentation. *
+* Description : Initialise la classe des registres x86. *
* *
* Retour : - *
* *
@@ -146,7 +143,7 @@ static void g_x86_register_class_init(GX86RegisterClass *klass)
* *
* Paramètres : reg = instance à initialiser. *
* *
-* Description : Initialise une instance de ligne de représentation. *
+* Description : Initialise une instance de registre x86. *
* *
* Retour : - *
* *
@@ -156,12 +153,6 @@ static void g_x86_register_class_init(GX86RegisterClass *klass)
static void g_x86_register_init(GX86Register *reg)
{
- GContentExporter *parent; /* Instance parente */
-
- parent = G_CONTENT_EXPORTER(reg);
-
- parent->add_text = (add_text_fc)g_x86_register_add_text;
- parent->export_buffer = (export_buffer_fc)g_x86_register_to_buffer;
}
@@ -235,22 +226,65 @@ GX86Register *g_x86_register_new(MemoryDataSize size, bin_t value)
gxrn_error:
- /* FIXME free(result); */
+ g_object_unref(G_OBJECT(result));
return NULL;
}
+/******************************************************************************
+* *
+* Paramètres : a = premier opérande à consulter. *
+* b = second opérande à consulter. *
+* *
+* Description : Compare un registre avec un autre. *
+* *
+* Retour : Bilan de la comparaison. *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+bool g_x86_register_compare(const GX86Register *a, const GX86Register *b)
+{
+ bool result; /* Bilan à retourner */
+
+ if (a->size != b->size)
+ return false;
+
+ switch (a->size)
+ {
+ case MDS_8_BITS:
+ result = (a->reg.reg8 == b->reg.reg8);
+ break;
+
+ case MDS_16_BITS:
+ result = (a->reg.reg16 == b->reg.reg16);
+ break;
+
+ case MDS_32_BITS:
+ result = (a->reg.reg32 == b->reg.reg32);
+ break;
+
+ default:
+ result = false;
+ break;
+
+ }
+
+ return result;
+
+}
+
/******************************************************************************
* *
-* Paramètres : operand = opérande à transcrire. *
-* syntax = type de représentation demandée. *
-* key = description humaine du registre. [OUT] *
-* klen = nombre de caractères utilisés. [OUT] *
+* Paramètres : reg = registre à transcrire. *
+* line = ligne tampon où imprimer l'opérande donné. *
+* syntax = type de représentation demandée. *
* *
-* Description : Construit la chaîne de caractères correspondant à l'opérande.*
+* Description : Traduit un registre en version humainement lisible. *
* *
* Retour : - *
* *
@@ -258,9 +292,10 @@ GX86Register *g_x86_register_new(MemoryDataSize size, bin_t value)
* *
******************************************************************************/
-static void g_x86_register_to_string(const GX86Register *reg, AsmSyntax syntax, char key[MAX_REGNAME_LEN], size_t *klen)
+void g_x86_pool_operand_print(const GX86Register *reg, GBufferLine *line, AsmSyntax syntax)
{
- *klen = 0;
+ char key[MAX_REGNAME_LEN]; /* Mot clef principal */
+ size_t klen; /* Taille de ce mot clef */
switch (syntax)
{
@@ -268,7 +303,7 @@ static void g_x86_register_to_string(const GX86Register *reg, AsmSyntax syntax,
switch (reg->size)
{
case MDS_8_BITS:
- *klen = 2;
+ klen = 2;
switch (reg->reg.reg8)
{
case X86_REG8_AL:
@@ -302,7 +337,7 @@ static void g_x86_register_to_string(const GX86Register *reg, AsmSyntax syntax,
break;
case MDS_16_BITS:
- *klen = 2;
+ klen = 2;
switch (reg->reg.reg16)
{
case X86_REG16_AX:
@@ -336,7 +371,7 @@ static void g_x86_register_to_string(const GX86Register *reg, AsmSyntax syntax,
break;
case MDS_32_BITS:
- *klen = 3;
+ klen = 3;
switch (reg->reg.reg32)
{
case X86_REG32_EAX:
@@ -371,6 +406,7 @@ static void g_x86_register_to_string(const GX86Register *reg, AsmSyntax syntax,
break;
default:
+ klen = 0;
break;
}
@@ -380,7 +416,7 @@ static void g_x86_register_to_string(const GX86Register *reg, AsmSyntax syntax,
switch (reg->size)
{
case MDS_8_BITS:
- *klen = 3;
+ klen = 3;
switch (reg->reg.reg8)
{
case X86_REG8_AL:
@@ -414,7 +450,7 @@ static void g_x86_register_to_string(const GX86Register *reg, AsmSyntax syntax,
break;
case MDS_16_BITS:
- *klen = 3;
+ klen = 3;
switch (reg->reg.reg16)
{
case X86_REG16_AX:
@@ -448,7 +484,7 @@ static void g_x86_register_to_string(const GX86Register *reg, AsmSyntax syntax,
break;
case MDS_32_BITS:
- *klen = 4;
+ klen = 4;
switch (reg->reg.reg32)
{
case X86_REG32_EAX:
@@ -482,70 +518,19 @@ static void g_x86_register_to_string(const GX86Register *reg, AsmSyntax syntax,
break;
default:
+ klen = 0;
break;
}
break;
default:
+ klen = 0;
break;
}
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : reg = registre X86 à transcrire. *
-* options = options de rendu. *
-* rendering = support effectif final des lignes de code. *
-* stream = flux ouvert en écriture. *
-* *
-* Description : Ajoute du texte simple à un fichier ouvert en écriture. *
-* *
-* Retour : - *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-static void g_x86_register_add_text(const GX86Register *reg, GRenderingOptions *options, MainRendering rendering, FILE *stream)
-{
- char key[MAX_REGNAME_LEN]; /* Mot clef principal */
- size_t klen; /* Taille de ce mot clef */
-
- g_x86_register_to_string(reg, g_rendering_options_get_syntax(options), key, &klen);
-
- g_content_exporter_insert_text(G_CONTENT_EXPORTER(reg), stream,
- key, klen, RTT_REGISTER);
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : reg = registre X86 à transcrire. *
-* buffer = espace où placer ledit contenu. *
-* options = options de rendu. *
-* *
-* Description : Ajoute à un tampon GLib le contenu de l'instance spécifiée. *
-* *
-* Retour : - *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-static void g_x86_register_to_buffer(const GX86Register *reg, GBufferLine *buffer, GRenderingOptions *options)
-{
- char key[MAX_REGNAME_LEN]; /* Mot clef principal */
- size_t klen; /* Taille de ce mot clef */
-
- g_x86_register_to_string(reg, g_rendering_options_get_syntax(options), key, &klen);
-
- g_content_exporter_insert_into_buffer(G_CONTENT_EXPORTER(reg), buffer, BLC_ASSEMBLY,
- key, klen, RTT_REGISTER);
+ g_buffer_line_insert_text(line, BLC_ASSEMBLY, key, klen, RTT_REGISTER);
}
diff --git a/src/arch/x86/registers.h b/src/arch/x86/register.h
index 18bced7..5491c08 100644
--- a/src/arch/x86/registers.h
+++ b/src/arch/x86/register.h
@@ -1,6 +1,6 @@
/* OpenIDA - Outil d'analyse de fichiers binaires
- * registers.h - prototypes pour les aides auxiliaires relatives aux registres x86
+ * register.h - prototypes pour les aides auxiliaires relatives aux registres x86
*
* Copyright (C) 2009 Cyrille Bagard
*
@@ -21,8 +21,8 @@
*/
-#ifndef _ARCH_X86_REGISTERS_H
-#define _ARCH_X86_REGISTERS_H
+#ifndef _ARCH_X86_REGISTER_H
+#define _ARCH_X86_REGISTER_H
#include <glib-object.h>
@@ -30,6 +30,7 @@
#include "../archbase.h"
+#include "../../glibext/gbufferline.h"
@@ -54,6 +55,12 @@ GType g_x86_register_get_type(void);
/* Crée une réprésentation de registre x86. */
GX86Register *g_x86_register_new(MemoryDataSize, bin_t);
+/* Compare un registre avec un autre. */
+bool g_x86_register_compare(const GX86Register *, const GX86Register *);
+
+/* Traduit un registre en version humainement lisible. */
+void g_x86_pool_operand_print(const GX86Register *, GBufferLine *, AsmSyntax);
+
/* Indique si le registre correspond à ebp ou similaire. */
bool g_x86_register_is_base_pointer(const GX86Register *);
@@ -62,4 +69,4 @@ bool g_x86_register_is_stack_pointer(const GX86Register *);
-#endif /* _ARCH_X86_REGISTERS_H */
+#endif /* _ARCH_X86_REGISTER_H */