1 2016-01-03 Mike Frysinger <vapier@gentoo.org>
3 * interp.c (sim_open): Update sim_parse_args comment.
5 2016-01-03 Mike Frysinger <vapier@gentoo.org>
7 * configure.ac (SIM_AC_OPTION_HOSTENDIAN): Delete.
8 * configure: Regenerate.
10 2016-01-02 Mike Frysinger <vapier@gentoo.org>
12 * configure: Regenerate.
14 2015-12-30 Mike Frysinger <vapier@gentoo.org>
16 * wrapper.c (d10v_reg_store, d10v_reg_fetch): Define.
17 (sim_open): Call CPU_REG_FETCH/CPU_REG_STORE.
18 (sim_store_register): Rename to ...
19 (d10v_reg_store): ... this. Rename cpu to sd.
20 (sim_fetch_register): Rename to ...
21 (d10v_reg_fetch): ... this. Rename cpu to sd.
23 2015-12-27 Mike Frysinger <vapier@gentoo.org>
25 * Makefile.in (SIM_OBJS): Delete sim-hload.o.
27 2015-12-26 Mike Frysinger <vapier@gentoo.org>
29 * config.in, configure: Regenerate.
31 2015-11-15 Mike Frysinger <vapier@gentoo.org>
33 * Makefile.in (SIM_OBJS): Delete sim-reason.o and sim-stop.o.
35 2015-11-15 Mike Frysinger <vapier@gentoo.org>
37 * interp.c (sim_open): Delete sim_create_inferior call.
39 2015-11-15 Mike Frysinger <vapier@gentoo.org>
41 * d10v_sim.h (d10v_callback): Delete.
42 * interp.c (d10v_callback): Delete.
43 (do_long, do_2_short, do_parallel, set_dmap_register,
44 set_imap_register, xfer_mem, dmem_addr, imem_addr, sim_info,
45 sim_create_inferior): Replace d10v_callback->printf_filtered
47 (sim_open): Delete d10v_callback assignment.
48 * simops.c (move_to_cr, trace_input_func, do_trace_output_flush,
49 do_trace_output_finish, trace_output_40, trace_output_32,
50 trace_output_16, trace_output_void, trace_output_flag, OP_5F20,
51 OP_5201, OP_27000000, OP_3220, OP_3400, OP_3000, OP_6C1F, OP_6C01,
52 OP_6E1F, OP_6E01): Replace d10v_callback->printf_filtered with
53 sim_io_printf and d10v_callback->flush_stdout with
55 (OP_5F00): Likewise. Rename d10v_callback to cb.
57 2015-11-15 Mike Frysinger <vapier@gentoo.org>
59 * Makefile.in (SIM_OBJS): Add sim-reason.o, sim-resume.o, and
61 * d10v_sim.h (struct d10v_memory): Delete fault member.
62 (struct _state): Delete exception member.
63 * interp.c (lookup_hash): Call sim_engine_halt instead of setting
65 (do_2_short, do_parallel): Delete State.exception checks.
66 (sim_size): Mark static.
67 (map_memory): Call sim_engine_halt instead of returning fault.
68 Call xcalloc instead of calloc and checking the return.
69 (dmem_addr): Call sim_engine_halt when phys_size is 0.
70 (imem_addr): Likewise.
71 (stop_simulator, sim_stop, sim_stop_reason): Delete.
72 (sim_resume): Rename to ...
73 (step_once): ... this. Delete State.exception code and move
74 siggnal checking to sim_engine_run.
75 (sim_engine_run): New function.
76 * simops.c (EXCEPTION): Define.
77 (move_to_cr): Call EXCEPTION instead of setting State.exception.
78 (OP_30000000, OP_6401, OP_6001, OP_6000, OP_32010000, OP_31000000,
79 OP_6601, OP_6201, OP_6200, OP_33010000, OP_5201, OP_27000000,
80 OP_2F000000, OP_3220, OP_3200, OP_3400, OP_3000, OP_34000000,
81 OP_6800, OP_6C1F, OP_6801, OP_6C01, OP_36010000, OP_35000000,
82 OP_6A00, OP_6E1F, OP_6A01, OP_6E01, OP_37010000, OP_5FE0): Likewise.
83 (OP_5F20): Call sim_engine_halt instead of setting State.exception.
84 (OP_5F00): Call sim_engine_halt and EXCEPTION instead of setting
87 2015-11-15 Mike Frysinger <vapier@gentoo.org>
89 * d10v_sim.h (struct simops): Add SIM_DESC and SIM_CPU to func args.
90 (SET_CREG, SET_HW_CREG, SET_PSW_BIT): Pass sd and cpu to move_to_cr.
91 (dmem_addr, imem_addr, move_to_cr): Add SIM_DESC and SIM_CPU args.
92 (RB, SW, RW, SLW, RLW): Pass sd and cpu to dmem_addr.
93 * endian.c: Change d10v_sim.h include to sim-main.h.
94 * gencode.c: Likewise. Add SIM_DESC and SIM_CPU args to all OPs.
95 * interp.c (lookup_hash, do_long, do_2_short, do_parallel,
96 map_memory, set_dmap_register, dmap_register, set_imap_register,
97 imap_register, sim_d10v_translate_dmap_addr, xfer_mem,
98 sim_d10v_translate_imap_addr, sim_d10v_translate_addr): Add
99 SIM_DESC and SIM_CPU args and adjust all callers.
101 (sim_open): Do not assign trace_sd.
102 (sim_resume, sim_create_inferior, sim_fetch_register,
103 sim_store_register): Set up cpu from the first one in sd.
104 * simops.c (move_to_cr): Add SIM_DESC and SIM_CPU args.
105 (trace_input_func, trace_input, do_trace_output_finish,
106 do_trace_output_finish, trace_output_40, trace_output_32,
107 trace_output_16, trace_output_void, trace_output_flag): Add
109 (trace_input_func): Likewise. Change trace_sd to sd.
110 (OP_*): Add SIM_DESC and SIM_CPU args to all OP funcs.
112 2015-11-14 Mike Frysinger <vapier@gentoo.org>
114 * interp.c (sim_close): Delete.
116 2015-11-10 Mike Frysinger <vapier@gentoo.org>
118 * interp.c (sim_d10v_translate_dmap_addr): Mark static.
119 (sim_d10v_translate_imap_addr): Likewise.
120 (sim_d10v_translate_addr): Likewise.
122 2015-06-23 Mike Frysinger <vapier@gentoo.org>
124 * configure: Regenerate.
126 2015-06-12 Mike Frysinger <vapier@gentoo.org>
128 * configure: Regenerate.
130 2015-06-12 Mike Frysinger <vapier@gentoo.org>
132 * configure: Regenerate.
134 2015-04-18 Mike Frysinger <vapier@gentoo.org>
136 * sim-main.h (SIM_CPU): Delete.
138 2015-04-18 Mike Frysinger <vapier@gentoo.org>
140 * sim-main.h (sim_cia): Delete.
142 2015-04-17 Mike Frysinger <vapier@gentoo.org>
144 * sim-main.h (CIA_GET, CIA_SET): Delete.
146 2015-04-17 Mike Frysinger <vapier@gentoo.org>
148 * interp.c (d10v_pc_get, d10v_pc_set): New functions.
149 (sim_open): Declare new local var i. Call CPU_PC_FETCH &
150 CPU_PC_STORE for all cpus.
152 2015-04-15 Mike Frysinger <vapier@gentoo.org>
154 * Makefile.in (SIM_OBJS): Delete sim-cpu.o.
155 * sim-main.h (STATE_CPU): Delete.
157 2015-04-13 Mike Frysinger <vapier@gentoo.org>
159 * configure: Regenerate.
161 2015-04-06 Mike Frysinger <vapier@gentoo.org>
163 * Makefile.in (SIM_OBJS): Delete sim-engine.o.
165 2015-04-02 Mike Frysinger <vapier@gentoo.org>
167 * interp.c (lookup_hash): Change SIGILL to GDB_SIGNAL_ILL.
168 (sim_resume): Change SIGBUS/SIGSEGV to GDB_SIGNAL_BUS, SIGILL to
169 GDB_SIGNAL_ILL, and SIGTRAP to GDB_SIGNAL_TRAP.
171 2015-04-01 Mike Frysinger <vapier@gentoo.org>
173 * interp.c (sim_set_profile, sim_set_profile_size): Delete.
175 2015-03-31 Mike Frysinger <vapier@gentoo.org>
177 * Makefile.in (simops.o): New rule.
179 2015-03-30 Mike Frysinger <vapier@gentoo.org>
181 * d10v_sim.h (text, text_start, text_end, prog_bfd): Delete.
182 (SEXT8, SEXT16, SEXT32, MASK32): Undefine.
183 * interp.c: Delete run-sim.h and d10v_sim.h includes. Include
184 sim-main.h and sim-options.h.
185 (myname, sim_kind, init_text_p, prog_bfd_was_opened_p, prog_bfd,
186 text, text_start, text_end, decode_pc, sim_set_profile,
187 sim_set_profile_size, sim_set_trace, sim_set_callbacks,
188 sim_trace, sim_do_command, sim_load): Delete.
189 (INLINE): Delete define.
190 (free_state): New function.
191 (trace_sd): Declare global variable.
192 (sim_open): Rewrite to use new common logic.
193 (sim_close): Delete body.
194 * Makefile.in (SIM_RUN_OBJS, SIM_EXTRA_CFLAGS): Delete.
195 (SIM_OBJS): Change to $(SIM_NEW_COMMON_OBJS).
196 * sim-main.h: New file.
197 * simops.c: Change d10v_sim.h include to sim-main.h.
198 (trace_input_func): Rewrite pc checks to use trace_sd.
200 2015-03-30 Mike Frysinger <vapier@gentoo.org>
202 * Makefile.in (SIM_EXTRA_CFLAGS): Delete -DNEED_UI_LOOP_HOOK.
203 * interp.c [NEED_UI_LOOP_HOOK] (UI_LOOP_POLL_INTERVAL,
204 ui_loop_hook_counter, deprecated_ui_loop_hook): Delete.
205 (sim_resume) [NEED_UI_LOOP_HOOK]: Delete ui code.
207 2015-03-30 Mike Frysinger <vapier@gentoo.org>
209 * Makefile.in (gencode.o, d10v-opc.o): Add $(WARN_CFLAGS).
210 (gencode): Add $(BUILD_LDFLAGS).
211 * endian.c (get_word, get_longword, get_longlong, write_word,
212 write_longword, write_longlong): Convert old style prototypes.
213 * gencode.c: Include string.h.
214 (main): Convert old style prototype.
215 (write_header): Convert old style prototype and fix printf format.
216 (write_template, write_opcodes): Likewise.
217 (check_opcodes): Mark static void.
218 * interp.c: Include inttypes.h and run-sim.h.
219 (hash, lookup_hash, decode_pc, do_long, do_2_short, do_parallel,
220 add_commas, sim_size, sim_write, sim_read, sim_open, sim_close,
221 sim_set_profile, sim_set_profile_size, sim_stop, +sim_resume,
222 sim_info, sim_set_callbacks, sim_stop_reason, sim_fetch_register,
223 sim_store_register, sim_do_command, sim_load): Convert old style
225 (sim_create_inferior): Fix pointer cast to use uintptr_t.
226 * simops.c (strrchr): Delete prototype.
227 (trace_input_func): Mark name static.
228 (trace_input_func, trace_output_void, trace_output_flag): Convert old style
230 (OP_*): Convert old style prototypes.
232 2015-03-30 Mike Frysinger <vapier@gentoo.org>
234 * Makefile.in (interp.o, simops.o, endian.o, table.o): Delete rules.
235 * configure.ac: Call SIM_AC_OPTION_ENDIAN, SIM_AC_OPTION_ALIGNMENT,
236 SIM_AC_OPTION_HOSTENDIAN, SIM_AC_OPTION_ENVIRONMENT, and
237 SIM_AC_OPTION_INLINE.
238 * config.in, configure: Regenerate.
239 * interp.c (sim_trace): Define.
241 2015-03-16 Mike Frysinger <vapier@gentoo.org>
243 * config.in, configure: Regenerate.
245 2015-03-14 Mike Frysinger <vapier@gentoo.org>
247 * Makefile.in (SIM_EXTRA_CFLAGS): Add
248 -DSIM_USE_DEPRECATED_RUN_FRONTEND.
249 (SIM_RUN_OBJS): Set to run.o.
251 2015-03-14 Mike Frysinger <vapier@gentoo.org>
253 * configure.ac (AC_CHECK_HEADERS): Delete.
254 * aclocal.m4, configure: Regenerate.
256 2014-08-19 Alan Modra <amodra@gmail.com>
258 * configure: Regenerate.
260 2014-08-15 Roland McGrath <mcgrathr@google.com>
262 * configure: Regenerate.
263 * config.in: Regenerate.
265 2014-03-10 Mike Frysinger <vapier@gentoo.org>
267 * interp.c (sim_do_command): Add const to cmd.
269 2014-03-05 Mike Frysinger <vapier@gentoo.org>
271 * interp.c (sim_load): Add const to prog.
273 2014-03-04 Mike Frysinger <vapier@gentoo.org>
275 * configure: Regenerate.
277 2013-09-23 Alan Modra <amodra@gmail.com>
279 * configure: Regenerate.
281 2013-06-03 Mike Frysinger <vapier@gentoo.org>
283 * aclocal.m4, configure: Regenerate.
285 2013-05-10 Freddie Chopin <freddie_chopin@op.pl>
287 * configure: Rebuild.
289 2012-06-19 Joel Brobecker <brobecker@adacore.com>
291 * interp.c: #include "config.h" instead of "sysdep.h".
292 Add conditional include of string.h or strings.h, as well as
293 conditional include of stdlib.h.
295 2012-06-15 Joel Brobecker <brobecker@adacore.com>
297 * config.in, configure: Regenerate.
299 2012-05-24 Pedro Alves <palves@redhat.com>
303 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
305 2012-03-24 Mike Frysinger <vapier@gentoo.org>
307 * aclocal.m4, config.in, configure: Regenerate.
309 2011-12-03 Mike Frysinger <vapier@gentoo.org>
311 * aclocal.m4: New file.
312 * configure: Regenerate.
314 2011-10-17 Mike Frysinger <vapier@gentoo.org>
316 * configure.ac: Change include to common/acinclude.m4.
318 2011-10-17 Mike Frysinger <vapier@gentoo.org>
320 * configure.ac: Change AC_PREREQ to 2.64. Delete AC_CONFIG_HEADER
321 call. Replace common.m4 include with SIM_AC_COMMON.
322 * configure: Regenerate.
324 2010-04-14 Mike Frysinger <vapier@gentoo.org>
326 * interp.c (sim_write): Add const to buffer arg.
328 2010-01-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
330 * configure: Regenerate.
332 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
334 * config.in: Regenerate.
335 * configure: Likewise.
337 * configure: Regenerate.
339 2008-07-11 Hans-Peter Nilsson <hp@axis.com>
341 * configure: Regenerate to track ../common/common.m4 changes.
344 2008-06-06 Vladimir Prus <vladimir@codesourcery.com>
345 Daniel Jacobowitz <dan@codesourcery.com>
346 Joseph Myers <joseph@codesourcery.com>
348 * configure: Regenerate.
350 2006-12-21 Hans-Peter Nilsson <hp@axis.com>
352 * acconfig.h: Remove.
353 * config.in: Regenerate.
355 2006-06-13 Richard Earnshaw <rearnsha@arm.com>
357 * configure: Regenerated.
359 2006-06-05 Daniel Jacobowitz <dan@codesourcery.com>
361 * configure: Regenerated.
363 2006-05-31 Daniel Jacobowitz <dan@codesourcery.com>
365 * configure: Regenerated.
367 2006-04-18 Nick Clifton <nickc@redhat.com>
369 * interp.c (sim_stop_reason): Fix typo.
371 2005-11-28 Mark Mitchell <mark@codesourcery.com>
373 * interp.c (gdb/signals.h): Include it.
374 (sim_stop_reason): Use TARGET_SIGNAL_*.
376 2005-03-23 Mark Kettenis <kettenis@gnu.org>
378 * configure: Regenerate.
380 2005-01-14 Andrew Cagney <cagney@gnu.org>
382 * configure.ac: Sinclude aclocal.m4 before common.m4. Add
383 explicit call to AC_CONFIG_HEADER.
384 * configure: Regenerate.
386 2005-01-12 Andrew Cagney <cagney@gnu.org>
388 * configure.ac: Update to use ../common/common.m4.
389 * configure: Re-generate.
391 2005-01-11 Andrew Cagney <cagney@localhost.localdomain>
393 * configure: Regenerated to track ../common/aclocal.m4 changes.
395 2005-01-07 Andrew Cagney <cagney@gnu.org>
397 * configure.ac: Rename configure.in, require autoconf 2.59.
398 * configure: Re-generate.
400 2004-12-08 Hans-Peter Nilsson <hp@axis.com>
402 * configure: Regenerate for ../common/aclocal.m4 update.
404 2004-06-28 Andrew Cagney <cagney@gnu.org>
406 * interp.c (sim_resume): Rename ui_loop_hook to
407 deprecated_ui_loop_hook.
409 2003-10-30 Andrew Cagney <cagney@redhat.com>
411 * simops.c: Replace "struct symbol_cache_entry" with "struct
414 2003-06-22 Andrew Cagney <cagney@redhat.com>
416 * interp.c (xfer_mem): Simplify. Only do a single partial
417 transfer. Problem reported by Tom Rix.
419 2003-05-07 Andrew Cagney <cagney@redhat.com>
421 * interp.c (sim_d10v_translate_addr): Add "regcache" parameter.
422 (sim_d10v_translate_imap_addr): Ditto.
423 (sim_d10v_translate_dmap_addr): Ditto.
424 (xfer_mem): Pass NULL regcache to sim_d10v_translate_addr.
425 (dmem_addr): Pass NULL regcache to sim_d10v_translate_dmap_addr.
426 (dmap_register, imap_register): Add "regcache" parameter.
427 (imem_addr): Pass NULL regcache to sim_d10v_translate_imap_addr.
428 (sim_fetch_register): Pass NULL regcache to imap_register and
431 2003-02-27 Andrew Cagney <cagney@redhat.com>
433 * interp.c (sim_open, sim_create_inferior): Rename _bfd to bfd.
435 2002-11-13 Andrew Cagney <cagney@redhat.com>
437 * simops.c: Include <string.h>.
439 2002-06-17 Andrew Cagney <cagney@redhat.com>
441 * d10v_sim.h (SET_PSW_BIT): Add cast to avoid inverting an enum.
443 2002-06-16 Andrew Cagney <ac131313@redhat.com>
445 * configure: Regenerated to track ../common/aclocal.m4 changes.
447 2002-06-13 Tom Rix <trix@redhat.com>
449 * interp.c (xfer_mem): Fix transfers across multiple segments.
451 2002-06-09 Andrew Cagney <cagney@redhat.com>
453 * Makefile.in (INCLUDE): Update path to callback.h.
454 * gencode.c: Do not include "callback.h".
455 * d10v_sim.h: Include "gdb/callback.h" and "gdb/remote-sim.h".
458 2002-06-08 Andrew Cagney <cagney@redhat.com>
460 * interp.c (sim_fetch_register): Fix name of enum used in cast.
461 (sim_store_register): Ditto.
463 2002-06-02 Elena Zannoni <ezannoni@redhat.com>
465 From Jason Eckhardt <jle@redhat.com>
466 * d10v_sim.h (INC_ADDR): Correctly handle the case where MOD_E is
467 less than MOD_S (post-decrement).
469 2002-06-01 Andrew Cagney <ac131313@redhat.com>
471 * interp.c (sim_fetch_register, sim_store_register): Use a switch
472 statement and enums from "sim-d10v.h".
474 2002-05-28 Elena Zannoni <ezannoni@redhat.com>
476 * interp.c (sim_create_inferior): Add comment.
478 From Alan Matsuoka <alanm@redhat.com>:
479 From 2001-04-27 Jason Eckhardt <jle@cygnus.com>:
480 * simops.c (OP_4400): Output "mvf0f" instead of "mf0f".
481 (OP_4401): Output "mvf0t" instead of "mf0t".
482 (OP_460B): Do not output a flag register.
483 (OP_4609): Do not output a flag register.
485 2002-05-23 Andrew Cagney <ac131313@redhat.com>
487 * Makefile.in (INCLUDE): Add "gdb/sim-d10v.h".
488 * interp.c: Include "gdb/sim-d10v.h" instead of "sim-d10v.h".
490 2001-08-01 John R. Moore <jmoore@redhat.com>
492 * interp.c (sim_create_inferior): Removed a hack that stated
493 it was setting r0/r1 with argc/argv.
495 2001-04-15 J.T. Conklin <jtc@redback.com>
497 * Makefile.in (simops.o): Add simops.h to dependency list.
499 Tue May 23 21:39:23 2000 Andrew Cagney <cagney@b1.cygnus.com>
501 * configure: Regenerated to track ../common/aclocal.m4 changes.
503 Tue Apr 18 16:26:41 2000 Andrew Cagney <cagney@b1.cygnus.com>
505 * interp.c (sim_resume): Deliver SIGILL.
506 (lookup_hash): Do not print SIGILL message.
508 Tue Feb 22 18:24:56 2000 Andrew Cagney <cagney@b1.cygnus.com>
510 * Makefile.in (SIM_EXTRA_CFLAGS): Define SIM_HAVE_ENVIRONMENT.
511 * interp.c (sim_set_trace): Replace sim_trace. Enable tracing.
513 Tue Feb 8 17:41:12 2000 Andrew Cagney <cagney@b1.cygnus.com>
515 * d10v_sim.h (SIG_D10V_BUS): Define.
517 * simops.c (address_exception): Delete function.
518 (OP_30000000, OP_6401, OP_6001, OP_6000, OP_32010000, OP_31000000,
519 OP_6601, OP_6201, OP_6200, OP_33010000, OP_34000000, OP_6800,
520 OP_6C1F, OP_6801, OP_6C01, OP_36010000, OP_35000000, OP_6A00,
521 OP_6E1F, OP_6A01, OP_6E01, OP_37010000): Replace call to
522 address_exception with code that sets SIG_D10V_BUS.
524 * interp.c (sim_resume): When SIGBUS or SIGSEGV, deliver a bus
525 error to the simulator before resuming execution.
526 (sim_trace): Check stop reason and use that to determine sim_trace
528 (sim_stop_reason): For SIG_D10V_BUS return a SIGBUS / SIGSEGV
531 Tue Jan 18 16:07:42 MST 2000 Diego Novillo <dnovillo@cygnus.com>
533 * interp.c (sim_create_inferior): Change internal initial value for
536 Mon Jan 3 02:06:07 2000 Andrew Cagney <cagney@b1.cygnus.com>
538 * interp.c (lookup_hash): Stop the update of the PC when there was
539 an illegal instruction exception.
541 Mon Jan 3 00:14:33 2000 Andrew Cagney <cagney@b1.cygnus.com>
543 * simops.c (address_exception): New function.
544 (OP_30000000, OP_6401, OP_6001, OP_6000, OP_32010000, OP_31000000,
545 OP_6601, OP_6201, OP_6200, OP_33010000, OP_34000000, OP_6800,
546 OP_6C1F, OP_6801, OP_6C01, OP_36010000, OP_35000000, OP_6A00,
547 OP_6E1F, OP_6A01, OP_6E01, OP_37010000): For "ld", "ld2w", "st"
548 and "st2w" check that the address is aligned.
550 1999-12-30 Chandra Chavva <cchavva@cygnus.com>
552 * d10v_sim.h (INC_ADDR): Added code to assign
553 proper address for loads with predec operations.
555 1999-11-25 Nick Clifton <nickc@cygnus.com>
557 * simops.c (OP_4E0F): New function: Simulate new bit pattern for
560 Fri Oct 29 18:34:28 1999 Andrew Cagney <cagney@b1.cygnus.com>
562 * simops.c (move_to_cr): Don't allow user to set PSW.DM in either
565 Thu Oct 28 01:26:18 1999 Andrew Cagney <cagney@b1.cygnus.com>
567 * simops.c (OP_5F20): Use SET_HW_PSW when updating PSW.
568 (PSW_HW_MASK): Declare.
570 * d10v_sim.h (move_to_cr): Add ``psw_hw_p'' parameter.
571 (SET_CREG, SET_PSW_BIT): Update.
572 (SET_HW_CREG, SET_HW_PSW): Define.
574 Sun Oct 24 21:38:04 1999 Andrew Cagney <cagney@b1.cygnus.com>
576 * interp.c (sim_d10v_translate_dmap_addr): Fix extraction of IOSP
579 Sun Oct 24 16:04:16 1999 Andrew Cagney <cagney@b1.cygnus.com>
581 * interp.c (sim_d10v_translate_addr): New function.
582 (xfer_mem): Rewrite. Use sim_d10v_translate_addr.
583 (map_memory): Make INLINE.
585 Sun Oct 24 13:45:19 1999 Andrew Cagney <cagney@b1.cygnus.com>
587 * interp.c (sim_d10v_translate_dmap_addr): New function.
588 (dmem_addr): Rewrite. Use sim_d10v_translate_dmap_addr. Change
589 offset parameter to type uint16.
590 * d10v_sim.h (dmem_addr): Update declaration.
592 Sun Oct 24 13:07:31 1999 Andrew Cagney <cagney@b1.cygnus.com>
594 * interp.c (imap_register, set_imap_register, dmap_register,
595 set_imap_register): Use map_memory.
597 (sim_create_inferior): Initialize all DMAP registers. NOTE that
598 DMAP2, in internal memory mode, is set to 0x0000 and NOT
599 0x2000. This is consistent with the older d10v boards.
601 Sun Oct 24 11:22:12 1999 Andrew Cagney <cagney@b1.cygnus.com>
603 * interp.c (sim_d10v_translate_imap_addr): New function.
604 (imem_addr): Rewrite. Use sim_d10v_translate_imap_addr.
605 (last_from, last_to): Declare.
607 Sun Oct 24 01:21:56 1999 Andrew Cagney <cagney@b1.cygnus.com>
609 * d10v_sim.h (struct d10v_memory): Define. Support very long
611 (struct _state): Replace imem, dmem and umem by mem.
612 (IMAP_BLOCK_SIZE, DMAP_BLOCK_SIZE, SEGMENT_SIZE, IMEM_SEGMENTS,
613 DMEM_SEGMENTS, UMEM_SEGMENTS): Define.
615 * interp.c (map_memory): New function.
616 (sim_size, xfer_memory, imem_addr, dmem_addr): Update.
617 (UMEM_SEGMENTS): Moveed to "d10v_sim.h".
618 (IMEM_SIZEDMEM_SIZE): Delete.
620 Sat Oct 23 20:06:58 1999 Andrew Cagney <cagney@b1.cygnus.com>
622 * interp.c: Include "sim-d10v.h".
623 (imap_register, set_imap_register, dmap_register,
624 set_dmap_register, spi_register, spu_register, set_spi_register,
625 set_spu_register): New functions.
626 (sim_create_inferior): Update.
627 (sim_fetch_register, sim_store_register): Rewrite. Use enums
628 defined in sim-d10v.h.
630 * d10v_sim.h (DEBUG_MEMORY): Define.
631 (IMAP0, IMAP1, DMAP, SET_IMAP0, SET_IMAP1, SET_DMAP): Delete.
633 Sat Oct 23 18:41:18 1999 Andrew Cagney <cagney@b1.cygnus.com>
635 * interp.c (sim_open): Allow a debug value to be passed to the -t
637 (lookup_hash): Don't exit on an illegal instruction.
638 (do_long, do_2_short, do_parallel): Check for failed instruction
641 Mon Oct 18 18:03:24 MDT 1999 Diego Novillo <dnovillo@cygnus.com>
643 * simops.c (OP_3220): Fix trace output for illegal accumulator
646 1999-09-14 Nick Clifton <nickc@cygnus.com>
648 * simops.c: Disable setting of DM bit in PSW.
650 Wed Sep 8 19:34:55 MDT 1999 Diego Novillo <dnovillo@cygnus.com>
652 * simops.c (op_types): Added new memory indirect type OP_MEMREF3.
653 (trace_input_func): Added support for OP_MEMREF3.
654 (OP_32010000): New instruction ld.
655 (OP_33010000): New instruction ld2w.
656 (OP_5209): New instruction sac.
657 (OP_4209): New instruction sachi.
658 (OP_3220): New instruction slae.
659 (OP_36010000): New instruction st.
660 (OP_37010000): New instruction st2w.
662 1999-09-09 Stan Shebs <shebs@andros.cygnus.com>
664 * interp.c (old_segment_mapping): New global.
665 (xfer_mem): Change the default segment mapping to be the way
666 that Mitsubishi prefers, but use the previous mapping if
667 old_segment_mapping is true.
668 (sim_open): Add an option -oldseg to get the old mapping.
669 (sim_create_inferior): Init mapping registers based on the
670 value of old_segment_mapping.
672 1999-09-07 Nick Clifton <nickc@cygnus.com>
674 * simops.c (OP_6601): Do not write back decremented address if
675 either of the destination registers was the same as the address
677 (OP_6201): Do not write back incremented address if either of the
678 destination registers was the same as the address register.
680 Thu Sep 2 18:15:53 1999 Andrew Cagney <cagney@b1.cygnus.com>
682 * configure: Regenerated to track ../common/aclocal.m4 changes.
684 1999-05-08 Felix Lee <flee@cygnus.com>
686 * configure: Regenerated to track ../common/aclocal.m4 changes.
688 1999-04-02 Keith Seitz <keiths@cygnus.com>
690 * interp.c (ui_loop_hook_counter): New global (when NEED_UI_LOOP_HOOK
692 (sim_resume): If the counter has expired, call the ui_loop_hook,
694 (UI_LOOP_POLL_INTERVAL): Define. Used to tweak the frequency of
696 * Makefile.in (SIM_EXTRA_CFLAGS): Include NEED_UI_LOOP_HOOK.
698 Wed Mar 10 19:32:13 1999 Nick Clifton <nickc@cygnus.com>
700 * simops.c: If load instruction with auto increment/decrement
701 addressing is used when the destination register is the same as
702 the address register, then ignore the auto increment/decrement.
704 Wed Mar 10 19:32:13 1999 Martin M. Hunt <hunt@cygnus.com>
706 * simops.c (OP_5F00): Ifdef SYS_stat case because
707 not all systems have it defined.
709 1999-01-26 Jason Molenda (jsm@bugshack.cygnus.com)
711 * simops.c (OP_5607): Correct saturation comparison/assignment.
712 (OP_1201, OP_1203, OP_17001200, OP_17001202,
713 OP_2A00, OP_2800, OP_2C00, OP_3200, OP_3201,
714 OP_1001, OP_1003, OP_17001000, OP_17001002): Ditto.
716 1999-01-26 Jason Molenda (jsm@bugshack.cygnus.com)
718 * simops.c (OP_5605): Sign extend MIN32 and MAX32 before saturation
724 1999-01-13 Jason Molenda (jsm@bugshack.cygnus.com)
726 * simops.c (OP_1223): Sign extend MIN32 and MAX32 before saturation
729 Tue Nov 24 17:04:43 1998 Andrew Cagney <cagney@b1.cygnus.com>
731 * simops.c (sys/syscall.h): Include targ-vals.h instead.
732 (SYS_*): Replace with TARGET_SYS_*.
734 * Makefile.in: Add dependency on targ-vals.h.
735 (NL_TARGET): Define as NL_TARGET_d10v.
737 Wed Sep 30 00:06:32 1998 Andrew Cagney <cagney@amy.cygnus.com>
739 * interp.c (xfer_mem): Missing break, instruction memory case
740 flowed into unified memory case.
742 Wed Sep 30 10:14:18 1998 Nick Clifton <nickc@cygnus.com>
744 * simops.c: If load instruction with auto increment/decrement
745 addressing is used when the destination register is the same as
746 the address register, then ignore the auto increment/decrement.
748 Tue Apr 28 18:33:31 1998 Geoffrey Noer <noer@cygnus.com>
750 * configure: Regenerated to track ../common/aclocal.m4 changes.
752 Sun Apr 26 15:31:55 1998 Tom Tromey <tromey@creche>
754 * configure: Regenerated to track ../common/aclocal.m4 changes.
757 Sun Apr 26 15:20:23 1998 Tom Tromey <tromey@cygnus.com>
759 * acconfig.h: New file.
760 * configure.in: Reverted change of Apr 24; use sinclude again.
762 Fri Apr 24 14:16:40 1998 Tom Tromey <tromey@creche>
764 * configure: Regenerated to track ../common/aclocal.m4 changes.
767 Fri Apr 24 11:20:06 1998 Tom Tromey <tromey@cygnus.com>
769 * configure.in: Don't call sinclude.
771 Fri Apr 24 11:04:46 1998 Andrew Cagney <cagney@chook.cygnus.com>
773 * interp.c (struct hash_entry): OPCODE and MASK are unsigned.
775 * d10v_sim.h (remote-sim.h, sim-config.h): Include.
777 Sat Apr 4 20:36:25 1998 Andrew Cagney <cagney@b1.cygnus.com>
779 * configure: Regenerated to track ../common/aclocal.m4 changes.
781 Wed Apr 1 12:59:17 1998 Andrew Cagney <cagney@b1.cygnus.com>
783 * simops.c (trace_input_func): Use move_from_cr / CREGS to obtain
785 (OP_OP_1000000, add3): Trace inputs before performing add.
786 (OP_5F00, <*>): Trace input registers before making system call.
787 (OP_5F00, <kill>): Trace R0, R1 not REGn.
788 (OP_5F00, <getpid>): Always return 47.
790 * d10v_sim.h (SLOT, SLOT_NR, SLOT_PEND_MASK, SLOT_PEND,
791 SLOT_DISCARD, SLOT_FLUSH): Define. An implementation of write
793 (struct _state): Add struct slot slot to global state variable.
794 (struct _state): Delete fields SM, EA, DB, DM, IE, RP, MD, FX, ST,
795 F0, F1, C from global State variable.
796 (struct _state): Add struct trace to global State variable.
797 (GPR, SET_GPR): Define. SET_GPR uses SLOT_PEND.
798 (PSW*, SET_PSW*): Define. SET_PSW* uses SET_CREG.
799 (CREG, SET_CREG, SET_*): Define. SET_CREG uses func move_to_cr.
800 (INC_ADDR): Re-implement. Use SET_GPR to update registers.
801 (JMP): Re-implement. Use SET_* to update registers.
803 * interp.c: Use new SET_* et.al. macros to fetch / store
805 (get_operands): Squirrel away trace values at start of each
807 (do_2_short): Flush pending writes before issuing second
809 (sim_resume): Flush pending writes at end of instruction cycle.
810 (sim_fetch_register, sim_store_register, sim_create_inferior):
811 After scheduling updates to registers using SET_*, flush updates.
812 (sim_resume): Re-order handling of RPT/repeat and IBA/hbreak so
813 that each sets pc using SET_* and last SET_* eventually winds out.
815 * simops.c: Use new SET_* et.al. macros to fetch / store
817 (move_to_cr): Add MASK argument for selective update of CREG bits.
818 Re-implement using new SET_* macros.
819 (trace_output_func, trace_output): Delete. Replace with.
820 (do_trace_output_flush, trace_output_finish, trace_output_40,
821 trace_output_32, trace_output_16, trace_output_void,
822 trace_output_flag): New functions. Handle specific trace cases.
823 (OP_*): Re-write tracing to use new trace_output_* functions.
824 (OP_*): Re-write to use new SET_* et.al. macros.
825 (FUNC, PARM[1-4], RETVAL, RETVAL32): Redo definition.
826 (RETVAL_HIGH, RETVAL_LOW): Delete, use RETVAL32.
828 Wed Apr 1 12:55:18 1998 Andrew Cagney <cagney@b1.cygnus.com>
830 * configure.in (SIM_AC_OPTION_WARNINGS): Add.
831 configure: Re-generate.
833 Fri Mar 27 16:15:52 1998 Andrew Cagney <cagney@b1.cygnus.com>
835 * configure: Regenerated to track ../common/aclocal.m4 changes.
837 Wed Mar 25 12:35:29 1998 Andrew Cagney <cagney@b1.cygnus.com>
839 * configure: Regenerated to track ../common/aclocal.m4 changes.
841 Wed Mar 18 12:38:12 1998 Andrew Cagney <cagney@b1.cygnus.com>
843 * configure: Regenerated to track ../common/aclocal.m4 changes.
845 Tue Feb 17 12:38:42 1998 Andrew Cagney <cagney@b1.cygnus.com>
847 * interp.c (sim_store_register, sim_fetch_register): Pass in
848 length parameter. Return -1.
850 Mon Oct 27 14:43:33 1997 Fred Fish <fnf@cygnus.com>
852 * (dmem_addr): If address is illegal or in I/O space, signal a bus
853 error. Allocate unified memory on demand. Fix DMEM address
856 Mon Feb 16 10:27:53 1998 Andrew Cagney <cagney@b1.cygnus.com>
858 * simops.c (OP_5F20): Implement "dbt".
859 (OP_5F60): Implement "rtd".
861 * d10v_sim.h (DPC_CR): Define enum.
862 (DBT_VECTOR_START): Define
865 Fri Feb 13 15:15:58 1998 Andrew Cagney <cagney@b1.cygnus.com>
867 * simops.c (move_to_cr): Sync regs[SP_IDX] with State.sp according
870 * d10v_sim.h (struct _state): Add sp, as holding area for SPI/SPU.
873 Wed Feb 11 16:53:49 1998 Andrew Cagney <cagney@b1.cygnus.com>
875 * simops.c (OP_5F00): Call error instead of abort for unknown
878 * d10v_sim.h (enum): Define DPSW_CR.
880 * simops.c (move_to_cr): Mask out hardwired zero bits in DPSW.
882 Tue Feb 10 18:28:38 1998 Andrew Cagney <cagney@b1.cygnus.com>
884 * interp.c (sim_write_phys): Delete.
885 (sim_load): Call sim_load_file with sim_write and LMA.
887 Mon Feb 9 12:05:01 1998 Andrew Cagney <cagney@b1.cygnus.com>
889 * interp.c: Rewrite xfer_mem so that it translates addresses as -
890 0x00... - DMAP translated memory, 0x01... IMAP translated memory,
891 0x10... - on-chip data, 0x11... - on-chip insn, 0x12... - unified
894 (imem_addr): New function - translate IMEM address.
895 (sim_resume): Use imem_addr to translate insn address, abort if
897 (sim_create_inferior): Write ARGV to memory using sim_write. Pass
898 argc/argv using r0/r1 not r2/r3.
899 (sim_size): Do not initialize IMAP/DMAP here.
900 (sim_open): Call sim_create_inferior and sim_size to initialize
902 (sim_create_inferior): Initialize IMAP/DMAP to hardware reset
904 (init_system): Delete.
905 (xfer_mem, sim_fetch_register, sim_store_register): Do not call
907 (decode_pc): Check prog_bfd is defined before looking up .text
910 Sun Feb 1 16:47:51 1998 Andrew Cagney <cagney@b1.cygnus.com>
912 * configure: Regenerated to track ../common/aclocal.m4 changes.
914 Sat Jan 31 18:15:41 1998 Andrew Cagney <cagney@b1.cygnus.com>
916 * configure: Regenerated to track ../common/aclocal.m4 changes.
918 Sun Jan 25 22:23:01 1998 Michael Meissner <meissner@cygnus.com>
920 * interp.c (sim_stop_reason): Exit status is now in r0, not r2.
922 Sat Jan 24 19:00:30 1998 Michael Meissner <meissner@cygnus.com>
924 * d10v_sim.h (DEBUG_TRAP): New debug flag.
926 * simops.c (OP_5F00): If DEBUG_TRAP is on, turn traps 0-14 into
927 printing the registers.
929 Thu Jan 22 17:54:01 1998 Michael Meissner <meissner@cygnus.com>
931 * simops.c (op_types): New ABI, args are r0..r3, system call # is
933 (trace_{in,out}put_func): Ditto.
935 (OP_24800000): Ditto.
939 Thu Jan 22 14:30:36 1998 Fred Fish <fnf@cygnus.com>
941 * interp.c (UMEM_SEGMENTS): New define, set to 128.
942 (sim_size): Use UMEM_SEGMENTS rather than hardwired constant.
943 (sim_close): Reset prog_bfd to NULL after closing it. Also
944 reset prog_bfd_was_opened_p after closing prog_bfd.
945 (sim_load): Reset prog_bfd_was_opened_p after closing prog_bfd.
946 (sim_create_inferior): Get start address from abfd not prog_bfd.
947 (xfer_mem): Do bounds checking on addresses and return zero length
948 read/write on bad addresses, rather than aborting. Prepare to
949 be able to handle xfers that cross segment boundaries, but not
950 yet implemented. Only emit debug message when d10v_debug is
951 set as well as DEBUG being defined.
953 Mon Jan 19 22:26:29 1998 Doug Evans <devans@seba>
955 * configure: Regenerated to track ../common/aclocal.m4 changes.
957 Mon Dec 15 23:17:11 1997 Andrew Cagney <cagney@b1.cygnus.com>
959 * configure: Regenerated to track ../common/aclocal.m4 changes.
962 Tue Dec 9 10:28:31 1997 Andrew Cagney <cagney@b1.cygnus.com>
964 * d10v_sim.h (RPT_S): Index cregs with RPT_S_CR not RPT_E_CR.
965 (BPSW): Ditto for BPSW_CR and not PSW_CR.
967 * simops.c (OP_5F40): JMP to BPC instead of assigning PC directly.
969 Mon Dec 8 12:58:33 1997 Andrew Cagney <cagney@b1.cygnus.com>
971 * simops.c (OP_5F00): From Martin Hunt <hunt@cygnus.com>. Change
972 reserved trap from 0 to 15. Add trap emulation code for 0-14.
974 * interp.c (sim_resume): From Martin Hunt <hunt@cygnus.com>. Check
977 * d10v_sim.h (AE_VECTOR_START, RIE_VECTOR_START,
978 SDBT_VECTOR_START, TRAP_VECTOR_START): Define.
980 * simops.c (OP_5F00): For "trap", mask out all but SM bit in PSW,
982 (OP_5F00): For "trap", update BPSW with move_to_cr.
984 Fri Dec 5 15:31:17 1997 Andrew Cagney <cagney@b1.cygnus.com>
986 * d10v_sim.h (enum): Enumerate CR register names.
987 (enum): Enumerate PSW bit values.
988 (PSW): Obtain value uing move_from_cr.
989 (MOD_S, MOD_E, BPSW): Make r-values.
990 (move_from_cr, move_to_cr): Declare functions.
992 * interp.c (sim_fetch_register, sim_store_register): Use
993 move_from_cr and move_to_cr for CR register transfers.
995 * simops.c (move_from_cr, move_to_cr): New functions.
996 (OP_5F40): Move BPSW to PSW using move_to_cr and move_from_cr.
997 (OP_5600): For "mvtc", use function move_to_cr.
998 (OP_5200): For "mvfc", use function move_from_cr.
1000 Fri Dec 5 13:33:14 1997 Andrew Cagney <cagney@b1.cygnus.com>
1002 * simops.c (OP_5600): For "mvtc" MOD_E and MOD_S, ensure that the
1005 Thu Dec 4 09:21:05 1997 Doug Evans <devans@canuck.cygnus.com>
1007 * configure: Regenerated to track ../common/aclocal.m4 changes.
1009 Thu Dec 4 16:51:02 1997 Andrew Cagney <cagney@b1.cygnus.com>
1011 * d10v_sim.h (struct _state): Add DM - PSW debug mask.
1013 * simops.c (OP_5600): For "mvtc", save PSW.DM.
1014 (OP_5200): Ditto for "mvfc".
1016 Wed Dec 3 17:27:06 1997 Andrew Cagney <cagney@b1.cygnus.com>
1018 * d10v_sim.h (SEXT56): Define.
1020 * simops.c (OP_4201): For "rac", sign extend 56 bit value before
1023 * d10v_sim.h (MAX32, MIN32, MASK32, MASK40): Re-define using
1026 Tue Dec 2 15:38:34 1997 Fred Fish <fnf@cygnus.com>
1028 * interp.c (sim_resume): Call do_2_short with LEFT_FIRST or
1029 RIGHT_FIRST, as appropriate, instead of hardcoded ints that
1030 don't match enum values.
1032 Tue Dec 2 15:01:08 1997 Andrew Cagney <cagney@b1.cygnus.com>
1034 * simops.c (OP_3A00): For "macu", perform multiply stage using 32
1035 bit rather than 16 bit precision.
1036 (OP_3C00): For "mulxu", store unsigned product in ACC.
1037 (OP_3800): For "msbu", subtract unsigned product from ACC,
1038 (OP_0): For "sub", compute carry by comparing inputs.
1040 Tue Dec 2 11:04:37 1997 Andrew Cagney <cagney@b1.cygnus.com>
1042 * simops.c (OP_1000): For "sub2w", compute carry by comparing
1045 Mon Nov 17 20:57:21 1997 Andrew Cagney <cagney@b1.cygnus.com>
1047 * simops.c (OP_1): Use 32 bit unsigned arithmetic for subtract,
1048 carry indicated by value > 0xffff.
1050 Fri Nov 14 12:51:20 1997 Andrew Cagney <cagney@b1.cygnus.com>
1052 * interp.c (sim_resume): Don't set up SIGINT handler using signal,
1054 (sim_resume): Fix race condition of a direct assignment to
1055 stop_simulator, conditionally call sim_stop.
1056 (sim_stop_reason): Check stop_simulator returning SIGINT. Clear
1057 stop_simulator ready for next sim_resume call.
1058 (sim_ctrl_c): Delete function.
1060 Thu Nov 13 19:29:34 1997 Andrew Cagney <cagney@b1.cygnus.com>
1062 * interp.c (sim_resume): For "REP", only check/update the PC when
1063 a branch instruction has not been executed.
1065 Mon Nov 10 17:50:18 1997 Andrew Cagney <cagney@b1.cygnus.com>
1067 * simops.c (OP_4201): "rachi". Sign extend bit 40 of ACC. Sign
1068 extend bit 44 all constants.
1069 (OP_4201): Replace GCC specific 0x..LL with SIGNED64 macro.
1071 Fri Oct 24 10:26:29 1997 Andrew Cagney <cagney@b1.cygnus.com>
1073 * d10v_sim.h: Include sim-types.h.
1074 (uint8, in816, uiny16, int32, uint32, int64, uint64): Typedef
1075 using unsigned8 et.al. from sim-types.h.
1076 (SEXT32, SEXT40, SEXT44, SEXT60): Replace GCC specific 0x..LL with
1079 Wed Oct 22 14:43:00 1997 Andrew Cagney <cagney@b1.cygnus.com>
1081 * interp.c (sim_write_phys): New function, write to physical
1082 instead of virtual memory.
1084 * interp.c (sim_load): Pass lma_p and sim_write_phys to
1087 Mon Oct 13 10:55:07 1997 Fred Fish <cygnus.com>
1089 * simops.c (OP_6A01): Change OP_POSTDEC to OP_POSTINC and move
1090 exception generation code to OP_6E01.
1091 (OP_6E01): Change OP_POSTINC to OP_POSTDEC and insert exception
1094 Sat Oct 11 09:02:08 1997 Fred Fish <fnf@cygnus.com>
1096 * simops.c (OP_6401): postdecrement on r15 is OK, remove exception.
1099 Fri Oct 3 09:28:00 1997 Andrew Cagney <cagney@b1.cygnus.com>
1101 * configure: Regenerated to track ../common/aclocal.m4 changes.
1103 Sat Sep 27 12:51:34 1997 Fred Fish <fnf@cygnus.com>
1105 * interp.c (pc_addr): Discard upper bit(s) of PC in case
1106 IMAP1 selects unified memory.
1107 * d10v_sim.h (INC_ADDR): Align MOD_E to increment before testing
1110 Wed Sep 24 17:38:57 1997 Andrew Cagney <cagney@b1.cygnus.com>
1112 * configure: Regenerated to track ../common/aclocal.m4 changes.
1114 Tue Sep 23 11:04:38 1997 Andrew Cagney <cagney@b1.cygnus.com>
1116 * configure: Regenerated to track ../common/aclocal.m4 changes.
1118 Mon Sep 22 11:46:20 1997 Andrew Cagney <cagney@b1.cygnus.com>
1120 * configure: Regenerated to track ../common/aclocal.m4 changes.
1122 Fri Sep 19 17:45:25 1997 Andrew Cagney <cagney@b1.cygnus.com>
1124 * configure: Regenerated to track ../common/aclocal.m4 changes.
1126 Mon Sep 15 17:36:15 1997 Andrew Cagney <cagney@b1.cygnus.com>
1128 * configure: Regenerated to track ../common/aclocal.m4 changes.
1130 Wed Sep 10 22:30:24 1997 Martin M. Hunt <hunt@cygnus.com>
1132 * interp.c (sim_resume): Increment PC at end of rep
1135 * simops.c (OP_4201): Fix rachi instruction.
1137 Thu Sep 4 17:21:23 1997 Doug Evans <dje@seba>
1139 * configure: Regenerated to track ../common/aclocal.m4 changes.
1141 Wed Aug 27 18:13:22 1997 Andrew Cagney <cagney@b1.cygnus.com>
1143 * configure: Regenerated to track ../common/aclocal.m4 changes.
1146 Tue Aug 26 10:37:49 1997 Andrew Cagney <cagney@b1.cygnus.com>
1148 * interp.c (sim_kill): Delete.
1149 (sim_create_inferior): Add ABFD argument.
1150 (sim_load): Move setting of PC from here.
1151 (sim_create_inferior): To here.
1152 (start_address): Delete variable.
1154 Mon Aug 25 17:50:22 1997 Andrew Cagney <cagney@b1.cygnus.com>
1156 * configure: Regenerated to track ../common/aclocal.m4 changes.
1159 Mon Aug 25 15:39:29 1997 Andrew Cagney <cagney@b1.cygnus.com>
1161 * interp.c (sim_open): Add ABFD argument.
1163 Tue May 20 10:14:45 1997 Andrew Cagney <cagney@b1.cygnus.com>
1165 * interp.c (sim_open): Add callback argument.
1166 (sim_set_callbacks): Remove SIM_DESC argument.
1168 Thu Apr 24 00:39:51 1997 Doug Evans <dje@canuck.cygnus.com>
1170 * configure: Regenerated to track ../common/aclocal.m4 changes.
1172 Tue Apr 22 10:29:23 1997 Doug Evans <dje@canuck.cygnus.com>
1174 * interp.c (sim_open): Undo patch to add -E support.
1176 Fri Apr 18 13:39:01 1997 Andrew Cagney <cagney@b1.cygnus.com>
1178 * interp.c (sim_stop): New function.
1180 Thu Apr 17 02:42:00 1997 Doug Evans <dje@canuck.cygnus.com>
1182 * Makefile.in (SIM_OBJS): Add sim-load.o.
1183 * d10v_sim.h (exec_bfd): Rename to prog_bfd.
1184 * interp.c: #include bfd.h.
1185 (myname, sim_kind, start_address): New static locals.
1186 (prog_bfd_was_opened_p, prog_bfd): New static locals.
1187 (decode_pc): Update to use prog_bfd.
1188 (sim_open): Set sim_kind, myname. Ignore -E arg.
1189 (sim_close): Close prog_bfd if simulator opened it.
1190 (sim_create_inferior): Return SIM_RC. Delete arg start_address.
1191 (sim_load): Return SIM_RC. New arg abfd. Set start address from bfd.
1192 Call sim_load_file to load file into simulator.
1193 * simops.c (trace_input_func): exec_bfd renamed to prog_bfd.
1195 Wed Apr 16 16:12:03 1997 Andrew Cagney <cagney@b1.cygnus.com>
1197 * simops.c (OP_5F00): Only provide system calls SYS_execv,
1198 SYS_wait, SYS_wait, SYS_utime, SYS_time if defined by the host.
1200 Mon Apr 7 15:45:02 1997 Andrew Cagney <cagney@kremvax.cygnus.com>
1202 * configure: Regenerated to track ../common/aclocal.m4 changes.
1205 Wed Apr 2 15:06:28 1997 Doug Evans <dje@canuck.cygnus.com>
1207 * interp.c (sim_open): New arg `kind'.
1209 * configure: Regenerated to track ../common/aclocal.m4 changes.
1211 Wed Apr 2 14:34:19 1997 Andrew Cagney <cagney@kremvax.cygnus.com>
1213 * configure: Regenerated to track ../common/aclocal.m4 changes.
1215 Mon Mar 17 15:10:07 1997 Andrew Cagney <cagney@kremvax.cygnus.com>
1217 * configure: Re-generate.
1219 Fri Mar 14 10:34:11 1997 Michael Meissner <meissner@cygnus.com>
1221 * configure: Regenerate to track ../common/aclocal.m4 changes.
1223 * simops.c (OP_5F00): Remove old traps 1-3. Make trap 15 the same
1224 as trap 0, which will be deprecated. Only set errno, if an error
1225 in fact was returned.
1227 Thu Mar 13 12:41:20 1997 Doug Evans <dje@canuck.cygnus.com>
1229 * interp.c: Delete redundant prototypes of sim_foo fns.
1230 (sim_open): New SIM_DESC result. Argument is now in argv form.
1231 (other sim_*): New SIM_DESC argument.
1233 Thu Mar 13 10:29:04 1997 Michael Meissner <meissner@cygnus.com>
1235 * simops.c (trace_{input,output}_func): Call flush_stdout from the
1238 (OP_6{4,6,C,A}01): Test for post decrement on the stack pointer.
1239 (OP_{1200,1000000,201,5FE0,1003,17001002}): Fix problems in
1240 setting the carry bit after an add or a subtract.
1242 Wed Feb 12 16:04:15 1997 Michael Meissner <meissner@cygnus.com>
1244 * simops.c (OP_{1403,15002A02,3{0,4}0{0,1}}): Only use the bottom
1245 40 bits of accumulators. Sign/zero extend as appropriate.
1247 Tue Feb 4 13:33:30 1997 Doug Evans <dje@canuck.cygnus.com>
1249 * Makefile.in (@COMMON_MAKEFILE_FRAG): Use
1250 COMMON_{PRE,POST}_CONFIG_FRAG instead.
1251 * configure.in: sinclude ../common/aclocal.m4.
1252 * configure: Regenerated.
1254 Thu Jan 23 11:46:23 1997 Stu Grossman (grossman@critters.cygnus.com)
1256 * configure configure.in Makefile.in: Update to new configure
1257 scheme which is more compatible with WinGDB builds.
1258 * configure.in: Improve comment on how to run autoconf.
1259 * configure: Re-run autoconf to get new ../common/aclocal.m4.
1260 * Makefile.in: Use autoconf substitution to install common
1263 Fri Dec 27 22:54:05 1996 Angela Marie Thomas (angela@cygnus.com)
1265 * gencode.c: patch to not #include "d10v_sim.h" which
1266 unecessarily includes bfd.h and causes wingdb configure
1269 Mon Dec 16 13:39:03 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
1271 * interp.c (xfer_mem): Change unified memory to 0x0.
1273 Thu Nov 28 20:42:56 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1275 * simops.c (OP_3E01): Fix tracing information.
1276 (OP_300{0,1}): Do not propigate sign.
1278 Mon Nov 25 19:47:40 1996 Doug Evans <dje@canuck.cygnus.com>
1280 * config.in (WORDS_BIGENDIAN): Add.
1281 * configure: Regenerated.
1282 * d10v_sim.h: #include "config.h"
1284 Sat Nov 23 09:34:50 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1286 * gencode.c (write_opcodes): Eliminate warnings when generated
1287 table.c is compiled.
1289 Wed Nov 20 19:41:40 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1291 * interp.c (sim_open): Cast result of calloc, and make sure NULL
1293 (dmem_addr): If address is illegal or in I/O space, signal a bus
1295 (pc_addr): Signal bus error, not illegal instruction for bogus
1298 Wed Nov 20 01:23:03 1996 Doug Evans <dje@canuck.cygnus.com>
1300 * Makefile.in: Delete all stuff moved to ../common/Make-common.in.
1301 (SIM_OBJS,SIM_EXTRA_CFLAGS,SIM_EXTRA_CLEAN): Define.
1302 * configure.in: Simplify using macros in ../common/aclocal.m4.
1303 Call AC_CHECK_HEADERS(unistd.h).
1304 * configure: Regenerated.
1305 * config.in: New file.
1306 * interp.c: #include "callback.h".
1307 * simops.c: #include "config.h". #include <unistd.h> if present.
1309 Fri Nov 8 16:19:55 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
1311 * d10v-sim.h (simops): Add flag is_long.
1312 (State): Add pc_changed. Instructions which update the PC should
1313 use the JMP macro which sets this.
1314 (JMP): New macro. Sets the PC and the pc_changed flag.
1316 * gencode.c (write_opcodes): Add is_long field.
1318 * interp.c (lookup_hash): If we blindly apply a short opcode's mask
1319 to a long opcode we could get a false match. Check the opcode size.
1320 (hash): Add a size field to the hash table.
1321 (sim_open): Initialize size field in hash table.
1322 (sim_resume): Change to logic for setting the PC. Used to increment the
1323 PC if it had not been changed. This didn't allow single-instruction loops.
1324 Now checks the flag State.pc_changed. Also now stops when ^C is received.
1325 (dmem_addr): Fix translation of data segments to unified memory.
1326 (sim_ctrl_c): New function. When ^C is received, set stop_simulator flag.
1328 * simops.c: Changed all branch and jump instructions to use new JMP macro.
1329 (OP_20000000): Corrected trace information to show this is a ldi.l, not
1330 a ldi.s instruction.
1332 Thu Oct 31 19:13:55 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
1334 * interp.c (sim_fetch_register, sim_store_register): Fix bug where
1335 updating the accumulators was overwriting other parts of the global
1338 Wed Oct 30 17:35:14 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1340 * interp.c (bfd.h) Don't include it here any more.
1341 (text{,_start,_end}): Move here from simops.c and make extern.
1342 (decode_pc): New function to return the PC as an address that the
1344 (dmem_addr): Print decoded PC in error message.
1347 * simops.c (bfd.h) Don't include it here any more.
1348 (text{,_start,_end}): Move to simops.c.
1349 (trace_input_func): Move decoding of PC, and looking up .text
1352 * d10v_sim.h (bfd.h): Include it here.
1353 (text{,_start,_end}): Add external declarations.
1357 Tue Oct 29 12:13:52 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
1359 * interp.c (sim_size): Now allocates unified memory for imap segments
1360 0,1,2, and 127. Initializes imap0 and imap1 to 0x1000. Initializes dmap to 0.
1361 (sim_write): Just call xfer_mem().
1362 (sim_read): Just call xfer_mem().
1363 (xfer_mem): New function. Does appropriate memory mapping and copies bytes.
1364 (dmem_addr): New function. Reads dmap register and translates data
1365 addresses to local addresses.
1366 (pc_addr): New function. Reads imap register and computes local address
1367 corresponding to contents of the PC.
1368 (sim_resume): Change to use pc_addr().
1369 (sim_create_inferior): Change reinitialization code. Also reinitializes
1371 (sim_fetch_register): Add fake registers 32,33,34 for imap0, imap1, and dmap.
1372 (sim_store_register): Add fake registers 32,33,34 for imap0, imap1, and dmap.
1374 * simops.c (MEMPTR): Redefine to use dmem_addr().
1375 (OP_5F00): Replace references to STate.imem with dmem_addr().
1377 * d10v-sim.h (State): Remove mem_min and mem_max. Add umem[128].
1378 (RB,SW,RW,SLW,RLW): Redefine to use dmem_addr().
1379 (IMAP0,IMAP1,DMAP,SET_IMAP,SET_IMAP1,SET_DMAP): Define.
1381 Tue Oct 22 15:22:33 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1383 * d10v_sim.h (_ins_type): Reorganize, so that we can provide
1384 better statistics, like not counting NOPS as parallel
1385 instructions, and printing total cycles.
1386 (ins_type_counters): Make unsigned long.
1387 (left_nops,right_nops): Fold into ins_type_counters.
1389 * simops.c (trace_input_func): Print new instruction types.
1390 Handle OP_R2R3 as input types.
1391 (OP_{38000000,7000}): Correctly sign extend bytes.
1392 (OP_5E00): Don't count NOPs as parallel instructions.
1393 (OP_460B): Remove unused variable.
1396 * interp.c (ins_type_counters): Make unsigned long.
1397 (left_nops,right_nops): Delete.
1398 (most functions): Add prototypes.
1399 (INLINE): If GCC and optimize define as __inline__.
1400 ({,lookup_}hash,get_operands): Declare as INLINE.
1401 (do_parallel): Count conditional operations.
1402 (add_commas): New function, to add commas every 3 digits.
1403 (sim_size): Call add_commas to print numbers.
1404 (sim_{open,resume}): Delete unused variables.
1405 (sim_info): Provide better statistics.
1406 (sim_read): Add int return type.
1408 Mon Oct 21 16:16:26 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
1410 * interp.c (sim_resume): Change the way single-stepping and exceptions
1411 are handled so single-stepping works again.
1413 Thu Oct 17 12:24:16 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1415 * endian.c: Optimize simulated loads/stores on x86, AIX, and big
1418 * configure.in (--enable-sim-bswap): New switch to enable using
1419 the BSWAP instruction on x86's.
1420 * configure: Regenerate.
1422 * Makefile.in ({SWAP,CONFIG}_CFLAGS): Add --enable-sim-bswap
1425 Wed Oct 16 13:50:06 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1427 * endian.c: New file. Move endian functions here from interp.c.
1428 Optimize code, and make it work as either inline functions or as a
1431 * interp.c: Move endian functions from here to endian.c.
1433 * Makefile.in (INCLUDE): Add endian.c.
1434 (run,libsim.a): Add dependency on endian.o.
1435 (endian.o): Add dependency.
1437 * d10v_sim.h (read/write support): Always go through the machine
1438 independent endian functions. If compiling with GCC and
1439 optimizing, include endian.c so the endian functions are inlined.
1441 * simops.c (OP_5F00): Correct tracing of accumulators.
1443 Tue Oct 15 10:57:50 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1445 * simops.c (OP_5F00): Add support for getpid, kill system calls.
1447 * interp.c (do_{2_short,parallel}): If an exception is raised,
1448 don't execute the second instruction.
1450 Sat Oct 12 22:17:43 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1452 * simops.c (OP_{31000000,6601,6201,6200}): Store address in a
1453 temporary in case the register is overriden when loading.
1454 (OP_6200): Output type is OP_DREG for tracing.
1456 Fri Oct 4 23:46:18 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1458 * d10v_sim.h (struct _state): Add mem_{min,max} fields.
1460 * interp.c (sim_size): Initialize mem_{min,max} fields.
1461 (sim_write): Update mem_{min,max} fields.
1462 (sim_resume): If PC is not in the minimum/maximum memory range,
1464 (sim_create_inferior): Preserve mem_{min,max} fields.
1466 Fri Sep 27 13:11:58 1996 Mark Alexander <marka@cygnus.com>
1468 * simops.c (OP_5F00): Add support for time() system call.
1470 Wed Sep 25 16:31:41 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1472 * simops.c (OP_{6E01,6A01,6E1F,6A00}): Print both words being
1474 (OP_5F00,trace_{in,out}put_func): Add finer grain tracing for
1477 Mon Sep 23 17:55:30 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1479 * simops.c (op_types): Add OP_{CONSTANT8,R2,R3}.
1480 (trace_input_func): Add support for OP_{CONSTANT8,R2,R3}.
1481 (OP_{4900,24800000,4800,4A00,4B00,4D00,4C00}): Add OP_R2 and OP_R3
1482 to call/subroutine returns to trace the first two arguments and
1483 the return value. For small jumps, use CONSTANT8, not CONSTANT16.
1485 Fri Sep 20 15:36:45 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
1487 * interp.c (sim_create_inferior): Reinitialize State every time
1488 sim_create_inferior() is called.
1490 Thu Sep 19 21:38:20 1996 Michael Meissner <meissner@wogglebug.ziplink.net>
1492 * simops.c (OP_{401,2000000,601,3000000,23000000}): Get sign right
1494 (OP_401): Fix tracing information.
1496 Thu Sep 19 10:30:22 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1498 * simops.c (SIZE_{PC,LINE_NUMBER}): New default sizes for output.
1499 (trace_input_func): Use them.
1500 (trace_input_func): Make sure there is a trailing space after the
1502 (OP_6200): Fix tracing info.
1504 * Makefile.in (run): Add dependencies on libbfd.a and
1507 Wed Sep 18 09:13:25 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1509 * d10v_sim.h (DEBUG_INSTRUCTION): New debug value to include line
1510 numbers and function names in debug trace.
1511 (DEBUG): If not defined, set to DEBUG_TRACE, DEBUG_VALUES, and
1513 (SIG_D10V_{STOP,EXIT}): Values to represent the stop instruction
1514 and exit system call trap being executed.
1516 * interp.c (sim_stop_reason): Set exit code correctly for stop
1517 instruction and exit system call trap.
1519 * configure.in (--enable-sim-cflags): Remove trace case.
1520 (--enable-sim-debug): New switch to set the debug values.
1521 * configure: Regenerate.
1523 * simops.c (trace_{input,output}_func): Rename from
1524 trace_{input,output}.
1525 (trace_{input,output}): Call trace_{input,output}_func if
1526 d10v_debug is non-zero.
1527 (SIZE_INSTRUCTION): Cut down to 8.
1528 (SIZE_OPERANDS): Cut down to 18.
1529 (SIZE_LOCATION): New value for size of line number, function name
1531 (init_text_p,text{,_start,_end}): New static variables for
1532 printing line number and function name.
1533 (exec_bfd): New external that run.c sets.
1534 (trace_input_func): Print line number and function name if
1535 available and if desired.
1536 (OP_4E09): Don't print out DBT message.
1537 (OP_5FE0): Set exception field to SIG_D10V_STOP.
1538 (OP_5F00): Set exception field to SIG_D10V_EXIT.
1540 Sat Sep 14 22:18:43 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1542 * interp.c (do_2_short): If the instruction encodes jump->ins,
1543 don't do the second instruction if the jump succeeds.
1545 Fri Sep 13 22:35:19 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1547 * simops.c (OP_5F00): Use unknown traps to print all GPRs,
1548 accumulators, PC, and F0/F1/C flags.
1550 Thu Sep 12 12:50:11 1996 Mark Alexander <marka@cygnus.com>
1552 * simops.c (OP_5F00): Fix problems with system calls.
1554 Thu Sep 12 12:19:28 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1556 * simops.c (OP_5F00): Correct tracing information for trap.
1558 Wed Sep 11 18:55:50 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1560 * Makefile.in (CSEARCH): Correctly find opcodes directory.
1562 Mon Sep 9 13:27:26 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1564 * simops.c (trace_output): Properly align accumulator output.
1565 (OP_3{0,2,4}00): Properly parenthesize test expression. Add error
1566 if shift count is too high.
1567 (OP_4E{00,02,04,20,22,40,42}): Make tests agree with book.
1568 (OP_4E09): Make cpfg properly trace the input flags.
1569 (op_types): Add OP_FLAG_OUTPUT.
1570 (trace_{input,output}): Support OP_FLAG_OUTPUT.
1571 (OP_31000000): This ld2w varient is a 16-bit memory reference, not
1572 an 8-bit memory reference instruction for tracing purposes.
1573 (OP_201): Addi needs to set the carry.
1575 Fri Sep 6 17:56:17 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
1577 * simops.c (OP_2600, OP_2601): Changed min and max comparisons
1578 to use signed register values.
1580 Wed Sep 4 11:35:17 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1582 * d10v_sim.h (DEBUG_*): Add bit flags for controlling debug
1584 (_ins_type): New enumeration to specify which container an
1585 instruction is in, and whether it is part of a parallel operation.
1586 (_state): Add ins_type field.
1587 ({,u}int{8,16,32,64}): Use limits.h to size the appropriate types.
1588 (ins_type_counters): Counters for the various instruction types.
1589 ({left,right}_nops): Counters for the number of nops in each
1591 (d10v_debug): New variable to indicate whether debugging is turned
1594 * simops.c: (all functions): Change all #ifdef DEBUG code so that
1595 the input and output values can be traced, along with the
1596 instruction type. Make the -t option enable tracing.
1597 (all functions): Change printf calls to use the printf_filtered
1598 function in the callback table.
1600 * interp.c (_leftright): New enumeration to say whether 2 short
1601 instructions are done left first or right first.
1602 (do_{long,2_short,parallel}): Indicate in the machine state which
1603 type of instruction this is. Count each of the types of
1604 instructions executed.
1605 (sim_size): Only print the memory sizes if DEBUG_MEMSIZE debug
1607 (sim_resume): Pass left/right indication to do_2_short.
1608 (all functions): Change printf calls to use the printf_filtered
1609 function in the callback table.
1610 (sim_trace): Turn on debug flag if DEBUG was defined, and call
1612 (sim_info): Print out statistics on instructions.
1613 (sim_{trace,create_inferior}): Eliminate extraneous output unless
1615 (sim_open): If args == -t and DEBUG was defined, set d10v_debug.
1616 Only initialize the hash table the first time sim_open is called.
1618 * Makefile.in: Make objects depend on d10v_sim.h.
1619 ({,SIM_}CFLAGS): Include configure dependent switches. Setting
1620 CFLAGS does not override host/target defines or SIM_CFLAGS.
1621 (CC_FOR_BUILD,gencode): Use CC_FOR_BUILD to compile gencode.
1622 (run): By default, the math library is not needed to be linked
1624 ({BFD,LIBIBERTY}_LIB): Define as variables so they can be
1626 (VPATH): Don't set to anything but @srcdir@ to work with non-GNU
1628 ({run,callback}.o): Provide explicit paths to their appropriate
1630 (gencode{,.o},d10v-opc.o): Split compilation into creating object
1631 and linking. Instead of linking in libopcodes.a, just compile
1632 d10v-opc.o directly to handle canadian cross.
1633 (CSEARCH): Add opcodes directory.
1635 * configure.in (--enable-sim-cflags): New switch to allow user to
1637 (CC_FOR_BUILD): Deal with canadian crosses.
1638 * configure: Regenerate.
1640 Wed Sep 04 04:45:34 1996 Mark Alexander <marka@cygnus.com>
1642 * simops.c: Include correct syscall.h for d10v, not host's.
1643 Fix #ifdef SYS_stat.
1645 Tue Sep 3 14:00:04 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1647 * simops.c (OP_5F00): Wrap all SYS_xxx traps with #ifdef.
1648 Add trap 2 to be printf and trap 3 to be putchar.
1650 Wed Aug 28 21:42:34 1996 Mark Alexander <marka@cygnus.com>
1652 * Makefile.in, d10v_sim.h, interp.c, simops.c: Add support
1653 for low-level system calls.
1655 Wed Aug 28 17:33:19 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
1657 * Makefile.in, d10v_sim.h, interp.c: Fix byte-order problems.
1659 Mon Aug 26 18:30:28 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
1661 * d10v_sim.h (SEXT32): Added.
1662 * interp.c: Commented out printfs.
1663 * simops.c: Fixed error in sb and st2w.
1665 Thu Aug 15 13:30:03 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
1667 * Makefile.in, d10v_sim.h, interp.c, simops.c: Added remaining
1668 DSP instructions. Added modulo addressing.
1670 Sun Aug 11 12:57:15 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
1672 * Makefile.in, d10v_sim.h, interp.c, simops.c: Snapshot.
1674 Fri Aug 2 17:44:24 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
1676 * d10v_sim.h, simops.c: Snapshot.
1678 Thu Aug 1 17:05:24 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
1680 * ChangeLog, Makefile.in, configure, configure.in, d10v_sim.h,
1681 gencode.c, interp.c, simops.c: Created.