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