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