summaryrefslogtreecommitdiff
path: root/src/arch
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch')
-rw-r--r--src/arch/raw.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/arch/raw.c b/src/arch/raw.c
index 3338613..cf990f0 100644
--- a/src/arch/raw.c
+++ b/src/arch/raw.c
@@ -31,6 +31,7 @@
#include "immediate.h"
#include "instruction-int.h"
+#include "target.h"
@@ -508,7 +509,11 @@ static void g_raw_instruction_build_keyword(const GRawInstruction *instr, AsmSyn
static char *defines[] = { "dn", "db", "dw", "dd", "dq" };
operand = g_arch_instruction_get_operand(G_ARCH_INSTRUCTION(instr), 0);
- size = g_imm_operand_get_size(G_IMM_OPERAND(operand));
+
+ if (G_IS_TARGET_OPERAND(operand))
+ size = g_target_operand_get_size(G_TARGET_OPERAND(operand));
+ else
+ size = g_imm_operand_get_size(G_IMM_OPERAND(operand));
G_ARCH_INSTRUCTION(instr)->cached_keyword = strdup(defines[MDS_RANGE(size)]);