summaryrefslogtreecommitdiff
path: root/plugins/arm
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/arm')
-rw-r--r--plugins/arm/v7/helpers.h20
1 files changed, 14 insertions, 6 deletions
diff --git a/plugins/arm/v7/helpers.h b/plugins/arm/v7/helpers.h
index a863a2d..3f8d97c 100644
--- a/plugins/arm/v7/helpers.h
+++ b/plugins/arm/v7/helpers.h
@@ -389,26 +389,34 @@
})
-#define UncheckedWrittenBackReg(reg) \
+#define UncheckedWrittenBackReg(regop) \
({ \
GArchOperand *__result; \
- if (reg == NULL) \
+ GArchRegister *__reg; \
+ if (regop == NULL) \
__result = NULL; \
else \
- __result = g_armv7_register_operand_new(G_ARMV7_REGISTER(reg)); \
+ { \
+ __reg = g_register_operand_get_register(G_REGISTER_OPERAND(regop)); \
+ g_object_unref(G_OBJECT(regop)); \
+ __result = g_armv7_register_operand_new(G_ARMV7_REGISTER(__reg)); \
+ } \
__result; \
})
-#define WrittenBackReg(reg, writeback) \
+#define WrittenBackReg(regop, writeback) \
({ \
GArchOperand *__result; \
+ GArchRegister *__reg; \
GArmV7RegisterOperand *__armv7_op; \
- if (reg == NULL) \
+ if (regop == NULL) \
__result = NULL; \
else \
{ \
- __result = g_armv7_register_operand_new(G_ARMV7_REGISTER(reg)); \
+ __reg = g_register_operand_get_register(G_REGISTER_OPERAND(regop)); \
+ g_object_unref(G_OBJECT(regop)); \
+ __result = g_armv7_register_operand_new(G_ARMV7_REGISTER(__reg)); \
if (__result != NULL && writeback == 1) \
{ \
__armv7_op = G_ARMV7_REGISTER_OPERAND(__result); \