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