1 2003-02-27 Andrew Cagney <cagney@redhat.com>
3 * sim_calls.c (sim_open, sim_create_inferior): Rename _bfd to bfd.
5 2002-09-27 Andrew Cagney <ac131313@redhat.com>
7 * hw_disk.c (hw_disk_init_address): Set device type to "block",
10 2002-06-22 Andrew Cagney <ac131313@redhat.com>
12 * Makefile.in (INTL_SRC): Define.
13 (INTL_CFLAGS): Define.
15 (STD_CFLAGS): Add INTL_CFLAGS.
17 2002-06-17 Elena Zannoni <ezannoni@redhat.com>
19 * psim.c (psim_options): Don't choke when gdb invokes us with
20 the --architecture option, just ignore it.
22 2002-06-16 Andrew Cagney <ac131313@redhat.com>
24 * configure: Regenerated to track ../common/aclocal.m4 changes.
26 2002-06-08 Andrew Cagney <cagney@redhat.com>
28 * main.c: Include "gdb/callback.h" and "gdb/remote-sim.h".
31 2002-05-30 DJ Delorie <dj@redhat.com>
33 * lf.c (lf_print__gnu_copyleft): Convert multiline strings to
35 * gen-idecode.c (print_run_until_stop_body): Likewise.
36 * gen-model.c (gen_model_c): Likewise.
38 2002-04-15 Elena Zannoni <ezannoni@redhat.com>
40 * sim_calls.c (sim_fetch_register, sim_store_register): Return -1 for
41 AltiVec registers as a temporary stopgap.
43 2002-03-24 David O'Brien <obrien@FreeBSD.org>
45 * ppc/hw_disk.c: Export a disk device property.
47 2002-03-23 Andrew Cagney <ac131313@redhat.com>
49 From 2001-12-09 Julien Ducourthial <jducourt@noos.fr>:
50 * ppc-instructions (lswx): Do the register control with the
51 register count. Initialize the right register in the loop.
52 (mtfsfi) : Correct prefix for the instruction.
54 2002-02-24 Andrew Cagney <ac131313@redhat.com>
57 * std-config.h: Fix grammar and typos. Update copyright.
60 2002-01-12 matthew green <mrg@redhat.com>
62 * Makefile.in (tmp-igen): Pass -I $(srcdir) to igen.
63 * igen.c (main): Change -I to add include paths for :include:
65 Implement -G as per sim/igen, with just gen-icache=N support.
66 Call load_insn_table() with the built include path.
68 * ld-insn.c (parse_include_entry): New. Load an :include: file.
69 (load_insn_table): New `includes' argument. Look for :include:
70 entries and call parse_include_entry() for them.
71 (main): Adjust load_insn_table() call.
72 * ld-insn.h (model_include_fields): New enum.
73 (load_insn_table): Update prototype.
74 * table.c (struct _open_table, struct _table): Rework
75 structures to handle included files.
76 (table_push): Move the guts of table_open() here.
78 * table.c (struct _open table, struct table): Make table object an
79 indirect ptr to the current table file.
80 (current_line, new_table_entry, next_line): Make file arg type
82 (table_open): Use table_push.
83 (table_entry_read): Point variable file at current table, at eof, pop
86 * misc.h (NZALLOC): New macro. From sim/igen.
88 * table.h, table.c (table_push): New function.
90 2002-01-04 matthew green <mrg@redhat.com>
92 * bits.c (LSMASKED64): New inline function.
93 (LSEXTRACTED64): Likewise.
94 * bits.h (_LSB_POS, _LSMASKn, LSMASK64): New macros from
96 (LSMASKED64, LSEXTRACTED64): New functions definitions.
97 * Makefile.in (sim-bits.o): Remove target.
99 * main.c (zalloc): Fix typo in error message.
101 2001-12-16 Andrew Cagney <ac131313@redhat.com>
103 * configure.in (sim_fpu): Don't add sim-bits.o.
104 * configure: Re-generate.
106 2001-12-15 matthew green <mrg@redhat.com>
108 * main.c: Include "defs.h", "bfd.h", "callback.h" and "remote-sim.h".
109 (sim_io_error): New function.
110 * sim_calls.c: (sim_io_error): New function.
112 2001-12-14 matthew green <mrg@redhat.com>
114 * Makefile.in (LIB_OBJ): Add @sim_fpu@.
115 (ICACHE_CFLAGS, SEMANTICS_CFLAGS): New variables.
116 (icache.o, semantics.o): Add new ICACHE_FLAGS & SEMANTICS_FLAGS.
117 (sim-fpu.o, sim-bits.o, tconfig.h): New targets.
118 * configure.in: Rename INLINE_LOCALS to PSIM_INLINE_LOCALS. Add a
119 check for sim/common/sim-fpu.c. Output sim_fpu and sim_fpu_cflags.
120 * configure: Regenerate.
121 * device.h (device_find_integer_array_property): Match function definition.
122 * gen-icache.c (print_icache_internal_function_declaration): Rename
123 INLINE_ICACHE to PSIM_INLINE_ICACHE.
124 * gen-idecode.c (print_idecode_run_function_header): Rename INLINE_IDECODE
125 to PSIM_INLINE_IDECODE.
126 * gen-semantics.c (print_semantic_function_header): Rename
127 EXTERN_SEMANTICS to PSIM_EXTERN_SEMANTICS.
128 * gen-support.c (print_support_function_name): Rename INLINE_SUPPORT to
130 * igen.c (print_function_name): Also escape `(' and `)'.
131 (gen_semantics_h): Rename EXTERN_SEMANTICS to PSIM_EXTERN_SEMANTICS.
132 (gen_semantics_c): Likewise. Also output includes for "sim-fpu.h"
133 * inline.h (INLINE_SIM_ENDIAN): Renamed INLINE_PSIM_ENDIAN.
134 (EXTERN_SIM_ENDIAN): Renamed EXTERN_PSIM_ENDIAN.
135 (STATIC_INLINE_SIM_ENDIAN): Renamed STATIC_INLINE_PSIM_ENDIAN.
136 (INLINE_LOCALS): Renamed PSIM_INLINE_LOCALS.
137 (EXTERN_SUPPORT): Renamed PSIM_EXTERN_SUPPORT.
138 (INLINE_SUPPORT): Renamed PSIM_INLINE_SUPPORT.
139 (EXTERN_SEMANTICS): Renamed PSIM_EXTERN_SEMANTICS.
140 (INLINE_SEMANTICS): Renamed PSIM_INLINE_SEMANTICS.
141 (EXTERN_IDECODE): Renamed PSIM_EXTERN_IDECODE.
142 (INLINE_IDECODE): Renamed PSIM_INLINE_IDECODE.
143 (EXTERN_ICACHE): Renamed PSIM_EXTERN_ICACHE.
144 (INLINE_ICACHE): Renamed PSIM_INLINE_ICACHE.
145 * options.c (options_inline): Fix names.
146 * sim-endian-n.h: Change INLINE_SIM_ENDIAN to INLINE_PSIM_ENDIAN.
147 * sim-endian.h: Likewise.
148 * sim-main.h: New file.
149 * std-config.h: Rename INLINE_LOCALS to PSIM_INLINE_LOCALS.
151 2001-12-01 Andrew Cagney <ac131313@redhat.com>
154 * ppc-spr-table: Add SDA and PIR.
156 2001-10-29 Andrew Cagney <ac131313@redhat.com>
158 * tree.c (parse_size): Assert #size-cells > 0.
159 (parse_address): Ditto for #address-cells.
160 (parse_reg_property): Only parse the size when #size-cells is
163 2001-10-25 Andrew Cagney <ac131313@redhat.com>
165 * emul_generic.c (OEA_MEMORY_SIZE): Increase to 4mb.
166 * hw_htab.c (htab_map_binary): Don't try to map the text section
168 * emul_chirp.c (map_over_chirp_note): Default load-base to -1 not
170 (emul_chirp_create): Map in the interrupt table.
172 2001-07-16 Daniel Jacobowitz <drow@mvista.com>
174 * Makefile.in: Add dependencies on $(CPU_H).
176 Wed Mar 7 10:45:12 HST 2001 Glen Nakamura <gen@lava.net>
178 * hw_init.c (dma_file): Fixed problem with loading last 1KB of
181 2001-03-04 Andrew Cagney <ac131313@redhat.com>
183 * emul_netbsd.c [WITH_NetBSD_HOST]: Include <sys/mount.h> and
185 (do_stat): Only do SYS test when SYS_stat defined.
186 (do_sigprocmask): Ditto for SYS_sigprocmask.
187 (do_fstat): Ditto for SYS_fstat.
188 (do_getdirentries): Ditto for SYS_getdirentries.
189 (do_lstat): Ditto for SYS_lstat.
191 2001-01-15 Geoffrey Keating <geoffk@redhat.com>
193 * emul_netbsd.c (do_open): Translate the flag parameter to the
194 open syscall to the numbers supported by the host.
196 2000-12-12 Geoffrey Keating <geoffk@redhat.com>
198 * sim-endian.h: Don't have parameters on macro definitions which
199 are simply renaming functions, to permit use of XCONCAT2 in both
200 the macro name and the arguments in a use of such a definition.
202 2000-11-15 Jim Blandy <jimb@redhat.com>
204 * sim_calls.c: Doc fix.
205 (sim_fetch_register, sim_store_register): Call
206 gdbarch_register_name directly, instead of going through
209 2000-10-24 Geoff Keating <geoffk@cygnus.com>
211 * ppc-instructions (lfsux): Correct XO field of lfsux instruction.
213 Tue May 23 21:39:23 2000 Andrew Cagney <cagney@b1.cygnus.com>
215 * configure: Regenerated to track ../common/aclocal.m4 changes.
217 Fri Apr 28 15:59:27 2000 Andrew Cagney <cagney@b1.cygnus.com>
219 * events.c (event_queue_process): Call update_time_from_event
220 every time an event is removed from the queue.
221 (update_time_from_event): Delete assertion that a negative
222 time_from_event implies an empty event queue.
224 Fri Apr 28 15:53:54 2000 Andrew Cagney <cagney@b1.cygnus.com>
226 * interrupts.c (deliver_hardware_interrupt): Print time trace in
228 * events.c (event_queue_process): Cleanup trace message.
229 (update_time_from_event): Trace full event queue.
231 2000-03-25 Geoff Keating <geoffk@cygnus.com>
233 * ppc-instructions (Disabled_Exponent_Underflow): Increment
234 the exponent when denormalizing.
236 Thu Sep 2 18:15:53 1999 Andrew Cagney <cagney@b1.cygnus.com>
238 * configure: Regenerated to track ../common/aclocal.m4 changes.
240 1999-05-08 Felix Lee <flee@cygnus.com>
242 * configure.in: Use AC_EXEEXT instead of AM_EXEEXT.
243 * configure: Regenerated to track ../common/aclocal.m4 changes.
245 1999-04-02 Keith Seitz <keiths@cygnus.com>
247 * sim_calls.c (POLL_QUIT_INTERVAL): Define. Used to tweak
248 the frequency at which the poll_quit callback is called.
249 (poll_quit_count): New global.
250 (sim_io_poll_quit): Only call the poll_quit callback
251 after the specified POLL_QUIT_INTERVAL.
253 1999-02-22 Jim Lemke <jlemke@cygnus.com>
255 * dc-complex: Force expansion on all bits of field BO.
256 Previously, the least-significant (prediction) bit was ignored.
257 * ppc-instructions (conditional branches): Implement mpc860c0 option.
258 * igen.c (gen_semantics_[ch]): Setup for mpc860c0 option.
259 * psim.c (is_num, psim_options): Added parsing for mpc860c0 option.
260 * interrupts.h: Added "mpc860c0_instruction_program_interrupt".
261 * interrupts.c (program_interrupt): Added handling for above interrupt.
263 1999-02-01 Jim Blandy <jimb@zwingli.cygnus.com>
265 Make the simulator compatible with the MPC750. It would be nicer
266 to make this a real multi-sim, but that's more work than we have
268 * emul_generic.c (emul_add_tree_options): Only require strict
269 alignment if it was explicitly requested at configuration time.
270 Don't make it the default for little-endian machines.
271 * ppc-spr-table (UMMCR0, UMMCR1, UPMC1, UPMC2, USIA, UPMC3, UPMC4,
272 MMCR0, PMC1, PMC2, SIA, MMCR1, PMC3, PMC4, L2CR, ICTC, THRM1,
273 THRM2, THRM3): Plop in the MPC750 SPR registers.
274 (DABR): This is weird. This was HID5, but the PPC spec says this
275 should be DABR; why did some random processor use it for something
276 else? The HID5 entry dates back to the original checkin of the
277 simulator code in 1995, so remove it.
278 * sim_calls.c (register_names): Delete this; since the user can
279 now change GDB's list of register names dynamically, we can't
280 pretend there's a static mapping here.
281 (sim_fetch_register, sim_store_register): Call GDB's REGISTER_NAME
282 function to get the register name. That ought to be accurate.
283 However, we're changing a compile-time dependency (using the
284 REGISTER_NAMES macro) into a link- and run-time dependency
285 (calling REGISTER_NAME, which happens to be a function call on the
288 1999-01-22 Jim Lemke <jlemke@cygnus.com>
290 * igen.c(gen_semantics_[ch]): setup/use of new option
292 interrupts.[ch](mpc860c0_instruction_program_interrupt): added.
293 ppc-instructions(the four branch insn groups): detect problematic br's.
294 psim.c(is_num - added, psim_options): Parse and init new option.
295 These changes are currently under #ifdef WITH_OPTION_MPC860C0.
297 1998-12-01 Ken Raeburn <raeburn@cygnus.com>
299 * hw_nvram.c (hw_nvram_bcd): Force value to fit in 0..99.
301 Fri Nov 20 12:17:28 1998 Andrew Cagney <cagney@b1.cygnus.com>
303 * main.c (sim_io_poll_quit): Stub function.
305 * events.c (SIM_EVENTS_POLL_RATE): Define.
306 (sim_events_poll): Copy function from common/sim-events.c.
307 (event_queue_init): Copy scheduling of sim_events_poll from same.
309 * sim_callbacks.h, sim_calls.c (sim_io_poll_quit): New function,
310 poll the external environment.
312 1998-11-19 Michael Meissner <meissner@cygnus.com>
314 * ppc-instructions (is_{NaN,inf}): Use unsigned64 to get the
315 fractional type, so that quiet NaN's aren't treated like
318 Mon Sep 28 09:42:45 1998 Drew Moseley <dmoseley@cygnus.com>
320 * table.c (table_open): For cygwin hosts, we need to use the
321 return value from the read routine as the number of bytes to
322 process. This apparently is due to text-mode vs binary-mode. If
323 the mounts are done text-mode, then the size returnedby fstat()
324 may be different than the number of bytes "read" in text mode.
326 Sun Oct 4 00:50:47 1998 Felix Lee <flee@cygnus.com>
328 * emul_netbsd.c (do_open): fix order-of-evaluation problem.
333 1998-09-03 Michael Meissner <meissner@cygnus.com>
335 * emul_{netbsd,unix}.c: Update copyright year.
337 Mon Jun 29 10:57:36 1998 Michael Snyder <msnyder@cleaver.cygnus.com>
339 * sim_calls.c (sim_fetch_register, sim_store_register):
340 return zero when nothing to do.
342 1998-06-26 Michael Meissner <meissner@cygnus.com>
344 * configure.in (AC_CHECK_HEADERS): Don't check for sys/mount.h.
345 * configure: Regenerate.
346 * emul_{netbsd,unix}.c (toplevel): No longer try to include
347 sys/mount.h. It conflicts on Linux when gnu libc2 is used.
349 Tue May 12 12:10:33 PDT 1998 James Ingham <jingham@leda.cygnus.com>
351 * Makefile.in: The run target depended on a target psim$(EXEEXT),
352 but there was no such target, only plain psim. So I changed the
353 run target to depend on psim.
355 Sat May 2 01:10:12 1998 Stu Grossman <grossman@babylon-5.cygnus.com>
357 * aclocal.m4: Remove defs of AM_EXEEXT and AM_CYGWIN32. These are
358 now defined in ../common/aclocal.m4, and the double definition causes
359 problems with AC_SUBST of EXEEXT.
360 * configure: Regenerate.
362 Wed Apr 29 15:44:52 1998 Geoffrey Noer <noer@cygnus.com>
364 * aclocal.m4: new file for AM_EXEEXT macro
365 * configure.in: call AM_EXEEXT
366 * configure: regenerate with autoconf 2.12.1.
367 * Makefile.in: add EXEEXT support
369 Sun Apr 26 15:31:55 1998 Tom Tromey <tromey@creche>
371 * configure: Regenerated to track ../common/aclocal.m4 changes.
374 Sun Apr 26 15:19:51 1998 Tom Tromey <tromey@cygnus.com>
376 * acconfig.h: New file.
377 * configure.in: Reverted change of Apr 24; use sinclude again.
378 Don't call AC_C_CROSS.
380 Fri Apr 24 14:16:40 1998 Tom Tromey <tromey@creche>
382 * configure: Regenerated to track ../common/aclocal.m4 changes.
385 Fri Apr 24 11:18:46 1998 Tom Tromey <tromey@cygnus.com>
387 * Makefile.in (top_builddir): New macro.
388 (INTLLIBS): New macro.
389 (INTLDEPS): Likewise.
390 (psim): Depend on INTLDEPS; link against INTLLIBS.
391 * configure.in: Call CY_GNU_GETTEXT.
393 Wed Apr 22 14:28:48 1998 Michael Meissner <meissner@cygnus.com>
395 * configure: Regenerate with autoconf 2.12.1.
397 Fri Mar 13 09:25:58 1998 Andrew Cagney <cagney@b1.cygnus.com>
399 * psim.c (psim_read_register, psim_write_register): Handle updates
402 * registers.c (register_description): Reconize "FPSCR".
404 * emul_netbsd.c (emul_netbsd_create): When FP available, enable
405 MSR FP exception mode. Do not enable FPSCR bits.
406 * emul_unix.c (emul_unix_create): Ditto.
408 Tue Feb 17 12:48:58 1998 Andrew Cagney <cagney@b1.cygnus.com>
410 * sim_calls.c (sim_store_register, sim_fetch_register): Pass in
411 length parameter. Return -1.
413 Mon Feb 9 14:13:14 1998 Andrew Cagney <cagney@b1.cygnus.com>
415 * ppc-instructions (fdiv, fdivs): Check for divide by zero.
416 (is_invalid_zero_divide, invalid_zero_divide_operation): New
419 Wed Dec 10 17:38:28 1997 Andrew Cagney <cagney@b1.cygnus.com>
421 * sim_calls.c (sim_load): Do not parse PROG using buildargv, use
424 1997-11-05 Felix Lee <flee@cygnus.com>
426 * emul_chirp.c: #ifdef HAVE_UNISTD_H
428 Wed Oct 15 08:50:54 1997 Andrew Cagney <cagney@b1.cygnus.com>
430 * corefile.c (core_attach): Pad out allocated memory regions so
431 that they are always correctly aligned.
432 (struct _core_mapping, core_map_attach, core_init,
433 new_core_mapping): Change free_buffer to type void*.
435 Mon Oct 6 18:09:26 1997 Michael Meissner <meissner@cygnus.com>
437 * sim_calls.c (zfree): Call free correctly.
439 Mon Sep 29 10:05:01 1997 Andrew Cagney <cagney@b1.cygnus.com>
441 * sim_calls.c (zfree): Use free, not mfree.
442 (sim_io_flush_stdoutput): Replace gdb_flush with callback ->
445 Fri Sep 26 09:50:29 1997 Andrew Cagney <cagney@b1.cygnus.com>
447 * ppc-instructions (sraw, slw, srw): From Charles Lefurgy, Fix
448 mask extracting shift amount. Correctly condition for setting XER
450 (ldhau): From Johannes Reisinger, update rA after load.
452 Tue Sep 9 22:13:23 1997 Felix Lee <flee@cygnus.com>
454 * basics.h (CONCAT*): token-pasting macros, if ALMOST_STDC,
456 * words.h: __int64 instead of long long for MSVC.
458 Wed Aug 27 10:24:15 1997 Andrew Cagney <cagney@b1.cygnus.com>
460 * sim_calls.c (sim_create_inferior): Check the simulator was
461 initialized before creating inferior.
463 * idecode_expression.h (ALU_END): From Charles Lefurgy - Extract
464 sign bit using 64 bit and not a 32 bit mask.
466 Wed Aug 27 10:15:48 1997 Andrew Cagney <cagney@b1.cygnus.com>
468 * sim_calls.c (sim_load): From Ian Lance Taylor - free argv after
469 it has been used, not before.
471 Tue Aug 26 10:41:35 1997 Andrew Cagney <cagney@b1.cygnus.com>
473 * sim_calls.c (sim_kill): Delete.
474 (sim_create_inferior): Add ABFD argument.
475 (entry_point): Delete variable.
476 (sim_load): Move setting of PC from here.
477 (sim_create_inferior): To here.
479 Mon Aug 25 16:17:06 1997 Andrew Cagney <cagney@b1.cygnus.com>
481 * sim_calls.c (sim_open): Add ABFD argument.
483 Thu Jul 3 10:18:06 1997 Andrew Cagney <cagney@b1.cygnus.com>
485 * ppc-instructions (PPC_INSN_INT): From Michael Thies - Monitoring
486 CR register updates dependant on RC value had logic backwards.
488 * ppc-instructions (Load String Word Immediate): From Brad Parker
489 - sense of wrap test in check for overwriting RA wrong.
490 (Load String Word Indexed): Ditto.
492 * configure.in: From Erik Landry - set sim_default_model not
493 sim_model for sim-default-model option.
494 * configure: Regenerate.
496 * interrupts.c (check_masked_interrupts): Schedule a hardware
497 interrupt delivery when FP interrupts get enabled.
498 (program_interrupt): Generate FP exceptions instead of aborting.
499 (deliver_hardware_interrupt): Deliver a FP exception if so
502 * registers.h: Add definition of fpscr_vx_bits.
504 * idecode_expression.h (FPSCR_END): Always update FEX and VX bits
506 (FPSCR_END): Explicitly check for possible floating point
507 exception conditions.
508 (FPSCR_BEGIN): Simplify.
510 * ppc-instructions (Move From FPSCR): Enable.
511 (Move To FPSCR Bit 1): Ditto.
512 (Move To FPSCR Bit 0): Ditto.
513 (Move To FPSCR Field Immediate): Ditto.
514 (Move to Condition Register from FPSCR): Simplify.
515 (invalid_arithemetic_operation): Generate a QNaN when invalid
516 operation exception disabled.
518 Tue May 20 10:22:50 1997 Andrew Cagney <cagney@b1.cygnus.com>
520 * sim_calls.c (sim_open): Add callback argument.
521 (sim_set_callbacks): Delete.
523 Tue Apr 22 22:36:57 1997 Mike Meissner <meissner@cygnus.com>
525 * sim_callbacks.h (error): Make declaration match gdb's.
526 * main.c (error): Ditto.
528 Fri Apr 18 17:03:09 1997 Andrew Cagney <cagney@b1.cygnus.com>
530 * sim_calls.c (sim_stop_reason): Simplify. Was running implies
531 stopped/SIGINT. Exit implies a status code.
533 * psim.c (cntrl_c_simulation): From main.c. Event function that
535 (psim_stop): New. Asynchronously schedule a stop simulator event.
536 (psim_run_until_stop): Delete. Made redundant by psim_stop.
538 * main.c (cntrl_c): Update.
539 (cntrl_c_simulation): Moved to psim.c.
541 * sim_calls.c (sim_stop): New function. Use psim_stop which
542 schedules a stop event.
543 (sim_resume): Drop SIGINT handler, now in gdb/main.c.
544 (sim_resume): Use psim_run as stop variable no longer needed.
546 Fri Apr 18 17:03:08 1997 Andrew Cagney <cagney@b1.cygnus.com>
548 * psim.c (psim_options): Handle -E option correctly.
549 (psim_usage): Document.
551 Thu Apr 17 03:28:03 1997 Doug Evans <dje@canuck.cygnus.com>
553 * psim.c (psim_options): Ignore -E option (sets endianness).
554 * sim_calls.c: #include bfd.h.
555 (entry_point): New static local.
556 (sim_load): Return SIM_RC. New arg abfd. Set start address from bfd.
557 (sim_create_inferior): Return SIM_RC. Delete arg start_address.
559 Tue Apr 15 14:57:18 1997 Ian Lance Taylor <ian@cygnus.com>
561 * Makefile.in (INSTALL): Set to @INSTALL@.
562 (INSTALL_XFORM, INSTALL_XFORM1): Remove.
563 (install): Depend upon installdirs. Use $(program_transform_name)
564 directly, rather than using $(INSTALL_XFORM).
565 (installdirs): New target.
567 Fri Apr 4 17:54:36 1997 Jim Wilson <wilson@cygnus.com>
569 * Makefile.in (tmp-hw, tmp-pk): Use for loop to eliminate duplicates
570 rather than the non-portable cat -n.
572 Mon Apr 14 16:29:51 1997 Ian Lance Taylor <ian@cygnus.com>
574 * Makefile.in (INSTALL): Change install.sh to install-sh.
576 Tue Apr 1 18:15:14 1997 Jim Wilson <wilson@cygnus.com>
578 * ppc-instructions: Change milhwu to mulhwu.
580 Wed Apr 2 15:38:08 1997 Doug Evans <dje@canuck.cygnus.com>
582 * sim_calls.c (sim_open): New arg `kind'.
584 Wed Apr 2 14:51:17 1997 Ian Lance Taylor <ian@cygnus.com>
586 * COPYING: Update FSF address.
588 Tue Mar 25 16:17:59 1997 Andrew Cagney <cagney@kremvax.cygnus.com>
590 * main.c (sim_io_read_stdin): Only compile unbuffered IO code if
591 all the required features are supported by the host OS.
593 Tue Mar 25 12:13:02 1997 Andrew Cagney <cagney@kremvax.cygnus.com>
595 * emul_bugapi.c (emul_bugapi_create): Guard against NULL images.
597 * configure.in (enable-sim-endain): Correct typo in usage (from
598 Erik Landry <landry@ENGR.ORST.EDU>).
599 * configure: Re-generate.
601 Fri Mar 14 18:23:02 1997 Andrew Cagney <cagney@kremvax.cygnus.com>
603 * Makefile.in (targ-vals.def): Re-do rule so that it works with
604 FreeBSD's make. Didn't like $<.
606 Thu Mar 13 12:55:48 1997 Doug Evans <dje@canuck.cygnus.com>
608 * sim_calls.c (sim_open): New SIM_DESC result. Argument is now
610 (other sim_*): New SIM_DESC argument.
612 Thu Feb 13 10:35:14 1997 Andrew Cagney <cagney@phydeaux.cygnus.com>
614 * ppc-opcode-simple-array, ppc-opcode-simple-goto,
615 ppc-opcode-simple-switch, ppc-opcode-complex-array,
616 ppc-opcode-complex-goto, ppc-opcode-complex-switch,
617 ppc-opcode-jump, ppc-opcode-goto, ppc-opcode-flat: Delete,
618 superseeded by --sim-decode-mechanism option.
620 * ppc-opcode-simple, dc-simple: Rename to be 8.3
621 * ppc-opcode-complex, dc-complex: Ditto.
622 * ppc-opcode-stupid, dc-stupid: Ditto.
623 * ppc-opcode-test-1, dc-test.01: Ditto.
624 * ppc-opcode-test-2, dc-test.02: Ditto.
626 * configure.in (--enable-sim-opcode): Change prefix to dc- instead
629 Wed Feb 12 19:33:45 1997 Andrew Cagney <cagney@phydeaux.cygnus.com>
631 * Many of the ppc-opcode-* files are identical baring the type of
632 lookup table. Instead of having multiple tables, igen can do this
633 via an additional option.
635 * ld-decode.h, ld-decode.c (force_decode_gen_type): New function,
636 allow the type of generated table specified in the decode file to
639 * ld-decode.c (load_decode_table): Allow the table type to be
642 * igen.c (main): Add -T <mechanism> option so that an overriding
643 instruction decode mechanism can be specified.
645 * configure.in: New option --sim-decode-mechanism to control
646 igen's new -T <mechanism> flag.
647 * Makefile.in (IGEN_FLAGS): Add IGEN_IDECODE_MECHANISM set by the
649 * configure: Regenerate.
651 Tue Feb 11 13:49:10 1997 Michael Meissner <meissner@tiktok.cygnus.com>
653 * events.c (event_queue_create): Don't use NULL to initialize an
655 (even_queue_{init,schedule_after_signal,tick}): Conditionalize use
656 of sigprocmask to appropriate autoconf test.
658 * main.c ({cntrl_c,main}): Use RETSIGTYPE for signal return type,
660 * sim_calls.c (sim_{ctrl_c,resume}): Ditto.
662 * Makefile.in (callback.o): Define HAVE_CONFIG_H, so callback.c
663 includes our config.h.
665 Tue Feb 4 13:42:59 1997 Doug Evans <dje@canuck.cygnus.com>
667 * configure.in: Fix typo in test for callback.c.
668 * configure: Regenerated.
670 Fri Feb 7 10:04:25 1997 Andrew Cagney <cagney@kremvax.tpgi.com.au>
672 * emul_chirp.c (emul_chirp_create): Handle a virtbase of -1 being
673 found in the device tree.
675 Wed Feb 5 10:56:27 1997 Andrew Cagney <cagney@kremvax.tpgi.com.au>
677 * Property create/initialization still wasn't correctly ordered.
678 Should be delaying everything related to ihandle creation until
679 after the rest of the tree has been established.
681 * device.c (device_find_ihandle_runtime_property): Update.
682 (device_add_ihandle_runtime_property): Update.
684 * tree.c (parse_ihandle_property): Delay lookup of the device to
685 be opened until the ihandle initialization phase.
686 * tree.c (print_properties): Update.
688 Wed Feb 5 10:56:27 1997 Andrew Cagney <cagney@kremvax.tpgi.com.au>
690 * gen-icache.c (print_icache_extraction): Add a reason parameter.
691 Augment each extracted field with a comment citing the codes
692 origin. Should simplify tracking down incorrect cache
695 Tue Feb 4 17:44:51 1997 Andrew Cagney <cagney@kremvax.tpgi.com.au>
697 * gen-icache.c: Generalize code handling XXX_is_NNN so that it
698 works for normal and boolean table entries.
700 * psim.c (psim_write_memory): last_cpu == -1 or nr_cpus is now
701 valid. Handle this just like *_{read,write}_register now handles
704 Mon Feb 3 17:18:16 1997 Andrew Cagney <cagney@kremvax.tpgi.com.au>
706 * events.c (insert_event_entry): Correct loop termination
709 Fri Jan 31 16:20:26 1997 Andrew Cagney <cagney@kremvax.tpgi.com.au>
711 * psim.c (psim_options): Add new option -c for max-iterations or
713 (psim_usage): Document.
714 (psim_max_iterations_exceeded): New function, abort simulation if
715 max iterations exceeded.
717 * gen-idecode.c: Re-work the table lookup code so that it assumes
718 that the entry is a leaf by default. Simplify the boolean table
719 entry code so that it involves a mask + test instead of shift +
722 * gen-idecode.c: Correct generated igen body so that it no drops
723 or doubles clock interrupts.
726 Thu Jan 30 11:23:20 1997 Andrew Cagney <cagney@kremvax.tpgi.com.au>
728 * Makefile.in (BUILT_SRC_WO_CONFIG): Change targ-vals.* to
731 * configure.in (sim_callback, sim_targ_vals): Set sim_targ_valls
732 if common callback is present.
734 Wed Jan 29 12:32:41 1997 Michael Meissner <meissner@tiktok.cygnus.com>
736 * configure.in (sim_callback): If the gdb is post 4.16, configure
737 callback support from the common directory.
738 * configure: Regenerate.
740 * Makefile.in (BUILT_SRC_WO_CONFIG): Add targ-vals.{h,def} and
742 (GDB_OBJ): Add callback support configured in.
743 (gentmap,targ-vals.def): Build from common directory.
744 (targ-vals.h,targ-map.c): Build by running gentmap.
745 (callback.o): Build from source in common directory.
746 (targ-map.o): Add dependency.
747 (clean): Remove gentmap.
749 Wed Jan 29 12:14:19 1997 Andrew Cagney <cagney@kremvax.tpgi.com.au>
751 * igen wasn't aborting if the opcode table contained no valid
754 * misc.c (name2i): Possibly abort if an invalid name is
756 * ld-decode.c: Abort if the table type isn't found.
758 Wed Jan 29 12:14:19 1997 Andrew Cagney <cagney@kremvax.tpgi.com.au>
760 * When performance monitoring is disabled, it is still possible to
761 determine the simulation speed by looking at the number of elapsed
762 ticks recorded by the event queue.
764 * psim.c (psim_write_register, psim_read_register): Force the cpu
765 to zero when it is either of `-1' or `nr_cpus'. In both cases the
766 next cpu would be zero any way.
768 * mon.c (mon_print_info): If possible, print the system cycle
769 performance. This is an indication of the number of instructions
772 Wed Jan 29 12:14:19 1997 Andrew Cagney <cagney@kremvax.tpgi.com.au>
774 * The code to allow an event queue to be updated during a signal
775 was missing. For main.c, a cntrl-c simulation termination wasn't
778 * The simulation would not correctly restart if an event requested
779 that the simulation be halted.
781 * psim.c (psim_options): Add hack to -i option to optionally
782 include a level vis -i2.
783 (psim_usage): Document.
785 * main.c (cntrl_c, cntrl_c_simulation): New functions. When a
786 cntrl-c occures schedule an event to halt the simulation.
787 (main): Catch CNTRL-C signals with the function cntrl_c.
789 * events.c (event_queue_process): Mask interrupts while
790 manipulating the async event queue.
791 (event_queue_init): Ditto.
792 (event_queue_schedule_after_signal): Ditto.
794 * events.c (event_queue_process): Mark the event queue as being in
795 the processing state when processing has started. Adjust code
796 so that it is tolerant of halts.
797 (event_queue_init): Start the event queue out with processing
799 (event_queue_tick): Check that processing isn't still being
802 * gen-idecode.c (print_run_until_stop_body): Call
803 event_queue_process_events to clear possibly pending events before
804 starting a simulation run. Re-arange main loop so that simulator
805 is correctly restarted when an event halts the simulation.
807 * psim.c (psim_halt): Handle an event halting the simulation.
808 * psim.c (psim_init): Adjust initial cpu - == -1 - to match
811 Wed Jan 29 12:14:19 1997 Andrew Cagney <cagney@kremvax.tpgi.com.au>
813 * ppc-opcode-complex: Correct typo - was expanding ORA instead of
814 RA. Based on instruction frequency stats, expand additional
816 * ppc-instructions: Change all `RA == 0' to RA_is_0.
818 * ppc-opcode-stupid: Move all but the basic table in -complex into
819 here. Update to new format.
821 * Makefile.in (tmp-defines): New target. Force defines.h to always
822 be built. Hence get ppc-opcode-goto to build.
824 Tue Jan 28 13:00:19 1997 Andrew Cagney <cagney@kremvax.tpgi.com.au>
826 * hw_com.c (hw_com_instance_read, hw_com_instance_write):
829 Thu Jan 23 09:07:26 1997 Andrew Cagney <cagney@kremvax.tpgi.com.au>
831 * hw_trace.c (hw_trace_init_data): Delete. The trace options need
832 to be initialized independant of the rest of the simulation
833 initalization. Otherwize a trace option explictly set from gdb
834 could be overridden by hw_trace.
836 * psim.c (psim_options): Clarify reason why the trace ioctl occures.
838 * FIXME: The trace code is too scattered - hw_trace.c, psim.c,
839 debug.c. It could be much simpler.
841 Thu Jan 23 09:07:26 1997 Andrew Cagney <cagney@kremvax.tpgi.com.au>
843 * Some devices support removable media. Add hooks to the disk
844 device so that it supports this.
846 * device.c (device_add_string_array_property,
847 device_find_string_array_property): New functions, manipulate
848 properties containing an array of strings.
849 (device_find_string_property): Allow a string array.
850 (device_init_static_properties): Update.
851 (device_init_runtime_properties): Update.
853 * hw_disk.c (hw_disk_ioctl): Add ioctl for changing the disk
854 media. If no file image is specified, use the next one in the
856 (hw_disk_init_address): Change the file property so that it is a
857 string array - use the first entry for the initial file image.
859 * tree.c (print_string_aray_property): New function - print a
861 (print_properties): Adjust.
862 (print_string): Write a string, handling double quotes.
864 * device.h: Define an ioctl to `change-media' with an optional new
867 * hw_disk.c: Allow floppy disk devices to be specified.
869 * psim.c (psim_command): New function, parse more complex psim
870 commands such as "change-media" and "trace".
871 * sim_calls.c (sim_do_command): Use.
873 Wed Jan 22 09:38:33 1997 Andrew Cagney <cagney@kremvax.tpgi.com.au>
875 * For expressions like (RA == 0) that are entered in to the cache
876 as RA_is_0. If possible generate the result of the expression so
877 that the compiler gets a better chance of eliminating dead
880 * gen-icache.c (print_icache_extraction): For a cache entry of
881 the form <name>_is_<const> where it is a boolean field, generate
882 the result of the expression instead of the expression its self.
883 (print_icache_body): Remove code that was looking for *_is_0 and
884 then generating corresponding definitions.
886 * gen-icache.c (print_icache_struct): If there is no cache, do not
887 output expressions in idecode.h file.
889 * gen-icache.c (print_icache_body): Output them here.
891 * ppc-opcode-complex: Clarify constant values for SPR==LR register
894 * ppc-cache-rules (RA_is_0, SPR_is_256): Two new cache entries.
896 Wed Jan 22 12:24:52 1997 Andrew Cagney <cagney@kremvax.tpgi.com.au>
898 * The code that put values in and extracted values from the cache
899 was too compilicated. The cache table did not allow values to be
900 computed from cache entries. #defines could only be used when a
901 cache was present, remove the restriction.
903 * ld-cache.h, ld-cache.c: Add a new cache entry type - SCRATCH. A
904 scratch variable is defined when a cache entry is beinf
905 filled. Change the definition of a COMPUTE variable to be defined
906 when the cache entry is being used.
907 * gen-icache.c: Update.
909 * ld-cache.h, ld-cache.c: Change field names so that their meaning
910 is more obvious. old_name->field_name, new_name->derived_name.
911 * gen-icache.c: Update
913 * gen-icache.h, gen-icache.c (print_icache_body): Make the three
914 different types of cache code - put into cache, extract from
915 cache, no cache - an explicit argument to print_icache_body.
916 * gen-icache.c (print_icache_extraction): Ditto.
918 * gen-semantics.c (print_c_semantic): Update use.
919 * gen-idecode.c (print_jump_insn): Update use.
920 * gen-icache.c (print_icache_function): Update use.
922 * igen.c (main): Change 'R' option so that it does not force the
925 * configure.in (enable-sim-icache): Clarify description. Make
926 #define one of the defaults regardless of the cache. Probably
927 should revamp and add a separate option.
929 Tue Jan 21 13:26:10 1997 Andrew Cagney <cagney@kremvax.tpgi.com.au>
931 * pk_disklabel.c (block_is_fdisk): Tidy up traces - use dos
933 (pk_disklabel_create_instance): Partition 1..4 are valid - not
935 (is_iso9660): New function, verify a CD9660 File system.
936 (pk_disklabel_create_instance): Start expanding so that active
937 partition selection is supported.
939 Mon Jan 20 11:20:15 1997 Andrew Cagney <cagney@kremvax.tpgi.com.au>
941 * The cap object was retaining a reference to the instance of a
942 device after it was deleted. Instead add and remove cap's from the
943 cap db as they are created and deleted. This ensuring that a
944 capibility is only used during the lifetime of the corresponding
947 * cap.h, cap.c: Correct cap type - was signed32 should be
950 * cap.c (cap_add, cap_remove): New methods for cap object that
951 allow the explicit addition and removal of internal objects that
954 * cap.c (cap_init): Rewrite. Verify that the only objects
955 remaining in the cap data base are those that were entered first.
956 Thse objects will be the permenant ones.
957 * device.c (device_init_address): Remember to initialize the cap
960 * device.c (device_create_instance_from): Explicitly add device
961 instances to the cap database. Simplify create code.
962 (device_instance_delete): Explicitly remove device instances from
965 * device.c (device_create_from): Explicitly add a device to the
968 * device.c (device_create_from): Always set the cap members.
970 * hw_disk.c: Output the instance when tracing.
972 Sun Jan 19 16:44:29 1997 Andrew Cagney <cagney@kremvax.tpgi.com.au>
974 * tree.c (split_device_specifier): Add support for aliases when
975 looking up a device. Now needs a device as an argument.
976 (split_property_specifier): Ditto.
978 Sun Jan 19 15:28:23 1997 Andrew Cagney <cagney@kremvax.tpgi.com.au>
980 * The memory "claim" and "release" methods take an address and
981 size as arguments. These may be multi cell values. Initially fix
982 the memory code so that they check/detect this. Leave the
983 adjustment of any clients to later.
985 * hw_memory.c (hw_memory_instance_claim,
986 hw_memory_instance_release): Handle multi-cell memory devices.
988 * hw_memory.c (hw_memory_instance_claim): Be tolerant towards the
989 release of memory regions that were not claimed.
991 Fri Jan 17 12:01:07 1997 Andrew Cagney <cagney@kremvax.tpgi.com.au>
993 * device.h, device.c (device_instance_call_method): Correct return
994 type - can return either 0 or -1, hence should be a signed type.
995 * device_table.h: Ditto.
997 * hw_memory.c (hw_memory_instance_claim,
998 hw_memory_instance_release): Update.
999 * hw_disk.c (hw_disk_max_transfer, hw_disk_block_size,
1000 hw_disk_nr_blocks): Ditto.
1002 Fri Jan 17 11:50:13 1997 Andrew Cagney <cagney@kremvax.tpgi.com.au>
1004 * emul_chirp.c (chirp_emul_claim): Implement using the "claim"
1005 method belonging to "/chosen/memory".
1006 (chirm_emul_release): Ditto.
1008 * Makefile.in (LIB_INLINE_SRC): Remove emul_* from list of files
1009 that are inlined. These modules are called via a table and are
1012 * hw_init.c (update_for_binary_section): Fix failure to allocate
1013 memory used by the binary in real-mode executions. If "claim"
1014 property is present, allocate memory from the "/chosen/memory"
1017 * emul_chirp.c (emul_chirp_create): Specify that memory should be
1018 claimed when loading a real image.
1020 * hw_memory.c (hw_memory_instance_claim): Don't page align memory
1023 * hw_memory.c (hw_memory_instance_release): Avoid infinite loop
1024 when merging adjacent memory chunks.
1026 Thu Jan 16 08:51:25 1997 Andrew Cagney <cagney@kremvax.tpgi.com.au>
1028 * vm.h (vm_data_map_read_buffer, vm_data_map_write_buffer): Add
1029 optional PROCESSOR & CIA args so that this routine also abort an
1032 * vm_n.h (vm_data_map_read_N, vm_data_map_write_N): For a
1033 miss-aligned access when a transfer fails abort.
1035 * emul_bugapi.c (emul_bugapi_do_write): Use emul_read_buffer
1036 instead of the vm_read_buffer.
1037 * emul_netbsd.c (do_write): Ditto.
1038 * emul_unix.c (do_unix_write): Ditto.
1040 Wed Jan 15 14:38:25 1997 Andrew Cagney <cagney@kremvax.tpgi.com.au>
1042 * configure.in (--enable-sim-jump): Default is NULL and not -E.
1043 * configure: Regenerate.
1045 * basics.h (__attribute__): Enable attributes if GCC >= 2.6.
1046 (UNUSED): Only enable UNUSED if GCC >= 2.7.
1048 * gen-icache.c (print_icache_extraction): Print UNUSED macro
1049 instead of explicit __unused__ attribute.
1050 (print_icache_body): Ditto.
1051 * idecode_expression.h (FPSCR_BEGIN): Use UNUSED.
1053 Wed Jan 15 13:54:50 1997 Andrew Cagney <cagney@kremvax.tpgi.com.au>
1055 * cpu.h, cpu.c (cpu_synchronize_context): Add CIA argument as
1058 * vm.c (vm_synchronize_context): Add PROCESSOR and CIA as
1059 arguments so that there is a reference point for recovery.
1060 (vm_synchronize_context): Pass processor+cia for errors.
1061 (om_unpack_sr): Ditto.
1062 (om_unpack_srs): Ditto.
1063 * vm.c (vm_create): Review error messages.
1065 * vm.c: Include "cpu.h" so that cpu_error is visible.
1067 * ppc-instructions (Return From Interrupt): Pass CIA.
1068 (Instruction Synchronize): Ditto.
1069 * psim.c (psim_init): Ditto.
1071 Wed Jan 15 12:25:11 1997 Andrew Cagney <cagney@kremvax.tpgi.com.au>
1073 * cpu.h, cpu.c (cpu_error): Aborts simulation with error message,
1074 but also saves current processor state.
1076 * basics.h: Move #include <stdarg.h> to here from device_table.h.
1078 * interrupts.c (perform_oea_interrupt): Use. No longer loose CIA
1079 when simulation aborted.
1080 (program_interrupt): Ditto.
1081 (floating_point_unavailable_interrupt): Ditto.
1082 (alignment_interrupt): Ditto.
1083 (floating_point_assist_interrupt): Ditto.
1084 (perform_oea_interrupt): Ditto.
1085 (machine_check_interrupt): Ditto.
1087 Tue Jan 14 12:19:10 1997 Andrew Cagney <cagney@kremvax.tpgi.com.au>
1089 * ppc-instructions (Move from Special Purpose Register): Support
1092 Mon Jan 13 16:58:12 1997 Andrew Cagney <cagney@kremvax.tpgi.com.au>
1094 * debug.h, debug.c: Add "interrupts" trace option.
1096 * interrupts.c (data_storage_interrupt): Add tracing.
1097 (machine_check_interrupt): Ditto.
1098 (instruction_storage_interrupt): Ditto.
1099 (alignment_interrupt): Ditto.
1100 (program_interrupt): Ditto.
1101 (floating_point_unavailable_interrupt): Ditto.
1102 (system_call_interrupt): Ditto.
1103 (floating_point_assist_interrupt): Ditto.
1104 (deliver_hardware_interrupt): Ditto.
1106 * interrupts.c (program_interrupt): For UEA mode, halt the
1107 processor - so that the current state is saved - instead of
1109 (floating_point_unavailable_interrupt): Ditto.
1110 (floating_point_assist_interrupt): Ditto.
1112 Thu Jan 2 09:10:41 1997 Andrew Cagney <cagney@kremvax.tpgi.com.au>
1114 * interrupts.c (perform_oea_interrupt): Halt rather than abort on
1117 Wed Jan 1 22:54:52 1997 Andrew Cagney <cagney@kremvax.tpgi.com.au>
1119 * ppc-instructions (Store Multiple Word, Load Multiple Word):
1122 * tree.c (print_properties): For an array consider printing it out
1123 as an integer array.
1125 * hw_memory.c (hw_memory_init_address): If an "available" property
1126 is present, use that to initialize the available memory instead of
1127 using the reg property.
1129 * emul_generic.c (emul_add_tree_hardware): Add "available"
1130 property to memory device.
1132 Fri Dec 20 13:19:07 1996 Andrew Cagney <cagney@kremvax.tpgi.com.au>
1134 * ppc-instructions (Rotate Left Word then AND with Mask): Enable.
1136 * device.c (device_instance_call_method): Was only looking at the
1139 * hw_disk.c (hw_disk_nr_blocks): Implement #blocks method.
1140 (hw_disk_block_size): Implement block-size method.
1141 (hw_disk_max_transfer): Implement max-transfer method.
1143 * hw_phb.c (hw_phb_init_address): Reinit the rest of the PHB.
1145 * emul_chirp.c (chirp_emul_instance_to_path): Recover from an
1147 (chirp_emul_instance_to_package): Ditto.
1148 (chirp_emul_method): Ditto.
1149 (chirp_emul_read): Ditto.
1150 (chirp_emul_write): Ditto.
1151 (chirp_emul_close): Ditto.
1152 (chirp_emul_seek): Ditto.
1153 (chirp_emul_package_to_path): Ditto (for phandle).
1154 (chirp_emul_package_to_path): Return the length.
1156 * psim.c (psim_merge_device_file): Allow continuation lines.
1158 Thu Dec 19 11:09:43 1996 Andrew Cagney <cagney@kremvax.tpgi.com.au>
1160 * emul_chirp.c (chirp_emul_boot): Implement. Well report the new
1163 * emul_chirp.c (chirp_emul_exit): Correct type of args struct
1164 members - *_cell not host dependant int.
1166 Wed Dec 18 17:49:59 1996 Andrew Cagney <cagney@kremvax.tpgi.com.au>
1168 * interrupts.c (perform_oea_interrupt): Print additional
1169 information if a double interrupt is encountered.
1171 Wed Dec 18 17:49:59 1996 Andrew Cagney <cagney@kremvax.tpgi.com.au>
1173 * psim.c (psim_merge_device_file): Tolerate an incorrect file-name
1174 being specified with the -f option.
1175 (psim_merge_device_file): Correct check for end of string.
1177 Wed Dec 18 17:49:59 1996 Andrew Cagney <cagney@kremvax.tpgi.com.au>
1179 * emul_chirp.c (chirp_emul_peer): Was falling off the end of the
1180 list of devices. Return zero to the client instead.
1181 * emul_chirp.c (chirp_emul_child): Ditto
1182 * emul_chirp.c (chirp_emul_parent): Ditto
1184 * device.c (device_root): Assert assumption about the device being
1187 Tue Dec 17 15:12:38 1996 Andrew Cagney <cagney@kremvax.tpgi.com.au>
1189 * emul_chirp.c (emul_chirp_create): Add description property to
1190 each significant node in the device tree.
1191 * emul_bugapi.c (emul_bugapi_create): Ditto.
1193 Fri Dec 13 14:30:31 1996 Andrew Cagney <cagney@kremvax.tpgi.com.au>
1195 * main.c (sim_io_read_stdin): For a single byte STDIO read, use a
1196 tempoary two byte buffer. Single byte read with fgets will not
1198 * main.c: Include errno.h.
1199 (sim_io_read_stdin): For non-STDIO, make it work.
1201 * emul_chirp.c (chirp_emul_read): Return the correct error status.
1203 Fri Dec 13 14:30:31 1996 Andrew Cagney <cagney@kremvax.tpgi.com.au>
1205 * std-config.h (WITH_STDIO): Don't hard-wire the STDIO mechanism.
1206 Instead have each emulation default it to DO_USE_STDIO.
1208 * emul_generic.c (emul_add_tree_options): Select the STDIO I/O
1209 mechanism as the default if enabled or if nothing selected.
1211 * sim_calls.c (sim_io_read_stdin): Passify GCC's desire for a
1213 (sim_io_write_stdout): Ditto.
1214 (sim_io_write_stderr): Ditto.
1215 * main.c (sim_io_write_stdout): Ditto.
1216 (sim_io_write_stderr): Ditto.
1217 (sim_io_read_stdin): Ditto.
1219 Tue Dec 10 10:31:48 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1221 * emul_chirp.c (emul_chirp_instruction_call): Make *printf calls
1223 * vm.c (om_effective_to_virtual): Ditto.
1224 * events.c (event_queue_schedule{,_after_signal}): Ditto.
1225 (event_queue_{deschedule,process}): Ditto.
1226 * hw_htab.c (htab_decode_hash_table): Ditto.
1227 (htab_map_{page,binary}): Ditto.
1228 * hw_opic.c (hw_opic_init_data): Ditto.
1229 (handle_interrupt): Ditto.
1230 (do_processor_init_register_{read,write}): Ditto.
1231 (write_vector_priority_register): Ditto.
1232 ({read,write}_destination_register): Ditto.
1233 (do_suprious_vector_register_{read,write}): Ditto.
1234 (do_current_task_priority_register_N_{read,write}): Ditto.
1235 (do_timer_frequency_reporting_register_{read,write}): Ditto.
1236 (do_timer_N_{current,base}_count_register_{read,write}): Ditto.
1237 (do_ipi_N_dispatch_register_write): Ditto.
1238 (do_vendor_identification_register_read): Ditto.
1239 (do_feature_reporting_register_N_read): Ditto.
1240 (do_global_configuration_register_N_{read,write}): Ditto.
1241 * hw_phb.c (hw_phb_attach_address): Ditto.
1242 (hw_phb_unit_decode): Ditto.
1243 (hw_phb_address_to_attach_address): Ditto.
1244 (hw_phb_io_{read,write}_buffer): Ditto.
1245 * hw_ide.c (setup_fifo): Ditto.
1247 * sim_calls.c ({defs,callback,remote-sim}.h): Find gdb include
1248 files via -I<dir> instead of using "../../gdb/" prefixes.
1250 Tue Dec 10 10:12:44 1996 Andrew Cagney <cagney@kremvax.tpgi.com.au>
1252 * debug.h: Add tracing for the pal device.
1255 * emul_chirp.c (chirp_emul_getprop): More tracing.
1257 Tue Dec 10 10:12:44 1996 Andrew Cagney <cagney@kremvax.tpgi.com.au>
1259 * device.h, device.c (device_find_ihandle_runtime_property): New
1260 function. Reverse of add_ihandle_runtime property.
1261 (device_init_runtime_properties): Use it.
1263 * device.c (find_property_entry): New function returns the
1264 internal property spec.
1265 (device_set_property): Use.
1266 (device_find_property): Use.
1268 Tue Dec 10 10:12:44 1996 Andrew Cagney <cagney@kremvax.tpgi.com.au>
1270 * psim.c (psim_merge_device_file): Strip newline from device
1273 Tue Dec 10 10:12:44 1996 Andrew Cagney <cagney@kremvax.tpgi.com.au>
1275 * hw_htab.c (htab_map_binary): For overlapping text / data maps
1276 merge the two. Also check that the merge is safe.
1278 * emul_chirp.c (emul_chirp_create): Add a description property to
1279 the pte's so that they are easier to identify.
1281 (emul_chirp_create): Don't specify a load address for the CHRP
1282 image. Always use the values specified by the executable.
1284 * hw_htab.c (htab_map_page): Abort if a duplicate map is
1287 Mon Dec 9 12:08:46 1996 Andrew Cagney <cagney@kremvax.tpgi.com.au>
1289 * hw_htab.c (htab_map_page): Formatting.
1291 * emul_chirp.c (emul_chirp_instruction_call): Check for a NULL
1292 method name when handling the client call. Also check for other
1295 * emul_chirp.c (emul_chirp_create): Allow real-mode?, real-base,
1296 etc to be overriden.
1298 Mon Dec 9 12:08:46 1996 Andrew Cagney <cagney@kremvax.tpgi.com.au>
1300 * os_emul.c (os_emul_create): Use tree find property instead of
1301 device find property - sigh.
1303 Thu Dec 5 10:46:42 1996 Andrew Cagney <cagney@kremvax.tpgi.com.au>
1305 * 961205: Release snapshot 961205.
1307 Thu Dec 5 10:46:42 1996 Andrew Cagney <cagney@kremvax.tpgi.com.au>
1309 * configure.in (hostbitsize, bitsize): Fix typo in error message -
1310 cannot contain a comma.
1311 (sim-warnings): Check for more potential errors.
1313 * psim.c (psim_usage): Add -f <file> option. Specifies a file
1314 containing device tree specifications that should be merged into
1317 * configure.in: Sort options.
1318 * configure: Rebuild
1320 Wed Dec 4 13:57:31 1996 Andrew Cagney <cagney@kremvax.tpgi.com.au>
1322 * psim.c (psim_usage): Add -n option - specify number of
1325 * emul_chirp.c: Add description.
1326 * emul_bugapi.c: Ditto.
1327 * emul_unix.c: Ditto.
1328 * emul_netbsd.c: Ditto.
1330 Fri Nov 29 11:12:22 1996 Andrew Cagney <cagney@kremvax.tpgi.com.au>
1332 * hw_pal.c (hw_pal_attach_address): New function, if an attach is
1333 encountered, assume that it is the single disk.
1334 * hw_pal.c: Add generic device/size decode methods.
1336 * hw_nvram.c (hw_nvram_init_address): Use the first nonzero reg
1337 property entry when determining the nvram size.
1339 * hw_core.c: Add generic address/size decode methods.
1341 * emul_chirp.c (emul_chirp_instruction_call): Return and trace
1342 nonzero status from client functions.
1344 * main.c (error): Always include a cariage return when writing out
1347 Wed Nov 20 00:36:55 1996 Doug Evans <dje@canuck.cygnus.com>
1349 * sim_calls.c (sim_resume): Reset sim_should_run if single
1352 Thu Nov 28 13:19:46 1996 Andrew Cagney <cagney@kremvax.tpgi.com.au>
1354 * emul_bugapi.c (emul_bugapi_do_diskio): Add support for multiple
1357 * emul_generic.c (emul_add_tree_hardware): Drop the dummy eeprom.
1358 Attach the pal - for I/O - as a pseudo device haning from the
1361 * emul_bugapi.c (emul_bugapi_create): Add a small memory device to
1362 the device tree at the address of the hi-mem interrupt vector
1363 addreses. Used by bugapi to establish its trap instructions.
1365 * debug.h: Add a new macro DITRACE for tracing device instances.
1367 * debug.h: Extend the DTRACE macro so that it can also tests for
1368 device specific tracint.
1370 * device.h, device.c (device_trace): Add method to determine
1371 device specific tracing.
1372 (device_init_address): Set the devices tracing level.
1374 Thu Nov 21 12:05:32 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
1376 * tree.h, tree.c (tree_device): New files - separate out the
1377 device parser and other tree operations from the device.
1379 * inline.h, inline.c (INLINE_TREE): Add.
1380 * device.h, device.c (device_tree_add_parsed): Delete.
1381 * Makefile.in (tree.c): Add rules for new file.
1382 * Makefile.in: Better order the emul_* files.
1384 * emul_generic.c (emul_add_tree_hardware): Update.
1385 * emul_netbsd.c (emul_netbsd_create): Update.
1386 * emul_unix.c (emul_unix_create): Ditto.
1387 * emul_chirp.c (emul_chirp_create): Ditto.
1388 * emul_bugapi.c (emul_bugapi_create): Ditto.
1389 * psim.c (psim_tree): Ditto.
1392 * emul_generic.h: Include tree.h
1393 * Makefile.in: Add to EMUL_GENERIC_H dependencies.
1395 * device.h, device.c (device_root): New function - returns the
1399 * device.h, device.c (device_clean): New function, clean up device
1400 ready for next simulation run. This includes things like deleting
1401 interrupt edges and properties created during the simulation and
1402 also scrubbing any pre-defined properties.
1403 * tree.c (tree_init): Use.
1405 * device.h, device.c (device_init_static_properties): New
1406 function. Initialize any static predefined properties. By static
1407 we mean those that have values that can be determined before the
1408 device tree initialization has started.
1409 * tree.c (tree_init): Use.
1411 * device.h, device.c (device_init_address): Add code to
1412 check/verify the devices #address-cells and #size-cells.
1413 (device_add_integer_property): Delete corresponding code.
1414 (device_nr_address_cells, device_nr_data_cells): Check for
1415 property when returning value.
1417 * device.h, device.c (device_init_runtime_properties): New
1418 function. Initialize those properties that are not `static'. At
1419 present the only such property is the ihandle.
1420 * tree.c (tree_init): Use.
1422 * device.h, device.c (reg, ranges): Rework these so that they use
1423 an array of the fundamental type - single reg or single range
1426 * device.h, device.c (device_add_ihandle_runtime_property):
1427 Re-implement the adding of an ihandle during tree construction so
1428 that it better fits in with device initialization.
1430 Thu Nov 21 12:05:32 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
1432 * device.h, device.c (device_ioctl): Add additional argument -
1433 request - so that the caller must always specify the type of
1436 * device_table.h: Update.
1437 * hw_trace.c (hw_trace_ioctl): Ditto.
1438 * hw_vm.c (hw_vm_ioctl_callback): Ditto.
1439 * hw_init.c (hw_stack_ioctl_callback): Ditto.
1440 * psim.c (psim_options): Ditto.
1442 Thu Nov 21 12:05:32 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
1444 * BUGS: Updated a bit.
1446 Wed Nov 20 14:06:37 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
1448 * hw_opic.c: Finish - third round.
1450 Wed Nov 20 12:02:08 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
1452 * hw_glue.c (hw_glue_io_read_buffer_callback): Fix miscalc of glue
1454 (hw_glue_io_write_buffer_callback): Ditto.
1456 Tue Nov 19 21:17:08 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
1458 * events.c (event_queue_process): Was incorrectly consuming future
1459 events on the queue when they should be left alone.
1461 * debug.h, debug.c (events): Add support for event queue tracing.
1462 * events.c: Add event tracing.
1464 * debug.h, debug.c: Order device trace options.
1466 Fri Nov 15 15:23:39 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1468 * pk_disklabel.c (pk_disklabel_create_instance): Fix up some
1469 warnings generated by GCC.
1471 Sun Nov 17 17:59:14 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
1473 * sim-endian.h: Add LE versions of byte swap macros. Needed for
1474 PCI devices which are little-endian.
1476 * sim-endian-n.h (endian_le2h_N, endian_h2le_N): Ditto
1478 Sun Nov 17 17:59:14 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
1480 * hw_iobus.c (hw_iobus_attach_address_callback): Change the iobus
1481 so that it is implementing a 1-1 address map.
1483 * emul_generic.c (emul_add_tree_hardware): Adjust.
1485 * emul_generic.c (emul_add_tree_hardware): Don't add the nvram as
1488 Sun Nov 17 17:59:14 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
1490 * device.c (split_find_device): Be tolerant of missing unit
1493 Fri Nov 15 16:49:49 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
1495 * basics.h (port_direction): New type, specify the direction of
1498 * device.h, device.c (device_interrupt_decode): Include
1499 specification of port direction in operations.
1500 (device_interrupt_encode): Ditto.
1502 * device_table.h: Add a direction field to the interrupt port
1505 * device.c (device_tree_add_parsed): Specify port direction.
1507 Thu Nov 14 21:38:13 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
1509 * hw_opic.c: Finish - second round.
1511 Thu Nov 7 00:18:59 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
1513 * hw_htab.c (htab_init_data_callback): Allow the virtual-address
1514 to be specified as an array which allows 64bit addresses.
1516 * device.c (device_find_integer_array_property): New function.
1517 Simplify the querying of elements of an integer array.
1518 (device_add_integer_property, device_find_integer_property):
1519 Update to correctly use the cell type.
1521 * vm.c (om_unpack_sr): Clarify shifting comment.
1522 (om_pte_0_masked_vsid): Ditto. Add 64bit version.
1524 * emul_chirp.c (emul_chirp_create): Initialize the segment
1527 * vm.c (om_effective_to_virtual): Trace segment register use.
1529 * hw_htab.c (htab_map_page): Print out the pteg base address to
1530 simplify cross checking between vm and the htab.
1531 (htab_decode_hash_table): Use device_error instead of error.
1532 (htab_map_page): Ditto.
1533 (htab_dma_binary): Ditto.
1534 (htab_map_binary): Ditto.
1535 (htab_init_data_callback): Ditto.
1537 Wed Nov 6 20:20:58 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
1539 * interrupts.h: Clarify what the optional instruction program
1540 interrupt is - a subset of illegal instruction program interrupt.
1542 * interrupts.c (program_interrupt): For UEA mode, clarify what an
1543 optional instruction program interrupt is.
1544 (program_interrupt): For OEA mode, as per spec, generate an
1545 illegal instruction program interrupt when an optional instruction
1548 * gen-semantics.c (print_semantic_body): Delete code
1549 differentiating between an unimplemented floating point and normal
1550 instruction. Instead, such a case can be handled explicitly.
1552 * ppc-instructions (store floating-point as integer word indexed):
1554 (Floating Convert to Integer Doubleword): Make the floating point
1555 assist interrupt explicit.
1556 (Floating Convert To Integer Doubleword with round towards Zero):
1558 (Floating Convert To Integer Word): Ditto
1559 (Move From FPSCR): Ditto.
1560 (Move to Condition Register from FPSCR): Ditto.
1561 (Move To FPSCR Fields): Ditto.
1562 (Move To FPSCR Field Immediate): Ditto.
1563 (Move To FPSCR Bit 0): Ditto.
1564 (Move To FPSCR Bit 1): Ditto.
1566 Mon Nov 4 12:49:13 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
1568 * corefile.c (core_map_read_buffer, core_map_write_buffer): Avoid
1569 breaking up transfers.
1571 * corefile.c: Adjust arguments so that the client server
1572 relationship is clarified.
1574 * hw_glue.c (hw_glue_init_address): Update so it can be attached
1577 * hw_disk.c (hw_disk_instance_write): Add more checks to disk IO -
1578 looking for things like overflow/underflow.
1580 Sun Nov 3 18:45:20 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
1582 * emul_generic.c (emul_add_tree_hardware): Hang the disk off the
1583 PAL device instead of the IOBUS. The disk must be attached to a
1586 * hw_disk.c (hw_disk_init_address): Just use the unit address
1587 directly in the attach - the rest isn't relevant.
1589 Sat Nov 2 21:48:57 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
1591 * configure.in (sim-hardware, sim-packages): Allow additional
1592 hardware and packages to be prefixed as well as appended.
1594 * Makefile.in (tmp-hw, tmp-pk): Retain the user specified order of
1595 packages when building them. Consequently, a user can override a
1596 standard device by prefixing their own version.
1598 * Makefile.in (hw_opic.o, hw_pci.o, hw_ide.o): Add dependencies.
1600 Fri Nov 1 14:42:57 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1602 * mon.c (_cpu_mon): Add fields for counting 1, 2, 4, and 8 byte
1604 (mon_{read,write}): Count 1, 2, 4, and 8 byte reads/writes.
1605 (mon_print_info): Correct typo regarding # of unaligned reads and
1606 writes. Print out how many 1, 2, 4, and 8 byte reads/writes there
1609 Tue Oct 29 17:55:43 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1611 * configure.in (AC_CHECK_FUNCS): Add access.
1612 * config{.in,ure}: Regenerate.
1614 * emul_unix.c (do_unix_nop): System call that always succeeds.
1615 (do_unix_access): Support access system call.
1616 (solaris_descriptors): Make sigaltstack and sigaction nops.
1617 ({solaris,linux}_descriptors): Add support for access.
1619 Tue, 8 Oct 18:42:26 1996 Jason Molenda <crash@cygnus.co.jp>
1621 * Makefile.in (clean): Move config.log to distclean.
1623 Fri Nov 1 16:44:28 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
1625 * corefile-n.h (core_map_write_N): Improve abort messages.
1627 * device.h, device.c (device_attach_address): Remove unused name
1629 (device_detach_address): Ditto.
1630 * device_table.h, device_table.c: Update.
1631 * hw_iobus.c (hw_iobus_attach_address_callback): Ditto.
1632 * hw_nvram.c (hw_nvram_init_address): Ditto.
1633 * hw_memory.c (hw_memory_init_address): Ditto.
1634 * hw_vm.c (hw_vm_init_address_callback): Ditto.
1635 (hw_vm_attach_address): Ditto.
1636 (hw_vm_add_space): Ditto.
1637 * hw_init.c (update_for_binary_section): Ditto.
1638 * hw_core.c (hw_core_attach_address_callback): Ditto.
1640 * hw_iobus.c (hw_iobus_attach_address_callback): Rewrite to handle
1641 configurable parent busses.
1643 Wed Oct 30 18:46:32 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
1645 * device_table.c (generic_device_size_to_attach_size): Provide
1646 limited support for multi-cell sizes.
1647 (generic_device_address_to_attach_address): Ditto for addresses.
1649 Tue Oct 29 02:01:29 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
1651 * device.c (device_add_integer_property): Check for setting of
1652 #address-cells and #size-cells properties. For these, update the
1653 corresponding device values.
1654 (device_nr_address_cells, device_nr_size_cells): Use the value
1655 from the device instead of the property.
1657 * hw_core.c: Use generic address and size conversions for the top
1660 * hw_memory.c (hw_memory_init_address): Tolerate case where
1661 #address and #size cells is greater than 1.
1663 * device.c (device_tree_print_device): Clean out printing of
1666 * device.c (split_device_specifier): Don't detect comments here -
1667 "#" can be a valid prefix - eg #size-cells.
1669 * psim.c (psim_merge_device_file): Suppress comments and blank
1672 * emul_generic.c (emul_add_tree_hardware): Fix typo of incorrect
1673 pal unit address. Add the property /#address-cells to the root of
1676 * device.c (device_template_create_device): Check that the unit
1677 address was successfully parsed.
1679 * device_table.c (generic_device_unit_decode): Rewrite to better
1680 handle multi-cell addresses.
1681 (generic_device_unit_encode): Ditto.
1683 * emul_generic.c (emul_add_tree_hardware): "reg" properties no
1684 longer need the explicit array type - the parser takes care of it.
1686 * pk_disklabel.c (pk_disklabel_create_instance): Add NULL return
1689 Mon Oct 28 22:55:48 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
1691 * hw_ide.c: New file. Model of a basic IDE interface attached to
1694 * configure.in (hardware): Add the ide device to the default
1696 * configure: Regenerate.
1698 * debug.h, debug.c: Add tracing option for the IDE device.
1700 Fri Oct 25 21:28:25 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
1702 * hw_phb.c, hw_phb.h: New files - implement a PHB.
1704 * configure.in (hardware): Add the phb to the list of devices to
1707 Fri Oct 25 21:28:25 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
1709 * hw_com.c: Review description.
1712 * hw_eeprom.c: Ditto.
1716 * hw_com.c: Update event handling.
1718 * hw_disk.c: Implement tracing.
1720 Fri Oct 25 21:28:25 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
1722 * device_table.c (generic_device_init_address): Use
1723 assigned-addresses property in preference to any other reg
1726 Fri Oct 25 21:28:25 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
1728 * device.h, device.c (device_find_ranges_property): New function.
1729 Simplify the manipulation of "ranges" properties.
1731 * device.c (device_add_parsed): Extend to include support for the
1734 * device.c (device_add_parsed): Add assigned-addresses to the list
1735 of reg type properties.
1737 * device.c (device_tree_print_device): Add code to format and
1738 print a ranges property.
1740 * device.h, device.c (device_nr_address_cells,
1741 device_nr_size_cells): New functions. Determine the values of the
1742 standard properties #address-cells and #size-cells. Both of which
1743 are optional and have default values of two and one respectfuly.
1744 Previously, code that determined #address-cells was incorrectly
1745 using a value of one.
1747 Fri Oct 25 21:28:25 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
1749 * debug.h, debug.c: Sort debug options, Add entries for the
1752 Fri Oct 18 12:12:21 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1754 * ppc-instructions (Floating Select): Add support for fsel unless
1755 model is 601. Allow user to filter out instruction unless -Fs is
1757 (Store Floating-Point as Integer Word Indexed): Raise optional
1758 instruction program abort. Allow user to filter out instruction
1759 unless -Fs is passed to igen.
1760 (Floating Square Root{, Single}): Ditto.
1761 (Floating Reciprocal Estimate Single): Ditto.
1762 (Floating Reciprocal Square Root Estimate): Ditto.
1764 * configure.in (--enable-sim-filter): If not passed, pass 32,f,s
1766 * configure: Regenerate.
1768 * interrupts.h (program_interrupt_reasons): Add
1769 optional_instruction_program_interrupt.
1771 * interrupts.c (program_interrupt): Call error with more detailed
1772 information on program interrupts, particularly in user mode. Add
1773 support for optional_instruction_program_interrupt.
1775 Wed Sep 25 10:20:29 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
1777 * hw_glue.c: New device. Hooks for manipulating interrupt ports.
1779 * debug.h, debug.c (trace_glue_device): Add tracing support for
1780 the interrupt glue logic device.
1782 * configure.in (hardware): Add glue device.
1783 * configure: Regenerate.
1785 Tue Sep 24 20:55:38 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
1787 * device.c (device_tree_parse_integer_property): New function,
1788 parse a list of integers as an array property.
1789 (device_tree_add_parsed): Call it.
1791 * device.c (device_tree_parse_string_property): New function,
1792 parse a list of strings as a string property (with embeded
1793 null's). For moment, don't try to implement a complext string
1795 (device_tree_add_parsed): Call it.
1797 Tue Sep 24 16:30:48 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
1799 * hw_opic.c: New file. OpenPIC interrupt controller.
1801 * configure.in (hardware): Add opic device.
1802 * configure: re-generate.
1804 * hw_pic.c: Delete, replaced with hw_opic.c.
1806 * debug.h, debug.c: Add debug option for OpenPIC device. -
1809 Tue Sep 24 16:30:48 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
1811 * Makefile.in (psim.o, idecode.o): Since idecode and not psim is
1812 now the file that does all the inlining.
1814 * Makefile.in (LIB_SRC, LIB_INLINE_SRC, idecode.o): Break out the
1815 library source code that could be involved in an inlining. Make
1816 idecode.o only dependant on the inlined library source code.
1818 * Makefile.in (LIB_OBJ): Put options last on the list so that it
1821 * std-config.h (DEVICE_INLINE): Only inline locals when the
1822 default is to inline.
1824 Mon Sep 23 00:37:49 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
1826 * hw_htab.c (htab_sum_binary): Determine the real-base for the
1829 * hw_htab.c (htab_map_binary): Depending on the value of the
1830 load-base, either map the program in as a contiguous section or as
1831 separate sections controled by th binaries lma values.
1832 (htab_init_data_callback): Ditto.
1834 Sun Sep 22 15:56:22 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
1836 * emul_generic.c (emul_add_tree_options): Remove load-base option.
1838 * emul_chirp.c (map_over_chirp_note): Add load_base field to note
1839 struct. Don't require the load_base field to be present - just
1840 issue warning - it is a recent addition.
1841 (emul_chirp_create): Support both virtual and physical modes.
1843 * emul_chirp.c (emul_chirp_create): Add a stack initialization
1844 property so that any arguments specified on the command line can
1845 be passed on to user programs.
1847 * hw_init.c (create_ppc_chirp_bootargs): Add support for chirp
1848 argument passing to the pseudo device stack.
1850 Sat Sep 21 19:39:56 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
1852 * device.c (device_error): Make it more tolerant to incomplete
1855 * hw_init.c (hw_data_init_data_callback): Extend the data device
1856 so that it can perform initialization operations either dma or a
1857 more complex instance open, seek, write operation.
1858 * hw_init.c: Update the description of the data device to reflect
1861 Sat Sep 21 00:13:02 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
1863 * device.c (device_event_queue_schedule,
1864 device_event_queue_deschedule, device_event_queue_time): Have the
1865 device object export the event operations. Making these available
1866 from the device object should hopefully simplify writing device
1869 Fri Sep 20 14:04:40 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
1871 * configure.in (sim-hardware): Add eeprom device to default build.
1873 * hw_eeprom.c: Rewrite so it works.
1875 * debug.h, debug.c: Add tracing support for the eeprom and com
1878 Thu Sep 19 14:40:40 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
1880 * debug.h: Add disklabel-package and disk-device trace options.
1881 debug.h (PTRACE): Add macro to simplify tracing in packages.
1883 Thu Sep 19 14:40:40 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
1885 * device.c (device_create_instance_from): Tighten up loop
1886 searching for device instances.
1887 (device_instance_delete): Ditto.
1888 (device_instance_delete): Only leaf instances need to be removed
1889 from a devices list of active instances.
1891 Thu Sep 19 14:40:40 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
1893 * hw_disk.c: Add the cdrom as an alias.
1895 * pk_disklabel.c (disklabel_delete): Implement, remembering to
1896 delete the raw disk instance while we're at it.
1898 * pk_disklabel.c (pk_disklabel_create_instance): Implement a
1899 little bit more - still a long way to go.
1901 * pk_disklabel.c (disklabel_write, disklabel_read): Remember the
1902 new head position after a read or write.
1904 Thu Sep 19 13:05:40 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
1906 * emul_chirp.c (chirp_emul_read): Allow reads to be longer then
1907 the internal buffer.
1909 Thu Sep 19 13:05:40 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
1911 * emul_chirp.c (chirp_read_t2h_args): Call memset-0 with the args
1912 in the correct order.
1914 * emul_chirp.c (chirp_emul_call_method): Correct computation for
1915 the address of the first stack argument passed in from the client
1918 Wed Sep 18 19:33:54 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
1920 * words.h: Add new types signed_cell and unsigned_cell which
1921 correspond to the signed and unsigned IEEE 1275 memory locations.
1922 * device.h, device.c, emul_chirp.c: Where refering to an IEEE 1275
1923 memory cell, replace uses of unsigned32 with unsigned_cell.
1924 * device_table.h: Ditto.
1926 * sim-endian.h: Add new macros H2BE_cell and BE2H_cell which
1927 convert cell sized values to from big endian.
1928 * device.c, emul_chirp.c: Where refering to IEEE 1275 memory cells
1929 use these new macros.
1931 Tue Sep 17 15:57:44 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
1933 * device.c (device_tree_add_parsed): Detect and report an
1934 interrupt being attached to an invalid device. Was dumping core.
1936 Mon Sep 16 23:09:12 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
1938 * device.h, device.c (device_address_to_attach_address,
1939 device_size_to_attach_size): New functions. Convert a devices
1940 unit address or unit size structure into a form suitable for
1941 passing on to the attach and detach functions.
1942 * device_table.h: Add extra methods to device table.
1944 * device.h, device.c (device_find_reg_property): New function.
1945 For a reg type property, return the selected address + size
1946 tupple, along with a positive success status. Add a reg_property
1947 to the list of property types.
1948 * (device_tree_add_parsed): Make array properties with the name
1949 reg or alternate-reg of type reg_property.
1951 * hw_memory.c (hw_memory_init_address): Rewrite to use new
1952 find_reg_property method.
1953 * hw_nvram.c (hw_nvram_init_address): Ditto.
1955 * device.c (device_tree_print_device): Add code to print out a reg
1958 * device_table.c (generic_device_address_to_attach_address,
1959 generic_device_size_to_attach_size ): New functions. Generic
1960 functions for converting between unit and attach address or size.
1962 * device_table.c (generic_device_init_address): Rewrite to use the
1963 new find_reg and address convert functions. Look for both reg and
1964 alternate-reg properties.
1966 Mon Sep 16 23:09:12 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
1968 * hw_com.c: New file. A '550 serial device that can quickly be
1969 attached to any bus.
1970 * configure.in (enable-sim-hardware): Add the com device.
1971 * configure: re-generate.
1973 Thu Sep 12 17:30:56 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
1975 * device.c (device_tree_verify_reg_unit_address): New
1976 function. Check that the unit address as specified by the reg
1977 property correctly corresponds to any unit address previously
1978 specified by the devices name.
1979 (device_tree_add_parsed): When adding a reg property, verify
1980 that the unit-address - first value of property - correctly
1981 matches any previous value specified when creating the device
1984 Thu Sep 12 17:30:56 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
1986 * mon.c (mon_event): Remove assertion that an unsigned is >= 0.
1988 Fri Aug 16 12:05:24 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1990 * device.c (device_full_name): Cast strdup to char *, since AIX
1991 3.2.5 mistakenly declares the function to be const char *.
1992 (device_create_from): Ditto.
1993 (device_create_instance_from): Ditto.
1994 (device_add_property): Ditto.
1996 Tue Aug 13 11:40:14 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1998 * debug.c (trace_option): For -t all, do not set the
1999 trace_dump_device_tree flag, so that the simulator is run.
2001 Tue Aug 13 11:40:14 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2003 * Makefile.in (options.o): Depend on defines.h.
2004 (defines.h): New rule, go through config.h and make strings of all
2005 of the #define HAVE_xxx macros.
2006 (distclean): Remove defines.h.
2008 * options.c (print_options): Print whether many of the
2009 configuration macros are defined.
2011 * main.c (main): If -t options and no filename, just print the
2012 options, and don't print the usage message.
2014 Mon Aug 12 18:42:37 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2016 * configure.in: Test whether /dev/zero works on the system, and if
2017 it does, define HAVE_DEVZERO.
2018 * configure: Regenerate.
2020 * emul_generic.c (emul_add_tree_hardware): Do not add /iobus/disk
2021 if we don't have a working /dev/zero on the system.
2023 * emul_bugapi.c (emul_bugapi_init): If HAVE_DEVZERO is not
2024 defined, don't add disk support.
2025 (emul_bugapi_do_diskio): Ditto.
2026 (emul_bugapi_instruction_call): Ditto.
2028 Wed Aug 7 14:34:20 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2030 * emul_unix.c (HAVE_TCGETATTR): If HAVE_TERMIOS_STRUCTURE is not
2031 defined, make sure HAVE_TCGETATTR is #undef'ed
2033 Wed Aug 7 14:34:20 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2035 * std-config.h (REGPARM): Only define REGPARM attributes if using
2036 GNU C. Test for __i686__ in case GCC ever defines it. If not on
2037 a x86 platform, define REGPARM as nothing.
2039 * sim-endian.h (WITH_HOST_BYTE_ORDER): Test for i686 and __i686__
2042 Wed Aug 7 20:19:55 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
2044 * ld-decode.h, ld-decode.c: Rename goto_gen to the more correct
2046 * gen-idecode.c: Ditto.
2048 * gen-idecode.c (print_idecode_table): Comment out check for
2049 switch/table combination until a bug with it is fixed.
2051 * ppc-opcode-goto: New file. Like complex and flat but uses
2052 goto-switch instead of padded-switch for the tables.
2054 * gen-idecode.c (print_goto_switch_name): New function.
2055 (print_goto_switch_table_leaf): New function.
2056 (print_goto_switch_break): New function.
2057 (print_goto_switch_table): New function. Prints a jump table
2058 that can be jumped into instead of a switch statement.
2060 * gen-idecode.c (*switch_*): As an option output a switch that is
2061 implemented using a jump table but only if the switch is not
2064 Tue Aug 6 09:28:22 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2066 * configure.in (--enable-sim-{hardware,packages}): Fix typos.
2067 * configure: Regenerate.
2069 * device.c (device_instance_call_method): Fixup format message in
2070 error case. Return 0 in case of error to shut up compiler
2073 Wed Aug 7 00:17:37 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
2075 * device_table.c (generic_device_unit_decode): Require a comma
2076 between elements of a unit address.
2078 * device.c (device_tree_print_device): For reg, alternate-reg and
2079 ranges properties use special print functions.
2080 (device_print_ranges_property): Print formatted ranges property.
2081 (device_print_reg_property): Print formatted reg property.
2083 Tue Aug 6 21:35:18 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
2085 * device.c (device_tree_add_parsed): For reg, ranges and
2086 alternate-reg properties use a special parser.
2087 (device_tree_parse_reg_property): New function to parse a reg
2089 (device_tree_parse_ranges_property): New function to parse a
2091 (device_encode_unit): Wrapper for encode_unit callback.
2092 (device_decoce_unit): Wrapper for decode_unit callback.
2094 Wed Jul 31 00:02:30 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
2096 * device_table.h (device_instance_callbacks): Relace the claim and
2097 release methods with a more general table mapping from method-name
2100 * device.c (device_instance_call_method): New function. Implement
2101 the OpenBoot call-method client interface. Attempts to locate the
2102 instances method in the callback table.
2103 (device_instance_claim, device_instance_release): Delete.
2104 Replaced with call-method and a lookup table.
2106 * emul_chirp.c (chirp_emul_call_method): Use the new device
2107 instance call method and let that handle a client claim call.
2109 * hw_htab.c (claim_memory): Wrapper function to call the memory
2110 devices "claim" method using the new device-instance call-method
2111 interface. Replaces the previous direct calls to claim.
2112 (htab_map_region): Use claim_memory.
2113 (htab_init_data_callback): Ditto.
2115 * hw_memory.c (hw_memory_instance_claim): Update function
2116 interface so that it is compatible with call-method.
2117 (hw_memory_instance_release): Ditto.
2118 (hw_memory_instance_methods): New table of memory specific
2119 methods claim and release. Add to the hw_memory_callback
2122 Tue Jul 30 21:26:14 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
2124 * psim.c (psim_init): Back out of change to initial value of
2127 Tue Jul 30 21:12:24 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
2129 * sim_callbacks.h (sim_io_printf_filtered): Replace
2130 printf_filtered with a local simulator specific version. Add
2131 #define printf_filtered to simplify updating of existing code.
2133 * sim_callbacks.h (sim_io_write_stdout, sim_io_read_stdin,
2134 sim_io_write_stderr): New functions. Read / write to the
2135 simulations stdin and stdout and stderr interfaces. Merge in code
2136 from hw_pal that previously handled async I/O.
2137 (sim_io_flush_stdoutput): Rename flush_stdoutput. Add #define
2138 flush_stdoutput to simplify updating of existing code.
2140 * hw_pal.c (scan_hw_pal, write_hw_pal,
2141 hw_pal_instance_write_callback): Use the new sim_io functions.
2143 * main.c: Implement standalone versions of the new sim_io
2144 functions. Include support for async I/O.
2145 * sim_calls.c: Ditto. This time using the gdb callback table.
2147 * std-config.h (CURRENT_STDIO, current_stdio): New macro. Set up
2148 stdio configuration so that it works in the same way as the rest
2150 * psim.c (psim_create): Initialize current_stdio from the device
2152 * emul_generic.c (emul_add_tree_options): Enter a default value
2153 for use-stdio in the device tree.
2155 Fri Jul 26 19:43:03 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
2157 * gen-idecode.c (print_jump): Was always generating a jump back to
2158 idecode. Only necessary at tail of semantic code.
2159 (print_jump): Was always setting the processor's cia, even during
2160 startup when the processor was still undefined.
2161 (print_jump): For safety, restart smp loop when cpu_nr >= nr_cpus,
2164 * options.c (print_options): Add printing of WITH_REGPARM and
2167 * std-config.h (WITH_REGPARM, WITH_STDCALL): Provide default
2168 (disabled) values if not defined.
2170 Fri Jul 26 00:36:35 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
2172 * ppc-cache-rules (cache): Change RS and RB to cache instead of
2173 compute. The block move instructions use them.
2175 * idecode_expression.h (FPSCR_SET): New macro, set specific FPSCR
2177 (CR_FIELD): New macro, extract specific CR register.
2178 (FPSCR_FIELD): New macro, extract specific FPSCR register.
2180 * registers.h (GPR): New macro, simplify accesses to GPR[i].
2182 * bits.c (INSERTED): Covert INSERTED macro into a function.
2183 (EXTRACTED): Conditionally compile on correct bit size macro.
2185 * bits.h (BIT8): New macro, set a single bit in an 8 bit byte.
2187 * ppc-instructions: With hints from Paul Martin, type in missing
2188 some instruction semantics. Leave disabled for the moment.
2189 (Load Multiple Word): Ditto.
2190 (Store Multiple Word): Ditto.
2191 (Load String Word Immediate): Ditto.
2192 (Load String Word Indexed): Ditto.
2193 (Store String Word Immedate): Ditto.
2194 (Store String Word Indexed): Ditto.
2195 (Move to Condition Register from XER): Ditto.
2196 (Move From Condition Register): Ditto.
2197 (Move From FPSCR): Ditto.
2198 (Move to Condition Register from FPSCR): Ditto.
2199 (Move To FPSCR Field Immediate): Ditto.
2200 (Move To FPSCR Fields): Ditto.
2201 (Move To FPSCR Bit 0): Ditto.
2202 (Move To FPSCR Bit 1): Ditto.
2204 Thu Jul 25 22:10:40 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
2206 * std-config.h (SEMANTICS_INLINE): By default, mask out the
2207 inlining of semantic functions from DEFAULT_INLINE. Almost all
2208 configurations call the semantic code via a pointer so there is
2211 * std-config.h (ICACHE_INLINE): Ditto.
2213 Thu Jul 25 20:07:30 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
2215 * configure.in (sim_regparm): Add configuration option for
2216 enabling GCC's regparm attribute.
2217 * (sim_stdcall): Add configuration option for enabling GCC's
2220 * Makefile.in (REGPARM_CFLAGS): Pass regparam configuration onto
2222 * (STDCALL_CFLAGS): Pass stdcall configuration onto compilations.
2224 * std-config.h (REGPARM): Extend construction of REGPARM macro so
2225 that it can include __stdcall__ function attribute.
2227 Wed Jul 24 19:04:20 1996 Andrew Cagney <cagney@sawnoff>
2229 * options.c (print_options): Include SUPPORT_INLINE in information
2232 * gen-idecode.c (print_run_until_stop_body): Only generate loop
2233 termination test if creating idecode_run_until_stop. Push the
2234 loop termination test back into each alternative branch.
2236 Wed Jul 24 15:47:09 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
2238 * gen-icache.c (print_icache_function): Have the cache function
2239 always update the cache_entries semantic and address fields.
2241 * gen-idecode.c (print_idecode_switch_illegal): Include a break
2242 when generating illegal instructions. This was commented out
2243 which is a hangover from looking a at switch statements generated
2244 using indirect jumps.
2246 Tue Jul 23 20:57:01 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
2248 * igen.c (print_my_defines): Replaces print_define_my_index.
2249 Print both a definition for MY_INDEX and MY_PREFIX.
2250 * gen-icache.c (print_icache_function): Adjust.
2251 * gen-idecode.c (print_jump_insn): Adjust.
2252 * gen-semantics.c (print_c_semantic): Adjust.
2254 * gen-support.c (gen_support_h): Add optional include to created
2255 support.h so that, like cpu, it is optionally inlined for all
2256 modules that include it.
2257 * inline.h, inline.c: Adjust so that support.[hc] is handled the
2260 * idecode_fields.h (LABEL, GOTO): Macro's that create a unique
2261 name for a lable and then branch to it.
2263 * ppc-instructions (convert_to_integer, Floating Round to
2264 Single-Precision, Floating Convert from Integer Doubleword): Use
2265 LABEL and GOTO instead of the recently added switch statements.
2267 Wed Jul 24 14:02:42 1996 Andrew Cagney <cagney@sawnoff.highland.com.au>
2269 * gen-idecode.c (print_run_until_stop_body): Too many rparen in
2272 Tue Jul 23 20:57:01 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
2274 * configure.in (--enable-sim-line-nr): Typo - sim_line-nr.
2275 * (--enable-sim-inline): Reorder patern matching of arguments so
2276 that SUPPORT=ALL_INLINE is reconized as *=* and not *_INLINE.
2278 * configure: rebuild.
2280 Mon Jul 22 23:25:08 1996 Andrew Cagney <cagney@highland.com.au>
2282 * configure.in (--enable-sim-hardware, --enable-sim-packages): New
2283 configuration options. Let the user specify the packages or
2284 hardware devices that are to be included in the build. Makes it
2285 possible for user packages to be specified.
2287 * Makefile.in (tmp-pk, tmp-hw): Just use the list of packages and
2288 hardware instead of checking it using ls. configure.in should
2289 have taken care of any problems.
2290 (HW_SRC, HW_OBJ, PACKAGE_SRC, PACKAGE_OBJ): Set by configure.
2292 Mon Jul 22 22:38:59 1996 Andrew Cagney <cagney@highland.com.au>
2294 * psim.c (psim_options): Enter the argument to the memory size
2295 option directly into the device tree. Was using atol() which is
2296 dangerously non portable.
2298 Mon Jul 22 22:17:08 1996 Andrew Cagney <cagney@highland.com.au>
2300 * configure.in (icache): Extend icache flag to include an insn
2301 option. If specifyed the insn - aka instruction - is included in
2302 the instruction cache. Make this the default.
2303 * configure: re-generate.
2305 * igen.c (main), igen.h: Add option -S - inSn - for specifying
2306 that the instruction should be included in the icache.
2308 * gen-icache.c (print_icache_body): If enabled, output code to put
2309 the instruction into the icache.
2310 (print_icache_struct): If enabled, add insn to the icache struct.
2312 Mon Jul 22 20:46:12 1996 Andrew Cagney <cagney@highland.com.au>
2314 * Makefile.in (BUILD_CFLAGS): Include -g when building the
2317 Mon Jul 22 20:00:25 1996 Andrew Cagney <cagney@highland.com.au>
2319 * emul_generic.c (emul_add_tree_options): Was incorrectly setting
2320 the strict-alignment option when hardwired for non-strict
2323 Sun Jul 21 21:18:05 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
2325 * gen-semantics.c: Make the my_index variable a macro MY_INDEX.
2327 * ppc-instructions: Adjust so that references are to MY_INDEX and
2330 Sun Jul 21 21:18:05 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
2332 * gen-idecode.c: Output the complete run_until_stop function
2333 instead of just the code to handle a single instruction issue.
2334 * : Have the generated idecode.c include inline.c (instead of psim.c).
2336 * std-config.h: Change psim.c so that it isn't inlined (as this is
2339 * psim.c (run_until_stop): Delete the old run_until_stop function
2340 instead calling the idecode_run and idecode_run_until_stop
2341 functions that gen-idecode.c is now creating.
2343 Sun Jul 21 21:18:05 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
2345 * dgen.c: Maintenance - update to use new features found in lf.c.
2347 * filter_filename.c (filter_filename): Maintenance - make the
2350 Sun Jul 21 21:18:05 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
2352 * debug.c (TRACE, ITRACE, DTRACE): Have GCC instead of CPP
2353 eliminate trace statements.
2355 * debug.c: Change trace format so that it is consistent
2356 (file:line-nr) with CC's error output.
2358 * gen-itable.c (itable_c_insn): Add the source file name and
2359 source line number to the instruction's informational entry.
2361 * debug.c (ITRACE): Use the itable (and my_index) to get the
2362 current instructions name and source line number.
2364 * gen-semantics.c, gen-icache.c: Adjust generated ITRACE calls to
2365 match new interface.
2367 * emul_bugapi.c (emul_bugapi_instruction_call): Adjust
2368 corresponding call to ITRACE so that it still matches.
2370 * idecode_expression.h (ALU_END, CR0_COMPARE): Use TRACE instead
2371 of ITRACE. The CPP line directives would have previously set the
2372 line-nr and file name so ITRACE isn't needed.
2374 Sun Jul 21 21:18:05 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
2376 * gen-idecode.c (print_jump_until_stop_body): New function and
2377 idecode generation option. Instead of generating and calling
2378 separate functions containing the semantic and icache code
2379 generate a single monolythic function and use goto's (and GCC's
2380 indirect jump) to move between code blocks.
2382 * Makefile.in: Add sim_jump flag to those passed to igen.
2384 * configure.in: New option --enable-sim-jump (default disabled)
2386 * ppc-instructions: Eliminate any uses of labels and goto's.
2387 These result in duplicate declarations when a single flat function
2390 * ppc-opcode-jump: New file. Set of opcode rules useful when
2391 testing jumping idecodes.
2393 Sun Jul 21 21:18:05 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
2395 * gen-idecode.c: Optionally include the semantic code for an
2396 instruction in the function that is doing the decoding.
2398 * igen.c: Add option (-C) to generate semantics in the instruction
2401 * configure.in (--enable-sim-icache): Accept an option list such
2402 as 1024,define. Add a new choice to the list - semantic - which
2403 will cause igen to generate instruction decode functions that
2404 include the corresponding semantic code.
2406 Sun Jul 21 21:18:05 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
2408 * configure.in: New option --enable-sim-line-nr (default enabled).
2409 Enable/disable the inclusion of CPP line directives in the
2410 generated files. Such directives refer back to the source files
2411 used when generating the simulator code.
2413 * Makefile.in (sim_line_nr): Pass to igen.
2415 Sun Jul 21 21:18:05 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
2417 * igen.c (main): Revamp the options so that more letters are
2420 * configure.in: Adjust to match igen's revamped options
2422 Sun Jul 21 21:18:05 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
2424 * Makefile.in (pk.h, hw.h): Rewrite depenencies for hw.h (etc) so
2425 that they use the same technique as igen (ie a dummy targets
2426 tmp-pk and tmp-hw are created).
2428 Mon Jun 24 22:28:00 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
2430 * Makefile.in (BUILD_CFLAGS): Include WARNING_CFLAGS.
2432 Wed Jun 19 21:45:28 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
2434 * ld-cache.[hc], ld-decode.[hc], ld-insn.[hc]: New files. Separate
2435 out the loading of each of the tables from the rest of igen.
2436 * Makefile.in: Adjust.
2439 * gen-icache.[hc], gen-idecode.[hc], gen-itable.[hc],
2440 gen-model.[hc], gen-semantics.[hc]: New files. Separate out the
2441 code creating each separate set of generated files.
2442 * Makefile.in: Adjust.
2445 * gen-support.[ch]: New files. Output the support functions (found
2446 in the ppc-instructions file) into a separate file.
2448 * inline.h, inline.c: Add.
2449 * std-config.h: Add.
2451 * ld-cache.c: Re-design the cache table format.
2452 * ppc-cache-rules: Update to new format.
2454 * ld-decode.c: Re-design the decode table format.
2455 * ppc-opcode-simple: Update to new format
2456 * ppc-opcode-complex: Ditto
2457 * ppc-opcode-flat: Ditto
2459 * filter.h, filter.c: New files. Separate the opcode filter table
2460 reading code from the rest of igen.c. Re-design the filter so that
2461 it works inclusivly not exclusivly.
2462 * igen.c: Remove the opcode filter table loading code.
2463 * Makefile.in (filter.o): Adjust
2464 * configure.in: Adjust filter flag so that default includes 32bit
2466 * ppc-instructions: Clean up filter fields so that only in use
2467 entries are specifed (ie delete `be').
2469 * misc.c (name2i, i2name): New function. Map between a string and
2472 Mon Jun 17 20:08:03 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
2474 * sim_calls.c (sim_close): If simulator not created, skip printing
2477 Mon Jun 17 20:08:03 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
2479 * registers.c (register_description): Typo, insns not insn.
2481 * ppc-instructions (model_get_number_of_stalls): New model function,
2482 returns number of stalls for the specified processor.
2483 * psim.c (psim_read_register): Add call to new function
2484 model_get_number_of_stalls().
2486 * ppc-instructions (model_get_number_of_cycles): New model function,
2487 returns number of stalls for the specified processor.
2488 * psim.c (psim_read_register): Add call to new function
2489 model_get_number_of_cycles().
2491 Fri Jun 14 00:11:56 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
2493 * device_table.h: Don't pass the parent device into a devices
2494 create function. This makes the create function consistent with
2496 * device.c (device_template_create_device): Ditto
2497 * hw_pal.c (hw_pal_create): Ditto
2498 * hw_core.c (hw_core_create): Ditto
2499 * hw_vm.c (hw_vm_create): Ditto
2500 * hw_disk.c (hw_disk_create): Ditto
2501 * hw_nvram.c (hw_nvram_create): Ditto
2502 * hw_memory.c (hw_memory_create): Ditto
2503 * hw_cpu.c (hw_cpu_create): Ditto.
2505 * device.c (split_find_device): Allow a null initial parent device.
2506 (device_template_create_device): Ditto.
2508 * device.c (device_create_from): Make local (static) only used
2510 * device_table.h: typedef device_callbacks moved here (from
2511 device.h) where it belongs.
2513 * hw_core.c: New file. Implements just the core device using the
2516 * corefile.c: Moved all core device functions into the new
2517 hw_core.c file. core_device_create() disapears.
2519 * psim.c (psim_tree): Use device_tree_add_parsed() to create the
2522 Thu Jun 13 00:09:29 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
2524 * hw_init.c: Correct typo in comment.
2526 * corefile.c (core_init): Remove any remaining references to a
2528 (core_map_find_mapping): Ditto.
2530 Wed Jun 12 22:30:32 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
2532 * corefile.c (core_init): Make function global so that other
2533 devices are able to use the full core object.
2535 * corefile.c (core_create, core_from_device): Break core_create
2536 into two functions. The first creates a core object, the second
2537 returns the core object associated with a core device.
2539 * corefile.c (core_device_create): Use core_create to make the
2542 * psim.c (psim_create): Use core_from_device() instead of
2545 * device.c (device_template_create_device): Make static as only
2546 needed by functions internal to device.c.
2548 Fri Jun 7 23:47:18 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
2550 * ppc-opcode-test-2: Remove description of fields.
2551 * ppc-opcode-complex: Ditto
2552 * ppc-opcode-flat: Ditto
2553 * ppc-opcode-simple: Ditto
2554 * ppc-opcode-stupid: Ditto
2555 * ppc-opcode-test-1: Ditto
2556 * ppc-cache-rules: Ditto
2558 * igen.c: Add description of files as a comment at the front.
2560 Wed Jun 26 12:50:33 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2562 * configure.in: Check for whether the termios and termio
2563 structures are really defined, and whether or not, they define the
2565 * configure: Regenerate.
2567 * Makefile.in ({,TERMIO_}CFLAGS): Add TERMIO_CFLAGS options set by
2570 * emul_unix.c: Various changes to allow for building on systems
2571 with different termio and termios structures. If host has both
2572 termio and termios, just use termios. No longer include
2575 Wed Jun 26 12:26:55 1996 Jason Molenda (crash@godzilla.cygnus.co.jp)
2577 * Makefile.in (bindir, libdir, datadir, mandir, infodir, includedir,
2578 INSTALL_PROGRAM, INSTALL_DATA): Use autoconf-set values.
2580 * configure.in (AC_PREREQ): autoconf 2.5 or higher.
2581 (AC_PROG_INSTALL): Added.
2582 * configure: Rebuilt.
2584 Wed Jun 5 23:53:42 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
2586 * corefile.h: Rewrite documentation so that it can be extracted and
2587 converted into texinfo (and hence ready for translation into html,
2591 Thu Jun 6 09:52:37 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2593 * hw_disk.c (SEEK_SET): If SEEK_SET is not defined, define as 0.
2595 Wed Jun 5 11:46:52 1996 Andrew Cagney <cagney@puddin>
2597 * hw_disk.c: Include <unistd.h> if available. Under SunOS, that
2598 is the source of SEEK_SET.
2600 Wed Jun 5 01:39:07 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
2602 * psim.c (psim_options): Correct type of dummy arguments being
2603 passed to a device_ioctl call.
2605 * hw_init.c (hw_data_init_data_callback): Adjust printf arguments.
2606 (write_stack_arguments): Ditto.
2607 * hw_trace.c: Instance callback entry no longer a table.
2609 Wed Jun 5 01:39:07 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
2611 * emul_unix.c (do_unix_umask): Cast printf argument.
2612 (convert_to_linux_termios): Use LINUX_VSWTC not LINUX_VSWCH
2614 Mon Jun 3 15:02:04 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2616 * hw_init.c (update_for_binary_section): Abort if we find an
2617 .interp section, which indicates the need for shared libraries to
2620 Mon Jun 3 15:02:04 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2622 * emul_unix.c (do_unix_{time,gettimeofday,getrusage}): Add support
2623 for time, gettimeofday, and getrusage system calls.
2624 ({solaris,linux}_descriptors): Add new system calls.
2625 (do_get{,e}{uid,gid}): Use gid_t/uid_t types.
2626 (do_get{,p}pid): Use pic_t types.
2628 * configure.in (AC_TYPE_{GETGROUPS,SIGNAL}): Define.
2629 (AC_TYPE_{MODE,OFF,PID,SIZE,UID}_T): Define.
2630 * config{.in,ure}: Regenerate.
2632 Mon Jun 3 23:19:57 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
2634 * emul_netbsd.c (emul_netbsd_create): Use the more specific names
2635 `ppc-elf' and `ppc-xcoff' for the stack-type.
2636 * emul_unix.c (emul_unix_create): Ditto.
2637 * emul_bugapi.c (emul_bugapi_create): Ditto.
2638 * hw_init.c: Reconize the new names.
2640 * emul_unix.c (do_unix_break): Adjust so that the updated ioctl
2641 call is used (no system parameter).
2643 Sun Jun 2 11:21:17 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2645 * emul_unix.{h,c}: New files to provide Solaris and Linux system
2648 * Makefile.in (LIB_{SRC,OBJ}): Add emul_unix.{c,o}.
2649 (os_emul.o): Depend on emul_unix.h.
2650 (emul_unix.o): New dependency.
2652 * configure.in (--enable-sim-alignment): Add 0|default to mean set
2653 alignment to 0, which means use appropriate alignment for mode.
2654 (AC_CHECK_FUNCS): Add new functions needed by emul_unix.c.
2655 (AC_CHECK_HEADERS): Add new include files needed by emul_unix.c.
2656 * config.in: Regenerate.
2657 * configure: Regenerate.
2659 * emul_generic.c (emul_write2_status): New function to return
2660 results in r3 and r4 for Solaris system calls.
2661 (emul_do_system_call): If the system call is not support, but
2662 there is a string for the system call name, print out the string
2663 instead of the system call number.
2665 * emul_generic.h (emul_write2_status): Declare it.
2667 * emul_netbsd.c: Use /* */ around comment on #endif.
2669 * os_emul.c: Include emul_unix.h.
2670 (os_emulations): Add emulations for Solaris, and Linux.
2672 * psim.c (psim_usage): Add message about solaris, linux
2675 Thu May 30 00:00:10 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
2677 * hw_iobus.c: Tidy up notes so that they can be auto-extracted.
2679 * README: Correct PSIM's title
2681 Wed May 29 23:50:26 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
2683 * basics.h: New global type object_disposition, used to indicate
2684 the status of objects when things are restarted.
2686 Fri May 17 17:28:52 1996 Andrew Cagney <cagney@benjimen.highland.com.au>
2688 * device_table.h: Change the interrupt descriptor structure so
2689 that it includes an additional member - an upper bound on the
2690 interrupts by that name.
2692 * device.c (device_interrupt_decode): Allow a range of interrupt
2693 ports (eg rst0 .. rst6) if the port descriptors bound is non zero.
2695 * device.c (device_tree_print_device): Include a list of valid
2696 interrupt ports when listing supported devices.
2698 * device.h, device.c (device_child_interrupt_*): Delete. Not used.
2700 * emul_generic.c (emul_add_tree_hardware): Modify the creation of
2701 the interrupt net so that it uses int0 .. intN.
2703 Tue May 14 23:03:53 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
2705 * device.h, device.c (device_ioctl): Drop the system argument.
2706 Devices can not obtain this using the device_system() call.
2707 * device_table.h: Adjust accordingly.
2708 * hw_*.c: Adjust accordingly.
2709 * emul_netbsd.c (do_break): Adjust call to vm device accordingly.
2710 * psim.c (psim_options): Use a device_ioctl call to force the
2711 hw_trace device to update the trace options.
2712 * hw_trace.c: Replace the init function with an ioctl call. Adjust
2715 * psim.c (psim_init): Re-order initialization so that the
2716 os-emulation is initialized after the device tree. Without this,
2717 os-emul's are not able to create instances or access properties
2718 that contain an instance handle.
2720 * device.h, device.c (device_add_*_property): Make these functions
2721 internal to device.c. The user has access to the more generic
2722 device_tree_add_parsed function. Differentiate between the initial
2723 and current value for each property.
2724 * (clean_device_properties): New function that deletes any
2725 properties created after the start of a simulation and restores
2726 the initial value of any others (ignoring ihandles).
2727 * (init_device_properties): (Re)Initialize any properties that
2728 contain ihandles. create
2730 * (device_tree_init): Include calls to clean the device tree's
2731 properties and then initialize them. Document this in the device.h
2734 Mon May 6 17:36:15 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
2736 * interrupts.c (decrementer_interrupt): Always pend a decrementer
2737 interrupt even if it is not yet possible to deliver it.
2739 Wed May 1 12:26:51 1996 Andrew Cagney <cagney@benjimen>
2741 * mon.h, mon.c (mon_get_number_of_insns): Make this externally
2742 visable adjusting the arguments so that the interface is correct.
2743 (mon_print_info): Adjust calls.
2745 * registers.h, registers.c (register_description): Add phony
2746 cycle, insn and stall registers.
2748 * psim.c (psim_read_register): Return nr of instructions for given
2751 Tue Apr 30 22:09:09 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
2753 * hw_htab.c: New file. Extract contents from disk_table.c.
2754 Contains a device that, during initialization will create a
2755 PowerPC htab in memory.
2756 * hw_register.c: New file. Extract contents from disk_table.c.
2757 Contains a device that, during initialization, will parse its
2758 property list and use that to initialize various processor
2759 registers (not target specific).
2760 * hw_vm.c: New file. Extract contents from disk_table.c. Contains
2761 a device that handles accesses to invalid virtual memory addresses
2763 * hw_init.c: New file. Extract contents from disk_table.c. Misc
2764 devices that can initialize memory from a file.
2765 * hw_trace.c: New file. Extract contents from disk_table.c.
2766 Configure trace options from property values.
2768 * Makefile.in (hw_htab.o, hw_register.o, hw_vm.o, hw_init.o,
2769 hw_trace.c): Add new device files.
2771 * device_table.c: Remove above code, now in separate independant
2774 Fri Apr 26 00:00:07 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
2776 * hw_disk.c: New file. Disk and CDROM device.
2778 * Makefile.in (hw_disk.o): Add device hw_disk.c.
2780 * pk_disklabel.c: New file. Implement the miss-named disk-label
2783 * Makefile.in (pk.h): Create the file pk.h that contains a list of all
2786 * Makefile.in (hw.h, hw.c): Add dependancy on Makefile so that
2787 they are re-created when the makefile is updated.
2789 * emul_generic.c (emul_add_tree_hardware): Add a disk device
2790 (below the iobus) to the device tree. Include an ihandle of
2791 the disk as /chosen/disk.
2793 * emul_bugapi.c (emul_bugapi_create): Don't initialize the input,
2794 output and (new) disk handles yet.
2795 * (emul_bugapi_init): Initialize the input, output (and just added)
2797 * (emul_bugapi_do_diskio): New. Performs disk i/o (well at least
2798 what I think the behavour is).
2799 * emul_bugapi.c (emul_bugapi_instruction_call): Add hook to disk
2800 i/o bug call. For RETURN call, exit using gpr[3]'s status even
2801 though this isn't part of the spec - makes it possible for machine
2802 code to signal the aporting of a simulation run.
2804 * emul_chirp.c (chirp_emul_call_method): Add support for the
2805 claim/release methods.
2806 * (chirp_emul_exit): Add an optional exit status argument to
2807 the exit method. Makes it possible for chirp emul simulations
2808 to abort upon an error.
2809 * device.h, device.c (device_instance_claim,
2810 device_instance_release): New methods for claiming and releasing
2812 * hw_memory.c: add claim and release memory methods.
2813 * hw_*: Use the claim memory method when allocating physical
2816 Thu Apr 18 23:38:10 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
2818 * hw_nvram.c (hw_nvram_update_clock): Use the current not previous
2819 time when updating the clock.
2821 * hw_nvram.c: Tidy up documentation
2823 Fri May 24 10:08:10 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2825 * configure.in (AC_STRUCT_ST_{BLKSIZE,BLOCKS,RDEV}): Use these
2826 macros to determine whether or not the appropriate st_<xxx> fields
2827 exist in the stat structure.
2828 (AC_CHECK_FUNCS): Check for all unix system calls used, except for
2829 the real basic ones like open, read, write, etc.
2830 * config{.in,ure}: Regenerate.
2832 * emul_netbsd.c: Add support for missing system calls, and/or
2833 missing stat fields.
2834 (MAXPATHLEN): Undefine if including unistd.h, since sys/param.h
2837 * hw_pal.c (WITH_STDIO): Redefine if O_NDELAY, F_GETFL, or F_SETFL
2839 (scan_hw_pal): Do not cause syntax error if O_NDELAY, F_GETFL, or
2840 F_SETFL not defined.
2842 Tue May 21 17:24:45 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2844 * emul_netbsd.c (write_stat): Don't convert st_blocks unless the
2847 Thu May 16 10:56:45 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2849 * configure.in (AC_CHECK_HEADERS): Add sys/ioctl.h.
2850 * config{.in,ure}: Regenerate.
2851 * emul_netbsd.c: If HAVE_SYS_IOCTL_H is not defined, don't include
2854 Tue May 7 17:28:12 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2856 * hw_pal.c (hw_pal_instance_read_callback): Remove unused
2859 * misc.c ({,target_}a2i): Rewrite to not use strtoul.
2861 * Makefile.in ({spreg,misc}.o): Add dependency on .c file.
2862 ({i,d}gen): Don't link in liberity. Use BUILD_LIBS instead of
2865 Mon May 6 11:31:43 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2867 * hw_pal.c (hw_pal_instance_read_callback): If using stdio, use
2868 fgets to read line. If not using stdio, do a simple blocking read
2871 Fri May 3 15:07:42 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2873 * Makefile.in: Correctly build simulator for build machine != host
2876 Tue Apr 30 18:46:05 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2878 * configure.in (--enable-hostendian): Rework so the default uses
2879 the AC_C_BIGENDIAN results. Only run AC_C_BIGENDIAN if not cross
2881 * configure: Regenerate.
2883 * sim-endian.h: Add more tests for host endian to support more
2884 platforms in a cross compilation environment.
2886 Wed Apr 17 14:38:06 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2888 * hw_pal.c ({scan,write}_hw_pal): If WITH_STDIO == DO_USE_STDIO,
2889 use stdio, instead of unpended read/printf_filtered.
2890 (hw_pal_instance_write_callback): If WITH_STDIO == DO_USE_STDIO,
2891 flush stdout after writing the characters.
2893 * options.c (print_options): Print out WITH_STDIO.
2895 * Makefile.in (STDIO_CFLAGS): Pass on result of @sim_stdio@
2896 configuration variable.
2897 (CONFIG_CFLAGS): Include STDIO_CFLAGS.
2898 (hw.{c,h}): Allow for source dir != build dir, and for HW_SRC
2899 files to contain directory pieces.
2901 * std-config.h (DO{,NT}_USE_STDIO): New flags for whether we
2902 should use stdio for console input.
2903 (WITH_STDIO): If not defined, define as DONT_USE_STDIO.
2905 * configure.in (--enable-sim-stdio): Add new switch to control
2906 whether stdio is used for console I/O.
2907 * configure: Regenerate.
2909 * interrupts.c (external_interrupt): Declare it to be
2910 INLINE_INTERRUPTS, not INLINE_CPU.
2912 Mon Apr 15 23:30:56 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
2914 * events.c (insert_event_entry): Allow events to be scheduled
2915 *NOW* (at delta time 0). Add assertions to clarify behavour of
2918 * events.c (update_time_from_event): New function. Calculates the
2919 number of ticks from the next event. Use this.
2921 Sun Apr 14 21:39:45 1996 Andrew Cagney <cagney@highland.com.au>
2923 * emul_netbsd.c (do_break): Return 0 if success (instead of
2926 * device_table.c (vm_ioctl_callback): Don't return adjusted break
2929 Sun Apr 14 21:32:41 1996 Andrew Cagney <cagney@highland.com.au>
2931 * device_table.h: Change type of the device ioctl so that it
2932 returns an int (status).
2933 * device.h (device_ioctl): Ditto.
2934 * device.c (device_ioctl): Ditto.
2936 * device_table.c (stack_ioctl_callback): Return 0 status.
2937 (vm_ioctl_callback): Ditto
2939 Sat Apr 13 00:00:24 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
2941 * emul_netbsd.c (do_read): Correctly set the return value.
2944 (do_geteuid): Ditto.
2946 (do_getegid): Ditto.
2948 (do_sigprocmask): Ditto.
2951 (do_gettimeofday): Ditto.
2952 (do_getrusage): Ditto.
2956 (do___sysctl): Ditto.
2958 Fri Apr 12 20:56:47 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
2960 * device_table.c (vm_ioctl_callback): Don't access the processor
2961 registers directly, instead leave it to the caller to handle this.
2963 * emul_netbsd.c (do_break): Which calls vm_ioctl_callback to
2964 perform a break. Pass in the new break value and set the
2965 registers according to the result.
2967 * emul_generic.c (emul_write_status): Change so that r3 contains
2968 either status or errno and failure is indicated by SO.
2970 Thu Apr 4 23:03:38 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
2972 * emul_bugapi.c (emul_bugapi_create): More strict check of OEA
2975 Thu Apr 4 20:58:05 1996 Andrew Cagney <cagney@highland.com.au>
2977 * interrupts.h (interrupts): New structure contains state of
2980 * cpu.c (cpu_interrupts): New function. Pending interrupt status
2981 in the cpu and grant access to it. Add interrupts to cpu
2984 Fri Mar 29 22:09:25 1996 Andrew Cagney <cagney@highland.com.au>
2986 * device.c (device_tree_add_parsed): Check that the creation of a
2987 device instance worked before using it.
2989 * psim.c (psim_halt): Remove cia argument from psim_halt. This
2990 function does not save the CIA so do not pass it in.
2992 Fri Mar 29 21:30:56 1996 Andrew Cagney <cagney@highland.com.au>
2994 * hw_pal.c (hw_pal): Merge the halt and icu and console devices
2995 found in device_table.c into a single hack pal.
2997 * device_table.c (halt, icu, console): Delete.
2999 * Makefile.in (hw_pal.o): New dependency.
3001 * emul_generic.c (emul_add_tree_hardware): Re-arange device tree
3002 so that it uses the pal instead of the icu/halt/console devices.
3003 Wire the pal's interrupt ports up to the cpu nodes.
3005 Fri Mar 29 20:17:17 1996 Andrew Cagney <cagney@highland.com.au>
3007 * hw_iobus.c (hw_iobus_attach_address_callback): Move from
3008 device_table.c to here.
3010 * Makefile.in (hw_iobus.o): New dependency.
3012 Fri Mar 29 12:17:58 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
3014 * emul_bugapi.c (_os_emul_data): Add fields for output, input.
3015 (emul_bugapi_create): Create input, output from /chosen/stdin and
3017 (emul_bugapi_do_{read,write}): Switch to use device_instance
3019 (emul_bugapi_instruction_call): Change calls to
3020 emul_bugapi_do_{read,write} to pass device instance argument.
3022 Tue Mar 26 14:57:58 1996 Michael Meissner <meissner@tiktok.cygnus.com>
3024 * igen.c (idecode_switch_end): Fix 2/26 change so that an extra
3025 default is not written out if a default was already written.
3027 * psim.c (psim_{read,write}_register): Use sizeof unsigned_8 to
3028 size cooked_buf, not sizeof natural_word, since floating point
3029 registers are 8 bytes.
3031 Mon Mar 25 22:07:13 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
3033 * configure: Regenerate with autoconf 2.9.
3035 Thu Mar 21 00:14:26 1996 Andrew Cagney <cagney@highland.com.au>
3037 * device_table.h: Always include string headers.
3039 Thu Mar 21 00:06:09 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
3041 * main.c (error): Be careful to not try to print out statistics
3042 when the simulation was never created.
3044 Sun Mar 17 22:40:57 1996 Andrew Cagney <cagney@highland.com.au>
3046 * basics.h: Move the event queue's definition to here so that it
3047 can be refered to globally with out importing all of events.h.
3049 * psim.h, psim.c (psim_event_queue): New function. Grant access
3050 to the simulation event queue. Will make this the single point of
3051 access (there is after all only one event queue in the
3054 * cpu.c (cpu_create): Use psim_event_queue to obtain the event
3055 queue instead of it being passed in. No longer allow access to
3056 the cpu's copy of the event queue.
3058 Sun Mar 17 22:40:57 1996 Andrew Cagney <cagney@highland.com.au>
3060 * events.h, events.c (event_handler): Remove event_queue from
3061 arguments passed to an event handler. That argument is redundant
3062 - the `data' should refer to a data structure that contains the
3063 event queue if queing is needed.
3065 * cpu.c (cpu_decrement_event): adjust
3067 * events.c (event_queue_process): adjust
3069 Sun Mar 17 22:40:57 1996 Andrew Cagney <cagney@highland.com.au>
3071 * device.h, device.c (device_system): New, returns a handle for
3072 the system given the device.
3074 * device.c (device_address_init): Store a pointer back to the
3075 system in each devices node.
3077 * device_table.h: Don't pass `system' into each device when it is
3078 being initialized, this is now available using device_system(me).
3080 * device.c (device_address_init, device_data_init): Adjust.
3082 * hw_cpu.c, hw_nvram.c, hw_memory.c, hw_eeprom.c, device_table.c:
3085 Sun Mar 17 22:40:57 1996 Andrew Cagney <cagney@highland.com.au>
3087 * interrupts.c (decrementer_interrupt, external_interrupt):
3088 Remember that an interrupt wasn't delivered so that it can be
3091 * interrupts.c (check_masked_interrupt): New function. (re)
3092 checks for the posibility that a recent change to the MSR may have
3093 made it possible to deliver an interrupt that was previously
3094 masked be the EE bit.
3096 * ppc-instructions (mtmsr, mfmsr, rfi): Check for posibility of
3097 a pending interrupt being delivered using check_masked_interrupt().
3099 * cpu.c (cpu_decrement_event): Just call decrementer_interrupt()
3100 leaving it to that module to handle both interrupt synchronization
3103 * cpu.c (struct _cpu): remove variables that were going to record
3104 pending decrementer and external interrupts.
3106 Sun Mar 17 22:40:57 1996 Andrew Cagney <cagney@highland.com.au>
3108 * hw_cpu.c, hw_cpu.h: New files. Implement a device that sits
3109 between the interrupt controller and the simulators internal
3110 processor model. Maps device interrupts onto the processor
3111 interrupt function calls.
3113 Mon Mar 4 06:06:54 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
3115 * hw_nvram.c: NVRAM device that includes a real-time clock that is
3116 updated each second.
3118 Mon Mar 4 04:18:50 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
3120 * device.h (attach_type): Remove attach_default type address
3121 spaces. Will replace with levels of callback memory.
3123 * corefile.h, corefile.c (new_core_mapping), corefile.c
3124 (core_map_attach): Replace default attach with a layerd callback
3127 Sun Mar 3 03:58:46 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
3129 * device.c (split_property_specifier): ensure that only a single
3131 (split_value): New function, parses the value part of a device
3134 * device.c (device_tree_add_parsed): Use the interrupt conversion
3135 functions to determine the interrupt port numbers.
3137 * device_table.h: Add table that maps between an interrupts
3138 symbolic name and its port number.
3140 * device.h, device.c (device_interrupt_decode,
3141 device_interrupt_encode): new functions use the recently added
3142 interrupt port name/number tables to perform conversion.
3144 Sun Mar 3 03:23:59 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
3146 * device.h, device.c (device_set_array_property,
3147 device_set_boolean_property, device_set_ihandle_property,
3148 device_set_integer_property, device_set_string_property): New
3149 functions - allow the value of a given property to be changed.
3151 * device.h, device.c: Re-order declaration and definition of
3154 Sun Mar 3 03:10:22 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
3156 * device.c (device_tree_print_device, device_tree_add_parsed):
3157 Remove references to phandle properties.
3159 Wed Feb 28 00:43:07 1996 Andrew Cagney - aka Noid <cagney@highland.com.au>
3161 * Makefile.in (corefile.o): missing dependency on device_table.h
3164 Tue Feb 27 23:59:35 1996 Andrew Cagney - aka Noid <cagney@highland.com.au>
3166 * device_table.h: Revamp device init callbacks so that they are a
3168 * device.c (device_init_data, device_init_address): If an init
3169 callback is NULL assume it should do nothing.
3170 * device_table.c (ignore_device_init, unimp_device_init): delete
3172 * device_table.c, hw_memory.c: adjust.
3176 * (device_instance): ditto.
3178 * (address nee config_address): ditto.
3179 * (interrupt): ditto.
3181 Mon Feb 26 21:11:20 1996 Andrew Cagney - aka Noid <cagney@highland.com.au>
3183 * igen.c (idecode_switch_end): Output a default entry when the
3184 switch statement is perfect. Firstly stops GCC complaining about
3185 an incomplete switch and secondly it will be eliminated by a good
3188 Mon Feb 26 22:47:15 1996 Andrew Cagney - aka Noid <cagney@highland.com.au>
3190 * Makefile.in (hw.h, hw.c): New targets. Create from the list of
3191 hw_*.c files. hw.h declares a device descriptor table for each hw
3192 device while hw.c lists those tables in a form suitable for the
3193 construction of a top leveltable in device_table.c.
3195 * Makefile.in (device_table.o): now depends on hw.c a generated
3198 * device_table.c (device_table): Re-arange the table of devices so
3199 that two levels are possible. Make use of hw.c.
3200 * device_table.h: ditto.
3202 * device.c (device_template_create_device): Handle new two level
3203 device lookup table.
3204 * device.c (device_usage): ditto.
3206 Mon Feb 26 22:24:00 1996 Andrew Cagney - aka Noid <cagney@highland.com.au>
3208 * device_table.c: Delete the memory device (moved to hw_memory.c).
3210 * hw_memory.c: New file. Just an OpenBoot memory device.
3212 Wed Jan 17 21:47:34 1996 Andrew Cagney <cagney@highland.com.au>
3214 * device.c (device_init_address): New. Split initialization into
3215 two stages, address and address spaces
3216 * device.c (device_init_data): New. ... and data or other work.
3217 With out this, devices try to modify memory before it as been
3220 * device.c (device_tree_init): Update to perform staged
3223 * device.c (device_init): Delete.
3225 Wed Jan 17 21:43:09 1996 Andrew Cagney <cagney@highland.com.au>
3227 * device_table.c (data_*): Rewrite to make heaver use of property
3228 nodes. Allow initialization by different data types.
3229 * device_table.c (htab_* pte_*): Rewrite to use properties.
3231 * emul_chirp.c (emul_chirp_create): Use
3232 * emul_bugapi.c (emul_bugapi_create): Ditto
3233 * emul_netbsd.c (emul_netbsd_create): Ditto
3235 Wed Jan 17 21:24:50 1996 Andrew Cagney <cagney@highland.com.au>
3237 * emul_generic.c (emul_add_tree_options): Annotate existing tree
3238 with options that haven't yet been specified.
3239 * emul_generic.c (emul_add_tree_hardware): Annotate existing tree
3240 with demo devices and properties.
3242 * emul_chirp.c (emul_chirp_create): Update to use new
3243 device_tree_add_parsed call and additional information now
3244 included in the device tree. Use emul_add_tree* functions to add
3245 any missing details.
3246 * emul_bugapi.c (emul_bugapi_create): Ditto
3247 * emul_netbsd.c (emul_netbsd_create): Ditto
3249 Wed Jan 17 21:18:27 1996 Andrew Cagney <cagney@highland.com.au>
3251 * device.c (device_instance_create): New. Create/delete and
3252 operate on instances of a device.
3253 * device.c (device_instance_delete): Ditto
3254 * device.c (device_instance_read): Ditto
3255 * device.c (device_instance_write): Ditto
3256 * device.c (device_instance_seek): Ditto
3257 * device.c (device_instance_data): Ditto
3258 * device.c (device_instance_name): Ditto
3259 * device.c (device_instance_path): Ditto
3261 * emul_chirp.c (chirp_emul_open): Implement using device_instance.
3262 * emul_chirp.c (chirp_emul_close): Ditto
3263 * emul_chirp.c (chirp_emul_read): Ditto
3264 * emul_chirp.c (chirp_emul_write): Ditto
3265 * emul_chirp.c (chirp_emul_seek): Ditto
3267 * emul_chirp.c (chirp_read_t2h_args): Read arguments from device.
3268 Being careful to convert all from target to host byte order.
3269 * emul_chirp.c (chirp_write_h2t_args): Converse.
3271 Wed Jan 17 20:07:15 1996 Andrew Cagney <cagney@highland.com.au>
3273 * device.c (device_tree_add_parsed): New. Rewrite code to add
3274 devices to the device tree so that a single printf style function
3277 * device.c (device_tree_add_*): Delete. Replaced by above.
3279 * device.c (split_device_specifier): Functions to manipulate a
3280 device specifier (path) breaking it into its components
3281 * device.c (split_property_specifier): Ditto
3282 * device.c (split_device_name): Ditto
3283 * device.c (split_find_device): Ditto
3285 * device.c (scan_*): Delete
3287 * device.c (device_tree_find_device): Rewrite to use above.
3288 * device.c (device_add_property): Ditto
3290 Wed Jan 17 19:51:56 1996 Andrew Cagney <cagney@highland.com.au>
3292 * psim.c(psim_options): Parse the psim options, installing their
3293 value in the device tree. Options are now first entered into a
3294 device tree and then extracted out again when needed. This allows
3295 greater flexability in configuration.
3297 * psim.c (psim_tree): Returns a basic device tree ready for
3298 parsing by psim_options.
3299 * psim.c (psim_usage): New. Give usage to varing levels of detail
3300 according to the verbosity. In turn output device and trace
3303 * main.c (main): Update to use new system
3304 * sim_calls.c (sim_open, sim_do_command): Ditto
3306 * psim.c (psim_options): Add `r' option - ram size.
3307 * psim.c (psim_options): Add `o' option - openboot tree entry.
3308 * psim.c (psim_options): Add `h'/`H' options - more help.
3310 * debug.c (trace_usage): Add more detailed help.
3311 * device.c (device_usage): New. Output help including a list of
3312 the devices currently available in the device table.
3313 * device_table.c: Add usage operator to each device.
3315 * corefile.c (core_create, core_device_create): Adjust so that the
3316 core device is created earlier for psim_tree(). Core can later be
3319 * psim.c (psim_create): Update to handle above way of creating
3320 things. Extract all information from the device tree.
3322 * device_tree.c (trace_*): New device node, its properties are
3323 used to set the value of the trace options. Init this device (in
3324 psim_options) when ever the options are updated.
3326 Wed Jan 17 19:46:07 1996 Andrew Cagney <cagney@highland.com.au>
3328 * debug.h: Add trace_print_info, trace_print_device_tree and
3329 trace_dump_device_tree. The first is a replacement for the
3330 variable `print_info' found in main.c and sim_calls.c. The latter
3331 two enable the dumping of the entire device tree.
3333 * debug.c: Add to trace_description table.
3335 * main.c (main): Use above trace instead of local variable
3336 * sim_calls.c (sim_close): Ditto
3338 * device.c (device_tree_print_device): New. Prints the device
3339 tree in a format that is consistent with what can be parsed by the
3340 device tree load from file code.
3342 * psim.c (psim_create): Dump device tree if enabled. If nump
3343 selected, exit psim immediatly.
3345 Wed Jan 17 19:36:52 1996 Andrew Cagney <cagney@highland.com.au>
3347 * corefile-n.h (core_map_read_N): When mapping from an address to
3348 a device, do not subtract the devices base. The device its self
3349 can do this. Brings the behavour into line with OpenBoot.
3350 * corefile-n.h (core_map_write_N): Ditto
3351 * corefile.c (core_map_read_buffer): Ditto
3352 * corefile.c (core_map_write_buffer): Ditto
3354 * device_table.c (console_io_read_buffer_callback): Adjust to
3355 handle biased address.
3356 * device_table.c (console_io_write_buffer_callback): Ditto
3358 Wed Jan 17 18:36:09 1996 Andrew Cagney <cagney@highland.com.au>
3360 * device.c (attach_device_interrupt_edge): New. Interrupt model
3361 did not allow interrupts to be wired up as a general net (edges).
3362 Re-implement so that interrupt events can be passed to multiple
3363 controllers and interrupt controllers can further propogate
3366 * device.c (attach_device_interrupt_edge) : New, Ditto
3367 * device.c (detach_device_interrupt_edge) : New, Ditto
3368 * device.c (clean_device_interrupt_edges) : New, Ditto
3369 * device.c (device_interrupt_event) : New, Ditto
3370 * device.c (device_interrupt_attach) : New, Ditto
3371 * device.c (device_interrupt_detach) : New, Ditto
3372 * device.c (device_child_interrupt_attach) : New, Ditto
3373 * device.c (device_child_interrupt_detach) : New, Ditto
3375 * device.c (device_attach_interrupt) : Delete old
3376 * device.c (device_detach_interrupt) : Delete old
3377 * device.c (device_interrupt) : Delete old
3378 * device.c (device_interrupt_ack) : Delete old
3380 * device_table.c (unimp_*) : Update to match
3382 * device_table.c (icu_io_write_buffer_callback) : Update to use
3384 * device_table.c (icu_interrupt_event_callback) : Ditto
3386 Wed Jan 17 18:18:40 1996 Andrew Cagney <cagney@highland.com.au>
3388 * device.c (external_to_device) : New function that provides a
3389 standard mapping between a devices internal representation (a
3390 pointer) and its external (or what is passed to a client)
3391 representation (a phandle). Implement using the cap object
3392 attached to the root node.
3394 * device.c (device_to_external) : Ditto
3395 * device.c (external_to_device_instance) : Ditto but for ihandle
3396 and device instance.
3397 * device.c (device_instance_to_external) : Ditto
3399 * Makefile (device.o): Add dependency on cap.
3401 * emul_chirp.c (struct _emul_chirp_data) : Elimate use of cap. Code
3402 needing to translate between internal and external representations
3403 changed to use the external_to_device et.al. device operations.
3404 * emul_chirp.c (chirp_emul_*) : Ditto
3406 * Makefile (emul_chirp.o): Remove dependency on cap
3408 Sat Jan 6 10:13:26 1996 Andrew Cagney - aka Noid <cagney@highland.com.au>
3410 * emul_chirp.c (map_over_chirp_note): Tighten up (and fix) checks
3411 on OpenBoot note section.
3413 Fri Jan 5 20:28:53 1996 Andrew Cagney <cagney@hignland.com.au>
3415 * emul_generic.c (emul_write_buffer): Use vm faulting byte
3416 read/write calls for buffer transfers. This will cause a fault to
3417 occure if the transfer fails. CHRP catches the fault while the
3418 others suffer the consequences.
3419 (emul_read_buffer): Ditto.
3420 (emul_write_word): Ditto.
3421 (emul_read_word): Ditto.
3422 (emul_read_string): Ditto.
3424 Fri Jan 5 18:55:34 1996 Andrew Cagney <cagney@highland.com.au>
3426 * emul_chirp.c (emul_chirp_create, emul_chirp_instruction_call),
3427 emul_generic (emul_blr_instruction): Use a real blr instruction to
3428 return from a client service call.
3430 * emul_chirp.c (services): Add all OpenBoot services to table.
3432 * emul_generic.h, emul_bugapi.c (emul_bugapi_create), emul_chirp.c
3433 (emul_chirp_create) : Use names instead of numbers for
3434 instructions being stored in memory.
3436 Fri Jan 5 18:52:28 1996 Andrew Cagney <cagney@highland.com.au>
3438 * Makefile.in (maintainer-clean): Remove .log, core and *.core
3439 (From NetBSD) files.
3441 Wed May 29 22:57:40 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
3443 * ChangeLog.00, ChangeLog: ChangeLog from gdb-4.16 becomes