c80 simulator fixes.
[platform/upstream/binutils.git] / sim / common / ChangeLog
1 Mon May 12 14:49:05 1997  Andrew Cagney  <cagney@b1.cygnus.com>
2
3         * sim-core.c (sim_core_find_mapping): Call engine_error not
4         sim_io_error when possible.
5
6 Mon May 12 08:55:07 1997  Andrew Cagney  <cagney@b2.cygnus.com>
7
8         * sim-endian.h (V1_H2): Add macro's to insert a word into a
9         high/low double word.
10
11         * sim-trace.h: Remove definition of attribute - defined in
12         sim_basics.h.
13
14 Mon May 12 08:55:07 1997  Andrew Cagney  <cagney@b1.cygnus.com>
15
16         * sim-options.h (struct OPTION): Add doc_opt as the documenting
17         name of the option - or family of options.
18
19         * sim-options.c (sim_args_command): Match command `a-b c' with
20         option `--a-b-c' from option table.
21
22 Thu May  8 12:40:07 1997  Andrew Cagney  <cagney@b1.cygnus.com>
23
24         * sim-options.c (sim_print_help): For optional arguments, wrap
25         them in [].
26
27         * sim-trace.c (set_trace_options): New function, handle optional
28         argument and multiple assignment.
29         (trace_option_handler): Update.
30
31         * sim-trace.c (trace_option_handler): Trace branch and not fpu
32         when branch tracing selected.
33
34 Wed May  7 15:19:58 1997  Andrew Cagney  <cagney@b1.cygnus.com>
35
36         * sim-trace.c (trace_one_insn): Make a va-args function.
37
38         * sim-trace.c (trace_vprintf): New function, va-arg version of
39         trace_printf.
40
41 Tue May  6 16:38:16 1997  Doug Evans  <dje@canuck.cygnus.com>
42
43         * sim-trace.c (trace_uninstall): Don't close a file twice.
44         * sim-profile.c (profile_uninstall): Likewise.
45
46 Tue May  6 06:14:01 1997  Mike Meissner  <meissner@cygnus.com>
47
48         * sim-trace.c (toplevel): Include bfd.h.
49         (trace_options): Note that --trace-linenum also turns on
50         --trace-insn.  Add --trace-{branch,semantics}.
51         (trace_option_handler): If --trace-linenum, also turn on
52         --trace-insn.  Add --trace-branch support.  If --trace-semantics,
53         turn on ALU, FPU, branch, and memory tracing.
54         (trace_one_insn): New function to trace an instruction.  Support
55         --trace-linenum.
56         (OPTION_TRACE_*): Use an enum, rather than lots of defines.
57
58         * sim-trace.h (TRACE_{SEMANTICS,BRANCH}_IDX): Add new macros.
59         (MAX_TRACE_VALUES): Use 32, not 12 by default.
60         (TRACE_branch): Add new mask.
61         (TRACE_*_P): Define all possible trace_p macros.
62         (trace_one_insn): Declare function.
63
64 Mon May  5 14:08:34 1997  Mike Meissner  <meissner@cygnus.com>
65
66         * sim-trace.h (__attribute__): Define as nothing if not GNU C or
67         GNU C doesn't support __attributes__.
68         ({trace,debug}_printf): Add attribute's so -Wformat can check the
69         format strings.
70
71 Mon May  5 11:16:12 1997  Andrew Cagney  <cagney@b1.cygnus.com>
72
73         * sim-config.h (FORCED_ALIGNMENT): New alignment option -
74         addresses are masked forcing them to be correctly aligned.
75         (WITH_ALIGNMENT): Make NONSTRICT_ALIGNMENT the default.
76         * sim-config.c (config_alignment_to_a): Update.
77
78         * sim-core.h (sim_cpu_core): New data type contains cpu specific
79         core data.
80         * sim-base.h (CPU_CORE): Add cpu specific core data to cpu base
81         type.
82         * sim-core.c (sim_core_attach): Add CPU argument.  Ready for
83         processor specific core maps.
84         (sim_core_map_attach): Copy the core map data to each of the
85         processor specific core data structures.
86         * sim-core.c (sim_core_find_mapping): Update.
87
88         * sim-n-core.h (sim_core_read_N, sim_core_write_N): Rename.
89         (sim_core_write_aligned_N, sim_core_write_aligned_N): New names.
90         (sim_core_write_unaligned_N, sim_core_write_unaligned_N): New
91         alternatives that handle unaligned addresses.
92         (sim_core_{read,write}_{,un}aligned_N): Drop SIM_DESC arg, replace
93         with just CPU arg.
94         * cgen-utils.c (sim_disassemble_insn): Update.
95
96 Mon May  5 13:19:16 1997  Andrew Cagney  <cagney@b1.cygnus.com>
97
98         * sim-trace.h (TRACE_FPU_IDX): Add Floating-point specific
99         tracing.
100
101         * sim-fpu.h, sim-fpu.c: New files - prototype for generic target
102         fpu support.
103
104         * sim-inline.h, sim-inline.c: Add support for SIM_FPU.
105
106 Fri May  2 17:59:42 1997  Andrew Cagney  <cagney@b1.cygnus.com>
107
108         * sim-core.c (sim_core_map_to_str): New function ascii equivalent
109         to map type.
110         
111         * sim-n-core.h (sim_core_read_N, sim_core_write_N): Use in trace
112         statement.
113
114 Fri May  2 17:28:02 1997  Andrew Cagney  <cagney@b2.cygnus.com>
115
116         * cgen-trace.c: Prepend additional trace_printf argument.
117
118         * cgen-utils.c (sim_disassemble_insn): Add additional core
119         arguments.
120
121 Fri May  2 11:40:23 1997  Andrew Cagney  <cagney@b1.cygnus.com>
122
123         * nrun.c (main): Catch/report errorenous simulator states.
124
125         * sim-module.c: #include "libiberty.h" so that xmalloc is defined.
126         * sim-trace.c: #include string.h/strings.h so that memset is
127         defined.
128         * sim-utils.c: Ditto.
129         * sim-profile.c: Ditto. And stdlib.h.
130         (print_bar): Only define when used by instruction or memory profiler.
131
132         * sim-options.c (standard_option_handler): Make ul more local.
133         
134         * sim-load.c (sim_load_file): Make the name constant.
135         (sim_load_file): Passify gcc.
136
137         * sim-utils.h: New file, pre-declare utilites in corresponding .c
138         file.
139         * sim-utils.c, sim-load.c: Include sim-utils.h.
140         
141         * sim-base.h (sim_cpu): Pre define here so available to all.
142
143         * sim-core.h (DECLARE_SIM_CORE_WRITE_N, DECLARE_SIM_CORE_READ_N):
144         Restore the sim_cpu and instruction_address arguments so that full
145         information is available to the abort function.
146         * sim-core.c (sim_core_find_mapping, sim_core_write_buffer): Ditto.
147         * sim-n-core.h (sim_core_write_N, sim_core_read_N): Update.
148
149         * sim-trace.h, sim-trace.c (trace_option_handler): Add interim
150         tracing support for sim-events and sim-core.
151         (trace_option_handler): Convert #if to if where possible so always
152         compiled/checked by C compiler.
153         * sim-n-core.h (sim_core_write_N, sim_core_read_N): Update.
154         
155         * sim-base.h: Adjust comment documenting how to define the cpu
156         structure.
157         (sim_state_base): Add sim_core and sim_events to simulator base
158         object.
159
160         * sim-trace.h, sim-trace.c (trace_printf): Add SIM_DESC argument.
161         * sim-core.c (sim_core_init, sim_core_attach,
162         sim_core_find_mapping): Update.
163         * sim-events.c (ETRACE, sim_events_init, sim_events_time,
164         update_time_from_event, insert_sim_event,
165         sim_events_schedule_after_signal, sim_events_deschedule,
166         sim_events_tick): Ditto.
167         
168         * sim-basics.h (sim-module.h, sim-trace.h, sim-profile.h,
169         sim-model.h): Move #includes from here.
170         * sim-base.h: To here.
171         (sim-core.h, sim-events.h, sim-io.h): Include also
172         
173 Wed Apr 30 15:37:54 1997  Andrew Cagney  <cagney@b1.cygnus.com>
174
175         * callback.c (default_callback): Missing initialisers.
176
177 Thu May  1 10:40:47 1997  Doug Evans  <dje@canuck.cygnus.com>
178
179         * sim-utils.c (sim_add_commas): New function.
180         * sim-basics.h (sim_add_commas): Add prototype.
181         * cgen-scache.c (scache_print_profile): Print commas in numbers.
182         * sim-profile.c (COMMAS): New macro.
183         (print_*): Use it to print commas in numbers.
184
185         * configure: Regenerated.
186
187         * cgen-sim.h (sim_signal_type): Add SIM_SIGINT.
188         (cgen_state): New member run_fast_p.
189         (cgen_init): Add prototype.
190         (sim_disassemble_insn): New arg `cpu'.
191         * cgen-trace.c (trace_insn): Update call to sim_disassemble_insn.
192         * cgen-utils.c (cgen_init): New function.
193         (sim_disassemble_insn): New arg `cpu'.  Rewrite fetching of insn.
194         * genmloop.sh: Call engine_halt if loop exits.
195
196         * Makefile.in (sim-options_h): Define.
197         (sim-{module,options,trace,profile,utils}.o): Clean up dependencies.
198         (sim-model.o): Add new rule.
199         (cgen-{scache,trace,utils}.o): Add new rules.
200         * aclocal.m4 (SIM_AC_OPTION_{SCACHE,DEFAULT_MODEL}): Add.
201         * cgen-scache.c (scache_print_profile): Change `sd' arg to `cpu'.
202         Indent output by 2 spaces.
203         * cgen-scache.h (scache_print_profile): Update.
204         * cgen-trace.c (trace_insn_fini): Indent output by 2 spaces.
205         Use trace_printf, not fprintf.
206         (trace_extract): Use trace_printf, not cgen_trace_printf.
207         * genmloop.sh (!FAST case): Increment `insn_count'.
208         * sim-base.h (sim_state_base): Only include scache_size if WITH_SCACHE.
209         (sim_cpu_base): Rename member `sd' to `state' to be consistent with
210         access macro's name.
211         * sim-core.c (sim_core_init): Use EXTERN_SIM_CORE to define it.
212         Change return type to SIM_RC.
213         (sim_core_{install,uninstall}): New functions.
214         * sim-core.h (sim_core_{install,uninstall}): Declare.
215         (sim_core_init): Use EXTERN_SIM_CORE to define it.
216         Change return type to SIM_RC.
217         * sim-model.h (models,machs,model_install): Declare.
218         * sim-module.c (modules): Add scache_install, model_install.
219         (sim_post_argv_init): Set cpu->state backlinks.
220         * sim-options.c (standard_options): Delete --simcache-size,--max-insns.
221         (standard_option_handler): Likewise.
222         * sim-profile.c (PROFILE_{HISTOGRAM,LABEL}_WIDTH): Move to
223         sim-profile.h.
224         (*): Assume ANSI C.
225         (profile_options): Delete --profile-simcache.
226         (profile_option_handler): Likewise.
227         (profile_print_insn): Change `sd' arg to `cpu'.  Indent output 2
228         spaces.
229         (profile_print_{memory,model}): Likewise.
230         (profile_print_simcache): Delete.
231         (profile_print_speed): New function.
232         (profile_print): Rewrite.
233         * sim-profile.h (PROFILE_scache): Renamed from PROFILE_simcache.
234         (WITH_PROFILE_SCACHE_P): Renamed from WITH_PROFILE_SIMCACHE_P.
235         (PROFILE_DATA): Delete members simcache_{hits,misses}.
236         (PROFILE_COUNT_SIMCACHE_{HIT,MISS}): Delete.
237         (PROFILE_{CALLBACK,CPU_CALLBACK}): New types.
238         (profile_print): Update prototype.
239
240 Wed Apr 30 11:34:14 1997  Doug Evans  <dje@canuck.cygnus.com>
241
242         * cgen-scache.[ch], cgen-sim.h: New files.
243         * cgen-trace.[ch], cgen-types.h, cgen-utils.c, genmloop.sh: New files.
244         * sim-model.c: New file.
245
246         * Make-common.in (clean targets): Undo patch of Apr. 22.
247
248 Fri Apr 25 15:28:32 1997  Mike Meissner  <meissner@cygnus.com>
249
250         * sim-n-bits.h (signed): If we have a standard compiler, undef
251         signed, so that signedN is defined correctly.
252
253 Thu Apr 24 00:00:07 1997  Doug Evans  <dje@canuck.cygnus.com>
254
255         * sim-module.h, sim-model.h, sim-profile.h: New files.
256         * sim-module.c, sim-profile.c: New files.
257         * Make-common.in (SIM_PROFILE): Define
258         (CONFIG_CFLAGS): Add $(SIM_PROFILE).
259         (sim_main_headers): Add sim-module.h, sim-model.h, sim-profile.h.
260         (sim_module.o,sim-profile.o): Add rules for.
261         * aclocal.m4 (--enable-sim-trace): Allow symbolic arguments.
262         (--enable-sim-profile): Add.
263         * configure: Regenerated.
264         * sim-base.h (sim_state_base): New members init_list, uninstall_list,
265         model.  Move trace and profile support to sim-{trace,profile}.h.
266         New members trace_data, profile_data.
267         * sim-basics.h: #include sim-module.h, sim-model.h, sim-profile.h.
268         * sim-config.h: Provide default definition of WITH_PROFILE.
269         (WITH_TRACE): Change default to -1.
270         (MAX_NR_PROCESSORS): Always define.
271         * sim-options.c: Move trace and profile support to
272         sim-{trace,profile}.h.
273         (sim_pre_argv_init): Moved to sim-model.c.
274         (standard_install): New function.
275         * sim-options.h (sim_pre_argv_init): Move decl to sim-model.c.
276         (standard_install): Declare.
277         * sim-trace.c: Tracing option handling moved here from sim-options.c.
278         (trace_install, trace_uninstall): New functions.
279         (trace_printf): Update reference to TRACE_FILE.
280         * sim-trace.h (TRACE_FOO_IDX): Moved here from sim-base.h.
281         (TRACE_foo): Bit masks for symbolic arguments to --enable-sim-trace.
282         (WITH_TRACE_FOO_P): Define.
283         (trace_install): Declare.
284         (TRACE_DATA): New struct.
285
286 Wed Apr 23 17:23:15 1997  Doug Evans  <dje@canuck.cygnus.com>
287
288         * run.c: Undo last exec_bfd patch.
289         (main): Only pass -E ifdef SIM_HAVE_BIENDIAN.
290
291 Wed Apr 23 17:54:27 1997  Mike Meissner  <meissner@cygnus.com>
292
293         * run.c (exec_bfd): Add back in.
294         (main): Set exec_bfd.
295
296 Tue Apr 22 14:43:46 1997  Doug Evans  <dje@canuck.cygnus.com>
297
298         * sim-load.c (sim_load_file): #include <stdio.h> for NULL.
299
300 Wed Apr 23 02:55:54 1997  Andrew Cagney  <cagney@b1.cygnus.com>
301
302         * sim-events.c (insert_sim_event): Call sim_io_error instead of
303         less well defined engine_error.
304         * sim-core.c: Ditto.
305
306 Tue Apr 22 08:48:16 1997  Stu Grossman  (grossman@critters.cygnus.com)
307
308         * Make-common.in:  Change clean targets to use :: so that other
309         Makefiles can have their own clean targets.
310         * sim-load.c (xprintf eprintf):  Use ANSI_PROTOTYPES instead of
311         __STDC__ to control use of stdarg vs. varargs syntax.  Some
312         systems can't use __STDC__, but require stdarg.
313
314 Fri Apr 18 11:14:43 1997  Doug Evans  <dje@canuck.cygnus.com>
315
316         * sim-options.c (standard_options): Add --endian.
317         (standard_option_handler): Likewise.
318
319         * nrun.c: #include <signal.h>.
320         (main, cntrl_c): Wrap calls to sim_resume in a SIGINT
321         handler that calls sim_stop ().
322
323 Fri Apr 18 13:11:36 1997  Andrew Cagney  <cagney@b1.cygnus.com>
324
325         * run.c (main, cntrl_c): Wrap calls to sim_resume in a SIGINT
326         handler that calls sim_stop ().  Simulators may still be
327         establishing their own handler.
328
329         * sim-events.c (sim_events_poll): Rename from
330         sim_events_at_large_int.  Poll IO.
331
332         * sim-io.c (sim_io_poll_quit): New function - pass on a polling
333         request.
334
335         * callback.c (os_poll_quit): New function poll for quit signal
336         where needed.
337         (default_callback): Include magic number.
338
339 Thu Apr 17 02:25:11 1997  Doug Evans  <dje@canuck.cygnus.com>
340
341         * aclocal.m4: Check for headers time.h, sys/time.h, sys/resource.h.
342         Check for functions getrusage, time.
343         * sim-basics.h (SIM_ELAPSED_TIME): New typedef.
344         (sim_elapsed_time_get, sim_elapsed_time_since): Add prototypes.
345         * sim-utils.c: #include time.h, sys/time.h, sys/resource.h if able.
346         (sim_elapsed_time_get, sim_elapsed_time_since): New functions.
347
348         * sim-utils.c (sim_copy_argv, sim_analyze_program): New functions.
349
350         * sim-options.c, sim-options.h: New files.
351         * sim-config.h (WITH_DEBUG): Provide default value of zero.
352         * Make-common.in (nrun.o): Add rules for.
353         * nrun.c: New file.
354
355         * run.c (main): Check return value of sim_open.
356
357         * Make-common.in (sim-options.o, sim-load.o, sim-trace.o): Add rules.
358         (sim_main_headers): Add sim-trace.h.
359         * run.c (exec_bfd, target_byte_order): Delete.
360         (main): Pass -E <endian> to sim_open.  Delete code to load sections,
361         call sim_load instead.  Check return code of sim_create_inferior.
362         * sim-base.h (CURRENT_STATE): Define.
363         (sim_state_base): Make typedef.  New members options, prog_argv,
364         prog_bfd, text_{section,start,end}, start_addr, simcache_size,
365         mem_size, memory [+ corresponding access macros].
366         (sim_cpu_base): New typedef.
367         * sim-trace.h: New file.
368         * sim-trace.c: New file.
369         * sim-basics.h: #include it.
370         * sim-load.c: New file.
371
372 Tue Apr 15 15:10:13 1997  Ian Lance Taylor  <ian@cygnus.com>
373
374         * Make-common.in (INSTALL): Set to @INSTALL@.
375         (INSTALL_XFORM, INSTALL_XFORM1): Remove.
376         (install-common): Depend upon installdirs.  Use
377         $(program_transform_name) directly, rather than using
378         $(INSTALL_XFORM).
379         (installdirs): New target.
380         * Makefile.in (INSTALL): Set to @INSTALL@.
381         (INSTALL_XFORM, INSTALL_XFORM1): Remove.
382         (install-man): Depend upon installdirs.  Use
383         $(program_transform_name) directly, rather than using
384         $(INSTALL_XFORM).
385         (installdirs): New target.
386
387 Tue Apr 15 15:08:12 1997  Andrew Cagney  <cagney@b1.cygnus.com>
388
389         * sim-assert.h (SIM_ASSERT, ASSERT): Allow these macros to
390         be overriden.
391
392 Wed Apr  9 16:06:44 1997  Andrew Cagney  <cagney@kremvax.cygnus.com>
393
394         * sim-basics.h: Only bring in config.h and tconfig.h if
395         HAVE_CONFIG_H.
396
397 Mon Apr  7 11:39:45 1997  Andrew Cagney  <cagney@kremvax.cygnus.com>
398
399         * sim-config.h (WITH_TARGET_WORD_MSB): New Macro. Define the bit
400         numbering convention of the target.
401         * sim-config.c (print_sim_config): Print WITH_TARGET_WORD_BITSIZE
402         and WITH_TARGET_WORD_MSB.
403         (sim_config): When possible, check for consistency with bitsize
404         and msb.
405
406         * sim-bits.h: Allow MSB to be other than zero.
407         * sim-bits.c: Ditto.
408         * sim-n-bits.h: Ditto.
409         
410         * sim-bits.h (MSMASK*): New macros - converce to LSMASK*.
411         * sim-n-bits.h (MSMASKEDn): Ditto.
412
413 Mon Apr 14 16:29:21 1997  Ian Lance Taylor  <ian@cygnus.com>
414
415         * Makefile.in (INSTALL): Change install.sh to install-sh.
416
417 Mon Apr  7 10:46:38 1997  Doug Evans  <dje@canuck.cygnus.com>
418
419         * sim-base.h (sim_state_base): Move `magic' to end of struct.
420
421 Mon Apr  7 15:53:21 1997  Andrew Cagney  <cagney@kremvax.cygnus.com>
422
423         * run.c (main): Check that a program to run was specified.
424
425 Mon Apr  7 15:45:02 1997  Andrew Cagney  <cagney@kremvax.cygnus.com>
426
427         * aclocal.m4 (AC_TYPE_SIGNAL): Add check.
428
429         * configure: Regenerated to track ../common/aclocal.m4 changes.
430         * config.in: Ditto.
431
432 Wed Apr  2 15:06:28 1997  Doug Evans  <dje@canuck.cygnus.com>
433
434         * sim-endian.h: Move host {LITTLE,BIG}_ENDIAN support from here,
435         * sim-config.h: To here.
436
437         * Make-common.in (SIM_EXTRA_DEPS): New config var.
438         (sim_main_headers): Define.
439         (sim-*.o): Depend on $(SIM_EXTRA_DEPS).
440         (BUILT_SRC_FROM_COMMON): Move here from ../d30v/Makefile.in.
441         (clean): Use it.
442         (sim-utils.o): Add rule for.
443         * sim-utils.o: New file.
444         * sim-basics.h: #include sim-base.h.
445         (zalloc): Make argument unsigned long.
446         * sim-base.h: New file.
447         * sim-inline.h (SIM_IO support): Delete.
448         * sim-io.h: Delete inline support.
449         * sim-io.c: Likewise.  sim-state.h renamed to sim-main.h.
450         * sim-config.c: sim-state.h renamed to sim-main.h.
451         * sim-core.c: Likewise.
452         * sim-events.c: Likewise.
453
454         * run.c (main): Pass SIM_OPEN_STANDALONE to sim_open.
455
456         * aclocal.m4: Check for stdlib.h, string.h, strings.h, unistd.h.
457         (sim-debug): Allow arguments.  Define WITH_DEBUG in addition to
458         -DDEBUG.
459         * configure: Regenerated to track ../common/aclocal.m4 changes.
460
461 Wed Apr  2 14:34:19 1997 Andrew Cagney <cagney@kremvax.cygnus.com>
462
463         * configure: Regenerated to track ../common/aclocal.m4 changes.
464
465 Wed Apr  2 11:08:11 1997  Andrew Cagney  <cagney@kremvax.cygnus.com>
466
467         * sim-config.h (WITH_ALIGNMENT, WITH_FLOATING_POINT,
468         WITH_XOR_ENDIAN, WITH_SMP, WITH_RESERVED_BITS): Assume that these
469         are defined by the configure.
470
471         * aclocal.m4 (sim-stdio): Add option stdio from ../ppc configure.
472         
473         * aclocal.m4 (floating-point, xor-endian, alignment, smp,
474         reserved-bits): Always define.
475         
476         * sim-config.h, sim-config.c (sim_config): New function - and new
477         file - co-ordinate the setting/checking of the common simulator
478         configuration options.
479
480         * Make-common.in (sim-config.o): Add rule.
481
482 Fri Mar 28 15:32:00 1997  Mike Meissner  <meissner@cygnus.com>
483
484         * callback.c (os_{,e}vprintf_filtered): Change stdarg type to
485         va_list from void *, since va_list might not be a pointer type.
486
487 Mon Mar 24 15:27:12 1997  Andrew Cagney  <cagney@kremvax.cygnus.com>
488
489         * sim-n-endian.h (offset_N): Correct assertion - word and sub word
490         in wrong order.
491         (offset_N): Correct computation of LE offset.
492
493         * sim-io.c (sim_io_error): Include a new line when reporting
494         errors.
495
496         * sim-assert.h (SIM_FILTER_PATH): Out by one when locating last
497         `/'.
498
499 Thu Mar 20 22:31:06 1997  Jeffrey A Law  (law@cygnus.com)
500
501         * run.c: Include alloca-conf.h.
502
503         * callback.c (os_evprintf_filtered): Fix typo.
504
505 Fri Mar 21 13:36:20 1997  Andrew Cagney  <cagney@kremvax.cygnus.com>
506
507         * run.c (string.h, strings.h, stdlib.h): Include.
508
509         * sim-events.c (sim_events_tick): Recent cleanup failed to return
510         0 when nothing pending.
511
512         * run.c (sim_size, sim_trace): Plicate GCC - these two functions
513         will soon be going away.
514         (getopt): Plicate GCC.
515
516         * sim-endian.c (sim-io.h): Plicate GCC.
517         * sim-bits.c (sim-io.h): Ditto.
518         * sim-n-bits.h (ROTn): Ditto.
519
520         * sim-io.c (sim_io_error): Correct check for NULL.
521
522         * sim-assert.h (SIM_FILTER_PATH): Separate out the code filtering
523         the __FILE__.
524         * sim-events.c: Use SIM_FILTER_PATH to filter out the filename
525         path.
526
527 Wed Mar 19 01:12:06 1997  Andrew Cagney  <cagney@kremvax.cygnus.com>
528
529         * aclocal.m4 (SIM_AC_OPTION_*: Move so that they are outside of
530         SIM_AC_COMMON - SIM_AC_COMMON was gobling arguments.
531
532 Tue Mar 18 20:48:12 1997  Andrew Cagney  <cagney@kremvax.cygnus.com>
533
534         * sim-alu.h: Include sim-xcat.h.
535         
536 Tue Mar 18 13:58:18 1997  Andrew Cagney  <cagney@kremvax.cygnus.com>
537
538         * Make-common.in (sim-bits.c, sim-core.c, sim-endian.c,
539         sim-events.c, sim-inline.c, sim-io.c): Define rules for building
540         these.
541
542         * sim-events.c (sim_events_at_large_int): New function.  Just
543         schedules an event every large-int ticks.
544         (sim_events_init): Call.
545         (sim_events_tick, sim_events_process): Move async handing to
546         sim_events_process.  Move timer decrement so that it occures after
547         events have been processed.
548         
549         * sim-basics.h (struct _engine): Remove declaration.
550
551         * sim-events.h, sim-events.c: Rename type to sim_events.  Prefix
552         everything with same.  Rename global struct to SIM_DESC.
553         * sim-core.h, sim-core.c, sim-n-core.c: Ditto for sim_core.
554         * sim-io.h, sim-io.c: Ditto.
555         
556         * sim-assert.h: New file. Optional assertion checking macros.
557         * sim-io.c (sim_io_error): Make just this function tolerant to
558         null pointers.
559         
560         * sim-xcat.h: New file. Define concatenate macros.
561         * sim-basics.h (XCONCAT*): Move to sim-xcat.h.
562         * sim-n-core.h, sim-n-bits.h, sim-n-endian.h: Explicitly include
563         concat macros.
564         
565
566 Tue Mar 18 12:44:55 1997  Andrew Cagney  <cagney@kremvax.cygnus.com>
567
568         * sim-bits.h (LSMASK): New macro. Create mask of LS bits.
569
570 Mon Mar 17 18:10:05 1997  Andrew Cagney  <cagney@kremvax.cygnus.com>
571
572         * sim-inline.h: Add definitions for sim-types.
573         (ALL_BY_MODULE): New macro, encapsulate full inlining by the
574         module.
575
576 Mon Mar 17 15:38:27 1997  Andrew Cagney  <cagney@kremvax.cygnus.com>
577         
578         * sim-events.h: Remove defunct reference to callback struct.
579
580 Mon Mar 17 15:10:07 1997  Andrew Cagney  <cagney@kremvax.cygnus.com>
581
582         * configure: Re-generate.
583
584 Mon Mar 17 15:04:47 1997  Andrew Cagney  <cagney@kremvax.cygnus.com>
585
586         * Make-common.in (CSEARCH): Do not include the gdb directory in
587         the search path.
588
589 Mon Mar 17 13:16:26 1997  Andrew Cagney  <cagney@kremvax.cygnus.com>
590
591         * Make-common.in (SIM_ENDIAN, SIM_HOSTENDIAN, SIM_INLINE,
592         SIM_WARNING): Drop, requiring the simulator specific Makefile.in
593         to explicitly incorporate these.
594
595         * aclocal.m4 (--enable-sim-alignment); New option. Strongly
596         specify the alignment restrictions of the target architecture -
597         without this option all alignment restrictions are accomodated.
598         (--enable-sim-assert): New option.  Conditionally compile in
599         assertion statements.
600         (--enable-sim-float): New option. Strongly specify the target's
601         floating point support.
602         (--enable-sim-hardware): New option.  Specify the hardware devices
603         included in the simulation.
604         (--enable-sim-packages): New option.  Specify the hardware
605         packages included in the simulation.
606         (--enable-sim-regparm): New option.  Specify that parameters be
607         passed in registers instead of on the stack.
608         (--enable-sim-reserved-bits): New option. Specify that reserved
609         bits within an instruction are are correctly set.
610         (--enable-sim-smp): New option. Specify the level of SMP support
611         to be included in the simulator.
612         (--enable-sim-stdcall): New option.  Specify an alternative
613         function call convention.
614         (--enable-sim-xor-endian): New option.  Configure xor-endian
615         support used by some targets to implement bi-endian support.
616         
617 Fri Mar 14 19:51:21 1997  Andrew Cagney  <cagney@kremvax.cygnus.com>
618
619         * aclocal.m4 (--enable-sim-hostendian): New option.  Allow the
620         host endianness to be overridden.
621         (--enable-sim-endian): Allow the target platform's byte order
622         to be overridden.
623         (--enable-sim-inline): Control the inlining of common components.
624         (--enable-sim-bswap): For compatibility, also define WITH_BSWAP.
625         (--enable-sim-warnings): Enable additional GCC compiler checks.
626         * Make-common.in (SIM_ENDIAN, SIM_HOSTENDIAN, SIM_INLINE,
627         SIM_WARNINGS): Add.
628         
629         * sim-n-core.h, sim-n-bits.h, sim-n-endian.h: Rename from
630         sim-*-n.h so that the names are uniq on dos machines
631         * sim-core.c, sim-bits.c, sim-endian.c: Update.
632         
633 Thu Mar 13 12:32:42 1997  Doug Evans  <dje@canuck.cygnus.com>
634
635         * run.c: #include "libiberty.h".
636         (main): New locals sd,no_args,sim_argv.
637         Run buildargv on -a option.  Pass argv to sim_open, argv[0]
638         is program name.  Update call to sim_set_callbacks.
639         Record result of sim_open, pass to other sim_foo routines.
640
641 Thu Mar 13 10:24:05 1997  Michael Meissner  <meissner@cygnus.com>
642
643         * callback.c (os_printf_filtered): Do not call exit(1) or print a
644         final newline.
645
646 Thu Mar  6 15:50:28 1997  Andrew Cagney  <cagney@kremvax.cygnus.com>
647
648         * callback.c: Add os_flush_stdout and vprintf_filtered callbacks.
649         Route stdout through buffered IO.
650
651         * callback.c: Add os_flush_stderr, os_write_stderr,
652         os_evprintf_filtered functions to route error output through
653         stderr.
654         
655         * sim-io.h, sim-io.c (sim_io_flush_stderr, sim_io_flush_stdout):
656         Correct return type - should be void.
657
658 Fri Mar  7 20:14:37 1997  Andrew Cagney  <cagney@kremvax.cygnus.com>
659
660         * sim-basics.h: Clean up.  Many macro's moved to sim-inline.h.
661
662         * sim-config.h: Ditto.  For some options - eg WITH_DEVICES - do
663         not provide a default value as undefined indicates disable code.
664
665 Thu Mar  6 15:50:28 1997  Andrew Cagney  <cagney@kremvax.cygnus.com>
666
667         * sim-core.h, sim-core-n.h, sim-core.c: Borrow code from ppc
668         directory.
669         * sim-events.h, sim-events.c: Ditto.
670         * sim-io.h, sim-io.c: Ditto.
671         
672 Tue Mar  4 09:35:56 1997  Andrew Cagney  <cagney@kremvax.cygnus.com>
673         
674         * sim-alu.h (ALU_SUB_CA, ALU*_SUB_CA): New alu operation.
675
676         * sim-bits.h, sim-bits-n.h, sim-bits.c (LSMASKED*): New macro's
677         extract the tail or least signifiant bits from an integer of the
678         specified size.
679         
680         * sim-bits.h, sim-bits.c: Clean up conditionally compiled #if
681         WITH_TARGET_BITSIZE so that the compilation will fail when an
682         unsupported bitsize value is defined.
683
684         (INSERTED*): Convert to functions.
685         (EXTRACTED*): Ditto.
686         
687         (SIGN_EXTEND, SEXT): Change to more terse name.
688         
689 Tue Mar  4 09:35:56 1997  Andrew Cagney  <cagney@kremvax.cygnus.com>
690
691         * sim-inline.h: Allow explicit control over which .c files will be
692         included by their header.
693
694         * sim-inline.h: Allow explicit control over which .c files use the
695         alternative - REGPARM - parameter passing mechanism.
696         
697         * sim-inline.h, sim-inline.c: Don't attempt to include any of
698         icache.c, idecode.c, semantics.c or support.c.  Those names are
699         not generally applicable.
700         
701 Thu Feb 27 10:17:23 1997  Andrew Cagney  <cagney@kremvax.cygnus.com>
702
703         * sim-bits.c, sim-bits-n.h (new): Split sim-bits.c into two parts
704         in a fashion similar to sim-endian-n.
705
706         * sim-endian.h: (H_word, L_word, AL_*, VL_*): Extend to include
707         both value and address macro's.
708
709 Tue Feb 25 18:51:57 1997  Andrew Cagney  <cagney@kremvax.cygnus.com>
710
711         * sim-alu.h (ALU16_BEGIN, ALU16_SET, ...): Fill in.
712
713         * sim-endian.h (L_word, H_word): Replace MS2W_4, LS2W_4 with more
714         generic L_word, H_word macro's.
715
716 Thu Feb 20 18:36:55 1997  Andrew Cagney  <cagney@critters.cygnus.com>
717
718         * sim-basics.h: Borrow code from ppc directory.
719         * sim-bits.c: Ditto.
720         * sim-bits.h: Ditto.
721         * sim-config.h: Ditto.
722         * sim-endian-n.h: Ditto.
723         * sim-endian.c: Ditto.
724         * sim-endian.h: Ditto.
725         * sim-inline.c: Ditto.
726         * sim-inline.h: Ditto.
727         * sim-types.h: Ditto.
728
729 Wed Feb 19 12:40:50 1997  Andrew Cagney  <cagney@critters.cygnus.com>
730
731         * sim-alu.h (ALU_SET16, ALU_SET32, ALU_SET64, etc): Make available
732         all the ALU size alternatives and then auto-configure a default.
733         
734         * sim-alu.h: Copy ppc/idecode_expression.h.
735
736 Mon Feb 17 10:44:18 1997  Andrew Cagney  <cagney@critters.cygnus.com>
737
738         * bits.h, bits.c (SIGN_EXTEND32, SIGN_EXTEND64): New functions,
739         sign extend a bit within a value.
740
741         * sim-endian.h, sim-endian-n.h (offset_N): New functions - return
742         a pointer into the middle of a host word.
743         * sim-endian.h (MS2W_4, LS2W_4): Use this function.
744         
745 Tue Feb 11 13:46:49 1997  Michael Meissner  <meissner@tiktok.cygnus.com>
746
747         * callback.c: If HAVE_CONFIG_H is defined, include config.h from
748         autoconf.  If HAVE_UNISTD_H is defined, include unistd.h to get
749         appropriate definitions of read, write, etc.  Add prototype for
750         system.
751
752 Tue Feb  4 13:24:44 1997  Doug Evans  <dje@canuck.cygnus.com>
753
754         * Makefile.in (libcommon.a): Delete.
755         (callback.o,targ-map.o): Delete, moved to Make-common.in.
756         (gentmap,targ-vals.h,targ-map.c): Likewise.
757         (run-autoconf): Delete.
758         * aclocal.m4 (SIM_AC_OUTPUT): Redo creation of Makefile.
759         (common makefile fragment): Moved back into ...
760         * Make-common.in: Resurrect.
761         * configure.in (AC_LINK_FILES): Delete, unnecessary now.
762         * configure: Regenerated.
763
764 Fri Jan 31 07:16:49 1997  Doug Evans  <dje@canuck.cygnus.com>
765
766         * aclocal.m4 (SIM_AC_COMMON): Move COMMON_MAKEFILE_FRAG from here.
767         (SIM_AC_OUTPUT): To here.
768
769 Fri Jan 24 10:37:17 1997  Stu Grossman  (grossman@critters.cygnus.com)
770
771         * aclocal.m4 (COMMON_MAKEFILE_FRAG):  Quote a couple of $'s in
772         comments and single quotes.  Fixes a problem found on hpux.
773
774 Thu Jan 23 13:35:03 1997  Stu Grossman  (grossman@critters.cygnus.com)
775
776         * aclocal.m4:  Remove Make-common.in from dependencies.
777         * (distclean):  Remove targ-vals.def.
778
779         * aclocal.m4 (SIM_AC_COMMON):  Move contents of Make-common.in
780         into here.  Makes insertion into makefiles easier.  Also, change
781         the way that callback.o, gentmap, targ-vals.h, targ-map.c,
782         targ-map.o, and run are built.  They are now built in the
783         individual simulator directories, taking sources from ../common as
784         necessary.  This replaces the merging of libcommon.a into
785         linsim.a, which was problematic for the WinGDB build process.
786         * run.c:  Include config.h from . instead of ../common.
787         * Make-common.in:  Remove.  It's no longer necessary.
788
789 Mon Dec 16 15:02:33 1996  Ian Lance Taylor  <ian@cygnus.com>
790
791         * Make-common.in (ALL_CLAGS): Put CFLAGS at the end.
792         (.c.o): Put $(ALL_CFLAGS) before the file being compiled.
793
794 Wed Dec 11 11:30:58 1996  Jim Wilson  <wilson@cygnus.com>
795
796         * run.c (main): Set target_byte_order before call to sim_open.
797
798 Sun Dec  8 18:22:06 1996  Doug Evans  <dje@canuck.cygnus.com>
799
800         * callback.c: #include <stdlib.h>
801         (os_error): New function.
802         (default_callback): Add os_error.
803
804 Mon Nov 25 19:44:35 1996  Doug Evans  <dje@canuck.cygnus.com>
805
806         * Make-common.in (Makefile): Set CONFIG_HEADERS="".
807         * aclocal.m4: Mark the fact that --enable-sim-bswap isn't host
808         specific.
809         (SIM_AC_OUTPUT): Don't build Makefile if CONFIG_FILES="".
810
811 Wed Nov 20 01:11:04 1996  Doug Evans  <dje@canuck.cygnus.com>
812
813         * run.c: #include ../common/config.h, tconfig.h.
814         (myname): New static global.
815         (main): Recognize new options -a, -c.  Also recognize -h if h8/300.
816         Only process -c ifdef SIM_HAVE_SIMCACHE.
817         Only process -p/-s ifdef SIM_HAVE_PROFILE.
818         Parse program name from argv[0] and use in error messages.
819         Pass sim_args to sim_open.  Pass prog_args to sim_create_inferior.
820         Add support for incomplete h8/300 termination indicators.
821         (usage): Make more verbose.
822         * aclocal.m4,config.in,tconfig.in,configure.in,configure: New files.
823         * Makefile.in,Make-common.in,callback.c: New files.
824         * nltvals.def,gentmap.c,gentvals.sh: New files.
825
826 Tue Nov 12 13:34:00 1996  Dawn Perchik  <dawn@cygnus.com>   
827
828         * run.c: Include stdarg.h if __STDC__.
829
830 Tue Oct 15 11:16:31 1996  Jeffrey A Law  (law@cygnus.com)
831
832         * run.c (main): Don't print out anything if the signal
833         number is zero (ie no signal).
834
835 Tue Oct 15 11:20:44 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
836
837         * run.c (main): Print out if the program raised a signal.
838
839 Wed Sep 18 09:52:14 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
840
841         * run.c (exec_bfd): Rename from sim_bfd, to use the gdb name.
842         (main): Ditto.
843
844 Tue Sep 17 11:04:50 1996  James G. Smith  <jsmith@cygnus.co.uk>
845
846         * run.c (main): Explicitly cast malloc() parameter.
847
848 Thu Sep 12 11:27:21 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
849
850         * run.c (sim_bfd): New global to hold the bfd pointer for the
851         executable.
852         (main): Initialize sim_bfd.
853
854 Fri Dec 15 16:27:49 1995  Ian Lance Taylor  <ian@cygnus.com>
855
856         * run.c (main): Use new bfd_big_endian macro.
857
858 Wed Nov  8 15:49:49 1995  James G. Smith  <jsmith@pasanda.cygnus.co.uk>
859
860         * run.c (main): Removed SH specific comments, so source is
861         generic. Also updated to only load relevant sections. Moved
862         sim_open() to after callback attach (to match GDB).
863
864         * run.1: Removed SH specific comments.
865
866 Sat Oct 21 12:31:01 1995  Jim Wilson  <wilson@chestnut.cygnus.com>
867
868         * run.c (main): Always return sigrc at end.
869
870 Tue Oct 10 12:03:13 1995  J.T. Conklin  <jtc@rtl.cygnus.com>
871
872         * run.c (main): Print error diagnostic and exit if bfd_openr() or
873         bfd_check_format() fails.
874
875 Thu Sep 28 15:40:36 1995  steve chamberlain  <sac@slash.cygnus.com>
876
877         * run.c, run.1: From sh directory.
878
879