summaryrefslogtreecommitdiff
path: root/src/arch/processor-int.h
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2015-10-06 21:23:05 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2015-10-06 21:23:05 (GMT)
commitf9c4cfc72cd8d7eb08ded8287fc5af1497567f8b (patch)
tree7ca7e276cb24864a787994937f953cc0268cbef0 /src/arch/processor-int.h
parent0588195aedf09d4dfcee16dfd1cb3856961b1e4e (diff)
Optimized the search of instructions a little bit using routine coverages.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@587 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/arch/processor-int.h')
-rw-r--r--src/arch/processor-int.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/arch/processor-int.h b/src/arch/processor-int.h
index f4562f6..fcd7a52 100644
--- a/src/arch/processor-int.h
+++ b/src/arch/processor-int.h
@@ -61,6 +61,20 @@ typedef GArchInstruction * (* decode_instruction_fc) (const GArchProcessor *, GP
typedef GArchInstruction * (* disass_instr_fc) (const GArchProcessor *, GProcContext *, const GBinContent *, vmpa2t *);
+
+/* Couverture d'un groupe d'instructions */
+typedef struct _instr_coverage
+{
+ mrange_t range; /* Couverture du groupement */
+
+ size_t start; /* Indice de départ */
+ size_t count; /* Quantité d'inclusions */
+
+} instr_coverage;
+
+
+
+
/* Définition générique d'un processeur d'architecture (instance) */
struct _GArchProcessor
{
@@ -77,6 +91,10 @@ struct _GArchProcessor
size_t instr_allocated; /* Taille de la liste allouée */
size_t instr_count; /* Taille de la liste aplatie */
+ instr_coverage *coverages; /* Liste de couvertures */
+ size_t cov_allocated; /* Taille de la liste allouée */
+ size_t cov_count; /* Taille de la liste utilisée */
+
};