diff options
Diffstat (limited to 'sim/d10v')
-rw-r--r-- | sim/d10v/ChangeLog | 21 | ||||
-rw-r--r-- | sim/d10v/Makefile.in | 1 | ||||
-rw-r--r-- | sim/d10v/interp.c | 18 | ||||
-rw-r--r-- | sim/d10v/simops.c | 8 |
4 files changed, 46 insertions, 2 deletions
diff --git a/sim/d10v/ChangeLog b/sim/d10v/ChangeLog index 73b8c92..2c0297a 100644 --- a/sim/d10v/ChangeLog +++ b/sim/d10v/ChangeLog @@ -1,3 +1,24 @@ +1999-04-02 Keith Seitz <keiths@cygnus.com> + + * interp.c (ui_loop_hook_counter): New global (when NEED_UI_LOOP_HOOK + defined). + (sim_resume): If the counter has expired, call the ui_loop_hook, + if defined. + (UI_LOOP_POLL_INTERVAL): Define. Used to tweak the frequency of + ui_loop_hook calls. + * Makefile.in (SIM_EXTRA_CFLAGS): Include NEED_UI_LOOP_HOOK. + +Wed Mar 10 19:32:13 1999 Nick Clifton <nickc@cygnus.com> + + * simops.c: If load instruction with auto increment/decrement + addressing is used when the destination register is the same as + the address register, then ignore the auto increment/decrement. + +Wed Mar 10 19:32:13 1999 Martin M. Hunt <hunt@cygnus.com> + + * simops.c (OP_5F00): Ifdef SYS_stat case because + not all systems have it defined. + 1999-01-26 Jason Molenda (jsm@bugshack.cygnus.com) * simops.c (OP_5607): Correct saturation comparison/assignment. diff --git a/sim/d10v/Makefile.in b/sim/d10v/Makefile.in index 0732327..602ffff 100644 --- a/sim/d10v/Makefile.in +++ b/sim/d10v/Makefile.in @@ -20,6 +20,7 @@ SIM_OBJS = interp.o table.o simops.o endian.o sim-load.o SIM_EXTRA_CLEAN = clean-extra +SIM_EXTRA_CFLAGS = -DNEED_UI_LOOP_HOOK INCLUDE = d10v_sim.h $(srcroot)/include/callback.h targ-vals.h endian.c diff --git a/sim/d10v/interp.c b/sim/d10v/interp.c index 17c964f..4602ed2 100644 --- a/sim/d10v/interp.c +++ b/sim/d10v/interp.c @@ -39,6 +39,17 @@ static char *add_commas PARAMS ((char *buf, int sizeof_buf, unsigned long value) extern void sim_set_profile PARAMS ((int n)); extern void sim_set_profile_size PARAMS ((int n)); +#ifdef NEED_UI_LOOP_HOOK +/* How often to run the ui_loop update, when in use */ +#define UI_LOOP_POLL_INTERVAL 0x14000 + +/* Counter for the ui_loop_hook update */ +static long ui_loop_hook_counter = UI_LOOP_POLL_INTERVAL; + +/* Actual hook to call to run through gdb's gui event loop */ +extern int (*ui_loop_hook) PARAMS ((int signo)); +#endif /* NEED_UI_LOOP_HOOK */ + #ifndef INLINE #if defined(__GNUC__) && defined(__OPTIMIZE__) #define INLINE __inline__ @@ -784,6 +795,13 @@ sim_resume (sd, step, siggnal) /* Writeback all the DATA / PC changes */ SLOT_FLUSH (); +#ifdef NEED_UI_LOOP_HOOK + if (ui_loop_hook != NULL && ui_loop_hook_counter-- < 0) + { + ui_loop_hook_counter = UI_LOOP_POLL_INTERVAL; + ui_loop_hook (0); + } +#endif /* NEED_UI_LOOP_HOOK */ } while ( !State.exception && !stop_simulator); diff --git a/sim/d10v/simops.c b/sim/d10v/simops.c index c64ba42..0614c9f 100644 --- a/sim/d10v/simops.c +++ b/sim/d10v/simops.c @@ -1333,7 +1333,8 @@ OP_6601 () trace_input ("ld2w", OP_REG_OUTPUT, OP_POSTDEC, OP_VOID); tmp = RLW (addr); SET_GPR32 (OP[0], tmp); - INC_ADDR (OP[1], -4); + if (OP[0] != OP[1]) + INC_ADDR (OP[1], -4); trace_output_32 (tmp); } @@ -1346,7 +1347,8 @@ OP_6201 () trace_input ("ld2w", OP_REG_OUTPUT, OP_POSTINC, OP_VOID); tmp = RLW (addr); SET_GPR32 (OP[0], tmp); - INC_ADDR (OP[1], 4); + if (OP[0] != OP[1]) + INC_ADDR (OP[1], 4); trace_output_32 (tmp); } @@ -3124,6 +3126,7 @@ OP_5F00 () trace_output_void (); break; +#ifdef TARGET_SYS_stat case TARGET_SYS_stat: trace_input ("<stat>", OP_R0, OP_R1, OP_VOID); /* stat system call */ @@ -3152,6 +3155,7 @@ OP_5F00 () } trace_output_16 (result); break; +#endif case TARGET_SYS_chown: trace_input ("<chown>", OP_R0, OP_R1, OP_R2); |