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