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