summaryrefslogtreecommitdiff
path: root/instruction.h
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2010-11-11 11:21:40 +0100
committerTobias Klauser <tklauser@distanz.ch>2010-11-11 11:21:40 +0100
commite0330d9534d8cfeffff81f426df1d3277702b835 (patch)
treeba90c33bf555a4921a1279105beb54e9a9064ce5 /instruction.h
parent556c8e0600546b4edf49d6a70adb5b831cd4e25a (diff)
Implement basic instruction handling
Diffstat (limited to 'instruction.h')
-rw-r--r--instruction.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/instruction.h b/instruction.h
index 57fd1b6..f53c995 100644
--- a/instruction.h
+++ b/instruction.h
@@ -196,9 +196,15 @@ enum {
};
#define R_TYPE_COUNT 0x40
+#define INSTR_ERR -1
+#define PC_INC_NORMAL 0
+#define PC_INC_BY_INSTR 1
+
/* Forward declaration */
struct nios2;
-typedef uint32_t (*instruction_handler)(struct nios2 *cpu, uint32_t opcode);
+typedef int (*instruction_handler)(struct nios2 *cpu, uint32_t opcode);
+
+extern instruction_handler instruction_get_handler(uint32_t code);
#endif /* _INSTRUCTION_H_ */