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.c38
1 files changed, 7 insertions, 31 deletions
diff --git a/plugins/arm/v7/operands/reglist.c b/plugins/arm/v7/operands/reglist.c
index 00c3b98..1f56249 100644
--- a/plugins/arm/v7/operands/reglist.c
+++ b/plugins/arm/v7/operands/reglist.c
@@ -255,7 +255,7 @@ static void g_armv7_reglist_operand_print(const GArmV7RegListOperand *operand, G
/******************************************************************************
* *
-* Paramètres : - *
+* Paramètres : selected = masque de bits pour les registres à intégrer. *
* *
* Description : Crée une liste vierge de registres ARM. *
* *
@@ -265,48 +265,24 @@ static void g_armv7_reglist_operand_print(const GArmV7RegListOperand *operand, G
* *
******************************************************************************/
-GArchOperand *g_armv7_reglist_operand_new(void)
-{
- GArchOperand *result; /* Structure à retourner */
-
- result = g_object_new(G_TYPE_ARMV7_REGLIST_OPERAND, NULL);
-
- return G_ARCH_OPERAND(result);
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : operand = liste de registres à compléter. *
-* selected = masque de bits pour les registres à intégrer. *
-* *
-* Description : Remplit une liste de registres de registres ARM. *
-* *
-* Retour : Bilan de l'opération. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-bool g_armv7_reglist_load_registers(GArmV7RegListOperand *operand, uint32_t selected)
+GArchOperand *g_armv7_reglist_operand_new(uint16_t selected)
{
+ GArmV7RegListOperand *result; /* Structure à retourner */
uint8_t i; /* Boucle de parcours */
GArmV7Register *reg; /* Nouveau registre à intégrer */
- for (i = 18; i < 32; i++)
- if (selected & (1 << i)) return false;
+ result = g_object_new(G_TYPE_ARMV7_REGLIST_OPERAND, NULL);
- for (i = 0; i < 18; i++)
+ for (i = 0; i < 16; i++)
{
if ((selected & (1 << i)) == 0) continue;
reg = g_armv7_register_new(i);
- g_armv7_reglist_add_register(operand, reg);
+ g_armv7_reglist_add_register(result, reg);
}
- return true;
+ return G_ARCH_OPERAND(result);
}