summaryrefslogtreecommitdiff
path: root/src/arch/immediate.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/immediate.c')
-rw-r--r--src/arch/immediate.c28
1 files changed, 13 insertions, 15 deletions
diff --git a/src/arch/immediate.c b/src/arch/immediate.c
index 5519059..2d021be 100644
--- a/src/arch/immediate.c
+++ b/src/arch/immediate.c
@@ -103,10 +103,10 @@ static int g_imm_operand_compare(const GImmOperand *, const GImmOperand *);
static bool g_imm_operand_does_padding_for_display(const GImmOperand *, ImmOperandDisplay);
/* Construit la chaîne de caractères correspondant à l'opérande. */
-static size_t _g_imm_operand_to_string(const GImmOperand *, AsmSyntax, ImmOperandDisplay, char [IMM_MAX_SIZE]);
+static size_t _g_imm_operand_to_string(const GImmOperand *, ImmOperandDisplay, char [IMM_MAX_SIZE]);
/* Traduit un opérande en version humainement lisible. */
-static void g_imm_operand_print(const GImmOperand *, GBufferLine *, AsmSyntax);
+static void g_imm_operand_print(const GImmOperand *, GBufferLine *);
/* Construit un petit résumé concis de l'opérande. */
static char *g_imm_operand_build_tooltip(const GImmOperand *, const GLoadedBinary *);
@@ -909,7 +909,6 @@ bool g_imm_operand_is_null(const GImmOperand *operand)
/******************************************************************************
* *
* Paramètres : operand = opérande à transcrire. *
-* syntax = type de représentation demandée. *
* display = type d'affichage demandé. *
* value = valeur portée par l'opérande transcrite. [OUT] *
* *
@@ -921,7 +920,7 @@ bool g_imm_operand_is_null(const GImmOperand *operand)
* *
******************************************************************************/
-static size_t _g_imm_operand_to_string(const GImmOperand *operand, AsmSyntax syntax, ImmOperandDisplay display, char value[IMM_MAX_SIZE])
+static size_t _g_imm_operand_to_string(const GImmOperand *operand, ImmOperandDisplay display, char value[IMM_MAX_SIZE])
{
size_t result; /* Longueur à retourner */
unsigned int range; /* Catégorie de la taille */
@@ -950,12 +949,12 @@ static size_t _g_imm_operand_to_string(const GImmOperand *operand, AsmSyntax syn
/* Encadrement pour les caractères */
if (display == IOD_CHAR)
{
- prefix = (syntax == ASX_ATT ? "$'" : "'");
+ prefix = "'";
suffix = "'";
}
else
{
- prefix = (syntax == ASX_ATT ? "$" : "");
+ prefix = "";
suffix = "";
}
@@ -1121,14 +1120,14 @@ static size_t _g_imm_operand_to_string(const GImmOperand *operand, AsmSyntax syn
* *
******************************************************************************/
-size_t g_imm_operand_to_string(const GImmOperand *operand, AsmSyntax syntax, char value[IMM_MAX_SIZE])
+size_t g_imm_operand_to_string(const GImmOperand *operand, char value[IMM_MAX_SIZE])
{
size_t result; /* Longueur à retourner */
ImmOperandDisplay display; /* Type d'affichage courant */
display = g_imm_operand_get_display(operand);
- result = _g_imm_operand_to_string(operand, syntax, display, value);
+ result = _g_imm_operand_to_string(operand, display, value);
return result;
@@ -1139,7 +1138,6 @@ size_t g_imm_operand_to_string(const GImmOperand *operand, AsmSyntax syntax, cha
* *
* Paramètres : operand = opérande à traiter. *
* line = ligne tampon où imprimer l'opérande donné. *
-* syntax = type de représentation demandée. *
* *
* Description : Traduit un opérande en version humainement lisible. *
* *
@@ -1149,12 +1147,12 @@ size_t g_imm_operand_to_string(const GImmOperand *operand, AsmSyntax syntax, cha
* *
******************************************************************************/
-static void g_imm_operand_print(const GImmOperand *operand, GBufferLine *line, AsmSyntax syntax)
+static void g_imm_operand_print(const GImmOperand *operand, GBufferLine *line)
{
char value[IMM_MAX_SIZE]; /* Chaîne à imprimer */
size_t len; /* Taille de l'élément inséré */
- len = g_imm_operand_to_string(operand, syntax, value);
+ len = g_imm_operand_to_string(operand, value);
g_buffer_line_append_text(line, BLC_MAIN, value, len, RTT_IMMEDIATE, G_OBJECT(operand));
@@ -1202,7 +1200,7 @@ static char *g_imm_operand_build_tooltip(const GImmOperand *operand, const GLoad
/* Binaire */
- _g_imm_operand_to_string(operand, ASX_INTEL, IOD_BIN, value);
+ _g_imm_operand_to_string(operand, IOD_BIN, value);
asprintf(&conv, _("Binary: %s"), value);
@@ -1213,7 +1211,7 @@ static char *g_imm_operand_build_tooltip(const GImmOperand *operand, const GLoad
/* Octal */
- _g_imm_operand_to_string(operand, ASX_INTEL, IOD_OCT, value);
+ _g_imm_operand_to_string(operand, IOD_OCT, value);
asprintf(&conv, _("Octal: %s"), value);
@@ -1224,7 +1222,7 @@ static char *g_imm_operand_build_tooltip(const GImmOperand *operand, const GLoad
/* Décimal */
- _g_imm_operand_to_string(operand, ASX_INTEL, IOD_DEC, value);
+ _g_imm_operand_to_string(operand, IOD_DEC, value);
asprintf(&conv, _("Decimal: %s"), value);
@@ -1235,7 +1233,7 @@ static char *g_imm_operand_build_tooltip(const GImmOperand *operand, const GLoad
/* Hexadécimal */
- _g_imm_operand_to_string(operand, ASX_INTEL, IOD_HEX, value);
+ _g_imm_operand_to_string(operand, IOD_HEX, value);
asprintf(&conv, _("Hexadecimal: %s"), value);