summaryrefslogtreecommitdiff
path: root/src/arch/processor-int.h
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2009-05-11 23:42:48 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2009-05-11 23:42:48 (GMT)
commit96cb6971ee3ca529958b8cb1e8e55a6eb4e60eae (patch)
tree68e49f325de3e93ef186d3e078da8ddc473aedf7 /src/arch/processor-int.h
parent80dc0ac97987ad9246bee7c47458a015339453bf (diff)
Reorganized the way the program is built again and added partial support for the JVM.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@63 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/arch/processor-int.h')
-rw-r--r--src/arch/processor-int.h53
1 files changed, 49 insertions, 4 deletions
diff --git a/src/arch/processor-int.h b/src/arch/processor-int.h
index 6ceb7df..873ec72 100644
--- a/src/arch/processor-int.h
+++ b/src/arch/processor-int.h
@@ -25,6 +25,12 @@
#define _ARCH_PROCESSOR_INT_H
+
+
+
+
+
+
#include <stdint.h>
#include <sys/types.h>
@@ -38,11 +44,12 @@
+
/* Décode une instruction dans un flux de données. */
-typedef asm_instr * (* fetch_instruction) (const asm_processor *, const uint8_t *, off_t *, off_t, uint64_t);
+typedef asm_instr * (* fetch_instruction_) (const asm_processor *, const uint8_t *, off_t *, off_t, uint64_t);
/* Traduit une instruction en version humainement lisible. */
-typedef void (* print_instruction) (const asm_processor *, const exe_format *, const asm_instr *, char *, size_t, AsmSyntax);
+typedef void (* print_instruction_) (const asm_processor *, const exe_format *, const asm_instr *, char *, size_t, AsmSyntax);
@@ -50,9 +57,9 @@ typedef void (* print_instruction) (const asm_processor *, const exe_format *, c
struct _asm_processor
{
- fetch_instruction fetch_instr; /* Lecture d'une instruction */
+ fetch_instruction_ fetch_instr; /* Lecture d'une instruction */
- print_instruction print_instr; /* Version lisible d'une instr.*/
+ print_instruction_ print_instr; /* Version lisible d'une instr.*/
};
@@ -68,4 +75,42 @@ char *escape_crlf_bin_string(char *);
+
+
+/* Décode une instruction dans un flux de données. */
+typedef GArchInstruction * (* decode_instruction_fc) (const GArchProcessor *, const bin_t *, off_t *, off_t, vmpa_t);
+
+
+/* Définition générique d'un processeur d'architecture (instance) */
+struct _GArchProcessor
+{
+ GObject parent; /* A laisser en premier */
+
+ SourceEndian endianness; /* Boutisme de l'architecture */
+
+ decode_instruction_fc decode; /* Traduction en instructions */
+
+};
+
+
+
+
+
+
+
+/* Définition générique d'un processeur d'architecture (classe) */
+struct _GArchProcessorClass
+{
+ GObjectClass parent; /* A laisser en premier */
+
+};
+
+
+
+
+
+
+
+
+
#endif /* _ARCH_PROCESSOR_INT_H */