728d5af5b9fced4bc26cffdcd4fa3c25020b8823
[external/binutils.git] / sim / d10v / ChangeLog
1 2015-03-14  Mike Frysinger  <vapier@gentoo.org>
2
3         * Makefile.in (SIM_EXTRA_CFLAGS): Add
4         -DSIM_USE_DEPRECATED_RUN_FRONTEND.
5         (SIM_RUN_OBJS): Set to run.o.
6
7 2015-03-14  Mike Frysinger  <vapier@gentoo.org>
8
9         * configure.ac (AC_CHECK_HEADERS): Delete.
10         * aclocal.m4, configure: Regenerate.
11
12 2014-08-19  Alan Modra  <amodra@gmail.com>
13
14         * configure: Regenerate.
15
16 2014-08-15  Roland McGrath  <mcgrathr@google.com>
17
18         * configure: Regenerate.
19         * config.in: Regenerate.
20
21 2014-03-10  Mike Frysinger  <vapier@gentoo.org>
22
23         * interp.c (sim_do_command): Add const to cmd.
24
25 2014-03-05  Mike Frysinger  <vapier@gentoo.org>
26
27         * interp.c (sim_load): Add const to prog.
28
29 2014-03-04  Mike Frysinger  <vapier@gentoo.org>
30
31         * configure: Regenerate.
32
33 2013-09-23  Alan Modra  <amodra@gmail.com>
34
35         * configure: Regenerate.
36
37 2013-06-03  Mike Frysinger  <vapier@gentoo.org>
38
39         * aclocal.m4, configure: Regenerate.
40
41 2013-05-10  Freddie Chopin  <freddie_chopin@op.pl>
42
43         * configure: Rebuild.
44
45 2012-06-19  Joel Brobecker  <brobecker@adacore.com>
46
47         * interp.c: #include "config.h" instead of "sysdep.h".
48         Add conditional include of string.h or strings.h, as well as
49         conditional include of stdlib.h.
50
51 2012-06-15  Joel Brobecker  <brobecker@adacore.com>
52
53         * config.in, configure: Regenerate.
54
55 2012-05-24  Pedro Alves  <palves@redhat.com>
56
57         PR gdb/7205
58
59         Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
60
61 2012-03-24  Mike Frysinger  <vapier@gentoo.org>
62
63         * aclocal.m4, config.in, configure: Regenerate.
64
65 2011-12-03  Mike Frysinger  <vapier@gentoo.org>
66
67         * aclocal.m4: New file.
68         * configure: Regenerate.
69
70 2011-10-17  Mike Frysinger  <vapier@gentoo.org>
71
72         * configure.ac: Change include to common/acinclude.m4.
73
74 2011-10-17  Mike Frysinger  <vapier@gentoo.org>
75
76         * configure.ac: Change AC_PREREQ to 2.64.  Delete AC_CONFIG_HEADER
77         call.  Replace common.m4 include with SIM_AC_COMMON.
78         * configure: Regenerate.
79
80 2010-04-14  Mike Frysinger  <vapier@gentoo.org>
81
82         * interp.c (sim_write): Add const to buffer arg.
83
84 2010-01-09  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
85
86         * configure: Regenerate.
87
88 2009-08-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
89
90         * config.in: Regenerate.
91         * configure: Likewise.
92
93         * configure: Regenerate.
94
95 2008-07-11  Hans-Peter Nilsson  <hp@axis.com>
96
97         * configure: Regenerate to track ../common/common.m4 changes.
98         * config.in: Ditto.
99
100 2008-06-06  Vladimir Prus  <vladimir@codesourcery.com>
101             Daniel Jacobowitz  <dan@codesourcery.com>
102             Joseph Myers  <joseph@codesourcery.com>
103
104         * configure: Regenerate.
105
106 2006-12-21  Hans-Peter Nilsson  <hp@axis.com>
107
108         * acconfig.h: Remove.
109         * config.in: Regenerate.
110
111 2006-06-13  Richard Earnshaw  <rearnsha@arm.com>
112
113         * configure: Regenerated.
114
115 2006-06-05  Daniel Jacobowitz  <dan@codesourcery.com>
116
117         * configure: Regenerated.
118
119 2006-05-31  Daniel Jacobowitz  <dan@codesourcery.com>
120
121         * configure: Regenerated.
122
123 2006-04-18  Nick Clifton  <nickc@redhat.com>
124
125         * interp.c (sim_stop_reason): Fix typo.
126
127 2005-11-28  Mark Mitchell  <mark@codesourcery.com>
128
129         * interp.c (gdb/signals.h): Include it.
130         (sim_stop_reason): Use TARGET_SIGNAL_*.
131
132 2005-03-23  Mark Kettenis  <kettenis@gnu.org>
133
134         * configure: Regenerate.
135
136 2005-01-14  Andrew Cagney  <cagney@gnu.org>
137
138         * configure.ac: Sinclude aclocal.m4 before common.m4.  Add
139         explicit call to AC_CONFIG_HEADER.
140         * configure: Regenerate.
141
142 2005-01-12  Andrew Cagney  <cagney@gnu.org>
143
144         * configure.ac: Update to use ../common/common.m4.
145         * configure: Re-generate.
146
147 2005-01-11  Andrew Cagney  <cagney@localhost.localdomain>
148
149         * configure: Regenerated to track ../common/aclocal.m4 changes.
150
151 2005-01-07  Andrew Cagney  <cagney@gnu.org>
152
153         * configure.ac: Rename configure.in, require autoconf 2.59.
154         * configure: Re-generate.
155
156 2004-12-08  Hans-Peter Nilsson  <hp@axis.com>
157
158         * configure: Regenerate for ../common/aclocal.m4 update.
159
160 2004-06-28  Andrew Cagney  <cagney@gnu.org>
161
162         * interp.c (sim_resume): Rename ui_loop_hook to
163         deprecated_ui_loop_hook.
164
165 2003-10-30  Andrew Cagney  <cagney@redhat.com>
166
167         * simops.c: Replace "struct symbol_cache_entry" with "struct
168         bfd_symbol".
169
170 2003-06-22  Andrew Cagney  <cagney@redhat.com>
171
172         * interp.c (xfer_mem): Simplify.  Only do a single partial
173         transfer.  Problem reported by Tom Rix.
174
175 2003-05-07  Andrew Cagney  <cagney@redhat.com>
176
177         * interp.c (sim_d10v_translate_addr): Add "regcache" parameter.
178         (sim_d10v_translate_imap_addr): Ditto.
179         (sim_d10v_translate_dmap_addr): Ditto.
180         (xfer_mem): Pass NULL regcache to sim_d10v_translate_addr.
181         (dmem_addr): Pass NULL regcache to sim_d10v_translate_dmap_addr.
182         (dmap_register, imap_register): Add "regcache" parameter.
183         (imem_addr): Pass NULL regcache to sim_d10v_translate_imap_addr.
184         (sim_fetch_register): Pass NULL regcache to imap_register and
185         dmap_register.
186
187 2003-02-27  Andrew Cagney  <cagney@redhat.com>
188
189         * interp.c (sim_open, sim_create_inferior): Rename _bfd to bfd.
190
191 2002-11-13  Andrew Cagney  <cagney@redhat.com>
192
193         * simops.c: Include <string.h>.
194
195 2002-06-17  Andrew Cagney  <cagney@redhat.com>
196
197         * d10v_sim.h (SET_PSW_BIT): Add cast to avoid inverting an enum.
198
199 2002-06-16  Andrew Cagney  <ac131313@redhat.com>
200
201         * configure: Regenerated to track ../common/aclocal.m4 changes.
202
203 2002-06-13  Tom Rix  <trix@redhat.com>
204
205         * interp.c (xfer_mem): Fix transfers across multiple segments.
206  
207 2002-06-09  Andrew Cagney  <cagney@redhat.com>
208
209         * Makefile.in (INCLUDE): Update path to callback.h.
210         * gencode.c: Do not include "callback.h".
211         * d10v_sim.h: Include "gdb/callback.h" and "gdb/remote-sim.h".
212         * interp.c: Ditto.
213
214 2002-06-08  Andrew Cagney  <cagney@redhat.com>
215
216         * interp.c (sim_fetch_register): Fix name of enum used in cast.
217         (sim_store_register): Ditto.
218
219 2002-06-02  Elena Zannoni  <ezannoni@redhat.com>
220
221         From Jason Eckhardt <jle@redhat.com>
222         * d10v_sim.h (INC_ADDR): Correctly handle the case where MOD_E is
223         less than MOD_S (post-decrement).
224
225 2002-06-01  Andrew Cagney  <ac131313@redhat.com>
226
227         * interp.c (sim_fetch_register, sim_store_register): Use a switch
228         statement and enums from "sim-d10v.h".
229
230 2002-05-28  Elena Zannoni  <ezannoni@redhat.com>
231
232         * interp.c (sim_create_inferior): Add comment.
233
234         From Alan Matsuoka <alanm@redhat.com>:
235         From 2001-04-27 Jason Eckhardt <jle@cygnus.com>:
236         * simops.c (OP_4400): Output "mvf0f" instead of "mf0f".
237         (OP_4401): Output "mvf0t" instead of "mf0t".
238         (OP_460B): Do not output a flag register.
239         (OP_4609): Do not output a flag register.
240
241 2002-05-23  Andrew Cagney  <ac131313@redhat.com>
242
243         * Makefile.in (INCLUDE): Add "gdb/sim-d10v.h".
244         * interp.c: Include "gdb/sim-d10v.h" instead of "sim-d10v.h".
245
246 2001-08-01  John R. Moore  <jmoore@redhat.com>
247
248         * interp.c (sim_create_inferior): Removed a hack that stated
249         it was setting r0/r1 with argc/argv.
250
251 2001-04-15  J.T. Conklin  <jtc@redback.com>
252
253         * Makefile.in (simops.o): Add simops.h to dependency list.
254
255 Tue May 23 21:39:23 2000  Andrew Cagney  <cagney@b1.cygnus.com>
256
257         * configure: Regenerated to track ../common/aclocal.m4 changes.
258
259 Tue Apr 18 16:26:41 2000  Andrew Cagney  <cagney@b1.cygnus.com>
260
261         * interp.c (sim_resume): Deliver SIGILL.
262         (lookup_hash): Do not print SIGILL message.
263
264 Tue Feb 22 18:24:56 2000  Andrew Cagney  <cagney@b1.cygnus.com>
265
266         * Makefile.in (SIM_EXTRA_CFLAGS): Define SIM_HAVE_ENVIRONMENT.
267         * interp.c (sim_set_trace): Replace sim_trace.  Enable tracing.
268
269 Tue Feb  8 17:41:12 2000  Andrew Cagney  <cagney@b1.cygnus.com>
270
271         * d10v_sim.h (SIG_D10V_BUS): Define.
272
273         * simops.c (address_exception): Delete function.
274         (OP_30000000, OP_6401, OP_6001, OP_6000, OP_32010000, OP_31000000,
275         OP_6601, OP_6201, OP_6200, OP_33010000, OP_34000000, OP_6800,
276         OP_6C1F, OP_6801, OP_6C01, OP_36010000, OP_35000000, OP_6A00,
277         OP_6E1F, OP_6A01, OP_6E01, OP_37010000): Replace call to
278         address_exception with code that sets SIG_D10V_BUS.
279
280         * interp.c (sim_resume): When SIGBUS or SIGSEGV, deliver a bus
281         error to the simulator before resuming execution.
282         (sim_trace): Check stop reason and use that to determine sim_trace
283         return value.
284         (sim_stop_reason): For SIG_D10V_BUS return a SIGBUS / SIGSEGV
285         sigrc.
286
287 Tue Jan 18 16:07:42 MST 2000    Diego Novillo <dnovillo@cygnus.com>
288
289         * interp.c (sim_create_inferior): Change internal initial value for
290         DMAP2 to 0x2000.
291
292 Mon Jan  3 02:06:07 2000  Andrew Cagney  <cagney@b1.cygnus.com>
293
294         * interp.c (lookup_hash): Stop the update of the PC when there was
295         an illegal instruction exception.
296
297 Mon Jan  3 00:14:33 2000  Andrew Cagney  <cagney@b1.cygnus.com>
298
299         * simops.c (address_exception): New function.
300         (OP_30000000, OP_6401, OP_6001, OP_6000, OP_32010000, OP_31000000,
301         OP_6601, OP_6201, OP_6200, OP_33010000, OP_34000000, OP_6800,
302         OP_6C1F, OP_6801, OP_6C01, OP_36010000, OP_35000000, OP_6A00,
303         OP_6E1F, OP_6A01, OP_6E01, OP_37010000): For "ld", "ld2w", "st"
304         and "st2w" check that the address is aligned.
305
306 1999-12-30  Chandra Chavva   <cchavva@cygnus.com>
307         
308         * d10v_sim.h (INC_ADDR): Added code to assign
309         proper address for loads with predec operations.
310
311 1999-11-25  Nick Clifton  <nickc@cygnus.com>
312
313         * simops.c (OP_4E0F): New function: Simulate new bit pattern for
314         cpfg instruction.
315
316 Fri Oct 29 18:34:28 1999  Andrew Cagney  <cagney@b1.cygnus.com>
317
318         * simops.c (move_to_cr): Don't allow user to set PSW.DM in either
319         DPSW and BPSW.
320
321 Thu Oct 28 01:26:18 1999  Andrew Cagney  <cagney@b1.cygnus.com>
322
323         * simops.c (OP_5F20): Use SET_HW_PSW when updating PSW.
324         (PSW_HW_MASK): Declare.
325
326         * d10v_sim.h (move_to_cr): Add ``psw_hw_p'' parameter.
327         (SET_CREG, SET_PSW_BIT): Update.
328         (SET_HW_CREG, SET_HW_PSW): Define.
329
330 Sun Oct 24 21:38:04 1999  Andrew Cagney  <cagney@b1.cygnus.com>
331
332         * interp.c (sim_d10v_translate_dmap_addr): Fix extraction of IOSP
333         for DMAP3.
334
335 Sun Oct 24 16:04:16 1999  Andrew Cagney  <cagney@b1.cygnus.com>
336
337         * interp.c (sim_d10v_translate_addr): New function.
338         (xfer_mem): Rewrite.  Use sim_d10v_translate_addr.
339         (map_memory): Make INLINE.
340
341 Sun Oct 24 13:45:19 1999  Andrew Cagney  <cagney@b1.cygnus.com>
342
343         * interp.c (sim_d10v_translate_dmap_addr): New function.
344         (dmem_addr): Rewrite. Use sim_d10v_translate_dmap_addr.  Change
345         offset parameter to type uint16.
346         * d10v_sim.h (dmem_addr): Update declaration.
347
348 Sun Oct 24 13:07:31 1999  Andrew Cagney  <cagney@b1.cygnus.com>
349
350         * interp.c (imap_register, set_imap_register, dmap_register,
351         set_imap_register): Use map_memory.
352         (DMAP): Update.
353         (sim_create_inferior): Initialize all DMAP registers.  NOTE that
354         DMAP2, in internal memory mode, is set to 0x0000 and NOT
355         0x2000. This is consistent with the older d10v boards.
356
357 Sun Oct 24 11:22:12 1999  Andrew Cagney  <cagney@b1.cygnus.com>
358
359         * interp.c (sim_d10v_translate_imap_addr): New function.
360         (imem_addr): Rewrite.  Use sim_d10v_translate_imap_addr.
361         (last_from, last_to): Declare.
362
363 Sun Oct 24 01:21:56 1999  Andrew Cagney  <cagney@b1.cygnus.com>
364
365         * d10v_sim.h (struct d10v_memory): Define.  Support very long
366         memories.
367         (struct _state): Replace imem, dmem and umem by mem.
368         (IMAP_BLOCK_SIZE, DMAP_BLOCK_SIZE, SEGMENT_SIZE, IMEM_SEGMENTS,
369         DMEM_SEGMENTS, UMEM_SEGMENTS): Define.
370
371         * interp.c (map_memory): New function.
372         (sim_size, xfer_memory, imem_addr, dmem_addr): Update.
373         (UMEM_SEGMENTS): Moveed to "d10v_sim.h".
374         (IMEM_SIZEDMEM_SIZE): Delete.
375
376 Sat Oct 23 20:06:58 1999  Andrew Cagney  <cagney@b1.cygnus.com>
377
378         * interp.c: Include "sim-d10v.h".
379         (imap_register, set_imap_register, dmap_register,
380         set_dmap_register, spi_register, spu_register, set_spi_register,
381         set_spu_register): New functions.
382         (sim_create_inferior): Update.
383         (sim_fetch_register, sim_store_register): Rewrite.  Use enums
384         defined in sim-d10v.h.
385
386         * d10v_sim.h (DEBUG_MEMORY): Define.
387         (IMAP0, IMAP1, DMAP, SET_IMAP0, SET_IMAP1, SET_DMAP): Delete.
388         
389 Sat Oct 23 18:41:18 1999  Andrew Cagney  <cagney@b1.cygnus.com>
390
391         * interp.c (sim_open): Allow a debug value to be passed to the -t
392         option.
393         (lookup_hash): Don't exit on an illegal instruction.
394         (do_long, do_2_short, do_parallel): Check for failed instruction
395         lookup.
396
397 Mon Oct 18 18:03:24 MDT 1999    Diego Novillo <dnovillo@cygnus.com>
398
399         * simops.c (OP_3220): Fix trace output for illegal accumulator
400         message.
401
402 1999-09-14  Nick Clifton  <nickc@cygnus.com>
403
404         * simops.c: Disable setting of DM bit in PSW.
405
406 Wed Sep  8 19:34:55 MDT 1999    Diego Novillo <dnovillo@cygnus.com>
407
408         * simops.c (op_types): Added new memory indirect type OP_MEMREF3.
409         (trace_input_func): Added support for OP_MEMREF3.
410         (OP_32010000): New instruction ld.
411         (OP_33010000): New instruction ld2w.
412         (OP_5209): New instruction sac.
413         (OP_4209): New instruction sachi.
414         (OP_3220): New instruction slae.
415         (OP_36010000): New instruction st.
416         (OP_37010000): New instruction st2w.
417
418 1999-09-09  Stan Shebs  <shebs@andros.cygnus.com>
419
420         * interp.c (old_segment_mapping): New global.
421         (xfer_mem): Change the default segment mapping to be the way
422         that Mitsubishi prefers, but use the previous mapping if
423         old_segment_mapping is true.
424         (sim_open): Add an option -oldseg to get the old mapping.
425         (sim_create_inferior): Init mapping registers based on the
426         value of old_segment_mapping.
427
428 1999-09-07  Nick Clifton  <nickc@cygnus.com>
429
430         * simops.c (OP_6601): Do not write back decremented address if
431         either of the destination registers was the same as the address
432         register. 
433         (OP_6201): Do not write back incremented address if either of the
434         destination registers was the same as the address register. 
435
436 Thu Sep  2 18:15:53 1999  Andrew Cagney  <cagney@b1.cygnus.com>
437
438         * configure: Regenerated to track ../common/aclocal.m4 changes.
439
440 1999-05-08  Felix Lee  <flee@cygnus.com>
441
442         * configure: Regenerated to track ../common/aclocal.m4 changes.
443         
444 1999-04-02  Keith Seitz  <keiths@cygnus.com>
445
446         * interp.c (ui_loop_hook_counter): New global (when NEED_UI_LOOP_HOOK
447         defined).
448         (sim_resume): If the counter has expired, call the ui_loop_hook,
449         if defined.
450         (UI_LOOP_POLL_INTERVAL): Define. Used to tweak the frequency of
451         ui_loop_hook calls.
452         * Makefile.in (SIM_EXTRA_CFLAGS): Include NEED_UI_LOOP_HOOK.
453
454 Wed Mar 10 19:32:13 1999  Nick Clifton  <nickc@cygnus.com>
455
456         * simops.c: If load instruction with auto increment/decrement
457         addressing is used when the destination register is the same as
458         the address register, then ignore the auto increment/decrement.
459
460 Wed Mar 10 19:32:13 1999  Martin M. Hunt  <hunt@cygnus.com>
461
462         * simops.c (OP_5F00): Ifdef SYS_stat case because
463         not all systems have it defined.
464
465 1999-01-26  Jason Molenda  (jsm@bugshack.cygnus.com)
466
467         * simops.c (OP_5607): Correct saturation comparison/assignment.
468         (OP_1201, OP_1203, OP_17001200, OP_17001202, 
469          OP_2A00, OP_2800, OP_2C00, OP_3200, OP_3201, 
470          OP_1001, OP_1003, OP_17001000, OP_17001002): Ditto.
471
472 1999-01-26  Jason Molenda  (jsm@bugshack.cygnus.com)
473
474         * simops.c (OP_5605): Sign extend MIN32 and MAX32 before saturation
475         comparison.
476         (OP_5607): Ditto.
477         (OP_2A00): Ditto.
478         (OP_2800): Ditto.
479
480 1999-01-13  Jason Molenda  (jsm@bugshack.cygnus.com)
481
482         * simops.c (OP_1223): Sign extend MIN32 and MAX32 before saturation
483         comparison.
484
485 Tue Nov 24 17:04:43 1998  Andrew Cagney  <cagney@b1.cygnus.com>
486
487         * simops.c (sys/syscall.h): Include targ-vals.h instead.
488         (SYS_*): Replace with TARGET_SYS_*.
489
490         * Makefile.in: Add dependency on targ-vals.h.
491         (NL_TARGET): Define as NL_TARGET_d10v.
492
493 Wed Sep 30 00:06:32 1998  Andrew Cagney  <cagney@amy.cygnus.com>
494
495         * interp.c (xfer_mem): Missing break, instruction memory case
496         flowed into unified memory case.
497
498 Wed Sep 30 10:14:18 1998  Nick Clifton  <nickc@cygnus.com>
499
500         * simops.c: If load instruction with auto increment/decrement
501         addressing is used when the destination register is the same as
502         the address register, then ignore the auto increment/decrement.
503
504 Tue Apr 28 18:33:31 1998  Geoffrey Noer  <noer@cygnus.com>
505
506         * configure: Regenerated to track ../common/aclocal.m4 changes.
507
508 Sun Apr 26 15:31:55 1998  Tom Tromey  <tromey@creche>
509
510         * configure: Regenerated to track ../common/aclocal.m4 changes.
511         * config.in: Ditto.
512
513 Sun Apr 26 15:20:23 1998  Tom Tromey  <tromey@cygnus.com>
514
515         * acconfig.h: New file.
516         * configure.in: Reverted change of Apr 24; use sinclude again.
517
518 Fri Apr 24 14:16:40 1998  Tom Tromey  <tromey@creche>
519
520         * configure: Regenerated to track ../common/aclocal.m4 changes.
521         * config.in: Ditto.
522
523 Fri Apr 24 11:20:06 1998  Tom Tromey  <tromey@cygnus.com>
524
525         * configure.in: Don't call sinclude.
526
527 Fri Apr 24 11:04:46 1998  Andrew Cagney  <cagney@chook.cygnus.com>
528
529         * interp.c (struct hash_entry): OPCODE and MASK are unsigned.
530
531         * d10v_sim.h (remote-sim.h, sim-config.h): Include.
532         
533 Sat Apr  4 20:36:25 1998  Andrew Cagney  <cagney@b1.cygnus.com>
534
535         * configure: Regenerated to track ../common/aclocal.m4 changes.
536
537 Wed Apr  1 12:59:17 1998  Andrew Cagney  <cagney@b1.cygnus.com>
538
539         * simops.c (trace_input_func): Use move_from_cr / CREGS to obtain
540         up-to-date CR value.
541         (OP_OP_1000000, add3): Trace inputs before performing add.
542         (OP_5F00, <*>): Trace input registers before making system call.
543         (OP_5F00, <kill>): Trace R0, R1 not REGn.
544         (OP_5F00, <getpid>): Always return 47.
545         
546         * d10v_sim.h (SLOT, SLOT_NR, SLOT_PEND_MASK, SLOT_PEND,
547         SLOT_DISCARD, SLOT_FLUSH): Define.  An implementation of write
548         back slots.
549         (struct _state): Add struct slot slot to global state variable.
550         (struct _state): Delete fields SM, EA, DB, DM, IE, RP, MD, FX, ST,
551         F0, F1, C from global State variable.
552         (struct _state): Add struct trace to global State variable.
553         (GPR, SET_GPR): Define.  SET_GPR uses SLOT_PEND.
554         (PSW*, SET_PSW*): Define. SET_PSW* uses SET_CREG.
555         (CREG, SET_CREG, SET_*): Define. SET_CREG uses func move_to_cr.
556         (INC_ADDR): Re-implement.  Use SET_GPR to update registers.
557         (JMP): Re-implement. Use SET_* to update registers.
558
559         * interp.c: Use new SET_* et.al. macros to fetch / store
560         registers.
561         (get_operands): Squirrel away trace values at start of each
562         operand decode.
563         (do_2_short): Flush pending writes before issuing second
564         instruction.
565         (sim_resume): Flush pending writes at end of instruction cycle.
566         (sim_fetch_register, sim_store_register, sim_create_inferior):
567         After scheduling updates to registers using SET_*, flush updates.
568         (sim_resume): Re-order handling of RPT/repeat and IBA/hbreak so
569         that each sets pc using SET_* and last SET_* eventually winds out.
570         
571         * simops.c: Use new SET_* et.al. macros to fetch / store
572         registers.
573         (move_to_cr): Add MASK argument for selective update of CREG bits.
574         Re-implement using new SET_* macros.
575         (trace_output_func, trace_output): Delete. Replace with.
576         (do_trace_output_flush, trace_output_finish, trace_output_40,
577         trace_output_32, trace_output_16, trace_output_void,
578         trace_output_flag): New functions.  Handle specific trace cases.
579         (OP_*): Re-write tracing to use new trace_output_* functions.
580         (OP_*): Re-write to use new SET_* et.al. macros.
581         (FUNC, PARM[1-4], RETVAL, RETVAL32): Redo definition.
582         (RETVAL_HIGH, RETVAL_LOW): Delete, use RETVAL32.
583         
584 Wed Apr  1 12:55:18 1998  Andrew Cagney  <cagney@b1.cygnus.com>
585
586         * configure.in (SIM_AC_OPTION_WARNINGS): Add.
587         configure: Re-generate.
588
589 Fri Mar 27 16:15:52 1998  Andrew Cagney  <cagney@b1.cygnus.com>
590
591         * configure: Regenerated to track ../common/aclocal.m4 changes.
592
593 Wed Mar 25 12:35:29 1998  Andrew Cagney  <cagney@b1.cygnus.com>
594
595         * configure: Regenerated to track ../common/aclocal.m4 changes.
596
597 Wed Mar 18 12:38:12 1998  Andrew Cagney  <cagney@b1.cygnus.com>
598
599         * configure: Regenerated to track ../common/aclocal.m4 changes.
600
601 Tue Feb 17 12:38:42 1998  Andrew Cagney  <cagney@b1.cygnus.com>
602
603         * interp.c (sim_store_register, sim_fetch_register): Pass in
604         length parameter.  Return -1.
605
606 Mon Oct 27 14:43:33 1997  Fred Fish  <fnf@cygnus.com>
607
608         * (dmem_addr): If address is illegal or in I/O space, signal a bus
609         error.  Allocate unified memory on demand.  Fix DMEM address
610         calculations.
611         
612 Mon Feb 16 10:27:53 1998  Andrew Cagney  <cagney@b1.cygnus.com>
613
614         * simops.c (OP_5F20): Implement "dbt".
615         (OP_5F60): Implement "rtd".
616
617         * d10v_sim.h (DPC_CR): Define enum.
618         (DBT_VECTOR_START): Define
619         (DPSW, DPC): Define.
620
621 Fri Feb 13 15:15:58 1998  Andrew Cagney  <cagney@b1.cygnus.com>
622
623         * simops.c (move_to_cr): Sync regs[SP_IDX] with State.sp according
624         to PSW:SM.
625
626         * d10v_sim.h (struct _state): Add sp, as holding area for SPI/SPU.
627         (SP_IDX): Define.
628
629 Wed Feb 11 16:53:49 1998  Andrew Cagney  <cagney@b1.cygnus.com>
630
631         * simops.c (OP_5F00): Call error instead of abort for unknown
632         syscalls.
633
634         * d10v_sim.h (enum): Define DPSW_CR.
635
636         * simops.c (move_to_cr): Mask out hardwired zero bits in DPSW.
637
638 Tue Feb 10 18:28:38 1998  Andrew Cagney  <cagney@b1.cygnus.com>
639
640         * interp.c (sim_write_phys): Delete.
641         (sim_load): Call sim_load_file with sim_write and LMA.
642
643 Mon Feb  9 12:05:01 1998  Andrew Cagney  <cagney@b1.cygnus.com>
644
645         * interp.c: Rewrite xfer_mem so that it translates addresses as -
646         0x00... - DMAP translated memory, 0x01... IMAP translated memory,
647         0x10... - on-chip data, 0x11... - on-chip insn, 0x12... - unified
648         memory.
649         (pc_addr): Delete.
650         (imem_addr): New function - translate IMEM address.
651         (sim_resume): Use imem_addr to translate insn address, abort if
652         translation failed.
653         (sim_create_inferior): Write ARGV to memory using sim_write.  Pass
654         argc/argv using r0/r1 not r2/r3.
655         (sim_size): Do not initialize IMAP/DMAP here.
656         (sim_open): Call sim_create_inferior and sim_size to initialize
657         the system.
658         (sim_create_inferior): Initialize IMAP/DMAP to hardware reset
659         defaults.
660         (init_system): Delete.
661         (xfer_mem, sim_fetch_register, sim_store_register): Do not call
662         init_system.
663         (decode_pc): Check prog_bfd is defined before looking up .text
664         section.
665
666 Sun Feb  1 16:47:51 1998  Andrew Cagney  <cagney@b1.cygnus.com>
667
668         * configure: Regenerated to track ../common/aclocal.m4 changes.
669
670 Sat Jan 31 18:15:41 1998  Andrew Cagney  <cagney@b1.cygnus.com>
671
672         * configure: Regenerated to track ../common/aclocal.m4 changes.
673
674 Sun Jan 25 22:23:01 1998  Michael Meissner  <meissner@cygnus.com>
675
676         * interp.c (sim_stop_reason): Exit status is now in r0, not r2.
677
678 Sat Jan 24 19:00:30 1998  Michael Meissner  <meissner@cygnus.com>
679
680         * d10v_sim.h (DEBUG_TRAP): New debug flag.
681
682         * simops.c (OP_5F00): If DEBUG_TRAP is on, turn traps 0-14 into
683         printing the registers.
684
685 Thu Jan 22 17:54:01 1998  Michael Meissner  <meissner@cygnus.com>
686
687         * simops.c (op_types): New ABI, args are r0..r3, system call # is
688         in r4.
689         (trace_{in,out}put_func): Ditto.
690         (OP_4900): Ditto.
691         (OP_24800000): Ditto.
692         (OP_4D00): Ditto.
693         (OP_5F00): Ditto.
694
695 Thu Jan 22 14:30:36 1998  Fred Fish  <fnf@cygnus.com>
696
697         * interp.c (UMEM_SEGMENTS): New define, set to 128.
698         (sim_size): Use UMEM_SEGMENTS rather than hardwired constant.
699         (sim_close): Reset prog_bfd to NULL after closing it.  Also
700         reset prog_bfd_was_opened_p after closing prog_bfd.
701         (sim_load): Reset prog_bfd_was_opened_p after closing prog_bfd.
702         (sim_create_inferior): Get start address from abfd not prog_bfd.
703         (xfer_mem): Do bounds checking on addresses and return zero length
704         read/write on bad addresses, rather than aborting.  Prepare to
705         be able to handle xfers that cross segment boundaries, but not
706         yet implemented.  Only emit debug message when d10v_debug is
707         set as well as DEBUG being defined.
708
709 Mon Jan 19 22:26:29 1998  Doug Evans  <devans@seba>
710
711         * configure: Regenerated to track ../common/aclocal.m4 changes.
712
713 Mon Dec 15 23:17:11 1997  Andrew Cagney  <cagney@b1.cygnus.com>
714
715         * configure: Regenerated to track ../common/aclocal.m4 changes.
716         * config.in: Ditto.
717
718 Tue Dec  9 10:28:31 1997  Andrew Cagney  <cagney@b1.cygnus.com>
719
720         * d10v_sim.h (RPT_S): Index cregs with RPT_S_CR not RPT_E_CR.
721         (BPSW): Ditto for BPSW_CR and not PSW_CR.
722
723         * simops.c (OP_5F40): JMP to BPC instead of assigning PC directly.
724         
725 Mon Dec  8 12:58:33 1997  Andrew Cagney  <cagney@b1.cygnus.com>
726
727         * simops.c (OP_5F00): From Martin Hunt <hunt@cygnus.com>. Change
728         reserved trap from 0 to 15. Add trap emulation code for 0-14.
729
730         * interp.c (sim_resume): From Martin Hunt <hunt@cygnus.com>. Check
731         IBA for SDBT.
732
733         * d10v_sim.h (AE_VECTOR_START, RIE_VECTOR_START,
734         SDBT_VECTOR_START, TRAP_VECTOR_START): Define.
735         
736         * simops.c (OP_5F00): For "trap", mask out all but SM bit in PSW,
737         use move_to_cr.
738         (OP_5F00): For "trap", update BPSW with move_to_cr.
739
740 Fri Dec  5 15:31:17 1997  Andrew Cagney  <cagney@b1.cygnus.com>
741
742         * d10v_sim.h (enum): Enumerate CR register names.
743         (enum): Enumerate PSW bit values.
744         (PSW): Obtain value uing move_from_cr.
745         (MOD_S, MOD_E, BPSW): Make r-values.
746         (move_from_cr, move_to_cr): Declare functions.
747         
748         * interp.c (sim_fetch_register, sim_store_register): Use
749         move_from_cr and move_to_cr for CR register transfers.
750
751         * simops.c (move_from_cr, move_to_cr): New functions.
752         (OP_5F40): Move BPSW to PSW using move_to_cr and move_from_cr.
753         (OP_5600): For "mvtc", use function move_to_cr.
754         (OP_5200): For "mvfc", use function move_from_cr.
755
756 Fri Dec  5 13:33:14 1997  Andrew Cagney  <cagney@b1.cygnus.com>
757
758         * simops.c (OP_5600): For "mvtc" MOD_E and MOD_S, ensure that the
759         LSbit is zero.
760
761 Thu Dec  4 09:21:05 1997  Doug Evans  <devans@canuck.cygnus.com>
762
763         * configure: Regenerated to track ../common/aclocal.m4 changes.
764
765 Thu Dec  4 16:51:02 1997  Andrew Cagney  <cagney@b1.cygnus.com>
766
767         * d10v_sim.h (struct _state): Add DM - PSW debug mask.
768
769         * simops.c (OP_5600): For "mvtc", save PSW.DM.
770         (OP_5200): Ditto for "mvfc".
771
772 Wed Dec  3 17:27:06 1997  Andrew Cagney  <cagney@b1.cygnus.com>
773
774         * d10v_sim.h (SEXT56): Define.
775
776         * simops.c (OP_4201): For "rac", sign extend 56 bit value before
777         it is shifted.
778
779         * d10v_sim.h (MAX32, MIN32, MASK32, MASK40): Re-define using
780         SIGNED64 macro.
781
782 Tue Dec  2 15:38:34 1997  Fred Fish  <fnf@cygnus.com>
783
784         * interp.c (sim_resume): Call do_2_short with LEFT_FIRST or
785         RIGHT_FIRST, as appropriate, instead of hardcoded ints that
786         don't match enum values.
787
788 Tue Dec  2 15:01:08 1997  Andrew Cagney  <cagney@b1.cygnus.com>
789
790         * simops.c (OP_3A00): For "macu", perform multiply stage using 32
791         bit rather than 16 bit precision.
792         (OP_3C00): For "mulxu", store unsigned product in ACC.
793         (OP_3800): For "msbu", subtract unsigned product from ACC,
794         (OP_0): For "sub", compute carry by comparing inputs.
795
796 Tue Dec  2 11:04:37 1997  Andrew Cagney  <cagney@b1.cygnus.com>
797
798         * simops.c (OP_1000): For "sub2w", compute carry by comparing
799         inputs.
800
801 Mon Nov 17 20:57:21 1997  Andrew Cagney  <cagney@b1.cygnus.com>
802
803         * simops.c (OP_1): Use 32 bit unsigned arithmetic for subtract,
804         carry indicated by value > 0xffff.
805
806 Fri Nov 14 12:51:20 1997  Andrew Cagney  <cagney@b1.cygnus.com>
807
808         * interp.c (sim_resume): Don't set up SIGINT handler using signal,
809         handled by client.
810         (sim_resume): Fix race condition of a direct assignment to
811         stop_simulator, conditionally call sim_stop.
812         (sim_stop_reason): Check stop_simulator returning SIGINT.  Clear
813         stop_simulator ready for next sim_resume call.
814         (sim_ctrl_c): Delete function.
815
816 Thu Nov 13 19:29:34 1997  Andrew Cagney  <cagney@b1.cygnus.com>
817
818         * interp.c (sim_resume): For "REP", only check/update the PC when
819         a branch instruction has not been executed.
820
821 Mon Nov 10 17:50:18 1997  Andrew Cagney  <cagney@b1.cygnus.com>
822
823         * simops.c (OP_4201): "rachi". Sign extend bit 40 of ACC.  Sign
824         extend bit 44 all constants.
825         (OP_4201): Replace GCC specific 0x..LL with SIGNED64 macro.
826         
827 Fri Oct 24 10:26:29 1997  Andrew Cagney  <cagney@b1.cygnus.com>
828
829         * d10v_sim.h: Include sim-types.h.
830         (uint8, in816, uiny16, int32, uint32, int64, uint64): Typedef
831         using unsigned8 et.al. from sim-types.h.
832         (SEXT32, SEXT40, SEXT44, SEXT60): Replace GCC specific 0x..LL with
833         SIGNED64 macro.
834
835 Wed Oct 22 14:43:00 1997  Andrew Cagney  <cagney@b1.cygnus.com>
836
837         * interp.c (sim_write_phys): New function, write to physical
838         instead of virtual memory.
839         
840         * interp.c (sim_load): Pass lma_p and sim_write_phys to
841         sim_load_file.
842
843 Mon Oct 13 10:55:07 1997  Fred Fish  <cygnus.com>
844
845         * simops.c (OP_6A01): Change OP_POSTDEC to OP_POSTINC and move
846         exception generation code to OP_6E01.
847         (OP_6E01): Change OP_POSTINC to OP_POSTDEC and insert exception
848         generation code.
849
850 Sat Oct 11 09:02:08 1997  Fred Fish  <fnf@cygnus.com>
851
852         * simops.c (OP_6401): postdecrement on r15 is OK, remove exception.
853         (OP_6601): Ditto.
854
855 Fri Oct  3 09:28:00 1997  Andrew Cagney  <cagney@b1.cygnus.com>
856
857         * configure: Regenerated to track ../common/aclocal.m4 changes.
858
859 Sat Sep 27 12:51:34 1997  Fred Fish  <fnf@cygnus.com>
860
861         * interp.c (pc_addr): Discard upper bit(s) of PC in case
862         IMAP1 selects unified memory.
863         * d10v_sim.h (INC_ADDR): Align MOD_E to increment before testing
864         for end condition.
865
866 Wed Sep 24 17:38:57 1997  Andrew Cagney  <cagney@b1.cygnus.com>
867
868         * configure: Regenerated to track ../common/aclocal.m4 changes.
869
870 Tue Sep 23 11:04:38 1997  Andrew Cagney  <cagney@b1.cygnus.com>
871
872         * configure: Regenerated to track ../common/aclocal.m4 changes.
873
874 Mon Sep 22 11:46:20 1997  Andrew Cagney  <cagney@b1.cygnus.com>
875
876         * configure: Regenerated to track ../common/aclocal.m4 changes.
877
878 Fri Sep 19 17:45:25 1997  Andrew Cagney  <cagney@b1.cygnus.com>
879
880         * configure: Regenerated to track ../common/aclocal.m4 changes.
881
882 Mon Sep 15 17:36:15 1997  Andrew Cagney  <cagney@b1.cygnus.com>
883
884         * configure: Regenerated to track ../common/aclocal.m4 changes.
885
886 Wed Sep 10 22:30:24 1997  Martin M. Hunt  <hunt@cygnus.com>
887
888         * interp.c (sim_resume): Increment PC at end of rep
889         loop.
890
891         * simops.c (OP_4201): Fix rachi instruction.
892
893 Thu Sep  4 17:21:23 1997  Doug Evans  <dje@seba>
894
895         * configure: Regenerated to track ../common/aclocal.m4 changes.
896
897 Wed Aug 27 18:13:22 1997  Andrew Cagney  <cagney@b1.cygnus.com>
898
899         * configure: Regenerated to track ../common/aclocal.m4 changes.
900         * config.in: Ditto.
901
902 Tue Aug 26 10:37:49 1997  Andrew Cagney  <cagney@b1.cygnus.com>
903
904         * interp.c (sim_kill): Delete.
905         (sim_create_inferior): Add ABFD argument.
906         (sim_load): Move setting of PC from here.
907         (sim_create_inferior): To here.
908         (start_address): Delete variable.
909
910 Mon Aug 25 17:50:22 1997  Andrew Cagney  <cagney@b1.cygnus.com>
911
912         * configure: Regenerated to track ../common/aclocal.m4 changes.
913         * config.in: Ditto.
914
915 Mon Aug 25 15:39:29 1997  Andrew Cagney  <cagney@b1.cygnus.com>
916
917         * interp.c (sim_open): Add ABFD argument.
918
919 Tue May 20 10:14:45 1997  Andrew Cagney  <cagney@b1.cygnus.com>
920
921         * interp.c (sim_open): Add callback argument.
922         (sim_set_callbacks): Remove SIM_DESC argument.
923
924 Thu Apr 24 00:39:51 1997  Doug Evans  <dje@canuck.cygnus.com>
925
926         * configure: Regenerated to track ../common/aclocal.m4 changes.
927
928 Tue Apr 22 10:29:23 1997  Doug Evans  <dje@canuck.cygnus.com>
929
930         * interp.c (sim_open): Undo patch to add -E support.
931
932 Fri Apr 18 13:39:01 1997  Andrew Cagney  <cagney@b1.cygnus.com>
933
934         * interp.c (sim_stop): New function.
935
936 Thu Apr 17 02:42:00 1997  Doug Evans  <dje@canuck.cygnus.com>
937
938         * Makefile.in (SIM_OBJS): Add sim-load.o.
939         * d10v_sim.h (exec_bfd): Rename to prog_bfd.
940         * interp.c: #include bfd.h.
941         (myname, sim_kind, start_address): New static locals.
942         (prog_bfd_was_opened_p, prog_bfd): New static locals.
943         (decode_pc): Update to use prog_bfd.
944         (sim_open): Set sim_kind, myname.  Ignore -E arg.
945         (sim_close): Close prog_bfd if simulator opened it.
946         (sim_create_inferior): Return SIM_RC.  Delete arg start_address.
947         (sim_load): Return SIM_RC.  New arg abfd.  Set start address from bfd.
948         Call sim_load_file to load file into simulator.
949         * simops.c (trace_input_func): exec_bfd renamed to prog_bfd.
950
951 Wed Apr 16 16:12:03 1997  Andrew Cagney  <cagney@b1.cygnus.com>
952
953         * simops.c (OP_5F00): Only provide system calls SYS_execv,
954         SYS_wait, SYS_wait, SYS_utime, SYS_time if defined by the host.
955         
956 Mon Apr  7 15:45:02 1997  Andrew Cagney  <cagney@kremvax.cygnus.com>
957
958         * configure: Regenerated to track ../common/aclocal.m4 changes.
959         * config.in: Ditto.
960
961 Wed Apr  2 15:06:28 1997  Doug Evans  <dje@canuck.cygnus.com>
962
963         * interp.c (sim_open): New arg `kind'.
964
965         * configure: Regenerated to track ../common/aclocal.m4 changes.
966
967 Wed Apr  2 14:34:19 1997 Andrew Cagney <cagney@kremvax.cygnus.com>
968
969         * configure: Regenerated to track ../common/aclocal.m4 changes.
970
971 Mon Mar 17 15:10:07 1997  Andrew Cagney  <cagney@kremvax.cygnus.com>
972
973         * configure: Re-generate.
974
975 Fri Mar 14 10:34:11 1997  Michael Meissner  <meissner@cygnus.com>
976
977         * configure: Regenerate to track ../common/aclocal.m4 changes.
978
979         * simops.c (OP_5F00): Remove old traps 1-3.  Make trap 15 the same
980         as trap 0, which will be deprecated.  Only set errno, if an error
981         in fact was returned.
982
983 Thu Mar 13 12:41:20 1997  Doug Evans  <dje@canuck.cygnus.com>
984
985         * interp.c: Delete redundant prototypes of sim_foo fns.
986         (sim_open): New SIM_DESC result.  Argument is now in argv form.
987         (other sim_*): New SIM_DESC argument.
988
989 Thu Mar 13 10:29:04 1997  Michael Meissner  <meissner@cygnus.com>
990
991         * simops.c (trace_{input,output}_func): Call flush_stdout from the
992         callback functions.
993         (OP_5F00): Ditto.
994         (OP_6{4,6,C,A}01): Test for post decrement on the stack pointer.
995         (OP_{1200,1000000,201,5FE0,1003,17001002}): Fix problems in
996         setting the carry bit after an add or a subtract.
997
998 Wed Feb 12 16:04:15 1997  Michael Meissner  <meissner@cygnus.com>
999
1000         * simops.c (OP_{1403,15002A02,3{0,4}0{0,1}}): Only use the bottom
1001         40 bits of accumulators.  Sign/zero extend as appropriate.
1002
1003 Tue Feb  4 13:33:30 1997  Doug Evans  <dje@canuck.cygnus.com>
1004
1005         * Makefile.in (@COMMON_MAKEFILE_FRAG): Use
1006         COMMON_{PRE,POST}_CONFIG_FRAG instead.
1007         * configure.in: sinclude ../common/aclocal.m4.
1008         * configure: Regenerated.
1009
1010 Thu Jan 23 11:46:23 1997  Stu Grossman  (grossman@critters.cygnus.com)
1011
1012         * configure configure.in Makefile.in:  Update to new configure
1013         scheme which is more compatible with WinGDB builds.
1014         * configure.in:  Improve comment on how to run autoconf.
1015         * configure:  Re-run autoconf to get new ../common/aclocal.m4.
1016         * Makefile.in:  Use autoconf substitution to install common
1017         makefile fragment.
1018
1019 Fri Dec 27 22:54:05 1996  Angela Marie Thomas (angela@cygnus.com)
1020
1021         * gencode.c: patch to not #include "d10v_sim.h" which
1022         unecessarily includes bfd.h and causes wingdb configure
1023         to fail.
1024
1025 Mon Dec 16 13:39:03 1996  Martin M. Hunt  <hunt@pizza.cygnus.com>
1026
1027         * interp.c (xfer_mem): Change unified memory to 0x0.
1028
1029 Thu Nov 28 20:42:56 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
1030
1031         * simops.c (OP_3E01): Fix tracing information.
1032         (OP_300{0,1}): Do not propigate sign.
1033
1034 Mon Nov 25 19:47:40 1996  Doug Evans  <dje@canuck.cygnus.com>
1035
1036         * config.in (WORDS_BIGENDIAN): Add.
1037         * configure: Regenerated.
1038         * d10v_sim.h: #include "config.h"
1039
1040 Sat Nov 23 09:34:50 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
1041
1042         * gencode.c (write_opcodes): Eliminate warnings when generated
1043         table.c is compiled.
1044
1045 Wed Nov 20 19:41:40 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
1046
1047         * interp.c (sim_open): Cast result of calloc, and make sure NULL
1048         was not returned.
1049         (dmem_addr): If address is illegal or in I/O space, signal a bus
1050         error.
1051         (pc_addr): Signal bus error, not illegal instruction for bogus
1052         pc.
1053
1054 Wed Nov 20 01:23:03 1996  Doug Evans  <dje@canuck.cygnus.com>
1055
1056         * Makefile.in: Delete all stuff moved to ../common/Make-common.in.
1057         (SIM_OBJS,SIM_EXTRA_CFLAGS,SIM_EXTRA_CLEAN): Define.
1058         * configure.in: Simplify using macros in ../common/aclocal.m4.
1059         Call AC_CHECK_HEADERS(unistd.h).
1060         * configure: Regenerated.
1061         * config.in: New file.
1062         * interp.c: #include "callback.h".
1063         * simops.c: #include "config.h".  #include <unistd.h> if present.
1064
1065 Fri Nov  8 16:19:55 1996  Martin M. Hunt  <hunt@pizza.cygnus.com>
1066
1067         * d10v-sim.h (simops): Add flag is_long.
1068         (State): Add pc_changed.  Instructions which update the PC should
1069         use the JMP macro which sets this.
1070         (JMP): New macro.  Sets the PC and the pc_changed flag.
1071
1072         * gencode.c (write_opcodes): Add is_long field.
1073         
1074         * interp.c (lookup_hash): If we blindly apply a short opcode's mask
1075         to a long opcode we could get a false match.  Check the opcode size.
1076         (hash): Add a size field to the hash table.
1077         (sim_open): Initialize size field in hash table.
1078         (sim_resume): Change to logic for setting the PC.  Used to increment the
1079         PC if it had not been changed.  This didn't allow single-instruction loops.
1080         Now checks the flag State.pc_changed.  Also now stops when ^C is received.
1081         (dmem_addr): Fix translation of data segments to unified memory.
1082         (sim_ctrl_c): New function.  When ^C is received, set stop_simulator flag.
1083
1084         * simops.c: Changed all branch and jump instructions to use new JMP macro.
1085         (OP_20000000): Corrected trace information to show this is a ldi.l, not
1086         a ldi.s instruction.
1087         
1088 Thu Oct 31 19:13:55 1996  Martin M. Hunt  <hunt@pizza.cygnus.com>
1089
1090         * interp.c (sim_fetch_register, sim_store_register): Fix bug where
1091         updating the accumulators was overwriting other parts of the global
1092         State variable.
1093
1094 Wed Oct 30 17:35:14 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
1095
1096         * interp.c (bfd.h) Don't include it here any more.
1097         (text{,_start,_end}): Move here from simops.c and make extern.
1098         (decode_pc): New function to return the PC as an address that the
1099         debugger can use.
1100         (dmem_addr): Print decoded PC in error message.
1101         (pc_addr): Ditto.
1102
1103         * simops.c (bfd.h) Don't include it here any more.
1104         (text{,_start,_end}): Move to simops.c.
1105         (trace_input_func): Move decoding of PC, and looking up .text
1106         start to decode_pc.
1107
1108         * d10v_sim.h (bfd.h): Include it here.
1109         (text{,_start,_end}): Add external declarations.
1110         (exec_bfd): Ditto.
1111         (decode_pc): Ditto.
1112
1113 Tue Oct 29 12:13:52 1996  Martin M. Hunt  <hunt@pizza.cygnus.com>
1114
1115         * interp.c (sim_size): Now allocates unified memory for imap segments
1116         0,1,2, and 127. Initializes imap0 and imap1 to 0x1000.  Initializes dmap to 0.
1117         (sim_write): Just call xfer_mem().
1118         (sim_read): Just call xfer_mem().
1119         (xfer_mem): New function. Does appropriate memory mapping and copies bytes.
1120         (dmem_addr): New function. Reads dmap register and translates data
1121         addresses to local addresses.
1122         (pc_addr): New function. Reads imap register and computes local address
1123         corresponding to contents of the PC.
1124         (sim_resume): Change to use pc_addr().
1125         (sim_create_inferior): Change reinitialization code. Also reinitializes
1126         imap[01] and dmap.
1127         (sim_fetch_register): Add fake registers 32,33,34 for imap0, imap1, and dmap.
1128         (sim_store_register): Add fake registers 32,33,34 for imap0, imap1, and dmap.
1129
1130         * simops.c (MEMPTR): Redefine to use dmem_addr().
1131         (OP_5F00): Replace references to STate.imem with dmem_addr().
1132         
1133         * d10v-sim.h (State): Remove mem_min and mem_max. Add umem[128].
1134         (RB,SW,RW,SLW,RLW): Redefine to use dmem_addr().
1135         (IMAP0,IMAP1,DMAP,SET_IMAP,SET_IMAP1,SET_DMAP): Define.
1136         
1137 Tue Oct 22 15:22:33 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
1138
1139         * d10v_sim.h (_ins_type): Reorganize, so that we can provide
1140         better statistics, like not counting NOPS as parallel
1141         instructions, and printing total cycles.
1142         (ins_type_counters): Make unsigned long.
1143         (left_nops,right_nops): Fold into ins_type_counters.
1144
1145         * simops.c (trace_input_func): Print new instruction types.
1146         Handle OP_R2R3 as input types.
1147         (OP_{38000000,7000}): Correctly sign extend bytes.
1148         (OP_5E00): Don't count NOPs as parallel instructions.
1149         (OP_460B): Remove unused variable.
1150         (OP_5F00): Ditto.
1151
1152         * interp.c (ins_type_counters): Make unsigned long.
1153         (left_nops,right_nops): Delete.
1154         (most functions): Add prototypes.
1155         (INLINE): If GCC and optimize define as __inline__.
1156         ({,lookup_}hash,get_operands): Declare as INLINE.
1157         (do_parallel): Count conditional operations.
1158         (add_commas): New function, to add commas every 3 digits.
1159         (sim_size): Call add_commas to print numbers.
1160         (sim_{open,resume}): Delete unused variables.
1161         (sim_info): Provide better statistics.
1162         (sim_read): Add int return type.
1163
1164 Mon Oct 21 16:16:26 1996  Martin M. Hunt  <hunt@pizza.cygnus.com>
1165
1166         * interp.c (sim_resume): Change the way single-stepping and exceptions
1167         are handled so single-stepping works again.
1168
1169 Thu Oct 17 12:24:16 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
1170
1171         * endian.c: Optimize simulated loads/stores on x86, AIX, and big
1172         endian hosts.
1173
1174         * configure.in (--enable-sim-bswap): New switch to enable using
1175         the BSWAP instruction on x86's.
1176         * configure: Regenerate.
1177
1178         * Makefile.in ({SWAP,CONFIG}_CFLAGS): Add --enable-sim-bswap
1179         support.
1180
1181 Wed Oct 16 13:50:06 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
1182
1183         * endian.c: New file.  Move endian functions here from interp.c.
1184         Optimize code, and make it work as either inline functions or as a
1185         separate file.
1186
1187         * interp.c: Move endian functions from here to endian.c.
1188
1189         * Makefile.in (INCLUDE): Add endian.c.
1190         (run,libsim.a): Add dependency on endian.o.
1191         (endian.o): Add dependency.
1192
1193         * d10v_sim.h (read/write support): Always go through the machine
1194         independent endian functions.  If compiling with GCC and
1195         optimizing, include endian.c so the endian functions are inlined.
1196
1197         * simops.c (OP_5F00): Correct tracing of accumulators.  
1198
1199 Tue Oct 15 10:57:50 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
1200
1201         * simops.c (OP_5F00): Add support for getpid, kill system calls.
1202
1203         * interp.c (do_{2_short,parallel}): If an exception is raised,
1204         don't execute the second instruction.
1205
1206 Sat Oct 12 22:17:43 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
1207
1208         * simops.c (OP_{31000000,6601,6201,6200}): Store address in a
1209         temporary in case the register is overriden when loading.
1210         (OP_6200): Output type is OP_DREG for tracing.
1211
1212 Fri Oct  4 23:46:18 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
1213
1214         * d10v_sim.h (struct _state): Add mem_{min,max} fields.
1215
1216         * interp.c (sim_size): Initialize mem_{min,max} fields.
1217         (sim_write): Update mem_{min,max} fields.
1218         (sim_resume): If PC is not in the minimum/maximum memory range,
1219         abort.
1220         (sim_create_inferior): Preserve mem_{min,max} fields.
1221
1222 Fri Sep 27 13:11:58 1996  Mark Alexander  <marka@cygnus.com>
1223
1224         * simops.c (OP_5F00): Add support for time() system call.
1225
1226 Wed Sep 25 16:31:41 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
1227
1228         * simops.c (OP_{6E01,6A01,6E1F,6A00}): Print both words being
1229         stored if tracing.
1230         (OP_5F00,trace_{in,out}put_func): Add finer grain tracing for
1231         system calls.
1232
1233 Mon Sep 23 17:55:30 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
1234
1235         * simops.c (op_types): Add OP_{CONSTANT8,R2,R3}.
1236         (trace_input_func): Add support for  OP_{CONSTANT8,R2,R3}.
1237         (OP_{4900,24800000,4800,4A00,4B00,4D00,4C00}): Add OP_R2 and OP_R3
1238         to call/subroutine returns to trace the first two arguments and
1239         the return value.  For small jumps, use CONSTANT8, not CONSTANT16.
1240
1241 Fri Sep 20 15:36:45 1996  Martin M. Hunt  <hunt@pizza.cygnus.com>
1242
1243         * interp.c (sim_create_inferior): Reinitialize State every time 
1244         sim_create_inferior() is called.
1245
1246 Thu Sep 19 21:38:20 1996  Michael Meissner  <meissner@wogglebug.ziplink.net>
1247
1248         * simops.c (OP_{401,2000000,601,3000000,23000000}): Get sign right
1249         on comparisons.
1250         (OP_401): Fix tracing information.
1251
1252 Thu Sep 19 10:30:22 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
1253
1254         * simops.c (SIZE_{PC,LINE_NUMBER}): New default sizes for output.
1255         (trace_input_func): Use them.
1256         (trace_input_func): Make sure there is a trailing space after the
1257         instruction.
1258         (OP_6200): Fix tracing info.
1259
1260         * Makefile.in (run): Add dependencies on libbfd.a and
1261         libiberity.a.
1262
1263 Wed Sep 18 09:13:25 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
1264
1265         * d10v_sim.h (DEBUG_INSTRUCTION): New debug value to include line
1266         numbers and function names in debug trace.
1267         (DEBUG): If not defined, set to DEBUG_TRACE, DEBUG_VALUES, and
1268         DEBUG_LINE_NUMBER. 
1269         (SIG_D10V_{STOP,EXIT}): Values to represent the stop instruction
1270         and exit system call trap being executed.
1271
1272         * interp.c (sim_stop_reason): Set exit code correctly for stop
1273         instruction and exit system call trap.
1274
1275         * configure.in (--enable-sim-cflags): Remove trace case.
1276         (--enable-sim-debug): New switch to set the debug values.
1277         * configure: Regenerate.
1278
1279         * simops.c (trace_{input,output}_func): Rename from
1280         trace_{input,output}.
1281         (trace_{input,output}): Call trace_{input,output}_func if
1282         d10v_debug is non-zero.
1283         (SIZE_INSTRUCTION): Cut down to 8.
1284         (SIZE_OPERANDS): Cut down to 18.
1285         (SIZE_LOCATION): New value for size of line number, function name
1286         field.
1287         (init_text_p,text{,_start,_end}): New static variables for
1288         printing line number and function name.
1289         (exec_bfd): New external that run.c sets.
1290         (trace_input_func): Print line number and function name if
1291         available and if desired.
1292         (OP_4E09): Don't print out DBT message.
1293         (OP_5FE0): Set exception field to SIG_D10V_STOP.
1294         (OP_5F00): Set exception field to SIG_D10V_EXIT.        
1295
1296 Sat Sep 14 22:18:43 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
1297
1298         * interp.c (do_2_short): If the instruction encodes jump->ins,
1299         don't do the second instruction if the jump succeeds.
1300
1301 Fri Sep 13 22:35:19 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
1302
1303         * simops.c (OP_5F00): Use unknown traps to print all GPRs,
1304         accumulators, PC, and F0/F1/C flags.
1305
1306 Thu Sep 12 12:50:11 1996  Mark Alexander  <marka@cygnus.com>
1307
1308         * simops.c (OP_5F00): Fix problems with system calls.
1309
1310 Thu Sep 12 12:19:28 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
1311
1312         * simops.c (OP_5F00): Correct tracing information for trap.
1313
1314 Wed Sep 11 18:55:50 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
1315
1316         * Makefile.in (CSEARCH): Correctly find opcodes directory.
1317
1318 Mon Sep  9 13:27:26 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
1319
1320         * simops.c (trace_output): Properly align accumulator output.
1321         (OP_3{0,2,4}00): Properly parenthesize test expression.  Add error
1322         if shift count is too high.
1323         (OP_4E{00,02,04,20,22,40,42}): Make tests agree with book.
1324         (OP_4E09): Make cpfg properly trace the input flags.
1325         (op_types): Add OP_FLAG_OUTPUT.
1326         (trace_{input,output}): Support OP_FLAG_OUTPUT.
1327         (OP_31000000): This ld2w varient is a 16-bit memory reference, not
1328         an 8-bit memory reference instruction for tracing purposes.
1329         (OP_201): Addi needs to set the carry.
1330
1331 Fri Sep  6 17:56:17 1996  Martin M. Hunt  <hunt@pizza.cygnus.com>
1332
1333         * simops.c (OP_2600, OP_2601): Changed min and max comparisons
1334         to use signed register values.
1335
1336 Wed Sep  4 11:35:17 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
1337
1338         * d10v_sim.h (DEBUG_*): Add bit flags for controlling debug
1339         output.
1340         (_ins_type): New enumeration to specify which container an
1341         instruction is in, and whether it is part of a parallel operation.
1342         (_state): Add ins_type field.
1343         ({,u}int{8,16,32,64}): Use limits.h to size the appropriate types.
1344         (ins_type_counters): Counters for the various instruction types.
1345         ({left,right}_nops): Counters for the number of nops in each
1346         container.
1347         (d10v_debug): New variable to indicate whether debugging is turned
1348         on.
1349
1350         * simops.c: (all functions): Change all #ifdef DEBUG code so that
1351         the input and output values can be traced, along with the
1352         instruction type.  Make the -t option enable tracing.
1353         (all functions): Change printf calls to use the printf_filtered
1354         function in the callback table.
1355
1356         * interp.c (_leftright): New enumeration to say whether 2 short
1357         instructions are done left first or right first.
1358         (do_{long,2_short,parallel}): Indicate in the machine state which
1359         type of instruction this is.  Count each of the types of
1360         instructions executed.
1361         (sim_size): Only print the memory sizes if DEBUG_MEMSIZE debug
1362         flag is set.
1363         (sim_resume): Pass left/right indication to do_2_short.
1364         (all functions): Change printf calls to use the printf_filtered
1365         function in the callback table.
1366         (sim_trace): Turn on debug flag if DEBUG was defined, and call
1367         sim_resume.
1368         (sim_info): Print out statistics on instructions.
1369         (sim_{trace,create_inferior}): Eliminate extraneous output unless
1370         debugging.
1371         (sim_open): If args == -t and DEBUG was defined, set d10v_debug.
1372         Only initialize the hash table the first time sim_open is called.
1373
1374         * Makefile.in: Make objects depend on d10v_sim.h.
1375         ({,SIM_}CFLAGS): Include configure dependent switches.  Setting
1376         CFLAGS does not override host/target defines or SIM_CFLAGS.
1377         (CC_FOR_BUILD,gencode): Use CC_FOR_BUILD to compile gencode.
1378         (run): By default, the math library is not needed to be linked
1379         in.
1380         ({BFD,LIBIBERTY}_LIB): Define as variables so they can be
1381         overridden.
1382         (VPATH): Don't set to anything but @srcdir@ to work with non-GNU
1383         makes.
1384         ({run,callback}.o): Provide explicit paths to their appropriate
1385         source directories.
1386         (gencode{,.o},d10v-opc.o): Split compilation into creating object
1387         and linking.  Instead of linking in libopcodes.a, just compile
1388         d10v-opc.o directly to handle canadian cross.
1389         (CSEARCH): Add opcodes directory.
1390
1391         * configure.in (--enable-sim-cflags): New switch to allow user to
1392         set the defaults.
1393         (CC_FOR_BUILD): Deal with canadian crosses.
1394         * configure: Regenerate.
1395
1396 Wed Sep 04 04:45:34 1996  Mark Alexander  <marka@cygnus.com>
1397
1398         * simops.c: Include correct syscall.h for d10v, not host's.
1399         Fix #ifdef SYS_stat.
1400
1401 Tue Sep  3 14:00:04 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
1402
1403         * simops.c (OP_5F00): Wrap all SYS_xxx traps with #ifdef.
1404         Add trap 2 to be printf and trap 3 to be putchar.
1405
1406 Wed Aug 28 21:42:34 1996  Mark Alexander  <marka@cygnus.com>
1407
1408         * Makefile.in, d10v_sim.h, interp.c, simops.c: Add support
1409         for low-level system calls.
1410
1411 Wed Aug 28 17:33:19 1996  Martin M. Hunt  <hunt@pizza.cygnus.com>
1412
1413         * Makefile.in, d10v_sim.h, interp.c: Fix byte-order problems.
1414
1415 Mon Aug 26 18:30:28 1996  Martin M. Hunt  <hunt@pizza.cygnus.com>
1416
1417         * d10v_sim.h (SEXT32): Added.
1418         * interp.c: Commented out printfs.
1419         * simops.c:  Fixed error in sb and st2w. 
1420
1421 Thu Aug 15 13:30:03 1996  Martin M. Hunt  <hunt@pizza.cygnus.com>
1422
1423         * Makefile.in, d10v_sim.h, interp.c, simops.c: Added remaining
1424         DSP instructions.  Added modulo addressing.
1425
1426 Sun Aug 11 12:57:15 1996  Martin M. Hunt  <hunt@pizza.cygnus.com>
1427
1428         * Makefile.in, d10v_sim.h, interp.c, simops.c: Snapshot.
1429
1430 Fri Aug  2 17:44:24 1996  Martin M. Hunt  <hunt@pizza.cygnus.com>
1431
1432         * d10v_sim.h, simops.c: Snapshot.
1433
1434 Thu Aug  1 17:05:24 1996  Martin M. Hunt  <hunt@pizza.cygnus.com>
1435
1436         * ChangeLog, Makefile.in, configure, configure.in, d10v_sim.h, 
1437         gencode.c, interp.c, simops.c: Created.
1438