summaryrefslogtreecommitdiff
path: root/src/arch/arm
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/arm')
-rw-r--r--src/arch/arm/instruction.c23
-rw-r--r--src/arch/arm/v7/opdefs/mov_A88102.d2
2 files changed, 18 insertions, 7 deletions
diff --git a/src/arch/arm/instruction.c b/src/arch/arm/instruction.c
index b46cab0..6ce115c 100644
--- a/src/arch/arm/instruction.c
+++ b/src/arch/arm/instruction.c
@@ -24,7 +24,11 @@
#include "instruction.h"
+#include <string.h>
+
+
#include "instruction-int.h"
+#include "../../common/extstr.h"
@@ -40,8 +44,8 @@ static void g_arm_instruction_dispose(GArmInstruction *);
/* Procède à la libération totale de la mémoire. */
static void g_arm_instruction_finalize(GArmInstruction *);
-/* Fournit le nom humain de l'instruction manipulée. */
-static const char *g_arm_instruction_get_keyword(const GArmInstruction *, AsmSyntax);
+/* Reconstruit le cache complet d'une désignation d'instruction. */
+static void g_arm_instruction_build_keyword(const GArmInstruction *, AsmSyntax);
@@ -72,7 +76,7 @@ static void g_arm_instruction_class_init(GArmInstructionClass *klass)
object_class->dispose = (GObjectFinalizeFunc/* ! */)g_arm_instruction_dispose;
object_class->finalize = (GObjectFinalizeFunc)g_arm_instruction_finalize;
- instr->get_key = (get_instruction_keyword_fc)g_arm_instruction_get_keyword;
+ instr->build_key = (build_instruction_keyword_fc)g_arm_instruction_build_keyword;
}
@@ -138,7 +142,7 @@ static void g_arm_instruction_finalize(GArmInstruction *instr)
* Paramètres : instr = instruction à traiter. *
* syntax = type de représentation demandée. *
* *
-* Description : Fournit le nom humain de l'instruction manipulée. *
+* Description : Reconstruit le cache complet d'une désignation d'instruction.*
* *
* Retour : Mot clef de bas niveau. *
* *
@@ -146,9 +150,16 @@ static void g_arm_instruction_finalize(GArmInstruction *instr)
* *
******************************************************************************/
-static const char *g_arm_instruction_get_keyword(const GArmInstruction *instr, AsmSyntax syntax)
+static void g_arm_instruction_build_keyword(const GArmInstruction *instr, AsmSyntax syntax)
{
- return instr->keyword;
+ GArchInstruction *base; /* Instruction, vue générique */
+
+ base = G_ARCH_INSTRUCTION(instr);
+
+ base->cached_keyword = strdup(instr->keyword);
+
+ if (base->suffix != NULL)
+ base->cached_keyword = stradd(base->cached_keyword, base->suffix);
}
diff --git a/src/arch/arm/v7/opdefs/mov_A88102.d b/src/arch/arm/v7/opdefs/mov_A88102.d
index dcafc73..a71969f 100644
--- a/src/arch/arm/v7/opdefs/mov_A88102.d
+++ b/src/arch/arm/v7/opdefs/mov_A88102.d
@@ -42,7 +42,7 @@
@word 1 1 1 1 0 i(1) 0 0 0 1 0 S(1) 1 1 1 1 0 imm3(3) Rd(4) imm8(8)
- @syntax {S} <Rd> <const>
+ @syntax {S} ".W" <Rd> <const>
@conv {