summaryrefslogtreecommitdiff
path: root/plugins/arm
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/arm')
-rw-r--r--plugins/arm/v7/instruction.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/plugins/arm/v7/instruction.c b/plugins/arm/v7/instruction.c
index 9eb43ac..ee75efd 100644
--- a/plugins/arm/v7/instruction.c
+++ b/plugins/arm/v7/instruction.c
@@ -299,18 +299,22 @@ static const char *g_armv7_instruction_get_keyword(const GArmV7Instruction *inst
parent = G_ARM_INSTRUCTION(instr);
- if (parent->cached_keyword == NULL)
- {
- assert(instr->sid < AOP7_ENC_COUNT);
+ assert(instr->sid < AOP7_ENC_COUNT);
- parent->cached_keyword = strdup(_armv7_keywords[instr->sid]);
+ if (parent->suffix == NULL)
+ result = _armv7_keywords[instr->sid];
- if (parent->suffix != NULL)
+ else
+ {
+ if (parent->cached_keyword == NULL)
+ {
+ parent->cached_keyword = strdup(_armv7_keywords[instr->sid]);
parent->cached_keyword = stradd(parent->cached_keyword, parent->suffix);
+ }
- }
+ result = parent->cached_keyword;
- result = parent->cached_keyword;
+ }
return result;