From 44d32d23a7e5cd6b86f869f23eae60cc204ba2d0 Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Fri, 19 Nov 2010 11:02:15 +0100 Subject: Fix I-type instruction format, needs explicit bitfield length --- instruction.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'instruction.h') diff --git a/instruction.h b/instruction.h index cf709dc..1992b6a 100644 --- a/instruction.h +++ b/instruction.h @@ -19,7 +19,7 @@ /* I-Type instruction */ struct i_type { uint8_t op:6; - uint16_t imm16; + uint16_t imm16:16; uint8_t b:5; uint8_t a:5; } __packed; @@ -194,6 +194,7 @@ enum { /* * Return values for instruction handlers */ +#define INSTR_UNIMPL -2 /* Unimplemented instruction */ #define INSTR_ERR -1 /* Error in instruction */ #define PC_INC_NORMAL 0 /* Normal PC increment after instruction */ #define PC_INC_BY_INSTR 1 /* PC got incremented by instruction */ -- cgit v1.2.3-54-g00ecf