14c4b184147ca6464a81db93e783f4793006e580
[external/binutils.git] / sim / sh / ChangeLog
1 2015-12-27  Mike Frysinger  <vapier@gentoo.org>
2
3         * Makefile.in (SIM_OBJS): Delete sim-hload.o.
4
5 2015-12-26  Mike Frysinger  <vapier@gentoo.org>
6
7         * config.in, configure: Regenerate.
8
9 2015-11-21  Mike Frysinger  <vapier@gentoo.org>
10
11         * gencode.c (tab): Pass sd into trap calls.
12         * interp.c (prog_argv, callback): Delete.
13         (parse_and_set_memory_size): Add SIM_DESC arg.
14         (trap): Declare callback and prog_argv.
15         (sim_resume): Declare callback.
16         (sim_info): Change callback->printf_filtered calls to sim_io_printf.
17         (sim_open): Delete callback assignment.  Pass sd to
18         parse_and_set_memory_size.
19         (parse_and_set_memory_size): Change callback->printf_filtered call
20         to sim_io_printf.
21         (sim_create_inferior): Delete prog_argv assignment.
22         (sim_do_command): Change callback->printf_filtered calls to
23         sim_io_printf.  Pass sd to parse_and_set_memory_size.
24
25 2015-11-15  Mike Frysinger  <vapier@gentoo.org>
26
27         * Makefile.in (SIM_OBJS): Delete sim-stop.o.
28
29 2015-11-14  Mike Frysinger  <vapier@gentoo.org>
30
31         * interp.c (sim_close): Delete.
32
33 2015-06-23  Mike Frysinger  <vapier@gentoo.org>
34
35         * configure: Regenerate.
36
37 2015-06-12  Mike Frysinger  <vapier@gentoo.org>
38
39         * configure: Regenerate.
40
41 2015-06-12  Mike Frysinger  <vapier@gentoo.org>
42
43         * configure: Regenerate.
44
45 2015-04-18  Mike Frysinger  <vapier@gentoo.org>
46
47         * sim-main.h (SIM_CPU): Delete.
48
49 2015-04-18  Mike Frysinger  <vapier@gentoo.org>
50
51         * sim-main.h (sim_cia): Delete.
52
53 2015-04-17  Mike Frysinger  <vapier@gentoo.org>
54
55         * sim-main.h (CIA_GET, CIA_SET): Delete.
56
57 2015-04-17  Mike Frysinger  <vapier@gentoo.org>
58
59         * interp.c (sh_pc_get, sh_pc_set): New functions.
60         (sim_open): Call CPU_PC_FETCH & CPU_PC_STORE for all cpus.
61
62 2015-04-15  Mike Frysinger  <vapier@gentoo.org>
63
64         * Makefile.in (SIM_OBJS): Delete sim-cpu.o.
65         * sim-main.h (STATE_CPU): Delete.
66
67 2015-04-13  Mike Frysinger  <vapier@gentoo.org>
68
69         * configure: Regenerate.
70
71 2015-04-06  Mike Frysinger  <vapier@gentoo.org>
72
73         * Makefile.in (SIM_OBJS): Delete sim-engine.o.
74
75 2015-03-31  Mike Frysinger  <vapier@gentoo.org>
76
77         * config.in, configure: Regenerate.
78
79 2015-03-28  Mike Frysinger  <vapier@gentoo.org>
80
81         * Makefile.in (SIM_RUN_OBJS, SIM_EXTRA_CFLAGS): Delete.
82         (SIM_OBJS): Change to $(SIM_NEW_COMMON_OBJS).
83         * interp.c: Delete run-sim.h include.  Include sim-main.h, sim-base.h,
84         and sim-options.h.
85         (SEXT, SEXT32): Undefine.
86         (sim_write): Delete prototype.
87         (regstacktype, saved_state_type): Move to sim-main.h.
88         (target_little_endian): Replace with CURRENT_TARGET_BYTE_ORDER.
89         (host_little_endian): Replace with CURRENT_HOST_BYTE_ORDER.
90         (sim_kind, myname, tracing, sim_stop, sim_trace, sim_set_profile,
91         sim_set_profile_size, sim_load, sim_set_callbacks,
92         sim_complete_command): Delete.
93         (sim_size): Mark static.
94         (init_pointers): Delete host_little_endian setup.
95         (sim_resume): Delete tracing check.
96         (free_state): New cleanup function.
97         (sim_open): Rewrite to use new common logic.
98         (sim_create_inferior): Call init_dsp.
99         * sim-main.h: New file.
100         * tconfig.h: Delete file.
101
102 2015-03-28  Mike Frysinger  <vapier@gentoo.org>
103
104         * gencode.c (ppi_gensim): Convert old style prototype with ppi_insn.
105         * interp.c: Include ctype.h and run-sim.h.
106         [HAVE_TIME_H]: Include time.h
107         [HAVE_SYS_TIME_H]: Include sys/time.h
108         [!_WIN32]: Include utime.h and sys/wait.h.
109         (set_fpscr1, raise_exception, raise_buserror, get_dr, set_dr, set_sr,
110         do_rdat, do_wdat, process_wlat_addr, process_wwat_addr,
111         process_wbat_addr, process_rlat_addr, process_rwat_addr,
112         process_rbat_addr, IOMEM, get_now, now_persec, swapout, swapout16,
113         ptr, strswaplen, strnswap, dmul, macw, macl, get_loop_bounds_ext,
114         get_loop_bounds, sim_size, init_dsp, init_pointers, dump_profile,
115         gotcall, sim_stop, sim_write, sim_read, sim_store_register,
116         sim_fetch_register, sim_trace, sim_stop_reason, sim_info,
117         sim_set_profile, sim_set_profile_size, sim_open,
118         parse_and_set_memory_size, sim_close, sim_load, sim_create_inferior,
119         sim_do_command, sim_set_callbacks): Convert old style prototype.
120         (fail): Delete unused function.
121         (wlat_fast, wwat_fast, wbat_fast, rlat_fast, rwat_fast, rbat_fast):
122         Delete unused prototypes.
123         (wlat_fast, wwat_fast, wbat_fast, rlat_fast, rwat_fast, rbat_fast,
124         swap, swap16):
125         Convert old style prototype and move INLINE before the type.
126         (trap): Convert old style prototype.  Add casts to wait and sim_write
127         calls.
128         (div1): Convert old style prototype.  Change return to void.
129         (do_long_move_insn, do_blog_insn, fsca_s, fsrra_s, mcalloc): Mark
130         static.
131         (sim_resume): Convert old style prototype.  Align printf format and
132         args.
133
134 2015-03-28  Mike Frysinger  <vapier@gentoo.org>
135
136         * gencode.c (ppi_gensim): Add missing */.  Change case 4 to case 5.
137
138 2015-03-28  Mike Frysinger  <vapier@gentoo.org>
139
140         * Makefile.in (gencode): Add $(BUILD_CFLAGS), $(BUILD_LDFLAGS),
141         and $(WARN_CFLAGS).
142         * gencode.c: Include ctype.h, stdlib.h, string.h, and unistd.h.
143         (struct op): Mark members const.
144         (tab): Mark static.
145         (nibble_type_list): Mark const.
146         (arg_type_list): Mark const.
147         (make_enum_list): Delete unused func.
148         (qfunc, expand_opcode, dumptable, expand_ppi_code): Convert old
149         style prototype and mark args const.
150         (sorttab, gengastab, conflict_warn, filltable, expand_ppi_movxy,
151         gensim, ppi_filltable): Convert old style prototype.
152         (gensim_caselist): Convert old style prototype.  Mark local
153         variables s and r const.
154         (gendefines): Convert old style prototype.  Mark s const.  Move
155         tolower call into printf statement.
156         (ppi_gensim): Convert old style prototype.  Mark local variable
157         s const.
158         (main): Convert old style prototype.  Change printf %d to %zu.
159
160 2015-03-28  Mike Frysinger  <vapier@gentoo.org>
161
162         * config.in, configure: Regenerate.
163         * configure.ac: Call SIM_AC_OPTION_ENDIAN, SIM_AC_OPTION_ALIGNMENT,
164         SIM_AC_OPTION_HOSTENDIAN, SIM_AC_OPTION_ENVIRONMENT,
165         SIM_AC_OPTION_INLINE, SIM_AC_OPTION_WARNINGS.
166
167 2015-03-16  Mike Frysinger  <vapier@gentoo.org>
168
169         * config.in, configure: Regenerate.
170         * tconfig.in: Rename file ...
171         * tconfig.h: ... here.
172
173 2015-03-14  Mike Frysinger  <vapier@gentoo.org>
174
175         * Makefile.in (SIM_EXTRA_CFLAGS): Set to
176         -DSIM_USE_DEPRECATED_RUN_FRONTEND.
177         (SIM_RUN_OBJS): Set to run.o.
178
179 2015-03-14  Mike Frysinger  <vapier@gentoo.org>
180
181         * configure.ac (AC_CHECK_HEADERS): Delete.
182         * aclocal.m4, configure: Regenerate.
183
184 2014-10-14  Oleg Endo <olegendo@gcc.gnu.org>  (tiny patch)
185
186         * gencode.c (fabs, fneg): Implement as integer operation
187         instead of using the FP_UNARY macro.
188
189 2014-08-19  Alan Modra  <amodra@gmail.com>
190
191         * configure: Regenerate.
192
193 2014-08-15  Roland McGrath  <mcgrathr@google.com>
194
195         * configure: Regenerate.
196         * config.in: Regenerate.
197
198 2014-03-10  Mike Frysinger  <vapier@gentoo.org>
199
200         * interp.c (parse_and_set_memory_size): Add const to str.
201         (sim_do_command): Add const to cmd and sms_cmd.
202
203 2014-03-05  Mike Frysinger  <vapier@gentoo.org>
204
205         * interp.c (sim_load): Add const to prog.
206
207 2014-02-17  Mike Frysinger  <vapier@gentoo.org>
208
209         PR gdb/16450
210         * interp.c (control_c): Delete.
211         (sim_resume): Delete signal(SIGINT) handling.
212
213 2013-09-23  Alan Modra  <amodra@gmail.com>
214
215         * configure: Regenerate.
216
217 2013-06-03  Mike Frysinger  <vapier@gentoo.org>
218
219         * aclocal.m4, configure: Regenerate.
220
221 2012-06-15  Joel Brobecker  <brobecker@adacore.com>
222
223         * config.in, configure: Regenerate.
224
225 2012-03-24  Mike Frysinger  <vapier@gentoo.org>
226
227         * aclocal.m4, config.in, configure: Regenerate.
228
229 2012-02-16  Kevin Buettner  <kevinb@redhat.com>
230
231         * interp.c (MA): Adjust cast to avoid warning on 64-bit hosts.
232
233         * interp.c (sim_store_register, sim_fetch_register): Return
234         length, not -1.
235
236 2011-12-03  Mike Frysinger  <vapier@gentoo.org>
237
238         * aclocal.m4: New file.
239         * configure: Regenerate.
240
241 2011-10-17  Mike Frysinger  <vapier@gentoo.org>
242
243         * configure.ac: Change include to common/acinclude.m4.
244
245 2011-10-17  Mike Frysinger  <vapier@gentoo.org>
246
247         * configure.ac: Change AC_PREREQ to 2.64.  Delete AC_CONFIG_HEADER
248         call.  Replace common.m4 include with SIM_AC_COMMON.
249         * configure: Regenerate.
250
251 2011-04-16  Mike Frysinger  <vapier@gentoo.org>
252
253         * interp.c (sim_complete_command): New stub function.
254
255 2010-04-14  Mike Frysinger  <vapier@gentoo.org>
256
257         * interp.c (sim_write): Add const to buffer arg.
258
259 2010-01-12  Masaki Muranaka  <monaka@monami-software.com>
260
261         * interp.c: Don't include sysdep.h.
262         Include stdio.h and errno.h.
263         Include string.h strings.h stdlib.h sys/stat.h if present.
264
265 2010-01-09  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
266
267         * configure: Regenerate.
268
269 2009-08-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
270
271         * config.in: Regenerate.
272         * configure: Likewise.
273
274         * configure: Regenerate.
275
276 2008-07-11  Hans-Peter Nilsson  <hp@axis.com>
277
278         * configure: Regenerate to track ../common/common.m4 changes.
279         * config.in: Ditto.
280
281 2008-06-06  Vladimir Prus  <vladimir@codesourcery.com>
282             Daniel Jacobowitz  <dan@codesourcery.com>
283             Joseph Myers  <joseph@codesourcery.com>
284
285         * configure: Regenerate.
286
287 2008-02-04  Antony King  <antony.king@st.com>
288
289         * interp.c (macl): Fix non-portable implementation.
290
291 2007-10-08  Andrew Stubbs  <andrew.stubbs@st.com>
292
293         * gencode.c (tab): Add RAISE_EXCEPTION_IF_IN_DELAY_SLOT to the
294         definition of PC relative 'mov.l'/'mov.w' and also 'mova'.
295
296 2007-03-02  Andrew Stubbs  <andrew.stubbs@st.com>
297
298         * gencode.c (tab): Correct pre-decrement instructions when m == n.
299
300 2006-12-21  Hans-Peter Nilsson  <hp@axis.com>
301
302         * acconfig.h: Remove.
303         * config.in: Regenerate.
304
305 2006-06-13  Richard Earnshaw  <rearnsha@arm.com>
306
307         * configure: Regenerated.
308
309 2006-06-05  Daniel Jacobowitz  <dan@codesourcery.com>
310
311         * configure: Regenerated.
312
313 2006-05-31  Daniel Jacobowitz  <dan@codesourcery.com>
314
315         * configure: Regenerated.
316
317 2005-11-10  Andrew Stubbs  <andrew.stubbs@st.com>
318
319         * interp.c (sim_memory_size): Use same amount of memory on Windows as
320         elsewhere.
321
322 2005-09-19  J"orn Rennecke <joern.rennecke@st.com>
323
324         * interp.c (<sys/mman.h>): Include.
325         (mcalloc): New function / macro.
326         (mfree): New macro.
327         (sim_size): Use mcalloc and mfree.
328
329 2005-08-02  J"orn Rennecke <joern.rennecke@st.com>
330
331         * interp.c (strswaplen): Add one for '\0' delimiter.
332
333 2005-06-16  Daniel Jacobowitz  <dan@codesourcery.com>
334
335         * gencode.c (tab): Avoid lvalue casts.  Suggested by
336         Ralf Corsepius <ralf.corsepius@rtems.org>.
337
338 2005-04-12  Jonathan Larmour  <jifl@eCosCentric.com>
339
340         * gencode.c (tab): Avoid inserting code before variables all declared.
341
342 2005-03-23  Mark Kettenis  <kettenis@gnu.org>
343
344         * configure: Regenerate.
345
346 2005-01-14  Andrew Cagney  <cagney@gnu.org>
347
348         * configure.ac: Sinclude aclocal.m4 before common.m4.  Add
349         explicit call to AC_CONFIG_HEADER.
350         * configure: Regenerate.
351
352 2005-01-12  Andrew Cagney  <cagney@gnu.org>
353
354         * configure.ac: Update to use ../common/common.m4.
355         * configure: Re-generate.
356
357 2005-01-11  Andrew Cagney  <cagney@localhost.localdomain>
358
359         * configure: Regenerated to track ../common/aclocal.m4 changes.
360
361 2005-01-07  Andrew Cagney  <cagney@gnu.org>
362
363         * configure.ac: Rename configure.in, require autoconf 2.59.
364         * configure: Re-generate.
365
366 2004-12-08  Hans-Peter Nilsson  <hp@axis.com>
367
368         * configure: Regenerate for ../common/aclocal.m4 update.
369
370 2004-09-08  DJ Delorie  <dj@redhat.com>
371
372         Commited by Corinna Vinschen <vinschen@redhat.com>
373         * gencode.c (movua.l): Compensate for endianness.
374
375 2004-09-08  Corinna Vinschen  <vinschen@redhat.com>
376
377         * interp.c (RAISE_EXCEPTION_IF_IN_DELAY_SLOT): New macro.
378         (in_delay_slot): New flag variable.
379         (Delay_Slot): Set in_delay_slot.
380         (sim_resume): Reset in_delay_slot after leaving code switch.
381         * gencode.c (op tab): Call RAISE_EXCEPTION_IF_IN_DELAY_SLOT for all
382         instructions not allowed in delay slots.
383
384 2004-09-08  Michael Snyder  <msnyder@redhat.com>
385
386         Commited by Corinna Vinschen <vinschen@redhat.com>
387         Introduce SH2a support.
388         * interp.c: Change type of jump table to short.  Add various macros.
389         (sim_load): Save the bfd machine code.
390         (sim_create_inferior): Ditto.
391         (union saved_state_type): Add tbr, ibnr and ibcr registers.
392         Move bfd_mach to end of struct.  Add regstack pointer.
393         (init_dsp): Don't swap contents of sh_dsp_table any more.  Instead
394         use it directly in its own switch statement.  Allocate space for 512
395         register banks.
396         (do_long_move_insn): New function.
397         (do_blog_insn): Ditto.
398         (trap): Use trap #13 and trap #14 to set ibnr and ibcr.
399         * gencode.c: Move movx/movy insns into separate switch statement.
400         (op tab): Add sh2a insns.  Reject instructions that are disabled
401         on that chip.
402         (gensim_caselist): Generate default case here instead of in caller.
403         (gensim): Generate two separate switch statements.  Call
404         gensim_caselist once for each (for movsxy_tab and for tab).
405         Add tokens for r15 and multiple regs.
406         (conflict_warn, warn_conflicts): Add for debugging.
407
408 2004-08-18  J"orn Rennecke <joern.rennecke@superh.com>
409
410         * gencode.c (tab): For shad snd shld, fix result for
411         (op1 < 0 && shift_amount == 0).
412
413 2004-02-02  Michael Snyder  <msnyder@redhat.com>
414
415         * gencode.c (movua.l): Set thislock to 0, not n.
416
417 2004-02-12  Michael Snyder  <msnyder@redhat.com>
418
419         * gencode.c (table): Change from char to short.
420         (dumptable): Change generated table from char to short.
421         * interp.c (sh_jump_table, sh_dsp_table, ppi_table): char to short.
422         (init_dsp): Compute size of sh_dsp_table.
423         (sim_resume): Change jump_table from char to short.
424
425 2004-01-27  Michael Snyder  <msnyder@redhat.com>
426
427         * gencode.c: (op tab): Some refs and defs fixes.
428         "fsrra" -> "fsrra <FREG_N>".
429         "sleep": replace array ref with array addr.
430         "trapa": ditto.
431         Comment and whitespace clean-ups.
432
433 2004-01-07  Michael Snyder  <msnyder@redhat.com>
434
435         * gencode.c: Whitespace cleanup.
436         * interp.c: Ditto.
437
438         * gencode.c: Replace 'Hitachi' with 'Renesas'.
439         (op tab): Add new instructions for sh4a, DBR, SBR.
440         (expand_opcode): Add handling for new movxy combinations.
441         (gensym_caselist): Ditto.
442         (expand_ppi_movxy): Remove movx/movy expansions,
443         now handled in expand_opcode.
444         (gensym): Add some helpful macros.
445         (expand_ppi_code): Flatten loop for simplicity, tweak for 12-bit
446         instead of 8-bit table (some insns are ambiguous to 8 bits).
447         (ppi_gensim, main): Generate 12-bit instead of 8-bit ppi table.
448
449         * interp.c: Replace 'Hitachi' with 'Renesas'.
450         (union saved_state_type): Add dbr, sgr, ldst.
451         (get_loop_bounds_ext): New function.
452         (init_dsp): Add bfd_mach_sh4al_dsp.
453         (sim_resume): Handle extended loop bounds.
454
455 2003-12-18  Michael Snyder  <msnyder@redhat.com>
456
457         * gencode.c (expand_opcode): Simplify and reorganize.
458         Eliminate "shift" parameter.  Eliminate "4 bits at a time"
459         assumption.  Flatten switch statement to a single level.
460         Add "eeee" token for even-numbered registers.
461         (bton): Delete.
462         (fsca): Use "eeee" token.
463         (ppi_moves): Rename to "expand_ppi_movxy".  Do the ddt
464         [movx/movy] expansion here, as well as the ppi expansion.
465         (gensim_caselist): Accept 'eeee' along with 'nnnn'.
466
467 2003-11-03  J"orn Rennecke <joern.rennecke@superh.com>
468
469         * interp.c (fsca_s, fsrra_s): New functions.
470         * gencode.c (tab): Add entries for fsca and fsrra.
471         (expand_opcode): Allow variable length n / m fields.
472
473 2003-10-15  J"orn Rennecke <joern.rennecke@superh.com>
474
475         * syscall.h (SYS_truncate, SYS_ftruncate): Define.
476         * interp.c (trap): Add support for SYS_ftruncate and SYS_truncate.
477
478 2003-08-11  Shrinivas Atre  <shrinivasa@KPITCummins.com>
479         * sim/sh/gencode.c ( tab[] ): Addition of MAC.L handler and
480         correction for MAC.W handler
481         * sim/sh/interp.c ( macl ): New Function. Implementation of
482         MAC.L handler.
483
484 2003-08-07  Michael Snyder  <msnyder@redhat.com>
485
486         * gencode.c (expand_ppi_code): Comment spelling fix.
487
488 2003-07-25  Michael Snyder  <msnyder@redhat.com>
489
490         * gencode.c (pshl): Change < to <= (shift by 16 is allowed).
491         Cast argument of >> to unsigned to prevent sign extension.
492         (psha): Change < to <= (shift by 32 is allowed).
493
494 2003-07-24  Michael Snyder  <msnyder@redhat.com>
495
496         * gencode.c: Fix typo in comment.
497
498 2003-07-23  Michael Snyder  <msnyder@redhat.com>
499
500         * gencode.c: A few more fix-ups of refs and defs.
501         (frchg): Raise SIGILL if in double-precision mode.
502         (ldtlb): We don't simulate cache, so this is a no-op.
503         (movsxy_tab): Correct a few bit pattern errors.
504
505 2003-07-09  Michael Snyder  <msnyder@redhat.com>
506
507         * gencode.c (prnd): Clear LSW of result to zeros.
508         * gencode.c (pmuls): Expression is mis-parenthesized.
509         * gencode.c (ppi_gensim): For a conditional ppi insn, if the
510         condition is false, we want to return (not break).  A break
511         will take us to the end of the function where registers will
512         be updated, whereas the desired outcome is for nothing to change.
513
514 2003-07-03  Michael Snyder  <msnyder@redhat.com>
515
516         * gencode.c (movs): Fix a couple of text transpositions.
517
518 2003-06-27  Michael Snyder  <msnyder@redhat.com>
519
520         * gencode.c (op tab): Some fix-ups of refs and defs.
521         (ocbi, ocbp): Cache not simulated, but may cause memory fault.
522         (gensym_caselist): Add default case to switch statement.
523         (expand_ppi_code): Add default case to switch statement.
524         * gencode.c (op tab): Implement movca.l.
525         * gencode.c (op movsxy_tab): Fix an error in the bit pattern.
526         * gencode.c (gensim_caselist): The movy instructions use
527         registers R6 and R7 (not R4 and R5 like the movx insns).
528
529 2003-06-27  Michael Snyder  <msnyder@redhat.com>
530
531         * gencode.c (op movsxy_tab): Fix up some copy/paste errors
532         in name: s/REG_x/REG_y/.
533
534         * gencode.c (op tab): Move misplaced semicolon.
535
536 2003-02-27  Andrew Cagney  <cagney@redhat.com>
537
538         * interp.c (init_dsp, sim_open, sim_create_inferior): Rename _bfd
539         to bfd.
540
541 Fri Oct 11 16:22:28 2002  J"orn Rennecke <joern.rennecke@superh.com>
542
543         * interp.c (trap): Return int.  Take extra parameter for address
544         of the trap instruction.  Changed all callers.
545         Add case 33 for profiling.
546         * gencode.c (trapa): Handle trap 33 using the trap function.
547         Add read of vector for generic traps.
548
549 Wed Jul 17 19:36:38 2002  J"orn Rennecke <joern.rennecke@superh.com>
550
551         * Makefile.in (interp.o): Depend on $(srcroot)/include/gdb/sim-sh.h.
552         * interp.c: Include "gdb/sim-sh.h".
553         (sim_store_register, sim_fetch_register): Use constants defined there.
554
555 Tue Jun 18 16:53:11 2002  J"orn Rennecke <joern.rennecke@superh.com>
556
557         * interp.c (sim_resume): Fix setting of bus error for
558         instruction fetch.
559
560 2002-06-16  Andrew Cagney  <ac131313@redhat.com>
561
562         * configure: Regenerated to track ../common/aclocal.m4 changes.
563
564 2002-06-08  Andrew Cagney  <cagney@redhat.com>
565
566         * interp.c: Include "gdb/callback.h" and "gdb/remote-sim.h".
567
568 2001-01-30  Ben Elliston  <bje@redhat.com>
569
570         * interp.c (sim_create_inferior): Record program arguments for
571         later inspection by the trap handler.
572         (count_argc): New function.
573         (prog_argv): Declare static.
574         (sim_write): Declare.
575         (trap): Implement argc, argnlen and argn system calls. Do not
576         abort on unknown system calls--simply return -1.
577         * syscall.h (SYS_argc, SYS_argnlen, SYS_argn): Define.
578
579 2001-01-24  Alexandre Oliva  <aoliva@redhat.com>
580
581         * interp.c (trap): Implement time.
582
583 2000-10-24  Ben Elliston  <bje@redhat.com>
584
585         * gencode.c (tab): Delimit strings with commas where applicable.
586
587 Tue May 23 21:39:23 2000  Andrew Cagney  <cagney@b1.cygnus.com>
588
589         * configure: Regenerated to track ../common/aclocal.m4 changes.
590
591 Mon May 15 22:04:51 2000  J"orn Rennecke <amylaar@cygnus.co.uk>
592
593 sh-dsp support, simulator speedup by using host byte order:
594
595         * Makefile.in (interp.o): Depends on ppi.c .
596         (ppi.c): New rule.
597         * gencode.c (printonmatch, think, genopc): Deleted.
598         (MAX_NR_STUFF): Now 42.
599         (tab): Add SH-DSP CPU instructions.
600         Amalgamate ldc / stc / lds / sts instructions with similar
601         bit patterns.  Fix opcodes of stc Rm_BANK,@-<REG_N>.
602         Fix semantics of lds.l @<REG_N>+,MACH (no sign extend).
603         (movsxy_tab): New array.
604         For movs, change MMMM field to GGGG, and mmmm field to MMMM.
605         Added entries for movx, movy and parallel processing insns.
606         (ppi_tab): New array.
607         (qfunc): Stabilize sort.
608         (expand_opcode): Handle [01][01]NN, [01][01]xx and [01][01]yy.
609         Handle 'M', 'G' 's' 'X', 'a', 'Y' and 'A'.
610         (dumptable): Now takes three arguments.  Changed all callers.
611         Emit just one contigous jump table.
612         (filltable): Now takes an argument.  Changed all callers.
613         Make index static.
614         (ppi_moves, expand_ppi_code, ppi_filltable, ppi_gensim): New functions.
615         (gensim_caselist): New function, broken out of gensim.
616         Handle opcode fields 'x', 'y', 's', 'M', 'G', 'X', 'a', and 'Y'.
617         Handle ref '9'.
618         (gensim): Handle 'N' in code field and '8' in refs field.
619         Call gensim_caselist - twice.
620         (ppi_index): New static variable.
621         (main): Unsupport default action.
622         Add dsp support for -x / -s option.  Add -p option.
623         * interp.c (sh_jump_table, sh_dsp_table, ppi_table): Declare.
624         (saved_state_type): Rearrange to allow amalgamated ldc / stc /
625         lds / sts to work efficiently.
626         (target_dsp): New static variable.
627         (GBR, VBR, SSR, SPC, MACH, MACL): Reflect saved_state_type change.
628         (FPUL, Rn_BANK, SET_Rn_BANK, M, Q, S, T, SR_BL, SR_RB): Likewise.
629         (SR_MD, SR_RC, SET_SR_BIT, GET_SR, SET_RC, GET_FPSCR): Likewise.
630         (RS, RE, MOD, MOD_ME, DSP_R): Likewise.
631         (set_fpscr1): Likewise.  Use target_dsp to check for dsp.
632         (MOD_MSi, SIG_BUS_FETCH): Deleted.
633         (CREG, SREG, PR, SR_MASK_DMY, SR_MASK_DMX, SR_DMY): New macros.
634         (SR_DMX, DSR, MOD_DELTA, GET_DSP_GRD): Likewise.
635         (SET_MOD): Reflect saved_state_type change.  Set MOD_DELTA instead
636         of MOD_MS, and encode SR_DMY / SR_DMX into high word of MOD_ME.
637         (set_sr): Reflect saved_state_type change.  Fix SR_RB handling.
638         Use SET_MOD.
639         (MA, L, TL, TB): Now controlled by ACE_FAST.
640         (SEXT32): Just cast to int.
641         (SIGN32): Fixed to only shift by 31.
642         (CHECK_INSN_PTR): SIGBUS at insn fetch now represented by insn_end 0.
643         (ppi_insn): Declare.
644         (ppi.c): Include.
645         (init_dsp): Set target_dsp.  When it changes, switch end of
646         sh_jump_table with sh_dsp_table.
647         (sim_resume) Don't declare sh_jump_table0.  Use sh_jump_table instead.
648         Don't Declare PR if it's #defined.
649         Fix single-stepping (Was broken in Mar  6 16:59:10 patch).
650         (sim_store_register, sim_read_register): Translate accesses to
651         reflect saved_state_type change.
652
653         * interp.c (set_sr): Set sr.
654         (SET_RC, MOD, MOD_MS, MOD_ME, SET_MOD, MOD_MS, MOD_ME): New macros.
655         (set_fpscr1): Don't bank-switch fpu registers when simulating sh-dsp.
656         (DSP_R): Fix definition.
657         (sim_resume): Remove outdated SET_SR use.
658
659         * interp.c (saved_state): New members for struct member asregs:
660         rs, re, insn_end, xram_start, yram_start.
661         (struct loop_bounds): New struct.
662         (SKIP_INSN): New macro.
663         (get_loop_bounds): New function.
664         (endianw): Renamed to global_endianw.
665         (maskw): negated bits.
666         (PC): Now insn_ptr.
667         (SR_MASK_RC, SR_RC_INCREMENT, SR_RC, RAISE_EXCEPTION): New macros.
668         (RS, RE, DSP_R, DSP_GRD, A1, A0, X0, X1, Y0, Y1, M0, A1G): Likewise.
669         (M1, A0G, RIAT, PT2H, PH2T, SET_NIP, CHECK_INSN_PTR): Likewise.
670         (SIG_BUS_FETCH): Likewise
671         (raise_exception, riat_fast): New functions.
672         (raise_buserror, sim_stop): Use raise_exception.
673         (PROCESS_SPECIAL_ADDRESS): Use xram_start / yram_start.
674         (BUSERROR, WRITE_BUSERROR, READ_BUSERROR):
675         Reverse sense of mask argument.
676         (FP_OP, set_dr): Use RAISE_EXCEPTION.
677         (wlat_fast, wwat_fast, wbat_fast, rlat_fast, rwat_fast, rbat_fast):
678         Declare.  Remove redundant masking.
679         (wwat_fast, rwat_fast): Add argument endianw.  Changed callers.
680         (MA): Updated for change pc -> PC.
681         (Delay_Slot): Use RIAT.
682         (empty): Deleted.
683         (trap): Remove argument little_endian.  Add argument endianw.
684         Changed all callers.  Use raise_exception.
685         (macw): Add argument endainw.  Changed all callers.
686         (init_dsp): New function, extended after broken out of init_pointers.
687         (sim_resume): Replace pc with insn_ptr.  Replace little_endian with
688         endianw.  Replace nia with nip.  Reverse sense of maskb / maskw /
689         maskl.  Implement logic for zero-overhead loops.  Don't try to
690         interpret garbage when getting a SIGBUS at insn fetch.
691         (sim_open): Call init_dsp.
692         * gencode.c (tab): Use SET_NIP instead of nia = .  Use PH2T / PT2H /
693         RAISE_EXCEPTION where appropriate.
694         Add extra cycles for brai, braf , bsr, bsrf, jmp, jsr.
695
696         * interp.c (sim_store_register, sim_fetch_register):
697         Do proper endianness switch.
698
699         * interp.c (saved_state_type): New members for struct member asregs:
700         xymem_select, xmem, ymem, xmem_offset, ymem_offset.
701         (special_address): Delete.
702         (BUSERROR): Now a two-argument predicate.
703         (PROCESS_SPECIAL_ADDRESS, WRITE_BUSERROR, READ_BUSERROR): New macros.
704         (wlat_little, wwat_little, wbat_any, wlat_big, wwat_big): Delete.
705         (process_wlat_addr, process_wwat_addr): New functions.
706         (process_wbat_addr, process_rlat_addr, process_rwat_addr): Likewise.
707         (process_rbat_addr): Likewise.
708         (wlat_fast, wwat_fast, wbat_fast): Use WRITE_BUSERROR.
709         (rlat_little, rwat_little, rbat_any, rlat_big, rwat_big): Delete.
710         (rlat_fast, rwat_fast, rbat_fast): Use READ_BUSERROR.
711         (RWAT, RLAT, RBAT, WWAT, WLAT, WBAT): Delete SLOW versions.
712         (do_rdat, trap): Delete SLOW code.
713         (SEXT32, SIGN32): New macros.
714         (swap, swap16): Now integer in - integer out.  Changed all callers.
715         (strswaplen, strnswap): Delete SLOW versions.
716         (init_pointers): Initialize dsp memory selection (preliminary).
717         (sim_store_register, sim_fetch_register): Use swap instead of
718         big / little endian read / write functions.
719
720         * interp.c (maskl): Deleted.
721         (endianw, endianb): New variables.
722         (special_address): Now inline.
723         (bp_holder): Put raising of buserror there, rename to:
724         (raise_buserror).
725         (BUSERROR): Now yields a value.  Changed all users.
726         (wbat_big): Delete.
727         (wlat_fast, wwat_fast, wbat_fast): New functions.
728         (rlat_fast, rwat_fast, rbat_fast): Likewise.
729         (RWAT, RLAT, RBAT, WWAT, WLAT, WBAT): Use new functions.
730         (do_rdat, do_wdat): Likewise.  Take maskl argument instead of
731         little_endian one.  Changed caller macros.
732         (swap, swap16): Use w[rw]lat_big / w[rw]lat_little directly.
733         (strswaplen, strnswap): New functions.
734         (trap): Use them to fix up endian mismatches;
735         disable SYS_execve and SYS_execv; fix double address translation for
736         SYS_pipe and SYS_stat.
737         (sym_write, sym_read): Add endianness translation.
738         (sym_store_register, sym_fetch_register): Add maskl local variable.
739         (sim_open): Set endianw and endianb.
740
741 Thu Sep  2 18:15:53 1999  Andrew Cagney  <cagney@b1.cygnus.com>
742
743         * configure: Regenerated to track ../common/aclocal.m4 changes.
744
745 Wed Aug 25 07:55:23 1999  Brendan Kehoe  <brendan@cygnus.com>
746
747         * gencode.c (fcnvds <DR_N>,FPUL): Rewrite to use a local anonymous
748         union type, instead of casting to an int* then a float*.
749         (fcnvsd FPUL,<DR_N>): Likewise.
750         (flds <FREG_N>,FPUL): Likewise.
751         (fsts FPUL,<FREG_N>): Likewise.
752
753 1999-05-08  Felix Lee  <flee@cygnus.com>
754
755         * configure: Regenerated to track ../common/aclocal.m4 changes.
756
757 1999-04-02  Keith Seitz  <keiths@cygnus.com>
758
759         * interp.c (POLL_QUIT_INTERVAL): Define. Used to tweak the
760         frequency at which the poll_quit callback is called.
761         (sim_resume): Use POLL_QUIT_INTERVAL instead of a
762         hard-coded value.
763
764 Thu Sep 10 02:16:39 1997  J"orn Rennecke <amylaar@cygnus.co.uk>
765
766         * interp.c (saved_state.asregs): Add new member pad_dummy.
767         (sim_store_register, sim_fetch_regsiter): Add 1 to rn for use
768         as index into saved_state.asints.
769
770 Mon Jun 29 19:35:24 1998  Jason Molenda  (crash@bugshack.cygnus.com)
771
772         * interp.c (sim_open): set endianness based on the ABFD if a -E
773         option is not present and we have an ABFD.
774
775 Tue Apr 28 18:33:31 1998  Geoffrey Noer  <noer@cygnus.com>
776
777         * configure: Regenerated to track ../common/aclocal.m4 changes.
778
779 Sun Apr 26 15:31:55 1998  Tom Tromey  <tromey@creche>
780
781         * configure: Regenerated to track ../common/aclocal.m4 changes.
782         * config.in: Ditto.
783
784 Sun Apr 26 15:19:48 1998  Tom Tromey  <tromey@cygnus.com>
785
786         * acconfig.h: New file.
787         * configure.in: Reverted change of Apr 24; use sinclude again.
788
789 Fri Apr 24 14:16:40 1998  Tom Tromey  <tromey@creche>
790
791         * configure: Regenerated to track ../common/aclocal.m4 changes.
792         * config.in: Ditto.
793
794 Fri Apr 24 11:18:35 1998  Tom Tromey  <tromey@cygnus.com>
795
796         * configure.in: Don't call sinclude.
797
798 Sat Apr  4 20:36:25 1998  Andrew Cagney  <cagney@b1.cygnus.com>
799
800         * configure: Regenerated to track ../common/aclocal.m4 changes.
801
802 Fri Mar 27 16:15:52 1998  Andrew Cagney  <cagney@b1.cygnus.com>
803
804         * configure: Regenerated to track ../common/aclocal.m4 changes.
805
806 Wed Mar 25 12:35:29 1998  Andrew Cagney  <cagney@b1.cygnus.com>
807
808         * configure: Regenerated to track ../common/aclocal.m4 changes.
809
810 Wed Mar 18 12:38:12 1998  Andrew Cagney  <cagney@b1.cygnus.com>
811
812         * configure: Regenerated to track ../common/aclocal.m4 changes.
813
814 Tue Feb 17 12:49:44 1998  Andrew Cagney  <cagney@b1.cygnus.com>
815
816         * interp.c (sim_fetch_register, sim_store_register): Pass in
817         length parameter.  Return -1.
818
819 Sun Feb  1 16:47:51 1998  Andrew Cagney  <cagney@b1.cygnus.com>
820
821         * configure: Regenerated to track ../common/aclocal.m4 changes.
822
823 Sat Jan 31 18:15:41 1998  Andrew Cagney  <cagney@b1.cygnus.com>
824
825         * configure: Regenerated to track ../common/aclocal.m4 changes.
826
827 Mon Jan 19 22:26:29 1998  Doug Evans  <devans@seba>
828
829         * configure: Regenerated to track ../common/aclocal.m4 changes.
830
831 Mon Dec 15 23:17:11 1997  Andrew Cagney  <cagney@b1.cygnus.com>
832
833         * configure: Regenerated to track ../common/aclocal.m4 changes.
834         * config.in: Ditto.
835
836 Thu Dec  4 09:21:05 1997  Doug Evans  <devans@canuck.cygnus.com>
837
838         * configure: Regenerated to track ../common/aclocal.m4 changes.
839
840 Wed Oct 22 14:43:00 1997  Andrew Cagney  <cagney@b1.cygnus.com>
841
842         * interp.c (sim_load): Pass lma_p and sim_write args to
843         sim_load_file.
844
845 Fri Oct  3 09:28:00 1997  Andrew Cagney  <cagney@b1.cygnus.com>
846
847         * configure: Regenerated to track ../common/aclocal.m4 changes.
848
849 Wed Sep 24 17:38:57 1997  Andrew Cagney  <cagney@b1.cygnus.com>
850
851         * configure: Regenerated to track ../common/aclocal.m4 changes.
852
853 Tue Sep 23 11:04:38 1997  Andrew Cagney  <cagney@b1.cygnus.com>
854
855         * configure: Regenerated to track ../common/aclocal.m4 changes.
856
857 Mon Sep 22 11:46:20 1997  Andrew Cagney  <cagney@b1.cygnus.com>
858
859         * configure: Regenerated to track ../common/aclocal.m4 changes.
860
861 Fri Sep 19 17:45:25 1997  Andrew Cagney  <cagney@b1.cygnus.com>
862
863         * configure: Regenerated to track ../common/aclocal.m4 changes.
864
865 Mon Sep 15 17:36:15 1997  Andrew Cagney  <cagney@b1.cygnus.com>
866
867         * configure: Regenerated to track ../common/aclocal.m4 changes.
868
869 Tue Sep  9 20:52:21 1997  Felix Lee  <flee@cygnus.com>
870
871         * interp.c (sim_resume): poll_quit() at least once per call;
872         otherwise gdb can loop sim_resume() uninterruptably.
873
874 Thu Sep  4 17:21:23 1997  Doug Evans  <dje@seba>
875
876         * configure: Regenerated to track ../common/aclocal.m4 changes.
877
878 Tue Sep  2 13:15:27 1997  Andrew Cagney  <cagney@b1.cygnus.com>
879
880         * gencode.c (tab): Order instructions according to SH3 document.
881
882 Wed Aug 27 18:13:22 1997  Andrew Cagney  <cagney@b1.cygnus.com>
883
884         * configure: Regenerated to track ../common/aclocal.m4 changes.
885         * config.in: Ditto.
886
887 Tue Aug 26 10:41:55 1997  Andrew Cagney  <cagney@b1.cygnus.com>
888
889         * interp.c (sim_kill): Delete.
890         (sim_create_inferior): Add ABFD argument.
891         (sim_load): Move setting of PC from here.
892         (sim_create_inferior): To here.
893
894 Mon Aug 25 17:50:22 1997  Andrew Cagney  <cagney@b1.cygnus.com>
895
896         * configure: Regenerated to track ../common/aclocal.m4 changes.
897         * config.in: Ditto.
898
899 Mon Aug 25 16:17:51 1997  Andrew Cagney  <cagney@b1.cygnus.com>
900
901         * interp.c (sim_open): Add ABFD argument.
902
903 Mon Jun 23 15:49:14 1997  Andrew Cagney  <cagney@b1.cygnus.com>
904
905         * interp.c (get_dr): Avoid SIGFPE by moving integers instead of
906         FP's around.
907         (set_dr): Ditto.
908
909 Mon Jun 23 15:02:40 1997  Andrew Cagney  <cagney@b1.cygnus.com>
910
911         * interp.c (XD, SET_XD): Delete.
912         (XF, SET_XF, XD_TO_XF): Define, move around registers in either
913         FP bank.
914
915         * gencode.c (fmov): Update.
916
917 Sun Jun 22 19:33:33 1997  Andrew Cagney  <cagney@b1.cygnus.com>
918
919         * interp.c (set_fpscr1): From J"orn Rennecke
920         <amylaar@cygnus.co.uk>, Fix typo. Ditto for comment.
921
922 Tue Aug 12 00:19:11 1997  J"orn Rennecke <amylaar@cygnus.co.uk>
923
924         * interp.c (special_address): New function.
925         (BUSERROR): Call it.  Added parameters bits_written and data.
926         Changed all callers.
927         * gencode.c (tab): Fixed ocbwb and pref.
928
929 Fri Jun 20 22:03:18 1997  J"orn Rennecke <amylaar@cygnus.co.uk>
930
931         * interp.c (do_wdat, do_wdat): Fix bug in register number calculation.
932
933 Thu Jun 19 00:28:08 1997  Andrew Cagney  <cagney@b1.cygnus.com>
934
935         * interp.c (sim_create_inferior): Clear registers each time an
936         inferior is started.
937
938 Mon Jun 16 14:01:55 1997  Andrew Cagney  <cagney@b1.cygnus.com>
939
940         * interp.c (*FP, FP_OP, FP_CMP, FP_UNARY): Provide a hook for
941         when a host doesn't support IEEE FP.
942         (*DP): Provide alternative definition that supports 64bit floating
943         point.
944         (target_little_endian): Combine little_endian and little_endian_p.
945         (saved_state_type): Make fpscr and sr simple integers.
946         (SET_FPSCR, GET_FPSCR): Use macros to update fpscr register.
947         (set_fpscr1): New function.  Handle swapping when PR / FR bits
948         changed. Call via *_FPSCR macro.
949         (SET_SR*, GET_SR*): Use macro's to access the SR bits - avoids
950         endian problems.
951
952         * gencode.c (tab): Update.
953
954 Sun Jun 15 15:22:52 1997  Andrew Cagney  <cagney@b1.cygnus.com>
955
956         * gencode.c (main): Perform basic checks on tab entries.
957
958         * Makefile.in (gencode): Always compile with -g.
959
960 Sat Jun 14 13:45:09 1997  Andrew Cagney  <cagney@b1.cygnus.com>
961
962         * gencode.c (gensim): Move ref checking code to before `stuff'.
963         For branches with delay slots refs were not being checked.
964
965         * interp.c (sim_resume): Use nia to specify the next instruction
966         address instead of overloading pc.
967         (C): Delete definiton - refer to cycles directly.
968         (SEXT12): New macro - sign extend a 12 bit quantity.
969         (Delay_Slot): Rename from SL.
970
971         * gencode.c (tab): Update/simplify.
972
973         * gencode.c (gensim): Better formatting of output code.
974         (gensim): Replace 10 with constant MAX_NR_STUFF- define as 15.
975         (tab): Sort alphabetically.  Break `stuff' into multiple lines.
976
977 Fri Jun 13 22:10:13 1997  J"orn Rennecke <amylaar@cygnus.co.uk>
978
979         * gencode.c (braf, bsrf): Fix branch destination calculation to
980         be in accordance with the documentation.
981
982 Fri Jun 13 15:33:53 1997  J"orn Rennecke <amylaar@cygnus.co.uk>
983
984         * interp.c (init_pointers): Fix little endian test.
985
986 Thu Jun  5 12:56:08 1997  J"orn Rennecke <amylaar@cygnus.co.uk>
987
988         * interp.c (init_pointers): SH4 hardware is always WORDS_BIT_ENDIAN.
989         * gencode (fmov from/to memory): take endian_mismatch into account
990         for 32 bit moves too.
991
992 Wed May 28 23:42:35 1997  J"orn Rennecke <amylaar@cygnus.co.uk>
993
994         * gencode.c (swap.b): Fix treatment of high word.
995
996 Wed May 28 23:42:35 1997  J"orn Rennecke <amylaar@cygnus.co.uk>
997
998         * sh/gencode.c,
999         * interp.c: experimental SH4 support.
1000         DFmode moves are probaly broken for target little endian.
1001
1002 Tue May 20 10:23:28 1997  Andrew Cagney  <cagney@b1.cygnus.com>
1003
1004         * interp.c (sim_open): Add callback argument.
1005         (sim_set_callbacks): Delete SIM_DESC argument.
1006
1007 Wed Apr 30 11:38:08 1997  Doug Evans  <dje@canuck.cygnus.com>
1008
1009         * Makefile.in (SIM_EXTRA_CLEAN): Define.
1010         (clean targets): Delete.
1011         (sh-clean): New target.
1012
1013 Thu Apr 24 00:39:51 1997  Doug Evans  <dje@canuck.cygnus.com>
1014
1015         * configure: Regenerated to track ../common/aclocal.m4 changes.
1016
1017 Wed Apr 23 17:55:22 1997  Doug Evans  <dje@canuck.cygnus.com>
1018
1019         * tconfig.in: New file.
1020         * interp.c (sim_open): Handle missing arg to -E.
1021
1022 Tue Apr 22 08:55:35 1997  Stu Grossman  (grossman@critters.cygnus.com)
1023
1024         * Makefile.in:  Add clean targets.
1025
1026 Fri Apr 18 18:57:04 1997  Stu Grossman  (grossman@critters.cygnus.com)
1027
1028         * interp.c:  Include float.h and define SIGTRAP if _WIN32.
1029         WIN32 -> _WIN32.
1030         * (trap):  Do do SYS_chown for _WIN32.
1031
1032 Fri Apr 18 13:33:09 1997  Doug Evans  <dje@canuck.cygnus.com>
1033
1034         * interp.c (sim_resume): Fix argument to poll_quit.
1035
1036 Fri Apr 18 14:14:49 1997  Andrew Cagney  <cagney@b1.cygnus.com>
1037
1038         * interp.c (sim_stop): New function.
1039         (sim_resume): Use poll_quit for polling.
1040
1041 Thu Apr 17 03:32:04 1997  Doug Evans  <dje@canuck.cygnus.com>
1042
1043         * Makefile.in (SIM_OBJS): Add sim-load.o.
1044         * interp.c (target_byte_order): Delete.
1045         (sim_kind, myname, little_endian_p): New static locals.
1046         (init_pointers): Use little_endian_p instead of target_byte_order.
1047         (sim_resume): Likewise.
1048         (sim_open): Set sim_kind, myname.  Set little_endian_p from -E arg.
1049         (sim_load): Return SIM_RC.  New arg abfd.  Call sim_load_file to
1050         load file into simulator.  Set start address from bfd.
1051         (sim_create_inferior): Return SIM_RC.  Delete arg start_address.
1052
1053 Mon Apr  7 15:45:02 1997  Andrew Cagney  <cagney@kremvax.cygnus.com>
1054
1055         * configure: Regenerated to track ../common/aclocal.m4 changes.
1056         * config.in: Ditto.
1057
1058 Wed Apr  2 15:06:28 1997  Doug Evans  <dje@canuck.cygnus.com>
1059
1060         * interp.c (sim_open): New arg `kind'.
1061
1062         * configure: Regenerated to track ../common/aclocal.m4 changes.
1063
1064 Wed Apr  2 14:34:19 1997 Andrew Cagney <cagney@kremvax.cygnus.com>
1065
1066         * configure: Regenerated to track ../common/aclocal.m4 changes.
1067
1068 Wed Mar 19 09:34:36 1997  Fred Fish  <fnf@cygnus.com>
1069
1070         * interp.c (sim_do_command): Check for NULL command or empty
1071         string and handle it the same as a "help" command.  Use callback
1072         to print error message for unrecognized commands.  Replace
1073         hardcoded tab in literal string with a \t.  Other minor code
1074         cleanup.
1075
1076 Wed Mar 19 01:14:00 1997  Andrew Cagney  <cagney@kremvax.cygnus.com>
1077
1078         * configure: Regenerated to track ../common/aclocal.m4 changes.
1079
1080 Mon Mar 17 15:10:07 1997  Andrew Cagney  <cagney@kremvax.cygnus.com>
1081
1082         * configure: Re-generate.
1083
1084 Fri Mar 14 10:34:11 1997  Michael Meissner  <meissner@cygnus.com>
1085
1086         * configure: Regenerate to track ../common/aclocal.m4 changes.
1087
1088 Thu Mar 13 13:00:00 1997  Doug Evans  <dje@canuck.cygnus.com>
1089
1090         * interp.c (sim_open): New SIM_DESC result.  Argument is now
1091         in argv form.
1092         (other sim_*): New SIM_DESC argument.
1093
1094 Tue Feb  4 13:33:30 1997  Doug Evans  <dje@canuck.cygnus.com>
1095
1096         * Makefile.in (@COMMON_MAKEFILE_FRAG): Use
1097         COMMON_{PRE,POST}_CONFIG_FRAG instead.
1098         * configure.in: sinclude ../common/aclocal.m4.
1099         * configure: Regenerated.
1100
1101 Thu Jan 23 11:46:23 1997  Stu Grossman  (grossman@critters.cygnus.com)
1102
1103         * configure configure.in Makefile.in:  Update to new configure
1104         scheme which is more compatible with WinGDB builds.
1105         * configure.in:  Improve comment on how to run autoconf.
1106         * configure:  Re-run autoconf to get new ../common/aclocal.m4.
1107         * Makefile.in:  Use autoconf substitution to install common
1108         makefile fragment.
1109
1110 Wed Nov 20 02:04:32 1996  Doug Evans  <dje@canuck.cygnus.com>
1111
1112         * Makefile.in: Delete stuff moved to ../common/Make-common.in.
1113         (SIM_OBJS,SIM_EXTRA_LIBS): Define.
1114         * configure.in: Simplify using macros in ../common/aclocal.m4.
1115         Call AC_CHECK_HEADERS(unistd.h).
1116         * configure: Regenerated.
1117         * config.in: New file.
1118         * interp.c: #include "config.h".  #include <unistd.h> if present.
1119         (trap): Fetch errno value with callback->get_errno.
1120
1121 Tue Nov 12 13:34:00 1996  Dawn Perchik  <dawn@cygnus.com>
1122
1123         * interp.c: Don't include windows polling code if inside simluator.
1124
1125 Fri Sep 20 14:57:50 1996  Stan Shebs  <shebs@andros.cygnus.com>
1126
1127         * interp.c: Minor formatting improvements.
1128         (saved_state_type): Add bank registers.
1129         (bp_holder): New function, use to break on when debugging BUSERROR.
1130         (BUSERROR): Call it if bus error occurs.
1131
1132 Wed Jun 26 12:29:22 1996  Jason Molenda  (crash@godzilla.cygnus.co.jp)
1133
1134         * Makefile.in (bindir, libdir, datadir, mandir, infodir, includedir,
1135         INSTALL_PROGRAM, INSTALL_DATA): Use autoconf-set values.
1136         (docdir): Removed.
1137         * configure.in (AC_PREREQ): autoconf 2.5 or higher.
1138         (AC_PROG_INSTALL): Added.
1139         * configure: Rebuilt.
1140
1141 Thu May 16 15:44:29 1996  Ian Lance Taylor  <ian@cygnus.com>
1142
1143         * interp.c (saved_state_type): Add memstalls field.
1144         (MA) Define macro.
1145         (sim_resume): New local variable memstalls.  Add it back in to
1146         saved_state at the end of the function.
1147         (sim_info): Report memstalls.
1148         * gencode.c (tab): Add MA() to the execution string of all
1149         instructions which access memory.
1150
1151 Wed Feb 21 12:16:41 1996  Ian Lance Taylor  <ian@cygnus.com>
1152
1153         * configure: Regenerate with autoconf 2.7.
1154
1155 Tue Dec  5 16:38:55 1995  Stu Grossman  (grossman@cygnus.com)
1156
1157         * gencode.c (mac.l):  Don't abort GDB if executing mac.l
1158         instruction (which is unimplemented).  Generate a SIGTRAP (in the
1159         simulated target) instead.
1160
1161 Mon Dec  4 12:22:24 1995  J.T. Conklin  <jtc@rtl.cygnus.com>
1162
1163         * gencode.c (tab): Added several sh3 opcodes.
1164         (think): Added printonmatch for A_SSR and A_SPC.
1165         * interp.c (SSR, SPC): Added definitions.
1166         (saved_state_type): Added ssr and spc registers.
1167
1168 Wed Nov 29 12:39:27 1995  Jim Wilson  <wilson@chestnut.cygnus.com>
1169
1170         * gencode.c (tab): In shad/shld definitions, negate R[m] before
1171         the and operation instead of after.  For shad delete cast.  For shld
1172         use UR instead of R and delete cast.
1173
1174 Fri Nov 17 12:48:55 1995  Jim Wilson  <wilson@chestnut.cygnus.com>
1175
1176         * gencode.c (tab): Add explicit NaN support for ftrc instruction.
1177
1178 Wed Nov 15 11:25:27 1995  Stu Grossman  (grossman@cygnus.com)
1179
1180         * interp.c:  Make target_byte_order be extern to prevent SGI cc from
1181         issuing warnings about the use of common symbols.
1182
1183 Tue Nov 14 15:19:43 1995  Stu Grossman  (grossman@cygnus.com)
1184
1185         * gencode.c:  jsr, bsr and bsrf actually save pc+4 in pr, and rts
1186         actually uses pr+0.
1187
1188 Sat Oct 21 13:01:18 1995  Jim Wilson  <wilson@chestnut.cygnus.com>
1189
1190         * sh/interp.c (sim_stop_reason): Catch SIGQUIT and indicate
1191         program exited.
1192         (sim_get_quit_code): Delete.
1193
1194         * gencode.c (gensim): Indicate SIGILL instead of calling abort for
1195         default case.
1196
1197 Mon Oct 16 18:24:03 1995  Jim Wilson  <wilson@chestnut.cygnus.com>
1198
1199         * interp.c (saved_state_type): Move FP registers to immediately
1200         after SR.
1201
1202 Tue Oct 10 11:12:15 1995  Fred Fish  <fnf@cygnus.com>
1203
1204         * Makefile.in (BISON): Remove macro.
1205
1206 Fri Oct  6 12:08:18 1995  Jim Wilson  <wilson@chestnut.cygnus.com>
1207
1208         * interp.c (trap, case SYS_utime): Cast second arg of utime to
1209         void * to avoid compiler error.
1210
1211         * interp.c (callback): Remove last change.  It is initialized by
1212         a sim_set_callbacks call.
1213
1214 Thu Oct  5 14:13:29 1995  steve chamberlain  <sac@slash.cygnus.com>
1215
1216         * interp.c (callback): Initialize to default callback.
1217
1218 Thu Sep 28 15:26:59 1995  steve chamberlain  <sac@slash.cygnus.com>
1219
1220         * run.c: Moved to ../common.
1221         * interp.c (trap): Use gdb's callback interface.
1222         * Makefile.in: Updated.
1223
1224 Wed Sep 20 13:35:13 1995  Ian Lance Taylor  <ian@cygnus.com>
1225
1226         * Makefile.in (maintainer-clean): New synonym for realclean.
1227
1228 Wed Sep 20 09:51:50 1995  steve chamberlain  <sac@slash.cygnus.com>
1229
1230         * run.c (sim_callback_write_stdout):  New.
1231         * interp.c (trap): Call sim_callback_write_stdout when needed.
1232
1233 Mon Sep 18 18:42:27 1995  steve chamberlain  <sac@slash.cygnus.com>
1234
1235         * interp.c (trap): Remove useless code.
1236
1237 Fri Sep 15 19:30:05 1995  steve chamberlain  <sac@slash.cygnus.com>
1238
1239         * syscall.h: Copy from newlib.
1240
1241 Thu Sep 14 19:32:59 1995  Stu Grossman  (grossman@cygnus.com)
1242
1243         * gencode.c:  Back up PC by 2 for breakpoints.
1244         * interp.c:  Move fp regs beyond pc/pr/etc to avoid confusing GDB,
1245         which expect pc to immediately follow regs[].
1246
1247 Fri Sep  8 14:18:13 1995  Ian Lance Taylor  <ian@cygnus.com>
1248
1249         * configure.in: Define CC_FOR_BUILD.  Don't call AC_PROG_INSTALL.
1250         * configure: Rebuild.
1251         * Makefile.in (INSTALL): Revert to using install.sh.
1252         (INSTALL_PROGRAM, INSTALL_DATA): Set to $(INSTALL).
1253         (INSTALL_XFORM, INSTALL_XFORM1): Restore.
1254         (CC_FOR_BUILD): Restore.
1255         (gencode): Build using $(CC_FOR_BUILD).
1256         (install): Don't install in $(tooldir).
1257
1258 Thu Sep  7 15:02:31 1995  J.T. Conklin  <jtc@rtl.cygnus.com>
1259
1260         (Try to) Update to new bfd autoconf scheme.
1261         * run.c: Don't include sysdep.h.
1262         * Makefile.in (INSTALL{,_PROGRAM,_DATA}): Use autoconf computed value.
1263         (CC, CFLAGS, AR, RANLIB): Likewise.
1264         (HDEFINES, TDEFINES): Define.
1265         (CC_FOR_BUILD): Delete.
1266         (host_makefile_frag): Delete.
1267         (Makefile): Don't depend on frags.
1268         * configure.in (sysdep.h): Don't create symlink.
1269         (host_makefile_frag, frags): Deleted.
1270         (CC, CFLAGS, AR, RANLIB, INSTALL): Compute values.
1271         * configure: Regenerated.
1272
1273 Thu Aug 31 12:39:07 1995  Jim Wilson  <wilson@chestnut.cygnus.com>
1274
1275         * interp.c: Include <math.h>.
1276
1277 Wed Aug 30 22:05:17 1995  Jeff Law  (law@snake.cs.utah.edu)
1278
1279         * Makefile.in (run): Link in math library too.
1280         * gencode.c (gensim): abort if an unknown opcode is encountered.
1281         * interp.c (FPSCR, FPUL): Define.
1282         (struct save_state): Add fields for floating point registers,
1283         FPSCR and FPUL.
1284         (sim_resume): Add 'F' for accessing floating point registers
1285         in the save state structure.
1286         * gencode.c: Add sh3e opcodes.
1287         (gensym): Define a buffer for int<->fp conversions.
1288
1289 Tue Aug 22 14:16:46 1995  J.T. Conklin  <jtc@rtl.cygnus.com>
1290
1291         * interp.c (trap): Use trap vector 34 for host system interface.
1292         * gencode.c: Add 34 to conditional which determines which traps
1293         will be handled by simulator.
1294
1295 Fri Aug 11 17:59:15 1995  Jim Wilson  <wilson@chestnut.cygnus.com>
1296
1297         * run.c: Include <signal.h>.  Define SIGQUIT if not defined.
1298         (main): New variables reason and sigrc.  After simulator exits,
1299         check to see if it exited because of a signal, and if so, then
1300         use the signal number as the return value.
1301
1302 Thu Aug  3 10:45:37 1995  Fred Fish  <fnf@cygnus.com>
1303
1304         * Update all FSF addresses except those in COPYING* files.
1305
1306 Tue Jul 18 23:33:10 1995  Fred Fish  <fnf@fishbowl>
1307
1308         * interp.c (trap): Only use SYS_execv if defined.  Might be
1309         implemented as execve(arg1,arg2,0), as with Unixware 2.0.
1310         (sim_resume): In sbit initializer, cast shifted arg to unsigned
1311         to avoid signed integer overflow.
1312
1313 Wed Jul  5 14:32:54 1995  J.T. Conklin  <jtc@rtl.cygnus.com>
1314
1315         * Makefile.in (clean): Remove run, libsim.a.
1316           (distclean, mostlyclean, realclean): Remove Makefile and
1317           autoconf files.
1318
1319         * sh.mt: Removed.
1320
1321         * Makefile.in, configure.in: converted to autoconf.
1322         * configure: New file, generated with autconf 2.4.
1323
1324 Fri Jun 30 16:51:38 1995  Stan Shebs  <shebs@andros.cygnus.com>
1325
1326         * interp.c (sim_open): If argument supplied, interpret as
1327         desired memory size.
1328         (parse_and_set_memory_size): New function.
1329         (sim_do_command): New function.
1330
1331 Thu Jun 29 10:02:28 1995  Fred Fish  <fnf@deneb.cygnus.com>
1332
1333         * interp.c  (SYS_wait): Define as SYS_wait4 if available and
1334         SYS_wait is not already defined (SunOS 4.1.3 for example).
1335         (SYS_utime): Define as SYS_utimes if available and
1336         SYS_utime is not already defined.
1337
1338 Thu Jun 22 17:25:57 1995  Steve Chamberlain  <sac@slash.cygnus.com>
1339
1340         * interp.c: Don't include sys/times.h or sys/param.h
1341
1342 Wed Jun 21 15:03:49 1995  Steve Chamberlain  <sac@slash.cygnus.com>
1343
1344         * interp.c (SIGBUS, SIGTERM): Define if not.
1345         (sim_memory_size): default to 2^19 on PCs.
1346         (sim_resume): Poll for quits on win32.
1347
1348 Wed May 24 16:22:48 1995  Jim Wilson  <wilson@chestnut.cygnus.com>
1349
1350         * gencode.c (op_tab): Add SH3 support.
1351
1352 Wed May 24 14:07:11 1995  Steve Chamberlain  <sac@slash.cygnus.com>
1353
1354         * gencode.c (tab): Add bsrf and braf.
1355
1356 Mon Apr 24 15:09:49 1995  Jason Molenda  (crash@cygnus.com)
1357
1358         * configure.in: use ../../bfd/hosts/std-host.h, not
1359         ../bfd/hosts/std-host.h (which doesn't exist).
1360
1361 Mon Mar 27 10:32:34 1995  J.T. Conklin  <jtc@rtl.cygnus.com>
1362
1363         * run.c: parse arguments with getopt().
1364
1365 Sun Feb 26 15:27:24 1995  Steve Chamberlain  <sac@cygnus.com>
1366
1367         * configure.in: Use ../../bfd/hosts/std-host.h if specific
1368         host unavailable.
1369
1370 Mon Jan 23 16:10:58 1995  Torbjorn Granlund  <tege@rtl.cygnus.com>
1371
1372         * interp.c (macw): Sign extend MACH at bit 10 for non-saturating case.
1373
1374 Sun Jan 22 13:55:36 1995  Torbjorn Granlund  <tege@rtl.cygnus.com>
1375
1376         * gencode.c (op_tab): Make MAC.W call macw, not abort.
1377         * interp.c (macw): New function.
1378         (S): New #define.
1379
1380 Sat Jan 21 15:52:30 1995  Torbjorn Granlund  <tege@rtl.cygnus.com>
1381
1382         * gencode.c (op_tab): New code for ADDV and SUBV.
1383         Make MAC.L abort sicne it is not implemented.
1384
1385         * interp.c (dmul): Handle the signed case by adjusting after unsigned multiply.
1386         Get rid of __GNUC__ conditional.
1387
1388 aThu Jan 19 05:50:50 1995  Torbjorn Granlund  <tege@rtl.cygnus.com>
1389
1390         * gencode.c (op_tab): Also replace NEGC, and try again with SUBC.
1391         Change ADDC for symmetry.
1392
1393         * gencode.c (op_tab): Replace code for ADDC and SUBC.
1394
1395 Mon Jan  9 15:43:53 1995  Stu Grossman  (grossman@cygnus.com)
1396
1397         * interp.c:  Remove def of INLINE.  This comes from bfd.h.  Also,
1398         declare IOMEM before using it.
1399
1400 Wed Dec 28 21:25:31 1994  Steve Chamberlain  (sac@jonny.cygnus.com)
1401
1402         * interp.c (BUSERROR): New macro.
1403         ([r|w][bwl]at[little|big]) New functions.
1404         (sim_resume): If GO32 check for interrupt every now
1405         and again.  Decrement PC if SIGBUS seen.
1406         * run.c (main):  Return result of simulated _exit.
1407
1408 Mon Dec  5 21:59:51 1994  Doug Evans  <dje@canuck.cygnus.com>
1409
1410         * Makefile.in (gencode): Allow build in different directory.
1411
1412 Wed Nov 30 17:47:13 1994  Jim Wilson  <wilson@chestnut.cygnus.com>
1413
1414         * Makefile.in (gencode): Change $< to gencode.c for portability.
1415
1416 Wed Nov 23 21:31:55 1994  Steve Chamberlain  (sac@jonny.cygnus.com)
1417
1418         * interp.c ([wr][bwl]at): New functions.
1419         (trap): Cope with both byte modes.
1420
1421 Thu Sep  8 17:35:07 1994  Steve Chamberlain  (sac@jonny.cygnus.com)
1422
1423         * gencode.c (tab): Simulate T bit after a negc insn right.
1424         * interp.c (RSBAT): Sign extend the arg.
1425         (ACE_FAST): New macro.
1426         (sim_resume): Remove obsolete test of sim_timeout.
1427
1428 Fri Aug  5 14:12:31 1994  Steve Chamberlain  (sac@jonny.cygnus.com)
1429
1430         * interp.c (IOMEM): New function, simulates very basic I/O area of
1431         the SH.
1432         (WBAT, RBAT) : Call I/O functions.
1433         * gencode.c (tab): Special case trapa #3.
1434
1435 Mon Jun 27 18:04:54 1994  Steve Chamberlain  (sac@cirdan.cygnus.com)
1436
1437         * run.c (main): Specify the file type again.
1438
1439 Thu May 26 19:04:37 1994  Steve Chamberlain  (sac@thepub.cygnus.com)
1440
1441         * interp.c (trap): Fix irix incompatibility.
1442         * run.c (main): open without specifying file type.
1443
1444 Wed May 18 14:18:53 1994  Doug Evans  (dje@canuck.cygnus.com)
1445
1446         * interp.c (sim_*): Make result void where there isn't one.
1447         (sim_set_pc): Delete.
1448         (sim_info): Delete printf_fn arg, all callers changed.
1449         Call printf_filtered instead.
1450         (sim_close): New function.
1451         (sim_load): New function.
1452         (sim_create_inferior): Renamed from sim_set_args, all callers changed.
1453         * run.c: #include <varargs.h>, "remote-sim.h".
1454         (printf_filtered): New function.
1455
1456 Wed Apr 27 12:03:48 1994  Steve Chamberlain  (sac@cygnus.com)
1457
1458         * gencode.c (table): Get direction of some opcodes right.
1459         (trapa, rte): Implement fully.
1460         * interp.c (trap): Make stat call more portable.
1461
1462 Fri Feb 11 21:59:38 1994  Steve Chamberlain  (sac@sphagnum.cygnus.com)
1463
1464         * gencode.c (main, gendefines): New -d option prints table of defines.
1465         * interp.c (trap): Add a load of system calls.
1466         (sim_memory_size): Now default to 8Mbyte.
1467         (PARANOID): Keep vector of registers with undefined contents.
1468
1469 Mon Nov 15 14:37:18 1993  Steve Chamberlain  (sac@jonny.cygnus.com)
1470
1471         * gencode.c: mova uses aligned addresses
1472         * interp.c (trap): Return results in r0.
1473
1474 Tue Oct 26 10:38:55 1993  Doug Evans  (dje@canuck.cygnus.com)
1475
1476         * Makefile.in (CSEARCH): Add -I$(srcdir)/../../gdb
1477         * interp.c: #include "remote-sim.h".
1478         (sim_resume): int result, new arg `siggnal'.
1479         (sim_write): Use SIM_ADDR for type of arg `addr'.
1480         (sim_read): Use SIM_ADDR for type of arg `addr'.
1481         Use unsigned char * for `buffer'.
1482         (sim_store_register): int result.
1483         (sim_fetch_register): Ditto.
1484         (sim_stop_reason): Renamed from sim_stop_signal.  New arg `reason'.
1485         (sim_set_pc): int result, use SIM_ADDR for type of arg `x'.
1486         (sim_info): int result, new args `verbose', `printf_fn'.
1487         (sim_kill): int result.
1488         (sim_open): int result, new arg `name'.
1489         * run.c: #include <stdio.h>
1490         (main): Update call to sim_info.
1491
1492 Sat Oct 23 15:09:29 1993  Doug Evans  (dje@canuck.cygnus.com)
1493
1494         * interp.c (sim_stop_signal): Result is now enum sim_stop.
1495
1496 Fri Oct  8 10:47:09 1993  Steve Chamberlain  (sac@phydeaux.cygnus.com)
1497
1498         * gencode.c (table): Becomes unsigned.
1499         * interp.c (trap): Get right breakpoint SIGnum. (sim_write,
1500         sim_read): Return number of bytes copied.  (sim_store_register):
1501         Value passed by reference. (sim_kill, sim_open, sim_set_args): New functions.
1502
1503 Tue Sep  7 16:24:13 1993  Stan Shebs  (shebs@rtl.cygnus.com)
1504
1505         * interp.c (sim_info): Fix small typo in printf string.
1506
1507 Thu Aug  5 11:37:48 1993  Stan Shebs  (shebs@rtl.cygnus.com)
1508
1509         * interp.c (sim_resume): Set memory after pointers inited.
1510
1511 Mon Aug  2 14:13:22 1993  Steve Chamberlain  (sac@phydeaux.cygnus.com)
1512
1513         * interp.c (get_now): Use time system call.
1514         * Makefile.in: install correctly.
1515
1516 Tue Jul  6 10:30:46 1993  Steve Chamberlain  (sac@phydeaux.cygnus.com)
1517
1518         * run.c (main), interp.c (sim_set_timeout): Remove timeout
1519         functionality.
1520
1521 Thu Jun 24 13:29:57 1993  david d `zoo' zuhn  (zoo at rtl.cygnus.com)
1522
1523         * Makefile.in: don't run indent everytime; also add a space in the
1524         includes
1525
1526 Thu Jun 17 18:30:42 1993  Steve Chamberlain  (sac@phydeaux.cygnus.com)
1527
1528         * gencode.c: Fix some opcodes.
1529         * interp.c: Support for profiling and portability fixes.
1530         * run.c (main): Get profiling args.
1531
1532 Wed May  5 13:17:22 1993  Steve Chamberlain  (sac@cygnus.com)
1533
1534         * gencode.c (tab): Lint for sgi compiler
1535         * interp.c: Lint for sgi compiler.
1536
1537 Mon May  3 15:25:33 1993  Steve Chamberlain  (sac@thepub.cygnus.com)
1538
1539         * run.c (main): Support for resizing simulated RAM.
1540         * Makefile.in: Support for broken makes.
1541         * interp.c, gencode.c: Lint.
1542
1543 Mon Apr 26 18:01:10 1993  Steve Chamberlain  (sac@thepub.cygnus.com)
1544
1545         * created
1546