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