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.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'instruction.c') diff --git a/instruction.c b/instruction.c index 4bd216b..133470d 100644 --- a/instruction.c +++ b/instruction.c @@ -34,7 +34,7 @@ static int unimplemented(struct nios2 *cpu, uint32_t code) info("Unsupported instruction %s (%08x) @ PC %08x\n", instruction_get_string(code), code, cpu->pc); - return PC_INC_NORMAL; + return INSTR_UNIMPL; } /* @@ -62,7 +62,6 @@ static int call(struct nios2 *cpu, uint32_t code) cpu->gp_regs[ra] = cpu->pc + 4; cpu->pc = (instr->imm26 * 4) | (cpu->pc & 0xF0000000); - dbg("pc after call: %08x\n", cpu->pc); return PC_INC_BY_INSTR; } @@ -858,7 +857,7 @@ static int handle_r_type_instr(struct nios2 *cpu, uint32_t code) if (unlikely(opx >= R_TYPE_COUNT)) return INSTR_ERR; - dbg(" R: %s (%08x)\n", r_type_instructions[opx].name, code); +// dbg(" R: %s (%08x)\n", r_type_instructions[opx].name, code); handle_instr = r_type_instructions[opx].handler; if (unlikely(handle_instr == NULL)) return INSTR_ERR; @@ -872,7 +871,7 @@ instruction_handler instruction_get_handler(uint32_t code) if (unlikely(op >= I_TYPE_COUNT)) return NULL; - dbg("I: %s (%08x)\n", i_type_instructions[op].name, code); +// dbg("I: %s (%08x)\n", i_type_instructions[op].name, code); return i_type_instructions[op].handler; } -- cgit v1.2.3-54-g00ecf