summaryrefslogtreecommitdiff
path: root/plugins/arm/v7/operands
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/arm/v7/operands')
-rw-r--r--plugins/arm/v7/operands/register.c23
-rw-r--r--plugins/arm/v7/operands/register.h3
-rw-r--r--plugins/arm/v7/operands/reglist.c8
3 files changed, 7 insertions, 27 deletions
diff --git a/plugins/arm/v7/operands/register.c b/plugins/arm/v7/operands/register.c
index 412d0f9..e6b3751 100644
--- a/plugins/arm/v7/operands/register.c
+++ b/plugins/arm/v7/operands/register.c
@@ -226,29 +226,6 @@ GArchOperand *g_armv7_register_operand_new(GArmV7Register *reg)
/******************************************************************************
* *
* Paramètres : operand = opérande représentant un registre. *
-* *
-* Description : Fournit le registre ARMv7 associé à l'opérande. *
-* *
-* Retour : Représentation interne du registre. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-const GArmV7Register *g_armv7_register_operand_get(const GArmV7RegisterOperand *operand)
-{
- GArmV7Register *result; /* Instance à retourner */
-
- result = G_ARMV7_REGISTER(G_REGISTER_OPERAND(operand)->reg);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : operand = opérande représentant un registre. *
* wback = indique si le registre est mis à jour après coup. *
* *
* Description : Détermine si le registre est mis à jour après l'opération. *
diff --git a/plugins/arm/v7/operands/register.h b/plugins/arm/v7/operands/register.h
index 2bd13c6..4a9c0c3 100644
--- a/plugins/arm/v7/operands/register.h
+++ b/plugins/arm/v7/operands/register.h
@@ -57,9 +57,6 @@ GType g_armv7_register_operand_get_type(void);
/* Crée un opérande visant un registre ARMv7. */
GArchOperand *g_armv7_register_operand_new(GArmV7Register *);
-/* Fournit le registre ARMv7 associé à l'opérande. */
-const GArmV7Register *g_armv7_register_operand_get(const GArmV7RegisterOperand *);
-
/* Détermine si le registre est mis à jour après l'opération. */
void g_armv7_register_operand_write_back(GArmV7RegisterOperand *, bool);
diff --git a/plugins/arm/v7/operands/reglist.c b/plugins/arm/v7/operands/reglist.c
index 005aff7..33a3fcd 100644
--- a/plugins/arm/v7/operands/reglist.c
+++ b/plugins/arm/v7/operands/reglist.c
@@ -364,9 +364,15 @@ size_t g_armv7_reglist_count_registers(const GArmV7RegListOperand *operand)
GArmV7Register *g_armv7_reglist_operand_get_register(const GArmV7RegListOperand *operand, size_t index)
{
+ GArmV7Register *result; /* Instance à retourner */
+
assert(index < operand->count);
- return operand->registers[index];
+ result = operand->registers[index];
+
+ g_object_ref(G_OBJECT(result));
+
+ return result;
}