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