summaryrefslogtreecommitdiff
path: root/src/arch/immediate.h
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2014-12-25 16:31:33 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2014-12-25 16:31:33 (GMT)
commit19e1a97fafb1b73d0efcd995b31951daf1a5c661 (patch)
tree9cbc897ddb1d3005fb8dadfa3ad830c607acdddd /src/arch/immediate.h
parent9cab778bfaaca2589a383445e8569d99d73374d5 (diff)
Cleaned all the code for immediate operands.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@444 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/arch/immediate.h')
-rw-r--r--src/arch/immediate.h35
1 files changed, 20 insertions, 15 deletions
diff --git a/src/arch/immediate.h b/src/arch/immediate.h
index 99d1b7f..a218c16 100644
--- a/src/arch/immediate.h
+++ b/src/arch/immediate.h
@@ -27,6 +27,7 @@
#include <glib-object.h>
#include <stdbool.h>
+#include <stdint.h>
#include "archbase.h"
@@ -46,10 +47,12 @@ typedef enum _ImmOperandDisplay
} ImmOperandDisplay;
-#define G_TYPE_IMM_OPERAND g_imm_operand_get_type()
-#define G_IMM_OPERAND(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), g_imm_operand_get_type(), GImmOperand))
-#define G_IS_IMM_OPERAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), g_imm_operand_get_type()))
-#define G_IMM_OPERAND_GET_IFACE(inst) (G_TYPE_INSTANCE_GET_INTERFACE((inst), g_imm_operand_get_type(), GImmOperandIface))
+#define G_TYPE_IMM_OPERAND g_imm_operand_get_type()
+#define G_IMM_OPERAND(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), g_imm_operand_get_type(), GImmOperand))
+#define G_IS_IMM_OPERAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), g_imm_operand_get_type()))
+#define G_IMM_OPERAND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), G_TYPE_IMM_OPERAND, GImmOperandClass))
+#define G_IS_IMM_OPERAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), G_TYPE_IMM_OPERAND))
+#define G_IMM_OPERAND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), G_TYPE_IMM_OPERAND, GImmOperandClass))
/* Définition d'un opérande de valeur numérique (instance) */
@@ -63,21 +66,23 @@ typedef struct _GImmOperandClass GImmOperandClass;
GType g_imm_operand_get_type(void);
/* Crée un opérande réprésentant une valeur numérique. */
-GArchOperand *_g_imm_operand_new_from_data(MemoryDataSize, const bin_t *, off_t *, off_t, bool *, SourceEndian);
+GArchOperand *_g_imm_operand_new_from_data(MemoryDataSize, const bin_t *, vmpa2t *, off_t, bool *, SourceEndian);
-#define g_imm_operand_new_from_data(size, data, pos, len, endian) _g_imm_operand_new_from_data(size, data, pos, len, NULL, endian)
+#define g_imm_operand_new_from_data(size, data, pos, len, endian) \
+ _g_imm_operand_new_from_data(size, data, pos, len, NULL, endian)
/* Crée un opérande réprésentant une valeur numérique. */
-GArchOperand *_g_imm_operand_new_from_data2(MemoryDataSize, const bin_t *, vmpa2t *, off_t, bool *, SourceEndian);
-
-#define g_imm_operand_new_from_data2(size, data, pos, len, endian) _g_imm_operand_new_from_data2(size, data, pos, len, NULL, endian)
-
-/* Crée un opérande réprésentant une valeur numérique. */
-GArchOperand *g_imm_operand_new_from_value(MemoryDataSize, ...);
+GArchOperand *g_imm_operand_new_from_value(MemoryDataSize, uint64_t);
/* Renseigne la taille de la valeur indiquée à la construction. */
MemoryDataSize g_imm_operand_get_size(const GImmOperand *);
+/* Fournit la valeur portée par une opérande numérique. */
+bool g_imm_operand_get_value(const GImmOperand *, MemoryDataSize, ...);
+
+/* Définit la nouvelle valeur de l'opérande à une valeur. */
+bool g_imm_operand_set_value(GImmOperand *, MemoryDataSize, uint64_t);
+
/* Précise si des zéro doivent compléter l'affichage ou non. */
void g_imm_operand_pad(GImmOperand *, bool);
@@ -97,13 +102,13 @@ bool g_imm_operand_is_negative(const GImmOperand *);
bool g_imm_operand_is_null(const GImmOperand *);
/* Convertit une valeur immédiate en adresse de type vmpa_t. */
-bool g_imm_operand_to_vmpa_t(const GImmOperand *, vmpa_t *);
+bool g_imm_operand_to_vmpa_t(const GImmOperand *, vmpa_t *) __attribute__ ((deprecated));
/* Convertit une valeur immédiate en valeur de type size_t. */
-bool g_imm_operand_to_size_t(const GImmOperand *, size_t *, bool *);
+bool g_imm_operand_to_size_t(const GImmOperand *, size_t *, bool *) __attribute__ ((deprecated));
/* Convertit une valeur immédiate en valeur de type off_t. */
-bool g_imm_operand_to_off_t(const GImmOperand *, off_t *, bool *);
+bool g_imm_operand_to_off_t(const GImmOperand *, off_t *, bool *) __attribute__ ((deprecated));