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