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