address range support
[deliverable/binutils-gdb.git] / sim / common / ChangeLog
CommitLineData
17f07639
DE
11998-12-04 Doug Evans <devans@casey.cygnus.com>
2
3 * sim-arange.c: New file.
4 * sim-arange.h: New file.
5
61998-12-03 Frank Ch. Eigler <fche@cygnus.com>
7
8 * sim-memopt.c (sim_memory_uninstall): Deallocate all memory
9 regions.
10
111998-12-01 Doug Evans <devans@casey.cygnus.com>
12
13 * sim-inline.c (SIM_INLINE_P): Fix typo.
14
3d7075f5
FCE
15start-sanitize-gxsim
161998-12-01 Frank Ch. Eigler <fche@elastic.org>
17
18 * sim-gx-run.c (sim_engine_run): Use new tgx_info struct to
19 collect run-time arguments to gx block.
20 * sim-gx.h (sim_gx_function): Corresponding signature change.
21
22 * sim-gx.c (sim_gx_compiled_block_f): Remove nonfunctional code to
23 again compile a gx block source file.
24 (sim_gx_compiled_block_dispose): Uninstall obsoleted gx block
25 shared libraries.
26 (sim_gx_block_translate): Always emit new "gx_label_NNNN" labels,
27 for basic block entry points, even if !__GNUC__.
28
29end-sanitize-gxsim
3c034beb
DE
301998-11-30 Doug Evans <devans@casey.cygnus.com>
31
32 * cgen-utils.c (cgen_virtual_opcode_table): Update.
33
34Tue Nov 24 18:40:03 1998 Andrew Cagney <cagney@b1.cygnus.com>
35
36 * gennltvals.sh: Add v850 and d10v. Sort alphabetically.
37 * nltvals.def: Re-generate.
38
67f7d50d
AC
39Mon Nov 23 13:28:38 1998 Andrew Cagney <cagney@b1.cygnus.com>
40
41 * sim-core.c (reverse_n, sim_core_uninstall, sim_core_init,
42 sim_core_map_attach, sim_core_map_detach, next_event_queue,
43 new_sim_core_mapping): Only define when EXTERN_SIM_CORE_P, pacify
44 GCC.
45 * sim-events.c (sim_events_uninstall, sim_events_suspend,
46 sim_events_resume, sim_events_zalloc, insert_sim_event): Ditto.
47
9935b2e7
DE
481998-11-22 Doug Evans <devans@tobor.to.cygnus.com>
49
50 * genmloop.sh (${cpu}_pbb_chain): Watch for Ctrl-C's.
51 (${cpu}_pbb_cti_chain): Ditto.
52
42647d5b
FCE
53start-sanitize-gxsim
541998-11-21 Frank Ch. Eigler <fche@elastic.org>
55
56 * sim-gx.c (sim_gx_block_translate): Generate computed
57 goto for __GNUC__ instead of plain switch() for gx block
58 entry. Lose "-g" compile option for gx block.
59
60end-sanitize-gxsim
2c054438
DE
611998-11-18 Doug Evans <devans@casey.cygnus.com>
62
916b1152
DE
63 * Make-common.in (cgen-utils.o): Depend on cgen-engine.h.
64 (CGEN_ARCH_SCM): New variable.
65 * cgen-engine.h (EXTRACT_[ML]SB0_{INT,UINT}): New macros.
66 (EXTRACT_INT,EXTRACT_UINT): New macros.
67 (SEM_SEM_ARG): New macro.
68 (SEM_NEXT_VPC): New arg `pc'.
69 * cgen-sim.h (EXTRACT_SIGNED,EXTRACT_UNSIGNED): Delete.
70 (sim_disassemble_insn): Update prototype.
71 * cgen-trace.c (current_insn,insn_fields): New static locals.
72 (trace_insn): Set them.
73 * cgen-utils.scm: #include cgen-engine.h.
74 (sim_disassemble_insn): New arg insn_fields.
75 Handle variable length insns.
76 * genmloop.sh: Only emit pbb decls if -pbb.
77 (${cpu}_scache_lookup): New arg `vpc'.
78 (scache support): Fetch pc before entering loop.
79
2c054438
DE
80 * gennltvals.sh: Add fr30 support.
81 * nltvals.def: Rebuild.
82
78dee4ee
AC
83Wed Nov 18 10:22:22 1998 Andrew Cagney <cagney@b1.cygnus.com>
84
85 * sim-types.h: Re-do type system so that GCC's attribute and mode
86 are used to specify types. Handle case of ALPHA.
87
92fa4579
FCE
881998-11-13 Frank Ch. Eigler <fche@elastic.org>
89
90start-sanitize-gxsim
91 * Make-common.im: Build sim-gx.o and sim-gx-run.o.
92 * sim-gx.c: New file: target-independent gx routines.
93 * sim-gx.h: Declarations for gx structs and routines.
94 * sim-gx-run.c: New file: target-independent gx driver.
95 * sim-base.h: Add gx block vector to state struct.
96end-sanitize-gxsim
97 * aclocal.m4: Add tests for dlopen family.
98 * config.in: Regenerated.
99
847b31bd
DE
100Wed Nov 11 14:02:25 1998 Doug Evans <devans@canuck.cygnus.com>
101
102 * sim-hload.c (sim_load): Pass `prog_name' to sim_load_file, not NULL.
103
8c7dc9ff
DE
104Wed Nov 4 23:51:19 1998 Doug Evans <devans@seba.cygnus.com>
105
106 * genmloop.sh (eng.hin): Rename HAVE_PARALLEL_EXEC to
107 HAVE_PARALLEL_INSNS, define as 0 or 1. Emit decls of fns in mloop.cin.
108 * cgen-engine.h: Typedefs of IADDR,CIA,SEM_ARG,SEM_PC moved ...
109 * cgen-sim.h: ... to here.
110
b9a9cde4
AC
111Wed Oct 28 12:00:57 1998 Andrew Cagney <cagney@b1.cygnus.com>
112
113 * aclocal.m4 (enable-build-warnings): Replace
114 enable-sim-warnings. Extend =LIST syntax so that prepend and
115 append of options is possible. Drop -Werror, add
116 -Wstrict-prototypes for GDB compatibility.
117 * Make-common.in (SIM_WARNINGS): Update.
118
119Mon Oct 19 13:56:32 1998 Doug Evans <devans@seba.cygnus.com>
120
121 * Make-common.in (CGEN_INCLUDE_DEPS): Define.
122 (sim-core.o): Delete duplicate dependence on $(SIM_EXTRA_DEPS).
123 (sim-cpu.o,sim-endian.o,sim-hw.o): Ditto.
124 (cgen-run.o,cgen-scache.o,cgen-trace.o,cgen-utils.o): Delete
125 explicit cgen header dependencies, require SIM_EXTRA_DEPS to include
126 CGEN_INCLUDE_DEPS.
127 * cgen-cpu.h: New file.
128 * cgen-engine.h: New file.
129 * cgen-scache.h: New file.
130 * cgen-sim.h: Delete portions moved to new files.
131 * genmloop.sh: Generate two files eng.hin,mloop.cin explicitly,
132 rather than sending result to stdout.
133
134Fri Oct 9 14:20:22 1998 Doug Evans <devans@seba.cygnus.com>
135
136 * Make-common.in (sim-reg.o): New rule.
137 (cgen-run.o): New rule.
138 * cgen-ops.h: Delete many BI macros. Change all UBI -> BI.
139 * cgen-run.c (prime_cpu): New function.
140 * cgen-scache.c: Add pseudo-basic-block (pbb) scaching support.
141 (scache_option_handler, case OPTION_PROFILE_SCACHE): Handle explicitly
142 mentioned cpu.
143 (scache_flush_cpu,scache_lookup,scache_lookup_or_alloc): New fns.
144 * cgen-sim.h (CGEN_INSN_VIRTUAL_TYPE): New enum.
145 (CGEN_INSN_VIRTUAL_P): New macro.
146 (SEM_PC): New typedef.
147 (SEMANTIC_FN): Change type of result to SEM_PC.
148 (SEM_SET_FULL_CODE,SEM_SET_FAST_CODE,SEM_SET_CODE): New macros.
149 (IDESC_CTI_P,IDESC_SKIP_P): New macros.
150 (SCACHE_MAP): New typedef.
151 (CPU_SCACHE): Add pbb support.
152 (scace_lookup,scache_lookup_or_alloc,scache_flush_cpu): Declare.
153 (SEM_BRANCH_INIT_EXTRACT,SEM_BRANCH_INIT,SEM_BRANCH_FINI): New macros.
154 (CGEN_CPU): New members running_p,insn_count,{fast,full}_engine_fn,
155 max_slice_insns.
156 (INSN_NAME): Delete.
157 (cgen_insn_name): Declare.
158 (sim_engine_invalid_insn): Renamed from sim_engine_illegal_insn.
159 * cgen-trace.c (trace_buf): Shrink from 1024 to 256 bytes.
160 (first_insn_p): Make static.
161 (trace_insn): Handle virtual insns specially.
162 (cgen_trace_printf): Ensure we haven't overflowed the buffer.
163 * cgen-types.h (UBI): Delete.
164 (MODE_TYPE): New enum.
165 (HOSTINT,HOSTUINT,HOSTPTR): Delete.
166 * cgen-utils.c (mode_names): Delete UBI. Add INT,UINT,PTR.
167 (cgen_virtual_opcode_table): New global.
168 (cgen_insn_name): New function.
169 (sim_disassemble_insn): Ignore virtual insns.
170 * genmloop.sh: Delete top level loop generation. Add pbb support.
171 * sim-cpu.h (CPU_INSN_NAME_FN): New typedef.
172 (sim_cpu_base): New members max_insns,insn_name,model_data.
173 (CPU_PC_GET,CPU_PC_SET): New macros.
174 (sim_pc_get,sim_pc_set): Declare.
175 * sim-model.c (model_set): Call model init fn.
176 * sim-model.h (MODEL_FN): New typedef.
177 (INSN_TIMING): New member model_fn.
178 (MODEL): New members num,init.
179 * sim-profile.c (sim_profile_print_bar): Renamed from print_bar.
180 All callers updated.
181 (profile_insn_init): New fn.
182 (profile_print_insn): Update, INSN_NAME -> CPU_INSN_NAME.
183 Exit early if insn profiling not supported.
184 (profile_print_memory): Update, MAX_MODES -> MODE_TARGET_MAX.
185 (profile_install): Record profile_insn_init as init fn.
186 (profile_uninstall): Free PROFILE_INSN_COUNT if non-null.
187 * sim-profile.h: Update, MAX_MODES -> MODE_TARGET_MAX.
188 (PROFILE_DATA): Delete member exec_time.
189 Change insn_count to pointer to array, rather than the array.
190 (sim_profile_print_bar): Declare.
191
192Wed Oct 7 16:56:42 1998 Doug Evans <devans@seba.cygnus.com>
193
194 * cgen-run.c: New file.
195 * sim-reg.c: New file.
196
197Mon Sep 14 10:58:19 1998 Frank Ch. Eigler <fche@cygnus.com>
198
199 * aclocal.m4: Add checks for -lsocket and -lnsl.
200
201 * dv-sockser.c (dv_sockser_init): Use SO_REUSEADDR to
202 allow local port reuse on listening socket.
203
78b871ec
FCE
204Tue Sep 1 15:36:52 1998 Frank Ch. Eigler <fche@cygnus.com>
205
206 * sim-config.h: Remove reference to linux kernel header.
207
208Tue Aug 25 12:45:27 1998 Frank Ch. Eigler <fche@cygnus.com>
209
210 * dv-sockser.c (sockser_addr): Make variable non-static.
211
fb37fdcb
JJ
212Mon Aug 24 11:47:37 1998 Joyce Janczyn <janczyn@cygnus.com>
213
214 * sim-hw.{c,h} (sim_hw_parse): Return struct hw pointer.
215
216Tue Aug 11 18:12:19 1998 Doug Evans <devans@canuck.cygnus.com>
217
218 * sim-events.c (sim_events_elapsed_time): Fix calculation.
219
220Tue Aug 4 20:36:46 1998 Jeff Holcomb <jeffh@cygnus.com>
221
222 * Make-common.in (install-common): Add $(EXEEXT) when installing
223 run.
224
39813256
DE
225Mon Aug 3 11:46:01 1998 Doug Evans <devans@seba.cygnus.com>
226
227 * cgen-sim.h (cgen_state): New member opcode_table.
228 * cgen-utils.c (sim_disassemble_insn): Use it.
229
f3ccb5a7
DE
230Fri Jul 24 10:14:18 1998 Doug Evans <devans@canuck.cygnus.com>
231
63542cbc 232 * cgen-mem.h (DECLARE_SETT): Fix return type.
39813256
DE
233 * cgen-sim.h (sim_engine_illegal_insn): Declare.
234 * cgen-scache.c: Include stdlib.h.
235 * cgen-trace.c (trace_extract): Use %lx for PCADDR.
f3ccb5a7
DE
236 * sim-model.c (model_option_handler): Remove unused variable `n'.
237
cac4e5a4
DE
238Tue Jul 21 16:27:43 1998 Doug Evans <devans@seba.cygnus.com>
239
240 * cgen-utils.c: Include bfd.h.
241 (sim_disassemble_insn): Update call to CGEN_EXTRACT_FN.
242
243Wed Jul 8 18:24:10 1998 Jeffrey A Law (law@cygnus.com)
244
245 * sim-bits.h (EXTEND24): Fix typo.
246
9483af2c
AC
247Wed Jul 8 17:41:47 1998 Andrew Cagney <cagney@b1.cygnus.com>
248
249 * sim-events.c (ETRACE_P): New macro.
250 (struct _sim_event): Add member trace.
251 (sim_events_free): Reclaim trace message.
252
253 * sim-events.c, sim-events.h (sim_events_schedule_vtracef,
254 sim_events_schedule_tracef): New functions, include printf trace
255 information in argument list. If tracing, store asprintf'd trace
256 message in sim_event.
257
258 * hw-events.c, hw-events.h (hw_event_queue_schedule_tracef,
259 hw_event_queue_schedule_vtracef): New functions, mimic
260 sim_event_tracef.
261
658fb0c7
JL
262Mon Jul 6 15:51:14 1998 Jeffrey A Law (law@cygnus.com)
263
264 * sim-bits.h (EXTEND24): Define.
265
039fa2c8
DE
266Thu Jul 2 17:13:25 1998 Doug Evans <devans@seba.cygnus.com>
267
268 * cgen-sim.h (CPU_SCACHE): Make size unsigned.
269 (CPU_SCACHE_HASH_MASK): New macro.
270 (SCACHE_HASH_PC): Rewrite.
271 * genmloop.sh (engine_resume_{full,fast}): Move some of hash
272 computation out of main loop.
273
6de2add2
DE
274Wed Jul 1 16:44:12 1998 Doug Evans <devans@seba.cygnus.com>
275
276 * Make-common.in (SCHEME,SCHEMEFLAGS): Delete.
277 (CGENDIR,CGEN): New variables.
278 (CGEN_VERBOSE): Renamed to CGENFLAGS.
279 (cgen-arch,cgen-cpu,cgen-decode): Update.
280 (CGEN_CPU_WRITE): New variable.
281 (CGEN_CPU_SEMSW): -W -> -X.
282 (CGEN_FLAGS_TO_PASS): Delete SCHEME. Add CGEN,CGENFLAGS.
283 * cgen.sh: Delete args scheme,schemeflags. New arg cgen.
284
285 * cgen-sim.h (RECORD_IADDR): Delete.
286 * cgen-types.h (HOSTINT,HOSTUINT,HOSTPTR): New types.
287 * genmloop.sh (engine_resume_{full,fast}): Delete icount.
288
289Wed Jun 17 12:25:08 1998 Mark Alexander <marka@cygnus.com>
290
291 * gennltvals.def (mn10200): Add entry.
292 * nltvals.def: Regenerate with MN10200 additions.
293
67574b9c
AC
294Wed Jun 17 13:18:28 1998 Andrew Cagney <cagney@b1.cygnus.com>
295
296 * sim-inline.h (EXTERN_*): Replace with EXTERN_*_P. Correct
297 documentation on how it works.
298
299 * sim-core.h, sim-core.c (sim_core_install, sim_core_attach,
300 sim_core_detach, sim_core_read_buffer, sim_core_write_buffer,
301 sim_core_set_xor, sim_core_xor_read_buffer,
302 sim_core_xor_write_buffer): Update.
303
304 * sim-events.h, sim-events.c (sim_events_install,
305 sim_events_watch_clock, sim_events_schedule_after_signal,
306 sim_events_schedule, sim_events_watch_sim, sim_events_watch_core,
307 sim_events_deschedule): Update.
308
309 * sim-fpu.h, sim-fpu.c (sim_fpu_zero, sim_fpu_one, sim_fpu_two,
310 sim_fpu_max32, sim_fpu_max64): Update.
311
403bed78
DE
312Sat Jun 13 07:45:38 1998 Doug Evans <devans@fallis.cygnus.com>
313
314 * cgen-trace.c (trace_insn_fini): Redo cycle handling.
315 * sim-profile.h (PROFILE_DATA): Rename cycle handling members.
316 * sim-profile.c (profile_print_model): Update.
317
af2b0c85
DE
318Fri Jun 12 18:35:07 1998 Doug Evans <devans@seba.cygnus.com>
319
320 * gennltvals.def (m32r): Use common syscall.h now.
321 (mn10300): Add entry.
322 * nltvals.def: Regenerate.
68096722
DE
323
324 * sim-engine.c (sim_engine_get_run_state): New function.
325 * sim-engine.h (sim_engine_get_run_state): Declare it.
326
169c7476
DE
327Thu Jun 11 00:50:03 1998 Doug Evans <devans@seba.cygnus.com>
328
329 * sim-core.h (SIM_CORE_SIGNAL_FN): New typedef.
330 * sim-core.c (sim_core_signal): Make extern, always define.
331
a27a2a8d
DE
332Wed Jun 10 16:02:29 1998 Doug Evans <devans@seba.cygnus.com>
333
334 * Make-common.in (CGEN_FLAGS_TO_PASS): New variable.
335 * cgen-ops.h (ANDIF): New macro.
336 (ANDIF[BQHSD]I): Delete.
337
05f6bf9c
AC
338Thu Jun 4 13:53:54 1998 Andrew Cagney <cagney@b1.cygnus.com>
339
340 * hw-events.c (create_hw_event, delete_hw_event): Delete.
341 (hw_event_queue_schedule, hw_event_queue_deschedule,
342 bounce_hw_event): Fix hw-event memory corruptions found by Joyce
343 Janczyn.
344
345 * hw-alloc.h (HW_NZALLOC): Define.
346
347 * Make-common.in (test-hw-events): Add target for testing the
348 hw-event code.
349
350Mon May 25 21:11:26 1998 Andrew Cagney <cagney@b1.cygnus.com>
351
352 * Make-common.in (SIM_COMMON_HW_OBJS): Add hw-handles.o and
353 hw-instances.o.
354 hw-handles.c, hw-instances.c, hw-handles.h, hw-instances.h: New
355 files.
356 * hw-main.h: Include hw-handles.h, hw-instances.h.
357 * hw-base.h ({create,delete}_hw_{handles,instances}_data): Declare
358 * hw-base.c (hw_create, hw_delete): Call same.
359
48f83b1a
AC
360Mon May 25 18:55:35 1998 Andrew Cagney <cagney@b1.cygnus.com>
361
362 * dv-core.c: Include hw-main.h and sim-main.h.
363 * dv-pal.c: Include hw-main.h and sim-io.h.
364 * dv-glue.c: Include hw-main.h.
365
366 * hw-main.h: New file. Move list of includes to here.
367 * hw-base.h: From here.
368 * Make-common.in (hw_base_headers): Rename to hw_main_headers.
369 (hw-*.o, dv-*.o): Update.
370 * hw-tree.c, hw-base.c, hw-properties.c, hw-ports.c, hw-device.c,
371 hw-events.c, hw-alloc.c, sim-hw.c: Include hw-main.h instead of
372 sim-main.h.
373
374 * hw-base.h (do_hw_attach_regs, do_hw_poll_read_method,
375 do_hw_poll_read): Move declarations from here.
376 * hw-main.h: To here.
377
378 * hw-base.h (struct hw_device_descriptor, hw_finish_callback):
379 Move from here.
380 * hw-main.h (struct hw_descriptor, hw_finish_method): To here,
381 rename.
382 * Make-common.in (hw-config.h): Update
383 * hw-base.c, dv-pal.c, dv-glue.c: Update
384
385 * dv-glue.c, hw-device.h, hw-base.h, hw-ports.c: Rename
386 `*_callback' to `*_method.
387
c14db36d
AC
388Mon May 25 18:41:18 1998 Andrew Cagney <cagney@b1.cygnus.com>
389
390 * hw-base.h (set_*): Move set method macros from here.
391 * hw-device.h: To here.
392
325a1ba8
AC
393Mon May 25 18:21:38 1998 Andrew Cagney <cagney@b1.cygnus.com>
394
395 * hw-base.h (create_hw_property_data, delete_hw_property_data):
396 Declare.
c14db36d 397
325a1ba8
AC
398 * hw-base.c (hw_create, hw_delete): Call
399 * hw-properties.c (create_hw_property_data,
400 delete_hw_property_data): Define.
401
69be0d4c 402Mon May 25 17:40:46 1998 Andrew Cagney <cagney@b1.cygnus.com>
39e953a7 403
69be0d4c
AC
404 * hw-device.c, hw-properties.c: Include hw-base.h
405
406 * hw-alloc.h, hw-alloc.c: New files. Move alloc code to here.
407 * hw-device.c: From here.
408 * hw-base.h: Include "hw-events.h".
409
410 * hw-base.h (create_hw_alloc_data, delete_hw_alloc_data): Declare.
411 * hw-base.c (hw_create, hw_delete): Call.
412 * hw-alloc.c (create_hw_alloc_data, delete_hw_alloc_data): Define.
413
414 * Make-common.in (SIM_NEW_COMMON_OBJS): Add hw-alloc.o.
415 (hw-alloc.o): New target.
416
417Mon May 25 17:14:27 1998 Andrew Cagney <cagney@b1.cygnus.com>
39e953a7
AC
418
419 * hw-events.h, hw-events.c: New files. Move event code to here.
420 * sim-hw.c: From here.
421 * hw-base.h: Include "hw-events.h".
69be0d4c
AC
422 * Make-common.in (SIM_NEW_COMMON_OBJS): Add hw-events.o.
423 (hw-events.o): New target.
39e953a7
AC
424
425 * hw-device.h (struct hw): Add struct hw_event_data events_of_hw.
426 * hw-events.h (struct hw_event): Replace typedef hw_event.
427
428 * hw-base.h (create_hw_event_data, delete_hw_event_data): Declare.
429 * hw-base.c (hw_create, hw_delete): Call.
430 * hw-events.c (create_hw_event_data, delete_hw_event_data): Define.
431
69be0d4c 432 * dv-pal.c: Update.
39e953a7 433
2f06c437
AC
434Mon May 25 16:55:16 1998 Andrew Cagney <cagney@b1.cygnus.com>
435
436 * hw-base.c (panic_hw_port_event, empty_hw_ports): Move from here.
437 * hw-ports.c: To here.
438
439 * hw-base.h, hw-ports.c (create_hw_port_data,
440 delete_hw_port_data): New functions.
441 * hw-base.c (hw_delete, hw_create): Call same.
442
443 * hw-base.h (set_hw_ports, set_hw_port_event): Move set functions
444 from here.
445 * hw-ports.h: To here.
446
f6757447
AC
447Mon May 25 16:42:48 1998 Andrew Cagney <cagney@b1.cygnus.com>
448
449 * hw-device.c (hw_ioctl), hw-device.h (hw_ioctl_callback): Drop
450 PROCESSOR and CIA arguments.
451
f872d0d6
AC
452Fri May 22 12:16:27 1998 Andrew Cagney <cagney@b1.cygnus.com>
453
454 * aclocal.m4 (SIM_AC_OPTION_HW): Add enable / disable argument.
455 Move common object files from here.
456 * Make-common.in (SIM_COMMON_HW_OBJS): To here.
457
643878d0
AC
458Thu May 21 17:57:16 1998 Andrew Cagney <cagney@b1.cygnus.com>
459
460 * sim-hw.c: Include ctype.h.
461 (do_hw_poll_read): Do not assume EAGAIN.
462
6f7833f0
DE
463Wed May 20 04:37:57 1998 Doug Evans <devans@seba.cygnus.com>
464
465 * cgen-trace.c (first_insn_p): New static local.
466 (trace_insn_init): Set it.
467 (trace_insn_fini): Use TRACE_PREFIX.
468 (trace_insn): Rewrite to use trace_prefix.
469 * sim-trace.c (trace_prefix): Don't print filename arg if NULL.
470 Adjust width accordingly.
471
472 * sim-profile.h (PROFILE_DATA): New member profile_any_p.
473 (PROFILE_ANY_P,PROFILE_INSN_P,PROFILE_MEMORY): New macros.
474 (PROFILE_SCACHE_P,PROFILE_PC_P,PROFILE_CORE_P): New macros.
475 (PROFILE_COUNT_INSN,PROFILE_COUNT_READ,PROFILE_COUNT_WRITE): Simplify.
476 (PROFILE_COUNT_CORE): Simplify.
477 * sim-profile.c (profile_option_handler): Compute profile_any_p.
478
6f1cadd0
DE
479Tue May 19 23:55:30 1998 Doug Evans <devans@seba.cygnus.com>
480
481 * cgen-ops.h (ADDCFSI): Fix typo.
482
ebd58f4d
DE
483Sat May 16 12:44:52 1998 Doug Evans <devans@seba.cygnus.com>
484
991238c8
DE
485 * cgen-sim.h (CGEN_CPU): New members idesc_{read,sem}_init_p.
486 * genmloop.sh: Use them rather than static locals.
487
ebd58f4d
DE
488 * sim-engine.c (sim_engine_set_run_state): New function.
489 * sim-engine.h (sim_engine_set_run_state): Declare.
490 * genmloop.sh (pending_reason,pending_sigrc): New static locals.
491 (@cpu@_engine_stop): New args reason,sigrc. All callers updated.
492 (engine_resume): Reorganize. Allow synchronous exit from main loop.
493
bcb829fd
DE
494Fri May 15 16:06:05 1998 Doug Evans <devans@seba.cygnus.com>
495
496 * cgen-trace.c (trace_insn_init): New arg first_p.
497 All callers updated.
498 (trace_insn_fini): New arg last_p. All callers updated.
499 * cgen-trace.h (trace_insn_init,trace_insn_fini): Update.
500 (TRACE_INSN_INIT,TRACE_INSN_FINI): Update.
501 * genmloop.sh (engine_resume): Update.
502
6cad2395
JJ
503Fri May 15 15:59:00 1998 Joyce Janczyn <janczyn@cygnus.com>
504
505 * Make-common.in (install-common): Run ranlib on installed copy of
506 libsim.a.
507
08bae91b
JJ
508Fri May 15 15:03:00 1998 Joyce Janczyn <janczyn@cygnus.com>
509
510 * Make-common.in (install-common): Rename and install libsim.a.
511
512Tue May 12 15:23:57 1998 Andrew Cagney <cagney@b1.cygnus.com>
513
514 * sim-io.c (unistd.h): Include.
515
516Wed May 6 16:04:18 1998 Doug Evans <devans@seba.cygnus.com>
517
518 * Make-common (sim_main_headers): Sort.
519 (cgen-*.o): Add cgen-sim.h dependency.
520
521 * cgen-scache.c (scache_init): Only allocate space if scache element
522 size is non-zero.
523 (scache_flush,scache_print_profile): Check if scache in use first.
524
525 * cgen-sim.h (IDESC): Provide forward declaration.
526 (DECODE): Delete.
527 (CGEN_CPU): Always define scache member. New members idesc,opcode.
528 (cgen_cpu_max_extra_bytes): Declare.
529 * cgen-utils.c (cgen_cpu_max_extra_bytes): New function.
530
531 * cgen.sh: s/@arch@/${arch}/ for cpu files.
532
533 * sim-cpu.h: New file. sim_cpu_base moved here.
534 Move sim_cpu_lookup decl here.
535 * sim-base.h: #include "sim-cpu.h".
536 * sim-cpu.c: New file.
537 * Make-common (sim_main_headers): Add sim-cpu.h.
538 (sim-cpu.o): Add rule for.
539
540 * sim-model.c (set_model): Delete.
541 (sim_model_set,model_set): New functions.
542 (sim_model_install): Renamed from model_install.
543 Don't set default model here.
544 (model_option_handler): Rewrite --model processing.
545 (sim_model_lookup,sim_mach_lookup): New functions.
546 * sim-model.h (MAX_MODELS,MAX_INSNS): Delete.
547 (insn_timing): Delete.
548 (INSN_TIMING): New member `num'.
549 (IMP_PROPERTIES): Always define scache_elm_size member.
550 (MACH): New member init_cpu.
551 (sim_machs): Renamed from machs.
552 (sim_model_install): Renamed from model_install.
553 (sim_model_set,sim_model_lookup,sim_mach_lookup): Declare.
554 * sim-module.c (modules): Update.
555
556 * sim-profile.c (profile_print_insn): Add cpu arg to INSN_NAME macro.
109e6111
DE
557
558 * sim-io.c: #include <errno.h>.
559
844f40d3 560Wed May 6 12:39:15 1998 Andrew Cagney <cagney@b1.cygnus.com>
844f40d3
AC
561
562 * dv-pal.c (struct hw_pal_device): Add reader.
563 (hw_pal_finish): Initialize reader.
564 (scan_hw_pal): Use reader.
565
566 * hw-base.h, sim-hw.c (do_hw_poll_read): New function.
567 (HW_IO_EOF, HW_IO_NOT_READY): Define.
568 * dv-pal.c: Use.
569
844f40d3
AC
570 * sim-io.h, sim-io.c (sim_io_poll_read): New function. Copy from
571 ../ppc/main.c sim_io_read_stdin.
572
03f3bfdb
AC
573Fri May 1 12:11:02 1998 Andrew Cagney <cagney@b1.cygnus.com>
574
575 * hw-tree.h (hw_tree_print): Paramaterize with print and file
576 arguments.
577 * hw-tree.c: Update.
578
579 * hw-base.h (hw_port_event_callback): Delete CPU/CIA args.
580 * hw-device.h (hw_io_read_buffer, hw_io_write_buffer): Delete
581 CPU/CIA args.
582 * hw-ports.h (hw_port_event): Ditto.
583 * hw-ports.c (hw_port_event): Update.
584 * hw-base.c (panic_hw_io_read_buffer, panic_hw_io_write_buffer):
585 Update.
586 * dv-pal.c (hw_pal_io_read_buffer, hw_pal_io_write_buffer):
587 Update.
588 (hw_pal_io_write_buffer): Call hw_halt not sim_engine_halt.
589 (do_counter_event): Update.
590 * dv-glue.c (hw_glue_io_read_buffer): Update.
591 (hw_glue_port_event): Update.
592
03f3bfdb
AC
593 * hw-device.h (SIM_DESC): Replace with struct sim_state.
594 * hw-base.h (hw_create): Ditto.
595 * hw-base.c (hw_create): Ditto.
596
597 * hw-device.c (hw_abort, hw_trace, hw_hw_event_queue_schedule,
598 hw_event_queue_deschedule, hw_event_queue_time): Delete, moved
599 from here to.
600 * sim-hw.c: Here.
601 * hw-device.h (hw_system_cpu): Declare.
602 * sim-hw.c (hw_system_cpu): New function.
603
604 * sim-core.c (sim_core_map_attach, sim_core_attach): Call
605 sim_hw_abort not hw_abort.
606 (sim-hw.h): Include.
607 (sim_core_read_buffer, sim_core_write_buffer): Call
608 sim_hw_io_read_buffer and sim_hw_io_write_buffer. Do not pass CPU
609 argument.
610 (sim_core_set_xor): Do not pass CPU when aborting.
611
612 * sim-n-core.h (sim_core_read_aligned_N,
613 sim_core_write_aligned_N): Call sim_hw_abort not hw_abort.
614 (sim_core_read_aligned_N, sim_core_write_aligned_N): Call
615 sim_cpu_hw_io_read_buffer and sim_cpu_hw_io_write_buffer. Does not
616 return length.
617
618 * sim-hw.h: Declare sim_hw_io_{read,write}_buffer. Declare
619 sim_hw_print.
620 * sim-hw.c (sim_hw_io_read_buffer, sim_hw_io_write_buffer,
621 sim_cpu_hw_io_read_buffer, sim_cpu_hw_io_write_buffer): New
622 functions.
623 (sim_hw_print): New function.
844f40d3 624
03f3bfdb
AC
625 * sim-engine.h (sim_engine_vabort): Declare.
626 * sim-engine.c (sim_engine_vabort): New function.
844f40d3 627
e7439596
AC
628Wed Apr 29 23:58:52 1998 Andrew Cagney <cagney@b1.cygnus.com>
629
630 * sim-trace.c (print_data): For floating-point numbers trace raw
631 hex value.
632 (trace_result_fp2): New function.
633 * sim-trace.h (trace_result_fp2): New declaration.
634 (TRACE_FP_RESULT2): New macro.
635
9d45df1b
GN
636Tue Apr 28 18:28:58 1998 Geoffrey Noer <noer@cygnus.com>
637
638 * common/aclocal.m4: call AM_EXEEXT in SIM_AC_COMMON, define
639 AM_CYGWIN32 and AM_EXEEXT.
640 * common/Make-common.in: set EXEEXT, add missing EXEEXTs
641 to run and install-common rules.
642 * common/configure: regenerate
643
f68cdf65
AC
644Sat Apr 25 17:45:01 1998 Andrew Cagney <cagney@b1.cygnus.com>
645
646 * sim-types.h (cell_word): New type.
647 (natural_cell): Delete type.
648
56df89bc
TT
649Sun Apr 26 15:31:55 1998 Tom Tromey <tromey@creche>
650
651 * configure: Regenerated to track ../common/aclocal.m4 changes.
652 * config.in: Ditto.
653
654Sun Apr 26 15:25:07 1998 Tom Tromey <tromey@cygnus.com>
655
656 * acconfig.h (NEED_DECLARATION_PRINTF): Removed.
657
fc4198bb
TT
658Fri Apr 24 14:16:40 1998 Tom Tromey <tromey@creche>
659
660 * configure: Regenerated to track ../common/aclocal.m4 changes.
661 * config.in: Ditto.
662
663Fri Apr 24 11:38:08 1998 Tom Tromey <tromey@cygnus.com>
664
665 * acconfig.h: New file.
666 * Make-common.in (top_builddir): New macro.
667 (INTL_LIB): Removed.
668 (INTLLIBS): New macro.
669 (INTLDEPS): Likewise.
670 (LIBDEPS): Use INTLDEPS.
671 (EXTRA_LIBS): Use INTLLIBS.
672 * aclocal.m4 (SIM_AC_COMMON): Call CY_GNU_GETTEXT.
673 (CY_WITH_NLS, CY_GNU_GETTEXT, AM_PATH_PROG_WITH_TEST,
674 AM_LC_MESSAGES): New macros from GNU gettext.
675
d32658fe
AC
676Fri Apr 24 19:57:59 1998 Andrew Cagney <cagney@b1.cygnus.com>
677
678 * sim-config.h: Discard leading _ from macros.
679 * sim-types.h: Ditto.
680
3618a6e9
MM
681Wed Apr 22 14:14:19 1998 Michael Meissner <meissner@cygnus.com>
682
683 * Make-common.in (CSEARCH): Add -I to intl directories.
684 (INTL_LIB): Point to libintl.a.
685 (LIBDEPS): Add $(INTL_LIB).
686 (EXTRA_LIBS): Ditto.
687
404d4ee1
DE
688Tue Apr 21 12:44:27 1998 Doug Evans <devans@canuck.cygnus.com>
689
690 * cgen-types.h (GETHIDI,MAKEDI): Tweak.
691
8bb5064e
DE
692 * cgen-ops.h (ADDCFSI): Fix.
693 (SUBCFSI): Tweak.
694
97f4d183
AC
695Tue Apr 21 13:18:41 1998 Andrew Cagney <cagney@b1.cygnus.com>
696
697 * sim-types.h (signed_address, unsigned_address): Define.
698
699Mon Apr 20 21:47:54 1998 Andrew Cagney <cagney@b1.cygnus.com>
700
701 * sim-fpu.c (sim_fpu_2d): Don't return an SNaN, convert it into a
702 QNaN.
703
7d93d538
AC
704Thu Apr 16 10:30:14 1998 Andrew Cagney <cagney@b1.cygnus.com>
705
706 * sim-fpu.c, sim-fpu.h (sim_fpu_fractionto, sim_fpu_tofraction):
707 New functions, pack / unpack sim_fpu struct using raw values.
708 (sim_fpu_is): Differentiate between negative and positive
709 infinity.
710
93f96715
AC
711Tue Apr 14 18:49:31 1998 Andrew Cagney <cagney@b1.cygnus.com>
712
713 * sim-bits.h (EXTEND4): Define.
ea5d84f5 714 (EXTEND4, EXTEND15, EXTEND11): Ditto.
7acc4e98 715
5d71b4bc
JM
716Tue Apr 14 16:31:35 1998 John Metzler <jmetzler@cygnus.com>
717
eeb89805 718 * sim-memopt.c (parse_addr): Sunos 4.5 does not have strtol
5d71b4bc
JM
719 declared so we need this cast to prevent long long addresses
720 from being misconfigures. Results in access to unmapped memory.
721
b42e7eb3
DE
722Tue Apr 14 13:19:14 1998 Doug Evans <devans@canuck.cygnus.com>
723
724 * Make-common.in (RUNTESTFLAGS): Define.
725 (check): Pass RUNTESTFLAGS to recursive make.
726
7bf341f4
AC
727Tue Apr 14 15:09:19 1998 Andrew Cagney <cagney@b1.cygnus.com>
728
729 * sim-info.c (sim_info): Be verbose when either VERBOSE or
730 STATE_VERBOSE_P.
731
64ed8b6a
AC
732Sat Apr 4 23:24:17 1998 Andrew Cagney <cagney@b1.cygnus.com>
733
734 * aclocal.m4 (sim-inline): By default, disable sim-inline when
735 cross compiling.
736
278bda40
AC
737Sat Apr 4 20:36:25 1998 Andrew Cagney <cagney@b1.cygnus.com>
738
739 * aclocal.m4 (sim-cflags): Add -fomit-frame-pointer to defaults.
740 (sim-inline): Update to match sim-inline.[hc]
278bda40
AC
741 * configure: Regenerated to track ../common/aclocal.m4 changes.
742
743 * Make-common.in (sim_main_headers): Add sim-inline.h
744
745 * sim-bits.h (sim-bits.c): Include when H_REVEALS_MODULE_P.
746 selected.
747 * sim-endian.h (sim-endian.c): Ditto.
748
749 * sim-events.h (_SIM_EVENTS_H_): Replace with SIM_EVENTS_H.
750 (sim_events_set_trace): Delete unused prototype.
751
752 * sim-core.h (_SIM_CORE_H_): Replace with SIM_CORE_H.
753 * sim-core.c (_SIM_CORE_C_): Ditto for SIM_CORE_C.
754
755 * sim-fpu.h (sim-fpu.c): Include when H_REVEALS_MODULE_P.
756 (sim_fpu_to232i, sim_fpu_to232u, sim_fpu_i232to, sim_fpu_u232to):
757 Comment out, not yet implemented in sim-fpu.c.
758 (sim_fpu_zero, sim_fpu_one, sim_fpu_two, sim_fpu_qnan,
759 sim_fpu_max32, sim_fpu_max64): Mark as EXTERN_SIM_FPU.
760
761 * sim-inline.h: Rewrite description.
762 (H_REVEALS_MODULE_P, C_REVEALS_MODULE_P): Define.
763 (SIM_MAIN_INLINE): Add inline option.
764
765 * sim-inline.c (semantics.c, idecode.c, engine.c, ...): Do not
766 include generated files. Handled by generator directly.
767
72a08ce5
AC
768Sat Apr 4 01:07:06 1998 Andrew Cagney <cagney@b1.cygnus.com>
769
770 * sim-trace.c (set_trace_option_mask): Keep TRACE_ANY_P
771 up-to-date.
772
773 * sim-trace.h (TRACE_ANY_P): Define.
774 (struct _trace_data): Add trace_any_p.
775
a1e4dc0d
AC
776Mon Mar 30 17:11:55 1998 Andrew Cagney <cagney@b1.cygnus.com>
777
778 * run.c (main): Handle all alternatives of enum sim_stop.
779 (main): Delete unused `asection *s'.
780
d8f53049
AC
781Fri Mar 27 16:15:52 1998 Andrew Cagney <cagney@b1.cygnus.com>
782
783 * hw-tree.h, hw-tree.c (hw_tree_vparse): New function
784
785 * configure: Regenerated to track ../common/aclocal.m4 changes.
786
787 * sim-hw.c: New file.
788 * sim-hw.h (sim_hw_parse): Declare function.
789 (hw-tree.h): Do not include.
790
791 * sim-base.h (STATE_HW): Define.
792 (struct sim_state_base): Add member struct *hw.
793
794 * sim-module.c (sim-hw.h): Include.
795 (modules): Add sim_hw_install.
796
797 * aclocal.m4 (sim_hw_obj): Add sim-hw.o
798
82ea14fd
AC
799Fri Mar 27 14:55:06 1998 Andrew Cagney <cagney@b1.cygnus.com>
800
801 * sim-base.h (CPU_INDEX): Define.
802
803 * sim-utils.c (sim_state_alloc): Initialize.
804 * sim-module.c (sim_post_argv_init): Ditto.
805
6d133cc9
AC
806Thu Mar 26 10:07:57 1998 Stu Grossman <grossman@bhuna.cygnus.co.uk>
807
808 * aclocal.m4 (sim_hw_obj): Fix sed expression to generate
809 properly formatted lists.
810
98f1f62c
AC
811Thu Mar 26 10:37:22 1998 Andrew Cagney <cagney@b1.cygnus.com>
812
813 * dv-pal.c (enum hw_pal_address_mask): From Stu Grossman, was
814 0x2f needs to be 0x3f.
815
04cdafa7
AC
816Thu Mar 26 09:10:56 1998 Andrew Cagney <cagney@b1.cygnus.com>
817
818 * hw-tree.c (hw_tree_find_property): Return NULL when device is
819 not found.
820 (hw_tree_find_*_property): Clean up error message when property is
821 not found.
822
823 * dv-pal.c (hw_pal_io_read_buffer): Check the smp property is
824 present before looking for it.
825
8d0bd988
IC
826Wed Mar 25 16:17:38 1998 Ian Carmichael <iancarm@cygnus.com>
827
828 * aclocal.m4 (AC_CHECK_HEADERS): Add check for fpu_control.h.
829 (AC_CHECK_FUNCS): Add check for __setfpucw.
830 * configure: Regenerated.
831
05d7918e
AC
832Wed Mar 25 09:18:34 1998 Andrew Cagney <cagney@b1.cygnus.com>
833
834 * dv-pal.c (hw_pal_countdown, hw_pal_countdown_value,
835 hw_pal_timer, hw_pal_timer_value): Define.
836 (hw_pal_io_read_buffer, hw_pal_io_write_buffer): Add timer support
837 (do_counter_event, do_counter_read, do_counter_value,
838 do_counter_write): new functions.
839
840Tue Mar 24 12:24:24 1998 Andrew Cagney <cagney@b1.cygnus.com>
841
842 * hw-tree.c (hw_printf): Send tree dump to stderr, same as other
843 trace output.
844
845 * hw-base.c (hw_create): Stop searching for a device when one is
846 found.
847
d89fa2d8
AC
848Wed Mar 25 12:35:29 1998 Andrew Cagney <cagney@b1.cygnus.com>
849
850 * configure: Regenerated to track ../common/aclocal.m4 changes.
851
852Mon Mar 23 10:25:08 1998 Andrew Cagney <cagney@b1.cygnus.com>
853
854 * aclocal.m4 (SIM_AC_OPTION_HARDWARE): Add second argument,
855 appends extra devices.
856 (SIM_AC_OPTION_HARDWARE): Substute sim_hw, a non-duplicate list of
857 the device names.
858
859 * Make-common.in (hw-config.h): New target, create hw-config.h
860 file.
861 (SIM_HW): Definition from @sim_hw@.
862 (hw-base.o): Depend on hw-config.h
863
63330b2e
SG
864Tue Mar 24 17:41:35 1998 Stu Grossman <grossman@bhuna.cygnus.co.uk>
865
866 * Make-common.in: Get SHELL from configure.
867 * (stamp-tvals sim-inline.c): Use $(SHELL) when invoking
868 move-if-change. Fixes NT native build problem.
869 * Makefile.in (nltvals.def): Use $(SHELL) when invoking
870 move-if-change. Fixes NT native build problem.
871 * configure: Regenerate with autoconf 2.12.1 to fix shell issues for
872 NT native builds.
873
874Sun Mar 22 16:54:40 1998 Andrew Cagney <cagney@b1.cygnus.com>
875
876 * hw-device.h, hw-device.c (hw_strdup): New function.
877
878 * hw-base.c (hw_create): Use hw_strdup when saving a copy of the
879 strings name, family and args.
880 (full_name_of_hw): Use hw_strdup when returning the full path.
881
882 * hw-properties.c: Clean up property not found / wrong type error
883 messages.
884
885 * hw-tree.c (hw_tree_parse): Finish a devices initialization
886 before attaching any ports.
887
888 * hw-base.c (hw-config.): Include. Replace hardwired table.
889
890 * dv-glue.c: Copy over ../ppc/hw_glue.c. Update to new framework.
891
892 * Make-common.in: Add rule for dv-glue.o.
893
775b309a
AC
894Sun Mar 22 16:45:54 1998 Andrew Cagney <cagney@b1.cygnus.com>
895
b2846e63
AC
896 * hw-base.c (hw_finish): Move setting of trace level to here.
897 (hw_create): From here.
898
775b309a
AC
899 * hw-base.h, hw-base.c (do_hw_attach_regs): Copy function from
900 ../ppc/device_table.c.
901
902 * dv-pal.c (hw_pal_finish): Attach PAL device to parent bus.
903
904 * hw-tree.c (print_properties): Supress path when printing
905 properties of root node.
906
937a4bdc
AC
907Sun Mar 22 16:21:15 1998 Andrew Cagney <cagney@b1.cygnus.com>
908
909 * hw-device.h (HW_TRACE): Define.
910 (hw_trace): Declare.
911 * hw-device.c (hw_trace): Implement function.
912
913 * hw-base.c (hw_create): Set hw trace level from "trace?"
914 property.
915
916 * dv-core.c (dv_core_attach_address_callback): Add trace.
917
918 * dv-pal.c: Replace DTRACE with HW_TRACE.
919
e5f0d498
AC
920Sun Mar 22 15:23:35 1998 Andrew Cagney <cagney@b1.cygnus.com>
921
922 * hw-device.h (HW_ZALLOC, HW_MALLOC): New macros.
923 (hw_alloc_data): Delcare.
924 (struct hw): Add member alloc_of_hw.
925
926 * hw-device.c (hw_zalloc, hw_malloc, hw_free, hw_free_all): New
927 functions. Assocate memory with a device.
928 (stdlib.h): Include.
929
930 * hw-base.h (set_hw_delete): Define.
931 (hw_delete_callback): Declare.
932 (hw_delete): Declare.
933
934 * hw-base.c (hw_delete): Implement function.
935 (struct hw_base_data): Add member to_delete.
936 (ignore_hw_delete): New function, does nothing.
937 (hw_create): Set the hw_delete method.
938 (hw_create): Allocate the base type using HW_ZALLOC before setting
939 any methods.
940
775b309a
AC
941 * hw-tree.h, hw-tree.c (hw_tree_delete): New function.
942
e5f0d498
AC
943 * hw-properties.c: Replace zalloc/zfree with hw_zalloc/hw_free.
944
945 * hw-ports.c: Replace zalloc/zfree with hw_zalloc/hw_free.
946 (attach_hw_port_edge): Add struct hw argument
947
948 * dv-pal.c (hw_pal_finish): Replace zalloc/zfree with
949 hw_zalloc/hw_free.
950
b1e9223c
AC
951Sun Mar 22 15:09:52 1998 Andrew Cagney <cagney@b1.cygnus.com>
952
953 * hw-device.h (hw_attach_address_callback,
954 hw_detach_address_callback): Attach to a single space not a space
955 mask. Clarify interpretation of SPACE:ADDR parameters.
956
957 * hw-base.c (passthrough_hw_attach_address,
958 passthrough_hw_detach_address): Update.
959 * dv-core.c (dv_core_attach_address_callback): Ditto.
960 * dv-pal.c (hw_pal_attach_address): Ditto.
961
962Thu Mar 19 00:41:00 1998 Andrew Cagney <cagney@b1.cygnus.com>
963
964 * sim-options.h: Document additional CPU arg to OPTION_HANDLER.
965
ae7c3446
AC
966Wed Mar 18 14:13:02 1998 Andrew Cagney <cagney@b1.cygnus.com>
967
968 * Make-common.in (SIM_HW_OBJS, SIM_HW_SRC, SIM_DV_OBJS): Define.
969 (hw-base_h, hw-device_h, hw-handles_h, hw-instances_h, hw_ports_h,
970 hw-properties_h, hw-tree_h): Define, point at corresponding
971 header.
972 (hw_base_headers): Define list of headers included by hw-base.h
973 (hw-base.o, hw-device.o, hw-instances.o, hw-handles.o, hw-ports.o,
974 hw-properties.o, hw-tree.o): Specify dependencies.
975 (dv-core.o, dv-pal.o): Ditto.
976
977 * sim-hw.h: New file.
978
979 * hw-device.h, hw-device.c, hw-properties.h, hw-properties.c,
980 hw-ports.h, hw-ports.c: New files. Copied from ../ppc/device.[ch].
981
982 * hw-tree.h, hw-tree.c: New files. Copied from ../ppc/tree.[hc].
983
984 * hw-base.h, hw-base.c: new files. Copied from
985 ../ppc/device_table.[hc].
986
987 * dv-core.c, dv-pal.c: New files. Copied from
988 ../ppc/hw_{core,pal}.c
989
990 * sim-basics.h (struct hw): Declare.
991 (enum port_direction, enum object_disposition): Declare.
992
9a8e61f1
AC
993Wed Mar 18 12:38:12 1998 Andrew Cagney <cagney@b1.cygnus.com>
994
995 * aclocal.m4 (SIM_AC_OPTION_HARDWARE): Set sim_hw_obj, sim_dv_obj,
996 sim_dv_src in Makefile. Take list of devices as parameter to m4
997 macro..
998
999 * configure: Regenerated to track ../common/aclocal.m4 changes.
1000
a8ff5026
AC
1001Mon Mar 16 12:37:33 1998 Andrew Cagney <cagney@b1.cygnus.com>
1002
1003 * sim-trace.h, sim-trace.c (trace_prefix): Pass in sim_cia so that
1004 trace_prefix can abort cleanly.
1005
84c6d152
DE
1006Sat Mar 14 18:36:12 1998 Doug Evans <devans@seba.cygnus.com>
1007
1008 * dv-sockser.c, dv-sockser.h: New files.
1009 * Make-common.in (dv-sockser.o): Add rule for.
1010 * aclocal.m4: Check for fcntl.h.
1011 * config.h: Add HAVE_FCNTL_H.
1012
1013 * sim-break.c (remove_breakpoint): Fix thinko.
1014
1015 * sim-hload.c (sim_load): Provide default value of SIM_HANDLES_LMA.
1016 Use SIM_HANDLES_LMA for lma_p arg to sim_load_file.
1017
93f75411
FF
10181998-03-13 Fred Fish <fnf@cygnus.com>
1019
1020 * sim-base.h (struct sim_state_base): Add prog_syms and
1021 define macro STATE_PROG_SYMS.
a8ff5026 1022 * sim-trace.c (trace_prefix): Add variables abfd, symsize,
93f75411
FF
1023 symbol_count, and asymbols. Call bfd_get_symtab_upper_bound
1024 and bfd_canonicalize_symtab, to get symbol table on first use
1025 and preserve it via STATE_PROG_SYMS for future calls to
1026 bfd_find_nearest_line.
1027
1028Wed Mar 11 14:02:47 1998 Andrew Cagney <cagney@b1.cygnus.com>
1029
1030 * sim-core.h, sim-core.c (sim_core_map_to_str): Delete.
1031
1032 * sim-core.c (sim_core_attach): Handle a generic number of maps -
1033 up to nr_maps, not just access_* maps.
1034
1035 * sim-profile.h (struct PROFILE_DATA): Track nr_maps different
1036 maps.
1037
1038 * sim-profile.c (profile_print_core): Make map unsigned. Iterate
1039 over nr_maps not sim_core_nr_maps.
1040
1041 * sim-events.h, sim-events.c (sim_events_watch_core): Change
1042 core_map argument to unsigned.
1043 (struct _sim_core): Ditto for struct member core_map.
1044
1045 * sim-core.h (nr_sim_core_maps, sim_core_*_map): Delete
1046
1047 * sim-basics.h (access_io, access_*_io): Define.
1048 (map_read, map_write, map_exec, map_io): Define.
1049
1050 * sim-core.c, sim-core.h (sim_core_attach): Replace argument
1051 attach with more generic mapmask.
1052 (sim_core_{read,write}_*): Change map argument to unsigned.
1053
1054 * sim-core.c (sim_core_uninstall, sim_core_attach,
1055 sim_core_detach): Iterate over nr_maps instead of
1056 sim_core_nr_maps.
1057
1058 * sim-break.c (insert_breakpoint): Write breakpoints to exec_map
1059 instead of the write_map.
1060 (remove_breakpoint): Ditto.
1061
1062 * genmloop.sh (engine_resume_full): Replace sim_core_*_map
1063 with read_map, write_map, exec_map resp.
1064
1065 * cgen-mem.h (DECLARE_GETMEM, DECLARE_SETMEM, DECLARE_GETIMEM):
1066 Ditto.
1067
1068 * cgen-utils.c (sim_disassemble_insn): Ditto.
1069
1070 * sim-hrw.c (sim_write, sim_write): Ditto.
1071
1072 * sim-utils.h, sim-utils.c (access_to_str, map_to_str,
1073 transfer_to_str): New functions.
1074
bda9d8a3
DE
1075Mon Mar 9 12:50:59 1998 Doug Evans <devans@seba.cygnus.com>
1076
1077 * sim-base.h (sim_state_base): New member environment.
1078 (STATE_ENVIRONMENT): New macro.
1079 * sim-config.c (current_environment): Delete.
1080 (sim_config_default): New function.
1081 (sim_config): Set STATE_ENVIRONMENT, not current_environment.
1082 * sim-config.h (current_environment,CURRENT_ENVIRONMENT): Delete.
1083 (sim_config_default): Add prototype.
1084 * sim-module.c (sim_pre_argv_init): Call sim_config_default.
1085 * sim-options.c (standard_option_handler, case OPTION_ENVIRONMENT):
1086 Set STATE_ENVIRONMENT, not current_environment.
1087
c391655e
JW
1088Mon Mar 9 11:59:03 1998 Jim Wilson <wilson@cygnus.com>
1089
1090 * sim-fpu.c (NR_GUARDS64): Change NR_PAD32 to NR_PAD64.
1091
3cdda79a
AC
1092Tue Mar 3 10:53:05 1998 Andrew Cagney <cagney@b1.cygnus.com>
1093
1094 * sim-types.h (SIGNED32, SIGNED64): Pacify GCC.
1095
1096 * sim-alu.h (ALU64_BEGIN): Make alu64_r unsigned.
1097
de13b4cb
DE
1098Mon Mar 2 10:20:06 1998 Doug Evans <devans@seba.cygnus.com>
1099
3d4e3414 1100 * Make-common.in (TAGS): Make smarter.
40d160dd 1101 * Makefile.in (TAGS): Ditto.
3d4e3414 1102
b0df95bb
DE
1103Fri Feb 27 19:09:57 1998 Doug Evans <devans@canuck.cygnus.com>
1104
1105 * sim-module.c (*): Fix typos in assertion tests.
1106
baf8377d
AC
1107Sat Feb 28 13:54:10 1998 Andrew Cagney <cagney@b1.cygnus.com>
1108
1109 * sim-module.c (sim_pre_argv_init): String passed to asprintf
1110 can't be constant.
1111
1112 * sim-options.c (sim_parse_args): Ditto.
1113 (sim_args_command): Return OK, instead of nothing, for an empty
1114 command.
1115
0e701ac3
AC
1116Fri Feb 27 13:29:13 1998 Andrew Cagney <cagney@b1.cygnus.com>
1117
1118 * sim-profile.c (profile_info): Rename from profile_print. Drop
1119 misc and misc_cpu callback arguments. Use
1120 PROFILE_INFO_CPU_CALLBACK and STATE_PROFILE_INFO_CALLBACK instead.
1121 (profile_install): Install profile_info function.
1122
1123 * sim-profile.h (PROFILE_INFO_CPU_CALLBACK,
1124 STATE_PROFILE_INFO_CALLBACK): Define.
1125 (struct PROFILE_DATA): Add field info_cpu_callback.
1126 (profile_print): Delete function.
1127
1128 * sim-base.h (STATE_MODULES): Define. Replace individual
1129 STATE_*_LIST with single struct module_list.
1130
1131 * sim-module.h (MODULE_INFO_FN, MODULE_INFO_LIST): Declare.
1132 (struct module_list): Declare.
1133
1134 * sim-module.h, sim-module.c (sim_module_add_info_fn,
1135 sim_module_info): New functions.
1136 (sim_module_install): Clean up module data structures.
1137
1138 * sim-info.c (sim_info): New file. New function. Call
1139 sim_module_info.
1140
1141 * Make-common.in (sim-info.o): Define rule.
1142 (SIM_NEW_COMMON_OBJS): Add sim-info.o.
1143
1144
966df580
DE
1145Fri Feb 27 18:26:16 1998 Doug Evans <devans@canuck.cygnus.com>
1146
1147 * sim-base.h (sim_cpu_base): New members name, options.
1148 (sim_cpu_lookup): Add prototype.
1149 * sim-module.c (sim_pre_argv_init): Provide default names for cpus.
1150 * sim-options.h (DECLARE_OPTION_HANDLER): New argument `cpu'.
1151 (sim_add_option_table): Update prototype.
1152 * sim-options.c (sim_add_option_table): New argument `cpu'.
1153 (standard_option_handler,standard_install): Update.
1154 (sim_parse_args): Handle cpu specific options.
1155 (print_help): New static function.
1156 (sim_print_help): Call it. Print cpu specific options.
1157 (find_match): New static function.
1158 (sim_args_command): Call it. Handle cpu specific options.
1159 * sim-utils.c (sim_cpu_lookup): New function.
1160 * sim-memopt.c (memory_option_handler): Update.
1161 (sim_memopt_install): Update.
1162 * sim-model.c (model_option_handler): Update.
1163 (model_install): Update.
1164 * sim-profile.c (profile_option_handler): Update.
1165 (profile_install): Update.
1166 * sim-trace.c (trace_option_handler): Update.
1167 (trace_install): Update.
1168 * sim-watch.c (watchpoint_option_handler): Update.
1169 (sim_watchpoint_install): Update.
1170 * cgen-scache.c (scache_option_handler): Update.
1171 (scache_install): Update.
1172
6cd37f15
DE
1173Wed Feb 25 11:00:26 1998 Doug Evans <devans@canuck.cygnus.com>
1174
1175 * Make-common.in (check): Run `make check' in testsuite dir.
1176
390ffa89
AC
1177Wed Feb 25 14:40:24 1998 Andrew Cagney <cagney@b1.cygnus.com>
1178
1179 * sim-trace.c (trace_result0): New function.
1180
1181 * sim-trace.h (TRACE_FP_*, TRACE_FPU_*): Rename TRACE_FPU_*
1182 macro's to TRACE_FP_*. TRACE_FPU_* should be defined and used when
1183 tracing sim_fpu variables.
1184 (TRACE_ALU_RESULT0): Define.
1185 (TRACE_FP_RESULT_WORD): Define.
1186 (TRACE_FP_INPUT_WORD1): Define.
1187
1188 * sim-fpu.c, sim-fpu.h (sim_fpu_max32, sim_fpu_max64, sim_fpu_one,
1189 sim_fpu_two): New constants.
1190 (sim_fpu_op1, sim_fpu_op2): New types.
1191 (struct _sim_fpu): Delete member result. Re-order other members.
1192 (sim_fpu_sign, sim_fpu_exp): New functions.
1193 (sim_fpu_max, sim_fpu_min): new functions.
1194 (EXPMAX32, EXPMAX64, NR_PAD32, NR_PAD64, NR_GUARDS32, NR_GUARDS64,
1195 NORMAL_EXPMAX32, NORMAL_EXPMAX64): Define.
1196
3910fb4a
DE
1197Tue Feb 24 22:45:39 1998 Doug Evans <devans@seba.cygnus.com>
1198
1199 * sim-profile.c (profile_print): Delete duplicate test of
1200 PROFILE_INSN_IDX.
1201 (profile_print_pc): Exit early if data collection not set up.
ab062d22
DE
1202 (profile_print_core): Simplify by calling sim_core_map_to_str.
1203 * sim-core.h (sim_core_map_to_str): Declare.
1204 * sim-core.c (sim_core_map_to_str): Make non-static.
3910fb4a 1205
b500809f
DE
1206 * genmloop.sh (engine_resume): Update insn_count before exiting.
1207 (engine_resume_full): Keep accurate core profile data.
1208
1209 * cgen-utils.c (sim_disassemble_insn): Don't use
1210 sim_core_read_aligned_N, it messes up profiling results.
1211
845a5917
MA
1212Mon Feb 23 20:45:57 1998 Mark Alexander <marka@cygnus.com>
1213
1214 * nltvals.def: Regenerate with MN10300 additions.
1215
d3e1d594
AC
1216Tue Feb 24 13:18:42 1998 Andrew Cagney <cagney@b1.cygnus.com>
1217
1218 * sim-trace.h (TRACE_ALU_RESULT2): Define.
1219
1220 * sim-trace.h, sim-trace.c (trace_result_word2,
1221 trace_input_word4, trace_result_word4): New function.
1222
36dbc8bb
DE
1223Mon Feb 23 13:08:35 1998 Doug Evans <devans@canuck.cygnus.com>
1224
93f34464
DE
1225 * cgen-sim.h (SEM_NEXT_PC): New arg `len'.
1226
36dbc8bb
DE
1227 * sim-xcat.h: Delete.
1228 * cgen-mem.h: Delete inclusion of sim-xcat.h.
1229 * cgen-sim.h: Ditto.
1230 * sim-alu.h: Replace sim-xcat.h with symcat.h.
1231 * sim-n-bits.h: Ditto.
1232 * sim-n-core.h: Ditto.
1233 * sim-n-endian.h: Ditto.
1234
3aeca462
MM
1235Mon Feb 23 13:19:58 1998 Michael Meissner <meissner@cygnus.com>
1236
1237 * syscall.c (cb_syscall): Handle short reads, and EOF.
1238
0325f2dc
AC
1239Tue Feb 24 00:29:57 1998 Andrew Cagney <cagney@b1.cygnus.com>
1240
1241 * sim-trace.c (print_data): case trace_fmt_fp missing break. Use
1242 sim_fpu to safely print fp_word values.
1243 (print_data): Add trace_fmt_bool and trace_fmt_addr.
1244 (trace_result_bool1, trace_result_addr1): New functions.
1245 (trace_input_bool1, trace_input_addr1): New functions.
1246
1247 * sim-trace.h (TRACE_FPU_*): Define.
1248
bdfe5c04
AC
1249Mon Feb 23 13:24:54 1998 Andrew Cagney <cagney@b1.cygnus.com>
1250
1251 * sim-fpu.h (enum sim_fpu_class): Add sim_fpu_class_denorm.
1252 (sim_fpu_fpto, sim_fpu_tofp): Define.
1253
9655c439
AC
1254Fri Feb 20 18:08:51 1998 Andrew Cagney <cagney@b1.cygnus.com>
1255
1256 * sim-fpu.c (sim_fpu_cmp): New function.
1257
1258Wed Feb 18 16:29:21 1998 Doug Evans <devans@canuck.cygnus.com>
1259
1260 * cgen-utils.h (sim_disassemble_insn): Use CGEN_INSN_BITSIZE
1261 instead of abuf->length.
1262 * sim-trace.c (trace_options): Have -t only trace a few useful things.
1263 (set_trace_option_mask): Renamed from set_trace_options.
1264 (set_trace_option): New function.
1265 (trace_option_handler): Update calls to set_trace_option{,_mask}.
1266 * sim-trace.h (TRACE_USEFUL_MASK): New macro.
1267
8dcc896d
AC
1268Wed Feb 18 12:42:15 1998 Andrew Cagney <cagney@b1.cygnus.com>
1269
1270 * sim-basics.h: Declare struct _sim_fpu.
1271
1272Tue Feb 17 16:27:46 1998 Andrew Cagney <cagney@b1.cygnus.com>
1273
1274 * sim-trace.h (TRACE_ALU_INPUT*, TRACE_ALU_RESULT): Define.
1275 (trace_prefix, trace_input*, trace_result*): Declare.
1276 (trace_one_insn): Change declaration, assume trace_prefix called.
1277 (trace_generic): Like trace_one_insn.
1278 (TRACE_ALU_IDX, TRACE_*_IDX): Change #define's to enum.
1279 (TRACE_alu, TRACE_[a-z]*): Update.
1280
1281 * sim-trace.c (trace_prefix, trace_input*, trace_result*,
1282 trace_insn, save_data, trace_idx_to_str, print_data): New
1283 functions.
1284 (trace_one_insn): Rewrite.
1285 (trace_generic): New function.
1286
4f071e30
DE
1287Tue Feb 17 17:27:30 1998 Doug Evans <devans@seba.cygnus.com>
1288
5bd0ca86
DE
1289 * Make-common.in (CGEN_MAIN_SCM): Update.
1290 * aclocal.m4 (USE_MAINTAINER_MODE): New variable.
1291
4f071e30
DE
1292 * cgen-sim.h (SEMANTIC_CACHE_FN): Delete.
1293 (SEMANTIC_FN): Rewrite declaration.
1294 (DECODE): Update type of semantic_fast member.
1295 ({EX,SEM}_FN_NAME): Have only one version.
1296 * cgen.sh: Support building cpu.c.
1297 * sim-base.h (sim_state_base): Delete conditionals surrounding
1298 member scache_size.
1299
e0deacd2
AC
1300Tue Feb 10 18:31:49 1998 Andrew Cagney <cagney@b1.cygnus.com>
1301
1302 * sim-load.c (sim_load_file): Print LMA/VMA according to value
1303 used.
1304
1305Tue Feb 10 14:56:23 1998 Ian Carmichael <iancarm@cygnus.com>
1306
1307 * sim-core.c: Add missing prototypes for WITH_DEVICES.
1308 Add missing parameters to device_io calls.
1309 * sim-core.h: Add missing parameters to device_io calls.
1310
dde54cb8
DE
1311Mon Feb 9 14:48:37 1998 Doug Evans <devans@canuck.cygnus.com>
1312
e61871ce 1313 * cgen-sim.h (DECODE): Always use switch for `read' for now.
6b373fab
DE
1314 (PAREXEC): Renamed from PARALLEL_EXEC. All uses updated.
1315 (SEMANTIC{,_CACHE}_FN): Fix return type.
e61871ce 1316 * cgen.sh (decode): Add s/@arch@/$arch/.
dde54cb8
DE
1317 * genmloop.sh (@cpu@_engine_run): Delete `current_state'.
1318 (engine_resume): Likewise. Make `engine' volatile. Save copy
e61871ce
DE
1319 of cpu pointer in volatile object. Initialize read switch if
1320 -parallel.
dde54cb8 1321
61b62559
DE
1322Thu Feb 5 13:27:04 1998 Doug Evans <devans@seba.cygnus.com>
1323
1324 * cgen-sim.h (EX_FN_NAME): _exc_ -> _ex_.
1325 (SEM_INSN): New macro.
1326
37379a25
AC
1327Tue Feb 3 16:31:56 1998 Andrew Cagney <cagney@b1.cygnus.com>
1328
1329 * sim-run.c (sim_engine_run): Assume IMEM is 32 bit.
1330
a97f304b
AC
1331Sun Feb 1 16:47:51 1998 Andrew Cagney <cagney@b1.cygnus.com>
1332
1333 * configure: Regenerated to track ../common/aclocal.m4 changes.
1334
1335Sun Feb 1 16:16:57 1998 Andrew Cagney <cagney@b1.cygnus.com>
1336
1337 * sim-types.h (fp_word): New type, define according to
1338 WITH_TARGET_FLOATING_POINT_BITSIZE.
1339
1340 * aclocal.m4 (default_sim_floating_point_bitsize): Add
1341 configuration of size of floating point registers.
1342
01737f42
AC
1343Sun Feb 1 14:02:31 1998 Andrew Cagney <cagney@b1.cygnus.com>
1344
1345 * sim-profile.c (profile_print): Only print CPU <N> if other
1346 output is going to appear.
1347
412c4e94
AC
1348Sat Jan 31 18:15:41 1998 Andrew Cagney <cagney@b1.cygnus.com>
1349
1350 * configure: Regenerated to track ../common/aclocal.m4 changes.
1351
1352Sat Jan 31 18:03:55 1998 Andrew Cagney <cagney@b1.cygnus.com>
1353
1354 * sim-types.h (address_word): Typedef according to
1355 WITH_TARGET_ADDRESS_BITSIZE.
1356 (signed_cell, unsigned_cell, natural_cell): Ditto using
1357 WITH_TARGET_CELL_BITSIZE.
1358
1359 * sim-config.h (WITH_TARGET_ADDRESS_BITSIZE): Define.
1360 (WITH_TARGET_CELL_BITSIZE): Define.
1361 (WITH_HOST_WORD_BITSIZE): Delete.
1362
1363 * sim-config.c (print_sim_config): Update.
1364
1365 * aclocal.m4 (SIM_AC_OPTION_BITSIZE): Add support for
1366 configuration of address and OpenFirmware cell sizes.
1367
9ec6741b
AC
1368Fri Jan 30 09:36:33 1998 Andrew Cagney <cagney@b1.cygnus.com>
1369
1370 * sim-engine.h (sim_engine_run): Add argument nr_cpus.
1371 * sim-run.c (sim_engine_run): Update.
1372
1373 * sim-engine.h (SIM_ENGINE_HALT_HOOK): Use SET_CPU_CIA instead of
1374 CPU_CIA.
1375 * sim-run.c (sim_engine_run): Ditto.
1376
1377 * sim-resume.c (sim_resume): Obtain nr_cpus from sim_engine.
1378 (sim_resume): Pass nr_cpus to sim_engine_run.
1379
1380 * sim-engine.h (struct _sim_engine): Add member nr_cpus.
1381
1382 * sim-engine.c (sim_engine_init): Hardwire nr_cpus to
1383 MAX_NR_PROCESSORS.
1384 (sim_engine_nr_cpus) sim-engine.c, sim-engine.h: New function
1385
7caebec6
DE
1386Thu Jan 29 12:13:01 1998 Doug Evans <devans@canuck.cygnus.com>
1387
1388 * cgen.sh: Portably read parms past $9.
1389
ed6f1471
DE
1390Fri Jan 23 14:20:54 1998 Doug Evans <devans@seba.cygnus.com>
1391
1392 * Make-common.in (stamp-tvals): New rule.
1393 (targ-vals.h,targ-map.c): Depend on it.
1394 (clean): Remove stamp-tvals.
1395
e9ae18ef
MM
1396Tue Jan 20 21:35:13 1998 Michael Meissner <meissner@cygnus.com>
1397
1398 * sim-utils.c (sim_state_alloc): #if 0 variable that is only used
1399 in code also #if 0'ed.
1400
462cfbc4
DE
1401Mon Jan 19 22:26:29 1998 Doug Evans <devans@seba>
1402
1403 * configure: Regenerated to track ../common/aclocal.m4 changes.
1404 * aclocal.m4: Recognize --enable-maintainer-mode.
1405
189e2694
DE
1406Mon Jan 19 12:45:45 1998 Doug Evans <devans@seba.cygnus.com>
1407
36de6f40 1408start-sanitize-cygnus
189e2694
DE
1409 * Make-common.in (cgen-{arch,cpu,decode}): New targets.
1410 * cgen.sh: New file.
36de6f40 1411end-sanitize-cygnus
189e2694 1412 * cgen-scache.h: Deleted.
4a44afd5 1413 * Make-common.in (cgen-run.o,cgen-scache.o): Delete cgen-scache.h dep.
462cfbc4 1414 (CGEN_CPU_SCM): Add sim-model.scm.
189e2694
DE
1415 * cgen-scache.c: Only compile contents if WITH_SCACHE.
1416 (scache_init): Use runtime computed size of SCACHE.
1417 (scache_flush): Likewise.
1418 * cgen-mem.h (GETIMEMU[QHSD]I): Declare.
1419 ([GS]ETT{QI,UQI,HI,UHI,SI,USI,DI,UDI}): Declare.
1420 * cgen-sim.h: Scache support moved here.
1421 (PC): Redo definition.
1422 (ARGBUF,SCACHE,PARALLEL_EXEC): Provide forward decls.
1423 (DECODE): Add parallel execution support.
1424 Only include semantic label members if using switch.
1425 (SWITCH,CASE,BREAK,DEFAULT,ENDSWITCH): Portable computed goto support.
1426 (CGEN_CPU): Delete members exec_state, halt_sigrc, halt_jmp_buf.
1427 (IADDR,CIA,SEM_ARG,EX_FN_NAME,SEM_FN_NAME,RECORD_IADDR,SEM_ARGBUF,
1428 SEM_NEXT_PC,SEM_BRANCH_VIA_{CACHE,ADDR},SEM_NEW_PC_ADDR): Moved here
1429 from cgen-types.h.
1430 (engine_{stop,run,resume,halt,signal}): Delete decls.
1431 * cgen-types.h (CGEN_{XCAT3,CAT3}): Delete.
1432 (argbuf,scache): Delete forward decls.
1433 (STATE): Delete decl.
1434 * cgen-utils.c: Don't include decode.h, mem-ops.h, sem-ops.h.
1435 Include cgen-mem.h, cgen-ops.h.
1436 (engine_halt,engine_signal): Delete.
1437 ({ex,exc,sem,semc}_illegal): Delete.
1438 (sim_disassemble_insn): Result of extract fn is in bits.
1439 * genmloop.sh: Rewrite.
1440
1441 * cgen-trace.c (trace_insn): Set printed_result_p=0 if not tracing
1442 line numbers.
1443
1444 * sim-base.h (sim_state_base): Delete member `model'.
1445 (sim_cpu_base): Add member `model'.
1446 * sim-model.h (IMP_PROPERTIES): New type.
1447 (MACH): New members imp_props, models.
1448 (models): Delete decl.
1449 * sim-model.c (set_model): Update.
1450 * sim-profile.c (profile_print_model): Update.
1451
1452 * sim-utils.c (sim_state_alloc): Delete setting of cpu backlink here.
1453
ef13d3e3
NC
1454Fri Jan 16 12:33:09 1998 Nick Clifton <nickc@cygnus.com>
1455
1456 * cgen-trace.c (trace_insn): Call CGEN_INSN_MNEMONIC() rather than
1457 CGEN_INSN_SYNTAX().
1458
1459Mon Dec 15 23:17:11 1997 Andrew Cagney <cagney@b1.cygnus.com>
1460
1461 * configure: Regenerated to track ../common/aclocal.m4 changes.
1462 * config.in: Ditto.
1463
1464Mon Dec 15 23:16:03 1997 Andrew Cagney <cagney@b1.cygnus.com>
1465
1466 * aclocal.m4 (AR): Check for sigaction.
1467
6e51f990
DE
1468Thu Dec 4 09:21:05 1997 Doug Evans <devans@canuck.cygnus.com>
1469
9bb68e20
DE
1470 * Make-common.in (sim-core.o): Depend on $(sim_main_headers).
1471
1472 * sim-config.h (WITH_TREE_PROPERTIES): Define as 0.
1473 * sim-config.c (sim_config): Replace WITH_DEVICES with
1474 WITH_TREE_PROPERTIES.
1475
6e51f990
DE
1476 * configure: Regenerated to track ../common/aclocal.m4 changes.
1477
22469a10
DE
1478Wed Dec 3 17:56:02 1997 Doug Evans <devans@canuck.cygnus.com>
1479
1480 * Make-common.in (SIM_ENVIRONMENT): New variable.
1481 (CONFIG_CFLAGS): Add it.
1482 * aclocal.m4 (SIM_AC_OPTION_ENVIRONMENT): Handle
1483 --enable-sim-environment option.
1484 * configure: Regenerated.
1485 * sim-config.h (environment support): Rewrite.
1486 * sim-config.c (current_environment): Define as enum, unconditionally.
1487 (current_alignment): Define unconditionally.
1488 (config_environment_to_a): Update.
1489 (config_alignment_to_a): Fix type of argument. Define unconditionally.
1490 (sim_config): Handle environment and alignment determination
1491 unconditionally. Delete sanity checks of current_environment,
1492 unnecessary.
1493 (print_sim_config): Update.
1494 * sim-options.c (STANDARD_OPTIONS enum): Add OPTION_ENVIRONMENT.
1495 (standard_options): Add --environment.
1496 (standard_option_handler): Likewise.
1497
1498Fri Nov 28 12:21:25 1997 Andrew Cagney <cagney@b1.cygnus.com>
1499
1500 * sim-alu.h: Add notes on carry vs borrow for subtraction.
1501 (ALU{,8,16,32,64}ADD): Redefine ADD macro as add overflowing.
1502 (ALU{,8,16,32,64}ADDC): Define - add carrying.
1503 (ALU{,8,16,32,64}SUB): Redefine SUB macro as subtract overflowing.
1504 (ALU{,8,16,32,64}SUBB): Define - subtract borrowing.
1505 (ALU{,8,16,32,64}SUBC): Define - tract carrying.
1506 (ALU{,8,16,32,64}ADD_CA, ALU{,8,16,32,64}ADDC_C): Replace single
1507 argument ADD_CA macro with two argument ADDC_C - add carrying with
1508 carry in.
1509 (ALU{,8,16,32,64}SUB_CA, ALU{,8,16,32,64}SUBC_X): Replace single
1510 argument SUB_CA macro with two argument SUBC_X - subtract
1511 carrying, extended.
1512 (ALU{,8,16,32,64}SUBB_B): Define - subtract borrowing with
1513 borrow-in.
1514 (ALU{,8,16,32,64}NEGC, ALU{,8,16,32,64}NEGB): Define.
1515
97b25f99
MM
1516Sun Nov 30 17:40:57 1997 Michael Meissner <meissner@cygnus.com>
1517
1518 * sim-io.c (sim_io_{syscalls,getstring}): Delete. No longer used.
1519 * sim-io.h (sim_io_syscalls): Delete.
1520
465db791
MM
1521Fri Nov 28 20:10:09 1997 Michael Meissner <meissner@cygnus.com>
1522
f2907f74
MM
1523 * syscall.c (cb_syscall): Add missing else, so write to stdout
1524 isn't doubled.
1525
465db791
MM
1526 * sim-alu.h (ALU{,8,16,32,64}_SET_CARRY): Provide macros to import
1527 the carry bit from the CPU's psw.
1528
1294727e
DE
1529Fri Nov 28 11:15:05 1997 Doug Evans <devans@canuck.cygnus.com>
1530
ef13d3e3 1531 * gennltvals.sh: Redo syscall support.
1294727e
DE
1532 * nltvals.def: Regenerated.
1533
ac070413
MM
1534Wed Nov 26 16:49:38 1997 Michael Meissner <meissner@cygnus.com>
1535
1536 * syscall.c (cb_syscall): If writing to stdout or stderr, flush
1537 the stream immediately.
1538
3885125c
AC
1539Wed Nov 26 12:32:11 1997 Andrew Cagney <cagney@b1.cygnus.com>
1540
1541 * sim-io.c (sim_io_getstring): Delete unused len2.
1542 (sim_io_syscalls): Ditto for sys_errno.
1543
fc63d75a
DE
1544Wed Nov 26 11:18:40 1997 Doug Evans <devans@canuck.cygnus.com>
1545
4123aca8 1546 * syscall.c (cb_syscall): Test CB_SYSCALL struct magic number.
fc63d75a 1547
6be03509
DE
1548 * Make-common.in (run.o): Depend on remote-sim.h.
1549 (nrun.o,sim-hload.o,sim-hrw.o): Likewise.
1550 (sim-io.o,sim-reason.o,sim-resume.o): Likewise.
1551
69628a60
MM
1552Tue Nov 25 20:12:46 1997 Michael Meissner <meissner@cygnus.com>
1553
1554 * sim-io.c (sim_io_syscalls): Disable lseek.
1555
c76e6683
DE
1556Tue Nov 25 00:12:38 1997 Doug Evans <devans@seba.cygnus.com>
1557
1558 * gennltvals.sh: Generate syscall values for d30v.
965f5327 1559
1294727e 1560 * gennltvals.sh: Use libgloss/syscall.h for sparc.
c76e6683
DE
1561 * nltvals.def: Regenerate.
1562
f3367306
DE
1563 * callback.c (os_stat): Make 3rd arg a host struct stat ptr.
1564 (os_fstat): Likewise. Validate fd argument.
1565 (cb_host_to_target_stat): Delete big_p arg. If HS arg is NULL,
1566 just compute target stat struct length.
1567 * syscall.c: #include "libiberty.h", <sys/types.h>, <sys/stat.h>.
1568 (ENOSYS,ENAMETOOLONG): Provide definitions if missing.
1569 (get_string): Return host errno values so they can be properly
1570 translated later.
1571 (cb_syscall): Likewise.
1572 (cb_syscall, cases open,unlink): Use get_path instead of get_string.
1573 (cb_syscall, case read): Use read_stdin for file descriptor 0.
1574 (cb_syscall, case write): Use write_stderr for file descriptor 2.
1575 (cb_syscall): Add cases for lseek, unlink, stat, fstat, time.
1576 (get_path): New function.
1577
3445e1ce
MM
1578Mon Nov 24 18:56:07 1997 Michael Meissner <meissner@cygnus.com>
1579
1580 * sim-io.c (sim_io_syscalls): New function to provide system call
1581 emulation. Provide exit, open, close, read, write, lseek, and
1582 unlink.
1583 (sim_io_getstring): New function to return a string from a
1584 simulated memory location.
1585
1586 * sim-io.h (sim_io_syscalls): Add declaration.
1587
f2ea8913
DE
1588Mon Nov 24 12:09:59 1997 Doug Evans <devans@seba.cygnus.com>
1589
1590 * sim-core.c (sim_core_signal): Fix spelling error in message.
1591
1592 * sim-hrw.c (sim_read): Use read map, not write map.
1593
f375dd7d
DE
1594 * Make-common.in (all): Add .gdbinit.
1595 * gdbinit.in: Add dump command.
1596
4b5545c9
DE
1597 * sim-model.c (model_options): Use '\0' for `shortopt'.
1598
091521c4
DE
1599 * sim-trace.c (trace_option_handler): Set state trace file
1600 for --trace-file in addition to cpu's values.
1601 (trace_vprintf): If cpu == NULL, try state's trace file.
c76e6683 1602 (trace_options): Reorganize table, reword some descriptions.
8f3cfc0e 1603
4ba8d09f
AC
1604Sun Nov 23 10:57:00 1997 Andrew Cagney <cagney@b1.cygnus.com>
1605
1606 * sim-fpu.c (sim_fpu_abs, sim_fpu_neg, sim_fpu_inv), sim-fpu.h:
1607 New functions.
1608
aaa11abe
AC
1609Sat Nov 22 19:16:54 1997 Andrew Cagney <cagney@b1.cygnus.com>
1610
4ba8d09f 1611 * sim-reason.c (sim_stop_reason): For sim_signalled, return the
aaa11abe
AC
1612 signal untranslated, document problem with this.
1613
1614 * nrun.c (main): Check for a prog name of `*step'. If present,
1615 step the simulator instead of allowing it to run free.
1616
1617 * sim-signal.c (SIGQUIT): Define on _MSC_VER hosts.
1618
1619 * Make-common.in (sim_main_headers): Add sim-signal.h.
1620
a1cf18dc
AC
1621Fri Nov 21 09:32:32 1997 Andrew Cagney <cagney@b1.cygnus.com>
1622
1623 * sim-signal.c (sim_signal_to_host): Return 0 for SIM_SIGNONE.
1624
232156de
AC
1625Thu Nov 20 20:35:20 1997 Andrew Cagney <cagney@b1.cygnus.com>
1626
1627 * sim-signal.h: Start simulator signals at 64 so that host signal
1628 numbers can be detected and reported.
1629
1630 * sim-signal.h (SIM_SIGFPE), sim-signal.h: Add signal.
1631
398057b7
DE
1632Wed Nov 19 12:02:41 1997 Doug Evans <devans@seba.cygnus.com>
1633
ac1d2660
DE
1634 * callback.c (cb_host_to_target_stat): Fix return values.
1635
998d2c82
DE
1636 * cgen-sim.h (enum_signal_type): Delete.
1637 (engine_signal): Update prototype.
1638 * cgen-utils.c: Don't include <signal.h>.
1639 (sim_signal_to_host): Delete, lives in sim-signal.c now.
1640 (engine_signal): Update.
1641
398057b7
DE
1642 * sim-utils.c (sim_state_alloc): Call SIM_STATE_ALLOC if defined.
1643 (sim_state_free): Call SIM_STATE_FREE if defined.
1644
1645 * sim-module.c (sim_module_install): Don't leave any modules
1646 installed if one fails to install.
1647
eb5f3fcd
MM
1648Wed Nov 19 13:25:48 1997 Michael Meissner <meissner@cygnus.com>
1649
e163bbbf
MM
1650 * sim-options.c: Don't include ../libiberty/alloca-conf.h any
1651 more, since alloca is not used in this file.
1652
eb5f3fcd
MM
1653 * sim-alu.h (ALU{32,64}_*): Rewrite 32 and 64 bit ALU support to
1654 correctly set the carry and overflow bits for those types.
1655 (ALU{8,16,32,64}_{ADD,SUB}_CA): Take VAL argument to add along
1656 with carry, so carry is correct after doing both adds.
1657 (ALU*): Space out '\' to make it easier to read.
1658
e5ce1670
DE
1659Tue Nov 18 15:53:45 1997 Doug Evans <devans@canuck.cygnus.com>
1660
a4b44a2b
DE
1661 * sim-core.c (sim_core_signal): Use sim_stopped instead of
1662 sim_signalled.
1663
1ebc7e0e
DE
1664 * sim-signal.c, sim-signal.h: New files.
1665 * Make-common.in (sim-signal.o): Add rule for.
1666 (SIM_NEW_COMMON_OBJS): Add sim-signal.o.
1667 * sim-abort.c: Don't include <signal.h>.
1668 * sim-basics.h: #include "sim-signal.h".
1669 * sim-break.c: Don't include <signal.h>.
1670 (sim_handle_breakpoint): Replace SIGTRAP with SIM_SIGTRAP.
1671 * sim-core.c: Don't include <signal.h>.
1672 (SIGBUS): Delete definition.
1673 (sim_core_signal): Replace SIGSEGV,SIGBUS with SIM_SIGSEGV,SIM_SIGBUS.
1674 * sim-engine.c: Don't include <signal.h>.
1675 (sim_engine_abort): Replace SIGABRT with SIM_SIGABRT.
1676 * sim-reason.c (sim_stop_reason): Call sim_signal_to_host.
1677 * sim-resume.c: Don't include <signal.h>.
1678 (SIGTRAP): Delete definition.
1679 (has_stepped): Replace SIGTRAP with SIM_SIGTRAP.
1680 * sim-stop.c: Don't include <signal.h>.
1681 (control_c_simulation): Replace SIGINT with SIM_SIGINT.
1682 * sim-watch.c: Don't include <signal.h>.
1683 (handle_watchpoint): Replace SIGINT with SIM_SIGINT.
1684
e5ce1670
DE
1685 * Make-common.in (SIM_NEW_COMMON_OBJS): New variable.
1686
1687 * sim-base.h (CIA_ADDR): Provide default definition.
340d8e20 1688 * sim-core.c (sim_core_signal): Use CIA_ADDR to fetch value.
13c9499d 1689 * sim-break.c (sim_handle_breakpoint): Likewise.
e5ce1670 1690
f7abc1ca
DE
1691Mon Nov 17 14:15:31 1997 Doug Evans <devans@seba.cygnus.com>
1692
38377b3a
DE
1693 * Make-common.in (srccom): New variable.
1694
f7abc1ca
DE
1695 * Make-common.in (DEP, COMMON_DEP_CFLAGS): Define.
1696 (LIB_OBJS): Add syscall.o.
1697 (gentmap): Pass $(NL_TARGET) to $(CC).
1698 (syscall.o): Add rule for.
1699 (sim_main_headers): Add $(SIM_EXTRA_DEPS).
1700 (sim-bits.o): Depend on $(sim-n-bits_h).
1701 (sim-load.o): Depend on callback.h.
1702
1703 * Make-common.in (cgen-*.o): Update dependencies, mem-ops.h renamed to
1704 cgen-mem.h, sem-ops.h renamed to cgen-ops.h.
1705 * cgen-mem.h, cgen-ops.h: New files.
1706
1707 * aclocal.m4 (--enable-sim-scache): Pass -DWITH_SCACHE=0 for "=no".
1708
1709 * Makefile.in (nltvals.def): Depend on gennltvals.sh.
1710 Rewrite build rule.
1711 * callback.c: #include string.h or strings.h.
1712 #include sys/types.h and sys/stat.h.
1713 (cb_init_syscall_map,cb_init_errno_map,cb_init_open_map): Declare.
f7abc1ca
DE
1714 (os_get_errno,os_open): Update.
1715 (os_stat,os_fstat): New functions.
1716 (os_init): Initialize syscall_map, errno_map, open_map.
1717 (default_callback): Add entries for os_stat, os_fstat, syscall_map,
1718 errno_map, open_map, signal_map, stat_map.
1719 (cb_read_target_syscall_maps): New function.
1720 (cb_target_to_host_syscall): New function.
1721 (cb_host_to_target_errno): Renamed from host_to_target_errno.
1722 (cb_target_to_host_open): Renamed from target_to_host_open.
1723 (store): New function.
1724 (cb_host_to_target_stat): New function.
1725 * syscall.c: New file.
1726 * gentmap.c (sys_tdefs): New global.
1727 (gen_targ_vals_h): Output target syscall numbers.
1728 (gen_targ_map_c): Update. Output target syscall translation map.
1729 * gentvals.sh: New first argument `target'. Preface table with
1730 #ifdef NL_TARGET_$target if non-null target passed.
1731 * gennltvals.sh: New file.
1732 * nltvals.def: Regenerated.
1733
1734Fri Nov 14 11:33:34 1997 Andrew Cagney <cagney@b1.cygnus.com>
1735
1736 * sim-n-core.h (sim_core_read_unaligned_N): Return static
1737 sim_core_dummy_M.
1738 (sim_core_dummy_M): Declare.
1739
1740Wed Nov 12 18:16:15 1997 Andrew Cagney <cagney@b1.cygnus.com>
1741
1742 * sim-core.c (sim_core_signal): Print the address of the
1743 instruction.
1744
9e8a900a
DE
1745Thu Nov 13 11:49:41 1997 Doug Evans <devans@seba.cygnus.com>
1746
1747 * sim-base.h (sim_state_base): Move `magic' to end of struct.
1748
1749 * sim-base.h (sim_state_base): Add member trace_data.
1750 (STATE_TRACE_DATA): New macro.
1751 * sim-trace.h (TRACE_DEBUG_IDX,TRACE_debug): New macros.
1752 ({WITH_,}TRACE_DEBUG_P): New macros.
1753 (STATE_TRACE_FLAGS,STRACE_P,STRACE_DEBUG_P): New macros.
1754 (_sim_cpu): Delete forward reference.
1755 (debug_printf): Update.
1756 * sim-trace.c (OPTION_TRACE_DEBUG): Define.
1757 (trace_options): Add --trace-debug.
1758 (set_trace_options): Handle it.
1759 (trace_option_handler): Likewise.
1760 (trace_install): Init state trace_data struct.
1761 (trace_uninstall): Close state trace file.
1762 * sim-events.c (ETRACE): Only print source file and line number if
1763 --trace-debug.
1764 * sim-n-core.h (sim_core_trace_M): Likewise.
1765
1766 * sim-core.c (sim_core_signal): Add missing "\n" in message.
1767
c7e3f734
FL
17681997-11-13 Felix Lee <flee@cygnus.com>
1769
1770 * sim-n-core.h (sim_core_read_unaligned_N): illegal empty
1771 initializer.
1772 * sim-types.h (unsigned128,signed128): fix typo for MSVC.
1773
15f5035c
DE
1774Wed Nov 12 12:18:08 1997 Doug Evans <devans@canuck.cygnus.com>
1775
1776 * aclocal.m4 (SIM_AC_OPTION_SCACHE): Fix typo.
1777
5dcf955d
DE
1778 * Make-common.in (BUILT_SRC_FROM_COMMON): Remove files no longer
1779 built this way.
1780 (sim-config.o): Remove non-existent $(sim-nconfig_h) dependency.
1781 (clean): Don't delete $(BUILT_SRC_FROM_COMMON) if building in
1782 source tree.
1783
f445a890
AC
1784Tue Nov 11 13:28:02 1997 Andrew Cagney <cagney@b1.cygnus.com>
1785
1786 * sim-events.c (sim_events_process): Re-compute the time -
1787 update_time_from_event - as each event is processed. Reverses
1788 previous change.
1789
8cb060b6
AC
1790Fri Nov 7 00:37:36 1997 Andrew Cagney <cagney@b1.cygnus.com>
1791
1792 * callback.c (os_poll_quit): Replace _WIN32 with _MSC_VER.
1793
549bf950
AC
1794Fri Nov 7 00:37:36 1997 Andrew Cagney <cagney@b1.cygnus.com>
1795
1796 * sim-events.c (sim_events_process): Delete redundant call to
1797 update_time_from_event.
1798 (sim_events_slip): Always decrement time_from_event.
1799 (sim_events_tick, sim_events_deschedule, update_time_from_event):
1800 Delete assertion that time_from_event >=0 when work in queue, no
1801 longer applicable.
1802
864519b9
AC
1803Thu Nov 6 12:06:46 1997 Andrew Cagney <cagney@b1.cygnus.com>
1804
1805 * sim-options.c (STANDARD_OPTIONS): Change OPTION_* to an enum.
1806 (standard_option_handler): Update.
1807
1808 * sim-options.h: Clarify documentation.
1809 (OPTION_LONG_ONLY_P): Delete definition.
1810 (OPTION_VALID_P): Define.
1811
1812 * sim-options.c (sim_print_help): Allow short only options.
1813 (sim_parse_args): Ditto.
1814 (sim_args_command): Skip short only options.
1815 (sim_parse_args): Allocate space for NUM_OPTS not just 256. Make
1816 separate entries for short and long options in the HANDLERS and
1817 ORIG_VAL tables.
1818 (sim_parse_args): Disable argument permutation.
1819
63be8feb
AC
1820Wed Nov 5 13:40:31 1997 Andrew Cagney <cagney@b1.cygnus.com>
1821
1822 * sim-core.h (DECLARE_SIM_CORE_WRITE_N. DECLARE_SIM_CORE_READ_N):
1823 Add argument M, size of data type.
1824 (sim_core_read_misaligned_3, sim_core_write_misaligned_3):
1825 Declare, ditto for 5, 6 & 7 byte transfers.
1826 (sim_core_write_unaligned_1, sim_core_write_unaligned_1): Define
1827 as aligned variant.
1828
1829 * sim-n-core.h (sim_core_trace_M): Rename from
1830 sim_core_trace_N. Add nr_bytes argument. Replace transfer argument
1831 with transfer type. Print transfer direction. Handle 1 and 2 byte
1832 transfers.
1833 (sim_core_read_unaligned_N, sim_core_write_unaligned_N): Trace
1834 unaligned accesses.
1835 (unsigned_M, T2H_M, H2T_M): Rename from unsigned_N, T2H_N, H2T_N.
1836 Update all functions.
1837
1838 * sim-core.c: Generate functions starting with 16 not 1.
1839 (sim_core_read_unaligned_3): Generate. Ditto for 3 byte write and
1840 all 5, 6 & 7 byte transfers.
1841
1842 * sim-n-core.h (sim_core_read_misaligned_N,
1843 sim_core_write_misaligned_N): Implement.
1844
a26ecda4
AC
1845Mon Nov 3 15:03:04 1997 Andrew Cagney <cagney@b1.cygnus.com>
1846
1847 * sim-endian.h (U16_8): Implement
1848
1849 * sim-endian.c (sim_endian_split_16, sim_endian_join_16): New functions
1850
1851 * sim-endian.h (VL8_16, VH8_16): Implement.
1852
1853 * sim-memopt.c (memory_option_handler): Typecast 64bit value to
1854 long in printf.
1855 (memory_option_handler): Only zalloc modulo bytes when non-zero.
1856 (memory_option_handler): Skip comma in alias address list
1857
fcc86d82
AC
1858Fri Oct 31 13:03:33 1997 Andrew Cagney <cagney@b1.cygnus.com>
1859
1860 * sim-memopt.c (do_memopt_add, do_memopt_delete): Add level and
1861 space params.
1862 (parse_size, parse_addr): New functions
1863 (memory_option_handler, memory_options): Parse address & size
1864 using new functions. Pass level, space, modulo to do_memopt_add &
1865 do_memopt_del.
1866
1867 * sim-memopt.h (struct _sim_memopt): Add level & space fields.
1868
1869 * sim-core.h (sim_core_arrach, sim_core_detach): Replace
1870 `attach_type attach' argument with `unsigned level' argument.
1871 Document.
1872
1873 * sim-core.c (new_sim_core_mapping, sim_core_map_attach,
1874 sim_core_attach): Replace argument attach with level. Update
1875 verification of arguments.
1876 (sim_core_map_detach, sim_core_detach): Replace argument attach
1877 with level.
1878
1879 * sim-basics.h (enum _attach_type): Delete.
1880
d048b52d
DE
1881Thu Oct 30 13:45:00 1997 Doug Evans <devans@seba.cygnus.com>
1882
1883 * sim-core.h (sim_core_write_8): Define.
1884
a86809d3
AC
1885Tue Oct 28 12:29:22 1997 Andrew Cagney <cagney@b1.cygnus.com>
1886
01b9cd49
AC
1887 * sim-bits.h: Document ROTn macro.
1888
89d09738
AC
1889 * sim-endian.h (H2T): Handle 16 byte variables.
1890
1891 * sim-n-core.h (sim_core_read_unaligned_N): Return a dummy when an
1892 error.
1893
a86809d3
AC
1894 * sim-core.c: Do not generate sim_core_*_word.
1895
1896 * sim-n-core.h (sim_core_trace_N): Add line_nr argument.
1897 (sim_core_write_aligned_N, sim_core_read_aligned_N): Update.
1898
1899 * sim-core.h (sim_core_read_unaligned_word,
1900 sim_core_read_aligned_word, sim_core_read_word,
1901 sim_core_write_unaligned_word, sim_core_write_aligned_word,
1902 sim_core_write_word): Change to macros that map onto sim_core_*_N.
1903
374b95c1
DE
1904Mon Oct 27 11:25:10 1997 Doug Evans <devans@canuck.cygnus.com>
1905
1906 * sim-n-endian.h: Add TAGS entrys for 16 byte versions.
1907
c3e3e4ad
DE
1908 * sim-endian.h: Disable 16 byte support.
1909
f45dd42b
AC
1910Mon Oct 27 12:00:48 1997 Andrew Cagney <cagney@b1.cygnus.com>
1911
1912 * sim-endian.c (_SWAP_16): Define. Generate 126 bit swap code.
1913
1914 * sim-n-core.h (sim_core_trace_N): New function.
1915 (sim_core_read_aligned_N, sim_core_write_aligned_N): Use,
1916 (sim_core_read_unaligned_N): Do not retyrn bogus value wden error.
1917
1918 * sim-endian.h: Add 128 bit variant.
1919
1920 * sim-core.h, sim-core.c: Add 128 bit variant.
1921
1922 * sim-types.h: Add signed128 and unsigned128 types using a struct.
1923
4a203fba
AC
1924Fri Oct 24 11:33:07 1997 Andrew Cagney <cagney@b1.cygnus.com>
1925
1926 * sim-events.c (sim_events_process): Clear events->work_pending.
1927 (sim_events_tickn, sim_events_tick): Accumulate, instead of
1928 setting, nr_ticks_to_process.
1929 (sim_events_preprocess): Allow nr_ticks_to_process to be non-zero
1930 when the event queue isn't next.
1931
1932 * sim-events.h, sim-events.c (sim_events_slip): New function.
1933
9e03a68f
AC
1934Wed Oct 22 14:18:38 1997 Andrew Cagney <cagney@b1.cygnus.com>
1935
1936 * sim-hload.c (sim_load): Pass lma_p==0 and do_load=sim_load.
1937
1938 * sim-utils.h, sim-load.c (sim_load_file): Add lma_p and do_load
1939 arguments.
1940
897a1d78
DE
1941Tue Oct 21 18:37:57 1997 Doug Evans <devans@canuck.cygnus.com>
1942
1943 * nrun.c (main): Remove useless test of name != NULL.
2328ef1c 1944 Exit if bfd_openr fails. Call bfd_check_format after bfd_openr.
897a1d78 1945
b7432f0f
AC
1946Tue Oct 21 10:42:38 1997 Andrew Cagney <cagney@b1.cygnus.com>
1947
1948 * sim-fpu.c (EXPMAX): Type is unsigned.
1949 (MIN_INT, MAX_INT): Type is signed64.
1950 (i2fpu): Type of val is signed64.
1951
e2f8ffb7
AC
1952Tue Oct 21 10:42:38 1997 Andrew Cagney <cagney@b1.cygnus.com>
1953
1954 * sim-profile.h (PROFILE_PC_BUCKET_SIZE): Treat a shift of zero as
1955 a bucket size of zero.
1956
1957 * sim-profile.c (OPTION_PROFILE_PC_GRANULARITY,
1958 OPTION_PROFILE_PC): Define.
1959 (profile_option_handler): Add support for --profile-pc and
1960 --profile-pc-granularity options.
1961 (profile_pc_init): When possible, compute nr buckets from bucket
1962 size.
1963
1964 * sim-profile.c (profile_pc_init): Align the profile-pc end
1965 address with the profile-pc bucket size.
1966
1967 * sim-profile.h (PROFILE_PC_NR_BUCKETS): Rename PROFILE_PC_SIZE to
1968 something less ambiguous.
1969 (PROFILE_PC_BUCKET_SIZE): Ditto for PROFILE_PC_SAMPLE_SIZE.
1970
1971 * sim-profile.c (profile_pc_cleanup): New function. Move
1972 profile_pc_uninstall code to here.
1973 (profile_pc_uninstall): Call.
1974 (profile_pc_init): Call.
1975
293a0876
AC
1976Mon Oct 20 17:23:58 1997 Andrew Cagney <cagney@b1.cygnus.com>
1977
e2f8ffb7
AC
1978 * sim-profile.c (profile_print_pc): Dump pc profile to dmon.out
1979 file using BSD gprof format.
1980
293a0876
AC
1981 * sim-bits.h (LSBIT, MSBIT, BIT): Force result to type
1982 unsigned_word.
1983 (LSBIT8, LSBIT16, LSBIT32, LSBIT64, MSBIT8, MSBIT16, MSBIT32,
1984 MSBIT64): Force result to unsignedN.
1985
0a0ecb21
AC
1986Thu Oct 16 11:38:56 1997 Andrew Cagney <cagney@b1.cygnus.com>
1987
1988 * sim-alu.h (ALU16_BEGIN, ALU32_BEGIN, ALU64_BEGIN): Drop opening
1989 brace from macro.
1990 (ALU8_BEGIN, ALU8_SET, ALU8_ADD, ALU8_SUB, ALU8_NEGATE): Define.
1991 (ALU16_ADD, ALU16_SUB, ALU16_NEGATE): Simplify arrithmetic.
1992 (ALU32_ADD, ALU32_SUB, ALU32_NEGATE): Simplify arrithmetic.
1993 (ALU64_ADD, ALU64_SUB, ALU64_NEGATE): Simplify arrithmetic.
1994
fd89abc2
AC
1995Wed Oct 15 09:24:19 1997 Andrew Cagney <cagney@b1.cygnus.com>
1996
1997 * sim-core.h (struct _sim_core_mapping): Change free_buffer to
1998 type void*.
1999
2000 * sim-core.c (sim_core_uninstall, new_sim_core_mapping,
2001 sim_core_map_attach, sim_core_map_detach): Change free_buffer to
2002 type void*.
2003 (sim_core_attach): Rename buffer_freed to free_buffer, type
2004 void*. Ensure that allocated buffer is alligned according to
2005 region's address.
2006
7456a10d
AC
2007Mon Oct 13 11:34:50 1997 Andrew Cagney <cagney@b1.cygnus.com>
2008
2009 * sim-alu.h (ALU64_HAD_OVERFLOW): Define.
2010 (ALU64_SUB): Define.
2011
2012 * Make-common.in (all): Build SIM_EXTRA_ALL first.
2013 (.gdbinit): Remove dependencies, generate once per build.
2014
1b217de0
AC
2015Tue Oct 14 19:20:09 1997 Andrew Cagney <cagney@b1.cygnus.com>
2016
2017 * sim-n-core.h (sim_core_read_aligned_N,
2018 sim_core_write_aligned_N): Make xaddr param type address_word not
2019 unsigned_word.
2020
2021Fri Oct 3 09:49:18 1997 Andrew Cagney <cagney@b1.cygnus.com>
2022
2023 * sim-fpu.h, sim-fpu.c: Rewrite. Change sim_fpu object to an
2024 unpacked floating point struct. Pass sim_fpu object by reference.
2025 Add preliminary support for rounding modes.
2026
63fe2cc7
AC
2027Fri Oct 3 09:28:00 1997 Andrew Cagney <cagney@b1.cygnus.com>
2028
2029 * configure: Regenerated to track ../common/aclocal.m4 changes.
2030
2031Thu Oct 2 19:43:52 1997 Andrew Cagney <cagney@b1.cygnus.com>
2032
2033 * aclocal.m4 (sim-bitsize): Fix typo, WITH_TARGET_WORD_BITSIZE not
2034 WITH_TARGET_BITSIZE.
2035
2036Thu Sep 25 23:20:20 1997 Felix Lee <flee@yin.cygnus.com>
2037
2038 * sim-profile.c (profile_print_core): label needs empty statement.
2039
2040Thu Sep 25 11:20:47 1997 Stu Grossman <grossman@babylon-5.cygnus.com>
2041
2042 * sim-break.c (sim_set_breakpoint sim_clear_breakpoint): Use ZALLOC
2043 and zfree instead of xmalloc and free. Prevents warnings.
2044
af51b8d5
AC
2045Wed Sep 24 17:38:57 1997 Andrew Cagney <cagney@b1.cygnus.com>
2046
2047 * configure: Regenerated to track ../common/aclocal.m4 changes.
2048
2049Wed Sep 24 17:23:31 1997 Andrew Cagney <cagney@b1.cygnus.com>
2050
2051 * Make-common.in (SIM_BITSIZE): Assign from configured value.
2052 (CONFIG_CFLAGS): Add SIM_BITSIZE.
2053
2054 * aclocal.m4 (--enable-sim-bitsize): Developer option for
2055 controling the bitsize/msb of the target.
2056
b9d580a4
SG
2057Wed Sep 24 17:41:40 1997 Stu Grossman <grossman@babylon-5.cygnus.com>
2058
2059 * Make-common.in: New files sim-break.c, sim-break.h.
2060 * sim-base.h: Add point to breakpoint list to sim_state_base.
2061 * sim-break.c sim-break.h: New modules that implement intrinsic
2062 breakpoint support.
2063 * sim-module.c: Add breakpoint module.
2064
34d07b78
FL
2065Tue Sep 23 00:26:39 1997 Felix Lee <flee@yin.cygnus.com>
2066
2067 * sim-events.c (SIM_EVENTS_POLL_RATE): poll more often than once
2068 an hour.
2069 * sim-n-core.h (WITH_XOR_ENDIAN): MSVC barfs on
2070 if (0) { 1 % 0; }
2071 * sim-core.c (sim_core_xor_write_buffer): WITH_XOR_ENDIAN + 1.
2072 (SIGBUS) define for Windows.
2073 * sim-trace.c (trace_printf,debug_printf): added ALMOST_STDC.
2074 * sim-resume.c: define SIGTRAP for windows.
2075 * sim-xcat.h: use token pasting if ALMOST_STDC.
2076
4141b1c6
AC
2077Tue Sep 23 11:04:38 1997 Andrew Cagney <cagney@b1.cygnus.com>
2078
2079 * Make-common.in (SIM_SCACHE, SIM_DEFAULT_MODEL): Assign
2080 configured values.
2081 (CONFIG_CFLAGS): Add same.
2082
9f4fd823
FL
2083Mon Sep 22 17:20:27 1997 Felix Lee <flee@cygnus.com>
2084
2085 * sim-types.h (SIGNED64): ##i64 when _MSC_VER, not _WIN32.
2086 (SIGNED32): use ##i32.
2087
92f91d1f
AC
2088Tue Sep 23 11:04:38 1997 Andrew Cagney <cagney@b1.cygnus.com>
2089
2090 * configure: Regenerated to track ../common/aclocal.m4 changes.
2091
2092Tue Sep 23 10:07:47 1997 Andrew Cagney <cagney@b1.cygnus.com>
2093
2094 * aclocal.m4 (sim-endian): Simplify logic determining [default]
2095 endian of target.
2096
2097 * Make-common.in (SIM_WARNINGS, SIM_ALIGNMENT, SIM_ENDIAN,
2098 SIM_HOSTENDIAN, SIM_RESERVED_BITS, SIM_ASSERT, SIM_FLOAT,
2099 SIM_HARDWARE, SIM_INLINE, SIM_PACKAGES, SIM_REGPARM, SIM_SMP,
2100 SIM_STDCALL, SIM_XOR_ENDIAN): Assign configured values.
2101 (CONFIG_CFLAGS): Add same.
2102
2103 * aclocal.m4: Perform AC_SUBST on optional options.
2104
4ca7d6d2
AC
2105Mon Sep 22 11:46:20 1997 Andrew Cagney <cagney@b1.cygnus.com>
2106
8d332f9c
AC
2107 * sim-config.h (WITH_DEFAULT_ALIGNMENT): Don't hardwire any alignment.
2108
2109 * sim-options.c (standard_option_handler): Typo in warning message.
2110
4ca7d6d2
AC
2111 * sim-base.h (STATE_MODEL): Make conditional on SIM_HAVE_MODEL.
2112
2113 * sim-profile.c (profile_print_insn): Check 0 .. MAX_INSN for any
2114 insn count. Make count conditional on there being a valid
2115 INSN_NAME.
2116 (profile_pc_init): Make default PC profile frequency an arbitrary
2117 256.
2118
2119 * sim-base.h: Ditto.
2120
2121 * sim-profile.h (WITH_PROFILE_MODEL_P): Only enable modeling when
2122 SIM_HAVE_MODEL.
2123
2124 * sim-model.h (struct MACH): Depreciate, to be replaced by bfd
2125 archure struct.
2126
794e9ac9
AC
2127Mon Sep 22 11:46:20 1997 Andrew Cagney <cagney@b1.cygnus.com>
2128
2129 * configure: Regenerated to track ../common/aclocal.m4 changes.
2130
2131Mon Sep 22 11:45:00 1997 Andrew Cagney <cagney@b1.cygnus.com>
2132
2133 * aclocal.m4 (sim_alignment): Simplify logic for selecting the
2134 configured alignment.
2135
b45caf05
AC
2136Fri Sep 19 17:45:25 1997 Andrew Cagney <cagney@b1.cygnus.com>
2137
2138 * configure: Regenerated to track ../common/aclocal.m4 changes.
2139
2140Fri Sep 19 17:26:14 1997 Andrew Cagney <cagney@b1.cygnus.com>
2141
2142 * sim-config.c (sim_config): Check for default alignment.
2143
2144 * sim-options.c (standard_option_handler): Add alignment option.
2145
2146 * aclocal.m4 (sim_alignment): Allow configuration of hardwired and
2147 default alignment requirements on memory accesses.
2148
2149Fri Sep 19 11:51:35 1997 Jeffrey A Law (law@cygnus.com)
2150
2151 * sim-load.c (sim_load_file): Return failure if the executable
2152 had no loadable sections.
2153
dfa5c0ca
AC
2154Wed Sep 17 13:33:28 1997 Andrew Cagney <cagney@b1.cygnus.com>
2155
175c6fd3
AC
2156 * sim-events.c (ETRACE): Use trace_printf not sim_io_printf for
2157 trace output.
2158
2159 * sim-core.c (sim_core_signal): When bad access halt simulator
2160 SIGSEGV / SIGBUS instead of aborting.
2161 (signal.h): Include.
2162
2163 * sim-watch.c (sim_watchpoint_install): Handler for watchpoint
2164 options was missing.
2165
dfa5c0ca
AC
2166 * sim-bits.h (MOVED): Define
2167
b52e58c2
AC
2168Wed Sep 17 10:33:28 1997 Andrew Cagney <cagney@b1.cygnus.com>
2169
2170 * sim-alu.h (ALU32_HAD_OVERFLOW): Pacify GCC, Use MSBIT instead of
2171 BIT.
2172
2173 * sim-bits.h (LSBIT, MSBIT): Check for overflow of shift value.
2174
2175 * sim-bits.c: Add 8 bit versions of bit macros.
2176
2177 * sim-bits.h: Ditto.
2178
aa5e6a5a
AC
2179Tue Sep 16 16:15:16 1997 Andrew Cagney <cagney@b1.cygnus.com>
2180
2181 * sim-bits.c (LSSEXT, MSSEXT): Replace SEXT.
2182 (LSINSERTED, MSINSERTED): Ditto for INSERTED.
2183
2184 * sim-n-bits.h (MSSEXTn, LSSEXTn): Replace SEXTn.
2185 (LSINSERTDn, MSINSERTEDN): Ditto for INSERTEDn.
2186
2187 * sim-bits.h (SEXT*): Define as MSEXT/LSEXT.
2188 (INSERTED*): Ditto for LSINSERTED/MSINSERTED.
2189
08547b1f
AC
2190Mon Sep 15 17:36:15 1997 Andrew Cagney <cagney@b1.cygnus.com>
2191
2192 * aclocal.m4 (SIM_AC_COMMON): Add optional config.h file argument.
2193 configure.in: Output to cconfig.h instead of config.h.
2194
2195 * configure: Regenerated to track ../common/aclocal.m4 changes.
2196
2197Mon Sep 15 15:39:28 1997 Andrew Cagney <cagney@b1.cygnus.com>
2198
2199 * sim-utils.c (sim_analyze_program): Set STATE_ARCHITECTURE from
2200 BFD if known.
2201
4bdab45a
AC
2202Tue Sep 9 21:46:46 1997 Felix Lee <flee@cygnus.com>
2203
2204 * callback.c (os_write): divert stdout and stderr to their
2205 respective hooks.
2206
93e7a1b5
AC
2207Thu Sep 11 10:08:48 1997 Andrew Cagney <cagney@b1.cygnus.com>
2208
2209 * sim-profile.c (profile_print_speed): Call
2210 sim_events_elapsed_time instead of PROFILE_EXEC_TIME for moment.
2211
2212 * sim-events.c (sim_events_elapsed_time): New function return nr
2213 host MS consumed by the simulator.
2214 (sim_watch_valid): Use.
2215
2216 * sim-module.c (modules): Install sim_events very very early.
2217
2218 * sim-profile.c (profile_print): Call profile_print_pc.
2219 (print_bar):
2220 (profile_pc_init): New function, set up processor for PC
2221 profiling.
2222 (profile_print_pc): New function, print a PC profile.
2223 (profile_pc_event): New function, sample PC.
2224
2225 * sim-profile.h (PROFILE_PC_COUNT, PROFILE_PC_START,
2226 PROFILE_PC_END, PROFILE_PC_SHIFT, PROFILE_PC_SAMPLE_SIZE): Add to
2227 profile struct.
2228
2229 * sim-options.c (sim_print_help): Pacify GCC.
2230
2231 * sim-n-core.h (sim_core_read_aligned_N,
2232 sim_core_write_aligned_N): Add un-conditional profile call.
2233 (sim_core_read_unaligned_N, sim_core_write_unaligned_N): Add
2234 profile call when aligned read/write isn't used.
2235
2236 * sim-base.h: Include sim-profile, sim-model after sim-core &
2237 sim-events allow sim-core to define useful values.
2238
2239 * sim-profile.c (OPTION_PROFILE_CORE): Define.
2240 (profile_option_handler, profile_options): Add support for
2241 --profile-core option.
2242 (print_bar): Include when core profiling.
2243 (profile_print_core): New function, print core profile.
2244
2245 * sim-config.c (print_sim_config): Print profile status.
2246
2247 * sim-profile.h (PROFILE_NEXT_IDX, PROFILE_core,
2248 WITH_PROFILE_PC_P): Define.
2249 (PROFILE_CORE_COUNT): Count each core-map/size separatly.
2250 (PROFILE_COUNT_CORE): Define.
2251
cad7297e
AC
2252Thu Sep 11 08:44:52 1997 Andrew Cagney <cagney@b1.cygnus.com>
2253
2254 * sim-watch.c (handle_watchpoint): Pass a char** index into the
2255 interrupt_names array as the data.
2256 (sim-watch.h): Document.
2257
2258Wed Sep 10 16:15:22 1997 Andrew Cagney <cagney@b1.cygnus.com>
2259
2260 * sim-options.c (sim_print_help): When the doc string is to long
2261 word wrap it.
2262
2263 * sim-watch.c (sim_watchpoint_install): Use option.doc_name so
2264 that only the first few the watch options are listed. Generate
2265 meanginful usage messages.
2266
2267 * sim-options.h (struct OPTION): Clarify use of doc_name field
2268
d0b59aa5
AC
2269Wed Sep 10 13:23:24 1997 Andrew Cagney <cagney@b1.cygnus.com>
2270
2271 * sim-options.c (OPTION_ARCHITECTURE_INFO): New option.
2272 (standard_option_handler): Handle --architecture-info.
2273
31dda65a
FL
2274Tue Sep 9 21:46:46 1997 Felix Lee <flee@cygnus.com>
2275
2276 * sim-core.h (sim_cpu_core): [WITH_XOR_ENDIAN + 1], to avoid
2277 illegal zero-sized array.
2278 * sim-core.c (sim_core_xor_read_buffer): same.
2279
7b4aeeba
DE
2280Tue Sep 9 11:20:35 1997 Doug Evans <dje@canuck.cygnus.com>
2281
2282 * nltvals.def: Regenerate.
2283
75b3697d
AC
2284Tue Sep 9 02:10:36 1997 Andrew Cagney <cagney@b1.cygnus.com>
2285
2286 * sim-fpu.c (DP_FRACHIGH2): Define LL using SIGNED64.
2287
2288Mon Sep 8 12:22:20 1997 Andrew Cagney <cagney@b1.cygnus.com>
2289
2290 * sim-bits.c (MASKED): Delete.
2291 (EXTRACTED): Delete.
2292 (LSEXTRACTED, MSEXTRACTED): New functions.
2293
2294 * sim-n-bits.h (MASKEDn): Delete, define as MSMASKED or LSMASKED.
2295 (MSMASKEDn, LSMASKEDn): Add last argument.
2296 (MSMASK*): Ditto.
2297
2298 * sim-bits.h (EXTEND8, EXTEND16): Define.
2299 (EXTRACTED64): Define as 64 bit extract, not 32 bit.
2300
2301 * sim-run.c (sim_engine_run): Use CPU_CIA macro.
2302
2303 * sim-engine.h (SIM_ENGINE_HALT_HOOK): Use CPU_CIA to get at
2304 current instruction address.
2305
2306 * sim-inline.h (*_ENGINE): Define.
2307
30efae3a
AC
2308Fri Sep 5 08:39:02 1997 Andrew Cagney <cagney@b1.cygnus.com>
2309
1bba340a
AC
2310 * sim-core.c (sim_core_attach): Fix checks of modulo/mask.
2311
2312 * sim-watch.c (delete_watchpoint): Delete by ident and type.
2313 (watch_option_handler): Call delete_watchpoint with ident or type.
2314 (sim_watchpoint_install): Create interrupt specific watchpoint
2315 commands on the fly.
2316 (do_watchpoint_create): New function, create a watch point using
2317 type/int-nr info encoded in the option nr.
2318 (do_watchpoint_info): New function. List active watchpoints.
2319
2320 * sim-watch.h: Change data structure to a list.
2321
2322 * sim-memopt.c (memory_option_handler): Require explicit "all"
2323 before deleting all memory regions.
2324
1b465b54
AC
2325 * sim-utils.c (sim_do_commandf): New function, printf version of
2326 sim_do_command.
2327
2328 * sim-basics.h (asprintf, vasprintf): Hack, define for CYGWIN32.
2329
30efae3a
AC
2330 * sim-alu.h (ALU64_ADD): Use explicit MSEXTRACTED64, do not assume
2331 bit endianness.
2332 (SIGNED64, UNSIGNED64): Delete.
2333 (ALU64_ADD): Don't rely on bit endianness.
2334 (ALU64_BEGIN): Define.
2335
2336 * sim-n-bits.h (MSEXTRACTEDn, LSEXTRACTED): New functions.
2337 (EXTRACTEDn): Delete, define as either LSEXTRACTED or MSEXTRACTED.
2338
2339 * sim-types.h (SIGNED64, UNSIGNED64): New macros, attach relevant
2340 suffix - u64, LL - to 64 bit constants.
2341
a34abff8
AC
2342Thu Sep 4 09:27:54 1997 Andrew Cagney <cagney@b1.cygnus.com>
2343
6dbaff8f
AC
2344 * sim-config.c (sim_config): Add assert for SIM_MAGIC_NUMBER.
2345
2346 * sim-utils.h (NZALLOC): Define - zalloc * N.
2347
2348 * sim-hrw.c (sim_read, sim_write): New file. Provide generic
2349 implementation of read/write functions.
2350
2351 * Make-common.in (sim-hrw.o): New target.
2352
2353 * sim-base.h (STATE_MEMOPT_P): Delete, simulators _always_ add
2354 memory.
2355
2356 * sim-memopt.c (memory_option_handler): Implement memory-size
2357 command. Implement memory-alias command. Let memory-delete delete
2358 all memory regions.
2359 (add_memopt): New function. Add a memory region.
2360 (do_memopt_delete): New function. Delete a memory region.
2361
a34abff8
AC
2362 * sim-utils.c (sim_elapsed_time_get): Never return zero.
2363
2364 * sim-core.c (sim_core_detach): New function.
2365 (sim_core_map_detach): New function. Perform the actual detach.
2366 (sim_core_init): Move initialization code from here.
2367 (sim_core_install): To here.
2368 (sim_core_uninstall): And here.
2369
2370 * sim-module.c: Add memopt module.
2371
2372 * sim-base.h (STATE_MEMOPT, STATE_MEMOPT_P): Add memopt to
2373 simulator base type.
2374
2375 * Make-common.in (sim_main_headers): Add sim-memopt.h
2376 (sim-memopt.o): New target.
2377
2378 * sim-core.c (sim_core_install): Add core_options to the option
2379 table.
2380
2381 * sim-watch.c (watch_options): Make --delete-watch a synonym for
2382 --watch-delete.
2383
2384 * sim-config.h (WITH_MODULO_MEMORY): Define as 0. Update
2385 comments.
2386
2387 * sim-core.h (struct _sim_core_mapping): Change nr_bytes to type
2388 address_word, add mask member.
2389
2390 * sim-core.h, sim-core.c (sim_core_attach): Make nr_bytes of type
2391 address_word, allow for 64bit targets in 32bit host. Add modulo
2392 argument.
2393 (sim_core_map_attach): Ditto.
2394 (new_sim_core_mapping): Ditto.
2395 (sim_core_translate): Mask address when modulo memory.
2396
88d5f8e8
DE
2397Wed Sep 3 17:32:54 1997 Doug Evans <dje@seba.cygnus.com>
2398
600d8331
DE
2399 * sim-hload.c (sim_load): Add assert for SIM_MAGIC_NUMBER.
2400
88d5f8e8
DE
2401 * gdbinit.in: New file.
2402 * aclocal.m4 (SIM_AC_OUTPUT): Build .gdbinit.
2403 * Make-common.in (distclean): Delete .gdbinit.
2404 (.gdbinit): Add rule for.
2405 * configure: Regenerated to track ../common/aclocal.m4 changes.
2406
2407 * Make-common.in (cgen-run.o): Add rule for.
2408
fdd64f95
AC
2409Wed Sep 3 10:08:21 1997 Andrew Cagney <cagney@b1.cygnus.com>
2410
2411 * sim-resume.c (sim_resume): Suspend/resume the simulator.
2412
2413 * sim-events.c (sim_watch_valid): Compute total elapsed time from
2414 both resumed and previous elapsed time.
2415 (sim_events_init): Set initial_wallclock and current_wallclock to
2416 zero.
2417 (sim_events_install): Install sim_events_suspend and
2418 sim_events_resume.
2419 (sim_events_watch_clock): Allow for suspended simulator when
2420 computing the time of the clock event.
2421
2422 * sim-events.h (struct _sim_event): Add resume_wallclock, rename
2423 initial_wallclock to elapsed_wallclock, set both to zero.
2424 (sim_events_init, sim_events_uninstall): Delete prototypes.
2425
2426 * sim-module.h (MODULE_SUSPEND_FN, MODULE_RESUME_FN): Define types.
2427
2428 * sim-module.c(sim_module_resume, sim_module_suspend): New
2429 functions.
2430
80c651f0
AC
2431Wed Sep 3 10:08:21 1997 Andrew Cagney <cagney@b1.cygnus.com>
2432
2433 * sim-core.c (sim_core_map_attach): Clarify memory overlap error
2434 message.
2435
74db699d
DE
2436Tue Sep 2 14:57:06 1997 Doug Evans <dje@canuck.cygnus.com>
2437
2438 * Makefile.in (TAGS): Add support for "/* TAGS: foo */" marker.
645ab3ec 2439 * Make-common.in (TAGS): Likewise.
74db699d
DE
2440 * sim-n-bits.h: Add TAGS comments for all functions.
2441 * sim-n-core.h: Likewise.
2442 * sim-n-endian.h: Likewise.
2443
4b2a6aed
AC
2444Mon Sep 1 10:50:11 1997 Andrew Cagney <cagney@b1.cygnus.com>
2445
2446 * sim-utils.c (sim_state_alloc): Set CPU backlinks, callback and
2447 kind.
2448
2449 * sim-base.h (sim_state_alloc): Add callback and kind arguments.
2450
2451 * sim-base.h (INVALID_INSTRUCTION_ADDRESS): Add default
2452 definition.
2453
f90b720b
AC
2454Sat Aug 30 09:47:21 1997 Andrew Cagney <cagney@b1.cygnus.com>
2455
2456 * sim-fpu.c (DP_GARDMSB, ...): Make unsigned.
2457 (DP_FRACHIGH, DP_FRACHIGH2, ..): Use MSMASK to avoid LL.
2458
2459Fri Aug 29 13:37:44 1997 Andrew Cagney <cagney@b1.cygnus.com>
2460
2461 * sim-core.c (sim_core_map_attach): Cast attach enum to int.
2462 (sim_core_xor_read_buffer, sim_core_xor_write_buffer): Make
2463 nr_transfered and nr_this_transfer unsigned.
2464
2465 * sim-events.c (sim_events_tickn): N is signed, as limited to
2466 MAXINT.
2467
2468 * sim-n-endian.h (offset_N): Change size to unsigned.
2469
2470 * callback.c (os_poll_quit): Add prototypes for kbhit and getkey.
2471
2472Fri Aug 29 10:10:53 1997 Andrew Cagney <cagney@b1.cygnus.com>
2473
2474 * sim-utils.c (sim_copy_argv): Delete, replaced by dupargv.
2475
2476 * sim-options.c (sim_parse_args): Use dupargv.
2477
36db8e64
DE
2478Thu Aug 28 10:36:34 1997 Doug Evans <dje@canuck.cygnus.com>
2479
2480 * sim-options.c (standard_option_handler): Use xstrdup, not strdup.
2481
18c319ae
AC
2482Thu Aug 28 12:09:15 1997 Andrew Cagney <cagney@b1.cygnus.com>
2483
2484 * sim-base.h (STATE_ARCHITECTURE, STATE_TARGET): Add to simulator
2485 base type.
2486
2487 * sim-options.c (standard_options): Add --architecture=MACHINE and
2488 --target=TARGET options.
2489 (OPTION_ARCHITECTURE, OPTION_TARGET): Define.
2490 (standard_option_handler): Handle architecture and target options.
2491 (bfd.h): Include.
2492
2493 * sim-utils.c (sim_analyze_program): Pass STATE_TARGET to
2494 bfd_openr.
2495 (sim_analyze_program): Set prog_bfd architecture from
2496 STATE_ARCHITECTURE if known.
2497
88117054
AC
2498Wed Aug 27 18:13:22 1997 Andrew Cagney <cagney@b1.cygnus.com>
2499
2500 * configure: Regenerated to track ../common/aclocal.m4 changes.
2501 * config.in: Ditto.
2502
2503Wed Aug 27 18:11:30 1997 Andrew Cagney <cagney@b1.cygnus.com>
2504
2505 * aclocal.m4 (enable-sim-warnings): Remove comment stating
2506 that option does not apply to certain files.
2507
d6fea803
AC
2508Wed Aug 27 15:13:04 1997 Andrew Cagney <cagney@b1.cygnus.com>
2509
2510 * sim-bits.h (LSBIT8, LSBIT16, LSBIT32, LSBIT64, LSBIT, MSBIT8,
2511 MSBIT16, MSBIT32, MSBIT64, MSBIT): New macros - single bit as
2512 offset from MSB/LSB.
2513
2514 * sim-endian.h (A1_8, A2_8, A4_8, A1_4, A2_4, A1_2): New macro,
2515 access address of sub word quantity of a hosts 16, 32, 64 bit word
2516 type.
2517 (V1_2, V1_4, V2_4, V1_8, V2_8, V4_8): Ditto for values.
2518 (U8_1, U8_2, U8_4, U4_1, U4_2, U2_1): Ditto for set of values.
2519 (V2_H1, V2_L1, V4_H2, V4_L2, V8_L4, V8_H4): Given N byte argument,
2520 return N*2 byte value with argument in Hi/Lo word. Renamed from
2521 V1_H2, V1_L2, V2_H4, V2_L4, V4_H8, V4_L8.
2522
2523 * sim-alu.h (ALU32_HAD_OVERFLOW): Use 64 bit mask not 32bit.
2524 (ALU16_HAD_CARRY, ALU32_HAD_CARRY, ALU16_HAD_OVERFLOW): Use MSBIT
2525 so that bit offset is explicit.
2526
fafce69a
AC
2527Wed Aug 27 11:55:35 1997 Andrew Cagney <cagney@b1.cygnus.com>
2528
2529 * sim-utils.c (sim_analyze_program): Add prog_name argument.
2530 Update STATE_PROG_BFD when needed with a dup'd copy of the
2531 program.
2532
2533 * sim-config.c (sim_config): Delete ABFD argument, use
2534 STATE_PROG_BFD directly.
2535
2536Tue Aug 26 12:55:26 1997 Andrew Cagney <cagney@b1.cygnus.com>
2537
2538 * run.c (main): Pass the open ABFD to sim_create_inferior.
2539
2540 * nrun.c (main): Determine prog_bfd. Pass to sim_create_inferior
2541 and sim_load.
2542 (bfd.h): Include.
2543
2544 * sim-hload.c (sim_load): New file. Implement generic sim_load for
2545 hardware only simulator targets.
2546
2547 * Make-common.in (sim-hload.o): Add rule.
2548
d07dddd2
AC
2549Wed Aug 27 09:51:42 1997 Andrew Cagney <cagney@b1.cygnus.com>
2550
2551 * sim-utils.c (sim_copy_argv): Rewrite to match malloc strategy
2552 used by copyargv and freeargv.
2553
2554 * sim-options.c (sim_parse_args): Save a copy of PROG-ARGS in
2555 STATE_PROG_ARGV, not just a pointer.
2556
247fccde
AC
2557Mon Aug 25 17:50:22 1997 Andrew Cagney <cagney@b1.cygnus.com>
2558
2559 * configure: Regenerated to track ../common/aclocal.m4 changes.
2560 * config.in: Ditto.
2561
2562Mon Aug 25 12:11:06 1997 Andrew Cagney <cagney@b1.cygnus.com>
2563
2564 * aclocal.m4 (sim-endian): Add second argument to
2565 SIM_AC_OPTION_ENDIAN. First is hardwired endian, second is
2566 default endian when not hardwired.
2567
2568 * sim-config.h (WITH_DEFAULT_TARGET_BYTE_ORDER): New macro, if all
2569 else failes value for target byte order.
2570
2571 * sim-config.c (sim_config): Add abfd arguments. Set
2572 STATE_PROG_BFD accordingly. Determine prefered_target_byte_order
2573 from same.
2574 (sim_config): Return SIM_RC, don't abort.
2575 (bfd.h): Include.
2576
2577 * run.c (main): Update call to sim_open - add ABFD argument.
2578 * nrun.c (main): Add NULL ABFD argument.
2579
052d7984
DE
2580Thu Aug 14 12:48:57 1997 Doug Evans <dje@canuck.cygnus.com>
2581
2582 * callback.c (os_poll_quit): Make static.
2583 Call sim_cb_eprintf, not p->eprintf.
2584 (sim_cb_printf, sim_cb_eprintf): New functions.
247fccde
AC
2585 * sim-utils.h (sim_cb_printf, sim_cb_eprintf): Declare.
2586
2587 * sim-basics.h (zalloc,zfree,sim_add_commas,SIM_ELAPSED_TIME,
2588 sim_elapsed_time_get,sim_elapsed_time_since): Move decls to
2589 sim-utils.h. #include sim-utils.h.
2590 * sim-utils.h: Above decls moved here.
2591 (sim_analyze_program,sim_load_file): Use `struct _bfd', not `bfd'.
2592
2593 * sim-watch.c (action_watchpoint): Fix thinkos.
052d7984
DE
2594
2595Thu Jul 24 08:48:05 1997 Stu Grossman (grossman@critters.cygnus.com)
2596
2597 * sim-types.h: Fix defs of 64 bit data types for MSVC.
2598
e6609d8f
DE
2599Tue Jul 22 10:35:37 1997 Doug Evans <dje@canuck.cygnus.com>
2600
2601 * sim-n-core.h (sim_core_write_unaligned_N): Add missing break
2602 to FORCED_ALIGNMENT case.
2603
84e8cd0f
AC
2604Thu Jun 5 13:48:37 1997 Andrew Cagney <cagney@b1.cygnus.com>
2605
2606 * callback.c (target_to_host_open): Handle hosts with O_BINARY.
2607
2608Thu Jun 5 08:47:10 1997 Jeffrey A Law (law@cygnus.com)
2609
2610 * Make-common.in (libsim.a): Fix typo.
2611
897f67b7
AC
2612Thu Jun 5 13:48:37 1997 Andrew Cagney <cagney@b1.cygnus.com>
2613
2614 * nrun.c (main): Verify the structure returned before using it.
2615
896eab00
AC
2616Wed Jun 4 11:44:06 1997 Andrew Cagney <cagney@b1.cygnus.com>
2617
2618 * sim-config.h (WITH_ENGINE): Enable the sim-engine module by
2619 default.
2620
2621 * sim-engine.c (sim_engine_install): New function. Install the
2622 engine init functions.
2623 (sim_engine_init): [Re]initialize the simulator engine.
2624
2625 * sim-module.c: Add sim_engine to list of modules that always
2626 install.
2627
56e7c849
AC
2628Tue Jun 3 04:52:04 1997 Andrew Cagney <cagney@b1.cygnus.com>
2629
2630 * sim-watch.c (schedule_watchpoint): Use sim_unschedule_watchpoint
2631 to remove the old watchpoint, not delete_watchpoint.
2632 (watch_option_handler): Action the correct watchpoint, not just
2633 cycles.
2634
2635Wed May 28 14:47:41 1997 Andrew Cagney <cagney@b1.cygnus.com>
2636
2637 * sim-n-core.h (sim_core_write_aligned_N): For 8byte reads, output
2638 both low and high word.
2639 (sim_core_write_aligned_N): Ditto.
2640
2641 * sim-trace.c (set_trace_options): Delete code explicitly setting
2642 core->trace.
2643
2644 * sim-options.c (sim_print_help): Call the list commands if not a
2645 standalone simulator.
2646 (sim_print_help): Advise that some options may not be applicable.
2647
2648 * sim-trace.c (set_trace_options): Assume core present.
2649
2650 * sim-events.c (sim_events_schedule_after_signal): Overflow signal
2651 buffer when full not almost full.
2652
2f2e6c5d
AC
2653Tue May 27 14:32:00 1997 Andrew Cagney <cagney@b1.cygnus.com>
2654
1a70e182
AC
2655 * sim-events.c (sim_events_process): Don't blat the event queue
2656 when processing watchpoints.
2657
2658 * sim-watch.h: Make arg unsigned long - stop sign extension.
2659
2660 * sim-events.c (sim_watch_valid): rewrite so debugable.
2661
2662 * sim-config.h (WITH_XOR_ENDIAN): Default to zero.
2663
2f2e6c5d
AC
2664 * sim-watch.c (schedule_watchpoint): Add is_within option so that
2665 inequality test is possible.
2666 (handle_watchpoint): Re-pass is_within arg.
2667 (watch_option_handler): When `!' prefix to pc-watchpoint arg pass
2668 0 to schedule_watchpoint's is_within arg.
2669 (sim_watchpoint_init): Re-pass is_within arg.
2670
2671 * sim-options.c (sim_print_help): Add is_command argument. Don't
2672 include -- prefix when called from the command line interpreter.
2673
2674 * sim-watch.c (schedule_watchpoint): Pass true is_within argument.
2675
2676 * sim-events.c (sim_events_watch_sim): Add is_within argument,
2677 zero indicates that the test should be reversed.
2678 (sim_events_watch_core): Ditto.
2679 (WATCH_CORE): Compare range against is_within.
2680 (WATCH_SIM): Ditto.
2681
2682Tue May 27 12:48:03 1997 Andrew Cagney <cagney@b2.cygnus.com>
2683
2684 * sim-events.c (WATCH_CORE): Pass NULL cpu argument to
2685 sim_core_read_buffer. Check nr-bytes transfered.
2686
2687 * sim-core.h (sim_core_common): Define a new struct that contains
2688 the common data. to sd and cpu structures.
2689 * sim-core.c (sim_core_attach): Update.
2690 (sim_core_init): Update. Remember to copy initialized data to each
2691 cpu.
2692 (sim_core_find_mapping): Ditto.
2693
2694 * sim-core.c (sim_core_read_buffer): Add cpu argument.
2695 (sim_core_write_buffer): Ditto.
2696
2697 * sim-n-core.h (sim_core_read_unaligned_N): When mis-aligned
2698 transfer use xor version of read buffer.
2699 (sim_core_write_unaligned_N): Ditto for write.
2700
2701 * sim-core.c (sim_core_xor_read_buffer): New function implement
2702 xor-endian data read breaking transfer up into xor-endian sized
2703 blocks.
2704 (sim_core_xor_write_buffer): Ditto for write.
2705 (reverse_n): Reverse order of arbitrary number of bytes in buffer
2706 - needed for xor-endian transfers.
2707
cd0d873d
AC
2708Fri May 23 14:24:31 1997 Andrew Cagney <cagney@b1.cygnus.com>
2709
2710 * sim-inline.h: Review description.
2711
2712 * sim-core.h, sim-core.c: Reduce number of functions being inlined
2713 to just those involved in data transfers and configuration.
2714
2715 * sim-xcat.h (XSTRING): New macro, map macro definition onto
2716 string.
2717 * sim-n-core.h (sim_core_read_aligned_N): Use.
2718 (sim_core_read_unaligned_N): Ditto.
2719 (sim_core_read_unaligned_N): Ditto..
2720 (sim_core_write_unaligned_N): Ditto.
2721
2722 * sim-core.h: Add xor endian bitmap to main structure. *
2723
2724 sim-n-core.h (sim_core_write_aligned_N): Add suport for xor
2725 endian.
2726 (sim_core_read_aligned_N): Ditto.
2727
2728 * sim-core.c (sim_core_set_xor_endian): New function.
2729 (sim_core_attach): Don't overwrite the per-cpu xor map when
2730 cloning the global core.
2731
8167e102
AC
2732Fri May 23 10:53:13 1997 Andrew Cagney <cagney@b1.cygnus.com>
2733
2734 * sim-engine.h: Update below so that it is using an enumerated
2735 type.
2736
6e61ecfc
GRK
2737Thu May 22 09:12:16 1997 Gavin Koch <gavin@cygnus.com>
2738
2739 * sim-engine.c (sim_engine_restart):
2740 * sim-resume.c (sim_resume): Change longjmp param/setjmp
2741 return value used for simulator restart from 0 to 2.
2742
50a2a691
AC
2743Wed May 21 08:47:30 1997 Andrew Cagney <cagney@b1.cygnus.com>
2744
2745 * cgen-scache.c (scache_option_handler): Add is_command arg.
2746
2747 * sim-model.c (model_option_handler): Add is_command argument.
2748
2749 * sim-profile.c (profile_option_handler): Add is_command arg.
2750
2751 * sim-events.c (sim_watch_valid): Use ub64, lb64 when 64bit value
2752 involved.
2753
2754 * sim-module.c (sim_module_add_init_fn): Call init fn in the same
2755 order that they are registered.
2756
2757 * sim-options.h (OPTION_HANDLER): Add argument to differentiate
2758 between option and command line processing.
2759
2760 * sim-options.c: Include stdlib.h, ctype.h.
2761
2762 * Make-common.in (sim-watch.o): Add rule.
2763 (sim_main_headers): Assume sim-assert.h included.
2764 (sim-*.o): Simplify make rule.
2765
2766 * sim-module.c: Add sim_watch_install to module list.
2767
2768Tue May 20 14:15:23 1997 Andrew Cagney <cagney@b1.cygnus.com>
2769
2770 * sim-base.h (STATE_LOADED_P): New predicate. Set once everything
2771 has been loaded.
2772
2773 * sim-trace.c (trace_install): Check magic. Include sim-assert.h.
2774 * sim-events.c (sim_events_install): Ditto.
2775 * sim-core.c (sim_core_install): Ditto.
2776 * sim-model.c (model_install): Ditto.
2777 * sim-options.c (standard_install): Ditto.
2778 * sim-profile.c (profile_install): Ditto.
2779 * sim-reason.c (sim_stop_reason): Ditto.
2780 * sim-run.c (sim_engine_run): Ditto.
2781 * sim-utils.c (sim_analyze_program): Ditto.
2782
2783 * sim-module.c (modules): Make profile_install and trace_install
2784 optional.
2785
2786 * sim-base.h (STATE_MEM_BASE): Define for flat memory systems.
2787
2788 * sim-options.c (standard_option_handler): Set the byte order.
2789
2790 * sim-events.c (sim_events_process): Allow multi tick processing.
2791 (sim_events_tickn): New function - multi cycle tick.
2792
2793 * sim-events.h (sim_events_tickn, sim_events_timewarp): Add
2794 prototypes. Under development.
2795 (sim_events): Replace processing with nr_ticks_to_process.
2796
2797Tue May 20 09:39:22 1997 Andrew Cagney <cagney@b1.cygnus.com>
2798
2799 * nrun.c (main): Pass callbacks to sim_open instead of using
2800 sim_set_callbacks.
2801
2802 * run.c (main): Ditto.
2803
f03b093c
AC
2804Mon May 19 12:07:22 1997 Andrew Cagney <cagney@b1.cygnus.com>
2805
fd76456b
AC
2806 * sim-events.c (sim_events_zalloc): Signal save memory allocator -
2807 stop tk interrupting malloc calls.
2808 (sim_events_zalloc): Converse.
2809
2810 * Make-common.in (sim_main_headers): Add sim-events.h.
2811
2812 * sim-events.c (sim_events_schedule_after_signal): Change return
2813 type to void - signal events are strictly internal.
2814 (sim_events_init): Allocate a finite buffer for signal events.
2815 (sim_events_schedule_after_signal): Enter signal events into the
2816 signal buffer.
2817
2818 * sim-engine.c (sim_engine_halt): Check SIM_DESC magic.
2819 (sim_engine_restart): Ditto.
2820 (sim_engine_abort): Ditto.
2821 * sim-stop.c (sim_stop): Ditto.
2822 (control_c_simulation): Ditto.
2823 * sim-resume.c (sim_resume): Ditto.
2824 (has_stepped): Ditto.
2825 * sim-abort.c (sim_engine_abort): Ditto.
2826
f03b093c
AC
2827 * sim-basics.h (transfer_type): New type.
2828
2829 * sim-core.c (sim_core_signal): New function. Print core signal
2830 information.
2831 (sim_core_find_mapping): Add transfer argument.
2832
2833 * sim-n-core.h (sim_core_{write,write}_unaligned_N): Call
2834 SIM_CORE_SIGNAL if a recoverable abort.
2835 * sim-core.c (sim_core_find_mapping): Ditto.
2836
2837Fri May 16 15:13:21 1997 Andrew Cagney <cagney@b1.cygnus.com>
2838
2839 * sim-core.c (sim_core_find_mapping): Replace calls to
2840 sim_io_error to more resiliant sim_engine_abort.
2841
2842 * sim-n-core.h (sim_core_read_unaligned_N): Ditto.
2843 (sim_core_write_unaligned_N): Ditto.
2844
2845Tue May 13 13:50:06 1997 Andrew Cagney <cagney@b1.cygnus.com>
2846
2847 * sim-module.c: Add sim_events_install to list.
2848
2849 * sim-events.c (sim_events_install, sim_events_uninstall): Clonse
2850 from sim_core_*.
2851 (sim_events_init): Now returns SIG_RC.
2852
2853 * sim-run.c: New file. Generic sim_engine_run.
2854 * sim-reason.c: New file. Generic sim_stop_reason.
2855 * sim-stop.c: New file. Generic sim_stop.
2856 * sim-resume.c: New file. Generic sim_resume.
2857
2858 * Make-common.in (sim-engine.o): Add rule.
2859 (sim-run.o, sim-reason.o, sim-stop.o, sim-resume.o): Ditto.
2860
2861 * sim-engine.h, sim-engine.c: New file. Provide generic
2862 implementation of sim_engine_halt, sim_engine_error. et.al.
2863
2864 * sim-base.h (sim_state_base): Add member halt.
2865 (sim-engine.h): Include.
2866
2867 * sim-events.h (sim_event_handler): Always pass SIM_DESC to event
2868 handlers.
2869 * sim-events.c (sim_events_poll): Update event handler.
2870
2871Tue May 13 09:57:49 1997 Andrew Cagney <cagney@b2.cygnus.com>
2872
2873 * sim-events.h, sim-events.c (sim_events_watch_clock): New
2874 function.
2875 (sim_events_watch_sim): New function.
2876 (sim_events_watch_core): New function.
2877 (sim_watch_valid): New function.
2878 (sim_events_preprocess): New function.
2879 (sim_events_process): Process the watchpoints as well as the timer
2880 queue.
2881 (sim_events_tick): Check WORK_PENDING instead of the hold queue.
2882 (sim_events_deschedule): Check all the queues when removing an
2883 event.
2884 (sim_events_init): Ditto for cleaning.
2885
2886Mon May 19 12:07:22 1997 Andrew Cagney <cagney@b1.cygnus.com>
2887
2888 * sim-fpu.c (is_ufpu_number): Comment out - currently unused.
2889
11ab132f
AC
2890Mon May 19 11:23:03 1997 Andrew Cagney <cagney@b1.cygnus.com>
2891
2892 * callback.c (os_open): Type of arg flags is int.
2893
63aa80ff
MM
2894Fri May 16 22:26:43 1997 Michael Meissner <meissner@cygnus.com>
2895
2896 * sim-fpu.c (sim_fpu_is_{eq,ne,lt,le,gt,ge}): Compare Infinities
2897 just like normal numbers as per IEEE rules.
2898
248c1fb8
JL
2899Wed May 14 21:20:38 1997 Bob Manson <manson@charmed.cygnus.com>
2900
2901 * callback.c (os_close): Mark the descriptor as being
2902 available if the close succeeded.
2903 (os_open): Pass 0644 as the mode of the file being created.
2904
d24f06ee
AC
2905Thu May 15 10:58:52 1997 Andrew Cagney <cagney@b1.cygnus.com>
2906
07b4c0a6
AC
2907 * sim-fpu.c (pack_fpu, unpack_fpu): New functions - decode a
2908 float.
2909
2910 * sim-inline.c (SIM_INLINE_C): Rename from _SIM_INLINE_C_.
2911 * sim-lnline.h: Update.
2912
2913 * sim-fpu.h, sim-fpu.c (sim_fpu_[iu]{32,64}to): New int2fp
d24f06ee 2914 conversion functions.
07b4c0a6 2915 (sim_fpu_to{32,64}[iu]): New fp2int functions.
d24f06ee
AC
2916
2917 * sim-fpu.h, sim-fpu.c (sim_fpu_is_{lt,le,eq,ne,ge,gt}): New fp
2918 compare functions. Replacing.
2919 (sim_fpu_cmp): This. Delete.
2920
c445af5a
AC
2921Mon May 12 14:49:05 1997 Andrew Cagney <cagney@b1.cygnus.com>
2922
2923 * sim-core.c (sim_core_find_mapping): Call engine_error not
2924 sim_io_error when possible.
2925
2926Mon May 12 08:55:07 1997 Andrew Cagney <cagney@b2.cygnus.com>
2927
2928 * sim-endian.h (V1_H2): Add macro's to insert a word into a
2929 high/low double word.
2930
2931 * sim-trace.h: Remove definition of attribute - defined in
2932 sim_basics.h.
2933
e05e76e8
AC
2934Mon May 12 08:55:07 1997 Andrew Cagney <cagney@b1.cygnus.com>
2935
2936 * sim-options.h (struct OPTION): Add doc_opt as the documenting
2937 name of the option - or family of options.
2938
2939 * sim-options.c (sim_args_command): Match command `a-b c' with
2940 option `--a-b-c' from option table.
2941
43c53e07
AC
2942Thu May 8 12:40:07 1997 Andrew Cagney <cagney@b1.cygnus.com>
2943
2944 * sim-options.c (sim_print_help): For optional arguments, wrap
2945 them in [].
2946
2947 * sim-trace.c (set_trace_options): New function, handle optional
2948 argument and multiple assignment.
2949 (trace_option_handler): Update.
2950
2951 * sim-trace.c (trace_option_handler): Trace branch and not fpu
2952 when branch tracing selected.
2953
381f42ef
AC
2954Wed May 7 15:19:58 1997 Andrew Cagney <cagney@b1.cygnus.com>
2955
2956 * sim-trace.c (trace_one_insn): Make a va-args function.
2957
2958 * sim-trace.c (trace_vprintf): New function, va-arg version of
2959 trace_printf.
2960
ea4e4493
DE
2961Tue May 6 16:38:16 1997 Doug Evans <dje@canuck.cygnus.com>
2962
2963 * sim-trace.c (trace_uninstall): Don't close a file twice.
bd3274c6 2964 * sim-profile.c (profile_uninstall): Likewise.
ea4e4493 2965
a7724171
MM
2966Tue May 6 06:14:01 1997 Mike Meissner <meissner@cygnus.com>
2967
2968 * sim-trace.c (toplevel): Include bfd.h.
2969 (trace_options): Note that --trace-linenum also turns on
7b167b09 2970 --trace-insn. Add --trace-{branch,semantics}.
a7724171 2971 (trace_option_handler): If --trace-linenum, also turn on
7b167b09
MM
2972 --trace-insn. Add --trace-branch support. If --trace-semantics,
2973 turn on ALU, FPU, branch, and memory tracing.
a7724171
MM
2974 (trace_one_insn): New function to trace an instruction. Support
2975 --trace-linenum.
7b167b09 2976 (OPTION_TRACE_*): Use an enum, rather than lots of defines.
a7724171 2977
7b167b09
MM
2978 * sim-trace.h (TRACE_{SEMANTICS,BRANCH}_IDX): Add new macros.
2979 (MAX_TRACE_VALUES): Use 32, not 12 by default.
2980 (TRACE_branch): Add new mask.
2981 (TRACE_*_P): Define all possible trace_p macros.
a7724171
MM
2982 (trace_one_insn): Declare function.
2983
23b04e79
MM
2984Mon May 5 14:08:34 1997 Mike Meissner <meissner@cygnus.com>
2985
2986 * sim-trace.h (__attribute__): Define as nothing if not GNU C or
2987 GNU C doesn't support __attributes__.
2988 ({trace,debug}_printf): Add attribute's so -Wformat can check the
2989 format strings.
2990
7a418800
AC
2991Mon May 5 11:16:12 1997 Andrew Cagney <cagney@b1.cygnus.com>
2992
2993 * sim-config.h (FORCED_ALIGNMENT): New alignment option -
2994 addresses are masked forcing them to be correctly aligned.
2995 (WITH_ALIGNMENT): Make NONSTRICT_ALIGNMENT the default.
2996 * sim-config.c (config_alignment_to_a): Update.
2997
2998 * sim-core.h (sim_cpu_core): New data type contains cpu specific
2999 core data.
3000 * sim-base.h (CPU_CORE): Add cpu specific core data to cpu base
3001 type.
3002 * sim-core.c (sim_core_attach): Add CPU argument. Ready for
3003 processor specific core maps.
3004 (sim_core_map_attach): Copy the core map data to each of the
3005 processor specific core data structures.
3006 * sim-core.c (sim_core_find_mapping): Update.
3007
3008 * sim-n-core.h (sim_core_read_N, sim_core_write_N): Rename.
3009 (sim_core_write_aligned_N, sim_core_write_aligned_N): New names.
3010 (sim_core_write_unaligned_N, sim_core_write_unaligned_N): New
3011 alternatives that handle unaligned addresses.
3012 (sim_core_{read,write}_{,un}aligned_N): Drop SIM_DESC arg, replace
3013 with just CPU arg.
3014 * cgen-utils.c (sim_disassemble_insn): Update.
3015
3971886a
AC
3016Mon May 5 13:19:16 1997 Andrew Cagney <cagney@b1.cygnus.com>
3017
3018 * sim-trace.h (TRACE_FPU_IDX): Add Floating-point specific
3019 tracing.
3020
3021 * sim-fpu.h, sim-fpu.c: New files - prototype for generic target
3022 fpu support.
3023
3024 * sim-inline.h, sim-inline.c: Add support for SIM_FPU.
3025
1fe05280
AC
3026Fri May 2 17:59:42 1997 Andrew Cagney <cagney@b1.cygnus.com>
3027
3028 * sim-core.c (sim_core_map_to_str): New function ascii equivalent
3029 to map type.
3030
3031 * sim-n-core.h (sim_core_read_N, sim_core_write_N): Use in trace
3032 statement.
3033
3034Fri May 2 17:28:02 1997 Andrew Cagney <cagney@b2.cygnus.com>
3035
3036 * cgen-trace.c: Prepend additional trace_printf argument.
3037
3038 * cgen-utils.c (sim_disassemble_insn): Add additional core
3039 arguments.
3040
3041Fri May 2 11:40:23 1997 Andrew Cagney <cagney@b1.cygnus.com>
3042
3043 * nrun.c (main): Catch/report errorenous simulator states.
3044
3045 * sim-module.c: #include "libiberty.h" so that xmalloc is defined.
3046 * sim-trace.c: #include string.h/strings.h so that memset is
3047 defined.
3048 * sim-utils.c: Ditto.
3049 * sim-profile.c: Ditto. And stdlib.h.
3050 (print_bar): Only define when used by instruction or memory profiler.
3051
3052 * sim-options.c (standard_option_handler): Make ul more local.
3053
3054 * sim-load.c (sim_load_file): Make the name constant.
3055 (sim_load_file): Passify gcc.
3056
3057 * sim-utils.h: New file, pre-declare utilites in corresponding .c
3058 file.
3059 * sim-utils.c, sim-load.c: Include sim-utils.h.
3060
3061 * sim-base.h (sim_cpu): Pre define here so available to all.
3062
3063 * sim-core.h (DECLARE_SIM_CORE_WRITE_N, DECLARE_SIM_CORE_READ_N):
3064 Restore the sim_cpu and instruction_address arguments so that full
3065 information is available to the abort function.
3066 * sim-core.c (sim_core_find_mapping, sim_core_write_buffer): Ditto.
3067 * sim-n-core.h (sim_core_write_N, sim_core_read_N): Update.
3068
3069 * sim-trace.h, sim-trace.c (trace_option_handler): Add interim
3070 tracing support for sim-events and sim-core.
3071 (trace_option_handler): Convert #if to if where possible so always
3072 compiled/checked by C compiler.
3073 * sim-n-core.h (sim_core_write_N, sim_core_read_N): Update.
3074
3075 * sim-base.h: Adjust comment documenting how to define the cpu
3076 structure.
3077 (sim_state_base): Add sim_core and sim_events to simulator base
3078 object.
3079
3080 * sim-trace.h, sim-trace.c (trace_printf): Add SIM_DESC argument.
3081 * sim-core.c (sim_core_init, sim_core_attach,
3082 sim_core_find_mapping): Update.
3083 * sim-events.c (ETRACE, sim_events_init, sim_events_time,
3084 update_time_from_event, insert_sim_event,
3085 sim_events_schedule_after_signal, sim_events_deschedule,
3086 sim_events_tick): Ditto.
3087
3088 * sim-basics.h (sim-module.h, sim-trace.h, sim-profile.h,
3089 sim-model.h): Move #includes from here.
3090 * sim-base.h: To here.
3091 (sim-core.h, sim-events.h, sim-io.h): Include also
3092
3093Wed Apr 30 15:37:54 1997 Andrew Cagney <cagney@b1.cygnus.com>
3094
3095 * callback.c (default_callback): Missing initialisers.
3096
c967f187
DE
3097Thu May 1 10:40:47 1997 Doug Evans <dje@canuck.cygnus.com>
3098
2317a499
DE
3099 * sim-utils.c (sim_add_commas): New function.
3100 * sim-basics.h (sim_add_commas): Add prototype.
3101 * cgen-scache.c (scache_print_profile): Print commas in numbers.
3102 * sim-profile.c (COMMAS): New macro.
3103 (print_*): Use it to print commas in numbers.
3104
260b2c47
DE
3105 * configure: Regenerated.
3106
3107 * cgen-sim.h (sim_signal_type): Add SIM_SIGINT.
3108 (cgen_state): New member run_fast_p.
3109 (cgen_init): Add prototype.
3110 (sim_disassemble_insn): New arg `cpu'.
3111 * cgen-trace.c (trace_insn): Update call to sim_disassemble_insn.
3112 * cgen-utils.c (cgen_init): New function.
3113 (sim_disassemble_insn): New arg `cpu'. Rewrite fetching of insn.
3114 * genmloop.sh: Call engine_halt if loop exits.
3115
c967f187
DE
3116 * Makefile.in (sim-options_h): Define.
3117 (sim-{module,options,trace,profile,utils}.o): Clean up dependencies.
3118 (sim-model.o): Add new rule.
3119 (cgen-{scache,trace,utils}.o): Add new rules.
3120 * aclocal.m4 (SIM_AC_OPTION_{SCACHE,DEFAULT_MODEL}): Add.
3121 * cgen-scache.c (scache_print_profile): Change `sd' arg to `cpu'.
3122 Indent output by 2 spaces.
3123 * cgen-scache.h (scache_print_profile): Update.
3124 * cgen-trace.c (trace_insn_fini): Indent output by 2 spaces.
3125 Use trace_printf, not fprintf.
3126 (trace_extract): Use trace_printf, not cgen_trace_printf.
3127 * genmloop.sh (!FAST case): Increment `insn_count'.
3128 * sim-base.h (sim_state_base): Only include scache_size if WITH_SCACHE.
3129 (sim_cpu_base): Rename member `sd' to `state' to be consistent with
3130 access macro's name.
3131 * sim-core.c (sim_core_init): Use EXTERN_SIM_CORE to define it.
3132 Change return type to SIM_RC.
3133 (sim_core_{install,uninstall}): New functions.
3134 * sim-core.h (sim_core_{install,uninstall}): Declare.
3135 (sim_core_init): Use EXTERN_SIM_CORE to define it.
3136 Change return type to SIM_RC.
3137 * sim-model.h (models,machs,model_install): Declare.
3138 * sim-module.c (modules): Add scache_install, model_install.
3139 (sim_post_argv_init): Set cpu->state backlinks.
3140 * sim-options.c (standard_options): Delete --simcache-size,--max-insns.
3141 (standard_option_handler): Likewise.
3142 * sim-profile.c (PROFILE_{HISTOGRAM,LABEL}_WIDTH): Move to
3143 sim-profile.h.
3144 (*): Assume ANSI C.
3145 (profile_options): Delete --profile-simcache.
3146 (profile_option_handler): Likewise.
3147 (profile_print_insn): Change `sd' arg to `cpu'. Indent output 2
3148 spaces.
3149 (profile_print_{memory,model}): Likewise.
3150 (profile_print_simcache): Delete.
3151 (profile_print_speed): New function.
3152 (profile_print): Rewrite.
3153 * sim-profile.h (PROFILE_scache): Renamed from PROFILE_simcache.
3154 (WITH_PROFILE_SCACHE_P): Renamed from WITH_PROFILE_SIMCACHE_P.
3155 (PROFILE_DATA): Delete members simcache_{hits,misses}.
3156 (PROFILE_COUNT_SIMCACHE_{HIT,MISS}): Delete.
3157 (PROFILE_{CALLBACK,CPU_CALLBACK}): New types.
3158 (profile_print): Update prototype.
3159
717dbb29
DE
3160Wed Apr 30 11:34:14 1997 Doug Evans <dje@canuck.cygnus.com>
3161
6475b234 3162 * cgen-scache.[ch], cgen-sim.h: New files.
b9c8cd10
DE
3163 * cgen-trace.[ch], cgen-types.h, cgen-utils.c, genmloop.sh: New files.
3164 * sim-model.c: New file.
3165
717dbb29
DE
3166 * Make-common.in (clean targets): Undo patch of Apr. 22.
3167
3168Fri Apr 25 15:28:32 1997 Mike Meissner <meissner@cygnus.com>
3169
3170 * sim-n-bits.h (signed): If we have a standard compiler, undef
3171 signed, so that signedN is defined correctly.
3172
b320601b
DE
3173Thu Apr 24 00:00:07 1997 Doug Evans <dje@canuck.cygnus.com>
3174
3175 * sim-module.h, sim-model.h, sim-profile.h: New files.
3176 * sim-module.c, sim-profile.c: New files.
3177 * Make-common.in (SIM_PROFILE): Define
3178 (CONFIG_CFLAGS): Add $(SIM_PROFILE).
3179 (sim_main_headers): Add sim-module.h, sim-model.h, sim-profile.h.
3180 (sim_module.o,sim-profile.o): Add rules for.
3181 * aclocal.m4 (--enable-sim-trace): Allow symbolic arguments.
3182 (--enable-sim-profile): Add.
3183 * configure: Regenerated.
3184 * sim-base.h (sim_state_base): New members init_list, uninstall_list,
3185 model. Move trace and profile support to sim-{trace,profile}.h.
3186 New members trace_data, profile_data.
3187 * sim-basics.h: #include sim-module.h, sim-model.h, sim-profile.h.
3188 * sim-config.h: Provide default definition of WITH_PROFILE.
3189 (WITH_TRACE): Change default to -1.
3190 (MAX_NR_PROCESSORS): Always define.
3191 * sim-options.c: Move trace and profile support to
3192 sim-{trace,profile}.h.
3193 (sim_pre_argv_init): Moved to sim-model.c.
3194 (standard_install): New function.
3195 * sim-options.h (sim_pre_argv_init): Move decl to sim-model.c.
3196 (standard_install): Declare.
3197 * sim-trace.c: Tracing option handling moved here from sim-options.c.
3198 (trace_install, trace_uninstall): New functions.
3199 (trace_printf): Update reference to TRACE_FILE.
3200 * sim-trace.h (TRACE_FOO_IDX): Moved here from sim-base.h.
3201 (TRACE_foo): Bit masks for symbolic arguments to --enable-sim-trace.
3202 (WITH_TRACE_FOO_P): Define.
3203 (trace_install): Declare.
3204 (TRACE_DATA): New struct.
3205
ef751fb0
DE
3206Wed Apr 23 17:23:15 1997 Doug Evans <dje@canuck.cygnus.com>
3207
3208 * run.c: Undo last exec_bfd patch.
3209 (main): Only pass -E ifdef SIM_HAVE_BIENDIAN.
3210
e3eba3fd
MM
3211Wed Apr 23 17:54:27 1997 Mike Meissner <meissner@cygnus.com>
3212
3213 * run.c (exec_bfd): Add back in.
3214 (main): Set exec_bfd.
3215
2c27ef78
DE
3216Tue Apr 22 14:43:46 1997 Doug Evans <dje@canuck.cygnus.com>
3217
3218 * sim-load.c (sim_load_file): #include <stdio.h> for NULL.
3219
15c16493
AC
3220Wed Apr 23 02:55:54 1997 Andrew Cagney <cagney@b1.cygnus.com>
3221
3222 * sim-events.c (insert_sim_event): Call sim_io_error instead of
3223 less well defined engine_error.
3224 * sim-core.c: Ditto.
3225
0f399b0c
SG
3226Tue Apr 22 08:48:16 1997 Stu Grossman (grossman@critters.cygnus.com)
3227
3228 * Make-common.in: Change clean targets to use :: so that other
3229 Makefiles can have their own clean targets.
3230 * sim-load.c (xprintf eprintf): Use ANSI_PROTOTYPES instead of
3231 __STDC__ to control use of stdarg vs. varargs syntax. Some
3232 systems can't use __STDC__, but require stdarg.
3233
4a6163db
DE
3234Fri Apr 18 11:14:43 1997 Doug Evans <dje@canuck.cygnus.com>
3235
e65bd1d8
DE
3236 * sim-options.c (standard_options): Add --endian.
3237 (standard_option_handler): Likewise.
3238
4a6163db
DE
3239 * nrun.c: #include <signal.h>.
3240 (main, cntrl_c): Wrap calls to sim_resume in a SIGINT
3241 handler that calls sim_stop ().
3242
8517f62b
AC
3243Fri Apr 18 13:11:36 1997 Andrew Cagney <cagney@b1.cygnus.com>
3244
3245 * run.c (main, cntrl_c): Wrap calls to sim_resume in a SIGINT
3246 handler that calls sim_stop (). Simulators may still be
3247 establishing their own handler.
3248
3249 * sim-events.c (sim_events_poll): Rename from
3250 sim_events_at_large_int. Poll IO.
3251
3252 * sim-io.c (sim_io_poll_quit): New function - pass on a polling
3253 request.
3254
3255 * callback.c (os_poll_quit): New function poll for quit signal
3256 where needed.
3257 (default_callback): Include magic number.
3258
0f2811d1
DE
3259Thu Apr 17 02:25:11 1997 Doug Evans <dje@canuck.cygnus.com>
3260
63ddb6bd
DE
3261 * aclocal.m4: Check for headers time.h, sys/time.h, sys/resource.h.
3262 Check for functions getrusage, time.
3263 * sim-basics.h (SIM_ELAPSED_TIME): New typedef.
3264 (sim_elapsed_time_get, sim_elapsed_time_since): Add prototypes.
3265 * sim-utils.c: #include time.h, sys/time.h, sys/resource.h if able.
3266 (sim_elapsed_time_get, sim_elapsed_time_since): New functions.
3267
ba65b2f4
DE
3268 * sim-utils.c (sim_copy_argv, sim_analyze_program): New functions.
3269
4ede3a83 3270 * sim-options.c, sim-options.h: New files.
4b364b00 3271 * sim-config.h (WITH_DEBUG): Provide default value of zero.
e9b2f579 3272 * Make-common.in (nrun.o): Add rules for.
c95d08a8 3273 * nrun.c: New file.
4ede3a83 3274
f7d2f538
DE
3275 * run.c (main): Check return value of sim_open.
3276
e9b2f579 3277 * Make-common.in (sim-options.o, sim-load.o, sim-trace.o): Add rules.
0f2811d1
DE
3278 (sim_main_headers): Add sim-trace.h.
3279 * run.c (exec_bfd, target_byte_order): Delete.
3280 (main): Pass -E <endian> to sim_open. Delete code to load sections,
3281 call sim_load instead. Check return code of sim_create_inferior.
3282 * sim-base.h (CURRENT_STATE): Define.
3283 (sim_state_base): Make typedef. New members options, prog_argv,
3284 prog_bfd, text_{section,start,end}, start_addr, simcache_size,
3285 mem_size, memory [+ corresponding access macros].
3286 (sim_cpu_base): New typedef.
3287 * sim-trace.h: New file.
e9b2f579 3288 * sim-trace.c: New file.
0f2811d1 3289 * sim-basics.h: #include it.
35c384f6 3290 * sim-load.c: New file.
0f2811d1 3291
6808fd61
ILT
3292Tue Apr 15 15:10:13 1997 Ian Lance Taylor <ian@cygnus.com>
3293
3294 * Make-common.in (INSTALL): Set to @INSTALL@.
3295 (INSTALL_XFORM, INSTALL_XFORM1): Remove.
3296 (install-common): Depend upon installdirs. Use
3297 $(program_transform_name) directly, rather than using
3298 $(INSTALL_XFORM).
3299 (installdirs): New target.
3300 * Makefile.in (INSTALL): Set to @INSTALL@.
3301 (INSTALL_XFORM, INSTALL_XFORM1): Remove.
3302 (install-man): Depend upon installdirs. Use
3303 $(program_transform_name) directly, rather than using
3304 $(INSTALL_XFORM).
3305 (installdirs): New target.
3306
7ec396d2
AC
3307Tue Apr 15 15:08:12 1997 Andrew Cagney <cagney@b1.cygnus.com>
3308
3309 * sim-assert.h (SIM_ASSERT, ASSERT): Allow these macros to
3310 be overriden.
3311
3312Wed Apr 9 16:06:44 1997 Andrew Cagney <cagney@kremvax.cygnus.com>
3313
3314 * sim-basics.h: Only bring in config.h and tconfig.h if
3315 HAVE_CONFIG_H.
3316
3317Mon Apr 7 11:39:45 1997 Andrew Cagney <cagney@kremvax.cygnus.com>
3318
3319 * sim-config.h (WITH_TARGET_WORD_MSB): New Macro. Define the bit
3320 numbering convention of the target.
3321 * sim-config.c (print_sim_config): Print WITH_TARGET_WORD_BITSIZE
3322 and WITH_TARGET_WORD_MSB.
3323 (sim_config): When possible, check for consistency with bitsize
3324 and msb.
3325
3326 * sim-bits.h: Allow MSB to be other than zero.
3327 * sim-bits.c: Ditto.
3328 * sim-n-bits.h: Ditto.
3329
3330 * sim-bits.h (MSMASK*): New macros - converce to LSMASK*.
3331 * sim-n-bits.h (MSMASKEDn): Ditto.
3332
3333Mon Apr 14 16:29:21 1997 Ian Lance Taylor <ian@cygnus.com>
3334
3335 * Makefile.in (INSTALL): Change install.sh to install-sh.
3336
25a9c90b
DE
3337Mon Apr 7 10:46:38 1997 Doug Evans <dje@canuck.cygnus.com>
3338
3339 * sim-base.h (sim_state_base): Move `magic' to end of struct.
3340
b4d88827
AC
3341Mon Apr 7 15:53:21 1997 Andrew Cagney <cagney@kremvax.cygnus.com>
3342
3343 * run.c (main): Check that a program to run was specified.
3344
08db4a65
AC
3345Mon Apr 7 15:45:02 1997 Andrew Cagney <cagney@kremvax.cygnus.com>
3346
3347 * aclocal.m4 (AC_TYPE_SIGNAL): Add check.
3348
3349 * configure: Regenerated to track ../common/aclocal.m4 changes.
3350 * config.in: Ditto.
3351
fbda74b1
DE
3352Wed Apr 2 15:06:28 1997 Doug Evans <dje@canuck.cygnus.com>
3353
21bfad86
DE
3354 * sim-endian.h: Move host {LITTLE,BIG}_ENDIAN support from here,
3355 * sim-config.h: To here.
3356
00d74d3e
DE
3357 * Make-common.in (SIM_EXTRA_DEPS): New config var.
3358 (sim_main_headers): Define.
3359 (sim-*.o): Depend on $(SIM_EXTRA_DEPS).
3360 (BUILT_SRC_FROM_COMMON): Move here from ../d30v/Makefile.in.
3361 (clean): Use it.
3362 (sim-utils.o): Add rule for.
3363 * sim-utils.o: New file.
3364 * sim-basics.h: #include sim-base.h.
3365 (zalloc): Make argument unsigned long.
3366 * sim-base.h: New file.
3367 * sim-inline.h (SIM_IO support): Delete.
3368 * sim-io.h: Delete inline support.
3369 * sim-io.c: Likewise. sim-state.h renamed to sim-main.h.
3370 * sim-config.c: sim-state.h renamed to sim-main.h.
3371 * sim-core.c: Likewise.
3372 * sim-events.c: Likewise.
3373
bcd1475a
DE
3374 * run.c (main): Pass SIM_OPEN_STANDALONE to sim_open.
3375
fbda74b1
DE
3376 * aclocal.m4: Check for stdlib.h, string.h, strings.h, unistd.h.
3377 (sim-debug): Allow arguments. Define WITH_DEBUG in addition to
3378 -DDEBUG.
3379 * configure: Regenerated to track ../common/aclocal.m4 changes.
3380
a35e91c3
AC
3381Wed Apr 2 14:34:19 1997 Andrew Cagney <cagney@kremvax.cygnus.com>
3382
3383 * configure: Regenerated to track ../common/aclocal.m4 changes.
3384
3385Wed Apr 2 11:08:11 1997 Andrew Cagney <cagney@kremvax.cygnus.com>
3386
3387 * sim-config.h (WITH_ALIGNMENT, WITH_FLOATING_POINT,
3388 WITH_XOR_ENDIAN, WITH_SMP, WITH_RESERVED_BITS): Assume that these
3389 are defined by the configure.
3390
3391 * aclocal.m4 (sim-stdio): Add option stdio from ../ppc configure.
3392
3393 * aclocal.m4 (floating-point, xor-endian, alignment, smp,
3394 reserved-bits): Always define.
3395
3396 * sim-config.h, sim-config.c (sim_config): New function - and new
3397 file - co-ordinate the setting/checking of the common simulator
3398 configuration options.
3399
3400 * Make-common.in (sim-config.o): Add rule.
3401
3402Fri Mar 28 15:32:00 1997 Mike Meissner <meissner@cygnus.com>
3403
3404 * callback.c (os_{,e}vprintf_filtered): Change stdarg type to
3405 va_list from void *, since va_list might not be a pointer type.
3406
3407Mon Mar 24 15:27:12 1997 Andrew Cagney <cagney@kremvax.cygnus.com>
3408
3409 * sim-n-endian.h (offset_N): Correct assertion - word and sub word
3410 in wrong order.
3411 (offset_N): Correct computation of LE offset.
3412
3413 * sim-io.c (sim_io_error): Include a new line when reporting
3414 errors.
3415
3416 * sim-assert.h (SIM_FILTER_PATH): Out by one when locating last
3417 `/'.
3418
aa7cec3f
JL
3419Thu Mar 20 22:31:06 1997 Jeffrey A Law (law@cygnus.com)
3420
3421 * run.c: Include alloca-conf.h.
7c058c9e
JL
3422
3423 * callback.c (os_evprintf_filtered): Fix typo.
3424
fa21d299
AC
3425Fri Mar 21 13:36:20 1997 Andrew Cagney <cagney@kremvax.cygnus.com>
3426
3427 * run.c (string.h, strings.h, stdlib.h): Include.
3428
3429 * sim-events.c (sim_events_tick): Recent cleanup failed to return
3430 0 when nothing pending.
3431
3432 * run.c (sim_size, sim_trace): Plicate GCC - these two functions
3433 will soon be going away.
3434 (getopt): Plicate GCC.
3435
3436 * sim-endian.c (sim-io.h): Plicate GCC.
3437 * sim-bits.c (sim-io.h): Ditto.
3438 * sim-n-bits.h (ROTn): Ditto.
3439
3440 * sim-io.c (sim_io_error): Correct check for NULL.
3441
3442 * sim-assert.h (SIM_FILTER_PATH): Separate out the code filtering
3443 the __FILE__.
3444 * sim-events.c: Use SIM_FILTER_PATH to filter out the filename
3445 path.
3446
3447Wed Mar 19 01:12:06 1997 Andrew Cagney <cagney@kremvax.cygnus.com>
3448
3449 * aclocal.m4 (SIM_AC_OPTION_*: Move so that they are outside of
3450 SIM_AC_COMMON - SIM_AC_COMMON was gobling arguments.
3451
4a5fb09d
AC
3452Tue Mar 18 20:48:12 1997 Andrew Cagney <cagney@kremvax.cygnus.com>
3453
3454 * sim-alu.h: Include sim-xcat.h.
3455
d11d59ac
AC
3456Tue Mar 18 13:58:18 1997 Andrew Cagney <cagney@kremvax.cygnus.com>
3457
3458 * Make-common.in (sim-bits.c, sim-core.c, sim-endian.c,
3459 sim-events.c, sim-inline.c, sim-io.c): Define rules for building
3460 these.
3461
3462 * sim-events.c (sim_events_at_large_int): New function. Just
3463 schedules an event every large-int ticks.
3464 (sim_events_init): Call.
3465 (sim_events_tick, sim_events_process): Move async handing to
3466 sim_events_process. Move timer decrement so that it occures after
3467 events have been processed.
3468
3469 * sim-basics.h (struct _engine): Remove declaration.
3470
3471 * sim-events.h, sim-events.c: Rename type to sim_events. Prefix
3472 everything with same. Rename global struct to SIM_DESC.
3473 * sim-core.h, sim-core.c, sim-n-core.c: Ditto for sim_core.
3474 * sim-io.h, sim-io.c: Ditto.
3475
3476 * sim-assert.h: New file. Optional assertion checking macros.
3477 * sim-io.c (sim_io_error): Make just this function tolerant to
3478 null pointers.
3479
3480 * sim-xcat.h: New file. Define concatenate macros.
3481 * sim-basics.h (XCONCAT*): Move to sim-xcat.h.
3482 * sim-n-core.h, sim-n-bits.h, sim-n-endian.h: Explicitly include
3483 concat macros.
3484
3485
752517cc
AC
3486Tue Mar 18 12:44:55 1997 Andrew Cagney <cagney@kremvax.cygnus.com>
3487
3488 * sim-bits.h (LSMASK): New macro. Create mask of LS bits.
3489
86eb1e29
AC
3490Mon Mar 17 18:10:05 1997 Andrew Cagney <cagney@kremvax.cygnus.com>
3491
3492 * sim-inline.h: Add definitions for sim-types.
3493 (ALL_BY_MODULE): New macro, encapsulate full inlining by the
3494 module.
3495
231de1b8
AC
3496Mon Mar 17 15:38:27 1997 Andrew Cagney <cagney@kremvax.cygnus.com>
3497
3498 * sim-events.h: Remove defunct reference to callback struct.
3499
a77aa7ec
AC
3500Mon Mar 17 15:10:07 1997 Andrew Cagney <cagney@kremvax.cygnus.com>
3501
3502 * configure: Re-generate.
3503
3504Mon Mar 17 15:04:47 1997 Andrew Cagney <cagney@kremvax.cygnus.com>
3505
3506 * Make-common.in (CSEARCH): Do not include the gdb directory in
3507 the search path.
3508
3509Mon Mar 17 13:16:26 1997 Andrew Cagney <cagney@kremvax.cygnus.com>
3510
3511 * Make-common.in (SIM_ENDIAN, SIM_HOSTENDIAN, SIM_INLINE,
3512 SIM_WARNING): Drop, requiring the simulator specific Makefile.in
3513 to explicitly incorporate these.
3514
3515 * aclocal.m4 (--enable-sim-alignment); New option. Strongly
3516 specify the alignment restrictions of the target architecture -
3517 without this option all alignment restrictions are accomodated.
3518 (--enable-sim-assert): New option. Conditionally compile in
3519 assertion statements.
3520 (--enable-sim-float): New option. Strongly specify the target's
3521 floating point support.
3522 (--enable-sim-hardware): New option. Specify the hardware devices
3523 included in the simulation.
3524 (--enable-sim-packages): New option. Specify the hardware
3525 packages included in the simulation.
3526 (--enable-sim-regparm): New option. Specify that parameters be
3527 passed in registers instead of on the stack.
3528 (--enable-sim-reserved-bits): New option. Specify that reserved
3529 bits within an instruction are are correctly set.
3530 (--enable-sim-smp): New option. Specify the level of SMP support
3531 to be included in the simulator.
3532 (--enable-sim-stdcall): New option. Specify an alternative
3533 function call convention.
3534 (--enable-sim-xor-endian): New option. Configure xor-endian
3535 support used by some targets to implement bi-endian support.
3536
f2de7dfd
AC
3537Fri Mar 14 19:51:21 1997 Andrew Cagney <cagney@kremvax.cygnus.com>
3538
3539 * aclocal.m4 (--enable-sim-hostendian): New option. Allow the
3540 host endianness to be overridden.
3541 (--enable-sim-endian): Allow the target platform's byte order
3542 to be overridden.
3543 (--enable-sim-inline): Control the inlining of common components.
3544 (--enable-sim-bswap): For compatibility, also define WITH_BSWAP.
3545 (--enable-sim-warnings): Enable additional GCC compiler checks.
3546 * Make-common.in (SIM_ENDIAN, SIM_HOSTENDIAN, SIM_INLINE,
3547 SIM_WARNINGS): Add.
3548
3549 * sim-n-core.h, sim-n-bits.h, sim-n-endian.h: Rename from
3550 sim-*-n.h so that the names are uniq on dos machines
3551 * sim-core.c, sim-bits.c, sim-endian.c: Update.
3552
499aa792
DE
3553Thu Mar 13 12:32:42 1997 Doug Evans <dje@canuck.cygnus.com>
3554
3555 * run.c: #include "libiberty.h".
3556 (main): New locals sd,no_args,sim_argv.
3557 Run buildargv on -a option. Pass argv to sim_open, argv[0]
3558 is program name. Update call to sim_set_callbacks.
3559 Record result of sim_open, pass to other sim_foo routines.
3560
fd435e9f
MM
3561Thu Mar 13 10:24:05 1997 Michael Meissner <meissner@cygnus.com>
3562
3563 * callback.c (os_printf_filtered): Do not call exit(1) or print a
3564 final newline.
3565
3566Thu Mar 6 15:50:28 1997 Andrew Cagney <cagney@kremvax.cygnus.com>
3567
3568 * callback.c: Add os_flush_stdout and vprintf_filtered callbacks.
3569 Route stdout through buffered IO.
3570
3571 * callback.c: Add os_flush_stderr, os_write_stderr,
3572 os_evprintf_filtered functions to route error output through
3573 stderr.
3574
3575 * sim-io.h, sim-io.c (sim_io_flush_stderr, sim_io_flush_stdout):
3576 Correct return type - should be void.
3577
3578Fri Mar 7 20:14:37 1997 Andrew Cagney <cagney@kremvax.cygnus.com>
3579
3580 * sim-basics.h: Clean up. Many macro's moved to sim-inline.h.
3581
3582 * sim-config.h: Ditto. For some options - eg WITH_DEVICES - do
3583 not provide a default value as undefined indicates disable code.
3584
3585Thu Mar 6 15:50:28 1997 Andrew Cagney <cagney@kremvax.cygnus.com>
3586
3587 * sim-core.h, sim-core-n.h, sim-core.c: Borrow code from ppc
3588 directory.
3589 * sim-events.h, sim-events.c: Ditto.
3590 * sim-io.h, sim-io.c: Ditto.
3591
b3e426bc
AC
3592Tue Mar 4 09:35:56 1997 Andrew Cagney <cagney@kremvax.cygnus.com>
3593
3594 * sim-alu.h (ALU_SUB_CA, ALU*_SUB_CA): New alu operation.
3595
3596 * sim-bits.h, sim-bits-n.h, sim-bits.c (LSMASKED*): New macro's
3597 extract the tail or least signifiant bits from an integer of the
3598 specified size.
3599
3600 * sim-bits.h, sim-bits.c: Clean up conditionally compiled #if
3601 WITH_TARGET_BITSIZE so that the compilation will fail when an
3602 unsupported bitsize value is defined.
3603
3604 (INSERTED*): Convert to functions.
3605 (EXTRACTED*): Ditto.
3606
3607 (SIGN_EXTEND, SEXT): Change to more terse name.
3608
17bbcaad
AC
3609Tue Mar 4 09:35:56 1997 Andrew Cagney <cagney@kremvax.cygnus.com>
3610
3611 * sim-inline.h: Allow explicit control over which .c files will be
3612 included by their header.
3613
3614 * sim-inline.h: Allow explicit control over which .c files use the
3615 alternative - REGPARM - parameter passing mechanism.
3616
3617 * sim-inline.h, sim-inline.c: Don't attempt to include any of
3618 icache.c, idecode.c, semantics.c or support.c. Those names are
3619 not generally applicable.
3620
b3e426bc
AC
3621Thu Feb 27 10:17:23 1997 Andrew Cagney <cagney@kremvax.cygnus.com>
3622
3623 * sim-bits.c, sim-bits-n.h (new): Split sim-bits.c into two parts
3624 in a fashion similar to sim-endian-n.
3625
3626 * sim-endian.h: (H_word, L_word, AL_*, VL_*): Extend to include
3627 both value and address macro's.
3628
3629Tue Feb 25 18:51:57 1997 Andrew Cagney <cagney@kremvax.cygnus.com>
3630
3631 * sim-alu.h (ALU16_BEGIN, ALU16_SET, ...): Fill in.
3632
3633 * sim-endian.h (L_word, H_word): Replace MS2W_4, LS2W_4 with more
3634 generic L_word, H_word macro's.
3635
17bbcaad
AC
3636Thu Feb 20 18:36:55 1997 Andrew Cagney <cagney@critters.cygnus.com>
3637
3638 * sim-basics.h: Borrow code from ppc directory.
3639 * sim-bits.c: Ditto.
3640 * sim-bits.h: Ditto.
3641 * sim-config.h: Ditto.
3642 * sim-endian-n.h: Ditto.
3643 * sim-endian.c: Ditto.
3644 * sim-endian.h: Ditto.
3645 * sim-inline.c: Ditto.
3646 * sim-inline.h: Ditto.
3647 * sim-types.h: Ditto.
3648
3649Wed Feb 19 12:40:50 1997 Andrew Cagney <cagney@critters.cygnus.com>
3650
3651 * sim-alu.h (ALU_SET16, ALU_SET32, ALU_SET64, etc): Make available
3652 all the ALU size alternatives and then auto-configure a default.
3653
3654 * sim-alu.h: Copy ppc/idecode_expression.h.
3655
3656Mon Feb 17 10:44:18 1997 Andrew Cagney <cagney@critters.cygnus.com>
3657
3658 * bits.h, bits.c (SIGN_EXTEND32, SIGN_EXTEND64): New functions,
3659 sign extend a bit within a value.
3660
3661 * sim-endian.h, sim-endian-n.h (offset_N): New functions - return
3662 a pointer into the middle of a host word.
3663 * sim-endian.h (MS2W_4, LS2W_4): Use this function.
3664
3665Tue Feb 11 13:46:49 1997 Michael Meissner <meissner@tiktok.cygnus.com>
3666
3667 * callback.c: If HAVE_CONFIG_H is defined, include config.h from
3668 autoconf. If HAVE_UNISTD_H is defined, include unistd.h to get
3669 appropriate definitions of read, write, etc. Add prototype for
3670 system.
3671
1cc9ed29
DE
3672Tue Feb 4 13:24:44 1997 Doug Evans <dje@canuck.cygnus.com>
3673
3674 * Makefile.in (libcommon.a): Delete.
3675 (callback.o,targ-map.o): Delete, moved to Make-common.in.
3676 (gentmap,targ-vals.h,targ-map.c): Likewise.
3677 (run-autoconf): Delete.
3678 * aclocal.m4 (SIM_AC_OUTPUT): Redo creation of Makefile.
3679 (common makefile fragment): Moved back into ...
3680 * Make-common.in: Resurrect.
3681 * configure.in (AC_LINK_FILES): Delete, unnecessary now.
3682 * configure: Regenerated.
3683
8cd89e77
DE
3684Fri Jan 31 07:16:49 1997 Doug Evans <dje@canuck.cygnus.com>
3685
3686 * aclocal.m4 (SIM_AC_COMMON): Move COMMON_MAKEFILE_FRAG from here.
3687 (SIM_AC_OUTPUT): To here.
3688
76e2c9ae
SG
3689Fri Jan 24 10:37:17 1997 Stu Grossman (grossman@critters.cygnus.com)
3690
3691 * aclocal.m4 (COMMON_MAKEFILE_FRAG): Quote a couple of $'s in
3692 comments and single quotes. Fixes a problem found on hpux.
3693
80b7b3a5
SG
3694Thu Jan 23 13:35:03 1997 Stu Grossman (grossman@critters.cygnus.com)
3695
e1dfb8c5 3696 * aclocal.m4: Remove Make-common.in from dependencies.
42653e99 3697 * (distclean): Remove targ-vals.def.
e1dfb8c5 3698
80b7b3a5
SG
3699 * aclocal.m4 (SIM_AC_COMMON): Move contents of Make-common.in
3700 into here. Makes insertion into makefiles easier. Also, change
3701 the way that callback.o, gentmap, targ-vals.h, targ-map.c,
3702 targ-map.o, and run are built. They are now built in the
3703 individual simulator directories, taking sources from ../common as
3704 necessary. This replaces the merging of libcommon.a into
3705 linsim.a, which was problematic for the WinGDB build process.
3706 * run.c: Include config.h from . instead of ../common.
3707 * Make-common.in: Remove. It's no longer necessary.
3708
3709Mon Dec 16 15:02:33 1996 Ian Lance Taylor <ian@cygnus.com>
3710
3711 * Make-common.in (ALL_CLAGS): Put CFLAGS at the end.
3712 (.c.o): Put $(ALL_CFLAGS) before the file being compiled.
3713
3714Wed Dec 11 11:30:58 1996 Jim Wilson <wilson@cygnus.com>
3715
3716 * run.c (main): Set target_byte_order before call to sim_open.
3717
966f47b4
DE
3718Sun Dec 8 18:22:06 1996 Doug Evans <dje@canuck.cygnus.com>
3719
3720 * callback.c: #include <stdlib.h>
3721 (os_error): New function.
3722 (default_callback): Add os_error.
3723
3724Mon Nov 25 19:44:35 1996 Doug Evans <dje@canuck.cygnus.com>
3725
3726 * Make-common.in (Makefile): Set CONFIG_HEADERS="".
3727 * aclocal.m4: Mark the fact that --enable-sim-bswap isn't host
3728 specific.
3729 (SIM_AC_OUTPUT): Don't build Makefile if CONFIG_FILES="".
3730
3731Wed Nov 20 01:11:04 1996 Doug Evans <dje@canuck.cygnus.com>
3732
3733 * run.c: #include ../common/config.h, tconfig.h.
3734 (myname): New static global.
3735 (main): Recognize new options -a, -c. Also recognize -h if h8/300.
3736 Only process -c ifdef SIM_HAVE_SIMCACHE.
3737 Only process -p/-s ifdef SIM_HAVE_PROFILE.
3738 Parse program name from argv[0] and use in error messages.
3739 Pass sim_args to sim_open. Pass prog_args to sim_create_inferior.
3740 Add support for incomplete h8/300 termination indicators.
3741 (usage): Make more verbose.
3742 * aclocal.m4,config.in,tconfig.in,configure.in,configure: New files.
3743 * Makefile.in,Make-common.in,callback.c: New files.
3744 * nltvals.def,gentmap.c,gentvals.sh: New files.
3745
3746Tue Nov 12 13:34:00 1996 Dawn Perchik <dawn@cygnus.com>
3747
3748 * run.c: Include stdarg.h if __STDC__.
3749
3750Tue Oct 15 11:16:31 1996 Jeffrey A Law (law@cygnus.com)
3751
3752 * run.c (main): Don't print out anything if the signal
3753 number is zero (ie no signal).
3754
57bc1a72
MM
3755Tue Oct 15 11:20:44 1996 Michael Meissner <meissner@tiktok.cygnus.com>
3756
3757 * run.c (main): Print out if the program raised a signal.
3758
3759Wed Sep 18 09:52:14 1996 Michael Meissner <meissner@tiktok.cygnus.com>
3760
3761 * run.c (exec_bfd): Rename from sim_bfd, to use the gdb name.
3762 (main): Ditto.
3763
3733d109
JSC
3764Tue Sep 17 11:04:50 1996 James G. Smith <jsmith@cygnus.co.uk>
3765
3766 * run.c (main): Explicitly cast malloc() parameter.
3767
9b280a86
MM
3768Thu Sep 12 11:27:21 1996 Michael Meissner <meissner@tiktok.cygnus.com>
3769
3770 * run.c (sim_bfd): New global to hold the bfd pointer for the
3771 executable.
3772 (main): Initialize sim_bfd.
3773
3774Fri Dec 15 16:27:49 1995 Ian Lance Taylor <ian@cygnus.com>
3775
3776 * run.c (main): Use new bfd_big_endian macro.
3777
3778Wed Nov 8 15:49:49 1995 James G. Smith <jsmith@pasanda.cygnus.co.uk>
3779
3780 * run.c (main): Removed SH specific comments, so source is
3781 generic. Also updated to only load relevant sections. Moved
3782 sim_open() to after callback attach (to match GDB).
3783
3784 * run.1: Removed SH specific comments.
3785
3be50301
JW
3786Sat Oct 21 12:31:01 1995 Jim Wilson <wilson@chestnut.cygnus.com>
3787
3788 * run.c (main): Always return sigrc at end.
3789
3790Tue Oct 10 12:03:13 1995 J.T. Conklin <jtc@rtl.cygnus.com>
3791
3792 * run.c (main): Print error diagnostic and exit if bfd_openr() or
3793 bfd_check_format() fails.
3794
f025d903
SC
3795Thu Sep 28 15:40:36 1995 steve chamberlain <sac@slash.cygnus.com>
3796
3797 * run.c, run.1: From sh directory.
3798
3799
This page took 0.282608 seconds and 4 git commands to generate.