summaryrefslogtreecommitdiff
path: root/plugins/arm/v7/operands/rotation.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/arm/v7/operands/rotation.c')
-rw-r--r--plugins/arm/v7/operands/rotation.c89
1 files changed, 5 insertions, 84 deletions
diff --git a/plugins/arm/v7/operands/rotation.c b/plugins/arm/v7/operands/rotation.c
index f90c76b..8136401 100644
--- a/plugins/arm/v7/operands/rotation.c
+++ b/plugins/arm/v7/operands/rotation.c
@@ -93,12 +93,6 @@ static GArchOperand **g_armv7_rotation_operand_list_inner_instances(const GArmV7
/* Met à jour une liste de candidats embarqués par un candidat. */
static void g_armv7_rotation_operand_update_inner_instances(GArmV7RotationOperand *, GArchOperand **, size_t);
-/* Charge un contenu depuis une mémoire tampon. */
-static bool g_armv7_rotation_operand_load(GArmV7RotationOperand *, GObjectStorage *, packed_buffer_t *);
-
-/* Sauvegarde un contenu dans une mémoire tampon. */
-static bool g_armv7_rotation_operand_store(GArmV7RotationOperand *, GObjectStorage *, packed_buffer_t *);
-
/* ---------------------------------------------------------------------------------- */
@@ -143,8 +137,8 @@ static void g_armv7_rotation_operand_class_init(GArmV7RotationOperandClass *klas
operand->list_inner = (operand_list_inners_fc)g_armv7_rotation_operand_list_inner_instances;
operand->update_inner = (operand_update_inners_fc)g_armv7_rotation_operand_update_inner_instances;
- operand->load = (load_operand_fc)g_armv7_rotation_operand_load;
- operand->store = (store_operand_fc)g_armv7_rotation_operand_store;
+ operand->load = g_arch_operand_load_generic_fixed_1;
+ operand->store = g_arch_operand_store_generic_fixed;
}
@@ -454,82 +448,9 @@ static void g_armv7_rotation_operand_update_inner_instances(GArmV7RotationOperan
{
assert(count == 1);
- g_object_unref(G_OBJECT(operand->value));
- operand->value = instances[0];
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : operand = élément GLib à constuire. *
-* storage = conservateur de données à manipuler ou NULL. *
-* pbuf = zone tampon à lire. *
-* *
-* Description : Charge un contenu depuis une mémoire tampon. *
-* *
-* Retour : Bilan de l'opération. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-static bool g_armv7_rotation_operand_load(GArmV7RotationOperand *operand, GObjectStorage *storage, packed_buffer_t *pbuf)
-{
- bool result; /* Bilan à retourner */
- GArchOperandClass *parent; /* Classe parente à consulter */
- GSerializableObject *value; /* Valeur de la rotation */
-
- parent = G_ARCH_OPERAND_CLASS(g_armv7_rotation_operand_parent_class);
-
- result = parent->load(G_ARCH_OPERAND(operand), storage, pbuf);
-
- if (result)
- {
- value = g_object_storage_unpack_object(storage, "operands", pbuf);
-
- result = (value != NULL);
-
- if (result)
- operand->value = G_ARCH_OPERAND(value);
-
- }
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : operand = élément GLib à consulter. *
-* storage = conservateur de données à manipuler ou NULL. *
-* pbuf = zone tampon à remplir. *
-* *
-* Description : Sauvegarde un contenu dans une mémoire tampon. *
-* *
-* Retour : Bilan de l'opération. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-static bool g_armv7_rotation_operand_store(GArmV7RotationOperand *operand, GObjectStorage *storage, packed_buffer_t *pbuf)
-{
- bool result; /* Bilan à retourner */
- GArchOperandClass *parent; /* Classe parente à consulter */
- GSerializableObject *value; /* Valeur de la rotation */
-
- parent = G_ARCH_OPERAND_CLASS(g_armv7_rotation_operand_parent_class);
-
- result = parent->store(G_ARCH_OPERAND(operand), storage, pbuf);
-
- if (result)
- {
- value = G_SERIALIZABLE_OBJECT(operand->value);
- result = g_object_storage_pack_object(storage, "operands", value, pbuf);
- }
+ g_clear_object(&operand->value);
- return result;
+ operand->value = instances[0];
+ g_object_ref(G_OBJECT(instances[0]));
}