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