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