summaryrefslogtreecommitdiff
path: root/src/arch
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2022-08-17 21:37:24 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2022-08-17 21:37:24 (GMT)
commit429b54556283116a29c5d699af0cf891bb1c1055 (patch)
treea8f9063b9a9590d2960e9463c457bead29916445 /src/arch
parentdbe336e27d5bcf2d913750576f868353ca4ba041 (diff)
Disable the extra data storage inside the GObject structure.
Diffstat (limited to 'src/arch')
-rw-r--r--src/arch/instruction-int.h4
-rw-r--r--src/arch/instructions/undefined-int.h4
-rw-r--r--src/arch/operand-int.h4
-rw-r--r--src/arch/operands/immediate-int.h4
-rw-r--r--src/arch/operands/known.c12
-rw-r--r--src/arch/operands/proxy.c12
-rw-r--r--src/arch/operands/target-int.h4
7 files changed, 22 insertions, 22 deletions
diff --git a/src/arch/instruction-int.h b/src/arch/instruction-int.h
index f8998a1..7dbbe27 100644
--- a/src/arch/instruction-int.h
+++ b/src/arch/instruction-int.h
@@ -90,7 +90,7 @@ struct _GArchInstruction
{
GObject parent; /* A laisser en premier */
-#if __SIZEOF_INT__ == __SIZEOF_LONG__
+#if 1 //__SIZEOF_INT__ == __SIZEOF_LONG__
/**
* L'inclusion des informations suivantes dépend de l'architecture.
@@ -162,7 +162,7 @@ struct _GArchInstructionClass
* Accès aux informations éventuellement déportées.
*/
-#if __SIZEOF_INT__ == __SIZEOF_LONG__
+#if 1 //__SIZEOF_INT__ == __SIZEOF_LONG__
# define GET_ARCH_INSTR_EXTRA(ins) (instr_extra_data_t *)&ins->extra
diff --git a/src/arch/instructions/undefined-int.h b/src/arch/instructions/undefined-int.h
index 491ec31..a9b7627 100644
--- a/src/arch/instructions/undefined-int.h
+++ b/src/arch/instructions/undefined-int.h
@@ -73,9 +73,9 @@ struct _GUndefInstructionClass
* Accès aux informations éventuellement déportées.
*/
-#if __SIZEOF_INT__ == __SIZEOF_LONG__
+#if 1 //__SIZEOF_INT__ == __SIZEOF_LONG__
-# define GET_UNDEF_INSTR_EXTRA(ins) (undef_extra_data_t *)&ins->extra
+# define GET_UNDEF_INSTR_EXTRA(ins) ((undef_extra_data_t *)&((GArchInstruction *)ins)->extra)
#else
diff --git a/src/arch/operand-int.h b/src/arch/operand-int.h
index d424e94..e78c2b0 100644
--- a/src/arch/operand-int.h
+++ b/src/arch/operand-int.h
@@ -88,7 +88,7 @@ struct _GArchOperand
{
GObject parent; /* A laisser en premier */
-#if __SIZEOF_INT__ == __SIZEOF_LONG__
+#if 1 //__SIZEOF_INT__ == __SIZEOF_LONG__
/**
* L'inclusion des informations suivantes dépend de l'architecture.
@@ -129,7 +129,7 @@ struct _GArchOperandClass
* Accès aux informations éventuellement déportées.
*/
-#if __SIZEOF_INT__ == __SIZEOF_LONG__
+#if 1 //__SIZEOF_INT__ == __SIZEOF_LONG__
# define GET_ARCH_OP_EXTRA(op) (operand_extra_data_t *)&op->extra
diff --git a/src/arch/operands/immediate-int.h b/src/arch/operands/immediate-int.h
index 46bc3ce..d2313f5 100644
--- a/src/arch/operands/immediate-int.h
+++ b/src/arch/operands/immediate-int.h
@@ -70,9 +70,9 @@ struct _GImmOperandClass
* Accès aux informations éventuellement déportées.
*/
-#if __SIZEOF_INT__ == __SIZEOF_LONG__
+#if 1 //__SIZEOF_INT__ == __SIZEOF_LONG__
-# define GET_IMM_OP_EXTRA(op) (immop_extra_data_t *)&op->extra
+# define GET_IMM_OP_EXTRA(op) ((immop_extra_data_t *)&((GArchOperand *)op)->extra)
#else
diff --git a/src/arch/operands/known.c b/src/arch/operands/known.c
index a4b3844..152bdac 100644
--- a/src/arch/operands/known.c
+++ b/src/arch/operands/known.c
@@ -292,12 +292,12 @@ GArchOperand *g_known_imm_operand_new(const GImmOperand *old, const char *alt)
static int g_known_imm_operand_compare(const GKnownImmOperand *a, const GKnownImmOperand *b, bool lock)
{
int result; /* Bilan à retourner */
- lockable_obj_extra_t *ea; /* Données insérées à consulter*/
- lockable_obj_extra_t *eb; /* Données insérées à consulter*/
+ immop_extra_data_t *ea; /* Données insérées à consulter*/
+ immop_extra_data_t *eb; /* Données insérées à consulter*/
GArchOperandClass *class; /* Classe parente normalisée */
- ea = GET_GOBJECT_EXTRA(G_OBJECT(a), lockable_obj_extra_t);
- eb = GET_GOBJECT_EXTRA(G_OBJECT(b), lockable_obj_extra_t);
+ ea = GET_IMM_OP_EXTRA(G_IMM_OPERAND(a));
+ eb = GET_IMM_OP_EXTRA(G_IMM_OPERAND(b));
if (lock)
{
@@ -364,10 +364,10 @@ static void g_known_imm_operand_print(const GKnownImmOperand *operand, GBufferLi
static guint g_known_imm_operand_hash(const GKnownImmOperand *operand, bool lock)
{
guint result; /* Valeur à retourner */
- lockable_obj_extra_t *extra; /* Données insérées à consulter*/
+ immop_extra_data_t *extra; /* Données insérées à consulter*/
GArchOperandClass *class; /* Classe parente normalisée */
- extra = GET_GOBJECT_EXTRA(G_OBJECT(operand), lockable_obj_extra_t);
+ extra = GET_IMM_OP_EXTRA(G_IMM_OPERAND(operand));
if (lock)
LOCK_GOBJECT_EXTRA(extra);
diff --git a/src/arch/operands/proxy.c b/src/arch/operands/proxy.c
index 91690a7..c71f96f 100644
--- a/src/arch/operands/proxy.c
+++ b/src/arch/operands/proxy.c
@@ -241,12 +241,12 @@ GProxyFeeder *g_proxy_operand_get_feeder(const GProxyOperand *operand)
static int g_proxy_operand_compare(const GProxyOperand *a, const GProxyOperand *b, bool lock)
{
int result; /* Bilan à retourner */
- lockable_obj_extra_t *ea; /* Données insérées à consulter*/
- lockable_obj_extra_t *eb; /* Données insérées à consulter*/
+ operand_extra_data_t *ea; /* Données insérées à consulter*/
+ operand_extra_data_t *eb; /* Données insérées à consulter*/
GArchOperandClass *class; /* Classe parente normalisée */
- ea = GET_GOBJECT_EXTRA(G_OBJECT(a), lockable_obj_extra_t);
- eb = GET_GOBJECT_EXTRA(G_OBJECT(b), lockable_obj_extra_t);
+ ea = GET_ARCH_OP_EXTRA(G_ARCH_OPERAND(a));
+ eb = GET_ARCH_OP_EXTRA(G_ARCH_OPERAND(b));
if (lock)
{
@@ -309,10 +309,10 @@ static void g_proxy_operand_print(const GProxyOperand *operand, GBufferLine *lin
static guint g_proxy_operand_hash(const GProxyOperand *operand, bool lock)
{
guint result; /* Valeur à retourner */
- lockable_obj_extra_t *extra; /* Données insérées à consulter*/
+ operand_extra_data_t *extra; /* Données insérées à consulter*/
GArchOperandClass *class; /* Classe parente normalisée */
- extra = GET_GOBJECT_EXTRA(G_OBJECT(operand), lockable_obj_extra_t);
+ extra = GET_ARCH_OP_EXTRA(G_ARCH_OPERAND(operand));
if (lock)
LOCK_GOBJECT_EXTRA(extra);
diff --git a/src/arch/operands/target-int.h b/src/arch/operands/target-int.h
index ac4cdcd..aa48b2b 100644
--- a/src/arch/operands/target-int.h
+++ b/src/arch/operands/target-int.h
@@ -65,9 +65,9 @@ struct _GTargetOperandClass
* Accès aux informations éventuellement déportées.
*/
-#if __SIZEOF_INT__ == __SIZEOF_LONG__
+#if 1 //__SIZEOF_INT__ == __SIZEOF_LONG__
-# define GET_TARGET_OP_EXTRA(op) (tarop_extra_data_t *)&op->extra
+# define GET_TARGET_OP_EXTRA(op) ((tarop_extra_data_t *)&((GArchOperand *)op)->extra)
#else