diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2018-05-28 17:37:46 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2018-05-28 17:37:46 (GMT) |
commit | 9f5ed46de568d3db882c939c8ca9d0117bff3369 (patch) | |
tree | 9d2090cd640e54379dc1b982e03dc284b2d23ae7 /plugins/arm/v7/operands/register.c | |
parent | 2fd186a84cba4f39f6f1bb8bd34d52b4e1d4f814 (diff) |
Relied on register objects as often as possible.
Diffstat (limited to 'plugins/arm/v7/operands/register.c')
-rw-r--r-- | plugins/arm/v7/operands/register.c | 30 |
1 files changed, 2 insertions, 28 deletions
diff --git a/plugins/arm/v7/operands/register.c b/plugins/arm/v7/operands/register.c index e6b3751..4a5f852 100644 --- a/plugins/arm/v7/operands/register.c +++ b/plugins/arm/v7/operands/register.c @@ -24,10 +24,7 @@ #include "register.h" -#include <arch/register-int.h> - - -#include "../../register.h" +#include <arch/operands/register-int.h> @@ -266,6 +263,7 @@ bool g_armv7_register_operand_is_written_back(const GArmV7RegisterOperand *opera } + /* ---------------------------------------------------------------------------------- */ /* TRANSPOSITIONS VIA CACHE DES OPERANDES */ /* ---------------------------------------------------------------------------------- */ @@ -290,8 +288,6 @@ static bool g_armv7_register_operand_unserialize(GArmV7RegisterOperand *operand, { bool result; /* Bilan à retourner */ GArchOperandClass *parent; /* Classe parente à consulter */ - uint8_t index; /* Identifiant de registre */ - GArmV7Register *reg; /* Registre à intégrer */ uint8_t wback; /* Mise à jour après coup ? */ parent = G_ARCH_OPERAND_CLASS(g_armv7_register_operand_parent_class); @@ -300,21 +296,6 @@ static bool g_armv7_register_operand_unserialize(GArmV7RegisterOperand *operand, if (result) { - result = extract_packed_buffer(pbuf, &index, sizeof(uint8_t), false); - - if (result) - { - reg = g_armv7_register_new(index); - result = (reg != NULL); - } - - if (result) - G_REGISTER_OPERAND(operand)->reg = G_ARCH_REGISTER(reg); - - } - - if (result) - { result = extract_packed_buffer(pbuf, &wback, sizeof(uint8_t), false); if (result) @@ -345,7 +326,6 @@ static bool g_armv7_register_operand_serialize(const GArmV7RegisterOperand *oper { bool result; /* Bilan à retourner */ GArchOperandClass *parent; /* Classe parente à consulter */ - uint8_t index; /* Identifiant de registre */ uint8_t wback; /* Mise à jour après coup ? */ parent = G_ARCH_OPERAND_CLASS(g_armv7_register_operand_parent_class); @@ -354,12 +334,6 @@ static bool g_armv7_register_operand_serialize(const GArmV7RegisterOperand *oper if (result) { - index = g_arm_register_get_index(G_ARM_REGISTER(G_REGISTER_OPERAND(operand)->reg)); - result = extend_packed_buffer(pbuf, &index, sizeof(uint8_t), false); - } - - if (result) - { wback = (operand->write_back ? 1 : 0); result = extend_packed_buffer(pbuf, &wback, sizeof(uint8_t), false); } |