summaryrefslogtreecommitdiff
path: root/src/arch/x86/operand.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/x86/operand.c')
-rw-r--r--src/arch/x86/operand.c215
1 files changed, 0 insertions, 215 deletions
diff --git a/src/arch/x86/operand.c b/src/arch/x86/operand.c
index 0a571a7..849e54d 100644
--- a/src/arch/x86/operand.c
+++ b/src/arch/x86/operand.c
@@ -95,9 +95,6 @@ static void g_x86_register_operand_add_text(const GX86RegisterOperand *, GRender
/*Ajoute à un tampon GLib le contenu de l'instance spécifiée. */
static void g_x86_register_operand_to_buffer(const GX86RegisterOperand *, GBufferLine *, GRenderingOptions *);
-/* Ajoute à un texte GTK le contenu d'un opérande. */
-static void g_x86_register_operand_add_to_gtk_buffer(const GX86RegisterOperand *, const GExeFormat *, AsmSyntax, GtkTextBuffer *, GtkTextIter *);
-
/* ----------------------- OPERANDES COMPLEXES DE TYPE MOD/RM ----------------------- */
@@ -136,9 +133,6 @@ static void g_x86_mod_rm_operand_add_text(const GX86ModRMOperand *, GRenderingOp
/* 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 *);
-/* Ajoute à un texte GTK le contenu d'un opérande. */
-static void g_x86_mod_rm_operand_add_to_gtk_buffer(const GX86ModRMOperand *, const GExeFormat *, AsmSyntax, GtkTextBuffer *, GtkTextIter *);
-
/* ------------------------- OPERANDES D'ADRESSES RELATIVES ------------------------- */
@@ -173,9 +167,6 @@ static void g_x86_relative_operand_add_text(const GX86RelativeOperand *, GRender
/* Ajoute à un tampon GLib le contenu de l'instance spécifiée. */
static void g_x86_relative_operand_to_buffer(const GX86RelativeOperand *, GBufferLine *, GRenderingOptions *);
-/* Ajoute à un texte GTK le contenu d'un opérande. */
-static void g_x86_relative_operand_add_to_gtk_buffer(const GX86RelativeOperand *, const GExeFormat *, AsmSyntax, GtkTextBuffer *, GtkTextIter *);
-
/* ------------------------ OPERANDES D'EMPLACEMENTS MEMOIRE ------------------------ */
@@ -210,9 +201,6 @@ static void g_x86_moffs_operand_add_text(const GX86MOffsOperand *, GRenderingOpt
/* Ajoute à un tampon GLib le contenu de l'instance spécifiée. */
static void g_x86_moffs_operand_to_buffer(const GX86MOffsOperand *, GBufferLine *, GRenderingOptions *);
-/* Ajoute à un texte GTK le contenu d'un opérande. */
-static void g_x86_moffs_operand_add_to_gtk_buffer(const GX86MOffsOperand *, const GExeFormat *, AsmSyntax, GtkTextBuffer *, GtkTextIter *);
-
/* ---------------------- OPERANDES DE MANIPULATION DE DONNEES ---------------------- */
@@ -248,9 +236,6 @@ static void g_x86_data_operand_add_text(const GX86DataOperand *, GRenderingOptio
/* Ajoute à un tampon GLib le contenu de l'instance spécifiée. */
static void g_x86_data_operand_to_buffer(const GX86DataOperand *, GBufferLine *, GRenderingOptions *);
-/* Ajoute à un texte GTK le contenu d'un opérande. */
-static void g_x86_data_operand_add_to_gtk_buffer(const GX86DataOperand *, const GExeFormat *, AsmSyntax, GtkTextBuffer *, GtkTextIter *);
-
/* ---------------------------------------------------------------------------------- */
@@ -346,7 +331,6 @@ static void g_x86_register_operand_init(GX86RegisterOperand *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->add_arch_to_gtk_buffer = (add_arch_to_gtk_buffer_fc)g_x86_register_operand_add_to_gtk_buffer;
}
@@ -510,29 +494,6 @@ static void g_x86_register_operand_to_buffer(const GX86RegisterOperand *operand,
}
-/******************************************************************************
-* *
-* Paramètres : operand = opérande à transcrire. *
-* format = format du binaire manipulé. *
-* syntax = type de représentation demandée. *
-* buffer = zone de texte à venir compléter. *
-* iter = point d'insertion du nouveau texte. *
-* *
-* Description : Ajoute à un texte GTK le contenu d'un opérande. *
-* *
-* Retour : - *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-static void g_x86_register_operand_add_to_gtk_buffer(const GX86RegisterOperand *operand, const GExeFormat *format, AsmSyntax syntax, GtkTextBuffer *buffer, GtkTextIter *iter)
-{
- g_content_exporter_add_arch_to_gtk_buffer(G_CONTENT_EXPORTER(operand->reg), format, syntax, buffer, iter);
-
-}
-
-
/* ---------------------------------------------------------------------------------- */
/* OPERANDES COMPLEXES DE TYPE MOD/RM */
@@ -581,7 +542,6 @@ static void g_x86_mod_rm_operand_init(GX86ModRMOperand *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;
- parent->add_arch_to_gtk_buffer = (add_arch_to_gtk_buffer_fc)g_x86_mod_rm_operand_add_to_gtk_buffer;
}
@@ -851,90 +811,6 @@ static void g_x86_mod_rm_operand_to_buffer(const GX86ModRMOperand *operand, GBuf
/******************************************************************************
* *
-* Paramètres : operand = opérande à transcrire. *
-* format = format du binaire manipulé. *
-* syntax = type de représentation demandée. *
-* buffer = zone de texte à venir compléter. *
-* iter = point d'insertion du nouveau texte. *
-* *
-* Description : Ajoute à un texte GTK le contenu d'un opérande. *
-* *
-* Retour : - *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-static void g_x86_mod_rm_operand_add_to_gtk_buffer(const GX86ModRMOperand *operand, const GExeFormat *format, AsmSyntax syntax, GtkTextBuffer *buffer, GtkTextIter *iter)
-{
- char tmp[2]; /* Echelle en puissance de 2 */
-
- switch (syntax)
- {
- case ASX_INTEL:
-
- g_content_exporter_insert_with_gtk_tag(G_CONTENT_EXPORTER(operand), buffer, iter,
- "[", 1, RTT_HOOK);
-
- if (operand->scale > 0)
- {
- snprintf(tmp, 2, "%d", (int)pow(2, operand->scale));
-
- g_content_exporter_insert_with_gtk_tag(G_CONTENT_EXPORTER(operand), buffer, iter,
- tmp, 1, RTT_IMMEDIATE);
-
- g_content_exporter_insert_with_gtk_tag(G_CONTENT_EXPORTER(operand), buffer, iter,
- "*", 1, RTT_SIGNS);
-
- }
-
- g_content_exporter_add_arch_to_gtk_buffer(G_CONTENT_EXPORTER(operand->index),
- format, syntax, buffer, iter);
-
- if (operand->base != NULL)
- {
- g_content_exporter_insert_with_gtk_tag(G_CONTENT_EXPORTER(operand), buffer, iter,
- "+", 1, RTT_SIGNS);
-
- g_content_exporter_add_arch_to_gtk_buffer(G_CONTENT_EXPORTER(operand->base),
- format, syntax, buffer, iter);
-
- }
-
- if (operand->displacement != NULL)
- {
- if (g_imm_operand_is_negative(operand->displacement))
- g_content_exporter_insert_with_gtk_tag(G_CONTENT_EXPORTER(operand), buffer, iter,
- "-", 1, RTT_SIGNS);
- else
- g_content_exporter_insert_with_gtk_tag(G_CONTENT_EXPORTER(operand), buffer, iter,
- "+", 1, RTT_SIGNS);
-
- g_content_exporter_add_arch_to_gtk_buffer(G_CONTENT_EXPORTER(operand->displacement),
- format, syntax, buffer, iter);
-
- }
-
- g_content_exporter_insert_with_gtk_tag(G_CONTENT_EXPORTER(operand), buffer, iter,
- "]", 1, RTT_HOOK);
-
- break;
-
- case ASX_ATT:
-
- /* TODO */
- g_content_exporter_insert_with_gtk_tag(G_CONTENT_EXPORTER(operand), buffer, iter,
- "[ModRM]", 7, RTT_HOOK);
-
- break;
-
- }
-
-}
-
-
-/******************************************************************************
-* *
* Paramètres : operand = opérande à consulter. *
* scale = facteur sous forme de puissance de deux. [OUT *
* index = register principal de l'opérande. [OUT] *
@@ -1041,7 +917,6 @@ static void g_x86_relative_operand_init(GX86RelativeOperand *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;
- parent->add_arch_to_gtk_buffer = (add_arch_to_gtk_buffer_fc)g_x86_relative_operand_add_to_gtk_buffer;
}
@@ -1145,30 +1020,6 @@ static void g_x86_relative_operand_to_buffer(const GX86RelativeOperand *operand,
/******************************************************************************
* *
-* Paramètres : operand = opérande à transcrire. *
-* format = format du binaire manipulé. *
-* syntax = type de représentation demandée. *
-* buffer = zone de texte à venir compléter. *
-* iter = point d'insertion du nouveau texte. *
-* *
-* Description : Ajoute à un texte GTK le contenu d'un opérande. *
-* *
-* Retour : - *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-static void g_x86_relative_operand_add_to_gtk_buffer(const GX86RelativeOperand *operand, const GExeFormat *format, AsmSyntax syntax, GtkTextBuffer *buffer, GtkTextIter *iter)
-{
- g_content_exporter_add_arch_to_gtk_buffer(G_CONTENT_EXPORTER(operand->immediate),
- format, syntax, buffer, iter);
-
-}
-
-
-/******************************************************************************
-* *
* Paramètres : operand = opérande à traiter. *
* *
* Description : Fournit l'adresse relative représentée par une opérande X86. *
@@ -1234,7 +1085,6 @@ static void g_x86_moffs_operand_init(GX86MOffsOperand *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;
- parent->add_arch_to_gtk_buffer = (add_arch_to_gtk_buffer_fc)g_x86_moffs_operand_add_to_gtk_buffer;
}
@@ -1322,33 +1172,6 @@ static void g_x86_moffs_operand_to_buffer(const GX86MOffsOperand *operand, GBuff
}
-/******************************************************************************
-* *
-* Paramètres : operand = opérande à transcrire. *
-* format = format du binaire manipulé. *
-* syntax = type de représentation demandée. *
-* buffer = zone de texte à venir compléter. *
-* iter = point d'insertion du nouveau texte. *
-* *
-* Description : Ajoute à un texte GTK le contenu d'un opérande. *
-* *
-* Retour : - *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-static void g_x86_moffs_operand_add_to_gtk_buffer(const GX86MOffsOperand *operand, const GExeFormat *format, AsmSyntax syntax, GtkTextBuffer *buffer, GtkTextIter *iter)
-{
- g_content_exporter_insert_with_gtk_tag(G_CONTENT_EXPORTER(operand), buffer, iter,
- "ds:", 3, RTT_SEGMENT);
-
- g_content_exporter_add_arch_to_gtk_buffer(G_CONTENT_EXPORTER(operand->offset),
- format, syntax, buffer, iter);
-
-}
-
-
/* ---------------------------------------------------------------------------------- */
/* OPERANDES DE MANIPULATION DE DONNEES */
@@ -1397,7 +1220,6 @@ static void g_x86_data_operand_init(GX86DataOperand *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;
- parent->add_arch_to_gtk_buffer = (add_arch_to_gtk_buffer_fc)g_x86_data_operand_add_to_gtk_buffer;
}
@@ -1502,43 +1324,6 @@ static void g_x86_data_operand_to_buffer(const GX86DataOperand *operand, GBuffer
}
-/******************************************************************************
-* *
-* Paramètres : operand = opérande à transcrire. *
-* format = format du binaire manipulé. *
-* syntax = type de représentation demandée. *
-* buffer = zone de texte à venir compléter. *
-* iter = point d'insertion du nouveau texte. *
-* *
-* Description : Ajoute à un texte GTK le contenu d'un opérande. *
-* *
-* Retour : - *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-static void g_x86_data_operand_add_to_gtk_buffer(const GX86DataOperand *operand, const GExeFormat *format, AsmSyntax syntax, GtkTextBuffer *buffer, GtkTextIter *iter)
-{
- if (operand->dest)
- g_content_exporter_insert_with_gtk_tag(G_CONTENT_EXPORTER(operand), buffer, iter,
- "es:", 3, RTT_SEGMENT);
- else
- g_content_exporter_insert_with_gtk_tag(G_CONTENT_EXPORTER(operand), buffer, iter,
- "ds:", 3, RTT_SEGMENT);
-
- g_content_exporter_insert_with_gtk_tag(G_CONTENT_EXPORTER(operand), buffer, iter,
- "[", 1, RTT_HOOK);
-
- g_content_exporter_add_arch_to_gtk_buffer(G_CONTENT_EXPORTER(operand->reg), format,
- syntax, buffer, iter);
-
- g_content_exporter_insert_with_gtk_tag(G_CONTENT_EXPORTER(operand), buffer, iter,
- "]", 1, RTT_HOOK);
-
-}
-
-
/* ---------------------------------------------------------------------------------- */
/* AIDE A LA CREATION D'OPERANDES */