diff options
-rw-r--r-- | plugins/arm/v7/helpers.h | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/plugins/arm/v7/helpers.h b/plugins/arm/v7/helpers.h index 29ba021..4f9a8f9 100644 --- a/plugins/arm/v7/helpers.h +++ b/plugins/arm/v7/helpers.h @@ -330,9 +330,11 @@ #define NextDoubleWordVector(ref, n) \ ({ \ GArchOperand *__result; \ - uint8_t __idx; \ GArchRegister *__reg; \ - __idx = g_arm_register_get_index(G_ARM_REGISTER(ref)); \ + uint8_t __idx; \ + __reg = g_register_operand_get_register(G_REGISTER_OPERAND(ref)); \ + __idx = g_arm_register_get_index(G_ARM_REGISTER(__reg)); \ + g_object_unref(G_OBJECT(__reg)); \ __reg = g_armv7_simd_register_new(SRM_DOUBLE_WORD, __idx + n); \ if (__reg == NULL) \ __result = NULL; \ @@ -358,9 +360,11 @@ #define NextSingleWordVector(prev) \ ({ \ GArchOperand *__result; \ - uint8_t __idx; \ GArchRegister *__reg; \ - __idx = g_arm_register_get_index(G_ARM_REGISTER(prev)); \ + uint8_t __idx; \ + __reg = g_register_operand_get_register(G_REGISTER_OPERAND(prev)); \ + __idx = g_arm_register_get_index(G_ARM_REGISTER(__reg)); \ + g_object_unref(G_OBJECT(__reg)); \ __reg = g_armv7_simd_register_new(SRM_SINGLE_WORD, __idx + 1); \ if (__reg == NULL) \ __result = NULL; \ @@ -413,7 +417,7 @@ if (__result != NULL) \ { \ __pc = G_ARMV7_REGISTER(g_armv7_basic_register_new(15)); \ - __list = G_ARMV7_REGLIST_OPERAND(result); \ + __list = G_ARMV7_REGLIST_OPERAND(__result); \ if (g_armv7_reglist_operand_has_register(__list, __pc)) \ { \ g_object_unref(G_OBJECT(__result)); \ @@ -434,7 +438,7 @@ if (__result != NULL) \ { \ __pc = G_ARMV7_REGISTER(g_armv7_basic_register_new(15)); \ - __list = G_ARMV7_REGLIST_OPERAND(result); \ + __list = G_ARMV7_REGLIST_OPERAND(__result); \ if (!g_armv7_reglist_operand_has_register(__list, __pc)) \ { \ g_object_unref(G_OBJECT(__result)); \ |