summaryrefslogtreecommitdiff
path: root/plugins/arm/v7/operands/reglist.c
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2018-05-28 20:34:24 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2018-05-28 20:34:24 (GMT)
commit5311a943dffcc410739509b9215ca464f6d1e54c (patch)
tree9c34b5176606aa7bb3dcfb5970a20e3f9b27f1c3 /plugins/arm/v7/operands/reglist.c
parent9f5ed46de568d3db882c939c8ca9d0117bff3369 (diff)
Included support for ARMv7 system instructions.
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 */