diff options
author | Tobias Klauser <tklauser@distanz.ch> | 2010-11-18 19:08:21 +0100 |
---|---|---|
committer | Tobias Klauser <tklauser@distanz.ch> | 2010-11-18 19:08:21 +0100 |
commit | ac2f8380359bbbd7852b58a60d6bff5debc7359a (patch) | |
tree | 44a0f9ecd638ec9869d48a1aaee7c754356bd27b /instruction.c | |
parent | 8db4c483d5e3941c9352ab5caa0808b391adfbfb (diff) |
Fix R-type decoding, seems to work now with images/zImage
Diffstat (limited to 'instruction.c')
-rw-r--r-- | instruction.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/instruction.c b/instruction.c index 4e288db..f41ad63 100644 --- a/instruction.c +++ b/instruction.c @@ -814,11 +814,10 @@ static int handle_r_type_instr(struct nios2 *cpu, uint32_t code) return INSTR_ERR; } + dbg(" R: %s (%08x)\n", r_type_instructions[opx].name, code); handle_instr = r_type_instructions[opx].handler; - if (unlikely(handle_instr == NULL)) { - err("Invalid instruction %08x\n", code); + if (unlikely(handle_instr == NULL)) return INSTR_ERR; - } return handle_instr(cpu, code); } @@ -829,7 +828,7 @@ instruction_handler instruction_get_handler(uint32_t code) if (unlikely(op >= I_TYPE_COUNT)) return NULL; - dbg("%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; } |