summaryrefslogtreecommitdiff
path: root/plugins/arm/v7/operands/reglist.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/arm/v7/operands/reglist.c')
-rw-r--r--plugins/arm/v7/operands/reglist.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/plugins/arm/v7/operands/reglist.c b/plugins/arm/v7/operands/reglist.c
index 0f87424..53b24a4 100644
--- a/plugins/arm/v7/operands/reglist.c
+++ b/plugins/arm/v7/operands/reglist.c
@@ -378,6 +378,34 @@ GArmV7Register *g_armv7_reglist_operand_get_register(const GArmV7RegListOperand
}
+/******************************************************************************
+* *
+* Paramètres : operand = liste de registres à consulter. *
+* reg = registre à rechercher. *
+* *
+* Description : Indique si un registre est présent dans une liste. *
+* *
+* Retour : Bilan de l'analyse. *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+bool g_armv7_reglist_operand_has_register(const GArmV7RegListOperand *operand, const GArmV7Register *reg)
+{
+ bool result; /* Bilan à faire remonter */
+ size_t i; /* Boucle de parcours */
+
+ result = false;
+
+ for (i = 0; i < operand->count && !result; i++)
+ result = (g_arch_register_compare(G_ARCH_REGISTER(operand->registers[i]), G_ARCH_REGISTER(reg)) == 0);
+
+ return result;
+
+}
+
+
/* ---------------------------------------------------------------------------------- */
/* TRANSPOSITIONS VIA CACHE DES OPERANDES */