aboutsummaryrefslogtreecommitdiff
path: root/sim/v850/interp.c
diff options
context:
space:
mode:
authorJeff Law <law@redhat.com>1996-08-30 04:27:48 +0000
committerJeff Law <law@redhat.com>1996-08-30 04:27:48 +0000
commite9b6cbaca5f9b88ec83e8eb747b3013736873de0 (patch)
treefe25ef30ed9e0f5d83052c5b5c7fd071c4cb485f /sim/v850/interp.c
parent3095b8dfc59db40a8d91247be6428537966bb924 (diff)
downloadfsf-binutils-gdb-e9b6cbaca5f9b88ec83e8eb747b3013736873de0.zip
fsf-binutils-gdb-e9b6cbaca5f9b88ec83e8eb747b3013736873de0.tar.gz
fsf-binutils-gdb-e9b6cbaca5f9b88ec83e8eb747b3013736873de0.tar.bz2
* interp.c (do_format_5): Get operands correctly and
call the target function. (sim_resume): Don't do a PC update for format 5 instructions. * simops.c: Handle "jarl" and "jmp" instructions.
Diffstat (limited to 'sim/v850/interp.c')
-rw-r--r--sim/v850/interp.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sim/v850/interp.c b/sim/v850/interp.c
index 1cd990e..d824590 100644
--- a/sim/v850/interp.c
+++ b/sim/v850/interp.c
@@ -186,7 +186,13 @@ static void
do_format_5 (insn)
uint32 insn;
{
+ struct hash_entry *h;
printf("format 5 0x%x\n", insn);
+
+ h = lookup_hash (insn);
+ OP[0] = ((insn & 0x3f) | (((insn >> 17) & 0x7fff) << 6)) << 1;
+ OP[1] = (insn >> 11) & 0x1f;
+ (h->ops->func) ();
}
static void
@@ -380,7 +386,7 @@ sim_resume (step, siggnal)
else if ((opcode & 0x3E) == 0x3C)
{
do_format_5 (inst);
- PC += 4;
+ /* No PC update, it's done in the instruction. */
}
else if ((opcode & 0x3F) == 0x3E)
{