summaryrefslogtreecommitdiff
path: root/src/arch/operand.h
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2018-05-14 19:40:07 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2018-05-14 19:40:07 (GMT)
commit0286b53bad21abf91cbe17c4772ca9cde6a89cbc (patch)
tree3bec9dc7e118c00ce9c748576b01606a71880ad7 /src/arch/operand.h
parent267b1ae8608ed4bf52de743798e8647c903ee1b4 (diff)
Created an instruction database for Chrysalide.
Diffstat (limited to 'src/arch/operand.h')
-rw-r--r--src/arch/operand.h29
1 files changed, 23 insertions, 6 deletions
diff --git a/src/arch/operand.h b/src/arch/operand.h
index cd140ba..bb7388d 100644
--- a/src/arch/operand.h
+++ b/src/arch/operand.h
@@ -28,6 +28,8 @@
#include <glib-object.h>
+#include "../common/packed.h"
+#include "../format/format.h"
#include "../glibext/gbufferline.h"
@@ -36,12 +38,12 @@
typedef struct _GLoadedBinary GLoadedBinary;
-#define G_TYPE_ARCH_OPERAND g_arch_operand_get_type()
-#define G_ARCH_OPERAND(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), g_arch_operand_get_type(), GArchOperand))
-#define G_IS_ARCH_OPERAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), g_arch_operand_get_type()))
-#define G_ARCH_OPERAND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), G_TYPE_ARCH_OPERAND, GArchOperandClass))
-#define G_IS_ARCH_OPERAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), G_TYPE_ARCH_OPERAND))
-#define G_ARCH_OPERAND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), G_TYPE_ARCH_OPERAND, GArchOperandClass))
+#define G_TYPE_ARCH_OPERAND g_arch_operand_get_type()
+#define G_ARCH_OPERAND(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), G_TYPE_ARCH_OPERAND, GArchOperand))
+#define G_IS_ARCH_OPERAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), G_TYPE_ARCH_OPERAND))
+#define G_ARCH_OPERAND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), G_TYPE_ARCH_OPERAND, GArchOperandClass))
+#define G_IS_ARCH_OPERAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), G_TYPE_ARCH_OPERAND))
+#define G_ARCH_OPERAND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), G_TYPE_ARCH_OPERAND, GArchOperandClass))
/* Définition générique d'un opérande d'architecture (instance) */
@@ -68,4 +70,19 @@ char *g_arch_operand_build_tooltip(const GArchOperand *, const GLoadedBinary *);
+/* --------------------- TRANSPOSITIONS VIA CACHE DES OPERANDES --------------------- */
+
+
+/* Depuis "storage.h" : définition d'une conservation d'instructions d'assemblage (instance) */
+typedef struct _GAsmStorage GAsmStorage;
+
+
+/* Charge un opérande depuis une mémoire tampon. */
+GArchOperand *g_arch_operand_load(GAsmStorage *, GBinFormat *, packed_buffer *);
+
+/* Sauvegarde un opérande dans une mémoire tampon. */
+bool g_arch_operand_store(const GArchOperand *, GAsmStorage *, packed_buffer *);
+
+
+
#endif /* _ARCH_OPERAND_H */