From d81352b8b83eb8cd3f4d81860580e9ba7864834a Mon Sep 17 00:00:00 2001 From: Jeff Law Date: Tue, 3 Sep 1996 16:25:51 +0000 Subject: * interp.c: OP should be an array of 32bit operands! (v850_callback): Declare. (do_format_5): Fix extraction of OP[0]. (sim_size): Remove debugging printf. (sim_set_callbacks): Do something useful. (sim_stop_reason): Gross hacks to get c-torture running. * simops.c: Simplify code for computing targets of bCC insns. Invert 's' bit if 'ov' bit is set for some instructions. Fix 'cy' bit handling for numerous instructions. Make the simulator stop when a halt instruction is encountered. Very crude support for emulated syscalls (trap 0). * v850_sim.h: Include "callback.h" and declare v850_callback. Items in the operand array are 32bits. Fixes & syscall stuff. --- sim/v850/interp.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'sim/v850/interp.c') diff --git a/sim/v850/interp.c b/sim/v850/interp.c index 71c391e..b99dea6 100644 --- a/sim/v850/interp.c +++ b/sim/v850/interp.c @@ -8,7 +8,10 @@ #define MEM_SIZE 18 /* V850 memory size is 18 bits XXX */ -uint16 OP[4]; +host_callback *v850_callback; + + +uint32 OP[4]; static struct hash_entry *lookup_hash PARAMS ((uint32 ins)); @@ -161,7 +164,7 @@ do_format_5 (insn) struct hash_entry *h; h = lookup_hash (insn); - OP[0] = ((insn & 0x3f) | (((insn >> 17) & 0x7fff) << 6)) << 1; + OP[0] = (((insn & 0x3f) << 15) | ((insn >> 17) & 0x7fff)) << 1; OP[1] = (insn >> 11) & 0x1f; (h->ops->func) (); } @@ -233,7 +236,6 @@ sim_size (power) fprintf (stderr,"Memory allocation failed.\n"); exit(1); } - printf ("Allocated %d bytes memory and\n",1<