summaryrefslogtreecommitdiff
path: root/src/arch/dalvik/operands
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/dalvik/operands')
-rw-r--r--src/arch/dalvik/operands/register.c26
-rw-r--r--src/arch/dalvik/operands/register.h4
2 files changed, 29 insertions, 1 deletions
diff --git a/src/arch/dalvik/operands/register.c b/src/arch/dalvik/operands/register.c
index 22c210e..b2b8db9 100644
--- a/src/arch/dalvik/operands/register.c
+++ b/src/arch/dalvik/operands/register.c
@@ -24,7 +24,6 @@
#include "register.h"
-#include "../register.h"
#include "../../operand-int.h"
@@ -173,6 +172,31 @@ GArchOperand *g_dalvik_register_operand_new(const bin_t *data, off_t *pos, off_t
/******************************************************************************
* *
+* Paramètres : reg = registre déjà en place. *
+* *
+* Description : Crée un opérande visant un registre Dalvik. *
+* *
+* Retour : Opérande mis en place. *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+GArchOperand *g_dalvik_register_operand_new_from_existing(GDalvikRegister *reg)
+{
+ GDalvikRegisterOperand *result; /* Structure à retourner */
+
+ result = g_object_new(G_TYPE_DALVIK_REGISTER_OPERAND, NULL);
+
+ result->reg = reg;
+
+ return G_ARCH_OPERAND(result);
+
+}
+
+
+/******************************************************************************
+* *
* Paramètres : a = premier opérande à consulter. *
* b = second opérande à consulter. *
* *
diff --git a/src/arch/dalvik/operands/register.h b/src/arch/dalvik/operands/register.h
index 00b05fb..c3510b1 100644
--- a/src/arch/dalvik/operands/register.h
+++ b/src/arch/dalvik/operands/register.h
@@ -28,6 +28,7 @@
#include <glib-object.h>
+#include "../register.h"
#include "../../operand.h"
#include "../../../common/endianness.h"
@@ -54,6 +55,9 @@ GType g_dalvik_register_operand_get_type(void);
/* Crée un opérande visant un registre Dalvik. */
GArchOperand *g_dalvik_register_operand_new(const bin_t *, off_t *, off_t, bool *, MemoryDataSize, SourceEndian);
+/* Crée un opérande visant un registre Dalvik. */
+GArchOperand *g_dalvik_register_operand_new_from_existing(GDalvikRegister *);
+
#endif /* _ARCH_DALVIK_OPERANDS_REGISTER_H */