sim: cgen: add MUL2OFSI and MUL1OFSI functions (needed for OR1K l.mul[u])
[external/binutils.git] / sim / common / ChangeLog
1 2017-12-12  Peter Gavin  <pgavin@gmail.com>
2             Stafford Horne  <shorne@gmail.com>
3
4         * cgen-ops.h (MUL2OFSI): New function, 2's complement overflow
5         flag.
6         (MUL1OFSI): New function, 1's complement overflow flag.
7
8 2017-12-12  Peter Gavin  <pgavin@gmail.com>
9             Stafford Horne <shorne@gmail.com>
10
11         * cgen-accfp.c (remsf, remdf): New function.
12         (cgen_init_accurate_fpu): Add remsf and remdf.
13         * cgen-fpu.h (cgen_fp_ops): Add remsf, remdf, remxf and remtf.
14         * sim-fpu.c (sim_fpu_rem): New function.
15         * sim-fpu.h (sim_fpu_status_invalid_irx): New enum.
16         (sim_fpu_rem): New function.
17         (sim_fpu_print_status): Add case for sim_fpu_status_invalid_irx.
18
19 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
20
21         * acinclude.m4 (SIM_AC_COMMON): Honor existing CC_FOR_BUILD in
22         environment.
23
24 2017-05-24  Yao Qi  <yao.qi@linaro.org>
25
26         * sim-trace.c (trace_disasm): Caller update.
27
28 2016-08-15  Mike Frysinger  <vapier@gentoo.org>
29
30         * sim-base.h (sim_state_base): Add prog_syms_count.
31         (STATE_PROG_SYMS_COUNT): Define.
32         * sim-trace.c (trace_uninstall): Free STATE_PROG_SYMS memory.
33         (trace_load_symbols): New function.
34         (trace_sym_value): Likewise.
35         (trace_prefix): Change STATE_CPU(cpu) to sd.  Replace symbol
36         loading logic with a call to trace_load_symbols.
37         * sim-trace.h (trace_load_symbols, trace_sym_value): New
38         prototypes.
39
40 2016-08-13  Mike Frysinger  <vapier@gentoo.org>
41
42         * cgen-types.h (mode_names): Mark const.
43         * cgen-utils.c (mode_names): Likewise.
44
45 2016-08-13  Mike Frysinger  <vapier@gentoo.org>
46
47         * cgen-defs.h (struct cgen_state): Delete argv and envp.
48         (STATE_ARGV, STATE_ENVP): Delete.
49
50 2016-02-04  Nick Clifton  <nickc@redhat.com>
51
52         * cgen-scache.c (scache_option_handler): Prevent possible
53         undefined behaviour computing the size of the scache by using
54         unsigned integers instead of signed integers.
55
56 2016-01-17  Joel Brobecker  <brobecker@adacore.com>
57
58         * sim-fpu.c: Minor comment fixes throughout.
59
60 2016-01-17  Joel Brobecker  <brobecker@adacore.com>
61
62         * sim-fpu.c (print_bits): Minor reformatting (no code change).
63         (sim_fpu_map): Likewise.
64
65 2016-01-11  Mike Frysinger  <vapier@gentoo.org>
66
67         * sim-config.c (print_sim_config): Drop extra whitespace before =
68         in output for byte order, stdio, and msb settings.
69
70 2016-01-10  Mike Frysinger  <vapier@gentoo.org>
71
72         * acinclude.m4 (SIM_AC_COMMON): Call AC_MSG_CHECKING,
73         AC_DEFINE_UNQUOTED, and AC_MSG_RESULT for sim-debug.  Likewise for
74         sim-stdio, sim-trace, and sim-profile.
75         (SIM_AC_OPTION_ENVIRONMENT): Likewise.
76         (SIM_AC_OPTION_ASSERT): Likewise.
77         (SIM_AC_OPTION_SMP): Likewise.
78         (SIM_AC_OPTION_XOR_ENDIAN): Likewise.
79         * configure: Regenerate.
80         * Make-common.in (SIM_DEBUG, SIM_TRACE, SIM_PROFILE, SIM_ASSERT,
81         SIM_ENVIRONMENT, SIM_SMP, SIM_XOR_ENDIAN): Delete.
82         (CONFIG_CFLAGS): Delete $(SIM_DEBUG), $(SIM_TRACE), $(SIM_PROFILE),
83         $(SIM_ASSERT), $(SIM_ENVIRONMENT), $(SIM_SMP), and $(SIM_XOR_ENDIAN).
84         * sim-config.c (sim_config): Change DEFAULT_ENVIRONMENT to
85         WITH_ENVIRONMENT & USER_ENVIRONMENT.
86         * sim-config.h (SIM_HAVE_ENVIRONMENT, WITH_ENVIRONMENT,
87         DEFAULT_ENVIRONMENT, WITH_DEBUG, WITH_TRACE, WITH_PROFILE,
88         WITH_ASSERT, WITH_STDIO): Delete.
89         * sim-options.c (standard_options): Delete SIM_HAVE_ENVIRONMENT
90         check.
91
92 2016-01-10  Mike Frysinger  <vapier@gentoo.org>
93
94         * acinclude.m4 (SIM_AC_OPTION_PACKAGES): Delete.
95         * configure: Regenerate.
96         * Make-common.in (SIM_PACKAGES): Delete.
97         (CONFIG_CFLAGS): Delete $(SIM_PACKAGES).
98
99 2016-01-10  Mike Frysinger  <vapier@gentoo.org>
100
101         * acinclude.m4 (SIM_AC_COMMON): Call SIM_AC_OPTION_ENVIRONMENT.
102
103 2016-01-10  Mike Frysinger  <vapier@gentoo.org>
104
105         * acinclude.m4 (SIM_AC_COMMON): Call SIM_AC_OPTION_ASSERT.
106
107 2016-01-10  Mike Frysinger  <vapier@gentoo.org>
108
109         * acinclude.m4 (SIM_AC_COMMON): Delete sim_link_files and
110         sim_link_links.
111         (SIM_AC_OUTPUT): Delete AC_LINK_FILES call.
112         * gentmap.c: Change targ-vals.def include to nltvals.def.
113         * Make-common.in (gentmap): Change targ-vals.def to
114         $(srccom)/nltvals.def.
115         (distclean): Delete rm -f targ-vals.def.
116         * Makefile.in: Update comment.
117
118 2016-01-10  Mike Frysinger  <vapier@gentoo.org>
119
120         * acinclude.m4 (SIM_AC_COMMON): Call SIM_AC_OPTION_INLINE.
121         (SIM_AC_OPTION_INLINE): Rename default_sim_inline to sim_inline
122         and always set -DDEFAULT_INLINE.  Delete AC_ARG_ENABLE 4th arg.
123
124 2016-01-10  Mike Frysinger  <vapier@gentoo.org>
125
126         * acinclude.m4: Delete --enable-sim-regparm and sim_regparm,
127         and --enable-sim-stdcall and sim_stdcall.
128         * configure: Regenerate.
129         * Make-common.in (SIM_REGPARM, SIM_STDCALL): Delete.
130         (CONFIG_CFLAGS): Delete $(SIM_REGPARM) and $(SIM_STDCALL).
131         * sim-config.h (WITH_REGPARM, WITH_STDCALL): Delete.
132         * sim-inline.h (REGPARM_MODULE, REGPARM): Delete.
133         (REGPARM_*): Delete all regparm defines and their use.
134
135 2016-01-10  Mike Frysinger  <vapier@gentoo.org>
136
137         * acinclude.m4: Delete --enable-sim-cflags and sim_cflags.
138         * Make-common.in (SIM_CFLAGS): Delete.
139         (CONFIG_CFLAGS): Delete $(SIM_CFLAGS).
140         * Makefile.in: Likewise.
141
142 2016-01-09  Mike Frysinger  <vapier@gentoo.org>
143
144         * configure.ac: Change SIM_AC_COMMON to AC_PROG_CC.  Drop 2nd arg
145         to AC_OUTPUT.  Move AC_CHECK_HEADERS, AC_CHECK_FUNCS,
146         AC_CHECK_MEMBERS, and -AC_CHECK_TYPES ...
147         * acinclude.m4 (SIM_AC_COMMON): ... here.
148         * aclocal.m4, configure: Regenerate.
149         * config.in: Delete file.
150         * callback.c: Change cconfig.h include to config.h.
151         * dv-cfi.c, nrun.c, sim-basics.h, sim-load.c, sim-memopt.c,
152         syscall.c: Likewise.
153         * Make-common.in (sim-basics_h): Delete ../common/cconfig.h.
154         * Makefile.in (distclean): Delete rm -f cconfig.h config.h stamp-h.
155
156 2016-01-06  Mike Frysinger  <vapier@gentoo.org>
157
158         * sim-config.c (print_sim_config): Delete sim_io_printf of version,
159         date, and time information.
160
161 2016-01-06  Mike Frysinger  <vapier@gentoo.org>
162
163         * sim-options.c (sim_parse_args): Mark argv array const.
164         * sim-options.h (sim_parse_args): Likewise.
165
166 2016-01-05  Mike Frysinger  <vapier@gentoo.org>
167
168         * sim-trace.c: Include dis-asm.h.
169         (OPTION_TRACE_DISASM): New enum.
170         (trace_options): Add trace-disasm flag.
171         (trace_option_handler): Handle OPTION_TRACE_DISASM.
172         (trace_idx_to_str): Handle TRACE_DISASM_IDX.
173         (dis_read, dis_printf, trace_disasm): New functions.
174         * sim-trace.h: Include dis-asm.h.
175         (TRACE_INSN_IDX): Clarify comment.
176         (TRACE_DISASM_IDX): New enum.
177         (TRACE_disasm): New define.
178         (WITH_TRACE_DISASM_P): New define.
179         (struct _trace_data): Add dis_bfd, disassembler, and dis_info.
180         (STRACE_DISASM_P): New define.
181         (TRACE_DISASM_P): Likewise.
182         (TRACE_DISASM_P): Likewise.
183         (TRACE_DISASM): Likewise.
184         (trace_disasm): New function.
185
186 2016-01-04  Mike Frysinger  <vapier@gentoo.org>
187
188         * sim-utils.c (sim_state_free): Change to STATE_MAGIC.
189
190 2016-01-04  Mike Frysinger  <vapier@gentoo.org>
191
192         * cgen-scache.c (MAX): Delete.
193         (scache_init): Change MAX to max.
194         * cgen-trace.c (min): Delete.
195         * cgen-utils.c (min): Delete.
196         * sim-basics.h [!min] (min): Define.
197         [!max] (max): Define.
198
199 2016-01-04  Mike Frysinger  <vapier@gentoo.org>
200
201         * sim-options.c (sim_parse_args): Tweak getopt error message.
202
203 2016-01-04  Mike Frysinger  <vapier@gentoo.org>
204
205         * acinclude.m4 (sim-bswap): Delete.
206         * configure: Regenerate.
207         * Make-common.in (SIM_BSWAP): Delete.
208         (CONFIG_CFLAGS): Delete $(SIM_BSWAP).
209         * sim-config.h (htonl, ntohl): Delete.
210         (WITH_BSWAP): Delete.
211
212 2016-01-03  Mike Frysinger  <vapier@gentoo.org>
213
214         * sim-options.c (sim_parse_args): Declare local save_opterr.  Save
215         opterr state to it before calling getopt_long and restore afterwards.
216         Set opterr to 0.  When optc is '?', call sim_io_eprintf.
217
218 2016-01-03  Mike Frysinger  <vapier@gentoo.org>
219
220         * hw-device.h (device): Delete commented typedef.
221         * sim-basics.h (device): Delete typedef.
222
223 2016-01-03  Mike Frysinger  <vapier@gentoo.org>
224
225         * sim-options.c (sim_parse_args): Replace for loop with a call
226         to countargv.
227
228 2016-01-03  Mike Frysinger  <vapier@gentoo.org>
229
230         * nrun.c (myname): Mark const.
231         (main): Mark name const.  Replace myname parsing loop with a
232         call to lbasename.
233
234 2016-01-03  Mike Frysinger  <vapier@gentoo.org>
235
236         (CONFIG_CFLAGS): Delte $(SIM_HOSTENDIAN).
237         * acinclude.m4 (SIM_AC_COMMON): Call AC_C_BIGENDIAN.
238         (SIM_AC_OPTION_HOSTENDIAN): Delete.
239         * config.in, configure: Regenerate.
240         * Make-common.in (SIM_HOSTENDIAN): Delete.
241         * sim-config.c (current_host_byte_order): Delete.
242         (sim_config): Delete current_host_byte_order assignments and
243         CURRENT_HOST_BYTE_ORDER checks.
244         (print_sim_config): Change WITH_HOST_BYTE_ORDER to HOST_BYTE_ORDER.
245         * sim-config.h (WITH_HOST_BYTE_ORDER): Change to ...
246         (HOST_BYTE_ORDER): ... this.  Define based on WORDS_BIGENDIAN.
247         (current_host_byte_order): Delete.
248         (CURRENT_HOST_BYTE_ORDER): Likewise.
249         * sim-endian.c (WITH_HOST_BYTE_ORDER): Rename to ...
250         (HOST_BYTE_ORDER): ... this.
251         (sim_endian_split_16): Change WITH_HOST_BYTE_ORDER to
252         HOST_BYTE_ORDER.
253         (sim_endian_join_16): Likewise.
254         * sim-n-core.h (sim_core_read_misaligned_N): Change
255         CURRENT_HOST_BYTE_ORDER to HOST_BYTE_ORDER.
256         (sim_core_write_misaligned_N): Likewise.
257         * sim-n-endian.h (endian_t2h_N): Likewise.
258         (endian_h2t_N, endian_h2be_N, endian_be2h_N, endian_h2le_N,
259         endian_le2h_N): Likewise.
260         (offset_N): Change WITH_HOST_BYTE_ORDER to HOST_BYTE_ORDER.
261
262 2016-01-02  Mike Frysinger  <vapier@gentoo.org>
263
264         * acinclude.m4 (SIM_AC_OPTION_ENDIAN): Change BIG_ENDIAN to
265         BFD_ENDIAN_BIG, LITTLE_ENDIAN to BFD_ENDIAN_LITTLE, and 0 to
266         BFD_ENDIAN_UNKNOWN.
267         (SIM_AC_OPTION_HOSTENDIAN): Likewise.
268         * cgen-ops.h (SUBWORDXFSI): Change BIG_ENDIAN to BFD_ENDIAN_BIG.
269         (SUBWORDTFSI, JOINSIDF, JOINSIXF, JOINSITF): Likewise.
270         * nrun.c (main): Likewise.
271         * sim-config.c (current_host_byte_order): Change type to enum
272         bfd_endian.  Initialize to BFD_ENDIAN_UNKNOWN.
273         (current_target_byte_order): Likewise.
274         (config_byte_order_to_a): Likewise.  Change BIG_ENDIAN to
275         BFD_ENDIAN_BIG, LITTLE_ENDIAN to BFD_ENDIAN_LITTLE, and 0 to
276         BFD_ENDIAN_UNKNOWN.
277         (sim_config): Change prefered_target_byte_order type to enum
278         bfd_endian.  Change BIG_ENDIAN to BFD_ENDIAN_BIG, LITTLE_ENDIAN
279         to BFD_ENDIAN_LITTLE, and 0 to BFD_ENDIAN_UNKNOWN.
280         * sim-config.h: Change BIG_ENDIAN to BFD_ENDIAN_BIG, LITTLE_ENDIAN
281         to BFD_ENDIAN_LITTLE, and 0 to BFD_ENDIAN_UNKNOWN.
282         Delete all the various arch/OS endian includes & defines.
283         (current_host_byte_order): Change type to enum bfd_endian.
284         (current_target_byte_order): Likewise.
285         (CURRENT_HOST_BYTE_ORDER): Compare to BFD_ENDIAN_UNKNOWN, not 0.
286         (CURRENT_TARGET_BYTE_ORDER): Likewise.
287         * sim-endian.c: Change LITTLE_ENDIAN to BFD_ENDIAN_LITTLE.
288         * sim-events.c (sim_events_watch_sim): Change BIG_ENDIAN to
289         BFD_ENDIAN_BIG, LITTLE_ENDIAN to BFD_ENDIAN_LITTLE, and 0 to
290         BFD_ENDIAN_UNKNOWN.
291         (sim_events_watch_core): Likewise.
292         * sim-events.h: Likewise.
293         * sim-n-core.h (sim_core_read_misaligned_N): Change BIG_ENDIAN to
294         BFD_ENDIAN_BIG.
295         (sim_core_write_misaligned_N): Likewise.
296         * sim-n-endian.h (endian_h2be_N): Likewise.
297         (endian_be2h_N): Likewise.
298         (endian_h2le_N): Change LITTLE_ENDIAN to BFD_ENDIAN_LITTLE.
299         (offset_N): Likewise.
300         * sim-options.c (standard_option_handler): Change LITTLE_ENDIAN to
301         BFD_ENDIAN_LITTLE and BIG_ENDIAN to BFD_ENDIAN_BIG.
302
303 2016-01-02  Mike Frysinger  <vapier@gentoo.org>
304
305         * cgen-defs.h (current_state): Delete.
306         * sim-base.h (CURRENT_STATE_REG, CURRENT_STATE): Delete.
307         * sim-utils.c (current_state): Delete.
308
309 2015-12-30  Mike Frysinger  <vapier@gentoo.org>
310
311         * sim-module.c (sim_pre_argv_init): Change STATE_MY_NAME assignment
312         to use lbasename.
313
314 2015-12-27  Mike Frysinger  <vapier@gentoo.org>
315
316         * Makefile.in (SIM_NEW_COMMON_OBJS): Add sim-hload.o.
317
318 2015-12-26  Mike Frysinger  <vapier@gentoo.org>
319
320         * acinclude.m4 (AH_BOTTOM): Delete tconfig.h appending.
321         * config.in, configure: Regenerate.
322         * Make-common.in (sim-basics_h): Delete tconfig.h.
323         (distclean): Likewise.
324         * sim-core.c (device_io_read_buffer, device_io_write_buffer): Delete.
325         (new_sim_core_mapping): Delete WITH_HW and device *device.
326         (sim_core_map_attach, sim_core_attach): Likewise.
327         (sim_core_read_buffer): Delete WITH_DEVICES logic.
328         (sim_core_write_buffer): Likewise.
329         * sim-core.h (struct _sim_core_mapping): Delete WITH_HW and device
330         *device.
331         (sim_core_attach): Likewise.
332         (device_io_read_buffer, device_io_write_buffer): Delete.
333         * sim-n-core.h (sim_core_read_aligned_N): Delete WITH_DEVICES logic.
334         (sim_core_write_aligned_N): Likewise.
335         * tconfig.h: Delete file.
336
337 2015-12-26  Mike Frysinger  <vapier@gentoo.org>
338
339         * sim-core.c (sim_core_read_buffer): Move cia decl to top of func.
340         Call sim_cpu_hw_io_read_buffer if cpu is valid.
341         (sim_core_write_buffer): Move cia decl to top of func.  Call
342         sim_cpu_hw_io_write_buffer if cpu is valid.
343
344 2015-12-25  Mike Frysinger  <vapier@gentoo.org>
345
346         * hw-properties.c (hw_find_ihandle_runtime_property): Delete
347         HW_TRACE call.
348         (hw_find_integer_property): Likewise.
349         (hw_find_integer_array_property): Likewise.
350         (hw_add_duplicate_property): Likewise.
351
352 2015-12-25  Mike Frysinger  <vapier@gentoo.org>
353
354         * sim-config.h (WITH_ENGINE): Delete.
355         * sim-module.c (modules): Always include sim_engine_install.
356
357 2015-12-25  Mike Frysinger  <vapier@gentoo.org>
358
359         * Make-common.in (SIM_NEW_COMMON_OBJS): Add sim-model.o.
360         * cgen-types.h (SIM_HAVE_MODEL): Delete.
361         * sim-base.h: Always include sim-model.h.
362         * sim-config.h (WITH_DEFAULT_MODEL): Delete.
363         * sim-cpu.h (sim_cpu_base): Always declare mach/model members.
364         * sim-model.c (sim_model_init): Return when !WITH_MODEL_P.
365         [!WITH_MODEL_P] (sim_machs): Define.
366         * sim-model.h: Add some developer docs.
367         [!WITH_DEFAULT_MODEL] (mach_attr, WITH_DEFAULT_MODEL): Define.
368         (WITH_MODEL_P): Define.
369         * sim-module.c (modules): Always include sim_model_install.
370         * sim-profile.h (WITH_PROFILE_MODEL_P): Delete.
371
372 2015-12-25  Mike Frysinger  <vapier@gentoo.org>
373
374         * sim-cpu.h: Rename MACH to SIM_MACH and MODEL to SIM_MODEL.
375         * sim-model.c: Likewise.
376         * sim-model.h: Likewise.  Rename MACH_IMP_PROPERTIES to
377         SIM_MACH_IMP_PROPERTIES
378
379 2015-12-25  Mike Frysinger  <vapier@gentoo.org>
380
381         * sim-core.c (device_error): Delete.
382         (sim_core_map_attach): Delete calls to device_error.
383         (sim_core_attach): Likewise.
384         * sim-core.h (device_error): Delete.
385         * sim-n-core.h (sim_core_read_aligned_N): Change device_error call
386         to sim_engine_abort.
387         (sim_core_write_aligned_N): Likewise.
388
389 2015-12-25  Mike Frysinger  <vapier@gentoo.org>
390
391         * sim-config.h (WITH_CALLBACK_MEMORY): Delete.
392         * sim-core.c (sim_core_write_buffer): Likewise.
393         * sim-n-core.h (sim_core_read_aligned_N): Likewise.
394         (sim_core_write_aligned_N): Likewise.
395
396 2015-12-25  Mike Frysinger  <vapier@gentoo.org>
397
398         * dv-pal.c: Include config.h and sim-main.h.
399         (hw_pal_io_read_buffer): Always call CPU_INDEX.
400
401 2015-12-24  Mike Frysinger  <vapier@gentoo.org>
402
403         * sim-options.c (standard_options): Always enable load-lma and
404         load-vma options.
405         (standard_install): Always set STATE_LOAD_AT_LMA_P(sd) to 1.
406
407 2015-12-24  Mike Frysinger  <vapier@gentoo.org>
408
409         * sim-module.c (MODULE_LIST): Delete.
410
411 2015-12-24  Mike Frysinger  <vapier@gentoo.org>
412
413         * sim-options.c (OPTION_H8300H, OPTION_H8300S, OPTION_H8300SX):
414         Move to h8300/compile.c.
415         [SIM_H8300] (standard_options): Likewise.
416         (standard_option_handler): Likewise.
417
418 2015-12-24  Mike Frysinger  <vapier@gentoo.org>
419
420         * sim-module.c [WITH_WATCHPOINTS] (modules): Always call
421         sim_watchpoint_install.
422
423 2015-12-24  Mike Frysinger  <vapier@gentoo.org>
424
425         * sim-base.h [SIM_HAVE_FLATMEM] (sim_state_base): Delete flatmem code.
426         * sim-module.c [SIM_HAVE_FLATMEM] (modules): Always call
427         sim_memopt_install.
428         * sim-options.c (OPTION_MEM_SIZE): Delete.
429         [SIM_HAVE_FLATMEM] (standard_options): Delete flatmem code.
430         (standard_option_handler): Likewise.
431
432 2015-12-24  Mike Frysinger  <vapier@gentoo.org>
433
434         * tconfig.h (SIM_HAVE_SIMCACHE): Delete.
435
436 2015-11-21  Mike Frysinger  <vapier@gentoo.org>
437
438         PR sim/18762
439         * Makefile.in (CPPFLAGS, CXXFLAGS, LDFLAGS): Define.
440
441 2015-11-21  Mike Frysinger  <vapier@gentoo.org>
442
443         PR sim/19273
444         * sim-utils.c (sim_do_commandf): Declare ret.  Call va_start,
445         vasprintf, and va_end together.  Check ret after va_end call.
446
447 2015-11-21  Mike Frysinger  <vapier@gentoo.org>
448
449         * sim-types.h (SIM_PRI_TB): Define.
450         (PRI_TW, PRIiTW, PRIxTW): New PRI target word defines.
451         (PRI_TA, PRIiTA, PRIxTA): New PRI target address defines.
452         (PRI_TC, PRIiTC, PRIxTC): New PRI target cell defines.
453         (PRI_TF, PRIiTF, PRIxTF): New PRI target floating point defines.
454
455 2015-11-17  Mike Frysinger  <vapier@gentoo.org>
456
457         * sim-main.h (WITH_MODULO_MEMORY): Delete.
458         * sim-core.c (new_sim_core_mapping): Always assign mask to modulo-1.
459         (sim_core_attach): Delete WITH_MODULO_MEMORY == 0 logic.
460         (sim_core_translate): Likewise.
461         * sim-core.h: Delete mention of WITH_MODULO_MEMORY.
462
463 2015-11-16  Mike Frysinger  <vapier@gentoo.org>
464
465         * sim-close.c (__cgen_cpu_close, _cgen_cpu_close): Delete.
466         (cgen_cpu_close): Change to XCONCAT2.
467
468 2015-11-15  Mike Frysinger  <vapier@gentoo.org>
469
470         * Make-common.in (SIM_NEW_COMMON_OBJS): Add sim-reason.o, sim-reg.o,
471         and sim-stop.o.
472
473 2015-11-14  Mike Frysinger  <vapier@gentoo.org>
474
475         * Make-common.in (SIM_NEW_COMMON_OBJS): Add sim-close.o
476         * sim-close.c: New file.
477
478 2015-09-25  Andrew Bennett  <andrew.bennett@imgtec.com>
479             Ali Lown  <ali.lown@imgtec.com>
480
481         * sim-bits.h (EXTEND6): New macro.
482         (EXTEND12): New macro.
483         (EXTEND25): New macro.
484
485 2015-06-24  Mike Frysinger  <vapier@gentoo.org>
486
487         * sim-trace.c (trace_one_insn): Delete.
488         * sim-trace.h (trace_one_insn): Delete.
489
490 2015-06-24  Mike Frysinger  <vapier@gentoo.org>
491
492         * sim-trace.c (debug_printf): Rename to ...
493         (sim_debug_printf): ... this.
494         * sim-trace.h (debug_printf): Delete define.
495         (debug_printf): Rename to ...
496         (sim_debug_printf): ... this.
497
498 2015-06-24  Mike Frysinger  <vapier@gentoo.org>
499
500         * sim-trace.c (OPTION_TRACE_REGISTER): New enum.
501         (trace_options): Add trace-register option.
502         (trace_option_handler): Handle OPTION_TRACE_REGISTER case.
503         (trace_idx_to_str): Handle TRACE_REGISTER_IDX case and re-indent.
504         * sim-trace.h (TRACE_REGISTER_IDX): New enum.
505         (TRACE_register, WITH_TRACE_REGISTER_P, STRACE_REGISTER_P,
506         TRACE_REGISTER_P, TRACE_REGISTER): Define.
507
508 2015-06-24  Mike Frysinger  <vapier@gentoo.org>
509
510         * sim-trace.h (STRACE, STRACE_INSN, STRACE_DECODE, STRACE_EXTRACT,
511         STRACE_LINENUM, STRACE_MEMORY, STRACE_MODEL, STRACE_ALU, STRACE_CORE,
512         STRACE_EVENTS, STRACE_FPU, STRACE_VPU, STRACE_BRANCH, STRACE_SYSCALL,
513         STRACE_DEBUG): Define.
514
515 2015-06-24  Mike Frysinger  <vapier@gentoo.org>
516
517         * sim-trace.c (trace_options): Update help text for trace-alu,
518         trace-fpu, trace-vpu, and trace-semantics.
519         * sim-trace.h (TRACE_ALU_IDX): Update comment text.
520         (TRACE_FPU_IDX, TRACE_VPU_IDX): Likewise.
521
522 2015-06-24  Mike Frysinger  <vapier@gentoo.org>
523
524         * sim-assert.h (SIM_FILTER_PATH): Delete.
525         [!SIM_ASSERT, WITH_ASSERT]: Include libiberty.h.
526         (SIM_ASSERT): Replace SIM_FILTER_PATH with lbasename.
527         [!ASSERT, WITH_ASSERT]: Include libiberty.h.
528         (ASSERT): Replace SIM_FILTER_PATH with lbasename.
529         * sim-events.c: Include libiberty.h.
530         (ETRACE): Replace SIM_FILTER_PATH with lbasename.
531
532 2015-06-23  Mike Frysinger  <vapier@gentoo.org>
533
534         * acinclude.m4 (AC_ARG_ENABLE(sim-bswap)): Call AS_HELP_STRING.
535         (AC_ARG_ENABLE(sim-cflags)): Likewise.
536         (AC_ARG_ENABLE(sim-debug)): Likewise.
537         (AC_ARG_ENABLE(sim-stdio)): Likewise.
538         (AC_ARG_ENABLE(sim-trace)): Likewise.
539         (AC_ARG_ENABLE(sim-profile)): Likewise.
540         (AC_ARG_ENABLE(sim-environment)): Likewise.
541         (AC_ARG_ENABLE(sim-alignment)): Likewise.
542         (AC_ARG_ENABLE(sim-assert)): Likewise.
543         (AC_ARG_ENABLE(sim-bitsize)): Likewise.
544         (AC_ARG_ENABLE(sim-endian)): Likewise.
545         (AC_ARG_ENABLE(sim-hostendian)): Likewise.
546         (AC_ARG_ENABLE(sim-float)): Likewise.
547         (AC_ARG_ENABLE(sim-scache)): Likewise.
548         (AC_ARG_ENABLE(sim-default-model)): Likewise.
549         (AC_ARG_ENABLE(sim-inline)): Likewise.
550         (AC_ARG_ENABLE(sim-packages)): Likewise.
551         (AC_ARG_ENABLE(sim-regparm)): Likewise.
552         (AC_ARG_ENABLE(sim-reserved-bits)): Likewise.
553         (AC_ARG_ENABLE(sim-smp)): Likewise.
554         (AC_ARG_ENABLE(sim-stdcall)): Likewise.
555         (AC_ARG_ENABLE(sim-xor-endian)): Likewise.
556         (AC_ARG_ENABLE(cgen-maint)): Likewise.
557         * configure: Regenerate.
558
559 2015-06-23  Mike Frysinger  <vapier@gentoo.org>
560
561         * sim-config.h (WITH_TRACE): Define to ~TRACE_debug.
562
563 2015-06-23  Mike Frysinger  <vapier@gentoo.org>
564
565         * cgen-trace.c [!__STDC__]: Delete.
566         * sim-trace.h [!__STDC__]: Likewise.
567
568 2015-06-21  Mike Frysinger  <vapier@gentoo.org>
569
570         * sim-model.c (sim_model_init): Assert model is not NULL.
571
572 2015-06-21  Mike Frysinger  <vapier@gentoo.org>
573
574         * sim-types.h: Move SIM_TYPES_H define to top of file.  Include
575         stdint.h.  Replace all signed/unsigned typedefs with int#_t and
576         uint#_t.
577
578 2015-06-21  Mike Frysinger  <vapier@gentoo.org>
579
580         * sim-alu.h (_SIM_ALU_H_): Rename to ...
581         (SIM_ALU_H): ... this.
582         * sim-assert.h (_SIM_ASSERT_H_): Rename to ...
583         (SIM_ASSERT_H): ... this.
584         * sim-basics.h (_SIM_BASICS_H_): Rename to ...
585         (SIM_BASICS_H): ... this.
586         * sim-bits.h (_SIM_BITS_H_): Rename to ...
587         (SIM_BITS_H): ... this.
588         * sim-endian.h (_SIM_ENDIAN_H_): Rename to ...
589         (SIM_ENDIAN_H): ... this.
590
591 2015-06-18  Mike Frysinger  <vapier@gentoo.org>
592
593         * sim-syscall.c (sim_syscall_multi): Change unknown_syscall to a
594         constant string.
595
596 2015-06-18  Mike Frysinger  <vapier@gentoo.org>
597
598         * callback.c (cb_target_map_entry, cb_host_map_entry): Change map to
599         m for sentinel testing.
600
601 2015-06-17  Mike Frysinger  <vapier@gentoo.org>
602
603         * sim-syscall.c: Include errno.h and targ-vals.h.
604         (sim_syscall_multi, sim_syscall): Define.
605         * sim-syscall.h (sim_syscall_multi, sim_syscall): Declare.
606         * syscall.c (cb_syscall): Extend comment.
607
608 2015-06-17  Mike Frysinger  <vapier@gentoo.org>
609
610         * Make-common.in (SIM_NEW_COMMON_OBJS): Add sim-syscall.o.
611         * sim-syscall.c: New file.
612         * sim-syscall.h: New file.
613
614 2015-06-17  Mike Frysinger  <vapier@gentoo.org>
615
616         * callback.c (cb_target_map_entry, cb_host_map_entry): Define.
617         (cb_target_to_host_syscall): Rewrite to use cb_target_map_entry.
618         (cb_host_to_target_errno): Rewrite to use cb_host_map_entry.
619         (cb_host_str_syscall, cb_host_str_errno, cb_host_str_signal,
620         cb_target_str_syscall, cb_target_str_errno, cb_target_str_signal):
621         Define.
622         * gentmap.c (gen_targ_map_c): Output name field.
623
624 2015-06-12  Mike Frysinger  <vapier@gentoo.org>
625
626         * acinclude.m4: Change configure.in to configure.ac.
627         * sim-config.h: Likewise.
628
629 2015-06-12  Mike Frysinger  <vapier@gentoo.org>
630
631         * acinclude.m4 (sim-trace): Delete -DTRACE flags.
632         * configure: Regenerate.
633
634 2015-06-12  Mike Frysinger  <vapier@gentoo.org>
635
636         * sim-trace.h (TRACE, TRACE_INSN, TRACE_DECODE, TRACE_EXTRACT,
637         TRACE_LINENUM, TRACE_MEMORY, TRACE_MODEL, TRACE_ALU, TRACE_CORE,
638         TRACE_EVENTS, TRACE_FPU, TRACE_VPU, TRACE_BRANCH, TRACE_SYSCALL,
639         TRACE_DEBUG): Define.
640
641 2015-06-12  Mike Frysinger  <vapier@gentoo.org>
642
643         * sim-module.c (modules): Change WITH_TRACE to WITH_TRACE_ANY_P.
644         * sim-trace.c (trace_option_handler): Likewise.
645         * sim-trace.h (WITH_TRACE_ANY_P): Define.
646         (STRACE_ANY_P): Use WITH_TRACE_ANY_P.
647         (TRACE_ANY_P): Likewise.
648
649 2015-06-12  Mike Frysinger  <vapier@gentoo.org>
650
651         * cgen-run.c (sim_resume): Rename TRACE_INSN_FINI to
652         CGEN_TRACE_INSN_FINI.
653         * cgen-trace.c: Rename trace_insn to cgen_trace_insn,
654         trace_result to cgen_trace_result, trace_insn_fini to
655         cgen_trace_insn_fini, trace_insn_init to cgen_trace_insn_init,
656         and trace_extract to cgen_trace_extract.
657         * cgen-trace.h (trace_insn_init): Rename to ...
658         (cgen_trace_insn_init): ... this.
659         (trace_insn_fini): Rename to ...
660         (cgen_trace_insn_fini): ... this.
661         (trace_insn): Rename to ...
662         (cgen_trace_insn): ... this.
663         (trace_extract): Rename to ...
664         (cgen_trace_extract): ... this.
665         (trace_result): Rename to ...
666         (cgen_trace_result): ... this.
667         (TRACE_RESULT_P): Rename to ...
668         (CGEN_TRACE_RESULT_P): ... this.
669         (TRACE_INSN_INIT): Rename to ...
670         (CGEN_TRACE_INSN_INIT): ... this.  Change trace_insn_init to
671         cgen_trace_insn_init.
672         (TRACE_INSN_FINI): Rename to ...
673         (CGEN_TRACE_INSN_FINI): ... this.  Change trace_insn_fini to
674         cgen_trace_insn_fini.
675         (TRACE_PRINTF): Rename to ...
676         (CGEN_TRACE_PRINTF): ... this.
677         (TRACE_INSN): Rename to ...
678         (CGEN_TRACE_INSN): ... this.  Change trace_insn to cgen_trace_insn.
679         (TRACE_EXTRACT): Rename to ...
680         (CGEN_TRACE_EXTRACT): ... this.  Change trace_extract to
681         cgen_trace_extract.
682         (TRACE_RESULT): Rename to ...
683         (CGEN_TRACE_RESULT): ... this.  Change TRACE_RESULT_P to
684         CGEN_TRACE_RESULT_P and trace_result to cgen_trace_result.
685         * genmloop.sh (@prefix@_pbb_before): Change TRACE_INSN_FINI to
686         CGEN_TRACE_INSN_FINI, TRACE_INSN_INIT to CGEN_TRACE_INSN_INIT, and
687         TRACE_INSN to CGEN_TRACE_INSN.
688         (@prefix@_pbb_after): Change TRACE_INSN_FINI to CGEN_TRACE_INSN_FINI.
689
690 2015-06-11  Mike Frysinger  <vapier@gentoo.org>
691
692         * sim-events.c (ETRACE_P): Delete.
693         (ETRACE): Change ETRACE_P to STRACE_EVENTS_P(sd).
694         (update_time_from_event, sim_events_schedule_vtracef): Likewise.
695         * sim-events.h (struct _sim_events): Delete trace member.
696         * sim-trace.c (set_trace_option_mask): Delete trace_nr check and
697         always set STATE_TRACE_FLAGS(sd)[trace_nr] element.
698
699 2015-06-11  Mike Frysinger  <vapier@gentoo.org>
700
701         * sim-trace.h (STRACE_ANY_P, STRACE_INSN_P, STRACE_DECODE_P,
702         STRACE_EXTRACT_P, STRACE_LINENUM_P, STRACE_MEMORY_P, STRACE_MODEL_P,
703         STRACE_ALU_P, STRACE_CORE_P, STRACE_EVENTS_P, STRACE_FPU_P,
704         STRACE_VPU_P, STRACE_BRANCH_P, STRACE_SYSCALL_P): Define.
705
706 2015-06-11  Mike Frysinger  <vapier@gentoo.org>
707
708         * sim-trace.h (TRACE_USEFUL_MASK): Change to TRACE_xxx defines.
709
710 2015-06-11  Mike Frysinger  <vapier@gentoo.org>
711
712         * sim-trace.h (WITH_TRACE_P): New define.
713         (WITH_TRACE_INSN_P, WITH_TRACE_DECODE_P, WITH_TRACE_EXTRACT_P,
714         WITH_TRACE_LINENUM_P, WITH_TRACE_MEMORY_P, WITH_TRACE_MODEL_P,
715         WITH_TRACE_ALU_P, WITH_TRACE_CORE_P, WITH_TRACE_EVENTS_P,
716         WITH_TRACE_FPU_P, WITH_TRACE_VPU_P, WITH_TRACE_BRANCH_P,
717         WITH_TRACE_SYSCALL_P, WITH_TRACE_DEBUG_P, STRACE_P, TRACE_P):
718         Redefine to use WITH_TRACE_P.
719
720 2015-06-09  Mike Stump  <mrs@mrs.kithrup.com>
721
722         * sim-events.c (sim_events_schedule_after_signal): Fix spelling
723         mistake in call to sim_engine_abort.
724
725 2015-04-29  Nick Clifton  <nickc@redhat.com>
726
727         PR 18273
728         * sim-fpu.c (INLINE_SIM_FPU): Fix static analysis warning by
729         increasing parenthesis around casts to signed values.
730
731 2015-04-21  Mike Frysinger  <vapier@gentoo.org>
732
733         * gennltvals.sh: Add mcore support.
734         * nltvals.def: Regenerate.
735
736 2015-04-21  Mike Frysinger  <vapier@gentoo.org>
737
738         * cgen.sh: Add +x permissions.
739         * genmloop.sh: Likewise.
740         * gentvals.sh: Likewise.
741         * gennltvals.sh (newlibroot): New variable to hold the path to newlib.
742         Change all uses of srcroot for newlib to newlibroot.
743
744 2015-04-18  Mike Frysinger  <vapier@gentoo.org>
745
746         * sim-base.h (SIM_CPU): New typedef.
747
748 2015-04-18  Mike Frysinger  <vapier@gentoo.org>
749
750         * cgen-engine.h (CIA_ADDR): Delete.
751         * sim-base.h: Update sim_cia example.
752         [!CIA_ADDR] (sim_cia): New typedef.
753
754 2015-04-17  Mike Frysinger  <vapier@gentoo.org>
755
756         * cgen-utils.c (cgen_rtx_error): Change CIA_GET to CPU_PC_GET.
757         * sim-core.c (sim_core_read_buffer, sim_core_write_buffer): Likewise.
758         * sim-engine.h (SIM_ENGINE_HALT_HOOK): Change CIA_SET to CPU_PC_SET.
759         * sim-run.c (sim_engine_run): Change CIA_GET to CPU_PC_GET and
760         CIA_SET to CPU_PC_SET.
761
762 2015-04-15  Mike Frysinger  <vapier@gentoo.org>
763
764         * Makefile.in (SIM_NEW_COMMON_OBJS): Add sim-cpu.o.
765         * sim-main.h (STATE_CPU): Remove from comment and define.
766
767 2015-04-13  Mike Frysinger  <vapier@gentoo.org>
768
769         * acinclude.m4 (ACX_PKGVERSION): Change GDB to SIM.
770         * configure: Regenerate.
771
772 2015-04-13  Mike Frysinger  <vapier@gentoo.org>
773
774         * sim-options.c: Include version.h.
775         (OPTIONS_VERSION): New enum.
776         (standard_options): Add "version".
777         (standard_option_handler): Handle OPTIONS_VERSION.
778
779 2015-04-13  Mike Frysinger  <vapier@gentoo.org>
780
781         * Makefile.in (version.o): Change to using create-version.sh from gdb.
782         (create-version.sh): Delete.
783
784 2015-04-06  Mike Frysinger  <vapier@gentoo.org>
785
786         * Make-common.in (SIM_NEW_COMMON_OBJS): Add sim-engine.o and sim-hrw.o.
787
788 2015-04-01  Mike Frysinger  <vapier@gentoo.org>
789
790         * run-sim.h, run.c: Delete.
791         * tconfig.h (SIM_HAVE_PROFILE, SIM_HAVE_BIENDIAN): Delete.
792
793 2015-03-31  Mike Frysinger  <vapier@gentoo.org>
794
795         * config.in, configure: Regenerate.
796         * Make-common.in (CSEARCH): Add $(ZLIBINC).
797         (ZLIB, ZLIBINC): Define.
798         (BFD_LIB): Add $(ZLIB).
799
800 2015-03-31  Mike Frysinger  <vapier@gentoo.org>
801
802         * cgen-mem.h (MEMOPS_INLINE): Change to EXTERN_INLINE.
803         * cgen-ops.h (SEMOPS_INLINE): Likewise.
804
805 2015-03-29  Mike Frysinger  <vapier@gentoo.org>
806
807         * sim-arange.h (SIM_ARANGE_INLINE): Move above sim_addr_range_hit_p.
808         (sim_addr_range_hit_p): Change INLINE to SIM_ARANGE_INLINE.
809         * sim-inline.h (INLINE2): Define to gnu_inline when available.
810
811 2015-03-24  Mike Frysinger  <vapier@gentoo.org>
812
813         * sim-profile.c (profile_pc_event): Get pc via sim_pc_get.  Delete
814         usage of STATE_WATCHPOINTS.
815         (profile_pc_init): Delete STATE_WATCHPOINTS (sd)->pc check.  Change
816         STATE_WATCHPOINTS (sd)->sizeof_pc to sizeof (sim_cia).
817
818 2015-03-24  Mike Frysinger  <vapier@gentoo.org>
819
820         * tconfig.h: Note SIM_HAVE_PROFILE is deprecated.
821
822 2015-03-24  Mike Frysinger  <vapier@gentoo.org>
823
824         * tconfig.h: Note SIM_HAVE_BIENDIAN is deprecated.
825
826 2015-03-24  Mike Frysinger  <vapier@gentoo.org>
827
828         * acinclude.m4 (SIM_AC_OPTION_HARDWARE): Move default option setting
829         of enable_sim_hardware to AC_ARG_ENABLE.
830
831 2015-03-23  Mike Frysinger  <vapier@gentoo.org>
832
833         * acinclude.m4 (SIM_AC_OPTION_HARDWARE): Delete SIM_DV_SOCKSER_O.
834         Add dv-sockser.o to sim_hw_objs.
835
836 2015-03-23  Mike Frysinger  <vapier@gentoo.org>
837
838         * dv-sockser.c: Include config.h.
839         * dv-sockser.h: Include sim-inline.h.
840         [HAVE_DV_SOCKSER]: Move all prototypes here.
841         [!HAVE_DV_SOCKSER] (dv_sockser_status, dv_sockser_write,
842         dv_sockser_write_buffer, dv_sockser_read): New stub functions.
843
844 2015-03-16  Mike Frysinger  <vapier@gentoo.org>
845
846         * gentmap.c, run.c: Convert old style prototypes.
847
848 2015-03-16  Mike Frysinger  <vapier@gentoo.org>
849
850         * acinclude.m4 (SIM_AC_COMMON): Call AH_BOTTOM.  Delete logic for
851         symlinking tconfig.h to tconfig.in.
852         * config.in, configure: Regenerate.
853         * nrun.c, run.c, sim-basics.h: Delete tconfig.h include.
854         * tconfig.in: Rename file ...
855         * tconfig.h: ... here.
856
857 2015-03-15  Mike Frysinger  <vapier@gentoo.org>
858
859         * dv-socker.h (dv_sockser_install): Declare.
860         * sim-module.c: Include config.h.
861         [HAVE_DV_SOCKSER]: Include dv-sockser.h.
862         (modules) [HAVE_DV_SOCKSER]: Add dv_sockser_install.
863         * sim-module.h: Include gdb/remote-sim.h.
864
865 2015-03-14  Mike Frysinger  <vapier@gentoo.org>
866
867         * Make-common.in (BUILT_SRC_FROM_COMMON): Delete.
868         (sim-inline.c): Delete rule.
869
870 2015-03-14  Mike Frysinger  <vapier@gentoo.org>
871
872         * Make-common.in (SIM_RUN_OBJS): Change to nrun.o.
873         * run.c [SIM_USE_DEPRECATED_RUN_FRONTEND]: Issue a warning.
874         [!SIM_USE_DEPRECATED_RUN_FRONTEND]: Throw an error.
875
876 2015-03-14  Mike Frysinger  <vapier@gentoo.org>
877
878         * sim-assert.h [!SIM_ASSERT, WITH_ASSERT]: Include sim-io.h.
879         [!ASSERT, WITH_ASSERT]: Likewise.
880         * sim-endian.c: Delete sim-io.h include.
881
882 2015-02-19  Mike Frysinger  <vapier@gentoo.org>
883
884         * run-sim.h (sim_kill): Delete unused prototype.
885
886 2015-02-13  Chen Gang  <gang.chen.5i5j@gmail.com>
887
888         * gentmap.c: Include "string.h".
889
890 2015-02-02  Chen Gang  <gang.chen.5i5j@gmail.com>
891
892         * sim-options.c (sim_args_command): Call freeargv() when failure
893         occurs.
894
895 2015-01-07  Joel Brobecker  <brobecker@adacore.com>
896
897         * aclocal.m4, configure: Regenerate using automake 1.11.1.
898
899 2014-12-03  Joel Brobecker  <brobecker@adacore.com>
900
901         * sim-io.c (sim_io_stat, sim_io_fstat): Adjust calls to "stat"
902         and "fstat" callbacks by calls to "to_stat" and "to_fstat" (resp)
903         callbacks following renaming in callback.h.
904         * syscall.c (cb_syscall): Likewise.  Adjust calls to "lstat"
905         callback by call to "to_lstat" callback
906
907 2014-08-28  Gary Benson  <gbenson@redhat.com>
908
909         * sim-trace.h (debug_printf): New define.
910
911 2014-08-19  Alan Modra  <amodra@gmail.com>
912
913         * configure: Regenerate.
914
915 2014-08-15  Roland McGrath  <mcgrathr@google.com>
916
917         * configure: Regenerate.
918         * config.in: Regenerate.
919
920 2014-03-10  Mike Frysinger  <vapier@gentoo.org>
921
922         * sim-command.c (sim_do_command): Add const to cmd.
923         * sim-options.c (sim_args_command): Add const to cmd.
924         * sim-options.h (sim_args_command): Add const to cmd.
925
926 2014-03-05  Mike Frysinger  <vapier@gentoo.org>
927
928         * sim-hload.c (sim_load): Add const to prog.
929         * sim-load.c (sim_load_file): Likewise.
930         * sim-utils.c (sim_analyze_program): Likewise.
931         * sim-utils.h (sim_analyze_program): Likewise.
932         (sim_load_file): Likewise.
933
934 2014-03-04  Mike Frysinger  <vapier@gentoo.org>
935
936         * acinclude.m4 (build_warnings): Copy from gdb/configure.ac.
937         * callback.c (system): Delete unused prototype.
938         (os_init): Likewise.
939         (os_shutdown): Likewise.
940         (os_unlink): Likewise.
941         (os_time): Likewise.
942         (os_system): Likewise.
943         (os_rename): Likewise.
944         (os_write_stdout): Likewise.
945         (os_flush_stdout): Likewise.
946         (os_write_stderr): Likewise.
947         (os_flush_stderr): Likewise.
948         (os_write): Likewise.
949         (os_read_stdin): Likewise.
950         (os_read): Likewise.
951         (os_open): Likewise.
952         (os_lseek): Likewise.
953         (os_isatty): Likewise.
954         (os_get_errno): Likewise.
955         (os_close): Likewise.
956         (os_vprintf_filtered): Likewise.
957         (os_evprintf_filtered): Likewise.
958         (os_error): Likewise.
959         (fdmap): Likewise.
960         (fdbad): Likewise.
961         (wrap): Likewise.
962         (wrap): Change to new style prototype.
963         (fdbad): Likewise.
964         (fdmap): Likewise.
965         (os_close): Likewise.
966         (os_poll_quit): Likewise.
967         (os_get_errno): Likewise.
968         (os_isatty): Likewise.
969         (os_lseek): Likewise.
970         (os_open): Likewise.
971         (os_read): Likewise.
972         (os_read_stdin): Likewise.
973         (os_write): Likewise.
974         (os_write_stdout): Likewise.
975         (os_flush_stdout): Likewise.
976         (os_write_stderr): Likewise.
977         (os_flush_stderr): Likewise.
978         (os_rename): Likewise.
979         (os_system): Likewise.
980         (os_time): Likewise.
981         (os_unlink): Likewise.
982         (os_stat): Likewise.
983         (os_fstat): Likewise.
984         (os_lstat): Likewise.
985         (os_ftruncate): Likewise.
986         (os_truncate): Likewise.
987         (os_pipe): Likewise.
988         (os_pipe_empty): Likewise.
989         (os_pipe_nonempty): Likewise.
990         (os_shutdown): Likewise.
991         (os_init): Likewise.
992         (cb_read_target_syscall_maps): Likewise.
993         (cb_target_to_host_syscall): Likewise.
994         (cb_host_to_target_errno): Likewise.
995         (cb_target_to_host_open): Likewise.
996         (cb_store_target_endian): Likewise.
997         (cb_host_to_target_stat): Likewise.
998         * sim-hload.c (sim_load): Change to new style prototype.
999         * sim-load.c (sim_load_file): Change to new style prototype.
1000         (report_transfer_performance): Likewise.
1001         (xprintf_bfd_vma): Likewise.
1002         * syscall.c (cb_get_string): Change to new style prototype.
1003         (get_path): Likewise.
1004         (cb_syscall): Likewise.
1005
1006 2013-10-15  Hans-Peter Nilsson  <hp@axis.com>
1007
1008         * create-version.sh: Align parameters to match those of
1009         ../../gdb/common/create-version.sh.
1010         * Make-common.in (srcsim): New variable.
1011         (version.c): Adjust call to create-version.sh as per above.
1012
1013 2013-09-23  Alan Modra  <amodra@gmail.com>
1014
1015         * configure: Regenerate.
1016
1017 2013-09-03  Mike Stump  <mikestump@comcast.net>
1018
1019         * sim-options.c (complete_option_list): Mark text and word const.
1020
1021 2013-06-28  Tom Tromey  <tromey@redhat.com>
1022
1023         * Make-common.in (version.c): Use version.in, not
1024         common/version.in.
1025         * create-version.sh: Likewise.
1026
1027 2013-06-24  Joel Brobecker  <brobecker@adacore.com>
1028
1029         * create-version.sh: New script. Adapted from
1030         gdb/commong/create-version.sh.
1031         * Make-common.in (version.c): Update rule dependencies,
1032         and re-implement using create-version.sh.
1033
1034 2013-06-21  Nick Clifton  <nickc@redhat.com>
1035
1036         * gennltvals.sh: Add msp430 support.
1037         * nltvals.def: Regenerate.
1038
1039 2013-06-03  Mike Frysinger  <vapier@gentoo.org>
1040
1041         * acinclude.m4: Replace maintainer-mode code with AM_MAINTAINER_MODE.
1042         * aclocal.m4, configure: Regenerate.
1043
1044 2013-05-10  Freddie Chopin  <freddie_chopin@op.pl>
1045
1046         PR build/15414:
1047         * acinclude.m4 (SIM_AC_OPTION_WARNINGS): Do not use
1048         -Wformat-nonliteral with -Wno-format.
1049
1050 2013-03-26  Mike Frysinger  <vapier@gentoo.org>
1051
1052         * acinclude.m4: Regenerate.
1053
1054 2013-03-23  Joel Sherrill  <joel.sherrill@oarcorp.com>
1055
1056         * acinclude.m4: Add SIM_DV_SOCKSER_O which is empty  on hosts
1057         which do not support dv-sockser.o.  Add always as option to
1058         first argument to SIM_AC_OPTION_HARDWARE. Fail if hardware
1059         is always required to be enabled by simulator.
1060
1061 2012-08-28  Kaushik Phatak  <kaushik.phatak@kpitcummins.com>
1062
1063         * gennltvals.sh: Use libgloss/syscall.h for cr16.
1064         * nltvals.def: Regenerate.
1065
1066 2012-06-16  Joel Brobecker  <brobecker@adacore.com>
1067
1068         * acinclude.m4 (SIM_AC_COMMON): Define PACKAGE.
1069         * config.in, configure: Regenerate.
1070
1071 2012-05-24  Pedro Alves  <palves@redhat.com>
1072
1073         * sim-signal.h (sim_signal_to_target): Rename to ...
1074         (sim_signal_to_gdb_signal): ... this.
1075         * sim-signal.c (sim_signal_to_target): Rename to ...
1076         (sim_signal_to_gdb_signal): ... this.
1077         * sim-reason.c (sim_stop_reason): Adjust to rename.
1078
1079 2012-05-24  Pedro Alves  <palves@redhat.com>
1080
1081         PR gdb/7205
1082
1083         Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
1084
1085 2012-05-24  Pedro Alves  <palves@redhat.com>
1086
1087         PR gdb/7205
1088
1089         Replace target_signal with gdb_signal throughout.
1090
1091 2012-05-18  Nick Clifton  <nickc@redhat.com>
1092
1093         PR 14072
1094         * callback.c: Include config.h before system header files.
1095         * cgen-trace.c: Likewise.
1096         * cgen-utils.c: Likewise.
1097         * gentmap.c: Likewise.
1098
1099 2012-04-02  Mike Frysinger  <vapier@gentoo.org>
1100
1101         * hw-ports.c (hw_port_decode): Change "Unreconized" to "Unrecognized".
1102
1103 2012-03-28  Rathish C  <rathish.c@kpitcummins.com>
1104
1105         * sim-trace.c: Update the function prototype of save_data_size.
1106         Move the enum data_fmt from here...
1107         * sim-trace.h: ...to here.
1108         Add function prototype of save_data.
1109
1110 2012-03-25  Mike Frysinger  <vapier@gentoo.org>
1111
1112         * sim-core.h (sim_core_trans_addr): Add prototype.
1113
1114 2012-03-24  Hans-Peter Nilsson  <hp@axis.com>
1115
1116         * nrun.c: Add #ifdef HAVE_CONFIG_H and associated includes stanza
1117         missing in last change.
1118
1119 2012-03-24  Mike Frysinger  <vapier@gentoo.org>
1120
1121         * acinclude.m4 (SIM_AC_COMMON): Call AC_USE_SYSTEM_EXTENSIONS.
1122         * nrun.c: Include string.h/strings.h.
1123         * aclocal.m4, config.in, configure: Regenerate.
1124
1125 2012-03-22  Mike Frysinger  <vapier@gentoo.org>
1126
1127         * acinclude.m4 (SIM_AC_OPTION_WARNINGS): Copy AC_ARG_ENABLE(werror),
1128         WERROR_CFLAGS, and build_warnings from gdb/configure.ac.  Comment
1129         out -Werror initialization.
1130
1131 2012-03-19  Mike Frysinger  <vapier@gentoo.org>
1132
1133         * Make-common.in (TAGS): Change a-z to [:lower:].
1134         * acinclude.m4 (sim-trace): Likewise.
1135         * gennltvals.sh: Change A-Z0-9 to [:upper:][:digit:].
1136         Change A-Za-z0-9 to [:alnum:].
1137
1138 2012-03-18  Mike Frysinger  <vapier@gentoo.org>
1139
1140         * nrun.c (main): Display strsignal of sigrc.
1141
1142 2012-01-06  Mike Frysinger  <vapier@gentoo.org>
1143
1144         * Makefile.in (abs_srcdir): Declare.
1145         (srcroot): Define in terms of abs_srcdir.
1146         (headers): Change srcdir to abs_srcdir.
1147
1148 2012-01-02  Joel Brobecker  <brobecker@adacore.com>
1149
1150         * dv-sockser.h, sim-assert.h, sim-fpu.c: Reformat the copyright
1151         header.
1152
1153 2011-12-19  Joel Brobecker  <brobecker@adacore.com>
1154
1155         * Make-common.in (hw-config.h): Work around bug in Solaris 2.8
1156         system bourne shell.
1157
1158 2011-12-03  Mike Frysinger  <vapier@gentoo.org>
1159
1160         * syscall.c (cb_get_string): Rename from "get_string".
1161         (get_path): Rename get_string call to cb_get_string.
1162
1163 2011-12-03  Mike Frysinger  <vapier@gentoo.org>
1164
1165         * Make-common.in (VPATH): Add $(srccom).
1166         (DEP): Delete.
1167         (DEPMODE, DEPDIR, depcomp, COMPILE.pre, COMPILE.post, COMPILE,
1168         POSTCOMPILE): New variables.
1169         (.c.o): Replace recipe with call to $(COMPILE) and $(POSTCOMPILE).
1170         Include dependency files, when using GNU Make.  Delete all
1171         dependency-only rules.
1172         * aclocal.m4: Include ../../config/depstand.m4.  Call
1173         ZW_CREATE_DEPDIR and ZW_PROG_COMPILER_DEPENDENCIES.
1174         (MAKE, GMAKE): New substs.
1175
1176 2011-11-07  Mike Frysinger  <vapier@gentoo.org>
1177
1178         PR sim/13161
1179         * configure.ac (AC_CHECK_FUNCS): Add posix_fallocate.
1180         * configure, config.in: Regenerate.
1181         * dv-cfi.c (attach_cfi_regs): Check for HAVE_POSIX_FALLOCATE.
1182
1183 2011-10-19  Mike Frysinger  <vapier@gentoo.org>
1184
1185         * acinclude.m4: Call AC_CHECK_LIB when $hardware contains cfi.
1186
1187 2011-10-18  John Wehle  <john@feith.com>  (tiny patch)
1188
1189         * sim-profile.c (profile_info): Only print the title once.
1190
1191 2011-10-17  Mike Frysinger  <vapier@gentoo.org>
1192
1193         * acinclude.m4: Rename from aclocal.m4.
1194         * aclocal.m4: Regenerate.
1195
1196 2011-10-17  Mike Frysinger  <vapier@gentoo.org>
1197
1198         * aclocal.m4: Change AC_PREREQ comment to 2.64.
1199         * common.m4: Delete.
1200         * configure.ac: Change AC_PREREQ to 2.64.  Replace AC_CONFIG_HEADER
1201         call and common.m4 include with SIM_AC_COMMON(cconfig.h).
1202         * configure: Regenerate.
1203
1204 2011-10-14  Alexey Makhalov  <makhaloff@gmail.com>
1205
1206         * sim-alu.h (ALU32_AND): Clear carry flag.
1207         (ALU32_AND): Clear carry flag.
1208
1209 2011-10-09  Mike Frysinger  <vapier@gentoo.org>
1210
1211         * dv-cfi.c: Include stdbool.h.
1212
1213 2011-10-09  Mike Frysinger  <vapier@gentoo.org>
1214
1215         * dv-cfi.c: Replace devices.h include with hw-base.h and hw-main.h.
1216
1217 2011-10-04  Mike Frysinger  <vapier@gentoo.org>
1218
1219         * aclocal.m4 (SIM_AC_COMMON): Call AM_ZLIB, ACX_PKGVERSION, and
1220         ACX_BUGURL.  Define PKGVERSION and REPORT_BUGS_TO.
1221
1222 2011-07-12  Mike Frysinger  <vapier@gentoo.org>
1223
1224         * sim-command.c: Include sim-options.h.
1225
1226 2011-07-12  Mike Frysinger  <vapier@gentoo.org>
1227
1228         * aclocal.m4: Move sinclude comment after AC_INIT comment.
1229
1230 2011-07-12  Mike Frysinger  <vapier@gentoo.org>
1231
1232         * aclocal.m4 (SIM_AC_COMMON): Call AC_REQUIRE on AC_PROG_CC.
1233         Delete direct call to AC_PROG_CC.
1234
1235 2011-07-05  Mike Frysinger  <vapier@gentoo.org>
1236
1237         * sim-command.c: New file.
1238         * Make-common.in (SIM_NEW_COMMON_OBJS): Add sim-command.o.
1239         (sim-command.o): New rule.
1240
1241 2011-05-27  Mike Frysinger  <vapier@gentoo.org>
1242
1243         * sim-options.c (standard_option_handler): Remove arg[0] check
1244         when freeing simulator_sysroot.  Only strdup arg when arg[0] is
1245         not an empty string, otherwise assign "" back to it.
1246
1247 2011-05-26  Mike Frysinger  <vapier@gentoo.org>
1248
1249         * nltvals.def: Regenerate to include Blackfin syscalls again.
1250
1251 2011-05-25  Mike Frysinger  <vapier@gentoo.org>
1252
1253         * sim-trace.c (OPTION_TRACE_SYSCALL): New enum.
1254         (trace_options): Handle "trace-syscall" with OPTION_TRACE_SYSCALL.
1255         (trace_option_handler): Handle OPTION_TRACE_SYSCALL.
1256         (trace_idx_to_str): Likewise.
1257         * sim-trace.h (TRACE_SYSCALL_IDX): New enum.
1258         (TRACE_syscall): Define.
1259         (WITH_TRACE_SYSCALL_P): Likewise.
1260         (TRACE_SYSCALL_P): Likewise.
1261
1262 2011-05-23  Mike Frysinger  <vapier@gentoo.org>
1263
1264         * dv-glue.c (hw_glue_finish): Move "name" to function scope and
1265         remove now-unnecessary sub-scope for glue->type setting.
1266         Check to see if the "reg" property exists before we use it, and
1267         if it doesn't exist, error out for "glue" devices.
1268
1269 2011-05-23  Mike Frysinger  <vapier@gentoo.org>
1270
1271         * dv-glue.c (hw_glue_finish): Set type to glue_or when name is
1272         glue-or, and set type to glue_xor when name is glue-xor.
1273         (hw_glue_port_event): Return immediately when type is glue_io
1274         or unmatched.  Handle glue_or and glue_xor types.  Move HW_TRACE
1275         and hw_port_event calls from glue_and to end of function.
1276
1277 2011-05-11  Mike Frysinger  <vapier@gentoo.org>
1278
1279         * callback.c, dv-pal.c, dv-sockser.c, hw-base.c, hw-device.c,
1280         hw-instances.c, hw-ports.c, hw-properties.c, hw-tree.c, sim-abort.c,
1281         sim-arange.c, sim-config.c, sim-core.c, sim-engine.c, sim-events.c,
1282         sim-hw.c, sim-io.c, sim-memopt.c, sim-options.c, sim-profile.c,
1283         sim-resume.c, sim-stop.c, syscall.c: Add space before parenthesis
1284         around function arguments.
1285
1286 2011-04-14  Mike Frysinger  <vapier@gentoo.org>
1287
1288         * sim-options.c (complete_option_list, sim_complete_command):
1289         New functions.
1290
1291 2011-04-02  Mike Frysinger  <vapier@gentoo.org>
1292
1293         * dv-glue.c: Fix up style.
1294
1295 2011-04-02  Mike Frysinger  <vapier@gentoo.org>
1296
1297         * hw-alloc.c (hw_alloc_data): Adjust brace.
1298         * hw-base.c (hw_base_data): Likewise.
1299         (generic_hw_unit_decode): Fix indentation.
1300         * hw-device.h (_hw_unit, enum, hw): Adjust braces.
1301         * hw-events.c (hw_event, hw_event_data): Likewise.
1302         * hw-handles.c (hw_handle_mapping, hw_handle_data): Likewise.
1303         * hw-instances.c (hw_instance_data): Likewise.
1304         * hw-instances.h (hw_instance): Likewise.
1305         * hw-main.h (hw_descriptor, enum): Likewise.
1306         * hw-ports.c (hw_port_edge, hw_port_data, empty_hw_ports): Likewise.
1307         * hw-ports.h (hw_port_descriptor): Likewise.
1308         * hw-properties.c (hw_property_data): Likewise.
1309         * hw-properties.h (enum, hw_property, _ihandle_runtime_property_spec,
1310         _range_property_spec, _reg_property_spec): Likewise.
1311         * hw-tree.c (_name_specifier, printer): Likewise.
1312         (split_device_specifier, parse_string_property, hw_tree_traverse,
1313         print_size, print_reg_property, print_string, print_properties):
1314         Fix indentation.
1315
1316 2011-03-29  Mike Frysinger  <vapier@gentoo.org>
1317
1318         * aclocal.m4 (SIM_AC_OPTION_HARDWARE): Add cfi to default list.
1319         * Make-common.in (dv-cfi.o): New rule.
1320         * dv-cfi.c, dv-cfi.h: New files.
1321
1322 2011-03-21  Kevin Buettner  <kevinb@redhat.com>
1323
1324         * gennltvals.sh: Search sys/_default_fcntl.h, in addition to
1325         fcntl.h and sys/fcntl.h, for constants.
1326         * nltvals.def: Regenerate.
1327         * sim-io.c (sim_io_stat, sim_io_fstat): New functions.
1328         * sim-io.h (sys/types.h, sys/stat.h): Include.
1329         (sim_io_stat, sim_io_fstat): Declare.
1330
1331 2011-03-14  Mike Frysinger  <vapier@gentoo.org>
1332
1333         * callback.c, cgen-engine.h, dv-core.c, dv-glue.c, dv-pal.c,
1334         hw-base.c, hw-device.c, hw-device.h, hw-handles.c, hw-instances.c,
1335         hw-ports.c, hw-ports.h, hw-properties.c, hw-tree.c, nrun.c,
1336         run-sim.h, run.c, sim-alu.h, sim-assert.h, sim-base.h, sim-basics.h,
1337         sim-config.c, sim-core.c, sim-core.h, sim-engine.h, sim-events.c,
1338         sim-events.h, sim-fpu.c, sim-hw.c, sim-inline.h, sim-load.c,
1339         sim-memopt.c, sim-n-core.h, sim-options.c, sim-profile.c,
1340         sim-signal.c, sim-trace.c, sim-trace.h, sim-utils.c, sim-watch.c,
1341         syscall.c: Trim trailing whitespace.
1342
1343 2011-03-05  Mike Frysinger  <vapier@gentoo.org>
1344
1345         * gennltvals.sh: Handle bfin targets.
1346         * nltvals.def: Regenerate.
1347
1348 2011-02-25  Kevin Buettner  <kevinb@redhat.com>
1349
1350         * callback.c (fdbad): Return EBADF rather than EINVAL for bad
1351         file descriptors.
1352
1353 2011-02-14  Mike Frysinger  <vapier@gentoo.org>
1354
1355         * hw-alloc.c (hw_alloc_data): Delete zalloc_p.
1356         (hw_zalloc, hw_malloc): Delete zalloc_p reference.
1357         (hw_free): Drop zfree logic and always call free.
1358         * hw-base.c (hw_delete): Change zfree to free.
1359         * hw-handles.c (hw_handle_remove_ihandle): Likewise.
1360         (hw_handle_remove_phandle): Likewise.
1361         * hw-instances.c (hw_instance_delete): Likewise.
1362         * hw-tree.c (parse_reg_property): Likewise.
1363         (parse_ranges_property): Likewise.
1364         (parse_string_property): Likewise.
1365         * sim-core.c (sim_core_uninstall): Likewise.
1366         * sim-cpu.c (sim_cpu_free_all): Likewise.
1367         * sim-hw.c (sim_hw_uninstall): Likewise.
1368         * sim-memopt.c (do_memopt_delete): Likewise.
1369         (sim_memory_uninstall): Likewise.
1370         * sim-module.c (sim_module_uninstall): Likewise.
1371         * sim-options.c (sim_parse_args): Likewise.
1372         * sim-profile.c (profile_pc_cleanup): Likewise.
1373         (profile_uninstall): Likewise.
1374         * sim-watch.c (do_watchpoint_delete): Likewise.
1375         * sim-utils.c (zfree): Delete.
1376         (sim_state_free): Change zfree to free.
1377         * sim-utils.h (zfree): Delete.
1378
1379 2011-02-13  Mike Frysinger  <vapier@gentoo.org>
1380
1381         * sim-events.h (_sim_events.time_from_event): Change type to signed64.
1382
1383 2011-01-12  Mike Frysinger  <vapier@gentoo.org>
1384
1385         * sim-hw.c (sim_hw_uninstall): Uncomment hw_tree_delete.
1386
1387 2011-01-12  Mike Frysinger  <vapier@gentoo.org>
1388
1389         * sim-module.c (sim_pre_argv_init): Return SIM_RC_FAIL when asprintf
1390         fails.
1391         * sim-options.c (sim_parse_args): Issue an error and return SIM_RC_FAIL
1392         when asprintf fails.
1393         * sim-utils.c (sim_do_commandf): Issue an error and return when
1394         asprintf fails.
1395         * sim-watch.c (sim_watchpoint_install): Return SIM_RC_FAIL when
1396         asprintf fails.
1397
1398 2011-01-11  Mike Frysinger  <vapier@gentoo.org>
1399
1400         * sim-memopt.c (do_memopt_add): Set nr_bytes to s.st_size before
1401         bytes has been calculated and when mmap_next_fd is valid and
1402         nr_bytes is 0.
1403         (memory_option_handler): Allow missing size when mmap_next_fd is
1404         valid.
1405
1406 2011-01-10  Mike Frysinger  <vapier@gentoo.org>
1407
1408         * aclocal.m4 (SIM_AC_OPTION_HARDWARE): Set $hardware to $2 when $2 is
1409         not empty, and always append $3 to $hardware.
1410
1411 2011-01-10  Mike Frysinger  <vapier@gentoo.org>
1412
1413         * hw-device.h (hw_abort, hw_vabort, hw_halt): Add noreturn attribute.
1414         * sim-hw.h (sim_hw_abort): Likewise.
1415
1416 2011-01-05  Mike Frysinger  <vapier@gentoo.org>
1417
1418         * sim-load.c (sim_load_file): Change buffer type to unsigned char *.
1419
1420 2011-01-05  Joel Brobecker  <brobecker@adacore.com>
1421
1422         * run.1: Copyright year update.
1423
1424 2010-12-28  Mike Frysinger  <vapier@gentoo.org>
1425
1426         * hw-alloc.h (HW_NALLOC): Define.
1427
1428 010-12-28  Mike Frysinger  <vapier@gentoo.org>
1429
1430         * hw-alloc.h (HW_NZALLOC): Change ME,TYPE,N to me,type,n.
1431
1432 2010-12-15  Mike Frysinger  <vapier@gentoo.org>
1433
1434         * sim-memopt.c (OPTION_MAP_INFO): Define.
1435         (memory_options): Handle --map-info.
1436         (memory_option_handler): Handle OPTION_MAP_INFO.
1437
1438 2010-11-22  Mike Frysinger  <vapier@gentoo.org>
1439
1440         * sim-profile.c (PROFILE_PC_FREQ, PROFILE_PC_NR_BUCKETS,
1441         PROFILE_PC_SHIFT, PROFILE_PC_START, PROFILE_PC_END,
1442         PROFILE_INSN_COUNT): Add stubs when profile is disabled.
1443
1444 2010-11-22  Mike Frysinger  <vapier@gentoo.org>
1445
1446         * sim-core.c (WITH_HW): Add device casts to device_error,
1447         device_io_read_buffer, and device_io_write_buffer.
1448
1449 2010-11-16  Mike Frysinger  <vapier@gentoo.org>
1450
1451         * dv-sockser.c (dv_sockser_write_buffer): New function.
1452         (dv_sockser_write): Rewrite to use dv_sockser_write_buffer.
1453         * dv-sockser.h (dv_sockser_write_buffer): New prototype.
1454
1455 2010-10-07  Hans-Peter Nilsson  <hp@axis.com>
1456
1457         * callback.c (os_lseek): Call wrap on lseek result.
1458
1459 2010-05-26  Ozkan Sezer  <sezeroz@gmail.com>
1460
1461         * dv-sockser.c (dv_sockser_init): Check error return from socket()
1462         call by its equality to -1 not by it being negative.
1463         (connected_p): Likewise for accept() call.
1464
1465 2010-04-23  Mike Frysinger  <vapier@gentoo.org>
1466
1467         * sim-fpu.c (sim_fpu_zero, sim_fpu_qnan): Add 0 initializers.
1468
1469 2010-04-21  Mike Frysinger  <vapier@gentoo.org>
1470
1471         * profile.c (sim_profile_print_bar): Add cpu argument.
1472
1473 2010-04-21  Mike Frysinger  <vapier@gentoo.org>
1474
1475         * sim-profile.h (sim_profile_print_bar): Use sim_cpu, not SIM_CPU.
1476
1477 2010-04-21  Mike Frysinger  <vapier@gentoo.org>
1478
1479         * sim-profile.c (profile_vprintf, profile_printf): New functions.
1480         (profile_print_pc): Convert sim_io_printf to profile_printf.
1481         (profile_print_insn): Likewise.
1482         (profile_print_memory): Likewise.
1483         (profile_print_core): Likewise.
1484         (profile_print_model): Likewise.
1485         (sim_profile_print_bar): Likewise.
1486         (profile_print_speed): Likewise.
1487         (profile_print_addr_ranges): Likewise.
1488         (profile_info): Likewise.
1489         * sim-profile.h (sim_profile_print_bar): Add cpu argument.
1490
1491 2010-04-19  Mike Frysinger  <vapier@gentoo.org>
1492
1493         * sim-model.c (OPTION_MODEL): Convert to enum.
1494         (OPTION_MODEL_INFO): New enum.
1495         (model_options): Add model-info/info-model entries.
1496         (model_option_handler): Handle OPTION_MODEL_INFO.
1497
1498 2010-04-13  Mike Frysinger  <vapier@gentoo.org>
1499
1500         * dv-sockser.h (DV_SOCKSER_DISCONNECTED): Define.
1501         * dv-sockser.c (dv_sockser_status): Set DV_SOCKSER_DISCONNECTED
1502         initially.
1503
1504 2010-04-13  Mike Frysinger  <vapier@gentoo.org>
1505
1506         * sim-hrw.c (sim_write): Add const to buf arg.
1507         * sim-utils.h (sim_write_fn): Likewise.
1508
1509 2010-04-12  Mike Frysinger  <vapier@gentoo.org>
1510
1511         * sim-profile.h (PROFILE_BRANCH_TAKEN, PROFILE_BRANCH_UNTAKEN): New
1512         defines.
1513
1514 2010-04-12  Mike Frysinger  <vapier@gentoo.org>
1515
1516         * dv-core.c (dv_core_descriptor): Add NULL initializer.
1517         * dv-glue.c (hw_glue_ports, dv_glue_descriptor): Likewise.
1518         * dv-pal.c (hw_pal_ports, dv_pal_descriptor): Likewise.
1519         * dv-sockser.c (sockser_options): Likewise.
1520         * hw-ports.c (empty_hw_ports): Likewise.
1521         * sim-hw.c (hw_options): Likewise.
1522         * sim-model.c (model_options): Likewise.
1523         * sim-options.c (standard_options): Likewise.
1524         * sim-profile.c (profile_options): Likewise.
1525         * sim-trace.c (trace_options): Likewise.
1526         * sim-watch.c (watchpoint_options): Likewise.
1527
1528 2010-04-12  Mike Frysinger  <vapier@gentoo.org>
1529
1530         * sim-options.c (dup_arg_p): Add "const" to the "arg" argument,
1531         the local "arg_table" variable, and the xmalloc cast.
1532
1533 2010-04-10  Mike Frysinger  <vapier@gentoo.org>
1534
1535         * sim-fpu.c (sim_fpu_print_status): Add const markings to local
1536         "prefix" var.
1537         (sim_fpu_print_func): Add const markings to format buffer.
1538
1539 2010-04-10  Mike Frysinger  <vapier@gentoo.org>
1540
1541         * sim-fpu.c (sim_fpu_print_status): Remove duplicate break statements.
1542
1543 2010-04-10  Mike Frysinger  <vapier@gentoo.org>
1544
1545         * sim-trace.c (save_data): Add const markings to "buf" argument.
1546
1547 2010-04-10  Mike Frysinger  <vapier@gentoo.org>
1548
1549         * sim-options.c (standard_option_handler): Add const markings to
1550         local "type" var.
1551
1552 2010-04-02  Mike Frysinger  <vapier@gentoo.org>
1553
1554         * hw-ports.h: Fix spelling typos.
1555
1556 2010-03-30  Mike Frysinger  <vapier@gentoo.org>
1557
1558         * configure.ac: Check for socklen_t.
1559         * configure, config.in: Regenerated.
1560         * dv-sockser.c (connected_p): Change addrlen type to socklen_t.
1561
1562 2010-03-30  Mike Frysinger  <vapier@gentoo.org>
1563
1564         * sim-utils.c (sim_io_eprintf_cpu): Use %s with printf string.
1565         * sim-hw.c (hw_option_handler): Likewise.
1566
1567 2010-03-30  Mike Frysinger  <vapier@gentoo.org>
1568
1569         * sim-watch.c (watchpoint_type_to_str): Add const to return.
1570         (interrupt_nr_to_str): Likewise.
1571         (default_interrupt_names): Add const to pointer type.
1572         (sim_watchpoint_install): Add const to prefix.
1573         * sim-watch.h (struct _sim_watchpoints): Add const to interrupt_names.
1574
1575 2010-03-30  Mike Frysinger  <vapier@gentoo.org>
1576
1577         * sim-core.c (sim_core_read_buffer): Change raddr to address_word.
1578         (sim_core_write_buffer): Likewise.
1579
1580 2010-03-30  Mike Frysinger  <vapier@gentoo.org>
1581
1582         * sim-trace.c (trace_option_handler): Move cpu_nr decl behind
1583         the SIM_HAVE_ADDR_RANGE define.
1584
1585 2010-03-30  Mike Frysinger  <vapier@gentoo.org>
1586
1587         * sim-core.h (device_error): Add const to message, and add printf
1588         format attribute.
1589
1590 2010-03-30  Mike Frysinger  <vapier@gentoo.org>
1591
1592         * sim-profile.c (profile_print_addr_ranges): Wrap with the
1593         SIM_HAVE_ADDR_RANGE define.
1594
1595 2010-03-30  Mike Frysinger  <vapier@gentoo.org>
1596
1597         * dv-glue.c (hw_glue_ports): Swap static and const.
1598
1599 2010-03-30  Mike Frysinger  <vapier@gentoo.org>
1600
1601         * nrun.c (usage): Use void in definition.
1602         * sim-options.c (dup_arg_p): Convert old-style function definition.
1603         (sim_parse_args): Likewise.
1604         (sim_print_help): Likewise.
1605         * sim-trace.c (set_trace_option_mask): Likewise.
1606         (set_trace_option): Likewise.
1607         * sim-utils.c (sim_analyze_program): Likewise.
1608         (sim_elapsed_time_get): Likewise.
1609         (sim_elapsed_time_since): Likewise.
1610
1611 2010-03-22  Mike Frysinger  <vapier@gentoo.org>
1612
1613         * sim/common/sim-options.c (enum): Remove SIM_HAVE_BIENDIAN ifdef.
1614         (standard_options): Likewise.
1615         (standard_option_handler): Likewise.
1616
1617 2010-03-16  Mike Frysinger  <vapier@gentoo.org>
1618
1619         * hw-ports.c (TRACE): Delete.
1620         * hw-properties.c (TRACE): Delete.
1621         (hw_find_ihandle_runtime_property): Change TRACE to HW_TRACE.
1622         (hw_find_integer_property): Likewise.
1623         (hw_find_integer_array_property): Likewise.
1624         (hw_add_duplicate_property): Likewise.
1625
1626 2010-03-15  Mike Frysinger  <vapier@gentoo.org>
1627
1628         * hw-properties.h (hw_add_boolean_property): Rename "bool" to
1629         "boolean".
1630
1631 2010-02-04  Mike Frysinger  <vapier@gentoo.org>
1632
1633         * sim-model.c: Include sim-model.h
1634
1635 2010-02-04  Mike Frysinger  <vapier@gentoo.org>
1636
1637         * sim-base.h: Declare sim_state.cpu as a pointer in the comment.  Drop
1638         & from the STATE_CPU() examples.
1639
1640 2010-01-24  Doug Evans  <dje@sebabeach.org>
1641
1642         * cgen-accfp.c (fextsfdf): New arg how.  All callers updated.
1643         (ftruncdfsf, floatsisf, flostsidf, ufloatsisf, fixsfsi, fixdfsi,
1644         ufixsfsi): Ditto.
1645         * cgen-fpu.h (CGEN_FPCONV_KIND): New enum.
1646         (struct cgen_fp_ops): Update signatures of floating point conversion
1647         operations.
1648
1649         * Make-common.in (CGEN_SIM_DEPS): Define.
1650         (CGEN_INCLUDE_DEPS): Use it.
1651         (CGEN_MAIN_CPU_DEPS): Simplify.
1652
1653 2010-01-22  Doug Evans  <dje@sebabeach.org>
1654
1655         * cgen-ops.h (SUBWORDXFSI): Fix word ordering.
1656         (SUBWORDTFSI, JOINSIDI): Ditto.
1657
1658 2010-01-05  Doug Evans  <dje@sebabeach.org>
1659
1660         * cgen-types.h (SETDI): Delete, unused.
1661
1662 2009-12-02  Doug Evans  <dje@sebabeach.org>
1663
1664         * cgen-engine.h: Remove duplicated comment.
1665
1666 2009-11-23  Doug Evans  <dje@sebabeach.org>
1667
1668         * cgen-engine.h (EXTRACT_MSB0_SINT): Renamed from EXTRACT_MSB0_INT.
1669         (EXTRACT_LSB0_SINT): Renamed from EXTRACT_LSB0_INT.
1670
1671 2009-11-22  Doug Evans  <dje@sebabeach.org>
1672
1673         * cgen-engine.h (EXTRACT_MSB0_LGSINT, EXTRACT_MSB0_LGUINT): Define.
1674         (EXTRACT_LSB0_LGSINT, EXTRACT_LSB0_LGUINT): Define.
1675         (EXTRACT_FN, SEMANTIC_FN): Use CGEN_INSN_WORD in prototype
1676         instead of CGEN_INSN_INT.
1677
1678         * cgen-trace.h (trace_extract): Add cast to fix warning.
1679
1680 2009-11-05  Doug Evans  <dje@sebabeach.org>
1681
1682         * cgen-mem.h (DECLARE_GETT): Don't inline.
1683         (DECLARE_SETT): Ditto.
1684
1685 2009-10-15  Joel Sherrill <joel.sherrill@oarcorp.com>
1686
1687         * sim-inline.h: Fix spelling error.
1688
1689 2009-10-02  Ralf Corsepius <ralf.corsepius@rtems.org>
1690
1691         * Make-common.in: Add datarootdir.
1692
1693 2009-08-29  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1694
1695         * aclocal.m4 (SIM_CHECK_MEMBER, SIM_CHECK_MEMBERS)
1696         (SIM_CHECK_MEMBERS_1): Remove.
1697         * configure.ac: Replace SIM_CHECK_MEMBERS call with equivalent
1698         AC_CHECK_MEMBERS one.
1699         * configure: Regenerate.
1700
1701         * aclocal.m4 (SIM_CHECK_MEMBER): Use AU_ALIAS to define, not defn.
1702         * configure: Regenerate.
1703
1704 2009-08-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1705
1706         * config.in: Regenerate.
1707         * configure: Likewise.
1708
1709         * aclocal.m4 (SIM_CHECK_MEMBER): Replace definition with
1710         definition of AC_CHECK_MEMBER.
1711
1712         * aclocal.m4: m4_include toplevel config/override.m4.
1713         * configure: Regenerate.
1714
1715 2009-07-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1716
1717         * Makefile.in (datarootdir): New variable.
1718
1719 2009-07-07  Doug Evans  <dje@sebabeach.org>
1720
1721         * Make-common.in (CPU_DIR): Define.
1722
1723 2009-07-06  Doug Evans  <dje@sebabeach.org>
1724
1725         * Make-common.in (CGEN_CPU_EXTR,CGEN_CPU_READ): Pass canonical
1726         identifiers for file types rather than encoding internal
1727         implementation details of cgen.sh.
1728         (CGEN_CPU_WRITE,CGEN_CPU_SEM,CGEN_CPU_SEMSW): Ditto.
1729         * cgen.sh: Add support for parallel makes.
1730         Rewrite cpu/decode handling to avoid generating "extrafiles" twice.
1731
1732 2009-05-18  Jon Beniston <jon@beniston.com>
1733
1734         * gennltvals.sh: Add lm32 target.
1735         * nltvals.def: Add lm32 syscall definitions.
1736
1737 2009-03-19  J"orn Rennecke  <joern.rennecke@arc.com>  (tiny change)
1738
1739         Speed up simulator startup:
1740         * sim-utils.c (zalloc): Use xcalloc.
1741
1742 2009-01-07  Hans-Peter Nilsson  <hp@axis.com>
1743
1744         * cgen-ops.h (ADDQI, SUBQI, MULQI, NEGQI, ABSQI, ADDHI, SUBHI)
1745         (MULHI, NEGHI, ABSHI, ADDSI, SUBSI, MULSI, NEGSI, ABSSI, ADDDI)
1746         (SUBDI, MULDI, NEGDI, ABSDI): Cast arguments to the unsigned type
1747         variant; UQI, UHI, USI, UDI, and cast the result to the signed
1748         type, QI, HI, SI, DI.
1749
1750         * callback.c (os_error): Mark as being a noreturn function.
1751         * sim-io.h (sim_io_error): Similar for sim_io_error.
1752
1753 2008-11-12  Joel Sherrill <joel.sherrill@oarcorp.com>
1754
1755         * aclocal.m4:  Fix underquoting of function names.
1756
1757 2008-10-21  Julian Brown  <julian@codesourcery.com>
1758
1759         * Make-common.in (run$(EXEEXT)): Add LDFLAGS.
1760
1761 2008-07-11  Hans-Peter Nilsson  <hp@axis.com>
1762
1763         * common.m4: Add test for libz and zlib.h.
1764         * configure: Regenerate to track ../common/common.m4 changes.
1765         * config.in: Ditto.
1766
1767 2008-06-06  Vladimir Prus  <vladimir@codesourcery.com>
1768             Daniel Jacobowitz  <dan@codesourcery.com>
1769             Joseph Myers  <joseph@codesourcery.com>
1770
1771         * aclocal.m4: Include ../../config/acx.m4.
1772         * common.m4: Use ACX_PKGVERSION and ACX_BUGURL.
1773         * configure, config.in: Regenerate.
1774         * Make-common.in (LIB_OBJS): Add version.o.
1775         (version.c, version.o): New rules.
1776         * run.c: Include version.h.
1777         (usage): Add help parameter. Print output either to stdout or
1778         stderr depending on that parameter.
1779         (print_version): New.
1780         (main): Check for --help and --version.
1781         * run-sim.h (sim_target_display_usage): Add help parameter.
1782         * version.h: New.
1783
1784 2008-04-14  Hans Kester  <kester.hans@gmail.com>
1785
1786         * sim-signal.c: Define missing signals for _WIN32.
1787
1788 2008-02-12  M Ranga Swami Reddy  <MR.Swami.Reddy@nsc.com>
1789
1790         * gennltvals.sh: Add cr16.
1791         * nltvals.def: Rebuild.
1792
1793 2007-10-11  Jesper Nilsson  <jesper.nilsson@axis.com>
1794
1795         * callback.c (cb_is_stdin, cb_is_stdout, cb_is_stderr): Add functions.
1796         * syscall.c (cb_syscall): Test for stdin/out/err, not just fd 0/1/2.
1797
1798 2007-08-10  Nick Clifton  <nickc@redhat.com>
1799
1800         * sim-memopt.c (memory_options): Mention that the
1801         --memory-size switch accepts suffixes.
1802         (parse_size): Handle a suffix on the size value.
1803         * sim-options.c (standard_options): Mention that the mem-size
1804         switch accepts suffixes.
1805         (standard_option_handler): Handle a suffix on the size value.
1806
1807 2006-12-21  Hans-Peter Nilsson  <hp@axis.com>
1808
1809         * acconfig.h: Remove.
1810         * config.in: Regenerate.
1811
1812 2006-11-07  Thiemo Seufer  <ths@mips.com>
1813
1814         * gentmap.c: Fix compile time warning.
1815
1816 2006-11-07  Thiemo Seufer  <ths@mips.com>
1817
1818         * sim-base.h (text_start, text_end, start_addr): Use bfd_vma type
1819         for bfd text addresses.
1820
1821 2006-08-29  Thiemo Seufer  <ths@mips.com>
1822             Nigel Stephens  <nigel@mips.com>
1823
1824         * sim-fpu.c (pack_fpu): Handle QUIET_NAN correctly for
1825         SIM_QUIET_NAN_NEGATED.
1826
1827 2006-08-29  Nigel Stephens  <nigel@mips.com>
1828
1829         * sim-profile.c (profile_pc_init): Initialise default profiling
1830         frequency to a prime number.
1831         (profile_print_pc): Convert gmon.out sample data into target
1832         byte order.
1833
1834 2006-06-13  Richard Earnshaw  <rearnsha@arm.com>
1835
1836         * aclocal.m4: Pass ../../intl to ZW_GNU_GETTEXT_SISTER_DIR.
1837         * common.m4: Likewise.
1838         * configure: Regenerated.
1839
1840 2006-06-05  Daniel Jacobowitz  <dan@codesourcery.com>
1841
1842         * aclocal.m4: Use ZW_GNU_GETTEXT_SISTER_DIR.
1843         * configure: Regenerated.
1844
1845 2006-05-31  Daniel Jacobowitz  <dan@codesourcery.com>
1846
1847         * Make-common.in: Replace INTLLIBS and INTLDEPS with LIBINTL
1848         and LIBINTL_DEP everywhere.
1849         (CSEARCH): Use INCINTL.
1850         * aclocal.m4: Use ZW_GNU_GETTEXT_SISTER_DIR.  Include new
1851         gettext macros.
1852         * configure: Regenerated.
1853
1854 2006-03-29  Hans-Peter Nilsson  <hp@axis.com>
1855
1856         * aclocal.m4 (SIM_AC_OPTION_HARDWARE): Correct duplicate-
1857         option-contents test.
1858
1859 2005-11-28  Mark Mitchell  <mark@codesourcery.com>
1860
1861         * sim-signal.c (sim_signal_to_target): Fix typos.
1862
1863         * sim-reason.c (sim_stop_reason): Use
1864         sim_signal_to_target, not sim_signal_to_host.
1865         * sim-signal.c (sim_signal_to_host): Fix typo.
1866         (sim_signal_to_target): New function.
1867
1868 2005-07-10  Hans-Peter Nilsson  <hp@bitrange.com>
1869
1870         * sim-load.c (xprintf, eprintf): Remove fallout from ANSI_PROTOTYPES
1871         change.
1872
1873 2005-07-08  Ian Lance Taylor  <ian@airs.com>
1874
1875         * sim-fpu.c (sim_fpu_abs): Always clear the sign bit.
1876
1877         * sim-fpu.c (pack_fpu): If SIM_QUIET_NAN_NEGATED is defined, use a
1878         different fraction for a quiet NaN.
1879         (unpack_fpu): Likewise.
1880
1881 2005-07-08  Ben Elliston  <bje@au.ibm.com>
1882
1883         * callback.c: Remove ANSI_PROTOTYPES conditional code.
1884         * sim-load.c: Likewise.
1885         * syscall.c: Likewise.
1886
1887 2005-05-24  Corinna Vinschen  <vinschen@redhat.com>
1888
1889         * Make-common.in (LIBDEPS): Correctly use INTLDEPS for dependency
1890         check.
1891
1892 2005-05-17  Daniel Jacobowitz  <dan@codesourcery.com>
1893
1894         * Make-common.in (install-common, installdirs): Honor $DESTDIR.
1895
1896 2005-04-20  Manoj Iyer  <manjo@austin.ibm.com>
1897
1898         * sim-types.h: Changed unsigned32 and unsigned64 to signed32
1899         and signed64 for __ALPHA__.
1900
1901 2005-03-23  Mark Kettenis  <kettenis@gnu.org>
1902
1903         * aclocal.m4 Include ../../gettext.m4.
1904         (CY_WITH_NLS, CY_GNU_GETTEXT, AM_PATH_PROG_WITH_TEST)
1905         (AM_LC_MESSAGES): Remove.
1906         * configure: Regenerate.
1907
1908 2005-02-28  Jim Blandy  <jimb@redhat.com>
1909
1910         * aclocal.m4 (SIM_AC_OPTION_WARNINGS): Don't include
1911         -Wuninitialized in the default list of build warnings if CFLAGS is
1912         set, and doesn't include -O.  (Using -Wuninitialized without
1913         optimization produces a warning, which interferes with compilation
1914         with -Werror.)
1915
1916 2005-02-21  Jim Blandy  <jimb@redhat.com>
1917
1918         * callback.c (os_fstat): Don't declare 't' unless it's used.
1919
1920 2005-02-09  Jim Blandy  <jimb@redhat.com>
1921
1922         * Make-common.in (CGEN): Load guile.scm, and include a trailing
1923         '-s' argument.
1924         (CGEN_FLAGS_TO_PASS): Include single quotes around the reference
1925         to $(CGEN), to ensure that the command substitution happens where
1926         the variable is referenced in the submake, not when the submake's
1927         arguments are expanded.
1928         (cgen.sh): Be prepared for the 'cgen' argument to contain spaces.
1929         (arch, cpu, decode, cpu-decode, defs, desc): Place the name of the
1930         application Scheme script directly after ${cgen}; don't precede it
1931         with a -s.
1932
1933 2005-01-28  Hans-Peter Nilsson  <hp@axis.com>
1934
1935         * syscall.c (cb_syscall) <case CB_SYS_pipe>: New case.
1936         * callback.c [HAVE_LIMITS_H]: Include limits.h.
1937         Include libiberty.h.
1938         (os_close, os_read, os_write, os_fstat, os_ftruncate): Support fd
1939         being either end of a pipe.
1940         (os_pipe, os_pipe_empty, os_pipe_nonempty): New functions.
1941         (os_shutdown): Clear pipe state.
1942         (default_callback): Initialize new members.
1943
1944         * callback.c (default_callback): Initialize target_endian.
1945         (cb_store_target_endian): Renamed from store, new first parameter
1946         host_callback *cb, drop last parameter big_p.  Take endianness
1947         from cb.
1948         (cb_host_to_target_stat): Change to use cb_store_target_endian.
1949         Remove variable big_p.
1950         * nrun.c (main): Initialize default_callback.target_endian.
1951
1952 2005-01-14  Andrew Cagney  <cagney@gnu.org>
1953
1954         * configure.ac: Replace SIM_AC_COMMON with sinclude of common.m4.
1955         Add explicit call to AC_CONFIG_HEADER.
1956         * common.m4: Delete call to AC_CONFIG_HEADER, update usage.
1957         * configure: Re-generate.
1958
1959 2005-01-12  Andrew Cagney  <cagney@gnu.org>
1960
1961         * common.m4: New file, based on of aclocal.m4.
1962
1963 2005-01-11  Andrew Cagney  <cagney@localhost.localdomain>
1964
1965         * aclocal.m4 (SIM_AC_OUTPUT): Rewrite to use 2.59 macros.
1966         * configure: Regenerated to track ../common/aclocal.m4 changes.
1967
1968 2005-01-07  Andrew Cagney  <cagney@gnu.org>
1969
1970         * configure.ac: Rename configure.in, require autoconf 2.59.
1971         * aclocal.m4 (SIM_AC_COMMON): Delete call to AC_CONFIG_AUX_DIR.
1972         * configure: Re-generate.
1973
1974 2004-12-15  Hans-Peter Nilsson  <hp@axis.com>
1975
1976         * syscall.c (cb_syscall) <case CB_SYS_truncate>
1977         <case CB_SYS_ftruncate>: New cases.
1978
1979 2004-12-13  Hans-Peter Nilsson  <hp@axis.com>
1980
1981         * syscall.c (cb_syscall) <case CB_SYS_lstat>: New case.
1982         (cb_syscall) <case CB_SYS_rename>: New case.
1983         * callback.c (os_lstat): New function.
1984
1985 2004-12-08  Hans-Peter Nilsson  <hp@axis.com>
1986
1987         * run.1: Document --sysroot=filepath.
1988         * sim-options.c (STANDARD_OPTIONS): New member OPTION_SYSROOT.
1989         (standard_options): Support --sysroot=<path>.
1990         (standard_option_handler): Handle OPTION_SYSROOT.
1991         * syscall.c (simulator_sysroot): Define, initialized empty.
1992         (get_path): Prepend simulator_sysroot to absolute file path.
1993         [HAVE_STRING_H]: Include string.h.
1994         [!HAVE_STRING_H && HAVE_STRINGS_H]: Include strings.h.
1995         * nrun.c [HAVE_UNISTD_H]: Include unistd.h.
1996         (main): If simulator_sysroot is not empty, chdir there.
1997         * sim-config.h (simulator_sysroot): Declare.
1998
1999         * aclocal.m4 (SIM_AC_OUTPUT): Substitute @cgen_breaks@ for "break
2000         cgen_rtx_error" in a CGEN-generated simulator.
2001         * gdbinit.in: Break on sim_core_signal too.  Have autoconf
2002         replacement for CGEN-related breakpoints.
2003
2004 2004-12-07  Hans-Peter Nilsson  <hp@axis.com>
2005
2006         * Make-common.in (sim-basics_h): Add $(callback_h).
2007
2008 2004-12-03  Hans-Peter Nilsson  <hp@axis.com>
2009
2010         * configure.in (SIM_CHECK_MEMBERS): Call for struct stat members
2011         st_dev, st_ino, st_mode, st_nlink, st_uid, st_gid, st_rdev,
2012         st_size, st_blksize, st_blocks, st_atime, st_mtime and st_ctime.
2013         * aclocal.m4 (SIM_CHECK_MEMBER, SIM_CHECK_MEMBERS_1)
2014         (SIM_CHECK_MEMBERS): New macros.
2015         * callback.c (cb_host_to_target_stat): Use temporary macro ST_x
2016         for struct stat member test and write.  Add ST_x calls for each
2017         struct stat member tested in configure.in.  Wrap each ST_x call in
2018         #ifdef of configure macro for that member.
2019         * configure, config.in: Regenerate.
2020
2021 2004-12-01  Hans-Peter Nilsson  <hp@axis.com>
2022
2023         * cgen.sh: New thirteenth parameter opcfile, defaulting to
2024         /dev/null.
2025         <case desc>: Pass -OPC opcfile.
2026         * Make-common.in (cgen-desc): Pass $(opcfile) as thirteenth
2027         parameter to cgen.sh.
2028
2029 2004-11-30  Richard Earnshaw  <rearnsha@arm.com>
2030
2031         * Make-common.in (sim-basics_h): Correct dependencies on
2032         cconfig.h and tconfig.h
2033         (sim-load.o): Correct typo in sim-basics_h dependency.
2034
2035 2004-11-18  Richard Earnshaw  <rearnsha@arm.com>
2036
2037         * Make-common.in (sim-*_h): Add macros for all sim headers listing
2038         sub-dependencies for other sim files that they include.
2039         (sim_main_headers): Use sim-*_h macros.
2040         (sim-load.o): Depend on sim-basics_h, not sim_main_headers.
2041
2042 2004-11-16  Hans-Peter Nilsson  <hp@axis.com>
2043
2044         * sim-config.c (sim_config): Recognize when a bfd has unspecified
2045         endian information.
2046
2047         * Make-common.in (sim-load.o): Depend on $(sim_main_headers) and
2048         $(remote_sim_h) too.
2049         (sim_main_headers): Add sim-utils.h.
2050
2051 2004-10-07  Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
2052
2053         * cgen-defs.h (ENDSWITCH): Changed to compile with gcc-3.4.2.
2054
2055 2004-07-26  Andrew Cagney  <cagney@gnu.org>
2056
2057         Problem from Olaf Hering <olh@suse.de>.
2058         * Makefile.in (install-man, installdirs): Add DESTDIR prefix.
2059
2060 2004-07-10  Ben Elliston  <bje@au.ibm.com>
2061
2062         * hw-tree.c (parse_integer_property): Typo fix in comments.
2063         * sim-options.c (sim_args_command): Likewise.
2064
2065 2004-06-28  Andrew Cagney  <cagney@gnu.org>
2066
2067         * run.c: Rename ui_loop_hook to deprecated_ui_loop_hook.
2068
2069 2004-06-27  J"orn Rennecke <joern.rennecke@superh.com>
2070
2071         * callback.c (os_shutdown): Fix bug in last change: actually
2072         mark file descriptors as available on startup.
2073
2074 2004-06-25  J"orn Rennecke <joern.rennecke@superh.com>
2075
2076         [ include/gdb: * callback.h (host_callback_struct): Replace
2077                        members fdopen and alwaysopen with fd_buddy.  ]
2078         * callback.c: Changed all users.
2079
2080 2004-06-15  Alan Modra  <amodra@bigpond.net.au>
2081
2082         * sim-load.c (sim_load_file): Use bfd_get_section_size
2083         instead of bfd_get_section_size_before_reloc.
2084
2085 2004-05-18  Daniel Jacobowitz  <dan@debian.org>
2086
2087         * dv-glue.c (hw_glue_finish): Cast result of sizeof to long before
2088         passing it to printf.
2089
2090 2004-05-10  Daniel Jacobowitz  <dan@debian.org>
2091
2092         * callback.c: Update copyright dates.
2093         * run.c: Likewise.
2094         * sim-basics.h: Likewise.
2095         * sim-load.c: Likewise.
2096         * syscall.c: Likewise.
2097
2098 2004-05-10  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
2099
2100         * callback.c: Include cconfig.h instead of config.h.
2101         * run.c: Likewise.
2102         * sim-basics.h: Likewise.
2103         * sim-load.c: Likewise.
2104         * syscall.c: Likewise.
2105
2106 2004-01-16  Ben Elliston  <bje@wasabisystems.com>
2107
2108         * Makefile.in (clean): Remove rm -f $(ALL), as $(ALL) is empty.
2109
2110 2003-12-19  Kazuhiro Inaoka  <inaoka.kazuhiro@renesas.com>
2111
2112         * sim-core.c (sim_core_trans_addr): Added for m32r-linux-run.
2113
2114 2003-11-22  Kazu Hirata  <kazu@cs.umass.edu>
2115
2116         * sim-options.c (standard_options): Fix the names of H8
2117         variants.
2118
2119 2003-10-30  Andrew Cagney  <cagney@redhat.com>
2120
2121         * sim-trace.c, sim-base.h: Replace "struct symbol_cache_entry"
2122         with "struct bfd_symbol".
2123
2124 2003-10-21  Andrew Cagney  <cagney@redhat.com>
2125
2126         * callback.c (os_truncate): Call "truncate", and not "stat".
2127
2128 2003-10-20  Andrew Cagney  <cagney@redhat.com>
2129
2130         * sim-base.h: Replace "struct sec" with "struct bfd_section".
2131
2132 2003-10-15  J"orn Rennecke <joern.rennecke@superh.com>
2133
2134         * callback.c (os_ftruncate, os_truncate): New functions.
2135         (default_callback): Initialize ftruncate and truncate members.
2136
2137 2003-09-08  Dave Brolley  <brolley@redhat.com>
2138
2139         On behalf of Doug Evans <dje@sebabeach.org>
2140         * cgen.sh: New arg archfile.
2141         * Make-common.in (cgen-arch,cgen-cpu,cgen-defs,cgen-decode,
2142         cgen-cpu-decode,cgen-desc): Update call to cgen.sh.
2143
2144 2003-08-28  Andrew Cagney  <cagney@redhat.com>
2145
2146         * dv-glue.c (hw_glue_finish): Change %d to %ld to match sizeof.
2147         * sim-options.c (print_help): Cast the format with specifier to
2148         "int".
2149
2150 2003-08-20  Michael Snyder  <msnyder@redhat.com>
2151             Dave Brolley  <brolley@redhat.com>
2152
2153         * cgen-par.h (flags, word1): New target-specific
2154         fields of CGEN_WRITE_QUEUE_ELEMENT.
2155         (CGEN_WRITE_QUEUE_ELEMENT_FLAGS): New accessor macro.
2156         (CGEN_WRITE_QUEUE_ELEMENT_WORD1): New accessor macro.
2157         * gennltvals.sh: Add frv target.
2158         * nltvals.def: Add frv target.
2159
2160 2003-06-23  Michael Snyder  <msnyder@redhat.com>
2161
2162         * nrun.c (main): Delete h8/300 ifdef (sim now handles signals).
2163         * sim-reg.c: Fix cut-and-paste bug in comment.
2164
2165 2003-06-22  Andrew Cagney  <cagney@redhat.com>
2166
2167         From matthew green <mrg@redhat.com>:
2168         * sim-fpu.h: Update copyright.
2169         (sim_fpu_fraction, sim_fpu_guard): New prototypes.
2170         * sim-fpu.c: Update copyright.
2171         (sim_fpu_fraction, sim_fpu_guard): New inline functions.
2172
2173 2003-06-17  Frank Ch. Eigler  <fche@redhat.com>
2174
2175         From Doug Evans <dje@sebabeach.org>:
2176         * cgen-trace.h (sim_disasm_read_memory): Update args to be compatible
2177         with disassemble_info:read_memory_func.
2178         * cgen-trace.c (sim_disasm_read_memory): Ditto.
2179
2180 2003-06-04  Michael Snyder  <msnyder@redhat.com>
2181
2182         * common/run.c (main): Remove SIM_H8300 ifdef.
2183         (usage): Ditto.
2184         * common/sim-options.c (STANDARD_OPTIONS): Add SIM_H8300SX.
2185         (standard_options): Add '-x' for h8/300sx.
2186         (standard_option_handler): Add case for SIM_H8300SX.
2187
2188 2003-04-13  Michael Snyder  <msnyder@redhat.com>
2189
2190         * Make-common.in (sim-events.o, sim-config.o): Depend on sim-main.h.
2191
2192 2003-03-01  Andrew Cagney  <cagney@redhat.com>
2193
2194         * sim-engine.c (sim_engine_halt): If jmpbuf is invalid, abort.
2195         (sim_engine_vabort): Ditto.
2196
2197 2003-02-27  Andrew Cagney  <cagney@redhat.com>
2198
2199         * sim-utils.h (sim_analyze_program, sim_load_file): Rename _bfd to bfd.
2200         * sim-hload.c (sim_load), sim-base.h (sim_state_base): Ditto.
2201         * nrun.c (main): Ditto.
2202
2203 2003-02-26  Andrew Cagney  <cagney@redhat.com>
2204
2205         * sim-engine.h (sim_engine_abort): Add noreturn attribute.
2206         (sim_engine_vabort): Ditto.
2207         (sim_engine_halt, sim_engine_restart): Ditto.
2208
2209 2003-02-20  Andrew Cagney  <ac131313@redhat.com>
2210
2211         * Make-common.in (SIM_NEW_COMMON_OBJS): Remove sim-break.o
2212         (sim-break_h): Delete macro.
2213         (sim-break.o): Delete rule.
2214         * sim-break.c: Delete file.
2215         * sim-break.h: Delete file.
2216         * sim-base.h [SIM_HAVE_BREAKPOINTS]: Don't include "sim-break.h".
2217         (STATE_BREAKPOINTS): Delete macro.
2218         (sim_state_base): Delete field breakpoints.
2219         * sim-module.c (modules) [SIM_HAVE_BREAKPOINTS]: Don't add
2220         sim_break_install to array.
2221
2222 2003-01-08  Kazu Hirata  <kazu@cs.umass.edu>
2223
2224         * run.c (usage): Fix typos.
2225
2226 2002-11-27  Richard Sandiford  <rsandifo@redhat.com>
2227
2228         * sim-fpu.c (sim_fpu_inv): Use sim_fpu_div.
2229
2230 2002-11-22  Andrew Cagney  <ac131313@redhat.com>
2231
2232         * dv-core.c: Update copyright.  sim/common contributed to the FSF.
2233         * dv-glue.c, dv-pal.c, hw-base.c, hw-base.h, hw-device.c: Ditto.
2234         * hw-device.h, hw-handles.c, hw-handles.h: Ditto.
2235         * hw-instances.c, hw-instances.h, hw-properties.c: Ditto.
2236         * hw-properties.h, hw-tree.c, hw-tree.h, sim-alu.h: Ditto.
2237         * sim-basics.h, sim-bits.c, sim-bits.h, sim-config.c: Ditto.
2238         * sim-config.h, sim-core.c, sim-core.h, sim-endian.c: Ditto.
2239         * sim-endian.h, sim-events.c, sim-events.h, sim-inline.c: Ditto.
2240         * sim-inline.h, sim-io.c, sim-io.h, sim-n-bits.h: Ditto.
2241         * sim-n-core.h, sim-n-endian.h, sim-types.h: Ditto.
2242
2243 2002-11-13  Andrew Cagney  <cagney@redhat.com>
2244
2245         * run.c (main): Remove SIM_HAVE_ENVIRONMENT from #endif.
2246
2247 2002-11-06  Richard Sandiford  <rsandifo@redhat.com>
2248
2249         * Make-common.in (SIM_EXTRA_DISTCLEAN): New macro.
2250         (distclean): Depend on it.
2251
2252 2002-10-14  Alan Modra  <amodra@bigpond.net.au>
2253
2254         * cgen-trace.h: Test __BFD_H_SEEN__ rather than BFD_VERSION.
2255
2256 2002-08-29  Dave Brolley  <brolley@redhat.com>
2257
2258         * Make-common.in (CGEN_READ_SCM): Remove ../../cgen/stamp-cgen.
2259
2260 2002-07-17  Andrew Cagney  <cagney@redhat.com>
2261
2262         * run-sim.h: Add #ifdef RUN_SIM_H wrapper.
2263         (sim_set_callbacks, sim_size, sim_trace)
2264         (sim_set_trace, sim_set_profile_size, sim_kill): Declare.  Moved
2265         to here from "gdb/remote-sim.h".
2266
2267 2002-07-16  Andrew Cagney  <ac131313@redhat.com>
2268
2269         * sim-resume.c (sim_resume): Add local variable sig_to_deliver to
2270         avoid possible longjmp problems with automatic variable siggnal.
2271
2272 2002-07-14  Andrew Cagney  <ac131313@redhat.com>
2273
2274         From 2002-07-11 Momchil Velikov <velco@fadata.bg>:
2275         * Make-common.in (installdirs): Make $(libdir) too, needed when
2276         installing libsim.a.
2277
2278 2002-07-13  Andrew Cagney  <ac131313@redhat.com>
2279
2280         * gennltvals.sh (dir): Mark d30v as obsolete.
2281         * nltvals.def: Remove d30v.
2282
2283 2002-06-17  Andrew Cagney  <cagney@redhat.com>
2284
2285         * hw-events.c (hw_event_queue_schedule): Initialize `dummy'.
2286
2287         * sim-memopt.c: Include <unistd.h>.
2288         (do_memopt_add): Fix printf format.
2289         * sim-events.c (sim_events_schedule): Initialize ``dummy''.
2290
2291 2002-06-16  Andrew Cagney  <ac131313@redhat.com>
2292
2293         * aclocal.m4 (SIM_AC_OPTION_WARNINGS): Update to match GDB's
2294         --enable-gdb-build-warnings.
2295         * configure: Regenerated to track ../common/aclocal.m4 changes.
2296
2297 2002-06-09  Aldy Hernandez  <aldyh@redhat.com>
2298
2299         * sim-fpu.c (unpack_fpu): Initialize exponent for
2300         sim_fpu_class_zero.
2301         (i2fpu): Same.
2302         (sim_fpu_sqrt): Same.
2303
2304 2002-06-08  Andrew Cagney  <cagney@redhat.com>
2305
2306         * gentmap.c (gen_targ_map_c): Generate "gdb/callback.h".
2307         * sim-basics.h: Include "gdb/callback.h" and "gdb/remote-sim.h".
2308         * run.c: Ditto.
2309         * sim-load.c: Ditto.
2310         * callback.c: Ditto.
2311         * syscall.c: Ditto.
2312         * Make-common.in (callback_h): Define.
2313         (remote_sim_h): Define.
2314         (run.o): Update.
2315         (callback.o): Update.
2316         (syscall.o): Update.
2317         (sim-load.o):
2318         (nrun.o): Update.
2319         (sim-hload.o): Update.
2320         (sim-io.o): Update.
2321         (sim-reason.o): Update.
2322         (sim-reg.o): Update.
2323         (sim-resume.o): Update.
2324
2325 2002-05-30  Kazu Hirata  <kazu@cs.umass.edu>
2326
2327         * run.c: Fix formatting.
2328
2329 2002-05-20  Nick Clifton  <nickc@cambridge.redhat.com>
2330
2331         * run-sim.h: New header.  Provide prototypes for functions used
2332         between run() and libsim.a which are not used by GDB.
2333         * run.c: Include run-sim.h.
2334         (main): If SIM_TARGET_SWITCHES is defined call
2335         sim_target_parse_command_line.
2336         (usage): If SIM_TARGET_SWITCHES is defined call
2337         sim_target_display_usage.
2338
2339 2002-05-17  Andrey Volkov  <avolkov@transas.com>
2340
2341         * run.c: Made h8300s as new target, not h8300h alias.
2342         Added new option -S (h8300s target)
2343         * sim-options.c: Ditto.
2344
2345 2002-05-01  Chris Demetriou  <cgd@broadcom.com>
2346
2347         * callback.c: Use 'deprecated' rather than 'depreciated.'
2348
2349 2002-02-24  Andrew Cagney  <ac131313@redhat.com>
2350
2351         From wiz at danbala:
2352         * sim-fpu.h: Fix grammar and typos.
2353         Fix PR gdb/287.
2354
2355 2002-02-10  Chris Demetriou  <cgd@broadcom.com>
2356
2357         * callback.c: Fix some spelling errors.
2358         * hw-device.h: Likewise.
2359         * hw-tree.c: Likewise.
2360         * sim-abort.c: Likewise.
2361         * sim-alu.h: Likewise.
2362         * sim-core.h: Likewise.
2363         * sim-events.c: Likewise.
2364         * sim-events.h: Likewise.
2365         * sim-fpu.h: Likewise.
2366         * sim-profile.h: Likewise.
2367         * sim-utils.c: Likewise.
2368
2369 2002-01-31  Hans-Peter Nilsson  <hp@axis.com>
2370
2371         * cgen-ops.h (ADDCQI, ADDCFQI, ADDOFQI, SUBCQI, SUBCFQI, SUBOFQI):
2372         New functions.
2373
2374 2002-01-20  Ben Elliston  <bje@redhat.com>
2375
2376         * sim-fpu.h (SIM_FPU_IS_QNAN): Replace "Quite" with "Quiet" in
2377         the comment for this enumerator.
2378
2379 2002-01-14  Ben Elliston  <bje@redhat.com>
2380
2381         * sim-fpu.h: Fix comment about sim_fpu_* constants.
2382
2383 2001-12-20  Kazu Hirata  <kazu@hxi.com>
2384
2385         * run.c (usage): Fix a typo.
2386
2387 2001-07-05  Ben Elliston  <bje@redhat.com>
2388
2389         * Make-common.in (srccgen): Remove.
2390         (CGEN_CPU_DIR): Define.
2391         (CGEN_READ_SCM): Redefine without $(srccgen).
2392         (CGEN_ARCH_SCM): Ditto.
2393         (CGEN_CPU_SCM): Ditto.
2394         (CGEN_DECODE_SCM): Ditto.
2395         (CGEN_DESC_SCM): Ditto.
2396
2397 2001-04-25  Frank Ch. Eigler  <fche@redhat.com>
2398
2399         * sim-load.c (sim_load_file): Put it back: external now.
2400         * sim-utils.c (sim_analyze_program): Ditto.  Nyuk nyuk nyuk.
2401
2402 2001-04-21  Andrew Cagney  <ac131313@redhat.com>
2403
2404         * sim-load.c (sim_load_file): Delete call bfd_cache_close.  BFD
2405         internal interface.
2406         * sim-utils.c (sim_analyze_program): Ditto.
2407
2408 2001-04-19  Frank Ch. Eigler  <fche@redhat.com>
2409
2410         * sim-utils.c (sim_analyze_program): Call bfd_cache_close after
2411         we're finished with its immediate use.
2412         * sim-load.c (sim_load_file): Ditto.
2413
2414 2001-03-16  Frank Ch. Eigler  <fche@redhat.com>
2415
2416         Add support for mmap-based memory regions.
2417         * sim-memopt.c (mmap_next_fd): New global.
2418         (sim_memory_init): Reinitialize it.
2419         (OPTION_MEMORY_MAPFILE, memory_option_handler): Support new
2420         "--memory-mapfile FILE" option.  Check for some errors.
2421         (do_memopt_add): Conditionally do mmap instead of malloc for
2422         backing store of simulated memory.  Check for more errors.
2423         (do_simopt_delete, sim_memory_uninstall): Corresponding cleanup.
2424         * sim-memopt.h (munmap_length): New member of _sim_memopt.
2425         * configure.in: Look for mmap/fstat related functions and headers.
2426         * config.in, configure: Regenerated.
2427
2428 2001-03-15  Frank Ch. Eigler  <fche@redhat.com>
2429
2430         * sim-core.c (sim_core_map_attach): Correct overlap-related
2431         error messages.
2432
2433 2001-03-07  Michael Meissner  <meissner@redhat.com>
2434
2435         * run.c (alloca-conf.h): Delete, no longer provided.
2436
2437 2001-02-22  Ben Elliston  <bje@redhat.com>
2438
2439         * sim-trace.h (TRACE_VPU_IDX): Add.
2440         (TRACE_vpu): Define.
2441         (WITH_TRACE_VPU_P): Likewise.
2442         (TRACE_VPU_P): Likewise.
2443         * sim-trace.c (OPTION_TRACE_VPU): Define.
2444         (trace_options): Add --trace-vpu.
2445         (trace_option_handler): Handle OPTION_TRACE_VPU.
2446         (trace_option_handler): Include VPU tracing in --trace-semantics.
2447         (trace_idx_to_str): Handle TRACE_VPU_IDX.
2448
2449 2001-02-21  Ben Elliston  <bje@redhat.com>
2450
2451         * sim-trace.h (TRACE_BRANCH_INPUT1): New macro.
2452         (TRACE_BRANCH_INPUT2): Likewise.
2453
2454 2001-02-09  Ben Elliston  <bje@redhat.com>
2455
2456         * (profile_print_pc): Write header out in target byte order.
2457
2458 2001-02-09  Ben Elliston  <bje@redhat.com>
2459
2460         * sim-profile.c (profile_pc_init): Correct bug in loop logic when
2461         adjusting the pc shift value.
2462
2463 2001-01-12  Chris Demetriou  <cgd@sibyte.com>
2464
2465         * aclocal.m4 (SIM_AC_OPTION_SCACHE): Properly handle the case
2466         where a numeric value is supplied.
2467
2468 2001-01-06  Ben Elliston  <bje@redhat.com>
2469
2470         * cgen.sh: Allow extrafiles to include the semantics files when
2471         generating an ISA-specific decoder.
2472
2473 2000-12-27  Alexandre Oliva  <aoliva@redhat.com>
2474
2475         * Make-common.in (sim-io.o): Depend on targ-vals.h.
2476
2477 2000-12-23  Ben Elliston  <bje@redhat.com>
2478
2479         * cgen-trace.c (trace_result): Handle 'f' type operands; output
2480         them to the trace stream using sim_fpu_printn_fpu. Include
2481         "sim-fpu.h".
2482
2483 2000-12-15  Ben Elliston  <bje@redhat.com>
2484
2485         * sim-fpu.h (sim_fpu_printn_fpu): Declare.
2486         * sim-fpu.c (print_bits): Add digits parameter. Print only as many
2487         trailing digits as specified (-1 to print all digits).
2488         (sim_fpu_print_fpu): New wrapper around sim_fpu_printn_fpu.
2489         (sim_fpu_printn_fpu): Rename from sim_fpu_print_fpu; update calls
2490         to print_bits ().
2491
2492 2000-12-13  Ben Elliston  <bje@redhat.com>
2493
2494         * cgen.sh: Set prefix/PREFIX (append ISA if applicable). Factor
2495         sed expressions into $sedscript, substituting @prefix@/@PREFIX@.
2496         (defs): New action.
2497
2498 2000-12-12  Geoffrey Keating  <geoffk@redhat.com>
2499
2500         * sim-endian.h: Don't have parameters on macro definitions which
2501         are simply renaming functions, to permit use of XCONCAT2 in both
2502         the macro name and the arguments in a use of such a definition.
2503
2504 2000-12-11  Ben Elliston  <bje@redhat.com>
2505
2506         * cgen-ops.h (SUBWORDDFDI): New function.
2507
2508 2000-12-05  Ben Elliston  <bje@redhat.com>
2509
2510         * Make-common.in (cgen-defs): New target.
2511         (cgen-decode): Pass $(EXTRAFILES).
2512
2513         * genmloop.sh: Use @prefix@, not @cpu@ throughout. Add -prefix and
2514         -outfile-suffix options.
2515
2516 2000-12-04  Ben Elliston  <bje@redhat.com>
2517
2518         * cgen-ops.h (SUBWORDSIQI): Mask off top bits.
2519         (SUBWORDSIUQI): Likewise.
2520         (SUBWORDDIHI): Likewise.
2521         (SUBWORDDIQI): New function.
2522
2523         * cgen-trace.c (disassemble_insn): Remove unused declaration.
2524         * cgen-scache.c (scache_option_handler): Remove unused local var.
2525
2526 2000-12-03  Ben Elliston  <bje@redhat.com>
2527
2528         * sim-profile.c (profile_option_handler): Remove unused prof_nr.
2529
2530 2000-11-26  Stephane Carrez  <Stephane.Carrez@worldnet.fr>
2531
2532         * hw-events.c (delete_hw_event_data): Remove the scheduled events.
2533
2534 2000-11-26  Stephane Carrez  <Stephane.Carrez@worldnet.fr>
2535
2536         * dv-core.c (dv_core_attach_address_callback): Don't abort if
2537         space is not zero.
2538
2539 2000-11-24  Stephane Carrez  <Stephane.Carrez@worldnet.fr>
2540
2541         * hw-base.c (hw_delete): Don't free base_of_hw since it's freed.
2542         (set_hw_delete): Moved the macro as a function.
2543         * hw-base.h (set_hw_delete): Declare as external function.
2544         * hw-alloc.c (delete_hw_alloc_data): Allow to free the memory
2545         allocated using hw_malloc.
2546
2547 2000-11-24  Stephane Carrez  <Stephane.Carrez@worldnet.fr>
2548
2549         * sim-options.c (sim_parse_args): Free the memory used for
2550         long_options, short_options, handlers, opt_cpu, orig_val.
2551
2552 2000-11-20  Ben Elliston  <bje@redhat.com>
2553
2554         * cgen-ops.h (SUBBI): New macro.
2555         (SUBWORDSIQI, SUBWORDSIHI, SUBWORDSIUQI): New functions.
2556         (SUBWORDDIHI, SUBWORDDIUQI, SUBWORDDIDF): Likewise.
2557
2558 2000-11-16  Ben Elliston  <bje@redhat.com>
2559
2560         * cgen-types.h (VOID): New type.
2561
2562 2000-11-09  Ben Elliston  <bje@redhat.com>
2563
2564         * sim-fpu.c (sim_fpu_one): Set exponent to 0.
2565         (sim_fpu_two): Set exponent to 1.
2566
2567 2000-10-26  Ben Elliston  <bje@redhat.com>
2568
2569         * cgen.sh: Handle an isa argument between cpu and mach. Default to
2570         `all'. Pass `-i' options to cgen applications.
2571         * Make-common.in (cgen-arch, cgen-cpu, cgen-decode, cgen-cpu-decode,
2572         cgen-desc): Pass $(isa) to cgen.sh.
2573
2574 2000-10-08  Ben Elliston  <bje@redhat.com>
2575
2576         * cgen-utils.c (cgen_rtx_error): New function.
2577
2578 2000-10-07  Ben Elliston  <bje@redhat.com>
2579
2580         * cgen-trace.c (sim_cgen_disassemble_insn): Handle failure
2581         conditions for sim_core_read_buffer().
2582
2583 2000-09-26  Dave Brolley  <brolley@redhat.com>
2584
2585         * cgen-utils.c (RORQI): New function.
2586         (ROLQI): New function.
2587         (RORHI): New function.
2588         (ROLHI): New function.
2589
2590 2000-08-28  Dave Brolley  <brolley@redhat.com>
2591
2592         * cgen-trace.c (sim_cgen_disassemble_insn): Make sure entire insn is
2593         in insn_value if it will fit.
2594
2595 2000-08-21  Frank Ch. Eigler  <fche@redhat.com>
2596
2597         * Make-common.in, cgen.sh: Contribute CGEN-related build targets/rules.
2598
2599 2000-08-15  Dave Brolley  <brolley@redhat.com>
2600
2601         * sim-profile.c (profile_print_speed): Print cpu frequency if not zero.
2602
2603 2000-08-15  Dave Brolley  <brolley@redhat.com>
2604
2605         * sim-profile.h (PROFILE_DATA): Add cpu_freq.
2606         (PROFILE_CPU_FREQ): New macro.
2607         * sim-profile.c (OPTION_PROFILE_CPU_FREQUENCY): New enumerator.
2608         (profile-options): Add profile-cpu-frequency.
2609         (parse_frequency): New function.
2610         (profile_option_handler): Handle OPTION_PROFILE_CPU_FREQUENCY.
2611         (profile_print_speed): Print cpu frequency and simulated execution time.
2612         Re-indent other items to match.
2613
2614 2000-08-09  Andrew Cagney  <cagney@lulu.cygnus.com>
2615
2616         * dv-sockser.c (dv_sockser_init): Eliminate MIN macro.
2617
2618 2000-07-27  Frank Ch. Eigler  <fche@redhat.com>
2619
2620         From Maciej W. Rozycki <macro@ds2.pg.gda.pl>
2621         * Makefile.in (install): Install run.1 man page.
2622
2623 Thu Jul 27 21:56:08 2000  Andrew Cagney  <cagney@b1.cygnus.com>
2624
2625         From 2000-06-23 Doug Evans <dje@casey.transmeta.com>:
2626         * Makefile.in (headers,nltvals.def): Merge.
2627
2628 Thu Jul 27 20:37:47 2000  Andrew Cagney  <cagney@b1.cygnus.com>
2629
2630         From 2000-06-25 Stephane Carrez <Stephane.Carrez@worldnet.fr>:
2631         * nrun.c (main): Print the simulator statistics only in
2632         verbose mode.
2633         * hw-properties.h (hw_find_integer_array_property): Fix
2634         prototype (use signed_cell).
2635
2636         From 2000-06-25 Stephane Carrez <Stephane.Carrez@worldnet.fr>:
2637         * sim-events.c (sim_events_remain_time): New function returning
2638         the time that remains before the event is raised.
2639         * hw-events.c (hw_event_remain_time): Likewise.
2640         * sim-events.h (sim_events_remain_time): Declare.
2641         * hw-events.h (hw_event_remain_time): Declare.
2642
2643         From 2000-06-25 Stephane Carrez <Stephane.Carrez@worldnet.fr>:
2644         * sim-hw.c: Use <errno.h> instead of <sys/errno.h>
2645         (OPTION_HW_LIST): New option --hw-list to list the devices.
2646         (hw_option_handler): List the device tree with 'sim_hw_print'.
2647
2648         From 2000-06-25 Stephane Carrez <Stephane.Carrez@worldnet.fr>:
2649         * sim-bits.h (_MSB_16, _LSB_16): Define for 16-bit targets.
2650         (MASK, LSBIT, MSBIT): Likewise and use _MSB_16 and _LSB_16.
2651         (EXTENDED): Define for 16-bit word size.
2652         * sim-bits.c (LSEXTRACTED, MSEXTRACTED, LSINSERTED,
2653         MSINSERTED, LSSEXT, MSSEXT): Implement for 16-bit word size.
2654         * sim-types.h: Added support for 16-bit targets.
2655
2656 2000-06-23  Frank Ch. Eigler  <fche@redhat.com>
2657
2658         * cgen-trace.h (TRACE_USEFUL_MASK): Remove TRACE_EVENTS_IDX.
2659
2660 2000-06-24  Frank Ch. Eigler  <fche@redhat.com>
2661
2662         From Maciej W. Rozycki <macro@ds2.pg.gda.pl>:
2663         * Makefile.in (distclean): Clean cconfig.h also.
2664
2665 Tue May 23 21:39:23 2000  Andrew Cagney  <cagney@b1.cygnus.com>
2666
2667         * configure: Regenerated to track ../common/aclocal.m4 changes.
2668
2669 Tue May 23 21:35:53 2000  Andrew Cagney  <cagney@b1.cygnus.com>
2670
2671         * aclocal.m4 (sim-profile): Enable the profiler by default.
2672
2673 Tue May 23 20:30:12 2000  Andrew Cagney  <cagney@amy.cygnus.com>
2674
2675         * run.c (main): Initialize sigrc.
2676
2677 Wed Apr 26 16:18:44 2000  Andrew Cagney  <cagney@b1.cygnus.com>
2678
2679         * sim-events.c (update_time_from_event): Add more detailed event
2680         tracing.
2681
2682 2000-03-30  Dave Brolley  <brolley@redhat.com>
2683
2684         * aclocal.m4 (cgen): Use guile to run cgen.
2685
2686 2000-03-23  Dave Brolley  <brolley@redhat.com>
2687
2688         * cgen-fpu.h: Rename extsfdf to fextsfdf. Rename truncdfsf to
2689         ftruncdfsf.
2690         * cgen-accfp.c (fextsfdf): New function.
2691         (ftruncdfsf): New function.
2692         (cgen_init_accurate_fpu): Initialize fextsfdf and ftruncdfsf.
2693
2694 2000-03-13  Jeff Johnston <jjohnstn@cygnus.com>
2695
2696         * cgen-ops.h: Added TRUNCSISI.
2697
2698 2000-03-08  Dave Brolley  <brolley@redhat.com>
2699
2700         * cgen-par.h (cgen_write_queue_kind): Add CGEN_FN_SF_WRITE.
2701         (CGEN_WRITE_QUEUE_ELEMENT): Add fn_sf_write.
2702         (sim_queue_fn_si_write): Last argument is has type USI.
2703         (sim_queue_fn_sf_write): New function.
2704         * cgen-par.c (sim_queue_fn_si_write): Declare 'value' as USI.
2705         (sim_queue_fn_sf_write): New function.
2706         (cgen_write_queue_element_execute): Handle CGEN_FN_SF_WRITE.
2707
2708 Tue Feb 22 16:45:09 2000  Andrew Cagney  <cagney@b1.cygnus.com>
2709
2710         * run.c (main): When SIM_HAVE_ENVIRONMENT enable tracing with
2711         sim_set_trace and run simulator using sim_resume.
2712         (main): Add option ``-o'' - operating environment.  Only continue
2713         after a signal when operating environment.
2714         (main): Always set REASON and SIGRC using sim_stop_reason.
2715         (sim_trace): Delete extern declaration.
2716
2717 2000-02-08  Nick Clifton  <nickc@cygnus.com>
2718
2719         * callback.c: Fix compile time warning messages.
2720         * run.c: Fix compile time warning messages.
2721
2722 1999-12-17  Dave Brolley  <brolley@cygnus.com>
2723
2724         * sim-profile.h: (set_profile_option_mask): Add prototype.
2725         * sim-profile.c (set_profile_option_mask): No longer static.
2726
2727 Wed Dec  8 21:47:13 1999  Andrew Cagney  <cagney@b1.cygnus.com>
2728
2729         * sim-arange.c: Include <string.h>
2730
2731 1999-12-07  Dave Brolley  <brolley@cygnus.com>
2732
2733         * sim-options.c (print_help): '=' required before optional argument.
2734         * cgen-par.h (CGEN_FN_MEM_QI_WRITE): New enumerator.
2735         (CGEN_FN_MEM_HI_WRITE): New enumerator.
2736         (CGEN_FN_MEM_SI_WRITE): New enumerator.
2737         (CGEN_FN_MEM_DI_WRITE): New enumerator.
2738         (CGEN_FN_MEM_DF_WRITE): New enumerator.
2739         (CGEN_FN_MEM_XI_WRITE): New enumerator.
2740         (fn_mem_qi_write): New union members.
2741         (fn_mem_hi_write): New union members.
2742         (fn_mem_si_write): New union members.
2743         (fn_mem_di_write): New union members.
2744         (fn_mem_df_write): New union members.
2745         (fn_mem_xi_write): New union members.
2746         (sim_queue_fn_mem_qi_write): New function.
2747         (sim_queue_fn_mem_hi_write): New function.
2748         (sim_queue_fn_mem_si_write): New function.
2749         (sim_queue_fn_mem_di_write): New function.
2750         (sim_queue_fn_mem_df_write): New function.
2751         (sim_queue_fn_mem_xi_write): New function.
2752         * cgen-par.c (sim_queue_fn_mem_qi_write): New function.
2753         (sim_queue_fn_mem_hi_write): New function.
2754         (sim_queue_fn_mem_si_write): New function.
2755         (sim_queue_fn_mem_di_write): New function.
2756         (sim_queue_fn_mem_df_write): New function.
2757         (sim_queue_fn_mem_xi_write): New function.
2758         (cgen_write_queue_element_execute): Handle CGEN_FN_MEM_QI_WRITE,
2759         CGEN_FN_MEM_HI_WRITE, CGEN_FN_MEM_SI_WRITE, CGEN_FN_MEM_DI_WRITE,
2760         CGEN_FN_MEM_DF_WRITE, CGEN_FN_MEM_XI_WRITE.
2761
2762 1999-12-01  Dave Brolley  <brolley@cygnus.com>
2763
2764         * cgen-accfp.c (subsf): Check status code.
2765         (mulsf): Ditto.
2766         (negsf): Ditto.
2767         (abssf): Ditto.
2768         (sqrtsf): Ditto.
2769         (invsf): Ditto.
2770         (minsf): Ditto.
2771         (maxsf): Ditto.
2772         (subdf): Ditto.
2773         (muldf): Ditto.
2774         (divdf): Ditto.
2775         (negdf): Ditto.
2776         (absdf): Ditto.
2777         (sqrtdf): Ditto.
2778         (invdf): Ditto.
2779         (mindf): Ditto.
2780         (maxdf): Ditto.
2781
2782 1999-11-26  Dave Brolley  <brolley@cygnus.com>
2783
2784         * cgen-par.h (fn_df_write): Mode of data is DF.
2785         (sim_queue_fn_df_write): Mode of data is DF.
2786         * cgen-par.c (sim_queue_fn_df_write): Mode of data is DF.
2787
2788 1999-11-22  Dave Brolley  <brolley@cygnus.com>
2789
2790         * cgen-trace.c (SIZE_TRACE_BUF): Inxrease size of trace buffer.
2791         * cgen-par.h (CGEN_WRITE_QUEUE_SIZE): Increase size of queue.
2792
2793 1999-11-04  Dave Brolley  <brolley@cygnus.com>
2794
2795         * cgen-par.h (cgen_write_queue_kind): Add CGEN_FN_XI_WRITE and
2796         CGEN_MEM_XI_WRITE members.
2797         (CGEN_WRITE_QUEUE_ELEMENT): Add fn_xi_write and mem_xi_write members.
2798         (sim_queue_fn_xi_write): New function.
2799         (sim_queue_mem_xi_write): New function.
2800
2801         * cgen-par.c (sim_queue_fn_xi_write): New function.
2802         (sim_queue_mem_xi_write): New function.
2803         (cgen_write_queue_element_execute): Handle CGEN_FN_XI_WRITE and
2804         CGEN_MEM_XI_WRITE.
2805
2806 1999-10-22  Dave Brolley  <brolley@cygnus.com>
2807
2808         * cgen-par.h (insn_address): New field in CGEN_WRITE_QUEUE_ELEMENT.
2809         (CGEN_WRITE_QUEUE_ELEMENT_IADDR): New macro.
2810         * cgen-par.c: Set insn_address for each queued write. Get pc from
2811         cpu when executing queued writes.
2812
2813 1999-10-19  Dave Brolley  <brolley@cygnus.com>
2814
2815         * cgen-par.h (sim_queue_fn_pc_write): New function.
2816         (CGEN_FN_PC_WRITE): New enumerator.
2817         (fn_pc_write): New union member.
2818         * cgen-par.c (sim_queue_fn_pc_write): New function.
2819         (cgen_write_queue_element_execute): Handle CGEN_FN_PC_WRITE.
2820
2821 1999-10-18  Dave Brolley  <brolley@cygnus.com>
2822
2823         * cgen-par.h (CGEN_MEM_DI_WRITE): New enumerator.
2824         (CGEN_MEM_DF_WRITE): New enumerator.
2825         (mem_di_write): New union member.
2826         (mem_df_write): New union member.
2827         * cgen-par.c (sim_queue_mem_di_write): New function.
2828         (sim_queue_mem_df_write): New function.
2829         (cgen_write_queue_element_execute): Handle CGEN_MEM_DI_WRITE and
2830         CGEN_MEM_DF_WRITE.
2831         * cgen-accfp.c (divsf): Check for division errors.
2832
2833 1999-10-14  Doug Evans  <devans@casey.cygnus.com>
2834
2835         * cgen-engine.h (EXTRACT_INT,EXTRACT_UINT): Delete.
2836
2837 1999-10-07  Dave Brolley  <brolley@cygnus.com>
2838
2839         * cgen-par.h (CGEN_FN_HI_WRITE): New enumerator.
2840         (fn_hi_write): New union member.
2841         (sim_queue_fn_hi_write): New function.
2842         * cgen-par.c (sim_queue_fn_hi_write): New function.
2843         (cgen_write_queue_element_execute): Handle CGEN_FN_HI_WRITE.
2844
2845 1999-09-29  Doug Evans  <devans@casey.cygnus.com>
2846
2847         * cgen-defs.h (sim_engine_invalid_insn): New arg `vpc'.
2848         Change type of result to SEM_PC.
2849
2850 Wed Sep 29 14:43:57 1999  Dave Brolley  <brolley@cygnus.com>
2851
2852         * cgen-defs.h (sim_engine_invalid_insn): Now returns PC.
2853
2854 1999-09-25  Doug Evans  <devans@casey.cygnus.com>
2855
2856         * cgen-ops.h (SUBWORD*): Delete cpu arg.
2857         (JOIN*): Delete cpu arg.
2858
2859 Tue Sep 21 17:14:16 1999  Dave Brolley  <brolley@cygnus.com>
2860
2861         * genmloop.sh (@cpu@_scache_lookup): No longer takes last_insn_p
2862         parameter.
2863         (SET_LAST_INSN_P): Set last_insn_p flag in the scache element.
2864
2865 Mon Sep 20 21:44:06 1999  Geoffrey Keating  <geoffk@cygnus.com>
2866
2867         * sim-fpu.c (i2fpu): Keep the guard bits sticky when converting
2868         large values.
2869
2870 Tue Feb  8 16:33:48 2000  Andrew Cagney  <cagney@b1.cygnus.com>
2871
2872         * run.c (main): Check the sim_stop_reason and only halt simulation
2873         when a valid stop condition is identified.
2874
2875 Wed Sep 15 14:12:37 1999  Andrew Cagney  <cagney@b1.cygnus.com>
2876
2877         * hw-tree.c, hw-properties.c, hw-instances.c: Include "sim-io.h".
2878
2879 Tue Sep 14 14:15:47 1999  Dave Brolley  <brolley@cygnus.com>
2880
2881         * cgen-par.h (CGEN_BI_WRITE): New enumerator.
2882         (bi_write): New union element.
2883         (sim_queue_bi_write): New function.
2884         * cgen-par.c (sim_queue_bi_write): New function.
2885         (cgen_write_queue_element_execute): Handle CGEN_BI_WRITE.
2886
2887 Thu Sep  2 18:15:53 1999  Andrew Cagney  <cagney@b1.cygnus.com>
2888
2889         * configure: Regenerated to track ../common/aclocal.m4 changes.
2890
2891         * aclocal.m4 (WERROR_CFLAGS, WARN_CFLAGS): Merge from
2892         ../gdb/configure.in.
2893         * Make-common.in (WERROR_CFLAGS, WARN_CFLAGS): Define.
2894         (SIM_WERROR_CFLAGS, SIM_WARN_CFLAGS): Define.
2895         (SIM_WARNINGS): Delete
2896         (CONFIG_CFLAGS): Update.
2897
2898 Tue Aug 31 16:01:42 1999  Dave Brolley  <brolley@cygnus.com>
2899
2900         * cgen-par.c: New file.
2901         * cgen-par.h: New file.
2902         * cgen-sim.h (cgen-par.h): #include it.
2903         * cgen-cpu.h (write_queue): New field.
2904         (CPU_WRITE_QUEUE): New access macro.
2905         * Make-common.in (CGEN_MAIN_CPU_DEPS): Add cgen-par.h.
2906         (cgen-par.o): New target.
2907
2908 1999-08-28  Doug Evans  <devans@casey.cygnus.com>
2909
2910         * cgen-types.h (mode_type,MODE_VOID): Renamed from MODE_VM.
2911         * cgen-utils.c (mode_names): Update.
2912
2913 1999-08-20  Doug Evans  <devans@casey.cygnus.com>
2914
2915         * genmloop.sh: New args -parallel-generic-write, -parallel-only.
2916         * cgen-engine.h (SEMANTIC_FN): Don't use version with PAREXEC
2917         buffer arg if WITH_PARALLEL_GENWRITE.
2918         (struct insn_sem): Handle WITH_PARALLEL_GENWRITE.
2919         (struct idesc): Ditto.
2920
2921 Wed Aug 18 18:17:28 1999  Doug Evans  <devans@canuck.cygnus.com>
2922
2923         * sim-model.c (model_option_handler): Add \n to error message.
2924
2925 1999-08-08  Doug Evans  <devans@casey.cygnus.com>
2926
2927         * cgen-engine.h (SEM_FN_NAME,SEMF_FN_NAME): Delete.
2928         (insn_sem): Rewrite.
2929         (sem_fn_desc): New struct.
2930         (idesc): Rewrite.
2931         * genmloop.sh (scache case,@cpu@_scache_lookup): Profile scache hit,
2932         misses if ! FAST_P.
2933         (scache case): Split into non-parallel/parallel versions.
2934         (@cpu@_engine_run_{full,fast}): Call @cpu@_{sem,semf}_init_idesc_table
2935         if not use semantic switch version.
2936
2937 1999-08-04  Doug Evans  <devans@casey.cygnus.com>
2938
2939         * cgen-defs.h (SEM_BRANCH_TYPE): New enum.
2940         * cgen-engine.h (SEM_BRANCH_UNTAKEN,SEM_BRANCH_UNCACHEABLE): Delete.
2941         (SEM_BRANCH_INIT_EXTRACT): Delete.
2942         (SEM_BRANCH_INIT): Replace npc_ptr with br_type.
2943         (SEM_BRANCH_FINI): Ditto.
2944         (SEM_BRANCH_VIA_ADDR): Ditto.
2945         (SEM_BRANCH_VIA_CACHE): Ditto.  Delete cachvarptr arg.
2946         (SEM_BRANCH_ADDR_CACHE): Delete.
2947         (SEM_SKIP_COMPILE,SEM_SKIP_INSN): New macros.
2948         * cgen-scache.h (cpu_scache): Replace member pbb_pr_npc_ptr with
2949         pbb_br_type.
2950         * genmloop.sh (eng.hin): Update prototype of ${cpu}_pbb_cti_chain.
2951         (@cpu@_pbb_begin): Initialize branch_target.
2952         (@cpu@_pbb_cti_chain): Replace arg new_vpc_ptr with br_type.
2953         (@cpu@_engine_run_full): Replace local pbb_br_npc_ptr with
2954         pbb_br_type.
2955         (@cpu@_engine_run_fast): Ditto.
2956
2957 Fri Jul 16 14:47:53 1999  Dave Brolley  <brolley@cygnus.com>
2958
2959         * cgen-utils.c (RORSI): New function.
2960         (ROLSI): New function.
2961
2962 1999-07-14  Doug Evans  <devans@casey.cygnus.com>
2963
2964         * Makefile.in (TAGS): Tweak TAGS regex.
2965         * cgen-mem.h (*): Add TAGS markers.
2966
2967 Sun Jul 11 23:47:20 1999  Andrew Cagney  <cagney@b1.cygnus.com>
2968
2969         * sim-resume.c (sim_resume): Ensure that the siggnal [sic] is only
2970         passed in when sim_resume is first entered - don't re-pass it
2971         after a restart.
2972
2973 Sun Jul 11 23:34:44 1999  Andrew Cagney  <cagney@b1.cygnus.com>
2974
2975         * sim-options.c (standard_option_handler): Add OPTION_LOAD_VMA and
2976         OPTION_LOAD_LMA but only when is defined.
2977         (standard_options): When SIM_HANDLES_LMA is defined include
2978         options --load-lma and --load-vma.
2979         (standard_install): Initialize STATE_LOAD_AT_LMA_P.
2980
2981         * sim-base.h (STATE_LOAD_AT_LMA_P): Define.
2982         (struct sim_state_base): Add load_at_lma_p.
2983         * sim-hload.c (sim_load): Replace SIM_HANDLES_LMA with
2984         STATE_LOAD_AT_LMA_P.
2985
2986 Sun Jul 11 12:03:36 1999  Andrew Cagney  <cagney@b1.cygnus.com>
2987
2988         * nrun.c (main): Re-format loop gnu style.
2989
2990 Wed Jul  7 19:56:03 1999  Andrew Cagney  <cagney@b1.cygnus.com>
2991
2992         * dv-sockser.c (connected_p): Initialize addrlen.
2993
2994 1999-07-06  Dave Brolley  <brolley@cygnus.com>
2995
2996         * cgen-accfp.c (floatsidf): New function.
2997         (fixdfsi): New function.
2998
2999 1999-07-06  Doug Evans  <devans@casey.cygnus.com>
3000
3001         * sim-model.c (sim_model_init): Issue error if machine is unsupported.
3002
3003 1999-07-05  Doug Evans  <devans@casey.cygnus.com>
3004
3005         * Make-common.in (CGEN_MAIN_CPU_DEPS): Add cgen-fpu.h.
3006         (cgen-fpu.o,cgen-accfp.o): Add rules for.
3007         * cgen-fpu.c: New file.
3008         * cgen-fpu.h: New file.
3009         * cgen-accfp.c: New file.
3010         * cgen-cpu.h (CGEN_CPU): New member fpu.
3011         * cgen-mem.h: Redo fp support.
3012         * cgen-ops.h: Delete k&r support.  Redo fp support.
3013         * cgen-sim.h: Include cgen-fpu.h.
3014         * cgen-types.h (SF,DF,XF,TF): Moved to cgen-fpu.h.
3015
3016 1999-06-23  Doug Evans  <devans@casey.cygnus.com>
3017
3018         * cgen-engine.h (TARGET_SEM_BRANCH_FINI): Remove cruft at end of
3019         ifndef.
3020         * genmloop.sh (@cpu@_scache_lookup): Delete unused local var.
3021         (@cpu@_pbb_cti_chain): Minor clean up.
3022
3023 1999-05-08  Felix Lee  <flee@cygnus.com>
3024
3025         * aclocal.m4: Use AC_EXEEXT instead of AM_EXEEXT.  Delete defn of
3026         AM_CYGWIN32 and AM_EXEEXT.
3027         * configure: Regenerate.
3028
3029 Fri Apr 16 16:43:22 1999  Doug Evans  <devans@charmed.cygnus.com>
3030
3031         * sim-core.c (device_error,device_io_read_buffer,
3032         device_io_write_buffer): Delete decls.
3033         * sim-core.h: Put them here.
3034
3035         * sim-core.c (sim_core_read_buffer): Pass sd to device_io_read_buffer.
3036         (sim_core_write_buffer): Pass sd to device_io_write_buffer.
3037         * sim-n-core.h (sim_core_read_aligned_N): Ditto.
3038         (sim_core_write_aligned_N): Ditto.
3039
3040 1999-04-14  Stephane Carrez  <stcarrez@worldnet.fr>
3041
3042         * sim-memopt.c (sim_memory_uninstall): Don't look into
3043         free()d memory.
3044
3045 1999-04-14  Doug Evans  <devans@casey.cygnus.com>
3046
3047         * cgen-utils.scm (virtual_insn_entries): Update attribute definition.
3048
3049 1999-04-13  Doug Evans  <devans@casey.cygnus.com>
3050
3051         * sim-core.c (sim_core_read_buffer): Handle NULL cpu when WITH_DEVICES.
3052         (sim_core_write_buffer): Ditto.
3053
3054 1999-04-02  Keith Seitz  <keiths@cygnus.com>
3055
3056         * sim-io.c (sim_io_poll_quit): Only call the poll_quit callback
3057         after the interval counter has expired.
3058         (POLL_QUIT_INTERVAL): Define. Used to tweak the frequency of
3059         poll_quit callbacks. May be overridden by Makefile.
3060         (poll_quit_counter): New global.
3061         * sim-events.c: Remove all mentions of ui_loop_hook. The
3062         host callback "poll_quit" will serve the purpose.
3063         * run.c: Add definition of ui_loop_hook when NEED_UI_LOOP_HOOK
3064         is defined.
3065         * nrun.c: Remove declaration of ui_loop_hook.
3066
3067 Wed Mar 31 18:55:41 1999  Doug Evans  <devans@canuck.cygnus.com>
3068
3069         * cgen-run.c (sim_resume): Don't tell main loop to run "forever"
3070         if being used by gdb.
3071
3072 1999-03-22  Doug Evans  <devans@casey.cygnus.com>
3073
3074         * cgen-types.h (XF,TF): Tweak.
3075         * cgen-ops.h: Redo inline support.  Delete DI_FN_SUPPORT,
3076         in cgen-types.h.
3077         (SUBWORD*,JOIN*): Define.
3078         * cgen-trace.c (sim_cgen_disassemble_insn): Update, base_insn_bitsize
3079         moved into cpu descriptor.
3080         * sim-model.h (MACH): New member `num'.
3081
3082 1999-02-09  Doug Evans  <devans@casey.cygnus.com>
3083
3084         * cgen-cpu.h (CGEN_DISASSEMBLER): New type.
3085         (CGEN_CPU): Member opcode renamed to cpu_desc.
3086         New members get_idata,disassembler.
3087         * cgen-defs.h (CGEN_INSN_VIRTUAL_P): CGEN_INSN_ATTR renamed to
3088         CGEN_INSN_ATTR_VALUE.
3089         (CGEN_STATE): Delete member opcode_table.
3090         (sim_disassemble_insn): Delete decl.
3091         * cgen-engine.h (struct insn_sem): Moved to here from <cpu>-decode.c.
3092         (struct idesc): Moved to here from <cpu>-decode.h.
3093         * cgen-run.c (prime_cpu): Call prepare_run callback.
3094         * cgen-trace.h (SFILE): New type.
3095         (sim_disasm_sprintf): Declare.
3096         (sim_disasm_read_memory,sim_disasm_perror_memory): Declare.
3097         (sim_cgen_disassemble_insn): Declare.
3098         * cgen-trace.c: Include errno.h,dis-asm.h.  Don't include cpu-opc.h.
3099         (insn_fields): Delete.
3100         (trace_insn_fini): STATE_OPCODE_TABLE (sd) replaced with
3101         CPU_CPU_DESC (cpu).
3102         (trace_insn): Call CPU_DISASSEMBLER hook.
3103         (sim_disasm_sprintf): New function.
3104         (sim_disasm_read_memory): New function.
3105         (sim_disasm_perror_memory): New function.
3106         (sim_cgen_disassemble_insn): New function.
3107         * cgen-utils.c: Don't include cpu-opc.h.
3108         (virtual_insn_entries): New static local.
3109         (cgen_virtual_insn_table): Renamed from cgen_virtual_opcode_table.
3110         (cgen_insn_name): Rewrite.
3111         (disasm_sprintf,sim_disassemble_insn): Moved to cgen-trace.c.
3112         * cgen.sh (desc): New file generator handler.
3113         * genmloop.sh: -parallel changed to -parallel-read/-parallel-write.
3114         Define WITH_PARALLEL_READ/WITH_PARALLEL_WRITE appropriately.
3115         Don't include cpu-opc.h,cpu-sim.h.
3116         * sim-model.c (model_set): Delete SIM_DESC arg.
3117         (sim_model_set): Update.
3118         * sim-model.h (MACH): New member prepare_run.
3119
3120 1999-01-28  Frank Ch. Eigler  <fche@cygnus.com>
3121
3122         * sim-memopt.c (memory_option_handler): Avoid memset() calls
3123         if redundant with allocator functions.
3124
3125 Wed Jan 27 17:19:09 1999  Doug Evans  <devans@canuck.cygnus.com>
3126
3127         * cgen-engine.h (EXTRACT_LSB0_{INT,UINT}): Fix.
3128
3129         * sim-profile.h: Make like sim-trace.h.
3130         (PROFILE_USEFUL_MASK): New macro.
3131         * sim-profile.c (profile_options): Make like trace_options, allow
3132         optional on|off arg where applicable.
3133         (set_profile_option_mask): New function.
3134         (sim_profile_set_option): New function.
3135         (profile_option_handler): Simplify.
3136         Have -p only enable selected things, not everything.
3137         Add missing break to OPTION_PROFILE_PC_RANGE.
3138         * cgen-scache.c (scache_options): Allow optional on|off arg to
3139         --profile-scache.
3140         (scache_option_handler): Use sim_profile_set_option.
3141
3142 1999-01-26  Frank Ch. Eigler  <fche@cygnus.com>
3143
3144         * sim-memopt.c (memory_options): Add MEMORY_FILL option.
3145         (memory_option_handler): Implement MEMORY_FILL option.  Make
3146         MEMORY_CLEAR an alias for MEMORY_FILL=0.
3147         (parse_ulong_value): New function.
3148         (do_memopt_add): Allocate all buffers.  Optionally fill them.
3149
3150 1999-01-15  Richard Henderson  <rth@cygnus.com>
3151
3152         * hw-events.c (hw_event_queue_schedule): _vtracef takes a
3153         va_list, not an integer.
3154         * sim-events.c (sim_events_schedule): Likewise.
3155
3156         * sim-types.h (UNSIGNED32, UNSIGNED64): Properly cast to
3157         the appropriate type.
3158
3159 1999-01-14  Doug Evans  <devans@casey.cygnus.com>
3160
3161         * cgen-defs.h (PCADDR,CIA): Define in terms of IADDR.
3162         (sim_disassemble_insn): Update prototype.
3163         (sim_engine_invalid_insn): Ditto.
3164         * cgen-engine.h (SEMANTIC_FN): Add !WITH_SCACHE version.
3165         (SEM_BRANCH_INIT): PCADDR->IADDR.
3166         (SEM_NBRANCH_FINI): New macro for !WITH_SCACHE case.
3167         * cgen-scache.c (scache_lookup,scache_lookup_or_alloc): PCADDR->IADDR.
3168         * cgen-scache.h (*): Ditto.
3169         * cgen-trace.c (*): Ditto.
3170         * cgen-trace.h (*): Ditto.
3171         * cgen-utils.c (*): Ditto.
3172         * cgen-types.h (integer modes): Use signedNN/unsignedNN types.
3173         (insn_t): Delete.
3174         * genmloop.sh (@cpu@_fill_argbuf): Add !WITH_SCACHE support.
3175         (simple engine framework): Rewrite.
3176         * sim-module.c (modules): Install model module sooner (and in
3177         particular before the profile module).
3178
3179 1999-01-12  Doug Evans  <devans@casey.cygnus.com>
3180
3181         * sim-model.h (sim_mach_lookup_bfd_name): Add prototype.
3182         * sim-model.c (sim_mach_lookup_bfd_name): New function.
3183         (sim_model_init): Call it.
3184
3185         * cgen-trace.c (trace_insn): Pass pc to trace_prefix for virtual insns.
3186
3187 1999-01-05  Doug Evans  <devans@casey.cygnus.com>
3188
3189         * Make-common.in (CGEN_INCLUDE_DEPS): Add cgen-defs.h, cgen-engine.h.
3190         * cgen-engine.h (SEM_BRANCH_FINI): New arg pcvar, all uses updated.
3191         (SEM_BRANCH_INIT_EXTRACT): New macro.
3192         (SEM_BRANCH_INIT): Add taken_p.
3193         (TARGET_SEM_BRANCH_FINI): Provide default definition.
3194         (SEM_BRANCH_FINI): Use it.
3195         (SEM_INSN): Update.
3196         * cgen-run.c (sim_resume): Handle tracing of last insn.
3197         * cgen-scache.h (WITH_SCACHE): Define as 0 if not defined.
3198         * cgen-trace.c (current_abuf): New static global.
3199         (trace_insn_init): Initialize it.
3200         (trace_insn_fini): Use it.
3201         (trace_insn): Set it.
3202         * cgen.sh (arch case): Pass -m ${mach} to cgen.
3203         * genmloop.sh (@cpu@_emit_before): Only define if WITH_SCACHE_PBB.
3204         (@cpu@_emit_after): Ditto.
3205         (simple @cpu@_engine_run_full): New local `pc'.  Initialize semantic
3206         labels if WITH_SEM_SWITCH_FULL.
3207         * sim-model.c: Include bfd.h.
3208         (sim_model_init): New function.
3209         (sim_model_install): Record init fn.
3210         * sim-model.h (MACH): New member bfd_name.
3211         * sim-module.c (modules): Initialize model before scache.
3212
3213 1998-12-24  Frank Ch. Eigler  <fche@cygnus.com>
3214
3215         * dv-sockser.c (DEFAULT_TIMEOUT): Increase to 1 ms.
3216
3217         * nrun.c (main): Remain in simulation loop for traps and
3218         exceptions when in operating environment mode.
3219         (ui_loop_hook): New stub hook for standalone use.
3220         * sim-events.c (sim_events_process): Call ui_loop_hook
3221         periodically on CYGWIN host.
3222
3223         * sim-reason.c (sim_stop_reason): Return host signal numbers
3224         to gdb on sim_stopped and sim_signalled cases.
3225         * sim-engine.c (sim_engine_halt): Call SIM_CPU_EXCEPTION_SUSPEND
3226         hook just before longjmp.
3227         * sim-resume.c (sim_resume): Call SIM_CPU_EXCEPTION_RESUME
3228         hook just before sim_engine_run.
3229
3230         * sim-n-core.h (sim_core_trace_M): Allay const warning.
3231         * sim-trace.h (trace_generic): Ditto.
3232         * sim-trace.c (trace_generic): Ditto.
3233
3234 1998-12-14  Doug Evans  <devans@casey.cygnus.com>
3235
3236         * Make-common.in (SIM_MAIN_DEPS): New var.
3237         (CGEN_MAIN_CPU_DEPS): New var.
3238         * aclocal.m4: Add --enable-cgen-maint option.
3239         * cgen-mem.h (GETMEM*): New arg `pc'.  Pass to sim_core routine.
3240         (SETMEM*): Ditto.
3241         (GETIMEM*): Pass pc value to sim_core routine.
3242
3243 Fri Dec 11 16:58:36 1998  Andrew Cagney  <cagney@b1.cygnus.com>
3244
3245         * hw-handles.c (hw_handle_add_ihandle, hw_handle_add_phandle):
3246         Compare with ZERO not NULL.
3247
3248 Thu Dec 10 14:14:39 1998  Andrew Cagney  <cagney@b1.cygnus.com>
3249
3250         * hw-properties.c, hw-instances.c, hw-tree.c: Include
3251         "sim-assert.h".
3252
3253 1998-12-09  Doug Evans  <devans@casey.cygnus.com>
3254
3255         * sim-arange.c: Include libiberty.h, and stdlib.h if present.
3256         * sim-trace.c: Include stdlib.h if present.
3257         * dv-sockser.c: Include unistd.h if present.
3258         (dv_sockser_init): Add missing arg to call to sim_io_eprintf.
3259         * cgen-scache.c (scache_flush): Delete unused locals i,sc.
3260
3261 1998-12-08  James E Wilson  <wilson@wilson-pc.cygnus.com>
3262
3263         * gennltvals.sh: Add i960.
3264         * nltvals.def: Rebuild.
3265
3266 1998-12-04  Doug Evans  <devans@casey.cygnus.com>
3267
3268         * cgen-defs.h: New file, old cgen-sim.h.
3269         * cgen-sim.h: Simple header that includes others.
3270         * sim-arange.c: New file.
3271         * sim-arange.h: New file.
3272         * sim-basics.h: Include it.
3273         * Make-common.in (SIM_NEW_COMMON_OBJS): Add sim-arange.o.
3274         (sim-arange.o): Add rule for.
3275         * sim-cpu.h (sim_cpu_msg_prefix): Add prototype.
3276         (sim_io_eprintf_cpu): Add prototype.
3277         * sim-inline.h (HAVE_INLINE): Define if GNUC.
3278         (INLINE2): New macro.
3279         (EXTERN_INLINE): New macro.
3280         * sim-module.c (sim_post_argv_init): Initialize cpu backlink
3281         before calling module init fns.
3282         * sim-profile.c (OPTION_PROFILE_*): Move into enum.
3283         (profile_init): New function.
3284         (profile_options): New option --profile-range.
3285         (profile_option_handler): Handle --profile-range.
3286         (profile_print_insn): Qualify address range specific section titles.
3287         (profile_print_addr_ranges): New function.
3288         (profile_info): Print address ranges if specified.
3289         (profile_install): Set profile_init init fn.
3290         * sim-profile.h (PROFILE_DATA): New member `range'.
3291         * sim-trace.c (trace_init): New function.
3292         (trace_options): New option --trace-range.
3293         (trace_option_handler): Handle --trace-range.
3294         (trace_install): Set trace_init init fn.
3295         * sim-trace.h (TRACE_DATA): New member `range'.
3296         * sim-utils.c (sim_cpu_msg_prefix): New function.
3297         (sim_io_eprintf_cpu): New function.
3298         * cgen-engine.h (PC_IN_TRACE_RANGE_P): New macro.
3299         (PC_IN_PROFILE_RANGE_P): New macro.
3300         * cgen-trace.c (trace_insn_init): Set current_insn to NULL.
3301         (trace_insn_fini): New arg abuf.  All callers updated.
3302         Exit early if trace_insn not called.  Check ARGBUF_PROFILE_P before
3303         printing cycle counts.
3304         * cgen-trace.h (trace_insn_fini): Update prototype.
3305         (TRACE_RESULT_P): New macro.
3306         (TRACE_INSN_INIT,TRACE_INSN_FINI): New arg abuf.  All callers updated.
3307         (TRACE_INSN): Check ARGBUF_TRACE_P.
3308         (TRACE_EXTRACT,TRACE_RESULT): New arg abuf.  All callers updated.
3309         * cgen-types.h (SIM_INLINE): Delete.
3310         (SIM_HAVE_MODEL,SIM_HAVE_ADDR_RANGE): Define.
3311         * cgen-utils.c: Don't include cgen-engine.h
3312         * genmloop.sh (@cpu@_fill_argbuf): New function.
3313         (@cpu@_fill_argbuf_tp): New function.
3314         (@cpu@_emit_before,@cpu@_emit_after): New functions.
3315         (@cpu@_pbb_begin): Prefix cti_sc,insn_count with '_'.
3316         (SET_CTI_VPC,SET_INSN_COUNT): Update.
3317         (@cpu@_pbb_before): Check ARGBUF_PROFILE_P before calling
3318         doing profiling.  Update call to TRACE_INSN_INIT,TRACE_INSN_FINI.
3319         (@cpu@_pbb_after): Check ARGBUF_PROFILE_P before calling
3320         doing profiling. Update call to TRACE_INSN_FINI.
3321
3322         * sim-memopt.c (sim_memory_uninstall): Result type is `void'.
3323
3324 1998-12-03  Frank Ch. Eigler  <fche@cygnus.com>
3325
3326         * sim-memopt.c (sim_memory_uninstall): Deallocate all memory
3327         regions.
3328
3329 1998-12-01  Doug Evans  <devans@casey.cygnus.com>
3330
3331         * sim-inline.c (SIM_INLINE_P): Fix typo.
3332
3333 1998-11-30  Doug Evans  <devans@casey.cygnus.com>
3334
3335         * cgen-utils.c (cgen_virtual_opcode_table): Update.
3336
3337 Tue Nov 24 18:40:03 1998  Andrew Cagney  <cagney@b1.cygnus.com>
3338
3339         * gennltvals.sh: Add v850 and d10v. Sort alphabetically.
3340         * nltvals.def: Re-generate.
3341
3342 Mon Nov 23 13:28:38 1998  Andrew Cagney  <cagney@b1.cygnus.com>
3343
3344         * sim-core.c (reverse_n, sim_core_uninstall, sim_core_init,
3345         sim_core_map_attach, sim_core_map_detach, next_event_queue,
3346         new_sim_core_mapping): Only define when EXTERN_SIM_CORE_P, pacify
3347         GCC.
3348         * sim-events.c (sim_events_uninstall, sim_events_suspend,
3349         sim_events_resume, sim_events_zalloc, insert_sim_event): Ditto.
3350
3351 1998-11-22  Doug Evans  <devans@tobor.to.cygnus.com>
3352
3353         * genmloop.sh (${cpu}_pbb_chain): Watch for Ctrl-C's.
3354         (${cpu}_pbb_cti_chain): Ditto.
3355
3356 1998-11-18  Doug Evans  <devans@casey.cygnus.com>
3357
3358         * Make-common.in (cgen-utils.o): Depend on cgen-engine.h.
3359         * cgen-engine.h (EXTRACT_[ML]SB0_{INT,UINT}): New macros.
3360         (EXTRACT_INT,EXTRACT_UINT): New macros.
3361         (SEM_SEM_ARG): New macro.
3362         (SEM_NEXT_VPC): New arg `pc'.
3363         * cgen-sim.h (EXTRACT_SIGNED,EXTRACT_UNSIGNED): Delete.
3364         (sim_disassemble_insn): Update prototype.
3365         * cgen-trace.c (current_insn,insn_fields): New static locals.
3366         (trace_insn): Set them.
3367         * cgen-utils.c: #include cgen-engine.h.
3368         (sim_disassemble_insn): New arg insn_fields.
3369         Handle variable length insns.
3370         * genmloop.sh: Only emit pbb decls if -pbb.
3371         (${cpu}_scache_lookup): New arg `vpc'.
3372         (scache support): Fetch pc before entering loop.
3373
3374         * gennltvals.sh: Add fr30 support.
3375         * nltvals.def: Rebuild.
3376
3377 Wed Nov 18 10:22:22 1998  Andrew Cagney  <cagney@b1.cygnus.com>
3378
3379         * sim-types.h: Re-do type system so that GCC's attribute and mode
3380         are used to specify types.  Handle case of ALPHA.
3381
3382 1998-11-13  Frank Ch. Eigler  <fche@elastic.org>
3383
3384         * aclocal.m4: Add tests for dlopen family.
3385         * config.in: Regenerated.
3386
3387 Wed Nov 11 14:02:25 1998  Doug Evans  <devans@canuck.cygnus.com>
3388
3389         * sim-hload.c (sim_load): Pass `prog_name' to sim_load_file, not NULL.
3390
3391 Wed Nov  4 23:51:19 1998  Doug Evans  <devans@seba.cygnus.com>
3392
3393         * genmloop.sh (eng.hin): Rename HAVE_PARALLEL_EXEC to
3394         HAVE_PARALLEL_INSNS, define as 0 or 1.  Emit decls of fns in mloop.cin.
3395         * cgen-engine.h: Typedefs of IADDR,CIA,SEM_ARG,SEM_PC moved ...
3396         * cgen-sim.h: ... to here.
3397
3398 Wed Oct 28 12:00:57 1998  Andrew Cagney  <cagney@b1.cygnus.com>
3399
3400         * aclocal.m4 (enable-build-warnings): Replace
3401         enable-sim-warnings. Extend =LIST syntax so that prepend and
3402         append of options is possible.  Drop -Werror, add
3403         -Wstrict-prototypes for GDB compatibility.
3404         * Make-common.in (SIM_WARNINGS): Update.
3405
3406 Mon Oct 19 13:56:32 1998  Doug Evans  <devans@seba.cygnus.com>
3407
3408         * Make-common.in (CGEN_INCLUDE_DEPS): Define.
3409         (sim-core.o): Delete duplicate dependence on $(SIM_EXTRA_DEPS).
3410         (sim-cpu.o,sim-endian.o,sim-hw.o): Ditto.
3411         (cgen-run.o,cgen-scache.o,cgen-trace.o,cgen-utils.o): Delete
3412         explicit cgen header dependencies, require SIM_EXTRA_DEPS to include
3413         CGEN_INCLUDE_DEPS.
3414         * cgen-cpu.h: New file.
3415         * cgen-engine.h: New file.
3416         * cgen-scache.h: New file.
3417         * cgen-sim.h: Delete portions moved to new files.
3418         * genmloop.sh: Generate two files eng.hin,mloop.cin explicitly,
3419         rather than sending result to stdout.
3420
3421 Fri Oct  9 14:20:22 1998  Doug Evans  <devans@seba.cygnus.com>
3422
3423         * Make-common.in (sim-reg.o): New rule.
3424         (cgen-run.o): New rule.
3425         * cgen-ops.h: Delete many BI macros.  Change all UBI -> BI.
3426         * cgen-run.c (prime_cpu): New function.
3427         * cgen-scache.c: Add pseudo-basic-block (pbb) scaching support.
3428         (scache_option_handler, case OPTION_PROFILE_SCACHE): Handle explicitly
3429         mentioned cpu.
3430         (scache_flush_cpu,scache_lookup,scache_lookup_or_alloc): New fns.
3431         * cgen-sim.h (CGEN_INSN_VIRTUAL_TYPE): New enum.
3432         (CGEN_INSN_VIRTUAL_P): New macro.
3433         (SEM_PC): New typedef.
3434         (SEMANTIC_FN): Change type of result to SEM_PC.
3435         (SEM_SET_FULL_CODE,SEM_SET_FAST_CODE,SEM_SET_CODE): New macros.
3436         (IDESC_CTI_P,IDESC_SKIP_P): New macros.
3437         (SCACHE_MAP): New typedef.
3438         (CPU_SCACHE): Add pbb support.
3439         (scace_lookup,scache_lookup_or_alloc,scache_flush_cpu): Declare.
3440         (SEM_BRANCH_INIT_EXTRACT,SEM_BRANCH_INIT,SEM_BRANCH_FINI): New macros.
3441         (CGEN_CPU): New members running_p,insn_count,{fast,full}_engine_fn,
3442         max_slice_insns.
3443         (INSN_NAME): Delete.
3444         (cgen_insn_name): Declare.
3445         (sim_engine_invalid_insn): Renamed from sim_engine_illegal_insn.
3446         * cgen-trace.c (trace_buf): Shrink from 1024 to 256 bytes.
3447         (first_insn_p): Make static.
3448         (trace_insn): Handle virtual insns specially.
3449         (cgen_trace_printf): Ensure we haven't overflowed the buffer.
3450         * cgen-types.h (UBI): Delete.
3451         (MODE_TYPE): New enum.
3452         (HOSTINT,HOSTUINT,HOSTPTR): Delete.
3453         * cgen-utils.c (mode_names): Delete UBI.  Add INT,UINT,PTR.
3454         (cgen_virtual_opcode_table): New global.
3455         (cgen_insn_name): New function.
3456         (sim_disassemble_insn): Ignore virtual insns.
3457         * genmloop.sh: Delete top level loop generation.  Add pbb support.
3458         * sim-cpu.h (CPU_INSN_NAME_FN): New typedef.
3459         (sim_cpu_base): New members max_insns,insn_name,model_data.
3460         (CPU_PC_GET,CPU_PC_SET): New macros.
3461         (sim_pc_get,sim_pc_set): Declare.
3462         * sim-model.c (model_set): Call model init fn.
3463         * sim-model.h (MODEL_FN): New typedef.
3464         (INSN_TIMING): New member model_fn.
3465         (MODEL): New members num,init.
3466         * sim-profile.c (sim_profile_print_bar): Renamed from print_bar.
3467         All callers updated.
3468         (profile_insn_init): New fn.
3469         (profile_print_insn): Update, INSN_NAME -> CPU_INSN_NAME.
3470         Exit early if insn profiling not supported.
3471         (profile_print_memory): Update, MAX_MODES -> MODE_TARGET_MAX.
3472         (profile_install): Record profile_insn_init as init fn.
3473         (profile_uninstall): Free PROFILE_INSN_COUNT if non-null.
3474         * sim-profile.h: Update, MAX_MODES -> MODE_TARGET_MAX.
3475         (PROFILE_DATA): Delete member exec_time.
3476         Change insn_count to pointer to array, rather than the array.
3477         (sim_profile_print_bar): Declare.
3478
3479 Wed Oct  7 16:56:42 1998  Doug Evans  <devans@seba.cygnus.com>
3480
3481         * cgen-run.c: New file.
3482         * sim-reg.c: New file.
3483
3484 Mon Sep 14 10:58:19 1998  Frank Ch. Eigler  <fche@cygnus.com>
3485
3486         * aclocal.m4: Add checks for -lsocket and -lnsl.
3487
3488         * dv-sockser.c (dv_sockser_init): Use SO_REUSEADDR to
3489         allow local port reuse on listening socket.
3490
3491 Tue Sep  1 15:36:52 1998  Frank Ch. Eigler  <fche@cygnus.com>
3492
3493         * sim-config.h: Remove reference to linux kernel header.
3494
3495 Tue Aug 25 12:45:27 1998  Frank Ch. Eigler  <fche@cygnus.com>
3496
3497         * dv-sockser.c (sockser_addr): Make variable non-static.
3498
3499 Mon Aug 24 11:47:37 1998  Joyce Janczyn  <janczyn@cygnus.com>
3500
3501         * sim-hw.{c,h} (sim_hw_parse): Return struct hw pointer.
3502
3503 Tue Aug 11 18:12:19 1998  Doug Evans  <devans@canuck.cygnus.com>
3504
3505         * sim-events.c (sim_events_elapsed_time): Fix calculation.
3506
3507 Tue Aug  4 20:36:46 1998  Jeff Holcomb  <jeffh@cygnus.com>
3508
3509         * Make-common.in (install-common): Add $(EXEEXT) when installing
3510         run.
3511
3512 Mon Aug  3 11:46:01 1998  Doug Evans  <devans@seba.cygnus.com>
3513
3514         * cgen-sim.h (cgen_state): New member opcode_table.
3515         * cgen-utils.c (sim_disassemble_insn): Use it.
3516
3517 Fri Jul 24 10:14:18 1998  Doug Evans  <devans@canuck.cygnus.com>
3518
3519         * cgen-mem.h (DECLARE_SETT): Fix return type.
3520         * cgen-sim.h (sim_engine_illegal_insn): Declare.
3521         * cgen-scache.c: Include stdlib.h.
3522         * cgen-trace.c (trace_extract): Use %lx for PCADDR.
3523         * sim-model.c (model_option_handler): Remove unused variable `n'.
3524
3525 Tue Jul 21 16:27:43 1998  Doug Evans  <devans@seba.cygnus.com>
3526
3527         * cgen-utils.c: Include bfd.h.
3528         (sim_disassemble_insn): Update call to CGEN_EXTRACT_FN.
3529
3530 Wed Jul  8 18:24:10 1998  Jeffrey A Law  (law@cygnus.com)
3531
3532         * sim-bits.h (EXTEND24): Fix typo.
3533
3534 Wed Jul  8 17:41:47 1998  Andrew Cagney  <cagney@b1.cygnus.com>
3535
3536         * sim-events.c (ETRACE_P): New macro.
3537         (struct _sim_event): Add member trace.
3538         (sim_events_free): Reclaim trace message.
3539
3540         * sim-events.c, sim-events.h (sim_events_schedule_vtracef,
3541         sim_events_schedule_tracef): New functions, include printf trace
3542         information in argument list.  If tracing, store asprintf'd trace
3543         message in sim_event.
3544
3545         * hw-events.c, hw-events.h (hw_event_queue_schedule_tracef,
3546         hw_event_queue_schedule_vtracef): New functions, mimic
3547         sim_event_tracef.
3548
3549 Mon Jul  6 15:51:14 1998  Jeffrey A Law  (law@cygnus.com)
3550
3551         * sim-bits.h (EXTEND24): Define.
3552
3553 Thu Jul  2 17:13:25 1998  Doug Evans  <devans@seba.cygnus.com>
3554
3555         * cgen-sim.h (CPU_SCACHE): Make size unsigned.
3556         (CPU_SCACHE_HASH_MASK): New macro.
3557         (SCACHE_HASH_PC): Rewrite.
3558         * genmloop.sh (engine_resume_{full,fast}): Move some of hash
3559         computation out of main loop.
3560
3561 Wed Jul  1 16:44:12 1998  Doug Evans  <devans@seba.cygnus.com>
3562
3563         * cgen-sim.h (RECORD_IADDR): Delete.
3564         * cgen-types.h (HOSTINT,HOSTUINT,HOSTPTR): New types.
3565         * genmloop.sh (engine_resume_{full,fast}): Delete icount.
3566
3567 Wed Jun 17 12:25:08 1998  Mark Alexander  <marka@cygnus.com>
3568
3569         * gennltvals.def (mn10200): Add entry.
3570         * nltvals.def: Regenerate with MN10200 additions.
3571
3572 Wed Jun 17 13:18:28 1998  Andrew Cagney  <cagney@b1.cygnus.com>
3573
3574         * sim-inline.h (EXTERN_*): Replace with EXTERN_*_P. Correct
3575         documentation on how it works.
3576
3577         * sim-core.h, sim-core.c (sim_core_install, sim_core_attach,
3578         sim_core_detach, sim_core_read_buffer, sim_core_write_buffer,
3579         sim_core_set_xor, sim_core_xor_read_buffer,
3580         sim_core_xor_write_buffer): Update.
3581
3582         * sim-events.h, sim-events.c (sim_events_install,
3583         sim_events_watch_clock, sim_events_schedule_after_signal,
3584         sim_events_schedule, sim_events_watch_sim, sim_events_watch_core,
3585         sim_events_deschedule): Update.
3586
3587         * sim-fpu.h, sim-fpu.c (sim_fpu_zero, sim_fpu_one, sim_fpu_two,
3588         sim_fpu_max32, sim_fpu_max64): Update.
3589
3590 Sat Jun 13 07:45:38 1998  Doug Evans  <devans@fallis.cygnus.com>
3591
3592         * cgen-trace.c (trace_insn_fini): Redo cycle handling.
3593         * sim-profile.h (PROFILE_DATA): Rename cycle handling members.
3594         * sim-profile.c (profile_print_model): Update.
3595
3596 Fri Jun 12 18:35:07 1998  Doug Evans  <devans@seba.cygnus.com>
3597
3598         * gennltvals.def (m32r): Use common syscall.h now.
3599         (mn10300): Add entry.
3600         * nltvals.def: Regenerate.
3601
3602         * sim-engine.c (sim_engine_get_run_state): New function.
3603         * sim-engine.h (sim_engine_get_run_state): Declare it.
3604
3605 Thu Jun 11 00:50:03 1998  Doug Evans  <devans@seba.cygnus.com>
3606
3607         * sim-core.h (SIM_CORE_SIGNAL_FN): New typedef.
3608         * sim-core.c (sim_core_signal): Make extern, always define.
3609
3610 Wed Jun 10 16:02:29 1998  Doug Evans  <devans@seba.cygnus.com>
3611
3612         * Make-common.in (CGEN_FLAGS_TO_PASS): New variable.
3613         * cgen-ops.h (ANDIF): New macro.
3614         (ANDIF[BQHSD]I): Delete.
3615
3616 Thu Jun  4 13:53:54 1998  Andrew Cagney  <cagney@b1.cygnus.com>
3617
3618         * hw-events.c (create_hw_event, delete_hw_event): Delete.
3619         (hw_event_queue_schedule, hw_event_queue_deschedule,
3620         bounce_hw_event): Fix hw-event memory corruptions found by Joyce
3621         Janczyn.
3622
3623         * hw-alloc.h (HW_NZALLOC): Define.
3624
3625         * Make-common.in (test-hw-events): Add target for testing the
3626         hw-event code.
3627
3628 Mon May 25 21:11:26 1998  Andrew Cagney  <cagney@b1.cygnus.com>
3629
3630         * Make-common.in (SIM_COMMON_HW_OBJS): Add hw-handles.o and
3631         hw-instances.o.
3632         hw-handles.c, hw-instances.c, hw-handles.h, hw-instances.h: New
3633         files.
3634         * hw-main.h: Include hw-handles.h, hw-instances.h.
3635         * hw-base.h ({create,delete}_hw_{handles,instances}_data): Declare
3636         * hw-base.c (hw_create, hw_delete): Call same.
3637
3638 Mon May 25 18:55:35 1998  Andrew Cagney  <cagney@b1.cygnus.com>
3639
3640         * dv-core.c: Include hw-main.h and sim-main.h.
3641         * dv-pal.c: Include hw-main.h and sim-io.h.
3642         * dv-glue.c: Include hw-main.h.
3643
3644         * hw-main.h: New file.  Move list of includes to here.
3645         * hw-base.h: From here.
3646         * Make-common.in (hw_base_headers): Rename to hw_main_headers.
3647         (hw-*.o, dv-*.o): Update.
3648         * hw-tree.c, hw-base.c, hw-properties.c, hw-ports.c, hw-device.c,
3649         hw-events.c, hw-alloc.c, sim-hw.c: Include hw-main.h instead of
3650         sim-main.h.
3651
3652         * hw-base.h (do_hw_attach_regs, do_hw_poll_read_method,
3653         do_hw_poll_read): Move declarations from here.
3654         * hw-main.h: To here.
3655
3656         * hw-base.h (struct hw_device_descriptor, hw_finish_callback):
3657         Move from here.
3658         * hw-main.h (struct hw_descriptor, hw_finish_method): To here,
3659         rename.
3660         * Make-common.in (hw-config.h): Update
3661         * hw-base.c, dv-pal.c, dv-glue.c: Update
3662
3663         * dv-glue.c, hw-device.h, hw-base.h, hw-ports.c: Rename
3664         `*_callback' to `*_method.
3665
3666 Mon May 25 18:41:18 1998  Andrew Cagney  <cagney@b1.cygnus.com>
3667
3668         * hw-base.h (set_*): Move set method macros from here.
3669         * hw-device.h: To here.
3670
3671 Mon May 25 18:21:38 1998  Andrew Cagney  <cagney@b1.cygnus.com>
3672
3673         * hw-base.h (create_hw_property_data, delete_hw_property_data):
3674         Declare.
3675
3676         * hw-base.c (hw_create, hw_delete): Call
3677         * hw-properties.c (create_hw_property_data,
3678         delete_hw_property_data): Define.
3679
3680 Mon May 25 17:40:46 1998  Andrew Cagney  <cagney@b1.cygnus.com>
3681
3682         * hw-device.c, hw-properties.c: Include hw-base.h
3683
3684         * hw-alloc.h, hw-alloc.c: New files. Move alloc code to here.
3685         * hw-device.c: From here.
3686         * hw-base.h: Include "hw-events.h".
3687
3688         * hw-base.h (create_hw_alloc_data, delete_hw_alloc_data): Declare.
3689         * hw-base.c (hw_create, hw_delete): Call.
3690         * hw-alloc.c (create_hw_alloc_data, delete_hw_alloc_data): Define.
3691
3692         * Make-common.in (SIM_NEW_COMMON_OBJS): Add hw-alloc.o.
3693         (hw-alloc.o): New target.
3694
3695 Mon May 25 17:14:27 1998  Andrew Cagney  <cagney@b1.cygnus.com>
3696
3697         * hw-events.h, hw-events.c: New files.  Move event code to here.
3698         * sim-hw.c: From here.
3699         * hw-base.h: Include "hw-events.h".
3700         * Make-common.in (SIM_NEW_COMMON_OBJS): Add hw-events.o.
3701         (hw-events.o): New target.
3702
3703         * hw-device.h (struct hw): Add struct hw_event_data events_of_hw.
3704         * hw-events.h (struct hw_event): Replace typedef hw_event.
3705
3706         * hw-base.h (create_hw_event_data, delete_hw_event_data): Declare.
3707         * hw-base.c (hw_create, hw_delete): Call.
3708         * hw-events.c (create_hw_event_data, delete_hw_event_data): Define.
3709
3710         * dv-pal.c: Update.
3711
3712 Mon May 25 16:55:16 1998  Andrew Cagney  <cagney@b1.cygnus.com>
3713
3714         * hw-base.c (panic_hw_port_event, empty_hw_ports): Move from here.
3715         * hw-ports.c: To here.
3716
3717         * hw-base.h, hw-ports.c (create_hw_port_data,
3718         delete_hw_port_data): New functions.
3719         * hw-base.c (hw_delete, hw_create): Call same.
3720
3721         * hw-base.h (set_hw_ports, set_hw_port_event): Move set functions
3722         from here.
3723         * hw-ports.h: To here.
3724
3725 Mon May 25 16:42:48 1998  Andrew Cagney  <cagney@b1.cygnus.com>
3726
3727         * hw-device.c (hw_ioctl), hw-device.h (hw_ioctl_callback): Drop
3728         PROCESSOR and CIA arguments.
3729
3730 Fri May 22 12:16:27 1998  Andrew Cagney  <cagney@b1.cygnus.com>
3731
3732         * aclocal.m4 (SIM_AC_OPTION_HW): Add enable / disable argument.
3733         Move common object files from here.
3734         * Make-common.in (SIM_COMMON_HW_OBJS): To here.
3735
3736 Thu May 21 17:57:16 1998  Andrew Cagney  <cagney@b1.cygnus.com>
3737
3738         * sim-hw.c: Include ctype.h.
3739         (do_hw_poll_read): Do not assume EAGAIN.
3740
3741 Wed May 20 04:37:57 1998  Doug Evans  <devans@seba.cygnus.com>
3742
3743         * cgen-trace.c (first_insn_p): New static local.
3744         (trace_insn_init): Set it.
3745         (trace_insn_fini): Use TRACE_PREFIX.
3746         (trace_insn): Rewrite to use trace_prefix.
3747         * sim-trace.c (trace_prefix): Don't print filename arg if NULL.
3748         Adjust width accordingly.
3749
3750         * sim-profile.h (PROFILE_DATA): New member profile_any_p.
3751         (PROFILE_ANY_P,PROFILE_INSN_P,PROFILE_MEMORY): New macros.
3752         (PROFILE_SCACHE_P,PROFILE_PC_P,PROFILE_CORE_P): New macros.
3753         (PROFILE_COUNT_INSN,PROFILE_COUNT_READ,PROFILE_COUNT_WRITE): Simplify.
3754         (PROFILE_COUNT_CORE): Simplify.
3755         * sim-profile.c (profile_option_handler): Compute profile_any_p.
3756
3757 Tue May 19 23:55:30 1998  Doug Evans  <devans@seba.cygnus.com>
3758
3759         * cgen-ops.h (ADDCFSI): Fix typo.
3760
3761 Sat May 16 12:44:52 1998  Doug Evans  <devans@seba.cygnus.com>
3762
3763         * cgen-sim.h (CGEN_CPU): New members idesc_{read,sem}_init_p.
3764         * genmloop.sh: Use them rather than static locals.
3765
3766         * sim-engine.c (sim_engine_set_run_state): New function.
3767         * sim-engine.h (sim_engine_set_run_state): Declare.
3768         * genmloop.sh (pending_reason,pending_sigrc): New static locals.
3769         (@cpu@_engine_stop): New args reason,sigrc.  All callers updated.
3770         (engine_resume): Reorganize.  Allow synchronous exit from main loop.
3771
3772 Fri May 15 16:06:05 1998  Doug Evans  <devans@seba.cygnus.com>
3773
3774         * cgen-trace.c (trace_insn_init): New arg first_p.
3775         All callers updated.
3776         (trace_insn_fini): New arg last_p.  All callers updated.
3777         * cgen-trace.h (trace_insn_init,trace_insn_fini): Update.
3778         (TRACE_INSN_INIT,TRACE_INSN_FINI): Update.
3779         * genmloop.sh (engine_resume): Update.
3780
3781 Fri May 15 15:59:00 1998  Joyce Janczyn  <janczyn@cygnus.com>
3782
3783         * Make-common.in (install-common): Run ranlib on installed copy of
3784         libsim.a.
3785
3786 Fri May 15 15:03:00 1998  Joyce Janczyn  <janczyn@cygnus.com>
3787
3788         * Make-common.in (install-common): Rename and install libsim.a.
3789
3790 Tue May 12 15:23:57 1998  Andrew Cagney  <cagney@b1.cygnus.com>
3791
3792         * sim-io.c (unistd.h): Include.
3793
3794 Wed May  6 16:04:18 1998  Doug Evans  <devans@seba.cygnus.com>
3795
3796         * Make-common (sim_main_headers): Sort.
3797         (cgen-*.o): Add cgen-sim.h dependency.
3798
3799         * cgen-scache.c (scache_init): Only allocate space if scache element
3800         size is non-zero.
3801         (scache_flush,scache_print_profile): Check if scache in use first.
3802
3803         * cgen-sim.h (IDESC): Provide forward declaration.
3804         (DECODE): Delete.
3805         (CGEN_CPU): Always define scache member.  New members idesc,opcode.
3806         (cgen_cpu_max_extra_bytes): Declare.
3807         * cgen-utils.c (cgen_cpu_max_extra_bytes): New function.
3808
3809         * sim-cpu.h: New file.  sim_cpu_base moved here.
3810         Move sim_cpu_lookup decl here.
3811         * sim-base.h: #include "sim-cpu.h".
3812         * sim-cpu.c: New file.
3813         * Make-common (sim_main_headers): Add sim-cpu.h.
3814         (sim-cpu.o): Add rule for.
3815
3816         * sim-model.c (set_model): Delete.
3817         (sim_model_set,model_set): New functions.
3818         (sim_model_install): Renamed from model_install.
3819         Don't set default model here.
3820         (model_option_handler): Rewrite --model processing.
3821         (sim_model_lookup,sim_mach_lookup): New functions.
3822         * sim-model.h (MAX_MODELS,MAX_INSNS): Delete.
3823         (insn_timing): Delete.
3824         (INSN_TIMING): New member `num'.
3825         (IMP_PROPERTIES): Always define scache_elm_size member.
3826         (MACH): New member init_cpu.
3827         (sim_machs): Renamed from machs.
3828         (sim_model_install): Renamed from model_install.
3829         (sim_model_set,sim_model_lookup,sim_mach_lookup): Declare.
3830         * sim-module.c (modules): Update.
3831
3832         * sim-profile.c (profile_print_insn): Add cpu arg to INSN_NAME macro.
3833
3834         * sim-io.c: #include <errno.h>.
3835
3836 Wed May  6 12:39:15 1998  Andrew Cagney  <cagney@b1.cygnus.com>
3837
3838         * dv-pal.c (struct hw_pal_device): Add reader.
3839         (hw_pal_finish): Initialize reader.
3840         (scan_hw_pal): Use reader.
3841
3842         * hw-base.h, sim-hw.c (do_hw_poll_read): New function.
3843         (HW_IO_EOF, HW_IO_NOT_READY): Define.
3844         * dv-pal.c: Use.
3845
3846         * sim-io.h, sim-io.c (sim_io_poll_read): New function.  Copy from
3847         ../ppc/main.c sim_io_read_stdin.
3848
3849 Fri May  1 12:11:02 1998  Andrew Cagney  <cagney@b1.cygnus.com>
3850
3851         * hw-tree.h (hw_tree_print): Paramaterize with print and file
3852         arguments.
3853         * hw-tree.c: Update.
3854
3855         * hw-base.h (hw_port_event_callback): Delete CPU/CIA args.
3856         * hw-device.h (hw_io_read_buffer, hw_io_write_buffer): Delete
3857         CPU/CIA args.
3858         * hw-ports.h (hw_port_event): Ditto.
3859         * hw-ports.c (hw_port_event): Update.
3860         * hw-base.c (panic_hw_io_read_buffer, panic_hw_io_write_buffer):
3861         Update.
3862         * dv-pal.c (hw_pal_io_read_buffer, hw_pal_io_write_buffer):
3863         Update.
3864         (hw_pal_io_write_buffer): Call hw_halt not sim_engine_halt.
3865         (do_counter_event): Update.
3866         * dv-glue.c (hw_glue_io_read_buffer): Update.
3867         (hw_glue_port_event): Update.
3868
3869         * hw-device.h (SIM_DESC): Replace with struct sim_state.
3870         * hw-base.h (hw_create): Ditto.
3871         * hw-base.c (hw_create): Ditto.
3872
3873         * hw-device.c (hw_abort, hw_trace, hw_hw_event_queue_schedule,
3874         hw_event_queue_deschedule, hw_event_queue_time): Delete, moved
3875         from here to.
3876         * sim-hw.c: Here.
3877         * hw-device.h (hw_system_cpu): Declare.
3878         * sim-hw.c (hw_system_cpu): New function.
3879
3880         * sim-core.c (sim_core_map_attach, sim_core_attach): Call
3881         sim_hw_abort not hw_abort.
3882         (sim-hw.h): Include.
3883         (sim_core_read_buffer, sim_core_write_buffer): Call
3884         sim_hw_io_read_buffer and sim_hw_io_write_buffer. Do not pass CPU
3885         argument.
3886         (sim_core_set_xor): Do not pass CPU when aborting.
3887
3888         * sim-n-core.h (sim_core_read_aligned_N,
3889         sim_core_write_aligned_N): Call sim_hw_abort not hw_abort.
3890         (sim_core_read_aligned_N, sim_core_write_aligned_N): Call
3891         sim_cpu_hw_io_read_buffer and sim_cpu_hw_io_write_buffer. Does not
3892         return length.
3893
3894         * sim-hw.h: Declare sim_hw_io_{read,write}_buffer. Declare
3895         sim_hw_print.
3896         * sim-hw.c (sim_hw_io_read_buffer, sim_hw_io_write_buffer,
3897         sim_cpu_hw_io_read_buffer, sim_cpu_hw_io_write_buffer): New
3898         functions.
3899         (sim_hw_print): New function.
3900
3901         * sim-engine.h (sim_engine_vabort): Declare.
3902         * sim-engine.c (sim_engine_vabort): New function.
3903
3904 Wed Apr 29 23:58:52 1998  Andrew Cagney  <cagney@b1.cygnus.com>
3905
3906         * sim-trace.c (print_data): For floating-point numbers trace raw
3907         hex value.
3908         (trace_result_fp2): New function.
3909         * sim-trace.h (trace_result_fp2): New declaration.
3910         (TRACE_FP_RESULT2): New macro.
3911
3912 Tue Apr 28 18:28:58 1998  Geoffrey Noer  <noer@cygnus.com>
3913
3914         * common/aclocal.m4: call AM_EXEEXT in SIM_AC_COMMON, define
3915         AM_CYGWIN32 and AM_EXEEXT.
3916         * common/Make-common.in: set EXEEXT, add missing EXEEXTs
3917         to run and install-common rules.
3918         * common/configure: regenerate
3919
3920 Sat Apr 25 17:45:01 1998  Andrew Cagney  <cagney@b1.cygnus.com>
3921
3922         * sim-types.h (cell_word): New type.
3923         (natural_cell): Delete type.
3924
3925 Sun Apr 26 15:31:55 1998  Tom Tromey  <tromey@creche>
3926
3927         * configure: Regenerated to track ../common/aclocal.m4 changes.
3928         * config.in: Ditto.
3929
3930 Sun Apr 26 15:25:07 1998  Tom Tromey  <tromey@cygnus.com>
3931
3932         * acconfig.h (NEED_DECLARATION_PRINTF): Removed.
3933
3934 Fri Apr 24 14:16:40 1998  Tom Tromey  <tromey@creche>
3935
3936         * configure: Regenerated to track ../common/aclocal.m4 changes.
3937         * config.in: Ditto.
3938
3939 Fri Apr 24 11:38:08 1998  Tom Tromey  <tromey@cygnus.com>
3940
3941         * acconfig.h: New file.
3942         * Make-common.in (top_builddir): New macro.
3943         (INTL_LIB): Removed.
3944         (INTLLIBS): New macro.
3945         (INTLDEPS): Likewise.
3946         (LIBDEPS): Use INTLDEPS.
3947         (EXTRA_LIBS): Use INTLLIBS.
3948         * aclocal.m4 (SIM_AC_COMMON): Call CY_GNU_GETTEXT.
3949         (CY_WITH_NLS, CY_GNU_GETTEXT, AM_PATH_PROG_WITH_TEST,
3950         AM_LC_MESSAGES): New macros from GNU gettext.
3951
3952 Fri Apr 24 19:57:59 1998  Andrew Cagney  <cagney@b1.cygnus.com>
3953
3954         * sim-config.h: Discard leading _ from macros.
3955         * sim-types.h: Ditto.
3956
3957 Wed Apr 22 14:14:19 1998  Michael Meissner  <meissner@cygnus.com>
3958
3959         * Make-common.in (CSEARCH): Add -I to intl directories.
3960         (INTL_LIB): Point to libintl.a.
3961         (LIBDEPS): Add $(INTL_LIB).
3962         (EXTRA_LIBS): Ditto.
3963
3964 Tue Apr 21 12:44:27 1998  Doug Evans  <devans@canuck.cygnus.com>
3965
3966         * cgen-types.h (GETHIDI,MAKEDI): Tweak.
3967
3968         * cgen-ops.h (ADDCFSI): Fix.
3969         (SUBCFSI): Tweak.
3970
3971 Tue Apr 21 13:18:41 1998  Andrew Cagney  <cagney@b1.cygnus.com>
3972
3973         * sim-types.h (signed_address, unsigned_address): Define.
3974
3975 Mon Apr 20 21:47:54 1998  Andrew Cagney  <cagney@b1.cygnus.com>
3976
3977         * sim-fpu.c (sim_fpu_2d): Don't return an SNaN, convert it into a
3978         QNaN.
3979
3980 Thu Apr 16 10:30:14 1998  Andrew Cagney  <cagney@b1.cygnus.com>
3981
3982         * sim-fpu.c, sim-fpu.h (sim_fpu_fractionto, sim_fpu_tofraction):
3983         New functions, pack / unpack sim_fpu struct using raw values.
3984         (sim_fpu_is): Differentiate between negative and positive
3985         infinity.
3986
3987 Tue Apr 14 18:49:31 1998  Andrew Cagney  <cagney@b1.cygnus.com>
3988
3989         * sim-bits.h (EXTEND4): Define.
3990         (EXTEND4, EXTEND15, EXTEND11): Ditto.
3991
3992 Tue Apr 14 16:31:35 1998  John Metzler  <jmetzler@cygnus.com>
3993
3994         * sim-memopt.c (parse_addr): Sunos 4.5 does not have strtol
3995         declared so we need this cast to prevent long long addresses
3996         from being misconfigures. Results in access to unmapped memory.
3997
3998 Tue Apr 14 13:19:14 1998  Doug Evans  <devans@canuck.cygnus.com>
3999
4000         * Make-common.in (RUNTESTFLAGS): Define.
4001         (check): Pass RUNTESTFLAGS to recursive make.
4002
4003 Tue Apr 14 15:09:19 1998  Andrew Cagney  <cagney@b1.cygnus.com>
4004
4005         * sim-info.c (sim_info): Be verbose when either VERBOSE or
4006         STATE_VERBOSE_P.
4007
4008 Sat Apr  4 23:24:17 1998  Andrew Cagney  <cagney@b1.cygnus.com>
4009
4010         * aclocal.m4 (sim-inline): By default, disable sim-inline when
4011         cross compiling.
4012
4013 Sat Apr  4 20:36:25 1998  Andrew Cagney  <cagney@b1.cygnus.com>
4014
4015         * aclocal.m4 (sim-cflags): Add -fomit-frame-pointer to defaults.
4016         (sim-inline): Update to match sim-inline.[hc]
4017         * configure: Regenerated to track ../common/aclocal.m4 changes.
4018
4019         * Make-common.in (sim_main_headers): Add sim-inline.h
4020
4021         * sim-bits.h (sim-bits.c): Include when H_REVEALS_MODULE_P.
4022         selected.
4023         * sim-endian.h (sim-endian.c): Ditto.
4024
4025         * sim-events.h (_SIM_EVENTS_H_): Replace with SIM_EVENTS_H.
4026         (sim_events_set_trace): Delete unused prototype.
4027
4028         * sim-core.h (_SIM_CORE_H_): Replace with SIM_CORE_H.
4029         * sim-core.c (_SIM_CORE_C_): Ditto for SIM_CORE_C.
4030
4031         * sim-fpu.h (sim-fpu.c): Include when H_REVEALS_MODULE_P.
4032         (sim_fpu_to232i, sim_fpu_to232u, sim_fpu_i232to, sim_fpu_u232to):
4033         Comment out, not yet implemented in sim-fpu.c.
4034         (sim_fpu_zero, sim_fpu_one, sim_fpu_two, sim_fpu_qnan,
4035         sim_fpu_max32, sim_fpu_max64): Mark as EXTERN_SIM_FPU.
4036
4037         * sim-inline.h: Rewrite description.
4038         (H_REVEALS_MODULE_P, C_REVEALS_MODULE_P): Define.
4039         (SIM_MAIN_INLINE): Add inline option.
4040
4041         * sim-inline.c (semantics.c, idecode.c, engine.c, ...): Do not
4042         include generated files. Handled by generator directly.
4043
4044 Sat Apr  4 01:07:06 1998  Andrew Cagney  <cagney@b1.cygnus.com>
4045
4046         * sim-trace.c (set_trace_option_mask): Keep TRACE_ANY_P
4047         up-to-date.
4048
4049         * sim-trace.h (TRACE_ANY_P): Define.
4050         (struct _trace_data): Add trace_any_p.
4051
4052 Mon Mar 30 17:11:55 1998  Andrew Cagney  <cagney@b1.cygnus.com>
4053
4054         * run.c (main): Handle all alternatives of enum sim_stop.
4055         (main): Delete unused `asection *s'.
4056
4057 Fri Mar 27 16:15:52 1998  Andrew Cagney  <cagney@b1.cygnus.com>
4058
4059         * hw-tree.h, hw-tree.c (hw_tree_vparse): New function
4060
4061         * configure: Regenerated to track ../common/aclocal.m4 changes.
4062
4063         * sim-hw.c: New file.
4064         * sim-hw.h (sim_hw_parse): Declare function.
4065         (hw-tree.h): Do not include.
4066
4067         * sim-base.h (STATE_HW): Define.
4068         (struct sim_state_base): Add member struct *hw.
4069
4070         * sim-module.c (sim-hw.h): Include.
4071         (modules): Add sim_hw_install.
4072
4073         * aclocal.m4 (sim_hw_obj): Add sim-hw.o
4074
4075 Fri Mar 27 14:55:06 1998  Andrew Cagney  <cagney@b1.cygnus.com>
4076
4077         * sim-base.h (CPU_INDEX): Define.
4078
4079         * sim-utils.c (sim_state_alloc): Initialize.
4080         * sim-module.c (sim_post_argv_init): Ditto.
4081
4082 Thu Mar 26 10:07:57 1998  Stu Grossman  <grossman@bhuna.cygnus.co.uk>
4083
4084         * aclocal.m4 (sim_hw_obj):  Fix sed expression to generate
4085         properly formatted lists.
4086
4087 Thu Mar 26 10:37:22 1998  Andrew Cagney  <cagney@b1.cygnus.com>
4088
4089         * dv-pal.c (enum hw_pal_address_mask): From Stu Grossman, was
4090         0x2f needs to be 0x3f.
4091
4092 Thu Mar 26 09:10:56 1998  Andrew Cagney  <cagney@b1.cygnus.com>
4093
4094         * hw-tree.c (hw_tree_find_property): Return NULL when device is
4095         not found.
4096         (hw_tree_find_*_property): Clean up error message when property is
4097         not found.
4098
4099         * dv-pal.c (hw_pal_io_read_buffer): Check the smp property is
4100         present before looking for it.
4101
4102 Wed Mar 25 16:17:38 1998  Ian Carmichael  <iancarm@cygnus.com>
4103
4104         * aclocal.m4 (AC_CHECK_HEADERS): Add check for fpu_control.h.
4105         (AC_CHECK_FUNCS): Add check for __setfpucw.
4106         * configure: Regenerated.
4107
4108 Wed Mar 25 09:18:34 1998  Andrew Cagney  <cagney@b1.cygnus.com>
4109
4110         * dv-pal.c (hw_pal_countdown, hw_pal_countdown_value,
4111         hw_pal_timer, hw_pal_timer_value): Define.
4112         (hw_pal_io_read_buffer, hw_pal_io_write_buffer): Add timer support
4113         (do_counter_event, do_counter_read, do_counter_value,
4114         do_counter_write): new functions.
4115
4116 Tue Mar 24 12:24:24 1998  Andrew Cagney  <cagney@b1.cygnus.com>
4117
4118         * hw-tree.c (hw_printf): Send tree dump to stderr, same as other
4119         trace output.
4120
4121         * hw-base.c (hw_create): Stop searching for a device when one is
4122         found.
4123
4124 Wed Mar 25 12:35:29 1998  Andrew Cagney  <cagney@b1.cygnus.com>
4125
4126         * configure: Regenerated to track ../common/aclocal.m4 changes.
4127
4128 Mon Mar 23 10:25:08 1998  Andrew Cagney  <cagney@b1.cygnus.com>
4129
4130         * aclocal.m4 (SIM_AC_OPTION_HARDWARE): Add second argument,
4131         appends extra devices.
4132         (SIM_AC_OPTION_HARDWARE): Substute sim_hw, a non-duplicate list of
4133         the device names.
4134
4135         * Make-common.in (hw-config.h): New target, create hw-config.h
4136         file.
4137         (SIM_HW): Definition from @sim_hw@.
4138         (hw-base.o): Depend on hw-config.h
4139
4140 Tue Mar 24 17:41:35 1998  Stu Grossman  <grossman@bhuna.cygnus.co.uk>
4141
4142         * Make-common.in:  Get SHELL from configure.
4143         * (stamp-tvals sim-inline.c):  Use $(SHELL) when invoking
4144         move-if-change.  Fixes NT native build problem.
4145         * Makefile.in (nltvals.def):   Use $(SHELL) when invoking
4146         move-if-change.  Fixes NT native build problem.
4147         * configure:  Regenerate with autoconf 2.12.1 to fix shell issues for
4148         NT native builds.
4149
4150 Sun Mar 22 16:54:40 1998  Andrew Cagney  <cagney@b1.cygnus.com>
4151
4152         * hw-device.h, hw-device.c (hw_strdup): New function.
4153
4154         * hw-base.c (hw_create): Use hw_strdup when saving a copy of the
4155         strings name, family and args.
4156         (full_name_of_hw): Use hw_strdup when returning the full path.
4157
4158         * hw-properties.c: Clean up property not found / wrong type error
4159         messages.
4160
4161         * hw-tree.c (hw_tree_parse): Finish a devices initialization
4162         before attaching any ports.
4163
4164         * hw-base.c (hw-config.): Include.  Replace hardwired table.
4165
4166         * dv-glue.c: Copy over ../ppc/hw_glue.c.  Update to new framework.
4167
4168         * Make-common.in: Add rule for dv-glue.o.
4169
4170 Sun Mar 22 16:45:54 1998  Andrew Cagney  <cagney@b1.cygnus.com>
4171
4172         * hw-base.c (hw_finish): Move setting of trace level to here.
4173         (hw_create): From here.
4174
4175         * hw-base.h, hw-base.c (do_hw_attach_regs): Copy function from
4176         ../ppc/device_table.c.
4177
4178         * dv-pal.c (hw_pal_finish): Attach PAL device to parent bus.
4179
4180         * hw-tree.c (print_properties): Supress path when printing
4181         properties of root node.
4182
4183 Sun Mar 22 16:21:15 1998  Andrew Cagney  <cagney@b1.cygnus.com>
4184
4185         * hw-device.h (HW_TRACE): Define.
4186         (hw_trace): Declare.
4187         * hw-device.c (hw_trace): Implement function.
4188
4189         * hw-base.c (hw_create): Set hw trace level from "trace?"
4190         property.
4191
4192         * dv-core.c (dv_core_attach_address_callback): Add trace.
4193
4194         * dv-pal.c: Replace DTRACE with HW_TRACE.
4195
4196 Sun Mar 22 15:23:35 1998  Andrew Cagney  <cagney@b1.cygnus.com>
4197
4198         * hw-device.h (HW_ZALLOC, HW_MALLOC): New macros.
4199         (hw_alloc_data): Delcare.
4200         (struct hw): Add member alloc_of_hw.
4201
4202         * hw-device.c (hw_zalloc, hw_malloc, hw_free, hw_free_all): New
4203         functions. Assocate memory with a device.
4204         (stdlib.h): Include.
4205
4206         * hw-base.h (set_hw_delete): Define.
4207         (hw_delete_callback): Declare.
4208         (hw_delete): Declare.
4209
4210         * hw-base.c (hw_delete): Implement function.
4211         (struct hw_base_data): Add member to_delete.
4212         (ignore_hw_delete): New function, does nothing.
4213         (hw_create): Set the hw_delete method.
4214         (hw_create): Allocate the base type using HW_ZALLOC before setting
4215         any methods.
4216
4217         * hw-tree.h, hw-tree.c (hw_tree_delete): New function.
4218
4219         * hw-properties.c: Replace zalloc/zfree with hw_zalloc/hw_free.
4220
4221         * hw-ports.c: Replace zalloc/zfree with hw_zalloc/hw_free.
4222         (attach_hw_port_edge): Add struct hw argument
4223
4224         * dv-pal.c (hw_pal_finish): Replace zalloc/zfree with
4225         hw_zalloc/hw_free.
4226
4227 Sun Mar 22 15:09:52 1998  Andrew Cagney  <cagney@b1.cygnus.com>
4228
4229         * hw-device.h (hw_attach_address_callback,
4230         hw_detach_address_callback): Attach to a single space not a space
4231         mask. Clarify interpretation of SPACE:ADDR parameters.
4232
4233         * hw-base.c (passthrough_hw_attach_address,
4234         passthrough_hw_detach_address): Update.
4235         * dv-core.c (dv_core_attach_address_callback): Ditto.
4236         * dv-pal.c (hw_pal_attach_address): Ditto.
4237
4238 Thu Mar 19 00:41:00 1998  Andrew Cagney  <cagney@b1.cygnus.com>
4239
4240         * sim-options.h: Document additional CPU arg to OPTION_HANDLER.
4241
4242 Wed Mar 18 14:13:02 1998  Andrew Cagney  <cagney@b1.cygnus.com>
4243
4244         * Make-common.in (SIM_HW_OBJS, SIM_HW_SRC, SIM_DV_OBJS): Define.
4245         (hw-base_h, hw-device_h, hw-handles_h, hw-instances_h, hw_ports_h,
4246         hw-properties_h, hw-tree_h): Define, point at corresponding
4247         header.
4248         (hw_base_headers): Define list of headers included by hw-base.h
4249         (hw-base.o, hw-device.o, hw-instances.o, hw-handles.o, hw-ports.o,
4250         hw-properties.o, hw-tree.o): Specify dependencies.
4251         (dv-core.o, dv-pal.o): Ditto.
4252
4253         * sim-hw.h: New file.
4254
4255         * hw-device.h, hw-device.c, hw-properties.h, hw-properties.c,
4256         hw-ports.h, hw-ports.c: New files. Copied from ../ppc/device.[ch].
4257
4258         * hw-tree.h, hw-tree.c: New files. Copied from ../ppc/tree.[hc].
4259
4260         * hw-base.h, hw-base.c: new files.  Copied from
4261         ../ppc/device_table.[hc].
4262
4263         * dv-core.c, dv-pal.c: New files. Copied from
4264         ../ppc/hw_{core,pal}.c
4265
4266         * sim-basics.h (struct hw): Declare.
4267         (enum port_direction, enum object_disposition): Declare.
4268
4269 Wed Mar 18 12:38:12 1998  Andrew Cagney  <cagney@b1.cygnus.com>
4270
4271         * aclocal.m4 (SIM_AC_OPTION_HARDWARE): Set sim_hw_obj, sim_dv_obj,
4272         sim_dv_src in Makefile. Take list of devices as parameter to m4
4273         macro..
4274
4275         * configure: Regenerated to track ../common/aclocal.m4 changes.
4276
4277 Mon Mar 16 12:37:33 1998  Andrew Cagney  <cagney@b1.cygnus.com>
4278
4279         * sim-trace.h, sim-trace.c (trace_prefix): Pass in sim_cia so that
4280         trace_prefix can abort cleanly.
4281
4282 Sat Mar 14 18:36:12 1998  Doug Evans  <devans@seba.cygnus.com>
4283
4284         * dv-sockser.c, dv-sockser.h: New files.
4285         * Make-common.in (dv-sockser.o): Add rule for.
4286         * aclocal.m4: Check for fcntl.h.
4287         * config.h: Add HAVE_FCNTL_H.
4288
4289         * sim-break.c (remove_breakpoint): Fix thinko.
4290
4291         * sim-hload.c (sim_load): Provide default value of SIM_HANDLES_LMA.
4292         Use SIM_HANDLES_LMA for lma_p arg to sim_load_file.
4293
4294 1998-03-13  Fred Fish  <fnf@cygnus.com>
4295
4296         * sim-base.h (struct sim_state_base): Add prog_syms and
4297         define macro STATE_PROG_SYMS.
4298         * sim-trace.c (trace_prefix): Add variables abfd, symsize,
4299         symbol_count, and asymbols.  Call bfd_get_symtab_upper_bound
4300         and bfd_canonicalize_symtab, to get symbol table on first use
4301         and preserve it via STATE_PROG_SYMS for future calls to
4302         bfd_find_nearest_line.
4303
4304 Wed Mar 11 14:02:47 1998  Andrew Cagney  <cagney@b1.cygnus.com>
4305
4306         * sim-core.h, sim-core.c (sim_core_map_to_str): Delete.
4307
4308         * sim-core.c (sim_core_attach): Handle a generic number of maps -
4309         up to nr_maps, not just access_* maps.
4310
4311         * sim-profile.h (struct PROFILE_DATA): Track nr_maps different
4312         maps.
4313
4314         * sim-profile.c (profile_print_core): Make map unsigned.  Iterate
4315         over nr_maps not sim_core_nr_maps.
4316
4317         * sim-events.h, sim-events.c (sim_events_watch_core): Change
4318         core_map argument to unsigned.
4319         (struct _sim_core): Ditto for struct member core_map.
4320
4321         * sim-core.h (nr_sim_core_maps, sim_core_*_map): Delete
4322
4323         * sim-basics.h (access_io, access_*_io): Define.
4324         (map_read, map_write, map_exec, map_io): Define.
4325
4326         * sim-core.c, sim-core.h (sim_core_attach): Replace argument
4327         attach with more generic mapmask.
4328         (sim_core_{read,write}_*): Change map argument to unsigned.
4329
4330         * sim-core.c (sim_core_uninstall, sim_core_attach,
4331         sim_core_detach): Iterate over nr_maps instead of
4332         sim_core_nr_maps.
4333
4334         * sim-break.c (insert_breakpoint): Write breakpoints to exec_map
4335         instead of the write_map.
4336         (remove_breakpoint): Ditto.
4337
4338         * genmloop.sh (engine_resume_full): Replace sim_core_*_map
4339         with read_map, write_map, exec_map resp.
4340
4341         * cgen-mem.h (DECLARE_GETMEM, DECLARE_SETMEM, DECLARE_GETIMEM):
4342         Ditto.
4343
4344         * cgen-utils.c (sim_disassemble_insn): Ditto.
4345
4346         * sim-hrw.c (sim_write, sim_write): Ditto.
4347
4348         * sim-utils.h, sim-utils.c (access_to_str, map_to_str,
4349         transfer_to_str): New functions.
4350
4351 Mon Mar  9 12:50:59 1998  Doug Evans  <devans@seba.cygnus.com>
4352
4353         * sim-base.h (sim_state_base): New member environment.
4354         (STATE_ENVIRONMENT): New macro.
4355         * sim-config.c (current_environment): Delete.
4356         (sim_config_default): New function.
4357         (sim_config): Set STATE_ENVIRONMENT, not current_environment.
4358         * sim-config.h (current_environment,CURRENT_ENVIRONMENT): Delete.
4359         (sim_config_default): Add prototype.
4360         * sim-module.c (sim_pre_argv_init): Call sim_config_default.
4361         * sim-options.c (standard_option_handler, case OPTION_ENVIRONMENT):
4362         Set STATE_ENVIRONMENT, not current_environment.
4363
4364 Mon Mar  9 11:59:03 1998  Jim Wilson  <wilson@cygnus.com>
4365
4366         * sim-fpu.c (NR_GUARDS64): Change NR_PAD32 to NR_PAD64.
4367
4368 Tue Mar  3 10:53:05 1998  Andrew Cagney  <cagney@b1.cygnus.com>
4369
4370         * sim-types.h (SIGNED32, SIGNED64): Pacify GCC.
4371
4372         * sim-alu.h (ALU64_BEGIN): Make alu64_r unsigned.
4373
4374 Mon Mar  2 10:20:06 1998  Doug Evans  <devans@seba.cygnus.com>
4375
4376         * Make-common.in (TAGS): Make smarter.
4377         * Makefile.in (TAGS): Ditto.
4378
4379 Fri Feb 27 19:09:57 1998  Doug Evans  <devans@canuck.cygnus.com>
4380
4381         * sim-module.c (*): Fix typos in assertion tests.
4382
4383 Sat Feb 28 13:54:10 1998  Andrew Cagney  <cagney@b1.cygnus.com>
4384
4385         * sim-module.c (sim_pre_argv_init): String passed to asprintf
4386         can't be constant.
4387
4388         * sim-options.c (sim_parse_args): Ditto.
4389         (sim_args_command): Return OK, instead of nothing, for an empty
4390         command.
4391
4392 Fri Feb 27 13:29:13 1998  Andrew Cagney  <cagney@b1.cygnus.com>
4393
4394         * sim-profile.c (profile_info): Rename from profile_print. Drop
4395         misc and misc_cpu callback arguments.  Use
4396         PROFILE_INFO_CPU_CALLBACK and STATE_PROFILE_INFO_CALLBACK instead.
4397         (profile_install): Install profile_info function.
4398
4399         * sim-profile.h (PROFILE_INFO_CPU_CALLBACK,
4400         STATE_PROFILE_INFO_CALLBACK): Define.
4401         (struct PROFILE_DATA): Add field info_cpu_callback.
4402         (profile_print): Delete function.
4403
4404         * sim-base.h (STATE_MODULES): Define.  Replace individual
4405         STATE_*_LIST with single struct module_list.
4406
4407         * sim-module.h (MODULE_INFO_FN, MODULE_INFO_LIST): Declare.
4408         (struct module_list): Declare.
4409
4410         * sim-module.h, sim-module.c (sim_module_add_info_fn,
4411         sim_module_info): New functions.
4412         (sim_module_install): Clean up module data structures.
4413
4414         * sim-info.c (sim_info): New file. New function. Call
4415         sim_module_info.
4416
4417         * Make-common.in (sim-info.o): Define rule.
4418         (SIM_NEW_COMMON_OBJS): Add sim-info.o.
4419
4420
4421 Fri Feb 27 18:26:16 1998  Doug Evans  <devans@canuck.cygnus.com>
4422
4423         * sim-base.h (sim_cpu_base): New members name, options.
4424         (sim_cpu_lookup): Add prototype.
4425         * sim-module.c (sim_pre_argv_init): Provide default names for cpus.
4426         * sim-options.h (DECLARE_OPTION_HANDLER): New argument `cpu'.
4427         (sim_add_option_table): Update prototype.
4428         * sim-options.c (sim_add_option_table): New argument `cpu'.
4429         (standard_option_handler,standard_install): Update.
4430         (sim_parse_args): Handle cpu specific options.
4431         (print_help): New static function.
4432         (sim_print_help): Call it.  Print cpu specific options.
4433         (find_match): New static function.
4434         (sim_args_command): Call it.  Handle cpu specific options.
4435         * sim-utils.c (sim_cpu_lookup): New function.
4436         * sim-memopt.c (memory_option_handler): Update.
4437         (sim_memopt_install): Update.
4438         * sim-model.c (model_option_handler): Update.
4439         (model_install): Update.
4440         * sim-profile.c (profile_option_handler): Update.
4441         (profile_install): Update.
4442         * sim-trace.c (trace_option_handler): Update.
4443         (trace_install): Update.
4444         * sim-watch.c (watchpoint_option_handler): Update.
4445         (sim_watchpoint_install): Update.
4446         * cgen-scache.c (scache_option_handler): Update.
4447         (scache_install): Update.
4448
4449 Wed Feb 25 11:00:26 1998  Doug Evans  <devans@canuck.cygnus.com>
4450
4451         * Make-common.in (check): Run `make check' in testsuite dir.
4452
4453 Wed Feb 25 14:40:24 1998  Andrew Cagney  <cagney@b1.cygnus.com>
4454
4455         * sim-trace.c (trace_result0): New function.
4456
4457         * sim-trace.h (TRACE_FP_*, TRACE_FPU_*): Rename TRACE_FPU_*
4458         macro's to TRACE_FP_*. TRACE_FPU_* should be defined and used when
4459         tracing sim_fpu variables.
4460         (TRACE_ALU_RESULT0): Define.
4461         (TRACE_FP_RESULT_WORD): Define.
4462         (TRACE_FP_INPUT_WORD1): Define.
4463
4464         * sim-fpu.c, sim-fpu.h (sim_fpu_max32, sim_fpu_max64, sim_fpu_one,
4465         sim_fpu_two): New constants.
4466         (sim_fpu_op1, sim_fpu_op2): New types.
4467         (struct _sim_fpu): Delete member result.  Re-order other members.
4468         (sim_fpu_sign, sim_fpu_exp): New functions.
4469         (sim_fpu_max, sim_fpu_min): new functions.
4470         (EXPMAX32, EXPMAX64, NR_PAD32, NR_PAD64, NR_GUARDS32, NR_GUARDS64,
4471         NORMAL_EXPMAX32, NORMAL_EXPMAX64): Define.
4472
4473 Tue Feb 24 22:45:39 1998  Doug Evans  <devans@seba.cygnus.com>
4474
4475         * sim-profile.c (profile_print): Delete duplicate test of
4476         PROFILE_INSN_IDX.
4477         (profile_print_pc): Exit early if data collection not set up.
4478         (profile_print_core): Simplify by calling sim_core_map_to_str.
4479         * sim-core.h (sim_core_map_to_str): Declare.
4480         * sim-core.c (sim_core_map_to_str): Make non-static.
4481
4482         * genmloop.sh (engine_resume): Update insn_count before exiting.
4483         (engine_resume_full): Keep accurate core profile data.
4484
4485         * cgen-utils.c (sim_disassemble_insn): Don't use
4486         sim_core_read_aligned_N, it messes up profiling results.
4487
4488 Mon Feb 23 20:45:57 1998  Mark Alexander  <marka@cygnus.com>
4489
4490         * nltvals.def: Regenerate with MN10300 additions.
4491
4492 Tue Feb 24 13:18:42 1998  Andrew Cagney  <cagney@b1.cygnus.com>
4493
4494         * sim-trace.h (TRACE_ALU_RESULT2): Define.
4495
4496         * sim-trace.h, sim-trace.c (trace_result_word2,
4497         trace_input_word4, trace_result_word4): New function.
4498
4499 Mon Feb 23 13:08:35 1998  Doug Evans  <devans@canuck.cygnus.com>
4500
4501         * cgen-sim.h (SEM_NEXT_PC): New arg `len'.
4502
4503         * sim-xcat.h: Delete.
4504         * cgen-mem.h: Delete inclusion of sim-xcat.h.
4505         * cgen-sim.h: Ditto.
4506         * sim-alu.h: Replace sim-xcat.h with symcat.h.
4507         * sim-n-bits.h: Ditto.
4508         * sim-n-core.h: Ditto.
4509         * sim-n-endian.h: Ditto.
4510
4511 Mon Feb 23 13:19:58 1998  Michael Meissner  <meissner@cygnus.com>
4512
4513         * syscall.c (cb_syscall): Handle short reads, and EOF.
4514
4515 Tue Feb 24 00:29:57 1998  Andrew Cagney  <cagney@b1.cygnus.com>
4516
4517         * sim-trace.c (print_data): case trace_fmt_fp missing break.  Use
4518         sim_fpu to safely print fp_word values.
4519         (print_data): Add trace_fmt_bool and trace_fmt_addr.
4520         (trace_result_bool1, trace_result_addr1): New functions.
4521         (trace_input_bool1, trace_input_addr1): New functions.
4522
4523         * sim-trace.h (TRACE_FPU_*): Define.
4524
4525 Mon Feb 23 13:24:54 1998  Andrew Cagney  <cagney@b1.cygnus.com>
4526
4527         * sim-fpu.h (enum sim_fpu_class): Add sim_fpu_class_denorm.
4528         (sim_fpu_fpto, sim_fpu_tofp): Define.
4529
4530 Fri Feb 20 18:08:51 1998  Andrew Cagney  <cagney@b1.cygnus.com>
4531
4532         * sim-fpu.c (sim_fpu_cmp): New function.
4533
4534 Wed Feb 18 16:29:21 1998  Doug Evans  <devans@canuck.cygnus.com>
4535
4536         * cgen-utils.h (sim_disassemble_insn): Use CGEN_INSN_BITSIZE
4537         instead of abuf->length.
4538         * sim-trace.c (trace_options): Have -t only trace a few useful things.
4539         (set_trace_option_mask): Renamed from set_trace_options.
4540         (set_trace_option): New function.
4541         (trace_option_handler): Update calls to set_trace_option{,_mask}.
4542         * sim-trace.h (TRACE_USEFUL_MASK): New macro.
4543
4544 Wed Feb 18 12:42:15 1998  Andrew Cagney  <cagney@b1.cygnus.com>
4545
4546         * sim-basics.h: Declare struct _sim_fpu.
4547
4548 Tue Feb 17 16:27:46 1998  Andrew Cagney  <cagney@b1.cygnus.com>
4549
4550         * sim-trace.h (TRACE_ALU_INPUT*, TRACE_ALU_RESULT): Define.
4551         (trace_prefix, trace_input*, trace_result*): Declare.
4552         (trace_one_insn): Change declaration, assume trace_prefix called.
4553         (trace_generic): Like trace_one_insn.
4554         (TRACE_ALU_IDX, TRACE_*_IDX): Change #define's to enum.
4555         (TRACE_alu, TRACE_[a-z]*): Update.
4556
4557         * sim-trace.c (trace_prefix, trace_input*, trace_result*,
4558         trace_insn, save_data, trace_idx_to_str, print_data): New
4559         functions.
4560         (trace_one_insn): Rewrite.
4561         (trace_generic): New function.
4562
4563 Tue Feb 17 17:27:30 1998  Doug Evans  <devans@seba.cygnus.com>
4564
4565         * aclocal.m4 (USE_MAINTAINER_MODE): New variable.
4566
4567         * cgen-sim.h (SEMANTIC_CACHE_FN): Delete.
4568         (SEMANTIC_FN): Rewrite declaration.
4569         (DECODE): Update type of semantic_fast member.
4570         ({EX,SEM}_FN_NAME): Have only one version.
4571         * sim-base.h (sim_state_base): Delete conditionals surrounding
4572         member scache_size.
4573
4574 Tue Feb 10 18:31:49 1998  Andrew Cagney  <cagney@b1.cygnus.com>
4575
4576         * sim-load.c (sim_load_file): Print LMA/VMA according to value
4577         used.
4578
4579 Tue Feb 10 14:56:23 1998  Ian Carmichael  <iancarm@cygnus.com>
4580
4581         * sim-core.c: Add missing prototypes for WITH_DEVICES.
4582         Add missing parameters to device_io calls.
4583         * sim-core.h: Add missing parameters to device_io calls.
4584
4585 Mon Feb  9 14:48:37 1998  Doug Evans  <devans@canuck.cygnus.com>
4586
4587         * cgen-sim.h (DECODE): Always use switch for `read' for now.
4588         (PAREXEC): Renamed from PARALLEL_EXEC.  All uses updated.
4589         (SEMANTIC{,_CACHE}_FN): Fix return type.
4590         * genmloop.sh (@cpu@_engine_run): Delete `current_state'.
4591         (engine_resume): Likewise.  Make `engine' volatile.  Save copy
4592         of cpu pointer in volatile object.  Initialize read switch if
4593         -parallel.
4594
4595 Thu Feb  5 13:27:04 1998  Doug Evans  <devans@seba.cygnus.com>
4596
4597         * cgen-sim.h (EX_FN_NAME): _exc_ -> _ex_.
4598         (SEM_INSN): New macro.
4599
4600 Tue Feb  3 16:31:56 1998  Andrew Cagney  <cagney@b1.cygnus.com>
4601
4602         * sim-run.c (sim_engine_run): Assume IMEM is 32 bit.
4603
4604 Sun Feb  1 16:47:51 1998  Andrew Cagney  <cagney@b1.cygnus.com>
4605
4606         * configure: Regenerated to track ../common/aclocal.m4 changes.
4607
4608 Sun Feb  1 16:16:57 1998  Andrew Cagney  <cagney@b1.cygnus.com>
4609
4610         * sim-types.h (fp_word): New type, define according to
4611         WITH_TARGET_FLOATING_POINT_BITSIZE.
4612
4613         * aclocal.m4 (default_sim_floating_point_bitsize): Add
4614         configuration of size of floating point registers.
4615
4616 Sun Feb  1 14:02:31 1998  Andrew Cagney  <cagney@b1.cygnus.com>
4617
4618         * sim-profile.c (profile_print): Only print CPU <N> if other
4619         output is going to appear.
4620
4621 Sat Jan 31 18:15:41 1998  Andrew Cagney  <cagney@b1.cygnus.com>
4622
4623         * configure: Regenerated to track ../common/aclocal.m4 changes.
4624
4625 Sat Jan 31 18:03:55 1998  Andrew Cagney  <cagney@b1.cygnus.com>
4626
4627         * sim-types.h (address_word): Typedef according to
4628         WITH_TARGET_ADDRESS_BITSIZE.
4629         (signed_cell, unsigned_cell, natural_cell): Ditto using
4630         WITH_TARGET_CELL_BITSIZE.
4631
4632         * sim-config.h (WITH_TARGET_ADDRESS_BITSIZE): Define.
4633         (WITH_TARGET_CELL_BITSIZE): Define.
4634         (WITH_HOST_WORD_BITSIZE): Delete.
4635
4636         * sim-config.c (print_sim_config): Update.
4637
4638         * aclocal.m4 (SIM_AC_OPTION_BITSIZE): Add support for
4639         configuration of address and OpenFirmware cell sizes.
4640
4641 Fri Jan 30 09:36:33 1998  Andrew Cagney  <cagney@b1.cygnus.com>
4642
4643         * sim-engine.h (sim_engine_run): Add argument nr_cpus.
4644         * sim-run.c (sim_engine_run): Update.
4645
4646         * sim-engine.h (SIM_ENGINE_HALT_HOOK): Use SET_CPU_CIA instead of
4647         CPU_CIA.
4648         * sim-run.c (sim_engine_run): Ditto.
4649
4650         * sim-resume.c (sim_resume): Obtain nr_cpus from sim_engine.
4651         (sim_resume): Pass nr_cpus to sim_engine_run.
4652
4653         * sim-engine.h (struct _sim_engine): Add member nr_cpus.
4654
4655         * sim-engine.c (sim_engine_init): Hardwire nr_cpus to
4656         MAX_NR_PROCESSORS.
4657         (sim_engine_nr_cpus) sim-engine.c, sim-engine.h: New function
4658
4659 Fri Jan 23 14:20:54 1998  Doug Evans  <devans@seba.cygnus.com>
4660
4661         * Make-common.in (stamp-tvals): New rule.
4662         (targ-vals.h,targ-map.c): Depend on it.
4663         (clean): Remove stamp-tvals.
4664
4665 Tue Jan 20 21:35:13 1998  Michael Meissner  <meissner@cygnus.com>
4666
4667         * sim-utils.c (sim_state_alloc): #if 0 variable that is only used
4668         in code also #if 0'ed.
4669
4670 Mon Jan 19 22:26:29 1998  Doug Evans  <devans@seba>
4671
4672         * configure: Regenerated to track ../common/aclocal.m4 changes.
4673         * aclocal.m4: Recognize --enable-maintainer-mode.
4674
4675 Mon Jan 19 12:45:45 1998  Doug Evans  <devans@seba.cygnus.com>
4676
4677         * cgen-scache.h: Deleted.
4678         * Make-common.in (cgen-run.o,cgen-scache.o): Delete cgen-scache.h dep.
4679         * cgen-scache.c: Only compile contents if WITH_SCACHE.
4680         (scache_init): Use runtime computed size of SCACHE.
4681         (scache_flush): Likewise.
4682         * cgen-mem.h (GETIMEMU[QHSD]I): Declare.
4683         ([GS]ETT{QI,UQI,HI,UHI,SI,USI,DI,UDI}): Declare.
4684         * cgen-sim.h: Scache support moved here.
4685         (PC): Redo definition.
4686         (ARGBUF,SCACHE,PARALLEL_EXEC): Provide forward decls.
4687         (DECODE): Add parallel execution support.
4688         Only include semantic label members if using switch.
4689         (SWITCH,CASE,BREAK,DEFAULT,ENDSWITCH): Portable computed goto support.
4690         (CGEN_CPU): Delete members exec_state, halt_sigrc, halt_jmp_buf.
4691         (IADDR,CIA,SEM_ARG,EX_FN_NAME,SEM_FN_NAME,RECORD_IADDR,SEM_ARGBUF,
4692         SEM_NEXT_PC,SEM_BRANCH_VIA_{CACHE,ADDR},SEM_NEW_PC_ADDR): Moved here
4693         from cgen-types.h.
4694         (engine_{stop,run,resume,halt,signal}): Delete decls.
4695         * cgen-types.h (CGEN_{XCAT3,CAT3}): Delete.
4696         (argbuf,scache): Delete forward decls.
4697         (STATE): Delete decl.
4698         * cgen-utils.c: Don't include decode.h, mem-ops.h, sem-ops.h.
4699         Include cgen-mem.h, cgen-ops.h.
4700         (engine_halt,engine_signal): Delete.
4701         ({ex,exc,sem,semc}_illegal): Delete.
4702         (sim_disassemble_insn): Result of extract fn is in bits.
4703         * genmloop.sh: Rewrite.
4704
4705         * cgen-trace.c (trace_insn): Set printed_result_p=0 if not tracing
4706         line numbers.
4707
4708         * sim-base.h (sim_state_base): Delete member `model'.
4709         (sim_cpu_base): Add member `model'.
4710         * sim-model.h (IMP_PROPERTIES): New type.
4711         (MACH): New members imp_props, models.
4712         (models): Delete decl.
4713         * sim-model.c (set_model): Update.
4714         * sim-profile.c (profile_print_model): Update.
4715
4716         * sim-utils.c (sim_state_alloc): Delete setting of cpu backlink here.
4717
4718 Fri Jan 16 12:33:09 1998  Nick Clifton  <nickc@cygnus.com>
4719
4720         * cgen-trace.c (trace_insn): Call CGEN_INSN_MNEMONIC() rather than
4721         CGEN_INSN_SYNTAX().
4722
4723 Mon Dec 15 23:17:11 1997  Andrew Cagney  <cagney@b1.cygnus.com>
4724
4725         * configure: Regenerated to track ../common/aclocal.m4 changes.
4726         * config.in: Ditto.
4727
4728 Mon Dec 15 23:16:03 1997  Andrew Cagney  <cagney@b1.cygnus.com>
4729
4730         * aclocal.m4 (AR): Check for sigaction.
4731
4732 Thu Dec  4 09:21:05 1997  Doug Evans  <devans@canuck.cygnus.com>
4733
4734         * Make-common.in (sim-core.o): Depend on $(sim_main_headers).
4735
4736         * sim-config.h (WITH_TREE_PROPERTIES): Define as 0.
4737         * sim-config.c (sim_config): Replace WITH_DEVICES with
4738         WITH_TREE_PROPERTIES.
4739
4740         * configure: Regenerated to track ../common/aclocal.m4 changes.
4741
4742 Wed Dec  3 17:56:02 1997  Doug Evans  <devans@canuck.cygnus.com>
4743
4744         * Make-common.in (SIM_ENVIRONMENT): New variable.
4745         (CONFIG_CFLAGS): Add it.
4746         * aclocal.m4 (SIM_AC_OPTION_ENVIRONMENT): Handle
4747         --enable-sim-environment option.
4748         * configure: Regenerated.
4749         * sim-config.h (environment support): Rewrite.
4750         * sim-config.c (current_environment): Define as enum, unconditionally.
4751         (current_alignment): Define unconditionally.
4752         (config_environment_to_a): Update.
4753         (config_alignment_to_a): Fix type of argument.  Define unconditionally.
4754         (sim_config): Handle environment and alignment determination
4755         unconditionally.  Delete sanity checks of current_environment,
4756         unnecessary.
4757         (print_sim_config): Update.
4758         * sim-options.c (STANDARD_OPTIONS enum): Add OPTION_ENVIRONMENT.
4759         (standard_options): Add --environment.
4760         (standard_option_handler): Likewise.
4761
4762 Fri Nov 28 12:21:25 1997  Andrew Cagney  <cagney@b1.cygnus.com>
4763
4764         * sim-alu.h: Add notes on carry vs borrow for subtraction.
4765         (ALU{,8,16,32,64}ADD): Redefine ADD macro as add overflowing.
4766         (ALU{,8,16,32,64}ADDC): Define - add carrying.
4767         (ALU{,8,16,32,64}SUB): Redefine SUB macro as subtract overflowing.
4768         (ALU{,8,16,32,64}SUBB): Define - subtract borrowing.
4769         (ALU{,8,16,32,64}SUBC): Define - tract carrying.
4770         (ALU{,8,16,32,64}ADD_CA, ALU{,8,16,32,64}ADDC_C): Replace single
4771         argument ADD_CA macro with two argument ADDC_C - add carrying with
4772         carry in.
4773         (ALU{,8,16,32,64}SUB_CA, ALU{,8,16,32,64}SUBC_X): Replace single
4774         argument SUB_CA macro with two argument SUBC_X - subtract
4775         carrying, extended.
4776         (ALU{,8,16,32,64}SUBB_B): Define - subtract borrowing with
4777         borrow-in.
4778         (ALU{,8,16,32,64}NEGC, ALU{,8,16,32,64}NEGB): Define.
4779
4780 Sun Nov 30 17:40:57 1997  Michael Meissner  <meissner@cygnus.com>
4781
4782         * sim-io.c (sim_io_{syscalls,getstring}): Delete.  No longer used.
4783         * sim-io.h (sim_io_syscalls): Delete.
4784
4785 Fri Nov 28 20:10:09 1997  Michael Meissner  <meissner@cygnus.com>
4786
4787         * syscall.c (cb_syscall): Add missing else, so write to stdout
4788         isn't doubled.
4789
4790         * sim-alu.h (ALU{,8,16,32,64}_SET_CARRY): Provide macros to import
4791         the carry bit from the CPU's psw.
4792
4793 Fri Nov 28 11:15:05 1997  Doug Evans  <devans@canuck.cygnus.com>
4794
4795         * gennltvals.sh: Redo syscall support.
4796         * nltvals.def: Regenerated.
4797
4798 Wed Nov 26 16:49:38 1997  Michael Meissner  <meissner@cygnus.com>
4799
4800         * syscall.c (cb_syscall): If writing to stdout or stderr, flush
4801         the stream immediately.
4802
4803 Wed Nov 26 12:32:11 1997  Andrew Cagney  <cagney@b1.cygnus.com>
4804
4805         * sim-io.c (sim_io_getstring): Delete unused len2.
4806         (sim_io_syscalls): Ditto for sys_errno.
4807
4808 Wed Nov 26 11:18:40 1997  Doug Evans  <devans@canuck.cygnus.com>
4809
4810         * syscall.c (cb_syscall): Test CB_SYSCALL struct magic number.
4811
4812         * Make-common.in (run.o): Depend on remote-sim.h.
4813         (nrun.o,sim-hload.o,sim-hrw.o): Likewise.
4814         (sim-io.o,sim-reason.o,sim-resume.o): Likewise.
4815
4816 Tue Nov 25 20:12:46 1997  Michael Meissner  <meissner@cygnus.com>
4817
4818         * sim-io.c (sim_io_syscalls): Disable lseek.
4819
4820 Tue Nov 25 00:12:38 1997  Doug Evans  <devans@seba.cygnus.com>
4821
4822         * gennltvals.sh: Generate syscall values for d30v.
4823
4824         * gennltvals.sh: Use libgloss/syscall.h for sparc.
4825         * nltvals.def: Regenerate.
4826
4827         * callback.c (os_stat): Make 3rd arg a host struct stat ptr.
4828         (os_fstat): Likewise.  Validate fd argument.
4829         (cb_host_to_target_stat): Delete big_p arg.  If HS arg is NULL,
4830         just compute target stat struct length.
4831         * syscall.c: #include "libiberty.h", <sys/types.h>, <sys/stat.h>.
4832         (ENOSYS,ENAMETOOLONG): Provide definitions if missing.
4833         (get_string): Return host errno values so they can be properly
4834         translated later.
4835         (cb_syscall): Likewise.
4836         (cb_syscall, cases open,unlink): Use get_path instead of get_string.
4837         (cb_syscall, case read): Use read_stdin for file descriptor 0.
4838         (cb_syscall, case write): Use write_stderr for file descriptor 2.
4839         (cb_syscall): Add cases for lseek, unlink, stat, fstat, time.
4840         (get_path): New function.
4841
4842 Mon Nov 24 18:56:07 1997  Michael Meissner  <meissner@cygnus.com>
4843
4844         * sim-io.c (sim_io_syscalls): New function to provide system call
4845         emulation.  Provide exit, open, close, read, write, lseek, and
4846         unlink.
4847         (sim_io_getstring): New function to return a string from a
4848         simulated memory location.
4849
4850         * sim-io.h (sim_io_syscalls): Add declaration.
4851
4852 Mon Nov 24 12:09:59 1997  Doug Evans  <devans@seba.cygnus.com>
4853
4854         * sim-core.c (sim_core_signal): Fix spelling error in message.
4855
4856         * sim-hrw.c (sim_read): Use read map, not write map.
4857
4858         * Make-common.in (all): Add .gdbinit.
4859         * gdbinit.in: Add dump command.
4860
4861         * sim-model.c (model_options): Use '\0' for `shortopt'.
4862
4863         * sim-trace.c (trace_option_handler): Set state trace file
4864         for --trace-file in addition to cpu's values.
4865         (trace_vprintf): If cpu == NULL, try state's trace file.
4866         (trace_options): Reorganize table, reword some descriptions.
4867
4868 Sun Nov 23 10:57:00 1997  Andrew Cagney  <cagney@b1.cygnus.com>
4869
4870         * sim-fpu.c (sim_fpu_abs, sim_fpu_neg, sim_fpu_inv), sim-fpu.h:
4871         New functions.
4872
4873 Sat Nov 22 19:16:54 1997  Andrew Cagney  <cagney@b1.cygnus.com>
4874
4875         * sim-reason.c (sim_stop_reason): For sim_signalled, return the
4876         signal untranslated, document problem with this.
4877
4878         * nrun.c (main): Check for a prog name of `*step'.  If present,
4879         step the simulator instead of allowing it to run free.
4880
4881         * sim-signal.c (SIGQUIT): Define on _MSC_VER hosts.
4882
4883         * Make-common.in (sim_main_headers): Add sim-signal.h.
4884
4885 Fri Nov 21 09:32:32 1997  Andrew Cagney  <cagney@b1.cygnus.com>
4886
4887         * sim-signal.c (sim_signal_to_host): Return 0 for SIM_SIGNONE.
4888
4889 Thu Nov 20 20:35:20 1997  Andrew Cagney  <cagney@b1.cygnus.com>
4890
4891         * sim-signal.h: Start simulator signals at 64 so that host signal
4892         numbers can be detected and reported.
4893
4894         * sim-signal.h (SIM_SIGFPE), sim-signal.h: Add signal.
4895
4896 Wed Nov 19 12:02:41 1997  Doug Evans  <devans@seba.cygnus.com>
4897
4898         * callback.c (cb_host_to_target_stat): Fix return values.
4899
4900         * cgen-sim.h (enum_signal_type): Delete.
4901         (engine_signal): Update prototype.
4902         * cgen-utils.c: Don't include <signal.h>.
4903         (sim_signal_to_host): Delete, lives in sim-signal.c now.
4904         (engine_signal): Update.
4905
4906         * sim-utils.c (sim_state_alloc): Call SIM_STATE_ALLOC if defined.
4907         (sim_state_free): Call SIM_STATE_FREE if defined.
4908
4909         * sim-module.c (sim_module_install): Don't leave any modules
4910         installed if one fails to install.
4911
4912 Wed Nov 19 13:25:48 1997  Michael Meissner  <meissner@cygnus.com>
4913
4914         * sim-options.c: Don't include ../libiberty/alloca-conf.h any
4915         more, since alloca is not used in this file.
4916
4917         * sim-alu.h (ALU{32,64}_*): Rewrite 32 and 64 bit ALU support to
4918         correctly set the carry and overflow bits for those types.
4919         (ALU{8,16,32,64}_{ADD,SUB}_CA): Take VAL argument to add along
4920         with carry, so carry is correct after doing both adds.
4921         (ALU*): Space out '\' to make it easier to read.
4922
4923 Tue Nov 18 15:53:45 1997  Doug Evans  <devans@canuck.cygnus.com>
4924
4925         * sim-core.c (sim_core_signal): Use sim_stopped instead of
4926         sim_signalled.
4927
4928         * sim-signal.c, sim-signal.h: New files.
4929         * Make-common.in (sim-signal.o): Add rule for.
4930         (SIM_NEW_COMMON_OBJS): Add sim-signal.o.
4931         * sim-abort.c: Don't include <signal.h>.
4932         * sim-basics.h: #include "sim-signal.h".
4933         * sim-break.c: Don't include <signal.h>.
4934         (sim_handle_breakpoint): Replace SIGTRAP with SIM_SIGTRAP.
4935         * sim-core.c: Don't include <signal.h>.
4936         (SIGBUS): Delete definition.
4937         (sim_core_signal): Replace SIGSEGV,SIGBUS with SIM_SIGSEGV,SIM_SIGBUS.
4938         * sim-engine.c: Don't include <signal.h>.
4939         (sim_engine_abort): Replace SIGABRT with SIM_SIGABRT.
4940         * sim-reason.c (sim_stop_reason): Call sim_signal_to_host.
4941         * sim-resume.c: Don't include <signal.h>.
4942         (SIGTRAP): Delete definition.
4943         (has_stepped): Replace SIGTRAP with SIM_SIGTRAP.
4944         * sim-stop.c: Don't include <signal.h>.
4945         (control_c_simulation): Replace SIGINT with SIM_SIGINT.
4946         * sim-watch.c: Don't include <signal.h>.
4947         (handle_watchpoint): Replace SIGINT with SIM_SIGINT.
4948
4949         * Make-common.in (SIM_NEW_COMMON_OBJS): New variable.
4950
4951         * sim-base.h (CIA_ADDR): Provide default definition.
4952         * sim-core.c (sim_core_signal): Use CIA_ADDR to fetch value.
4953         * sim-break.c (sim_handle_breakpoint): Likewise.
4954
4955 Mon Nov 17 14:15:31 1997  Doug Evans  <devans@seba.cygnus.com>
4956
4957         * Make-common.in (srccom): New variable.
4958
4959         * Make-common.in (DEP, COMMON_DEP_CFLAGS): Define.
4960         (LIB_OBJS): Add syscall.o.
4961         (gentmap): Pass $(NL_TARGET) to $(CC).
4962         (syscall.o): Add rule for.
4963         (sim_main_headers): Add $(SIM_EXTRA_DEPS).
4964         (sim-bits.o): Depend on $(sim-n-bits_h).
4965         (sim-load.o): Depend on callback.h.
4966
4967         * Make-common.in (cgen-*.o): Update dependencies, mem-ops.h renamed to
4968         cgen-mem.h, sem-ops.h renamed to cgen-ops.h.
4969         * cgen-mem.h, cgen-ops.h: New files.
4970
4971         * aclocal.m4 (--enable-sim-scache): Pass -DWITH_SCACHE=0 for "=no".
4972
4973         * Makefile.in (nltvals.def): Depend on gennltvals.sh.
4974         Rewrite build rule.
4975         * callback.c: #include string.h or strings.h.
4976         #include sys/types.h and sys/stat.h.
4977         (cb_init_syscall_map,cb_init_errno_map,cb_init_open_map): Declare.
4978         (os_get_errno,os_open): Update.
4979         (os_stat,os_fstat): New functions.
4980         (os_init): Initialize syscall_map, errno_map, open_map.
4981         (default_callback): Add entries for os_stat, os_fstat, syscall_map,
4982         errno_map, open_map, signal_map, stat_map.
4983         (cb_read_target_syscall_maps): New function.
4984         (cb_target_to_host_syscall): New function.
4985         (cb_host_to_target_errno): Renamed from host_to_target_errno.
4986         (cb_target_to_host_open): Renamed from target_to_host_open.
4987         (store): New function.
4988         (cb_host_to_target_stat): New function.
4989         * syscall.c: New file.
4990         * gentmap.c (sys_tdefs): New global.
4991         (gen_targ_vals_h): Output target syscall numbers.
4992         (gen_targ_map_c): Update.  Output target syscall translation map.
4993         * gentvals.sh: New first argument `target'.  Preface table with
4994         #ifdef NL_TARGET_$target if non-null target passed.
4995         * gennltvals.sh: New file.
4996         * nltvals.def: Regenerated.
4997
4998 Fri Nov 14 11:33:34 1997  Andrew Cagney  <cagney@b1.cygnus.com>
4999
5000         * sim-n-core.h (sim_core_read_unaligned_N): Return static
5001         sim_core_dummy_M.
5002         (sim_core_dummy_M): Declare.
5003
5004 Wed Nov 12 18:16:15 1997  Andrew Cagney  <cagney@b1.cygnus.com>
5005
5006         * sim-core.c (sim_core_signal): Print the address of the
5007         instruction.
5008
5009 Thu Nov 13 11:49:41 1997  Doug Evans  <devans@seba.cygnus.com>
5010
5011         * sim-base.h (sim_state_base): Move `magic' to end of struct.
5012
5013         * sim-base.h (sim_state_base): Add member trace_data.
5014         (STATE_TRACE_DATA): New macro.
5015         * sim-trace.h (TRACE_DEBUG_IDX,TRACE_debug): New macros.
5016         ({WITH_,}TRACE_DEBUG_P): New macros.
5017         (STATE_TRACE_FLAGS,STRACE_P,STRACE_DEBUG_P): New macros.
5018         (_sim_cpu): Delete forward reference.
5019         (debug_printf): Update.
5020         * sim-trace.c (OPTION_TRACE_DEBUG): Define.
5021         (trace_options): Add --trace-debug.
5022         (set_trace_options): Handle it.
5023         (trace_option_handler): Likewise.
5024         (trace_install): Init state trace_data struct.
5025         (trace_uninstall): Close state trace file.
5026         * sim-events.c (ETRACE): Only print source file and line number if
5027         --trace-debug.
5028         * sim-n-core.h (sim_core_trace_M): Likewise.
5029
5030         * sim-core.c (sim_core_signal): Add missing "\n" in message.
5031
5032 1997-11-13  Felix Lee  <flee@cygnus.com>
5033
5034         * sim-n-core.h (sim_core_read_unaligned_N): illegal empty
5035         initializer.
5036         * sim-types.h (unsigned128,signed128): fix typo for MSVC.
5037
5038 Wed Nov 12 12:18:08 1997  Doug Evans  <devans@canuck.cygnus.com>
5039
5040         * aclocal.m4 (SIM_AC_OPTION_SCACHE): Fix typo.
5041
5042         * Make-common.in (BUILT_SRC_FROM_COMMON): Remove files no longer
5043         built this way.
5044         (sim-config.o): Remove non-existent $(sim-nconfig_h) dependency.
5045         (clean): Don't delete $(BUILT_SRC_FROM_COMMON) if building in
5046         source tree.
5047
5048 Tue Nov 11 13:28:02 1997  Andrew Cagney  <cagney@b1.cygnus.com>
5049
5050         * sim-events.c (sim_events_process): Re-compute the time -
5051         update_time_from_event - as each event is processed. Reverses
5052         previous change.
5053
5054 Fri Nov  7 00:37:36 1997  Andrew Cagney  <cagney@b1.cygnus.com>
5055
5056         * callback.c (os_poll_quit): Replace _WIN32 with _MSC_VER.
5057
5058 Fri Nov  7 00:37:36 1997  Andrew Cagney  <cagney@b1.cygnus.com>
5059
5060         * sim-events.c (sim_events_process): Delete redundant call to
5061         update_time_from_event.
5062         (sim_events_slip): Always decrement time_from_event.
5063         (sim_events_tick, sim_events_deschedule, update_time_from_event):
5064         Delete assertion that time_from_event >=0 when work in queue, no
5065         longer applicable.
5066
5067 Thu Nov  6 12:06:46 1997  Andrew Cagney  <cagney@b1.cygnus.com>
5068
5069         * sim-options.c (STANDARD_OPTIONS): Change OPTION_* to an enum.
5070         (standard_option_handler): Update.
5071
5072         * sim-options.h: Clarify documentation.
5073         (OPTION_LONG_ONLY_P): Delete definition.
5074         (OPTION_VALID_P): Define.
5075
5076         * sim-options.c (sim_print_help): Allow short only options.
5077         (sim_parse_args): Ditto.
5078         (sim_args_command): Skip short only options.
5079         (sim_parse_args): Allocate space for NUM_OPTS not just 256. Make
5080         separate entries for short and long options in the HANDLERS and
5081         ORIG_VAL tables.
5082         (sim_parse_args): Disable argument permutation.
5083
5084 Wed Nov  5 13:40:31 1997  Andrew Cagney  <cagney@b1.cygnus.com>
5085
5086         * sim-core.h (DECLARE_SIM_CORE_WRITE_N. DECLARE_SIM_CORE_READ_N):
5087         Add argument M, size of data type.
5088         (sim_core_read_misaligned_3, sim_core_write_misaligned_3):
5089         Declare, ditto for 5, 6 & 7 byte transfers.
5090         (sim_core_write_unaligned_1, sim_core_write_unaligned_1): Define
5091         as aligned variant.
5092
5093         * sim-n-core.h (sim_core_trace_M): Rename from
5094         sim_core_trace_N. Add nr_bytes argument. Replace transfer argument
5095         with transfer type. Print transfer direction.  Handle 1 and 2 byte
5096         transfers.
5097         (sim_core_read_unaligned_N, sim_core_write_unaligned_N): Trace
5098         unaligned accesses.
5099         (unsigned_M, T2H_M, H2T_M): Rename from unsigned_N, T2H_N, H2T_N.
5100         Update all functions.
5101
5102         * sim-core.c: Generate functions starting with 16 not 1.
5103         (sim_core_read_unaligned_3): Generate. Ditto for 3 byte write and
5104         all 5, 6 & 7 byte transfers.
5105
5106         * sim-n-core.h (sim_core_read_misaligned_N,
5107         sim_core_write_misaligned_N): Implement.
5108
5109 Mon Nov  3 15:03:04 1997  Andrew Cagney  <cagney@b1.cygnus.com>
5110
5111         * sim-endian.h (U16_8): Implement
5112
5113         * sim-endian.c (sim_endian_split_16, sim_endian_join_16): New functions
5114
5115         * sim-endian.h (VL8_16, VH8_16): Implement.
5116
5117         * sim-memopt.c (memory_option_handler): Typecast 64bit value to
5118         long in printf.
5119         (memory_option_handler): Only zalloc modulo bytes when non-zero.
5120         (memory_option_handler): Skip comma in alias address list
5121
5122 Fri Oct 31 13:03:33 1997  Andrew Cagney  <cagney@b1.cygnus.com>
5123
5124         * sim-memopt.c (do_memopt_add, do_memopt_delete): Add level and
5125         space params.
5126         (parse_size, parse_addr): New functions
5127         (memory_option_handler, memory_options): Parse address & size
5128         using new functions. Pass level, space, modulo to do_memopt_add &
5129         do_memopt_del.
5130
5131         * sim-memopt.h (struct _sim_memopt): Add level & space fields.
5132
5133         * sim-core.h (sim_core_arrach, sim_core_detach): Replace
5134         `attach_type attach' argument with `unsigned level' argument.
5135         Document.
5136
5137         * sim-core.c (new_sim_core_mapping, sim_core_map_attach,
5138         sim_core_attach): Replace argument attach with level.  Update
5139         verification of arguments.
5140         (sim_core_map_detach, sim_core_detach): Replace argument attach
5141         with level.
5142
5143         * sim-basics.h (enum _attach_type): Delete.
5144
5145 Thu Oct 30 13:45:00 1997  Doug Evans  <devans@seba.cygnus.com>
5146
5147         * sim-core.h (sim_core_write_8): Define.
5148
5149 Tue Oct 28 12:29:22 1997  Andrew Cagney  <cagney@b1.cygnus.com>
5150
5151         * sim-bits.h: Document ROTn macro.
5152
5153         * sim-endian.h (H2T): Handle 16 byte variables.
5154
5155         * sim-n-core.h (sim_core_read_unaligned_N): Return a dummy when an
5156         error.
5157
5158         * sim-core.c: Do not generate sim_core_*_word.
5159
5160         * sim-n-core.h (sim_core_trace_N): Add line_nr argument.
5161         (sim_core_write_aligned_N, sim_core_read_aligned_N): Update.
5162
5163         * sim-core.h (sim_core_read_unaligned_word,
5164         sim_core_read_aligned_word, sim_core_read_word,
5165         sim_core_write_unaligned_word, sim_core_write_aligned_word,
5166         sim_core_write_word): Change to macros that map onto sim_core_*_N.
5167
5168 Mon Oct 27 11:25:10 1997  Doug Evans  <devans@canuck.cygnus.com>
5169
5170         * sim-n-endian.h: Add TAGS entrys for 16 byte versions.
5171
5172         * sim-endian.h: Disable 16 byte support.
5173
5174 Mon Oct 27 12:00:48 1997  Andrew Cagney  <cagney@b1.cygnus.com>
5175
5176         * sim-endian.c (_SWAP_16): Define.  Generate 126 bit swap code.
5177
5178         * sim-n-core.h (sim_core_trace_N): New function.
5179         (sim_core_read_aligned_N, sim_core_write_aligned_N): Use,
5180         (sim_core_read_unaligned_N): Do not retyrn bogus value wden error.
5181
5182         * sim-endian.h:  Add 128 bit variant.
5183
5184         * sim-core.h, sim-core.c: Add 128 bit variant.
5185
5186         * sim-types.h: Add signed128 and unsigned128 types using a struct.
5187
5188 Fri Oct 24 11:33:07 1997  Andrew Cagney  <cagney@b1.cygnus.com>
5189
5190         * sim-events.c (sim_events_process): Clear events->work_pending.
5191         (sim_events_tickn, sim_events_tick): Accumulate, instead of
5192         setting, nr_ticks_to_process.
5193         (sim_events_preprocess): Allow nr_ticks_to_process to be non-zero
5194         when the event queue isn't next.
5195
5196         * sim-events.h, sim-events.c (sim_events_slip): New function.
5197
5198 Wed Oct 22 14:18:38 1997  Andrew Cagney  <cagney@b1.cygnus.com>
5199
5200         * sim-hload.c (sim_load): Pass lma_p==0 and do_load=sim_load.
5201
5202         * sim-utils.h, sim-load.c (sim_load_file): Add lma_p and do_load
5203         arguments.
5204
5205 Tue Oct 21 18:37:57 1997  Doug Evans  <devans@canuck.cygnus.com>
5206
5207         * nrun.c (main): Remove useless test of name != NULL.
5208         Exit if bfd_openr fails.  Call bfd_check_format after bfd_openr.
5209
5210 Tue Oct 21 10:42:38 1997  Andrew Cagney  <cagney@b1.cygnus.com>
5211
5212         * sim-fpu.c (EXPMAX): Type is unsigned.
5213         (MIN_INT, MAX_INT): Type is signed64.
5214         (i2fpu): Type of val is signed64.
5215
5216 Tue Oct 21 10:42:38 1997  Andrew Cagney  <cagney@b1.cygnus.com>
5217
5218         * sim-profile.h (PROFILE_PC_BUCKET_SIZE): Treat a shift of zero as
5219         a bucket size of zero.
5220
5221         * sim-profile.c (OPTION_PROFILE_PC_GRANULARITY,
5222         OPTION_PROFILE_PC): Define.
5223         (profile_option_handler): Add support for --profile-pc and
5224         --profile-pc-granularity options.
5225         (profile_pc_init): When possible, compute nr buckets from bucket
5226         size.
5227
5228         * sim-profile.c (profile_pc_init): Align the profile-pc end
5229         address with the profile-pc bucket size.
5230
5231         * sim-profile.h (PROFILE_PC_NR_BUCKETS): Rename PROFILE_PC_SIZE to
5232         something less ambiguous.
5233         (PROFILE_PC_BUCKET_SIZE): Ditto for PROFILE_PC_SAMPLE_SIZE.
5234
5235         * sim-profile.c (profile_pc_cleanup): New function. Move
5236         profile_pc_uninstall code to here.
5237         (profile_pc_uninstall): Call.
5238         (profile_pc_init): Call.
5239
5240 Mon Oct 20 17:23:58 1997  Andrew Cagney  <cagney@b1.cygnus.com>
5241
5242         * sim-profile.c (profile_print_pc): Dump pc profile to dmon.out
5243         file using BSD gprof format.
5244
5245         * sim-bits.h (LSBIT, MSBIT, BIT): Force result to type
5246         unsigned_word.
5247         (LSBIT8, LSBIT16, LSBIT32, LSBIT64, MSBIT8, MSBIT16, MSBIT32,
5248         MSBIT64): Force result to unsignedN.
5249
5250 Thu Oct 16 11:38:56 1997  Andrew Cagney  <cagney@b1.cygnus.com>
5251
5252         * sim-alu.h (ALU16_BEGIN, ALU32_BEGIN, ALU64_BEGIN): Drop opening
5253         brace from macro.
5254         (ALU8_BEGIN, ALU8_SET, ALU8_ADD, ALU8_SUB, ALU8_NEGATE): Define.
5255         (ALU16_ADD, ALU16_SUB, ALU16_NEGATE): Simplify arrithmetic.
5256         (ALU32_ADD, ALU32_SUB, ALU32_NEGATE): Simplify arrithmetic.
5257         (ALU64_ADD, ALU64_SUB, ALU64_NEGATE): Simplify arrithmetic.
5258
5259 Wed Oct 15 09:24:19 1997  Andrew Cagney  <cagney@b1.cygnus.com>
5260
5261         * sim-core.h (struct _sim_core_mapping): Change free_buffer to
5262         type void*.
5263
5264         * sim-core.c (sim_core_uninstall, new_sim_core_mapping,
5265         sim_core_map_attach, sim_core_map_detach): Change free_buffer to
5266         type void*.
5267         (sim_core_attach): Rename buffer_freed to free_buffer, type
5268         void*. Ensure that allocated buffer is alligned according to
5269         region's address.
5270
5271 Mon Oct 13 11:34:50 1997  Andrew Cagney  <cagney@b1.cygnus.com>
5272
5273         * sim-alu.h (ALU64_HAD_OVERFLOW): Define.
5274         (ALU64_SUB): Define.
5275
5276         * Make-common.in (all): Build SIM_EXTRA_ALL first.
5277         (.gdbinit): Remove dependencies, generate once per build.
5278
5279 Tue Oct 14 19:20:09 1997  Andrew Cagney  <cagney@b1.cygnus.com>
5280
5281         * sim-n-core.h (sim_core_read_aligned_N,
5282         sim_core_write_aligned_N): Make xaddr param type address_word not
5283         unsigned_word.
5284
5285 Fri Oct  3 09:49:18 1997  Andrew Cagney  <cagney@b1.cygnus.com>
5286
5287         * sim-fpu.h, sim-fpu.c: Rewrite.  Change sim_fpu object to an
5288         unpacked floating point struct.  Pass sim_fpu object by reference.
5289         Add preliminary support for rounding modes.
5290
5291 Fri Oct  3 09:28:00 1997  Andrew Cagney  <cagney@b1.cygnus.com>
5292
5293         * configure: Regenerated to track ../common/aclocal.m4 changes.
5294
5295 Thu Oct  2 19:43:52 1997  Andrew Cagney  <cagney@b1.cygnus.com>
5296
5297         * aclocal.m4 (sim-bitsize): Fix typo, WITH_TARGET_WORD_BITSIZE not
5298         WITH_TARGET_BITSIZE.
5299
5300 Thu Sep 25 23:20:20 1997  Felix Lee  <flee@yin.cygnus.com>
5301
5302         * sim-profile.c (profile_print_core): label needs empty statement.
5303
5304 Thu Sep 25 11:20:47 1997  Stu Grossman  <grossman@babylon-5.cygnus.com>
5305
5306         * sim-break.c (sim_set_breakpoint sim_clear_breakpoint):  Use ZALLOC
5307         and zfree instead of xmalloc and free.  Prevents warnings.
5308
5309 Wed Sep 24 17:38:57 1997  Andrew Cagney  <cagney@b1.cygnus.com>
5310
5311         * configure: Regenerated to track ../common/aclocal.m4 changes.
5312
5313 Wed Sep 24 17:23:31 1997  Andrew Cagney  <cagney@b1.cygnus.com>
5314
5315         * Make-common.in (SIM_BITSIZE): Assign from configured value.
5316         (CONFIG_CFLAGS): Add SIM_BITSIZE.
5317
5318         * aclocal.m4 (--enable-sim-bitsize): Developer option for
5319         controling the bitsize/msb of the target.
5320
5321 Wed Sep 24 17:41:40 1997  Stu Grossman  <grossman@babylon-5.cygnus.com>
5322
5323         * Make-common.in:  New files sim-break.c, sim-break.h.
5324         * sim-base.h:  Add point to breakpoint list to sim_state_base.
5325         * sim-break.c sim-break.h:  New modules that implement intrinsic
5326         breakpoint support.
5327         * sim-module.c:  Add breakpoint module.
5328
5329 Tue Sep 23 00:26:39 1997  Felix Lee  <flee@yin.cygnus.com>
5330
5331         * sim-events.c (SIM_EVENTS_POLL_RATE): poll more often than once
5332         an hour.
5333         * sim-n-core.h (WITH_XOR_ENDIAN): MSVC barfs on
5334         if (0) { 1 % 0; }
5335         * sim-core.c (sim_core_xor_write_buffer): WITH_XOR_ENDIAN + 1.
5336         (SIGBUS) define for Windows.
5337         * sim-trace.c (trace_printf,debug_printf): added ALMOST_STDC.
5338         * sim-resume.c: define SIGTRAP for windows.
5339         * sim-xcat.h: use token pasting if ALMOST_STDC.
5340
5341 Tue Sep 23 11:04:38 1997  Andrew Cagney  <cagney@b1.cygnus.com>
5342
5343         * Make-common.in (SIM_SCACHE, SIM_DEFAULT_MODEL): Assign
5344         configured values.
5345         (CONFIG_CFLAGS): Add same.
5346
5347 Mon Sep 22 17:20:27 1997  Felix Lee  <flee@cygnus.com>
5348
5349         * sim-types.h (SIGNED64): ##i64 when _MSC_VER, not _WIN32.
5350         (SIGNED32): use ##i32.
5351
5352 Tue Sep 23 11:04:38 1997  Andrew Cagney  <cagney@b1.cygnus.com>
5353
5354         * configure: Regenerated to track ../common/aclocal.m4 changes.
5355
5356 Tue Sep 23 10:07:47 1997  Andrew Cagney  <cagney@b1.cygnus.com>
5357
5358         * aclocal.m4 (sim-endian): Simplify logic determining [default]
5359         endian of target.
5360
5361         * Make-common.in (SIM_WARNINGS, SIM_ALIGNMENT, SIM_ENDIAN,
5362         SIM_HOSTENDIAN, SIM_RESERVED_BITS, SIM_ASSERT, SIM_FLOAT,
5363         SIM_HARDWARE, SIM_INLINE, SIM_PACKAGES, SIM_REGPARM, SIM_SMP,
5364         SIM_STDCALL, SIM_XOR_ENDIAN): Assign configured values.
5365         (CONFIG_CFLAGS): Add same.
5366
5367         * aclocal.m4: Perform AC_SUBST on optional options.
5368
5369 Mon Sep 22 11:46:20 1997  Andrew Cagney  <cagney@b1.cygnus.com>
5370
5371         * sim-config.h (WITH_DEFAULT_ALIGNMENT): Don't hardwire any alignment.
5372
5373         * sim-options.c (standard_option_handler): Typo in warning message.
5374
5375         * sim-base.h (STATE_MODEL): Make conditional on SIM_HAVE_MODEL.
5376
5377         * sim-profile.c (profile_print_insn): Check 0 .. MAX_INSN for any
5378         insn count.  Make count conditional on there being a valid
5379         INSN_NAME.
5380         (profile_pc_init): Make default PC profile frequency an arbitrary
5381         256.
5382
5383         * sim-base.h: Ditto.
5384
5385         * sim-profile.h (WITH_PROFILE_MODEL_P): Only enable modeling when
5386         SIM_HAVE_MODEL.
5387
5388         * sim-model.h (struct MACH): Depreciate, to be replaced by bfd
5389         archure struct.
5390
5391 Mon Sep 22 11:46:20 1997  Andrew Cagney  <cagney@b1.cygnus.com>
5392
5393         * configure: Regenerated to track ../common/aclocal.m4 changes.
5394
5395 Mon Sep 22 11:45:00 1997  Andrew Cagney  <cagney@b1.cygnus.com>
5396
5397         * aclocal.m4 (sim_alignment): Simplify logic for selecting the
5398         configured alignment.
5399
5400 Fri Sep 19 17:45:25 1997  Andrew Cagney  <cagney@b1.cygnus.com>
5401
5402         * configure: Regenerated to track ../common/aclocal.m4 changes.
5403
5404 Fri Sep 19 17:26:14 1997  Andrew Cagney  <cagney@b1.cygnus.com>
5405
5406         * sim-config.c (sim_config): Check for default alignment.
5407
5408         * sim-options.c (standard_option_handler): Add alignment option.
5409
5410         * aclocal.m4 (sim_alignment): Allow configuration of hardwired and
5411         default alignment requirements on memory accesses.
5412
5413 Fri Sep 19 11:51:35 1997  Jeffrey A Law  (law@cygnus.com)
5414
5415         * sim-load.c (sim_load_file): Return failure if the executable
5416         had no loadable sections.
5417
5418 Wed Sep 17 13:33:28 1997  Andrew Cagney  <cagney@b1.cygnus.com>
5419
5420         * sim-events.c (ETRACE): Use trace_printf not sim_io_printf for
5421         trace output.
5422
5423         * sim-core.c (sim_core_signal): When bad access halt simulator
5424         SIGSEGV / SIGBUS instead of aborting.
5425         (signal.h): Include.
5426
5427         * sim-watch.c (sim_watchpoint_install): Handler for watchpoint
5428         options was missing.
5429
5430         * sim-bits.h (MOVED): Define
5431
5432 Wed Sep 17 10:33:28 1997  Andrew Cagney  <cagney@b1.cygnus.com>
5433
5434         * sim-alu.h (ALU32_HAD_OVERFLOW): Pacify GCC, Use MSBIT instead of
5435         BIT.
5436
5437         * sim-bits.h (LSBIT, MSBIT): Check for overflow of shift value.
5438
5439         * sim-bits.c: Add 8 bit versions of bit macros.
5440
5441         * sim-bits.h: Ditto.
5442
5443 Tue Sep 16 16:15:16 1997  Andrew Cagney  <cagney@b1.cygnus.com>
5444
5445         * sim-bits.c (LSSEXT, MSSEXT): Replace SEXT.
5446         (LSINSERTED, MSINSERTED): Ditto for INSERTED.
5447
5448         * sim-n-bits.h (MSSEXTn, LSSEXTn): Replace SEXTn.
5449         (LSINSERTDn, MSINSERTEDN): Ditto for INSERTEDn.
5450
5451         * sim-bits.h (SEXT*): Define as MSEXT/LSEXT.
5452         (INSERTED*): Ditto for LSINSERTED/MSINSERTED.
5453
5454 Mon Sep 15 17:36:15 1997  Andrew Cagney  <cagney@b1.cygnus.com>
5455
5456         * aclocal.m4 (SIM_AC_COMMON): Add optional config.h file argument.
5457         configure.in: Output to cconfig.h instead of config.h.
5458
5459         * configure: Regenerated to track ../common/aclocal.m4 changes.
5460
5461 Mon Sep 15 15:39:28 1997  Andrew Cagney  <cagney@b1.cygnus.com>
5462
5463         * sim-utils.c (sim_analyze_program): Set STATE_ARCHITECTURE from
5464         BFD if known.
5465
5466 Tue Sep  9 21:46:46 1997  Felix Lee  <flee@cygnus.com>
5467
5468         * callback.c (os_write): divert stdout and stderr to their
5469         respective hooks.
5470
5471 Thu Sep 11 10:08:48 1997  Andrew Cagney  <cagney@b1.cygnus.com>
5472
5473         * sim-profile.c (profile_print_speed): Call
5474         sim_events_elapsed_time instead of PROFILE_EXEC_TIME for moment.
5475
5476         * sim-events.c (sim_events_elapsed_time): New function return nr
5477         host MS consumed by the simulator.
5478         (sim_watch_valid): Use.
5479
5480         * sim-module.c (modules): Install sim_events very very early.
5481
5482         * sim-profile.c (profile_print): Call profile_print_pc.
5483         (print_bar):
5484         (profile_pc_init): New function, set up processor for PC
5485         profiling.
5486         (profile_print_pc): New function, print a PC profile.
5487         (profile_pc_event): New function, sample PC.
5488
5489         * sim-profile.h (PROFILE_PC_COUNT, PROFILE_PC_START,
5490         PROFILE_PC_END, PROFILE_PC_SHIFT, PROFILE_PC_SAMPLE_SIZE): Add to
5491         profile struct.
5492
5493         * sim-options.c (sim_print_help): Pacify GCC.
5494
5495         * sim-n-core.h (sim_core_read_aligned_N,
5496         sim_core_write_aligned_N): Add un-conditional profile call.
5497         (sim_core_read_unaligned_N, sim_core_write_unaligned_N): Add
5498         profile call when aligned read/write isn't used.
5499
5500         * sim-base.h: Include sim-profile, sim-model after sim-core &
5501         sim-events allow sim-core to define useful values.
5502
5503         * sim-profile.c (OPTION_PROFILE_CORE): Define.
5504         (profile_option_handler, profile_options): Add support for
5505         --profile-core option.
5506         (print_bar): Include when core profiling.
5507         (profile_print_core): New function, print core profile.
5508
5509         * sim-config.c (print_sim_config): Print profile status.
5510
5511         * sim-profile.h (PROFILE_NEXT_IDX, PROFILE_core,
5512         WITH_PROFILE_PC_P): Define.
5513         (PROFILE_CORE_COUNT): Count each core-map/size separatly.
5514         (PROFILE_COUNT_CORE): Define.
5515
5516 Thu Sep 11 08:44:52 1997  Andrew Cagney  <cagney@b1.cygnus.com>
5517
5518         * sim-watch.c (handle_watchpoint): Pass a char** index into the
5519         interrupt_names array as the data.
5520         (sim-watch.h): Document.
5521
5522 Wed Sep 10 16:15:22 1997  Andrew Cagney  <cagney@b1.cygnus.com>
5523
5524         * sim-options.c (sim_print_help): When the doc string is to long
5525         word wrap it.
5526
5527         * sim-watch.c (sim_watchpoint_install): Use option.doc_name so
5528         that only the first few the watch options are listed.  Generate
5529         meanginful usage messages.
5530
5531         * sim-options.h (struct OPTION): Clarify use of doc_name field
5532
5533 Wed Sep 10 13:23:24 1997  Andrew Cagney  <cagney@b1.cygnus.com>
5534
5535         * sim-options.c (OPTION_ARCHITECTURE_INFO): New option.
5536         (standard_option_handler): Handle --architecture-info.
5537
5538 Tue Sep  9 21:46:46 1997  Felix Lee  <flee@cygnus.com>
5539
5540         * sim-core.h (sim_cpu_core): [WITH_XOR_ENDIAN + 1], to avoid
5541         illegal zero-sized array.
5542         * sim-core.c (sim_core_xor_read_buffer): same.
5543
5544 Tue Sep  9 11:20:35 1997  Doug Evans  <dje@canuck.cygnus.com>
5545
5546         * nltvals.def: Regenerate.
5547
5548 Tue Sep  9 02:10:36 1997  Andrew Cagney  <cagney@b1.cygnus.com>
5549
5550         * sim-fpu.c (DP_FRACHIGH2): Define LL using SIGNED64.
5551
5552 Mon Sep  8 12:22:20 1997  Andrew Cagney  <cagney@b1.cygnus.com>
5553
5554         * sim-bits.c (MASKED): Delete.
5555         (EXTRACTED): Delete.
5556         (LSEXTRACTED, MSEXTRACTED): New functions.
5557
5558         * sim-n-bits.h (MASKEDn): Delete, define as MSMASKED or LSMASKED.
5559         (MSMASKEDn, LSMASKEDn): Add last argument.
5560         (MSMASK*): Ditto.
5561
5562         * sim-bits.h (EXTEND8, EXTEND16): Define.
5563         (EXTRACTED64): Define as 64 bit extract, not 32 bit.
5564
5565         * sim-run.c (sim_engine_run): Use CPU_CIA macro.
5566
5567         * sim-engine.h (SIM_ENGINE_HALT_HOOK): Use CPU_CIA to get at
5568         current instruction address.
5569
5570         * sim-inline.h (*_ENGINE): Define.
5571
5572 Fri Sep  5 08:39:02 1997  Andrew Cagney  <cagney@b1.cygnus.com>
5573
5574         * sim-core.c (sim_core_attach): Fix checks of modulo/mask.
5575
5576         * sim-watch.c (delete_watchpoint): Delete by ident and type.
5577         (watch_option_handler): Call delete_watchpoint with ident or type.
5578         (sim_watchpoint_install): Create interrupt specific watchpoint
5579         commands on the fly.
5580         (do_watchpoint_create): New function, create a watch point using
5581         type/int-nr info encoded in the option nr.
5582         (do_watchpoint_info): New function.  List active watchpoints.
5583
5584         * sim-watch.h: Change data structure to a list.
5585
5586         * sim-memopt.c (memory_option_handler): Require explicit "all"
5587         before deleting all memory regions.
5588
5589         * sim-utils.c (sim_do_commandf): New function, printf version of
5590         sim_do_command.
5591
5592         * sim-basics.h (asprintf, vasprintf): Hack, define for CYGWIN32.
5593
5594         * sim-alu.h (ALU64_ADD): Use explicit MSEXTRACTED64, do not assume
5595         bit endianness.
5596         (SIGNED64, UNSIGNED64): Delete.
5597         (ALU64_ADD): Don't rely on bit endianness.
5598         (ALU64_BEGIN): Define.
5599
5600         * sim-n-bits.h (MSEXTRACTEDn, LSEXTRACTED): New functions.
5601         (EXTRACTEDn): Delete, define as either LSEXTRACTED or MSEXTRACTED.
5602
5603         * sim-types.h (SIGNED64, UNSIGNED64): New macros, attach relevant
5604         suffix - u64, LL - to 64 bit constants.
5605
5606 Thu Sep  4 09:27:54 1997  Andrew Cagney  <cagney@b1.cygnus.com>
5607
5608         * sim-config.c (sim_config): Add assert for SIM_MAGIC_NUMBER.
5609
5610         * sim-utils.h (NZALLOC): Define - zalloc * N.
5611
5612         * sim-hrw.c (sim_read, sim_write): New file.  Provide generic
5613         implementation of read/write functions.
5614
5615         * Make-common.in (sim-hrw.o): New target.
5616
5617         * sim-base.h (STATE_MEMOPT_P): Delete, simulators _always_ add
5618         memory.
5619
5620         * sim-memopt.c (memory_option_handler): Implement memory-size
5621         command. Implement memory-alias command.  Let memory-delete delete
5622         all memory regions.
5623         (add_memopt): New function.  Add a memory region.
5624         (do_memopt_delete): New function. Delete a memory region.
5625
5626         * sim-utils.c (sim_elapsed_time_get): Never return zero.
5627
5628         * sim-core.c (sim_core_detach): New function.
5629         (sim_core_map_detach): New function. Perform the actual detach.
5630         (sim_core_init): Move initialization code from here.
5631         (sim_core_install): To here.
5632         (sim_core_uninstall): And here.
5633
5634         * sim-module.c: Add memopt module.
5635
5636         * sim-base.h (STATE_MEMOPT, STATE_MEMOPT_P): Add memopt to
5637         simulator base type.
5638
5639         * Make-common.in (sim_main_headers): Add sim-memopt.h
5640         (sim-memopt.o): New target.
5641
5642         * sim-core.c (sim_core_install): Add core_options to the option
5643         table.
5644
5645         * sim-watch.c (watch_options): Make --delete-watch a synonym for
5646         --watch-delete.
5647
5648         * sim-config.h (WITH_MODULO_MEMORY): Define as 0.  Update
5649         comments.
5650
5651         * sim-core.h (struct _sim_core_mapping): Change nr_bytes to type
5652         address_word, add mask member.
5653
5654         * sim-core.h, sim-core.c (sim_core_attach): Make nr_bytes of type
5655         address_word, allow for 64bit targets in 32bit host. Add modulo
5656         argument.
5657         (sim_core_map_attach): Ditto.
5658         (new_sim_core_mapping): Ditto.
5659         (sim_core_translate): Mask address when modulo memory.
5660
5661 Wed Sep  3 17:32:54 1997  Doug Evans  <dje@seba.cygnus.com>
5662
5663         * sim-hload.c (sim_load): Add assert for SIM_MAGIC_NUMBER.
5664
5665         * gdbinit.in: New file.
5666         * aclocal.m4 (SIM_AC_OUTPUT): Build .gdbinit.
5667         * Make-common.in (distclean): Delete .gdbinit.
5668         (.gdbinit): Add rule for.
5669         * configure: Regenerated to track ../common/aclocal.m4 changes.
5670
5671         * Make-common.in (cgen-run.o): Add rule for.
5672
5673 Wed Sep  3 10:08:21 1997  Andrew Cagney  <cagney@b1.cygnus.com>
5674
5675         * sim-resume.c (sim_resume): Suspend/resume the simulator.
5676
5677         * sim-events.c (sim_watch_valid): Compute total elapsed time from
5678         both resumed and previous elapsed time.
5679         (sim_events_init): Set initial_wallclock and current_wallclock to
5680         zero.
5681         (sim_events_install): Install sim_events_suspend and
5682         sim_events_resume.
5683         (sim_events_watch_clock): Allow for suspended simulator when
5684         computing the time of the clock event.
5685
5686         * sim-events.h (struct _sim_event): Add resume_wallclock, rename
5687         initial_wallclock to elapsed_wallclock, set both to zero.
5688         (sim_events_init, sim_events_uninstall): Delete prototypes.
5689
5690         * sim-module.h (MODULE_SUSPEND_FN, MODULE_RESUME_FN): Define types.
5691
5692         * sim-module.c(sim_module_resume, sim_module_suspend): New
5693         functions.
5694
5695 Wed Sep  3 10:08:21 1997  Andrew Cagney  <cagney@b1.cygnus.com>
5696
5697         * sim-core.c (sim_core_map_attach): Clarify memory overlap error
5698         message.
5699
5700 Tue Sep  2 14:57:06 1997  Doug Evans  <dje@canuck.cygnus.com>
5701
5702         * Makefile.in (TAGS): Add support for "/* TAGS: foo */" marker.
5703         * Make-common.in (TAGS): Likewise.
5704         * sim-n-bits.h: Add TAGS comments for all functions.
5705         * sim-n-core.h: Likewise.
5706         * sim-n-endian.h: Likewise.
5707
5708 Mon Sep  1 10:50:11 1997  Andrew Cagney  <cagney@b1.cygnus.com>
5709
5710         * sim-utils.c (sim_state_alloc): Set CPU backlinks, callback and
5711         kind.
5712
5713         * sim-base.h (sim_state_alloc): Add callback and kind arguments.
5714
5715         * sim-base.h (INVALID_INSTRUCTION_ADDRESS): Add default
5716         definition.
5717
5718 Sat Aug 30 09:47:21 1997  Andrew Cagney  <cagney@b1.cygnus.com>
5719
5720         * sim-fpu.c (DP_GARDMSB, ...): Make unsigned.
5721         (DP_FRACHIGH, DP_FRACHIGH2, ..): Use MSMASK to avoid LL.
5722
5723 Fri Aug 29 13:37:44 1997  Andrew Cagney  <cagney@b1.cygnus.com>
5724
5725         * sim-core.c (sim_core_map_attach): Cast attach enum to int.
5726         (sim_core_xor_read_buffer, sim_core_xor_write_buffer): Make
5727         nr_transfered and nr_this_transfer unsigned.
5728
5729         * sim-events.c (sim_events_tickn): N is signed, as limited to
5730         MAXINT.
5731
5732         * sim-n-endian.h (offset_N): Change size to unsigned.
5733
5734         * callback.c (os_poll_quit): Add prototypes for kbhit and getkey.
5735
5736 Fri Aug 29 10:10:53 1997  Andrew Cagney  <cagney@b1.cygnus.com>
5737
5738         * sim-utils.c (sim_copy_argv): Delete, replaced by dupargv.
5739
5740         * sim-options.c (sim_parse_args): Use dupargv.
5741
5742 Thu Aug 28 10:36:34 1997  Doug Evans  <dje@canuck.cygnus.com>
5743
5744         * sim-options.c (standard_option_handler): Use xstrdup, not strdup.
5745
5746 Thu Aug 28 12:09:15 1997  Andrew Cagney  <cagney@b1.cygnus.com>
5747
5748         * sim-base.h (STATE_ARCHITECTURE, STATE_TARGET): Add to simulator
5749         base type.
5750
5751         * sim-options.c (standard_options): Add --architecture=MACHINE and
5752         --target=TARGET options.
5753         (OPTION_ARCHITECTURE, OPTION_TARGET): Define.
5754         (standard_option_handler): Handle architecture and target options.
5755         (bfd.h): Include.
5756
5757         * sim-utils.c (sim_analyze_program): Pass STATE_TARGET to
5758         bfd_openr.
5759         (sim_analyze_program): Set prog_bfd architecture from
5760         STATE_ARCHITECTURE if known.
5761
5762 Wed Aug 27 18:13:22 1997  Andrew Cagney  <cagney@b1.cygnus.com>
5763
5764         * configure: Regenerated to track ../common/aclocal.m4 changes.
5765         * config.in: Ditto.
5766
5767 Wed Aug 27 18:11:30 1997  Andrew Cagney  <cagney@b1.cygnus.com>
5768
5769         * aclocal.m4 (enable-sim-warnings): Remove comment stating
5770         that option does not apply to certain files.
5771
5772 Wed Aug 27 15:13:04 1997  Andrew Cagney  <cagney@b1.cygnus.com>
5773
5774         * sim-bits.h (LSBIT8, LSBIT16, LSBIT32, LSBIT64, LSBIT, MSBIT8,
5775         MSBIT16, MSBIT32, MSBIT64, MSBIT): New macros - single bit as
5776         offset from MSB/LSB.
5777
5778         * sim-endian.h (A1_8, A2_8, A4_8, A1_4, A2_4, A1_2): New macro,
5779         access address of sub word quantity of a hosts 16, 32, 64 bit word
5780         type.
5781         (V1_2, V1_4, V2_4, V1_8, V2_8, V4_8): Ditto for values.
5782         (U8_1, U8_2, U8_4, U4_1, U4_2, U2_1): Ditto for set of values.
5783         (V2_H1, V2_L1, V4_H2, V4_L2, V8_L4, V8_H4): Given N byte argument,
5784         return N*2 byte value with argument in Hi/Lo word.  Renamed from
5785         V1_H2, V1_L2, V2_H4, V2_L4, V4_H8, V4_L8.
5786
5787         * sim-alu.h (ALU32_HAD_OVERFLOW): Use 64 bit mask not 32bit.
5788         (ALU16_HAD_CARRY, ALU32_HAD_CARRY, ALU16_HAD_OVERFLOW): Use MSBIT
5789         so that bit offset is explicit.
5790
5791 Wed Aug 27 11:55:35 1997  Andrew Cagney  <cagney@b1.cygnus.com>
5792
5793         * sim-utils.c (sim_analyze_program): Add prog_name argument.
5794         Update STATE_PROG_BFD when needed with a dup'd copy of the
5795         program.
5796
5797         * sim-config.c (sim_config): Delete ABFD argument, use
5798         STATE_PROG_BFD directly.
5799
5800 Tue Aug 26 12:55:26 1997  Andrew Cagney  <cagney@b1.cygnus.com>
5801
5802         * run.c (main): Pass the open ABFD to sim_create_inferior.
5803
5804         * nrun.c (main): Determine prog_bfd.  Pass to sim_create_inferior
5805         and sim_load.
5806         (bfd.h): Include.
5807
5808         * sim-hload.c (sim_load): New file. Implement generic sim_load for
5809         hardware only simulator targets.
5810
5811         * Make-common.in (sim-hload.o): Add rule.
5812
5813 Wed Aug 27 09:51:42 1997  Andrew Cagney  <cagney@b1.cygnus.com>
5814
5815         * sim-utils.c (sim_copy_argv): Rewrite to match malloc strategy
5816         used by copyargv and freeargv.
5817
5818         * sim-options.c (sim_parse_args): Save a copy of PROG-ARGS in
5819         STATE_PROG_ARGV, not just a pointer.
5820
5821 Mon Aug 25 17:50:22 1997  Andrew Cagney  <cagney@b1.cygnus.com>
5822
5823         * configure: Regenerated to track ../common/aclocal.m4 changes.
5824         * config.in: Ditto.
5825
5826 Mon Aug 25 12:11:06 1997  Andrew Cagney  <cagney@b1.cygnus.com>
5827
5828         * aclocal.m4 (sim-endian): Add second argument to
5829         SIM_AC_OPTION_ENDIAN.  First is hardwired endian, second is
5830         default endian when not hardwired.
5831
5832         * sim-config.h (WITH_DEFAULT_TARGET_BYTE_ORDER): New macro, if all
5833         else failes value for target byte order.
5834
5835         * sim-config.c (sim_config): Add abfd arguments. Set
5836         STATE_PROG_BFD accordingly.  Determine prefered_target_byte_order
5837         from same.
5838         (sim_config): Return SIM_RC, don't abort.
5839         (bfd.h): Include.
5840
5841         * run.c (main): Update call to sim_open - add ABFD argument.
5842         * nrun.c (main): Add NULL ABFD argument.
5843
5844 Thu Aug 14 12:48:57 1997  Doug Evans  <dje@canuck.cygnus.com>
5845
5846         * callback.c (os_poll_quit): Make static.
5847         Call sim_cb_eprintf, not p->eprintf.
5848         (sim_cb_printf, sim_cb_eprintf): New functions.
5849         * sim-utils.h (sim_cb_printf, sim_cb_eprintf): Declare.
5850
5851         * sim-basics.h (zalloc,zfree,sim_add_commas,SIM_ELAPSED_TIME,
5852         sim_elapsed_time_get,sim_elapsed_time_since): Move decls to
5853         sim-utils.h. #include sim-utils.h.
5854         * sim-utils.h: Above decls moved here.
5855         (sim_analyze_program,sim_load_file): Use `struct _bfd', not `bfd'.
5856
5857         * sim-watch.c (action_watchpoint): Fix thinkos.
5858
5859 Thu Jul 24 08:48:05 1997  Stu Grossman  (grossman@critters.cygnus.com)
5860
5861         * sim-types.h:  Fix defs of 64 bit data types for MSVC.
5862
5863 Tue Jul 22 10:35:37 1997  Doug Evans  <dje@canuck.cygnus.com>
5864
5865         * sim-n-core.h (sim_core_write_unaligned_N): Add missing break
5866         to FORCED_ALIGNMENT case.
5867
5868 Thu Jun  5 13:48:37 1997  Andrew Cagney  <cagney@b1.cygnus.com>
5869
5870         * callback.c (target_to_host_open): Handle hosts with O_BINARY.
5871
5872 Thu Jun  5 08:47:10 1997  Jeffrey A Law  (law@cygnus.com)
5873
5874         * Make-common.in (libsim.a): Fix typo.
5875
5876 Thu Jun  5 13:48:37 1997  Andrew Cagney  <cagney@b1.cygnus.com>
5877
5878         * nrun.c (main): Verify the structure returned before using it.
5879
5880 Wed Jun  4 11:44:06 1997  Andrew Cagney  <cagney@b1.cygnus.com>
5881
5882         * sim-config.h (WITH_ENGINE): Enable the sim-engine module by
5883         default.
5884
5885         * sim-engine.c (sim_engine_install): New function.  Install the
5886         engine init functions.
5887         (sim_engine_init): [Re]initialize the simulator engine.
5888
5889         * sim-module.c: Add sim_engine to list of modules that always
5890         install.
5891
5892 Tue Jun  3 04:52:04 1997  Andrew Cagney  <cagney@b1.cygnus.com>
5893
5894         * sim-watch.c (schedule_watchpoint): Use sim_unschedule_watchpoint
5895         to remove the old watchpoint, not delete_watchpoint.
5896         (watch_option_handler): Action the correct watchpoint, not just
5897         cycles.
5898
5899 Wed May 28 14:47:41 1997  Andrew Cagney  <cagney@b1.cygnus.com>
5900
5901         * sim-n-core.h (sim_core_write_aligned_N): For 8byte reads, output
5902         both low and high word.
5903         (sim_core_write_aligned_N): Ditto.
5904
5905         * sim-trace.c (set_trace_options): Delete code explicitly setting
5906         core->trace.
5907
5908         * sim-options.c (sim_print_help): Call the list commands if not a
5909         standalone simulator.
5910         (sim_print_help): Advise that some options may not be applicable.
5911
5912         * sim-trace.c (set_trace_options): Assume core present.
5913
5914         * sim-events.c (sim_events_schedule_after_signal): Overflow signal
5915         buffer when full not almost full.
5916
5917 Tue May 27 14:32:00 1997  Andrew Cagney  <cagney@b1.cygnus.com>
5918
5919         * sim-events.c (sim_events_process): Don't blat the event queue
5920         when processing watchpoints.
5921
5922         * sim-watch.h: Make arg unsigned long - stop sign extension.
5923
5924         * sim-events.c (sim_watch_valid): rewrite so debugable.
5925
5926         * sim-config.h (WITH_XOR_ENDIAN): Default to zero.
5927
5928         * sim-watch.c (schedule_watchpoint): Add is_within option so that
5929         inequality test is possible.
5930         (handle_watchpoint): Re-pass is_within arg.
5931         (watch_option_handler): When `!' prefix to pc-watchpoint arg pass
5932         0 to schedule_watchpoint's is_within arg.
5933         (sim_watchpoint_init): Re-pass is_within arg.
5934
5935         * sim-options.c (sim_print_help): Add is_command argument.  Don't
5936         include -- prefix when called from the command line interpreter.
5937
5938         * sim-watch.c (schedule_watchpoint): Pass true is_within argument.
5939
5940         * sim-events.c (sim_events_watch_sim): Add is_within argument,
5941         zero indicates that the test should be reversed.
5942         (sim_events_watch_core): Ditto.
5943         (WATCH_CORE): Compare range against is_within.
5944         (WATCH_SIM): Ditto.
5945
5946 Tue May 27 12:48:03 1997  Andrew Cagney  <cagney@b2.cygnus.com>
5947
5948         * sim-events.c (WATCH_CORE): Pass NULL cpu argument to
5949         sim_core_read_buffer.  Check nr-bytes transfered.
5950
5951         * sim-core.h (sim_core_common): Define a new struct that contains
5952         the common data.  to sd and cpu structures.
5953         * sim-core.c (sim_core_attach): Update.
5954         (sim_core_init): Update. Remember to copy initialized data to each
5955         cpu.
5956         (sim_core_find_mapping): Ditto.
5957
5958         * sim-core.c (sim_core_read_buffer): Add cpu argument.
5959         (sim_core_write_buffer): Ditto.
5960
5961         * sim-n-core.h (sim_core_read_unaligned_N): When mis-aligned
5962         transfer use xor version of read buffer.
5963         (sim_core_write_unaligned_N): Ditto for write.
5964
5965         * sim-core.c (sim_core_xor_read_buffer): New function implement
5966         xor-endian data read breaking transfer up into xor-endian sized
5967         blocks.
5968         (sim_core_xor_write_buffer): Ditto for write.
5969         (reverse_n): Reverse order of arbitrary number of bytes in buffer
5970         - needed for xor-endian transfers.
5971
5972 Fri May 23 14:24:31 1997  Andrew Cagney  <cagney@b1.cygnus.com>
5973
5974         * sim-inline.h: Review description.
5975
5976         * sim-core.h, sim-core.c: Reduce number of functions being inlined
5977         to just those involved in data transfers and configuration.
5978
5979         * sim-xcat.h (XSTRING): New macro, map macro definition onto
5980         string.
5981         * sim-n-core.h (sim_core_read_aligned_N): Use.
5982         (sim_core_read_unaligned_N): Ditto.
5983         (sim_core_read_unaligned_N): Ditto..
5984         (sim_core_write_unaligned_N): Ditto.
5985
5986         * sim-core.h: Add xor endian bitmap to main structure.  *
5987
5988         sim-n-core.h (sim_core_write_aligned_N): Add suport for xor
5989         endian.
5990         (sim_core_read_aligned_N): Ditto.
5991
5992         * sim-core.c (sim_core_set_xor_endian): New function.
5993         (sim_core_attach): Don't overwrite the per-cpu xor map when
5994         cloning the global core.
5995
5996 Fri May 23 10:53:13 1997  Andrew Cagney  <cagney@b1.cygnus.com>
5997
5998         * sim-engine.h: Update below so that it is using an enumerated
5999         type.
6000
6001 Thu May 22 09:12:16 1997  Gavin Koch  <gavin@cygnus.com>
6002
6003         * sim-engine.c (sim_engine_restart):
6004         * sim-resume.c (sim_resume): Change longjmp param/setjmp
6005         return value used for simulator restart from 0 to 2.
6006
6007 Wed May 21 08:47:30 1997  Andrew Cagney  <cagney@b1.cygnus.com>
6008
6009         * cgen-scache.c (scache_option_handler): Add is_command arg.
6010
6011         * sim-model.c (model_option_handler): Add is_command argument.
6012
6013         * sim-profile.c (profile_option_handler): Add is_command arg.
6014
6015         * sim-events.c (sim_watch_valid): Use ub64, lb64 when 64bit value
6016         involved.
6017
6018         * sim-module.c (sim_module_add_init_fn): Call init fn in the same
6019         order that they are registered.
6020
6021         * sim-options.h (OPTION_HANDLER): Add argument to differentiate
6022         between option and command line processing.
6023
6024         * sim-options.c: Include stdlib.h, ctype.h.
6025
6026         * Make-common.in (sim-watch.o): Add rule.
6027         (sim_main_headers): Assume sim-assert.h included.
6028         (sim-*.o): Simplify make rule.
6029
6030         * sim-module.c: Add sim_watch_install to module list.
6031
6032 Tue May 20 14:15:23 1997  Andrew Cagney  <cagney@b1.cygnus.com>
6033
6034         * sim-base.h (STATE_LOADED_P): New predicate. Set once everything
6035         has been loaded.
6036
6037         * sim-trace.c (trace_install): Check magic. Include sim-assert.h.
6038         * sim-events.c (sim_events_install): Ditto.
6039         * sim-core.c (sim_core_install): Ditto.
6040         * sim-model.c (model_install): Ditto.
6041         * sim-options.c (standard_install): Ditto.
6042         * sim-profile.c (profile_install): Ditto.
6043         * sim-reason.c (sim_stop_reason): Ditto.
6044         * sim-run.c (sim_engine_run): Ditto.
6045         * sim-utils.c (sim_analyze_program): Ditto.
6046
6047         * sim-module.c (modules): Make profile_install and trace_install
6048         optional.
6049
6050         * sim-base.h (STATE_MEM_BASE): Define for flat memory systems.
6051
6052         * sim-options.c (standard_option_handler): Set the byte order.
6053
6054         * sim-events.c (sim_events_process): Allow multi tick processing.
6055         (sim_events_tickn): New function - multi cycle tick.
6056
6057         * sim-events.h (sim_events_tickn, sim_events_timewarp): Add
6058         prototypes.  Under development.
6059         (sim_events): Replace processing with nr_ticks_to_process.
6060
6061 Tue May 20 09:39:22 1997  Andrew Cagney  <cagney@b1.cygnus.com>
6062
6063         * nrun.c (main): Pass callbacks to sim_open instead of using
6064         sim_set_callbacks.
6065
6066         * run.c (main): Ditto.
6067
6068 Mon May 19 12:07:22 1997  Andrew Cagney  <cagney@b1.cygnus.com>
6069
6070         * sim-events.c (sim_events_zalloc): Signal save memory allocator -
6071         stop tk interrupting malloc calls.
6072         (sim_events_zalloc): Converse.
6073
6074         * Make-common.in (sim_main_headers): Add sim-events.h.
6075
6076         * sim-events.c (sim_events_schedule_after_signal): Change return
6077         type to void - signal events are strictly internal.
6078         (sim_events_init): Allocate a finite buffer for signal events.
6079         (sim_events_schedule_after_signal): Enter signal events into the
6080         signal buffer.
6081
6082         * sim-engine.c (sim_engine_halt): Check SIM_DESC magic.
6083         (sim_engine_restart): Ditto.
6084         (sim_engine_abort): Ditto.
6085         * sim-stop.c (sim_stop): Ditto.
6086         (control_c_simulation): Ditto.
6087         * sim-resume.c (sim_resume): Ditto.
6088         (has_stepped): Ditto.
6089         * sim-abort.c (sim_engine_abort): Ditto.
6090
6091         * sim-basics.h (transfer_type): New type.
6092
6093         * sim-core.c (sim_core_signal): New function. Print core signal
6094         information.
6095         (sim_core_find_mapping): Add transfer argument.
6096
6097         * sim-n-core.h (sim_core_{write,write}_unaligned_N): Call
6098         SIM_CORE_SIGNAL if a recoverable abort.
6099         * sim-core.c (sim_core_find_mapping): Ditto.
6100
6101 Fri May 16 15:13:21 1997  Andrew Cagney  <cagney@b1.cygnus.com>
6102
6103         * sim-core.c (sim_core_find_mapping): Replace calls to
6104         sim_io_error to more resiliant sim_engine_abort.
6105
6106         * sim-n-core.h (sim_core_read_unaligned_N): Ditto.
6107         (sim_core_write_unaligned_N): Ditto.
6108
6109 Tue May 13 13:50:06 1997  Andrew Cagney  <cagney@b1.cygnus.com>
6110
6111         * sim-module.c: Add sim_events_install to list.
6112
6113         * sim-events.c (sim_events_install, sim_events_uninstall): Clonse
6114         from sim_core_*.
6115         (sim_events_init): Now returns SIG_RC.
6116
6117         * sim-run.c: New file. Generic sim_engine_run.
6118         * sim-reason.c: New file. Generic sim_stop_reason.
6119         * sim-stop.c: New file. Generic sim_stop.
6120         * sim-resume.c: New file. Generic sim_resume.
6121
6122         * Make-common.in (sim-engine.o): Add rule.
6123         (sim-run.o, sim-reason.o, sim-stop.o, sim-resume.o): Ditto.
6124
6125         * sim-engine.h, sim-engine.c: New file. Provide generic
6126         implementation of sim_engine_halt, sim_engine_error. et.al.
6127
6128         * sim-base.h (sim_state_base): Add member halt.
6129         (sim-engine.h): Include.
6130
6131         * sim-events.h (sim_event_handler): Always pass SIM_DESC to event
6132         handlers.
6133         * sim-events.c (sim_events_poll): Update event handler.
6134
6135 Tue May 13 09:57:49 1997  Andrew Cagney  <cagney@b2.cygnus.com>
6136
6137         * sim-events.h, sim-events.c (sim_events_watch_clock): New
6138         function.
6139         (sim_events_watch_sim): New function.
6140         (sim_events_watch_core): New function.
6141         (sim_watch_valid): New function.
6142         (sim_events_preprocess): New function.
6143         (sim_events_process): Process the watchpoints as well as the timer
6144         queue.
6145         (sim_events_tick): Check WORK_PENDING instead of the hold queue.
6146         (sim_events_deschedule): Check all the queues when removing an
6147         event.
6148         (sim_events_init): Ditto for cleaning.
6149
6150 Mon May 19 12:07:22 1997  Andrew Cagney  <cagney@b1.cygnus.com>
6151
6152         * sim-fpu.c (is_ufpu_number): Comment out - currently unused.
6153
6154 Mon May 19 11:23:03 1997  Andrew Cagney  <cagney@b1.cygnus.com>
6155
6156         * callback.c (os_open): Type of arg flags is int.
6157
6158 Fri May 16 22:26:43 1997  Michael Meissner  <meissner@cygnus.com>
6159
6160         * sim-fpu.c (sim_fpu_is_{eq,ne,lt,le,gt,ge}): Compare Infinities
6161         just like normal numbers as per IEEE rules.
6162
6163 Wed May 14 21:20:38 1997  Bob Manson  <manson@charmed.cygnus.com>
6164
6165         * callback.c (os_close): Mark the descriptor as being
6166         available if the close succeeded.
6167         (os_open): Pass 0644 as the mode of the file being created.
6168
6169 Thu May 15 10:58:52 1997  Andrew Cagney  <cagney@b1.cygnus.com>
6170
6171         * sim-fpu.c (pack_fpu, unpack_fpu): New functions - decode a
6172         float.
6173
6174         * sim-inline.c (SIM_INLINE_C): Rename from _SIM_INLINE_C_.
6175         * sim-lnline.h: Update.
6176
6177         * sim-fpu.h, sim-fpu.c (sim_fpu_[iu]{32,64}to): New int2fp
6178         conversion functions.
6179         (sim_fpu_to{32,64}[iu]): New fp2int functions.
6180
6181         * sim-fpu.h, sim-fpu.c (sim_fpu_is_{lt,le,eq,ne,ge,gt}): New fp
6182         compare functions.  Replacing.
6183         (sim_fpu_cmp): This. Delete.
6184
6185 Mon May 12 14:49:05 1997  Andrew Cagney  <cagney@b1.cygnus.com>
6186
6187         * sim-core.c (sim_core_find_mapping): Call engine_error not
6188         sim_io_error when possible.
6189
6190 Mon May 12 08:55:07 1997  Andrew Cagney  <cagney@b2.cygnus.com>
6191
6192         * sim-endian.h (V1_H2): Add macro's to insert a word into a
6193         high/low double word.
6194
6195         * sim-trace.h: Remove definition of attribute - defined in
6196         sim_basics.h.
6197
6198 Mon May 12 08:55:07 1997  Andrew Cagney  <cagney@b1.cygnus.com>
6199
6200         * sim-options.h (struct OPTION): Add doc_opt as the documenting
6201         name of the option - or family of options.
6202
6203         * sim-options.c (sim_args_command): Match command `a-b c' with
6204         option `--a-b-c' from option table.
6205
6206 Thu May  8 12:40:07 1997  Andrew Cagney  <cagney@b1.cygnus.com>
6207
6208         * sim-options.c (sim_print_help): For optional arguments, wrap
6209         them in [].
6210
6211         * sim-trace.c (set_trace_options): New function, handle optional
6212         argument and multiple assignment.
6213         (trace_option_handler): Update.
6214
6215         * sim-trace.c (trace_option_handler): Trace branch and not fpu
6216         when branch tracing selected.
6217
6218 Wed May  7 15:19:58 1997  Andrew Cagney  <cagney@b1.cygnus.com>
6219
6220         * sim-trace.c (trace_one_insn): Make a va-args function.
6221
6222         * sim-trace.c (trace_vprintf): New function, va-arg version of
6223         trace_printf.
6224
6225 Tue May  6 16:38:16 1997  Doug Evans  <dje@canuck.cygnus.com>
6226
6227         * sim-trace.c (trace_uninstall): Don't close a file twice.
6228         * sim-profile.c (profile_uninstall): Likewise.
6229
6230 Tue May  6 06:14:01 1997  Mike Meissner  <meissner@cygnus.com>
6231
6232         * sim-trace.c (toplevel): Include bfd.h.
6233         (trace_options): Note that --trace-linenum also turns on
6234         --trace-insn.  Add --trace-{branch,semantics}.
6235         (trace_option_handler): If --trace-linenum, also turn on
6236         --trace-insn.  Add --trace-branch support.  If --trace-semantics,
6237         turn on ALU, FPU, branch, and memory tracing.
6238         (trace_one_insn): New function to trace an instruction.  Support
6239         --trace-linenum.
6240         (OPTION_TRACE_*): Use an enum, rather than lots of defines.
6241
6242         * sim-trace.h (TRACE_{SEMANTICS,BRANCH}_IDX): Add new macros.
6243         (MAX_TRACE_VALUES): Use 32, not 12 by default.
6244         (TRACE_branch): Add new mask.
6245         (TRACE_*_P): Define all possible trace_p macros.
6246         (trace_one_insn): Declare function.
6247
6248 Mon May  5 14:08:34 1997  Mike Meissner  <meissner@cygnus.com>
6249
6250         * sim-trace.h (__attribute__): Define as nothing if not GNU C or
6251         GNU C doesn't support __attributes__.
6252         ({trace,debug}_printf): Add attribute's so -Wformat can check the
6253         format strings.
6254
6255 Mon May  5 11:16:12 1997  Andrew Cagney  <cagney@b1.cygnus.com>
6256
6257         * sim-config.h (FORCED_ALIGNMENT): New alignment option -
6258         addresses are masked forcing them to be correctly aligned.
6259         (WITH_ALIGNMENT): Make NONSTRICT_ALIGNMENT the default.
6260         * sim-config.c (config_alignment_to_a): Update.
6261
6262         * sim-core.h (sim_cpu_core): New data type contains cpu specific
6263         core data.
6264         * sim-base.h (CPU_CORE): Add cpu specific core data to cpu base
6265         type.
6266         * sim-core.c (sim_core_attach): Add CPU argument.  Ready for
6267         processor specific core maps.
6268         (sim_core_map_attach): Copy the core map data to each of the
6269         processor specific core data structures.
6270         * sim-core.c (sim_core_find_mapping): Update.
6271
6272         * sim-n-core.h (sim_core_read_N, sim_core_write_N): Rename.
6273         (sim_core_write_aligned_N, sim_core_write_aligned_N): New names.
6274         (sim_core_write_unaligned_N, sim_core_write_unaligned_N): New
6275         alternatives that handle unaligned addresses.
6276         (sim_core_{read,write}_{,un}aligned_N): Drop SIM_DESC arg, replace
6277         with just CPU arg.
6278         * cgen-utils.c (sim_disassemble_insn): Update.
6279
6280 Mon May  5 13:19:16 1997  Andrew Cagney  <cagney@b1.cygnus.com>
6281
6282         * sim-trace.h (TRACE_FPU_IDX): Add Floating-point specific
6283         tracing.
6284
6285         * sim-fpu.h, sim-fpu.c: New files - prototype for generic target
6286         fpu support.
6287
6288         * sim-inline.h, sim-inline.c: Add support for SIM_FPU.
6289
6290 Fri May  2 17:59:42 1997  Andrew Cagney  <cagney@b1.cygnus.com>
6291
6292         * sim-core.c (sim_core_map_to_str): New function ascii equivalent
6293         to map type.
6294
6295         * sim-n-core.h (sim_core_read_N, sim_core_write_N): Use in trace
6296         statement.
6297
6298 Fri May  2 17:28:02 1997  Andrew Cagney  <cagney@b2.cygnus.com>
6299
6300         * cgen-trace.c: Prepend additional trace_printf argument.
6301
6302         * cgen-utils.c (sim_disassemble_insn): Add additional core
6303         arguments.
6304
6305 Fri May  2 11:40:23 1997  Andrew Cagney  <cagney@b1.cygnus.com>
6306
6307         * nrun.c (main): Catch/report errorenous simulator states.
6308
6309         * sim-module.c: #include "libiberty.h" so that xmalloc is defined.
6310         * sim-trace.c: #include string.h/strings.h so that memset is
6311         defined.
6312         * sim-utils.c: Ditto.
6313         * sim-profile.c: Ditto. And stdlib.h.
6314         (print_bar): Only define when used by instruction or memory profiler.
6315
6316         * sim-options.c (standard_option_handler): Make ul more local.
6317
6318         * sim-load.c (sim_load_file): Make the name constant.
6319         (sim_load_file): Passify gcc.
6320
6321         * sim-utils.h: New file, pre-declare utilites in corresponding .c
6322         file.
6323         * sim-utils.c, sim-load.c: Include sim-utils.h.
6324
6325         * sim-base.h (sim_cpu): Pre define here so available to all.
6326
6327         * sim-core.h (DECLARE_SIM_CORE_WRITE_N, DECLARE_SIM_CORE_READ_N):
6328         Restore the sim_cpu and instruction_address arguments so that full
6329         information is available to the abort function.
6330         * sim-core.c (sim_core_find_mapping, sim_core_write_buffer): Ditto.
6331         * sim-n-core.h (sim_core_write_N, sim_core_read_N): Update.
6332
6333         * sim-trace.h, sim-trace.c (trace_option_handler): Add interim
6334         tracing support for sim-events and sim-core.
6335         (trace_option_handler): Convert #if to if where possible so always
6336         compiled/checked by C compiler.
6337         * sim-n-core.h (sim_core_write_N, sim_core_read_N): Update.
6338
6339         * sim-base.h: Adjust comment documenting how to define the cpu
6340         structure.
6341         (sim_state_base): Add sim_core and sim_events to simulator base
6342         object.
6343
6344         * sim-trace.h, sim-trace.c (trace_printf): Add SIM_DESC argument.
6345         * sim-core.c (sim_core_init, sim_core_attach,
6346         sim_core_find_mapping): Update.
6347         * sim-events.c (ETRACE, sim_events_init, sim_events_time,
6348         update_time_from_event, insert_sim_event,
6349         sim_events_schedule_after_signal, sim_events_deschedule,
6350         sim_events_tick): Ditto.
6351
6352         * sim-basics.h (sim-module.h, sim-trace.h, sim-profile.h,
6353         sim-model.h): Move #includes from here.
6354         * sim-base.h: To here.
6355         (sim-core.h, sim-events.h, sim-io.h): Include also
6356
6357 Wed Apr 30 15:37:54 1997  Andrew Cagney  <cagney@b1.cygnus.com>
6358
6359         * callback.c (default_callback): Missing initialisers.
6360
6361 Thu May  1 10:40:47 1997  Doug Evans  <dje@canuck.cygnus.com>
6362
6363         * sim-utils.c (sim_add_commas): New function.
6364         * sim-basics.h (sim_add_commas): Add prototype.
6365         * cgen-scache.c (scache_print_profile): Print commas in numbers.
6366         * sim-profile.c (COMMAS): New macro.
6367         (print_*): Use it to print commas in numbers.
6368
6369         * configure: Regenerated.
6370
6371         * cgen-sim.h (sim_signal_type): Add SIM_SIGINT.
6372         (cgen_state): New member run_fast_p.
6373         (cgen_init): Add prototype.
6374         (sim_disassemble_insn): New arg `cpu'.
6375         * cgen-trace.c (trace_insn): Update call to sim_disassemble_insn.
6376         * cgen-utils.c (cgen_init): New function.
6377         (sim_disassemble_insn): New arg `cpu'.  Rewrite fetching of insn.
6378         * genmloop.sh: Call engine_halt if loop exits.
6379
6380         * Makefile.in (sim-options_h): Define.
6381         (sim-{module,options,trace,profile,utils}.o): Clean up dependencies.
6382         (sim-model.o): Add new rule.
6383         (cgen-{scache,trace,utils}.o): Add new rules.
6384         * aclocal.m4 (SIM_AC_OPTION_{SCACHE,DEFAULT_MODEL}): Add.
6385         * cgen-scache.c (scache_print_profile): Change `sd' arg to `cpu'.
6386         Indent output by 2 spaces.
6387         * cgen-scache.h (scache_print_profile): Update.
6388         * cgen-trace.c (trace_insn_fini): Indent output by 2 spaces.
6389         Use trace_printf, not fprintf.
6390         (trace_extract): Use trace_printf, not cgen_trace_printf.
6391         * genmloop.sh (!FAST case): Increment `insn_count'.
6392         * sim-base.h (sim_state_base): Only include scache_size if WITH_SCACHE.
6393         (sim_cpu_base): Rename member `sd' to `state' to be consistent with
6394         access macro's name.
6395         * sim-core.c (sim_core_init): Use EXTERN_SIM_CORE to define it.
6396         Change return type to SIM_RC.
6397         (sim_core_{install,uninstall}): New functions.
6398         * sim-core.h (sim_core_{install,uninstall}): Declare.
6399         (sim_core_init): Use EXTERN_SIM_CORE to define it.
6400         Change return type to SIM_RC.
6401         * sim-model.h (models,machs,model_install): Declare.
6402         * sim-module.c (modules): Add scache_install, model_install.
6403         (sim_post_argv_init): Set cpu->state backlinks.
6404         * sim-options.c (standard_options): Delete --simcache-size,--max-insns.
6405         (standard_option_handler): Likewise.
6406         * sim-profile.c (PROFILE_{HISTOGRAM,LABEL}_WIDTH): Move to
6407         sim-profile.h.
6408         (*): Assume ANSI C.
6409         (profile_options): Delete --profile-simcache.
6410         (profile_option_handler): Likewise.
6411         (profile_print_insn): Change `sd' arg to `cpu'.  Indent output 2
6412         spaces.
6413         (profile_print_{memory,model}): Likewise.
6414         (profile_print_simcache): Delete.
6415         (profile_print_speed): New function.
6416         (profile_print): Rewrite.
6417         * sim-profile.h (PROFILE_scache): Renamed from PROFILE_simcache.
6418         (WITH_PROFILE_SCACHE_P): Renamed from WITH_PROFILE_SIMCACHE_P.
6419         (PROFILE_DATA): Delete members simcache_{hits,misses}.
6420         (PROFILE_COUNT_SIMCACHE_{HIT,MISS}): Delete.
6421         (PROFILE_{CALLBACK,CPU_CALLBACK}): New types.
6422         (profile_print): Update prototype.
6423
6424 Wed Apr 30 11:34:14 1997  Doug Evans  <dje@canuck.cygnus.com>
6425
6426         * cgen-scache.[ch], cgen-sim.h: New files.
6427         * cgen-trace.[ch], cgen-types.h, cgen-utils.c, genmloop.sh: New files.
6428         * sim-model.c: New file.
6429
6430         * Make-common.in (clean targets): Undo patch of Apr. 22.
6431
6432 Fri Apr 25 15:28:32 1997  Mike Meissner  <meissner@cygnus.com>
6433
6434         * sim-n-bits.h (signed): If we have a standard compiler, undef
6435         signed, so that signedN is defined correctly.
6436
6437 Thu Apr 24 00:00:07 1997  Doug Evans  <dje@canuck.cygnus.com>
6438
6439         * sim-module.h, sim-model.h, sim-profile.h: New files.
6440         * sim-module.c, sim-profile.c: New files.
6441         * Make-common.in (SIM_PROFILE): Define
6442         (CONFIG_CFLAGS): Add $(SIM_PROFILE).
6443         (sim_main_headers): Add sim-module.h, sim-model.h, sim-profile.h.
6444         (sim_module.o,sim-profile.o): Add rules for.
6445         * aclocal.m4 (--enable-sim-trace): Allow symbolic arguments.
6446         (--enable-sim-profile): Add.
6447         * configure: Regenerated.
6448         * sim-base.h (sim_state_base): New members init_list, uninstall_list,
6449         model.  Move trace and profile support to sim-{trace,profile}.h.
6450         New members trace_data, profile_data.
6451         * sim-basics.h: #include sim-module.h, sim-model.h, sim-profile.h.
6452         * sim-config.h: Provide default definition of WITH_PROFILE.
6453         (WITH_TRACE): Change default to -1.
6454         (MAX_NR_PROCESSORS): Always define.
6455         * sim-options.c: Move trace and profile support to
6456         sim-{trace,profile}.h.
6457         (sim_pre_argv_init): Moved to sim-model.c.
6458         (standard_install): New function.
6459         * sim-options.h (sim_pre_argv_init): Move decl to sim-model.c.
6460         (standard_install): Declare.
6461         * sim-trace.c: Tracing option handling moved here from sim-options.c.
6462         (trace_install, trace_uninstall): New functions.
6463         (trace_printf): Update reference to TRACE_FILE.
6464         * sim-trace.h (TRACE_FOO_IDX): Moved here from sim-base.h.
6465         (TRACE_foo): Bit masks for symbolic arguments to --enable-sim-trace.
6466         (WITH_TRACE_FOO_P): Define.
6467         (trace_install): Declare.
6468         (TRACE_DATA): New struct.
6469
6470 Wed Apr 23 17:23:15 1997  Doug Evans  <dje@canuck.cygnus.com>
6471
6472         * run.c: Undo last exec_bfd patch.
6473         (main): Only pass -E ifdef SIM_HAVE_BIENDIAN.
6474
6475 Wed Apr 23 17:54:27 1997  Mike Meissner  <meissner@cygnus.com>
6476
6477         * run.c (exec_bfd): Add back in.
6478         (main): Set exec_bfd.
6479
6480 Tue Apr 22 14:43:46 1997  Doug Evans  <dje@canuck.cygnus.com>
6481
6482         * sim-load.c (sim_load_file): #include <stdio.h> for NULL.
6483
6484 Wed Apr 23 02:55:54 1997  Andrew Cagney  <cagney@b1.cygnus.com>
6485
6486         * sim-events.c (insert_sim_event): Call sim_io_error instead of
6487         less well defined engine_error.
6488         * sim-core.c: Ditto.
6489
6490 Tue Apr 22 08:48:16 1997  Stu Grossman  (grossman@critters.cygnus.com)
6491
6492         * Make-common.in:  Change clean targets to use :: so that other
6493         Makefiles can have their own clean targets.
6494         * sim-load.c (xprintf eprintf):  Use ANSI_PROTOTYPES instead of
6495         __STDC__ to control use of stdarg vs. varargs syntax.  Some
6496         systems can't use __STDC__, but require stdarg.
6497
6498 Fri Apr 18 11:14:43 1997  Doug Evans  <dje@canuck.cygnus.com>
6499
6500         * sim-options.c (standard_options): Add --endian.
6501         (standard_option_handler): Likewise.
6502
6503         * nrun.c: #include <signal.h>.
6504         (main, cntrl_c): Wrap calls to sim_resume in a SIGINT
6505         handler that calls sim_stop ().
6506
6507 Fri Apr 18 13:11:36 1997  Andrew Cagney  <cagney@b1.cygnus.com>
6508
6509         * run.c (main, cntrl_c): Wrap calls to sim_resume in a SIGINT
6510         handler that calls sim_stop ().  Simulators may still be
6511         establishing their own handler.
6512
6513         * sim-events.c (sim_events_poll): Rename from
6514         sim_events_at_large_int.  Poll IO.
6515
6516         * sim-io.c (sim_io_poll_quit): New function - pass on a polling
6517         request.
6518
6519         * callback.c (os_poll_quit): New function poll for quit signal
6520         where needed.
6521         (default_callback): Include magic number.
6522
6523 Thu Apr 17 02:25:11 1997  Doug Evans  <dje@canuck.cygnus.com>
6524
6525         * aclocal.m4: Check for headers time.h, sys/time.h, sys/resource.h.
6526         Check for functions getrusage, time.
6527         * sim-basics.h (SIM_ELAPSED_TIME): New typedef.
6528         (sim_elapsed_time_get, sim_elapsed_time_since): Add prototypes.
6529         * sim-utils.c: #include time.h, sys/time.h, sys/resource.h if able.
6530         (sim_elapsed_time_get, sim_elapsed_time_since): New functions.
6531
6532         * sim-utils.c (sim_copy_argv, sim_analyze_program): New functions.
6533
6534         * sim-options.c, sim-options.h: New files.
6535         * sim-config.h (WITH_DEBUG): Provide default value of zero.
6536         * Make-common.in (nrun.o): Add rules for.
6537         * nrun.c: New file.
6538
6539         * run.c (main): Check return value of sim_open.
6540
6541         * Make-common.in (sim-options.o, sim-load.o, sim-trace.o): Add rules.
6542         (sim_main_headers): Add sim-trace.h.
6543         * run.c (exec_bfd, target_byte_order): Delete.
6544         (main): Pass -E <endian> to sim_open.  Delete code to load sections,
6545         call sim_load instead.  Check return code of sim_create_inferior.
6546         * sim-base.h (CURRENT_STATE): Define.
6547         (sim_state_base): Make typedef.  New members options, prog_argv,
6548         prog_bfd, text_{section,start,end}, start_addr, simcache_size,
6549         mem_size, memory [+ corresponding access macros].
6550         (sim_cpu_base): New typedef.
6551         * sim-trace.h: New file.
6552         * sim-trace.c: New file.
6553         * sim-basics.h: #include it.
6554         * sim-load.c: New file.
6555
6556 Tue Apr 15 15:10:13 1997  Ian Lance Taylor  <ian@cygnus.com>
6557
6558         * Make-common.in (INSTALL): Set to @INSTALL@.
6559         (INSTALL_XFORM, INSTALL_XFORM1): Remove.
6560         (install-common): Depend upon installdirs.  Use
6561         $(program_transform_name) directly, rather than using
6562         $(INSTALL_XFORM).
6563         (installdirs): New target.
6564         * Makefile.in (INSTALL): Set to @INSTALL@.
6565         (INSTALL_XFORM, INSTALL_XFORM1): Remove.
6566         (install-man): Depend upon installdirs.  Use
6567         $(program_transform_name) directly, rather than using
6568         $(INSTALL_XFORM).
6569         (installdirs): New target.
6570
6571 Tue Apr 15 15:08:12 1997  Andrew Cagney  <cagney@b1.cygnus.com>
6572
6573         * sim-assert.h (SIM_ASSERT, ASSERT): Allow these macros to
6574         be overriden.
6575
6576 Wed Apr  9 16:06:44 1997  Andrew Cagney  <cagney@kremvax.cygnus.com>
6577
6578         * sim-basics.h: Only bring in config.h and tconfig.h if
6579         HAVE_CONFIG_H.
6580
6581 Mon Apr  7 11:39:45 1997  Andrew Cagney  <cagney@kremvax.cygnus.com>
6582
6583         * sim-config.h (WITH_TARGET_WORD_MSB): New Macro. Define the bit
6584         numbering convention of the target.
6585         * sim-config.c (print_sim_config): Print WITH_TARGET_WORD_BITSIZE
6586         and WITH_TARGET_WORD_MSB.
6587         (sim_config): When possible, check for consistency with bitsize
6588         and msb.
6589
6590         * sim-bits.h: Allow MSB to be other than zero.
6591         * sim-bits.c: Ditto.
6592         * sim-n-bits.h: Ditto.
6593
6594         * sim-bits.h (MSMASK*): New macros - converce to LSMASK*.
6595         * sim-n-bits.h (MSMASKEDn): Ditto.
6596
6597 Mon Apr 14 16:29:21 1997  Ian Lance Taylor  <ian@cygnus.com>
6598
6599         * Makefile.in (INSTALL): Change install.sh to install-sh.
6600
6601 Mon Apr  7 10:46:38 1997  Doug Evans  <dje@canuck.cygnus.com>
6602
6603         * sim-base.h (sim_state_base): Move `magic' to end of struct.
6604
6605 Mon Apr  7 15:53:21 1997  Andrew Cagney  <cagney@kremvax.cygnus.com>
6606
6607         * run.c (main): Check that a program to run was specified.
6608
6609 Mon Apr  7 15:45:02 1997  Andrew Cagney  <cagney@kremvax.cygnus.com>
6610
6611         * aclocal.m4 (AC_TYPE_SIGNAL): Add check.
6612
6613         * configure: Regenerated to track ../common/aclocal.m4 changes.
6614         * config.in: Ditto.
6615
6616 Wed Apr  2 15:06:28 1997  Doug Evans  <dje@canuck.cygnus.com>
6617
6618         * sim-endian.h: Move host {LITTLE,BIG}_ENDIAN support from here,
6619         * sim-config.h: To here.
6620
6621         * Make-common.in (SIM_EXTRA_DEPS): New config var.
6622         (sim_main_headers): Define.
6623         (sim-*.o): Depend on $(SIM_EXTRA_DEPS).
6624         (BUILT_SRC_FROM_COMMON): Move here from ../d30v/Makefile.in.
6625         (clean): Use it.
6626         (sim-utils.o): Add rule for.
6627         * sim-utils.o: New file.
6628         * sim-basics.h: #include sim-base.h.
6629         (zalloc): Make argument unsigned long.
6630         * sim-base.h: New file.
6631         * sim-inline.h (SIM_IO support): Delete.
6632         * sim-io.h: Delete inline support.
6633         * sim-io.c: Likewise.  sim-state.h renamed to sim-main.h.
6634         * sim-config.c: sim-state.h renamed to sim-main.h.
6635         * sim-core.c: Likewise.
6636         * sim-events.c: Likewise.
6637
6638         * run.c (main): Pass SIM_OPEN_STANDALONE to sim_open.
6639
6640         * aclocal.m4: Check for stdlib.h, string.h, strings.h, unistd.h.
6641         (sim-debug): Allow arguments.  Define WITH_DEBUG in addition to
6642         -DDEBUG.
6643         * configure: Regenerated to track ../common/aclocal.m4 changes.
6644
6645 Wed Apr  2 14:34:19 1997 Andrew Cagney <cagney@kremvax.cygnus.com>
6646
6647         * configure: Regenerated to track ../common/aclocal.m4 changes.
6648
6649 Wed Apr  2 11:08:11 1997  Andrew Cagney  <cagney@kremvax.cygnus.com>
6650
6651         * sim-config.h (WITH_ALIGNMENT, WITH_FLOATING_POINT,
6652         WITH_XOR_ENDIAN, WITH_SMP, WITH_RESERVED_BITS): Assume that these
6653         are defined by the configure.
6654
6655         * aclocal.m4 (sim-stdio): Add option stdio from ../ppc configure.
6656
6657         * aclocal.m4 (floating-point, xor-endian, alignment, smp,
6658         reserved-bits): Always define.
6659
6660         * sim-config.h, sim-config.c (sim_config): New function - and new
6661         file - co-ordinate the setting/checking of the common simulator
6662         configuration options.
6663
6664         * Make-common.in (sim-config.o): Add rule.
6665
6666 Fri Mar 28 15:32:00 1997  Mike Meissner  <meissner@cygnus.com>
6667
6668         * callback.c (os_{,e}vprintf_filtered): Change stdarg type to
6669         va_list from void *, since va_list might not be a pointer type.
6670
6671 Mon Mar 24 15:27:12 1997  Andrew Cagney  <cagney@kremvax.cygnus.com>
6672
6673         * sim-n-endian.h (offset_N): Correct assertion - word and sub word
6674         in wrong order.
6675         (offset_N): Correct computation of LE offset.
6676
6677         * sim-io.c (sim_io_error): Include a new line when reporting
6678         errors.
6679
6680         * sim-assert.h (SIM_FILTER_PATH): Out by one when locating last
6681         `/'.
6682
6683 Thu Mar 20 22:31:06 1997  Jeffrey A Law  (law@cygnus.com)
6684
6685         * run.c: Include alloca-conf.h.
6686
6687         * callback.c (os_evprintf_filtered): Fix typo.
6688
6689 Fri Mar 21 13:36:20 1997  Andrew Cagney  <cagney@kremvax.cygnus.com>
6690
6691         * run.c (string.h, strings.h, stdlib.h): Include.
6692
6693         * sim-events.c (sim_events_tick): Recent cleanup failed to return
6694         0 when nothing pending.
6695
6696         * run.c (sim_size, sim_trace): Plicate GCC - these two functions
6697         will soon be going away.
6698         (getopt): Plicate GCC.
6699
6700         * sim-endian.c (sim-io.h): Plicate GCC.
6701         * sim-bits.c (sim-io.h): Ditto.
6702         * sim-n-bits.h (ROTn): Ditto.
6703
6704         * sim-io.c (sim_io_error): Correct check for NULL.
6705
6706         * sim-assert.h (SIM_FILTER_PATH): Separate out the code filtering
6707         the __FILE__.
6708         * sim-events.c: Use SIM_FILTER_PATH to filter out the filename
6709         path.
6710
6711 Wed Mar 19 01:12:06 1997  Andrew Cagney  <cagney@kremvax.cygnus.com>
6712
6713         * aclocal.m4 (SIM_AC_OPTION_*: Move so that they are outside of
6714         SIM_AC_COMMON - SIM_AC_COMMON was gobling arguments.
6715
6716 Tue Mar 18 20:48:12 1997  Andrew Cagney  <cagney@kremvax.cygnus.com>
6717
6718         * sim-alu.h: Include sim-xcat.h.
6719
6720 Tue Mar 18 13:58:18 1997  Andrew Cagney  <cagney@kremvax.cygnus.com>
6721
6722         * Make-common.in (sim-bits.c, sim-core.c, sim-endian.c,
6723         sim-events.c, sim-inline.c, sim-io.c): Define rules for building
6724         these.
6725
6726         * sim-events.c (sim_events_at_large_int): New function.  Just
6727         schedules an event every large-int ticks.
6728         (sim_events_init): Call.
6729         (sim_events_tick, sim_events_process): Move async handing to
6730         sim_events_process.  Move timer decrement so that it occures after
6731         events have been processed.
6732
6733         * sim-basics.h (struct _engine): Remove declaration.
6734
6735         * sim-events.h, sim-events.c: Rename type to sim_events.  Prefix
6736         everything with same.  Rename global struct to SIM_DESC.
6737         * sim-core.h, sim-core.c, sim-n-core.c: Ditto for sim_core.
6738         * sim-io.h, sim-io.c: Ditto.
6739
6740         * sim-assert.h: New file. Optional assertion checking macros.
6741         * sim-io.c (sim_io_error): Make just this function tolerant to
6742         null pointers.
6743
6744         * sim-xcat.h: New file. Define concatenate macros.
6745         * sim-basics.h (XCONCAT*): Move to sim-xcat.h.
6746         * sim-n-core.h, sim-n-bits.h, sim-n-endian.h: Explicitly include
6747         concat macros.
6748
6749
6750 Tue Mar 18 12:44:55 1997  Andrew Cagney  <cagney@kremvax.cygnus.com>
6751
6752         * sim-bits.h (LSMASK): New macro. Create mask of LS bits.
6753
6754 Mon Mar 17 18:10:05 1997  Andrew Cagney  <cagney@kremvax.cygnus.com>
6755
6756         * sim-inline.h: Add definitions for sim-types.
6757         (ALL_BY_MODULE): New macro, encapsulate full inlining by the
6758         module.
6759
6760 Mon Mar 17 15:38:27 1997  Andrew Cagney  <cagney@kremvax.cygnus.com>
6761
6762         * sim-events.h: Remove defunct reference to callback struct.
6763
6764 Mon Mar 17 15:10:07 1997  Andrew Cagney  <cagney@kremvax.cygnus.com>
6765
6766         * configure: Re-generate.
6767
6768 Mon Mar 17 15:04:47 1997  Andrew Cagney  <cagney@kremvax.cygnus.com>
6769
6770         * Make-common.in (CSEARCH): Do not include the gdb directory in
6771         the search path.
6772
6773 Mon Mar 17 13:16:26 1997  Andrew Cagney  <cagney@kremvax.cygnus.com>
6774
6775         * Make-common.in (SIM_ENDIAN, SIM_HOSTENDIAN, SIM_INLINE,
6776         SIM_WARNING): Drop, requiring the simulator specific Makefile.in
6777         to explicitly incorporate these.
6778
6779         * aclocal.m4 (--enable-sim-alignment); New option. Strongly
6780         specify the alignment restrictions of the target architecture -
6781         without this option all alignment restrictions are accomodated.
6782         (--enable-sim-assert): New option.  Conditionally compile in
6783         assertion statements.
6784         (--enable-sim-float): New option. Strongly specify the target's
6785         floating point support.
6786         (--enable-sim-hardware): New option.  Specify the hardware devices
6787         included in the simulation.
6788         (--enable-sim-packages): New option.  Specify the hardware
6789         packages included in the simulation.
6790         (--enable-sim-regparm): New option.  Specify that parameters be
6791         passed in registers instead of on the stack.
6792         (--enable-sim-reserved-bits): New option. Specify that reserved
6793         bits within an instruction are are correctly set.
6794         (--enable-sim-smp): New option. Specify the level of SMP support
6795         to be included in the simulator.
6796         (--enable-sim-stdcall): New option.  Specify an alternative
6797         function call convention.
6798         (--enable-sim-xor-endian): New option.  Configure xor-endian
6799         support used by some targets to implement bi-endian support.
6800
6801 Fri Mar 14 19:51:21 1997  Andrew Cagney  <cagney@kremvax.cygnus.com>
6802
6803         * aclocal.m4 (--enable-sim-hostendian): New option.  Allow the
6804         host endianness to be overridden.
6805         (--enable-sim-endian): Allow the target platform's byte order
6806         to be overridden.
6807         (--enable-sim-inline): Control the inlining of common components.
6808         (--enable-sim-bswap): For compatibility, also define WITH_BSWAP.
6809         (--enable-sim-warnings): Enable additional GCC compiler checks.
6810         * Make-common.in (SIM_ENDIAN, SIM_HOSTENDIAN, SIM_INLINE,
6811         SIM_WARNINGS): Add.
6812
6813         * sim-n-core.h, sim-n-bits.h, sim-n-endian.h: Rename from
6814         sim-*-n.h so that the names are uniq on dos machines
6815         * sim-core.c, sim-bits.c, sim-endian.c: Update.
6816
6817 Thu Mar 13 12:32:42 1997  Doug Evans  <dje@canuck.cygnus.com>
6818
6819         * run.c: #include "libiberty.h".
6820         (main): New locals sd,no_args,sim_argv.
6821         Run buildargv on -a option.  Pass argv to sim_open, argv[0]
6822         is program name.  Update call to sim_set_callbacks.
6823         Record result of sim_open, pass to other sim_foo routines.
6824
6825 Thu Mar 13 10:24:05 1997  Michael Meissner  <meissner@cygnus.com>
6826
6827         * callback.c (os_printf_filtered): Do not call exit(1) or print a
6828         final newline.
6829
6830 Thu Mar  6 15:50:28 1997  Andrew Cagney  <cagney@kremvax.cygnus.com>
6831
6832         * callback.c: Add os_flush_stdout and vprintf_filtered callbacks.
6833         Route stdout through buffered IO.
6834
6835         * callback.c: Add os_flush_stderr, os_write_stderr,
6836         os_evprintf_filtered functions to route error output through
6837         stderr.
6838
6839         * sim-io.h, sim-io.c (sim_io_flush_stderr, sim_io_flush_stdout):
6840         Correct return type - should be void.
6841
6842 Fri Mar  7 20:14:37 1997  Andrew Cagney  <cagney@kremvax.cygnus.com>
6843
6844         * sim-basics.h: Clean up.  Many macro's moved to sim-inline.h.
6845
6846         * sim-config.h: Ditto.  For some options - eg WITH_DEVICES - do
6847         not provide a default value as undefined indicates disable code.
6848
6849 Thu Mar  6 15:50:28 1997  Andrew Cagney  <cagney@kremvax.cygnus.com>
6850
6851         * sim-core.h, sim-core-n.h, sim-core.c: Borrow code from ppc
6852         directory.
6853         * sim-events.h, sim-events.c: Ditto.
6854         * sim-io.h, sim-io.c: Ditto.
6855
6856 Tue Mar  4 09:35:56 1997  Andrew Cagney  <cagney@kremvax.cygnus.com>
6857
6858         * sim-alu.h (ALU_SUB_CA, ALU*_SUB_CA): New alu operation.
6859
6860         * sim-bits.h, sim-bits-n.h, sim-bits.c (LSMASKED*): New macro's
6861         extract the tail or least signifiant bits from an integer of the
6862         specified size.
6863
6864         * sim-bits.h, sim-bits.c: Clean up conditionally compiled #if
6865         WITH_TARGET_BITSIZE so that the compilation will fail when an
6866         unsupported bitsize value is defined.
6867
6868         (INSERTED*): Convert to functions.
6869         (EXTRACTED*): Ditto.
6870
6871         (SIGN_EXTEND, SEXT): Change to more terse name.
6872
6873 Tue Mar  4 09:35:56 1997  Andrew Cagney  <cagney@kremvax.cygnus.com>
6874
6875         * sim-inline.h: Allow explicit control over which .c files will be
6876         included by their header.
6877
6878         * sim-inline.h: Allow explicit control over which .c files use the
6879         alternative - REGPARM - parameter passing mechanism.
6880
6881         * sim-inline.h, sim-inline.c: Don't attempt to include any of
6882         icache.c, idecode.c, semantics.c or support.c.  Those names are
6883         not generally applicable.
6884
6885 Thu Feb 27 10:17:23 1997  Andrew Cagney  <cagney@kremvax.cygnus.com>
6886
6887         * sim-bits.c, sim-bits-n.h (new): Split sim-bits.c into two parts
6888         in a fashion similar to sim-endian-n.
6889
6890         * sim-endian.h: (H_word, L_word, AL_*, VL_*): Extend to include
6891         both value and address macro's.
6892
6893 Tue Feb 25 18:51:57 1997  Andrew Cagney  <cagney@kremvax.cygnus.com>
6894
6895         * sim-alu.h (ALU16_BEGIN, ALU16_SET, ...): Fill in.
6896
6897         * sim-endian.h (L_word, H_word): Replace MS2W_4, LS2W_4 with more
6898         generic L_word, H_word macro's.
6899
6900 Thu Feb 20 18:36:55 1997  Andrew Cagney  <cagney@critters.cygnus.com>
6901
6902         * sim-basics.h: Borrow code from ppc directory.
6903         * sim-bits.c: Ditto.
6904         * sim-bits.h: Ditto.
6905         * sim-config.h: Ditto.
6906         * sim-endian-n.h: Ditto.
6907         * sim-endian.c: Ditto.
6908         * sim-endian.h: Ditto.
6909         * sim-inline.c: Ditto.
6910         * sim-inline.h: Ditto.
6911         * sim-types.h: Ditto.
6912
6913 Wed Feb 19 12:40:50 1997  Andrew Cagney  <cagney@critters.cygnus.com>
6914
6915         * sim-alu.h (ALU_SET16, ALU_SET32, ALU_SET64, etc): Make available
6916         all the ALU size alternatives and then auto-configure a default.
6917
6918         * sim-alu.h: Copy ppc/idecode_expression.h.
6919
6920 Mon Feb 17 10:44:18 1997  Andrew Cagney  <cagney@critters.cygnus.com>
6921
6922         * bits.h, bits.c (SIGN_EXTEND32, SIGN_EXTEND64): New functions,
6923         sign extend a bit within a value.
6924
6925         * sim-endian.h, sim-endian-n.h (offset_N): New functions - return
6926         a pointer into the middle of a host word.
6927         * sim-endian.h (MS2W_4, LS2W_4): Use this function.
6928
6929 Tue Feb 11 13:46:49 1997  Michael Meissner  <meissner@tiktok.cygnus.com>
6930
6931         * callback.c: If HAVE_CONFIG_H is defined, include config.h from
6932         autoconf.  If HAVE_UNISTD_H is defined, include unistd.h to get
6933         appropriate definitions of read, write, etc.  Add prototype for
6934         system.
6935
6936 Tue Feb  4 13:24:44 1997  Doug Evans  <dje@canuck.cygnus.com>
6937
6938         * Makefile.in (libcommon.a): Delete.
6939         (callback.o,targ-map.o): Delete, moved to Make-common.in.
6940         (gentmap,targ-vals.h,targ-map.c): Likewise.
6941         (run-autoconf): Delete.
6942         * aclocal.m4 (SIM_AC_OUTPUT): Redo creation of Makefile.
6943         (common makefile fragment): Moved back into ...
6944         * Make-common.in: Resurrect.
6945         * configure.in (AC_LINK_FILES): Delete, unnecessary now.
6946         * configure: Regenerated.
6947
6948 Fri Jan 31 07:16:49 1997  Doug Evans  <dje@canuck.cygnus.com>
6949
6950         * aclocal.m4 (SIM_AC_COMMON): Move COMMON_MAKEFILE_FRAG from here.
6951         (SIM_AC_OUTPUT): To here.
6952
6953 Fri Jan 24 10:37:17 1997  Stu Grossman  (grossman@critters.cygnus.com)
6954
6955         * aclocal.m4 (COMMON_MAKEFILE_FRAG):  Quote a couple of $'s in
6956         comments and single quotes.  Fixes a problem found on hpux.
6957
6958 Thu Jan 23 13:35:03 1997  Stu Grossman  (grossman@critters.cygnus.com)
6959
6960         * aclocal.m4:  Remove Make-common.in from dependencies.
6961         * (distclean):  Remove targ-vals.def.
6962
6963         * aclocal.m4 (SIM_AC_COMMON):  Move contents of Make-common.in
6964         into here.  Makes insertion into makefiles easier.  Also, change
6965         the way that callback.o, gentmap, targ-vals.h, targ-map.c,
6966         targ-map.o, and run are built.  They are now built in the
6967         individual simulator directories, taking sources from ../common as
6968         necessary.  This replaces the merging of libcommon.a into
6969         linsim.a, which was problematic for the WinGDB build process.
6970         * run.c:  Include config.h from . instead of ../common.
6971         * Make-common.in:  Remove.  It's no longer necessary.
6972
6973 Mon Dec 16 15:02:33 1996  Ian Lance Taylor  <ian@cygnus.com>
6974
6975         * Make-common.in (ALL_CLAGS): Put CFLAGS at the end.
6976         (.c.o): Put $(ALL_CFLAGS) before the file being compiled.
6977
6978 Wed Dec 11 11:30:58 1996  Jim Wilson  <wilson@cygnus.com>
6979
6980         * run.c (main): Set target_byte_order before call to sim_open.
6981
6982 Sun Dec  8 18:22:06 1996  Doug Evans  <dje@canuck.cygnus.com>
6983
6984         * callback.c: #include <stdlib.h>
6985         (os_error): New function.
6986         (default_callback): Add os_error.
6987
6988 Mon Nov 25 19:44:35 1996  Doug Evans  <dje@canuck.cygnus.com>
6989
6990         * Make-common.in (Makefile): Set CONFIG_HEADERS="".
6991         * aclocal.m4: Mark the fact that --enable-sim-bswap isn't host
6992         specific.
6993         (SIM_AC_OUTPUT): Don't build Makefile if CONFIG_FILES="".
6994
6995 Wed Nov 20 01:11:04 1996  Doug Evans  <dje@canuck.cygnus.com>
6996
6997         * run.c: #include ../common/config.h, tconfig.h.
6998         (myname): New static global.
6999         (main): Recognize new options -a, -c.  Also recognize -h if h8/300.
7000         Only process -c ifdef SIM_HAVE_SIMCACHE.
7001         Only process -p/-s ifdef SIM_HAVE_PROFILE.
7002         Parse program name from argv[0] and use in error messages.
7003         Pass sim_args to sim_open.  Pass prog_args to sim_create_inferior.
7004         Add support for incomplete h8/300 termination indicators.
7005         (usage): Make more verbose.
7006         * aclocal.m4,config.in,tconfig.in,configure.in,configure: New files.
7007         * Makefile.in,Make-common.in,callback.c: New files.
7008         * nltvals.def,gentmap.c,gentvals.sh: New files.
7009
7010 Tue Nov 12 13:34:00 1996  Dawn Perchik  <dawn@cygnus.com>
7011
7012         * run.c: Include stdarg.h if __STDC__.
7013
7014 Tue Oct 15 11:16:31 1996  Jeffrey A Law  (law@cygnus.com)
7015
7016         * run.c (main): Don't print out anything if the signal
7017         number is zero (ie no signal).
7018
7019 Tue Oct 15 11:20:44 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
7020
7021         * run.c (main): Print out if the program raised a signal.
7022
7023 Wed Sep 18 09:52:14 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
7024
7025         * run.c (exec_bfd): Rename from sim_bfd, to use the gdb name.
7026         (main): Ditto.
7027
7028 Tue Sep 17 11:04:50 1996  James G. Smith  <jsmith@cygnus.co.uk>
7029
7030         * run.c (main): Explicitly cast malloc() parameter.
7031
7032 Thu Sep 12 11:27:21 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
7033
7034         * run.c (sim_bfd): New global to hold the bfd pointer for the
7035         executable.
7036         (main): Initialize sim_bfd.
7037
7038 Fri Dec 15 16:27:49 1995  Ian Lance Taylor  <ian@cygnus.com>
7039
7040         * run.c (main): Use new bfd_big_endian macro.
7041
7042 Wed Nov  8 15:49:49 1995  James G. Smith  <jsmith@pasanda.cygnus.co.uk>
7043
7044         * run.c (main): Removed SH specific comments, so source is
7045         generic. Also updated to only load relevant sections. Moved
7046         sim_open() to after callback attach (to match GDB).
7047
7048         * run.1: Removed SH specific comments.
7049
7050 Sat Oct 21 12:31:01 1995  Jim Wilson  <wilson@chestnut.cygnus.com>
7051
7052         * run.c (main): Always return sigrc at end.
7053
7054 Tue Oct 10 12:03:13 1995  J.T. Conklin  <jtc@rtl.cygnus.com>
7055
7056         * run.c (main): Print error diagnostic and exit if bfd_openr() or
7057         bfd_check_format() fails.
7058
7059 Thu Sep 28 15:40:36 1995  steve chamberlain  <sac@slash.cygnus.com>
7060
7061         * run.c, run.1: From sh directory.