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