summaryrefslogtreecommitdiff
path: root/src/decomp/context-int.h
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2013-01-20 13:10:06 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2013-01-20 13:10:06 (GMT)
commit37fd2f1329c56078bc8a8b2fc955aa001c109c01 (patch)
tree71bcce9a3eaf6b7569d1f1d3e057752ae517ebde /src/decomp/context-int.h
parenta9bbd894bd25f7c2bb72fb7d4064b19377d90c6d (diff)
Took care of shared allocations between blocks when converting registers.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@326 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/decomp/context-int.h')
-rw-r--r--src/decomp/context-int.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/decomp/context-int.h b/src/decomp/context-int.h
index 7e5b1b0..974f5ae 100644
--- a/src/decomp/context-int.h
+++ b/src/decomp/context-int.h
@@ -36,8 +36,12 @@
/* Duplique un contexte de compilation. */
typedef GDecContext * (* dup_dec_context_fc) (GDecContext *);
+/* Propage un registre alloué et attendu par la suite. */
+typedef void (* spread_reg_fc) (GDecContext *, GArchRegister *, GDecInstruction *);
+
/* Convertit un registre machine en un pseudo-registre. */
-typedef GDecInstruction * (* convert_register_fc) (GDecContext *, gpointer, bool);
+typedef GDecInstruction * (* convert_register_fc) (GDecContext *, gpointer, bool, vmpa_t);
+
/* Définition d'une context décompilée (instance) */
@@ -46,11 +50,15 @@ struct _GDecContext
GObject parent; /* A laisser en premier */
dup_dec_context_fc dup; /* Duplication de contexte */
+ spread_reg_fc spread; /* Propagation des allocations */
convert_register_fc convert_reg; /* Traduction des registres */
GExeFormat *format; /* Format binaire concerné */
GBinRoutine *routine; /* Routine visée par l'opérat° */
+ GRAccessList *awaited; /* Allocations attendues */
+ GHashTable *shared; /* Allocations à propager */
+
GDecInstruction *list; /* Chaîne décompilée */
};
@@ -67,6 +75,12 @@ struct _GDecContextClass
/* Duplique partiellement un contexte de compilation. */
void _g_dec_context_dup(GDecContext *, GDecContext *);
+/* Sauvegarde une conversion de registre si elle est attendue. */
+void g_dec_context_notify_reg_alloc(GDecContext *, GArchRegister *, GDecInstruction *, vmpa_t);
+
+/* Fournit une conversiond de registre déjà faite et attendue. */
+GDecInstruction *g_dec_context_get_awaited_alloc(GDecContext *, GArchRegister *, vmpa_t);
+
#endif /* _DECOMP_CONTEXT_INT_H */