This commit was generated by cvs2svn to track changes on a CVS vendor
[external/binutils.git] / sim / ppc / ChangeLog
1 Thu Sep  2 18:15:53 1999  Andrew Cagney  <cagney@b1.cygnus.com>
2
3         * configure: Regenerated to track ../common/aclocal.m4 changes.
4
5 1999-05-08  Felix Lee  <flee@cygnus.com>
6
7         * configure.in: Use AC_EXEEXT instead of AM_EXEEXT.
8         * configure: Regenerated to track ../common/aclocal.m4 changes.
9         
10 1999-04-02  Keith Seitz  <keiths@cygnus.com>
11
12         * sim_calls.c (POLL_QUIT_INTERVAL): Define. Used to tweak
13         the frequency at which the poll_quit callback is called.
14         (poll_quit_count): New global.
15         (sim_io_poll_quit): Only call the poll_quit callback
16         after the specified POLL_QUIT_INTERVAL.
17
18 1999-02-22  Jim Lemke  <jlemke@cygnus.com>
19
20         * dc-complex: Force expansion on all bits of field BO.
21         Previously, the least-significant (prediction) bit was ignored.
22         * ppc-instructions (conditional branches): Implement mpc860c0 option.
23         * igen.c (gen_semantics_[ch]): Setup for mpc860c0 option.
24         * psim.c (is_num, psim_options): Added parsing for mpc860c0 option.
25         * interrupts.h: Added "mpc860c0_instruction_program_interrupt".
26         * interrupts.c (program_interrupt): Added handling for above interrupt.
27
28 1999-02-01  Jim Blandy  <jimb@zwingli.cygnus.com>
29
30         Make the simulator compatible with the MPC750.  It would be nicer
31         to make this a real multi-sim, but that's more work than we have
32         time for.
33         * emul_generic.c (emul_add_tree_options): Only require strict
34         alignment if it was explicitly requested at configuration time.
35         Don't make it the default for little-endian machines.
36         * ppc-spr-table (UMMCR0, UMMCR1, UPMC1, UPMC2, USIA, UPMC3, UPMC4,
37         MMCR0, PMC1, PMC2, SIA, MMCR1, PMC3, PMC4, L2CR, ICTC, THRM1,
38         THRM2, THRM3): Plop in the MPC750 SPR registers.
39         (DABR): This is weird.  This was HID5, but the PPC spec says this
40         should be DABR; why did some random processor use it for something
41         else?  The HID5 entry dates back to the original checkin of the
42         simulator code in 1995, so remove it.
43         * sim_calls.c (register_names): Delete this; since the user can
44         now change GDB's list of register names dynamically, we can't
45         pretend there's a static mapping here.
46         (sim_fetch_register, sim_store_register): Call GDB's REGISTER_NAME
47         function to get the register name.  That ought to be accurate.
48         However, we're changing a compile-time dependency (using the
49         REGISTER_NAMES macro) into a link- and run-time dependency
50         (calling REGISTER_NAME, which happens to be a function call on the
51         PPC).
52
53 1999-01-22  Jim Lemke <jlemke@cygnus.com>
54
55         * igen.c(gen_semantics_[ch]): setup/use of new option
56         (-o mpc860c0[=n]).
57         interrupts.[ch](mpc860c0_instruction_program_interrupt): added.
58         ppc-instructions(the four branch insn groups): detect problematic br's.
59         psim.c(is_num - added, psim_options): Parse and init new option.
60         These changes are currently under #ifdef WITH_OPTION_MPC860C0.
61
62 1998-12-01  Ken Raeburn  <raeburn@cygnus.com>
63
64         * hw_nvram.c (hw_nvram_bcd): Force value to fit in 0..99.
65
66 Fri Nov 20 12:17:28 1998  Andrew Cagney  <cagney@b1.cygnus.com>
67
68         * main.c (sim_io_poll_quit): Stub function.
69
70         * events.c (SIM_EVENTS_POLL_RATE): Define.
71         (sim_events_poll): Copy function from common/sim-events.c.
72         (event_queue_init): Copy scheduling of sim_events_poll from same.
73
74         * sim_callbacks.h, sim_calls.c (sim_io_poll_quit): New function,
75         poll the external environment.
76
77 1998-11-19  Michael Meissner  <meissner@cygnus.com>
78
79         * ppc-instructions (is_{NaN,inf}): Use unsigned64 to get the
80         fractional type, so that quiet NaN's aren't treated like
81         Infinities.
82
83 Mon Sep 28 09:42:45 1998  Drew Moseley  <dmoseley@cygnus.com>
84
85         * table.c (table_open): For cygwin hosts, we need to use the
86         return value from the read routine as the number of bytes to
87         process.  This apparently is due to text-mode vs binary-mode.  If
88         the mounts are done text-mode, then the size returnedby fstat()
89         may be different than the number of bytes "read" in text mode.
90
91 Sun Oct  4 00:50:47 1998  Felix Lee  <flee@cygnus.com>
92
93         * emul_netbsd.c (do_open): fix order-of-evaluation problem.
94         (do_close): ditto.
95         (do_fstat): ditto.
96         (do_lstat): ditto.
97
98 1998-09-03  Michael Meissner  <meissner@cygnus.com>
99
100         * emul_{netbsd,unix}.c: Update copyright year.
101
102 Mon Jun 29 10:57:36 1998  Michael Snyder  <msnyder@cleaver.cygnus.com>
103
104         * sim_calls.c (sim_fetch_register, sim_store_register):
105         return zero when nothing to do.
106
107 1998-06-26  Michael Meissner  <meissner@cygnus.com>
108
109         * configure.in (AC_CHECK_HEADERS): Don't check for sys/mount.h.
110         * configure: Regenerate.
111         * emul_{netbsd,unix}.c (toplevel): No longer try to include
112         sys/mount.h. It conflicts on Linux when gnu libc2 is used.
113
114 Tue May 12 12:10:33 PDT 1998  James Ingham  <jingham@leda.cygnus.com>
115
116         * Makefile.in: The run target depended on a target psim$(EXEEXT),
117         but there was no such target, only plain psim.  So I changed the
118         run target to depend on psim.
119
120 Sat May  2 01:10:12 1998  Stu Grossman  <grossman@babylon-5.cygnus.com>
121
122         * aclocal.m4:  Remove defs of AM_EXEEXT and AM_CYGWIN32.  These are
123         now defined in ../common/aclocal.m4, and the double definition causes
124         problems with AC_SUBST of EXEEXT.
125         * configure:  Regenerate.
126         
127 Wed Apr 29 15:44:52 1998  Geoffrey Noer  <noer@cygnus.com>
128
129         * aclocal.m4: new file for AM_EXEEXT macro
130         * configure.in: call AM_EXEEXT
131         * configure: regenerate with autoconf 2.12.1.
132         * Makefile.in: add EXEEXT support
133
134 Sun Apr 26 15:31:55 1998  Tom Tromey  <tromey@creche>
135
136         * configure: Regenerated to track ../common/aclocal.m4 changes.
137         * config.in: Ditto.
138
139 Sun Apr 26 15:19:51 1998  Tom Tromey  <tromey@cygnus.com>
140
141         * acconfig.h: New file.
142         * configure.in: Reverted change of Apr 24; use sinclude again.
143         Don't call AC_C_CROSS.
144
145 Fri Apr 24 14:16:40 1998  Tom Tromey  <tromey@creche>
146
147         * configure: Regenerated to track ../common/aclocal.m4 changes.
148         * config.in: Ditto.
149
150 Fri Apr 24 11:18:46 1998  Tom Tromey  <tromey@cygnus.com>
151
152         * Makefile.in (top_builddir): New macro.
153         (INTLLIBS): New macro.
154         (INTLDEPS): Likewise.
155         (psim): Depend on INTLDEPS; link against INTLLIBS.
156         * configure.in: Call CY_GNU_GETTEXT.
157
158 Wed Apr 22 14:28:48 1998  Michael Meissner  <meissner@cygnus.com>
159
160         * configure: Regenerate with autoconf 2.12.1.
161
162 Fri Mar 13 09:25:58 1998  Andrew Cagney  <cagney@b1.cygnus.com>
163
164         * psim.c (psim_read_register, psim_write_register): Handle updates
165         for FPSCR.
166
167         * registers.c (register_description): Reconize "FPSCR".
168
169         * emul_netbsd.c (emul_netbsd_create): When FP available, enable
170         MSR FP exception mode. Do not enable FPSCR bits.
171         * emul_unix.c (emul_unix_create): Ditto.
172
173 Tue Feb 17 12:48:58 1998  Andrew Cagney  <cagney@b1.cygnus.com>
174
175         * sim_calls.c (sim_store_register, sim_fetch_register): Pass in
176         length parameter.  Return -1.
177
178 Mon Feb  9 14:13:14 1998  Andrew Cagney  <cagney@b1.cygnus.com>
179
180         * ppc-instructions (fdiv, fdivs): Check for divide by zero.
181         (is_invalid_zero_divide, invalid_zero_divide_operation): New
182         functions.
183         
184 Wed Dec 10 17:38:28 1997  Andrew Cagney  <cagney@b1.cygnus.com>
185
186         * sim_calls.c (sim_load): Do not parse PROG using buildargv, use
187         raw value instead.
188
189 1997-11-05  Felix Lee  <flee@cygnus.com>
190
191         * emul_chirp.c: #ifdef HAVE_UNISTD_H
192
193 Wed Oct 15 08:50:54 1997  Andrew Cagney  <cagney@b1.cygnus.com>
194
195         * corefile.c (core_attach): Pad out allocated memory regions so
196         that they are always correctly aligned.
197         (struct _core_mapping, core_map_attach, core_init,
198         new_core_mapping): Change free_buffer to type void*.
199
200 Mon Oct  6 18:09:26 1997  Michael Meissner  <meissner@cygnus.com>
201
202         * sim_calls.c (zfree): Call free correctly.
203
204 Mon Sep 29 10:05:01 1997  Andrew Cagney  <cagney@b1.cygnus.com>
205
206         * sim_calls.c (zfree): Use free, not mfree.
207         (sim_io_flush_stdoutput): Replace gdb_flush with callback ->
208         flush_stdout.
209
210 Fri Sep 26 09:50:29 1997  Andrew Cagney  <cagney@b1.cygnus.com>
211
212         * ppc-instructions (sraw, slw, srw): From Charles Lefurgy, Fix
213         mask extracting shift amount. Correctly condition for setting XER
214         in sraw.
215         (ldhau): From Johannes Reisinger, update rA after load.
216
217 Tue Sep  9 22:13:23 1997  Felix Lee  <flee@cygnus.com>
218
219         * basics.h (CONCAT*): token-pasting macros, if ALMOST_STDC,
220         for MSVC.
221         * words.h: __int64 instead of long long for MSVC.
222
223 Wed Aug 27 10:24:15 1997  Andrew Cagney  <cagney@b1.cygnus.com>
224
225         * sim_calls.c (sim_create_inferior): Check the simulator was
226         initialized before creating inferior.
227
228         * idecode_expression.h (ALU_END): From Charles Lefurgy - Extract
229         sign bit using 64 bit and not a 32 bit mask.
230
231 Wed Aug 27 10:15:48 1997  Andrew Cagney  <cagney@b1.cygnus.com>
232
233         * sim_calls.c (sim_load): From Ian Lance Taylor - free argv after
234         it has been used, not before.
235         
236 Tue Aug 26 10:41:35 1997  Andrew Cagney  <cagney@b1.cygnus.com>
237
238         * sim_calls.c (sim_kill): Delete.
239         (sim_create_inferior): Add ABFD argument.
240         (entry_point): Delete variable.
241         (sim_load): Move setting of PC from here.
242         (sim_create_inferior): To here.
243
244 Mon Aug 25 16:17:06 1997  Andrew Cagney  <cagney@b1.cygnus.com>
245
246         * sim_calls.c (sim_open): Add ABFD argument.
247
248 Thu Jul  3 10:18:06 1997  Andrew Cagney  <cagney@b1.cygnus.com>
249
250         * ppc-instructions (PPC_INSN_INT): From Michael Thies - Monitoring
251         CR register updates dependant on RC value had logic backwards.
252
253         * ppc-instructions (Load String Word Immediate): From Brad Parker
254         - sense of wrap test in check for overwriting RA wrong.
255         (Load String Word Indexed): Ditto.
256         
257         * configure.in: From Erik Landry - set sim_default_model not
258         sim_model for sim-default-model option.
259         * configure: Regenerate.
260         
261         * interrupts.c (check_masked_interrupts): Schedule a hardware
262         interrupt delivery when FP interrupts get enabled.
263         (program_interrupt): Generate FP exceptions instead of aborting.
264         (deliver_hardware_interrupt): Deliver a FP exception if so
265         enabled.
266
267         * registers.h: Add definition of fpscr_vx_bits.
268
269         * idecode_expression.h (FPSCR_END): Always update FEX and VX bits
270         in FPSCR.
271         (FPSCR_END): Explicitly check for possible floating point
272         exception conditions.
273         (FPSCR_BEGIN): Simplify.
274         
275         * ppc-instructions (Move From FPSCR): Enable.
276         (Move To FPSCR Bit 1): Ditto.
277         (Move To FPSCR Bit 0): Ditto.
278         (Move To FPSCR Field Immediate): Ditto.
279         (Move to Condition Register from FPSCR): Simplify.
280         (invalid_arithemetic_operation): Generate a QNaN when invalid
281         operation exception disabled.
282         
283 Tue May 20 10:22:50 1997  Andrew Cagney  <cagney@b1.cygnus.com>
284
285         * sim_calls.c (sim_open): Add callback argument.
286         (sim_set_callbacks): Delete.
287
288 Tue Apr 22 22:36:57 1997  Mike Meissner  <meissner@cygnus.com>
289
290         * sim_callbacks.h (error): Make declaration match gdb's.
291         * main.c (error): Ditto.
292
293 Fri Apr 18 17:03:09 1997  Andrew Cagney  <cagney@b1.cygnus.com>
294
295         * sim_calls.c (sim_stop_reason): Simplify.  Was running implies
296         stopped/SIGINT. Exit implies a status code.
297
298         * psim.c (cntrl_c_simulation): From main.c.  Event function that
299         halts the simulator.
300         (psim_stop): New. Asynchronously schedule a stop simulator event.
301         (psim_run_until_stop): Delete. Made redundant by psim_stop.
302
303         * main.c (cntrl_c): Update.
304         (cntrl_c_simulation): Moved to psim.c.
305
306         * sim_calls.c (sim_stop): New function. Use psim_stop which
307         schedules a stop event.
308         (sim_resume): Drop SIGINT handler, now in gdb/main.c.
309         (sim_resume): Use psim_run as stop variable no longer needed.
310
311 Fri Apr 18 17:03:08 1997  Andrew Cagney  <cagney@b1.cygnus.com>
312
313         * psim.c (psim_options): Handle -E option correctly.
314         (psim_usage): Document.
315
316 Thu Apr 17 03:28:03 1997  Doug Evans  <dje@canuck.cygnus.com>
317
318         * psim.c (psim_options): Ignore -E option (sets endianness).
319         * sim_calls.c: #include bfd.h.
320         (entry_point): New static local.
321         (sim_load): Return SIM_RC.  New arg abfd.  Set start address from bfd.
322         (sim_create_inferior): Return SIM_RC.  Delete arg start_address.
323
324 Tue Apr 15 14:57:18 1997  Ian Lance Taylor  <ian@cygnus.com>
325
326         * Makefile.in (INSTALL): Set to @INSTALL@.
327         (INSTALL_XFORM, INSTALL_XFORM1): Remove.
328         (install): Depend upon installdirs.  Use $(program_transform_name)
329         directly, rather than using $(INSTALL_XFORM).
330         (installdirs): New target.
331
332 Fri Apr  4 17:54:36 1997  Jim Wilson  <wilson@cygnus.com>
333
334         * Makefile.in (tmp-hw, tmp-pk): Use for loop to eliminate duplicates
335         rather than the non-portable cat -n.
336
337 Mon Apr 14 16:29:51 1997  Ian Lance Taylor  <ian@cygnus.com>
338
339         * Makefile.in (INSTALL): Change install.sh to install-sh.
340
341 Tue Apr  1 18:15:14 1997  Jim Wilson  <wilson@cygnus.com>
342
343         * ppc-instructions: Change milhwu to mulhwu.
344
345 Wed Apr  2 15:38:08 1997  Doug Evans  <dje@canuck.cygnus.com>
346
347         * sim_calls.c (sim_open): New arg `kind'.
348
349 Wed Apr  2 14:51:17 1997  Ian Lance Taylor  <ian@cygnus.com>
350
351         * COPYING: Update FSF address.
352
353 Tue Mar 25 16:17:59 1997  Andrew Cagney  <cagney@kremvax.cygnus.com>
354
355         * main.c (sim_io_read_stdin): Only compile unbuffered IO code if
356         all the required features are supported by the host OS.
357
358 Tue Mar 25 12:13:02 1997  Andrew Cagney  <cagney@kremvax.cygnus.com>
359
360         * emul_bugapi.c (emul_bugapi_create): Guard against NULL images.
361
362         * configure.in (enable-sim-endain): Correct typo in usage (from
363         Erik Landry <landry@ENGR.ORST.EDU>).
364         * configure: Re-generate.
365
366 Fri Mar 14 18:23:02 1997  Andrew Cagney  <cagney@kremvax.cygnus.com>
367
368         * Makefile.in (targ-vals.def): Re-do rule so that it works with
369         FreeBSD's make.  Didn't like $<.
370
371 Thu Mar 13 12:55:48 1997  Doug Evans  <dje@canuck.cygnus.com>
372
373         * sim_calls.c (sim_open): New SIM_DESC result.  Argument is now
374         in argv form.
375         (other sim_*): New SIM_DESC argument.
376
377 Thu Feb 13 10:35:14 1997  Andrew Cagney  <cagney@phydeaux.cygnus.com>
378
379         * ppc-opcode-simple-array, ppc-opcode-simple-goto,
380         ppc-opcode-simple-switch, ppc-opcode-complex-array,
381         ppc-opcode-complex-goto, ppc-opcode-complex-switch,
382         ppc-opcode-jump, ppc-opcode-goto, ppc-opcode-flat: Delete,
383         superseeded by --sim-decode-mechanism option.
384
385         * ppc-opcode-simple, dc-simple: Rename to be 8.3
386         * ppc-opcode-complex, dc-complex: Ditto.
387         * ppc-opcode-stupid, dc-stupid: Ditto.
388         * ppc-opcode-test-1, dc-test.01: Ditto.
389         * ppc-opcode-test-2, dc-test.02: Ditto.
390
391         * configure.in (--enable-sim-opcode): Change prefix to dc- instead
392         of ppc-opcode-.
393
394 Wed Feb 12 19:33:45 1997  Andrew Cagney  <cagney@phydeaux.cygnus.com>
395
396         * Many of the ppc-opcode-* files are identical baring the type of
397         lookup table.  Instead of having multiple tables, igen can do this
398         via an additional option.
399         
400         * ld-decode.h, ld-decode.c (force_decode_gen_type): New function,
401         allow the type of generated table specified in the decode file to
402         be overridden.
403
404         * ld-decode.c (load_decode_table): Allow the table type to be
405         overridden.
406
407         * igen.c (main): Add -T <mechanism> option so that an overriding
408         instruction decode mechanism can be specified.
409
410         * configure.in: New option --sim-decode-mechanism to control
411         igen's new -T <mechanism> flag.
412         * Makefile.in (IGEN_FLAGS): Add IGEN_IDECODE_MECHANISM set by the
413         configure script.
414         * configure: Regenerate.
415         
416 Tue Feb 11 13:49:10 1997  Michael Meissner  <meissner@tiktok.cygnus.com>
417
418         * events.c (event_queue_create): Don't use NULL to initialize an
419         integer field.
420         (even_queue_{init,schedule_after_signal,tick}): Conditionalize use
421         of sigprocmask to appropriate autoconf test.
422
423         * main.c ({cntrl_c,main}): Use RETSIGTYPE for signal return type,
424         don't assume void.
425         * sim_calls.c (sim_{ctrl_c,resume}): Ditto.
426
427         * Makefile.in (callback.o): Define HAVE_CONFIG_H, so callback.c
428         includes our config.h.
429
430 Tue Feb  4 13:42:59 1997  Doug Evans  <dje@canuck.cygnus.com>
431
432         * configure.in: Fix typo in test for callback.c.
433         * configure: Regenerated.
434
435 Fri Feb  7 10:04:25 1997  Andrew Cagney  <cagney@kremvax.tpgi.com.au>
436
437         * emul_chirp.c (emul_chirp_create): Handle a virtbase of -1 being
438         found in the device tree.
439
440 Wed Feb  5 10:56:27 1997  Andrew Cagney  <cagney@kremvax.tpgi.com.au>
441
442         * Property create/initialization still wasn't correctly ordered.
443         Should be delaying everything related to ihandle creation until
444         after the rest of the tree has been established.
445         
446         * device.c (device_find_ihandle_runtime_property): Update.
447         (device_add_ihandle_runtime_property): Update.
448
449         * tree.c (parse_ihandle_property): Delay lookup of the device to
450         be opened until the ihandle initialization phase.
451         * tree.c (print_properties): Update.
452
453 Wed Feb  5 10:56:27 1997  Andrew Cagney  <cagney@kremvax.tpgi.com.au>
454         
455         * gen-icache.c (print_icache_extraction): Add a reason parameter.
456         Augment each extracted field with a comment citing the codes
457         origin.  Should simplify tracking down incorrect cache
458         extractions.
459
460 Tue Feb  4 17:44:51 1997  Andrew Cagney  <cagney@kremvax.tpgi.com.au>
461
462         * gen-icache.c: Generalize code handling XXX_is_NNN so that it
463         works for normal and boolean table entries.
464
465         * psim.c (psim_write_memory): last_cpu == -1 or nr_cpus is now
466         valid.  Handle this just like *_{read,write}_register now handles
467         it.
468
469 Mon Feb  3 17:18:16 1997  Andrew Cagney  <cagney@kremvax.tpgi.com.au>
470
471         * events.c (insert_event_entry): Correct loop termination
472         assertions.
473
474 Fri Jan 31 16:20:26 1997  Andrew Cagney  <cagney@kremvax.tpgi.com.au>
475
476         * psim.c (psim_options): Add new option -c for max-iterations or
477         count.
478         (psim_usage): Document.
479         (psim_max_iterations_exceeded): New function, abort simulation if
480         max iterations exceeded.
481
482         * gen-idecode.c: Re-work the table lookup code so that it assumes
483         that the entry is a leaf by default.  Simplify the boolean table
484         entry code so that it involves a mask + test instead of shift +
485         shift + mask + test.
486
487         * gen-idecode.c: Correct generated igen body so that it no drops
488         or doubles clock interrupts.
489
490         
491 Thu Jan 30 11:23:20 1997  Andrew Cagney  <cagney@kremvax.tpgi.com.au>
492
493         * Makefile.in (BUILT_SRC_WO_CONFIG): Change targ-vals.* to
494         @sim_targ_vals@
495
496         * configure.in (sim_callback, sim_targ_vals): Set sim_targ_valls
497         if common callback is present.
498
499 Wed Jan 29 12:32:41 1997  Michael Meissner  <meissner@tiktok.cygnus.com>
500
501         * configure.in (sim_callback): If the gdb is post 4.16, configure
502         callback support from the common directory.
503         * configure: Regenerate.
504
505         * Makefile.in (BUILT_SRC_WO_CONFIG): Add targ-vals.{h,def} and
506         targ-map.c.
507         (GDB_OBJ): Add callback support configured in.
508         (gentmap,targ-vals.def): Build from common directory.
509         (targ-vals.h,targ-map.c): Build by running gentmap.
510         (callback.o): Build from source in common directory.
511         (targ-map.o): Add dependency.
512         (clean): Remove gentmap.
513
514 Wed Jan 29 12:14:19 1997  Andrew Cagney  <cagney@kremvax.tpgi.com.au>
515
516         * igen wasn't aborting if the opcode table contained no valid
517         fields.
518         
519         * misc.c (name2i): Possibly abort if an invalid name is
520         encountered.
521         * ld-decode.c: Abort if the table type isn't found.
522
523 Wed Jan 29 12:14:19 1997  Andrew Cagney  <cagney@kremvax.tpgi.com.au>
524
525         * When performance monitoring is disabled, it is still possible to
526         determine the simulation speed by looking at the number of elapsed
527         ticks recorded by the event queue.
528         
529         * psim.c (psim_write_register, psim_read_register): Force the cpu
530         to zero when it is either of `-1' or `nr_cpus'.  In both cases the
531         next cpu would be zero any way.
532
533         * mon.c (mon_print_info): If possible, print the system cycle
534         performance.  This is an indication of the number of instructions
535         per second.
536
537 Wed Jan 29 12:14:19 1997  Andrew Cagney  <cagney@kremvax.tpgi.com.au>
538
539         * The code to allow an event queue to be updated during a signal
540         was missing.  For main.c, a cntrl-c simulation termination wasn't
541         handled cleanly.
542         
543         * The simulation would not correctly restart if an event requested
544         that the simulation be halted.
545         
546         * psim.c (psim_options): Add hack to -i option to optionally
547         include a level vis -i2.
548         (psim_usage): Document.
549
550         * main.c (cntrl_c, cntrl_c_simulation): New functions.  When a
551         cntrl-c occures schedule an event to halt the simulation.
552         (main): Catch CNTRL-C signals with the function cntrl_c.
553
554         * events.c (event_queue_process): Mask interrupts while
555         manipulating the async event queue.
556         (event_queue_init): Ditto.
557         (event_queue_schedule_after_signal): Ditto.
558
559         * events.c (event_queue_process): Mark the event queue as being in
560         the processing state when processing has started.  Adjust code
561         so that it is tolerant of halts.
562         (event_queue_init): Start the event queue out with processing
563         false.
564         (event_queue_tick): Check that processing isn't still being
565         performed.
566         
567         * gen-idecode.c (print_run_until_stop_body): Call
568         event_queue_process_events to clear possibly pending events before
569         starting a simulation run.  Re-arange main loop so that simulator
570         is correctly restarted when an event halts the simulation.
571
572         * psim.c (psim_halt): Handle an event halting the simulation.
573         * psim.c (psim_init): Adjust initial cpu - == -1 - to match
574         reworked idecode.
575
576 Wed Jan 29 12:14:19 1997  Andrew Cagney  <cagney@kremvax.tpgi.com.au>
577
578         * ppc-opcode-complex: Correct typo - was expanding ORA instead of
579         RA.  Based on instruction frequency stats, expand additional
580         instructions.
581         * ppc-instructions: Change all `RA == 0' to RA_is_0.
582         
583         * ppc-opcode-stupid: Move all but the basic table in -complex into
584         here.  Update to new format.
585         
586         * Makefile.in (tmp-defines): New target. Force defines.h to always
587         be built.  Hence get ppc-opcode-goto to build.
588
589 Tue Jan 28 13:00:19 1997  Andrew Cagney  <cagney@kremvax.tpgi.com.au>
590
591         * hw_com.c (hw_com_instance_read, hw_com_instance_write):
592         Implement.
593         
594 Thu Jan 23 09:07:26 1997  Andrew Cagney  <cagney@kremvax.tpgi.com.au>
595
596         * hw_trace.c (hw_trace_init_data): Delete.  The trace options need
597         to be initialized independant of the rest of the simulation
598         initalization.  Otherwize a trace option explictly set from gdb
599         could be overridden by hw_trace.
600
601         * psim.c (psim_options): Clarify reason why the trace ioctl occures.
602
603         * FIXME: The trace code is too scattered - hw_trace.c, psim.c,
604         debug.c.  It could be much simpler.
605
606 Thu Jan 23 09:07:26 1997  Andrew Cagney  <cagney@kremvax.tpgi.com.au>
607         
608         * Some devices support removable media.  Add hooks to the disk
609         device so that it supports this.
610         
611         * device.c (device_add_string_array_property,
612         device_find_string_array_property): New functions, manipulate
613         properties containing an array of strings.
614         (device_find_string_property): Allow a string array.
615         (device_init_static_properties): Update.
616         (device_init_runtime_properties): Update.
617
618         * hw_disk.c (hw_disk_ioctl): Add ioctl for changing the disk
619         media.  If no file image is specified, use the next one in the
620         image property list.
621         (hw_disk_init_address): Change the file property so that it is a
622         string array - use the first entry for the initial file image.
623
624         * tree.c (print_string_aray_property): New function - print a
625         string array.
626         (print_properties): Adjust.
627         (print_string): Write a string, handling double quotes.
628
629         * device.h: Define an ioctl to `change-media' with an optional new
630         media image.
631         
632         * hw_disk.c: Allow floppy disk devices to be specified.
633
634         * psim.c (psim_command): New function, parse more complex psim
635         commands such as "change-media" and "trace".
636         * sim_calls.c (sim_do_command): Use.
637
638 Wed Jan 22 09:38:33 1997  Andrew Cagney  <cagney@kremvax.tpgi.com.au>
639
640         * For expressions like (RA == 0) that are entered in to the cache
641         as RA_is_0. If possible generate the result of the expression so
642         that the compiler gets a better chance of eliminating dead
643         branches.
644
645         * gen-icache.c (print_icache_extraction): For a cache entry of
646         the form <name>_is_<const> where it is a boolean field, generate
647         the result of the expression instead of the expression its self.
648         (print_icache_body): Remove code that was looking for *_is_0 and
649         then generating corresponding definitions.
650
651         * gen-icache.c (print_icache_struct): If there is no cache, do not
652         output expressions in idecode.h file.
653         
654         * gen-icache.c (print_icache_body): Output them here.
655         
656         * ppc-opcode-complex: Clarify constant values for SPR==LR register
657         expansion.
658
659         * ppc-cache-rules (RA_is_0, SPR_is_256): Two new cache entries.
660
661 Wed Jan 22 12:24:52 1997  Andrew Cagney  <cagney@kremvax.tpgi.com.au>
662
663         * The code that put values in and extracted values from the cache
664         was too compilicated.  The cache table did not allow values to be
665         computed from cache entries.  #defines could only be used when a
666         cache was present, remove the restriction.
667
668         * ld-cache.h, ld-cache.c: Add a new cache entry type - SCRATCH.  A
669         scratch variable is defined when a cache entry is beinf
670         filled. Change the definition of a COMPUTE variable to be defined
671         when the cache entry is being used.
672         * gen-icache.c: Update.
673         
674         * ld-cache.h, ld-cache.c: Change field names so that their meaning
675         is more obvious.  old_name->field_name, new_name->derived_name.
676         * gen-icache.c: Update
677         
678         * gen-icache.h, gen-icache.c (print_icache_body): Make the three
679         different types of cache code - put into cache, extract from
680         cache, no cache - an explicit argument to print_icache_body.
681         * gen-icache.c (print_icache_extraction): Ditto.
682         
683         * gen-semantics.c (print_c_semantic): Update use.
684         * gen-idecode.c (print_jump_insn): Update use.
685         * gen-icache.c (print_icache_function): Update use.
686
687         * igen.c (main): Change 'R' option so that it does not force the
688         cache.
689
690         * configure.in (enable-sim-icache): Clarify description.  Make
691         #define one of the defaults regardless of the cache.  Probably
692         should revamp and add a separate option.
693
694 Tue Jan 21 13:26:10 1997  Andrew Cagney  <cagney@kremvax.tpgi.com.au>
695
696         * pk_disklabel.c (block_is_fdisk): Tidy up traces - use dos
697         partition numbering.
698         (pk_disklabel_create_instance): Partition 1..4 are valid - not
699         1..3.
700         (is_iso9660): New function, verify a CD9660 File system.
701         (pk_disklabel_create_instance): Start expanding so that active
702         partition selection is supported.
703
704 Mon Jan 20 11:20:15 1997  Andrew Cagney  <cagney@kremvax.tpgi.com.au>
705
706         * The cap object was retaining a reference to the instance of a
707         device after it was deleted. Instead add and remove cap's from the
708         cap db as they are created and deleted.  This ensuring that a
709         capibility is only used during the lifetime of the corresponding
710         object.
711         
712         * cap.h, cap.c: Correct cap type - was signed32 should be
713         signed_cell.
714         
715         * cap.c (cap_add, cap_remove): New methods for cap object that
716         allow the explicit addition and removal of internal objects that
717         the cap knows about.
718         
719         * cap.c (cap_init): Rewrite.  Verify that the only objects
720         remaining in the cap data base are those that were entered first.
721         Thse objects will be the permenant ones.
722         * device.c (device_init_address): Remember to initialize the cap
723         database.
724         
725         * device.c (device_create_instance_from): Explicitly add device
726         instances to the cap database.  Simplify create code.
727         (device_instance_delete): Explicitly remove device instances from
728         the cap database.
729         
730         * device.c (device_create_from): Explicitly add a device to the
731         cap data base.
732         
733         * device.c (device_create_from): Always set the cap members.
734
735         * hw_disk.c: Output the instance when tracing.
736         
737 Sun Jan 19 16:44:29 1997  Andrew Cagney  <cagney@kremvax.tpgi.com.au>
738
739         * tree.c (split_device_specifier): Add support for aliases when
740         looking up a device. Now needs a device as an argument.
741         (split_property_specifier): Ditto.
742
743 Sun Jan 19 15:28:23 1997  Andrew Cagney  <cagney@kremvax.tpgi.com.au>
744
745         * The memory "claim" and "release" methods take an address and
746         size as arguments.  These may be multi cell values. Initially fix
747         the memory code so that they check/detect this.  Leave the
748         adjustment of any clients to later.
749         
750         * hw_memory.c (hw_memory_instance_claim,
751         hw_memory_instance_release): Handle multi-cell memory devices.
752         
753         * hw_memory.c (hw_memory_instance_claim): Be tolerant towards the
754         release of memory regions that were not claimed.
755
756 Fri Jan 17 12:01:07 1997  Andrew Cagney  <cagney@kremvax.tpgi.com.au>
757
758         * device.h, device.c (device_instance_call_method): Correct return
759         type - can return either 0 or -1, hence should be a signed type.
760         * device_table.h: Ditto.
761         
762         * hw_memory.c (hw_memory_instance_claim,
763         hw_memory_instance_release): Update.
764         * hw_disk.c (hw_disk_max_transfer, hw_disk_block_size,
765         hw_disk_nr_blocks): Ditto.
766         
767 Fri Jan 17 11:50:13 1997  Andrew Cagney  <cagney@kremvax.tpgi.com.au>
768
769         * emul_chirp.c (chirp_emul_claim): Implement using the "claim"
770         method belonging to "/chosen/memory".
771         (chirm_emul_release): Ditto.
772         
773         * Makefile.in (LIB_INLINE_SRC): Remove emul_* from list of files
774         that are inlined.  These modules are called via a table and are
775         not made inline.
776
777         * hw_init.c (update_for_binary_section): Fix failure to allocate
778         memory used by the binary in real-mode executions. If "claim"
779         property is present, allocate memory from the "/chosen/memory"
780         device.
781
782         * emul_chirp.c (emul_chirp_create): Specify that memory should be
783         claimed when loading a real image.
784
785         * hw_memory.c (hw_memory_instance_claim): Don't page align memory
786         allocations.
787
788         * hw_memory.c (hw_memory_instance_release): Avoid infinite loop
789         when merging adjacent memory chunks.
790
791 Thu Jan 16 08:51:25 1997  Andrew Cagney  <cagney@kremvax.tpgi.com.au>
792
793         * vm.h (vm_data_map_read_buffer, vm_data_map_write_buffer): Add
794         optional PROCESSOR & CIA args so that this routine also abort an
795         access.
796
797         * vm_n.h (vm_data_map_read_N, vm_data_map_write_N): For a
798         miss-aligned access when a transfer fails abort.
799         
800         * emul_bugapi.c (emul_bugapi_do_write): Use emul_read_buffer
801         instead of the vm_read_buffer.
802         * emul_netbsd.c (do_write): Ditto.
803         * emul_unix.c (do_unix_write): Ditto.
804
805 Wed Jan 15 14:38:25 1997  Andrew Cagney  <cagney@kremvax.tpgi.com.au>
806
807         * configure.in (--enable-sim-jump): Default is NULL and not -E.
808         * configure: Regenerate.
809         
810         * basics.h (__attribute__): Enable attributes if GCC >= 2.6.
811         (UNUSED): Only enable UNUSED if GCC >= 2.7.
812         
813         * gen-icache.c (print_icache_extraction): Print UNUSED macro
814         instead of explicit __unused__ attribute.
815         (print_icache_body): Ditto.
816         * idecode_expression.h (FPSCR_BEGIN): Use UNUSED.
817
818 Wed Jan 15 13:54:50 1997  Andrew Cagney  <cagney@kremvax.tpgi.com.au>
819
820         * cpu.h, cpu.c (cpu_synchronize_context): Add CIA argument as
821         reference point.
822
823         * vm.c (vm_synchronize_context): Add PROCESSOR and CIA as
824         arguments so that there is a reference point for recovery.
825         (vm_synchronize_context): Pass processor+cia for errors.
826         (om_unpack_sr): Ditto.
827         (om_unpack_srs): Ditto.
828         * vm.c (vm_create): Review error messages.
829
830         * vm.c: Include "cpu.h" so that cpu_error is visible.
831
832         * ppc-instructions (Return From Interrupt): Pass CIA.
833         (Instruction Synchronize): Ditto.
834         * psim.c (psim_init): Ditto.
835
836 Wed Jan 15 12:25:11 1997  Andrew Cagney  <cagney@kremvax.tpgi.com.au>
837
838         * cpu.h, cpu.c (cpu_error): Aborts simulation with error message,
839         but also saves current processor state.
840         
841         * basics.h: Move #include <stdarg.h> to here from device_table.h.
842
843         * interrupts.c (perform_oea_interrupt): Use.  No longer loose CIA
844         when simulation aborted.
845         (program_interrupt): Ditto.
846         (floating_point_unavailable_interrupt): Ditto.
847         (alignment_interrupt): Ditto.
848         (floating_point_assist_interrupt): Ditto.
849         (perform_oea_interrupt): Ditto.
850         (machine_check_interrupt): Ditto.
851
852 Tue Jan 14 12:19:10 1997  Andrew Cagney  <cagney@kremvax.tpgi.com.au>
853
854         * ppc-instructions (Move from Special Purpose Register): Support
855         move from DEC.
856
857 Mon Jan 13 16:58:12 1997  Andrew Cagney  <cagney@kremvax.tpgi.com.au>
858
859         * debug.h, debug.c: Add "interrupts" trace option.
860
861         * interrupts.c (data_storage_interrupt): Add tracing.
862         (machine_check_interrupt): Ditto.
863         (instruction_storage_interrupt): Ditto.
864         (alignment_interrupt): Ditto.
865         (program_interrupt): Ditto.
866         (floating_point_unavailable_interrupt): Ditto.
867         (system_call_interrupt): Ditto.
868         (floating_point_assist_interrupt): Ditto.
869         (deliver_hardware_interrupt): Ditto.
870         
871         * interrupts.c (program_interrupt): For UEA mode, halt the
872         processor - so that the current state is saved - instead of
873         aborting.
874         (floating_point_unavailable_interrupt): Ditto.
875         (floating_point_assist_interrupt): Ditto.
876
877 Thu Jan  2 09:10:41 1997  Andrew Cagney  <cagney@kremvax.tpgi.com.au>
878
879         * interrupts.c (perform_oea_interrupt): Halt rather than abort on
880         a double interrupt.
881
882 Wed Jan  1 22:54:52 1997  Andrew Cagney  <cagney@kremvax.tpgi.com.au>
883
884         * ppc-instructions (Store Multiple Word, Load Multiple Word):
885         Enable.
886
887         * tree.c (print_properties): For an array consider printing it out
888         as an integer array.
889
890         * hw_memory.c (hw_memory_init_address): If an "available" property
891         is present, use that to initialize the available memory instead of
892         using the reg property.
893
894         * emul_generic.c (emul_add_tree_hardware): Add "available"
895         property to memory device.
896
897 Fri Dec 20 13:19:07 1996  Andrew Cagney  <cagney@kremvax.tpgi.com.au>
898
899         * ppc-instructions (Rotate Left Word then AND with Mask): Enable.
900
901         * device.c (device_instance_call_method): Was only looking at the
902         first method.
903
904         * hw_disk.c (hw_disk_nr_blocks): Implement #blocks method.
905         (hw_disk_block_size): Implement block-size method.
906         (hw_disk_max_transfer): Implement max-transfer method.
907
908         * hw_phb.c (hw_phb_init_address): Reinit the rest of the PHB.
909
910         * emul_chirp.c (chirp_emul_instance_to_path): Recover from an
911         invalid ihandle.
912         (chirp_emul_instance_to_package): Ditto.
913         (chirp_emul_method): Ditto.
914         (chirp_emul_read): Ditto.
915         (chirp_emul_write): Ditto.
916         (chirp_emul_close): Ditto.
917         (chirp_emul_seek): Ditto.
918         (chirp_emul_package_to_path): Ditto (for phandle).
919         (chirp_emul_package_to_path): Return the length.
920
921         * psim.c (psim_merge_device_file): Allow continuation lines.
922
923 Thu Dec 19 11:09:43 1996  Andrew Cagney  <cagney@kremvax.tpgi.com.au>
924
925         * emul_chirp.c (chirp_emul_boot): Implement. Well report the new
926         string and exit.
927         
928         * emul_chirp.c (chirp_emul_exit): Correct type of args struct
929         members - *_cell not host dependant int.
930
931 Wed Dec 18 17:49:59 1996  Andrew Cagney  <cagney@kremvax.tpgi.com.au>
932
933         * interrupts.c (perform_oea_interrupt): Print additional
934         information if a double interrupt is encountered.
935
936 Wed Dec 18 17:49:59 1996  Andrew Cagney  <cagney@kremvax.tpgi.com.au>
937         
938         * psim.c (psim_merge_device_file): Tolerate an incorrect file-name
939         being specified with the -f option.
940         (psim_merge_device_file): Correct check for end of string.
941
942 Wed Dec 18 17:49:59 1996  Andrew Cagney  <cagney@kremvax.tpgi.com.au>
943         
944         * emul_chirp.c (chirp_emul_peer): Was falling off the end of the
945         list of devices. Return zero to the client instead.
946         * emul_chirp.c (chirp_emul_child): Ditto
947         * emul_chirp.c (chirp_emul_parent): Ditto
948
949         * device.c (device_root): Assert assumption about the device being
950         valid.
951
952 Tue Dec 17 15:12:38 1996  Andrew Cagney  <cagney@kremvax.tpgi.com.au>
953
954         * emul_chirp.c (emul_chirp_create): Add description property to
955         each significant node in the device tree.
956         * emul_bugapi.c (emul_bugapi_create): Ditto.
957
958 Fri Dec 13 14:30:31 1996  Andrew Cagney  <cagney@kremvax.tpgi.com.au>
959
960         * main.c (sim_io_read_stdin): For a single byte STDIO read, use a
961         tempoary two byte buffer.  Single byte read with fgets will not
962         work.
963         * main.c: Include errno.h.
964         (sim_io_read_stdin): For non-STDIO, make it work.
965
966         * emul_chirp.c (chirp_emul_read): Return the correct error status.
967
968 Fri Dec 13 14:30:31 1996  Andrew Cagney  <cagney@kremvax.tpgi.com.au>
969
970         * std-config.h (WITH_STDIO): Don't hard-wire the STDIO mechanism.
971         Instead have each emulation default it to DO_USE_STDIO.
972
973         * emul_generic.c (emul_add_tree_options): Select the STDIO I/O
974         mechanism as the default if enabled or if nothing selected.
975
976         * sim_calls.c (sim_io_read_stdin): Passify GCC's desire for a
977         return value.
978         (sim_io_write_stdout): Ditto.
979         (sim_io_write_stderr): Ditto.
980         * main.c (sim_io_write_stdout): Ditto.
981         (sim_io_write_stderr): Ditto.
982         (sim_io_read_stdin): Ditto.
983
984 Tue Dec 10 10:31:48 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
985
986         * emul_chirp.c (emul_chirp_instruction_call): Make *printf calls
987         type correct.
988         * vm.c (om_effective_to_virtual): Ditto.
989         * events.c (event_queue_schedule{,_after_signal}): Ditto.
990         (event_queue_{deschedule,process}): Ditto.
991         * hw_htab.c (htab_decode_hash_table): Ditto.
992         (htab_map_{page,binary}): Ditto.
993         * hw_opic.c (hw_opic_init_data): Ditto.
994         (handle_interrupt): Ditto.
995         (do_processor_init_register_{read,write}): Ditto.
996         (write_vector_priority_register): Ditto.
997         ({read,write}_destination_register): Ditto.
998         (do_suprious_vector_register_{read,write}): Ditto.
999         (do_current_task_priority_register_N_{read,write}): Ditto.
1000         (do_timer_frequency_reporting_register_{read,write}): Ditto.
1001         (do_timer_N_{current,base}_count_register_{read,write}): Ditto.
1002         (do_ipi_N_dispatch_register_write): Ditto.
1003         (do_vendor_identification_register_read): Ditto.
1004         (do_feature_reporting_register_N_read): Ditto.
1005         (do_global_configuration_register_N_{read,write}): Ditto.
1006         * hw_phb.c (hw_phb_attach_address): Ditto.
1007         (hw_phb_unit_decode): Ditto.
1008         (hw_phb_address_to_attach_address): Ditto.
1009         (hw_phb_io_{read,write}_buffer): Ditto.
1010         * hw_ide.c (setup_fifo): Ditto.
1011
1012         * sim_calls.c ({defs,callback,remote-sim}.h): Find gdb include
1013         files via -I<dir> instead of using "../../gdb/" prefixes.
1014
1015 Tue Dec 10 10:12:44 1996  Andrew Cagney  <cagney@kremvax.tpgi.com.au>
1016
1017         * debug.h: Add tracing for the pal device.
1018         * hw_pal.c: Update.
1019
1020         * emul_chirp.c (chirp_emul_getprop): More tracing.
1021
1022 Tue Dec 10 10:12:44 1996  Andrew Cagney  <cagney@kremvax.tpgi.com.au>
1023
1024         * device.h, device.c (device_find_ihandle_runtime_property): New
1025         function. Reverse of add_ihandle_runtime property.
1026         (device_init_runtime_properties): Use it.
1027         
1028         * device.c (find_property_entry): New function returns the
1029         internal property spec.
1030         (device_set_property): Use.
1031         (device_find_property): Use.
1032
1033 Tue Dec 10 10:12:44 1996  Andrew Cagney  <cagney@kremvax.tpgi.com.au>
1034
1035         * psim.c (psim_merge_device_file): Strip newline from device
1036         specs.
1037         
1038 Tue Dec 10 10:12:44 1996  Andrew Cagney  <cagney@kremvax.tpgi.com.au>
1039
1040         * hw_htab.c (htab_map_binary): For overlapping text / data maps
1041         merge the two.  Also check that the merge is safe.
1042
1043         * emul_chirp.c (emul_chirp_create): Add a description property to
1044         the pte's so that they are easier to identify.
1045         
1046         (emul_chirp_create): Don't specify a load address for the CHRP
1047         image.  Always use the values specified by the executable.
1048
1049         * hw_htab.c (htab_map_page): Abort if a duplicate map is
1050         encountered.
1051
1052 Mon Dec  9 12:08:46 1996  Andrew Cagney  <cagney@kremvax.tpgi.com.au>
1053
1054         * hw_htab.c (htab_map_page): Formatting.
1055
1056         * emul_chirp.c (emul_chirp_instruction_call): Check for a NULL
1057         method name when handling the client call. Also check for other
1058         bad call arguments.
1059         
1060         * emul_chirp.c (emul_chirp_create): Allow real-mode?, real-base,
1061         etc to be overriden.
1062
1063 Mon Dec  9 12:08:46 1996  Andrew Cagney  <cagney@kremvax.tpgi.com.au>
1064
1065         * os_emul.c (os_emul_create): Use tree find property instead of
1066         device find property - sigh.
1067
1068 Thu Dec  5 10:46:42 1996  Andrew Cagney  <cagney@kremvax.tpgi.com.au>
1069
1070         * 961205: Release snapshot 961205.
1071         
1072 Thu Dec  5 10:46:42 1996  Andrew Cagney  <cagney@kremvax.tpgi.com.au>
1073
1074         * configure.in (hostbitsize, bitsize): Fix typo in error message -
1075         cannot contain a comma.
1076         (sim-warnings): Check for more potential errors.
1077
1078         * psim.c (psim_usage): Add -f <file> option.  Specifies a file
1079         containing device tree specifications that should be merged into
1080         the device tree.
1081
1082         * configure.in: Sort options.
1083         * configure: Rebuild
1084         
1085 Wed Dec  4 13:57:31 1996  Andrew Cagney  <cagney@kremvax.tpgi.com.au>
1086
1087         * psim.c (psim_usage): Add -n option - specify number of
1088         processors.
1089
1090         * emul_chirp.c: Add description.
1091         * emul_bugapi.c: Ditto.
1092         * emul_unix.c: Ditto.
1093         * emul_netbsd.c: Ditto.
1094
1095 Fri Nov 29 11:12:22 1996  Andrew Cagney  <cagney@kremvax.tpgi.com.au>
1096
1097         * hw_pal.c (hw_pal_attach_address): New function, if an attach is
1098         encountered, assume that it is the single disk.
1099         * hw_pal.c: Add generic device/size decode methods.
1100         
1101         * hw_nvram.c (hw_nvram_init_address): Use the first nonzero reg
1102         property entry when determining the nvram size.
1103
1104         * hw_core.c: Add generic address/size decode methods.
1105
1106         * emul_chirp.c (emul_chirp_instruction_call): Return and trace
1107         nonzero status from client functions.
1108
1109         * main.c (error): Always include a cariage return when writing out
1110         errors.
1111
1112 Wed Nov 20 00:36:55 1996  Doug Evans  <dje@canuck.cygnus.com>
1113
1114         * sim_calls.c (sim_resume): Reset sim_should_run if single
1115         stepping.
1116
1117 Thu Nov 28 13:19:46 1996  Andrew Cagney  <cagney@kremvax.tpgi.com.au>
1118
1119         * emul_bugapi.c (emul_bugapi_do_diskio): Add support for multiple
1120         optional disks.
1121
1122         * emul_generic.c (emul_add_tree_hardware): Drop the dummy eeprom.
1123         Attach the pal - for I/O - as a pseudo device haning from the
1124         firmware sub tree.
1125
1126         * emul_bugapi.c (emul_bugapi_create): Add a small memory device to
1127         the device tree at the address of the hi-mem interrupt vector
1128         addreses.  Used by bugapi to establish its trap instructions.
1129         
1130         * debug.h: Add a new macro DITRACE for tracing device instances.
1131         
1132         * debug.h: Extend the DTRACE macro so that it can also tests for
1133         device specific tracint.
1134         
1135         * device.h, device.c (device_trace): Add method to determine
1136         device specific tracing.
1137         (device_init_address): Set the devices tracing level.
1138         
1139 Thu Nov 21 12:05:32 1996  Andrew Cagney  <cagney@kremvax.highland.com.au>
1140
1141         * tree.h, tree.c (tree_device): New files - separate out the
1142         device parser and other tree operations from the device.
1143         
1144         * inline.h, inline.c (INLINE_TREE): Add.
1145         * device.h, device.c (device_tree_add_parsed): Delete.
1146         * Makefile.in (tree.c): Add rules for new file.
1147         * Makefile.in: Better order the emul_* files.
1148         
1149         * emul_generic.c (emul_add_tree_hardware): Update.
1150         * emul_netbsd.c (emul_netbsd_create): Update.
1151         * emul_unix.c (emul_unix_create): Ditto.
1152         * emul_chirp.c (emul_chirp_create): Ditto.
1153         * emul_bugapi.c (emul_bugapi_create): Ditto.
1154         * psim.c (psim_tree): Ditto.
1155         * hw_init.c: Ditto.
1156         
1157         * emul_generic.h: Include tree.h
1158         * Makefile.in: Add to EMUL_GENERIC_H dependencies.
1159         
1160         * device.h, device.c (device_root): New function - returns the
1161         root of the tree.
1162         * corefile.c: Use.
1163         
1164         * device.h, device.c (device_clean): New function, clean up device
1165         ready for next simulation run. This includes things like deleting
1166         interrupt edges and properties created during the simulation and
1167         also scrubbing any pre-defined properties.
1168         * tree.c (tree_init): Use.
1169         
1170         * device.h, device.c (device_init_static_properties): New
1171         function.  Initialize any static predefined properties.  By static
1172         we mean those that have values that can be determined before the
1173         device tree initialization has started.
1174         * tree.c (tree_init): Use.
1175
1176         * device.h, device.c (device_init_address): Add code to
1177         check/verify the devices #address-cells and #size-cells.
1178         (device_add_integer_property): Delete corresponding code.
1179         (device_nr_address_cells, device_nr_data_cells): Check for
1180         property when returning value.
1181         
1182         * device.h, device.c (device_init_runtime_properties): New
1183         function.  Initialize those properties that are not `static'.  At
1184         present the only such property is the ihandle.
1185         * tree.c (tree_init): Use.
1186         
1187         * device.h, device.c (reg, ranges): Rework these so that they use
1188         an array of the fundamental type - single reg or single range
1189         entry.
1190         
1191         * device.h, device.c (device_add_ihandle_runtime_property):
1192         Re-implement the adding of an ihandle during tree construction so
1193         that it better fits in with device initialization.
1194         
1195 Thu Nov 21 12:05:32 1996  Andrew Cagney  <cagney@kremvax.highland.com.au>
1196
1197         * device.h, device.c (device_ioctl): Add additional argument -
1198         request - so that the caller must always specify the type of
1199         the ioctl request.
1200
1201         * device_table.h: Update.
1202         * hw_trace.c (hw_trace_ioctl): Ditto.
1203         * hw_vm.c (hw_vm_ioctl_callback): Ditto.
1204         * hw_init.c (hw_stack_ioctl_callback): Ditto.
1205         * psim.c (psim_options): Ditto.
1206         
1207 Thu Nov 21 12:05:32 1996  Andrew Cagney  <cagney@kremvax.highland.com.au>
1208         
1209         * BUGS: Updated a bit.
1210
1211 Wed Nov 20 14:06:37 1996  Andrew Cagney  <cagney@kremvax.highland.com.au>
1212
1213         * hw_opic.c: Finish - third round.
1214
1215 Wed Nov 20 12:02:08 1996  Andrew Cagney  <cagney@kremvax.highland.com.au>
1216
1217         * hw_glue.c (hw_glue_io_read_buffer_callback): Fix miscalc of glue
1218         reg index.
1219         (hw_glue_io_write_buffer_callback): Ditto.
1220
1221 Tue Nov 19 21:17:08 1996  Andrew Cagney  <cagney@kremvax.highland.com.au>
1222
1223         * events.c (event_queue_process): Was incorrectly consuming future
1224         events on the queue when they should be left alone.
1225
1226         * debug.h, debug.c (events): Add support for event queue tracing.
1227         * events.c: Add event tracing.
1228         
1229         * debug.h, debug.c: Order device trace options.
1230         
1231 Fri Nov 15 15:23:39 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
1232
1233         * pk_disklabel.c (pk_disklabel_create_instance): Fix up some
1234         warnings generated by GCC.
1235
1236 Sun Nov 17 17:59:14 1996  Andrew Cagney  <cagney@kremvax.highland.com.au>
1237
1238         * sim-endian.h: Add LE versions of byte swap macros.  Needed for
1239         PCI devices which are little-endian.
1240         
1241         * sim-endian-n.h (endian_le2h_N, endian_h2le_N): Ditto
1242
1243 Sun Nov 17 17:59:14 1996  Andrew Cagney  <cagney@kremvax.highland.com.au>
1244
1245         * hw_iobus.c (hw_iobus_attach_address_callback): Change the iobus
1246         so that it is implementing a 1-1 address map.
1247         
1248         * emul_generic.c (emul_add_tree_hardware): Adjust.
1249
1250         * emul_generic.c (emul_add_tree_hardware): Don't add the nvram as
1251         a default.
1252
1253 Sun Nov 17 17:59:14 1996  Andrew Cagney  <cagney@kremvax.highland.com.au>
1254         
1255         * device.c (split_find_device): Be tolerant of missing unit
1256         addresses.
1257
1258 Fri Nov 15 16:49:49 1996  Andrew Cagney  <cagney@kremvax.highland.com.au>
1259
1260         * basics.h (port_direction): New type, specify the direction of
1261         any `port'.
1262         
1263         * device.h, device.c (device_interrupt_decode): Include
1264         specification of port direction in operations.
1265         (device_interrupt_encode): Ditto.
1266         
1267         * device_table.h: Add a direction field to the interrupt port
1268         table.
1269
1270         * device.c (device_tree_add_parsed): Specify port direction.
1271         
1272 Thu Nov 14 21:38:13 1996  Andrew Cagney  <cagney@kremvax.highland.com.au>
1273
1274         * hw_opic.c: Finish - second round.
1275
1276 Thu Nov  7 00:18:59 1996  Andrew Cagney  <cagney@kremvax.highland.com.au>
1277
1278         * hw_htab.c (htab_init_data_callback): Allow the virtual-address
1279         to be specified as an array which allows 64bit addresses.
1280
1281         * device.c (device_find_integer_array_property): New function.
1282         Simplify the querying of elements of an integer array.
1283         (device_add_integer_property, device_find_integer_property):
1284         Update to correctly use the cell type.
1285
1286         * vm.c (om_unpack_sr): Clarify shifting comment.
1287         (om_pte_0_masked_vsid): Ditto. Add 64bit version.
1288
1289         * emul_chirp.c (emul_chirp_create): Initialize the segment
1290         registers.
1291
1292         * vm.c (om_effective_to_virtual): Trace segment register use.
1293
1294         * hw_htab.c (htab_map_page): Print out the pteg base address to
1295         simplify cross checking between vm and the htab.
1296         (htab_decode_hash_table): Use device_error instead of error.
1297         (htab_map_page): Ditto.
1298         (htab_dma_binary): Ditto.
1299         (htab_map_binary): Ditto.
1300         (htab_init_data_callback): Ditto.
1301
1302 Wed Nov  6 20:20:58 1996  Andrew Cagney  <cagney@kremvax.highland.com.au>
1303
1304         * interrupts.h: Clarify what the optional instruction program
1305         interrupt is - a subset of illegal instruction program interrupt.
1306
1307         * interrupts.c (program_interrupt): For UEA mode, clarify what an
1308         optional instruction program interrupt is.
1309         (program_interrupt): For OEA mode, as per spec, generate an
1310         illegal instruction program interrupt when an optional instruction
1311         is encountered.
1312         
1313         * gen-semantics.c (print_semantic_body): Delete code
1314         differentiating between an unimplemented floating point and normal
1315         instruction.  Instead, such a case can be handled explicitly.
1316
1317         * ppc-instructions (store floating-point as integer word indexed):
1318         Mark as optional.
1319         (Floating Convert to Integer Doubleword): Make the floating point
1320         assist interrupt explicit.
1321         (Floating Convert To Integer Doubleword with round towards Zero):
1322         Ditto.
1323         (Floating Convert To Integer Word): Ditto
1324         (Move From FPSCR): Ditto.
1325         (Move to Condition Register from FPSCR): Ditto.
1326         (Move To FPSCR Fields): Ditto.
1327         (Move To FPSCR Field Immediate): Ditto.
1328         (Move To FPSCR Bit 0): Ditto.
1329         (Move To FPSCR Bit 1): Ditto.
1330         
1331 Mon Nov  4 12:49:13 1996  Andrew Cagney  <cagney@kremvax.highland.com.au>
1332
1333         * corefile.c (core_map_read_buffer, core_map_write_buffer): Avoid
1334         breaking up transfers.
1335
1336         * corefile.c: Adjust arguments so that the client server
1337         relationship is clarified.
1338         
1339         * hw_glue.c (hw_glue_init_address): Update so it can be attached
1340         to a PCI bus.
1341
1342         * hw_disk.c (hw_disk_instance_write): Add more checks to disk IO -
1343         looking for things like overflow/underflow.
1344
1345 Sun Nov  3 18:45:20 1996  Andrew Cagney  <cagney@kremvax.highland.com.au>
1346
1347         * emul_generic.c (emul_add_tree_hardware): Hang the disk off the
1348         PAL device instead of the IOBUS.  The disk must be attached to a
1349         logical bus.
1350
1351         * hw_disk.c (hw_disk_init_address): Just use the unit address
1352         directly in the attach - the rest isn't relevant.
1353
1354 Sat Nov  2 21:48:57 1996  Andrew Cagney  <cagney@kremvax.highland.com.au>
1355
1356         * configure.in (sim-hardware, sim-packages): Allow additional
1357         hardware and packages to be prefixed as well as appended.
1358
1359         * Makefile.in (tmp-hw, tmp-pk): Retain the user specified order of
1360         packages when building them.  Consequently, a user can override a
1361         standard device by prefixing their own version.
1362         
1363         * Makefile.in (hw_opic.o, hw_pci.o, hw_ide.o): Add dependencies.
1364
1365 Fri Nov  1 14:42:57 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
1366
1367         * mon.c (_cpu_mon): Add fields for counting 1, 2, 4, and 8 byte
1368         reads and writes.
1369         (mon_{read,write}): Count 1, 2, 4, and 8 byte reads/writes.
1370         (mon_print_info): Correct typo regarding # of unaligned reads and
1371         writes.  Print out how many 1, 2, 4, and 8 byte reads/writes there
1372         are.
1373
1374 Tue Oct 29 17:55:43 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
1375
1376         * configure.in (AC_CHECK_FUNCS): Add access.
1377         * config{.in,ure}: Regenerate.
1378
1379         * emul_unix.c (do_unix_nop): System call that always succeeds.
1380         (do_unix_access): Support access system call.
1381         (solaris_descriptors): Make sigaltstack and sigaction nops.
1382         ({solaris,linux}_descriptors): Add support for access.
1383
1384 Tue, 8 Oct 18:42:26 1996  Jason Molenda <crash@cygnus.co.jp>
1385         
1386         * Makefile.in (clean): Move config.log to distclean.
1387
1388 Fri Nov  1 16:44:28 1996  Andrew Cagney  <cagney@kremvax.highland.com.au>
1389
1390         * corefile-n.h (core_map_write_N): Improve abort messages.
1391
1392         * device.h, device.c (device_attach_address): Remove unused name
1393         parameter.
1394         (device_detach_address): Ditto.
1395         * device_table.h, device_table.c: Update.
1396         * hw_iobus.c (hw_iobus_attach_address_callback): Ditto.
1397         * hw_nvram.c (hw_nvram_init_address): Ditto.
1398         * hw_memory.c (hw_memory_init_address): Ditto.
1399         * hw_vm.c (hw_vm_init_address_callback): Ditto.
1400         (hw_vm_attach_address): Ditto.
1401         (hw_vm_add_space): Ditto.
1402         * hw_init.c (update_for_binary_section): Ditto.
1403         * hw_core.c (hw_core_attach_address_callback): Ditto.
1404
1405         * hw_iobus.c (hw_iobus_attach_address_callback): Rewrite to handle
1406         configurable parent busses.
1407
1408 Wed Oct 30 18:46:32 1996  Andrew Cagney  <cagney@kremvax.highland.com.au>
1409
1410         * device_table.c (generic_device_size_to_attach_size): Provide
1411         limited support for multi-cell sizes.
1412         (generic_device_address_to_attach_address): Ditto for addresses.
1413
1414 Tue Oct 29 02:01:29 1996  Andrew Cagney  <cagney@kremvax.highland.com.au>
1415
1416         * device.c (device_add_integer_property): Check for setting of
1417         #address-cells and #size-cells properties.  For these, update the
1418         corresponding device values.
1419         (device_nr_address_cells, device_nr_size_cells): Use the value
1420         from the device instead of the property.
1421
1422         * hw_core.c: Use generic address and size conversions for the top
1423         bus.
1424
1425         * hw_memory.c (hw_memory_init_address): Tolerate case where
1426         #address and #size cells is greater than 1.
1427
1428         * device.c (device_tree_print_device): Clean out printing of
1429         properties.
1430         
1431         * device.c (split_device_specifier): Don't detect comments here -
1432         "#" can be a valid prefix - eg #size-cells.
1433
1434         * psim.c (psim_merge_device_file): Suppress comments and blank
1435         lines here.
1436
1437         * emul_generic.c (emul_add_tree_hardware): Fix typo of incorrect
1438         pal unit address.  Add the property /#address-cells to the root of
1439         the tree.
1440
1441         * device.c (device_template_create_device): Check that the unit
1442         address was successfully parsed.
1443
1444         * device_table.c (generic_device_unit_decode): Rewrite to better
1445         handle multi-cell addresses.
1446         (generic_device_unit_encode): Ditto.
1447
1448         * emul_generic.c (emul_add_tree_hardware): "reg" properties no
1449         longer need the explicit array type - the parser takes care of it.
1450
1451         * pk_disklabel.c (pk_disklabel_create_instance): Add NULL return
1452         to keep GCC happy.
1453
1454 Mon Oct 28 22:55:48 1996  Andrew Cagney  <cagney@kremvax.highland.com.au>
1455
1456         * hw_ide.c: New file.  Model of a basic IDE interface attached to
1457         a PCI bus.
1458         
1459         * configure.in (hardware): Add the ide device to the default
1460         configuration.
1461         * configure: Regenerate.
1462         
1463         * debug.h, debug.c: Add tracing option for the IDE device.
1464         
1465 Fri Oct 25 21:28:25 1996  Andrew Cagney  <cagney@kremvax.highland.com.au>
1466
1467         * hw_phb.c, hw_phb.h: New files - implement a PHB.
1468
1469         * configure.in (hardware): Add the phb to the list of devices to
1470         build by default.
1471
1472 Fri Oct 25 21:28:25 1996  Andrew Cagney  <cagney@kremvax.highland.com.au>
1473
1474         * hw_com.c: Review description.
1475         * hw_disk.c: Ditto.
1476         * hw_htab.c: Ditto.
1477         * hw_eeprom.c: Ditto.
1478         * hw_init.c: Ditto.
1479         * hw_cpu.c: Ditto.
1480         
1481         * hw_com.c: Update event handling.
1482
1483         * hw_disk.c: Implement tracing.
1484         
1485 Fri Oct 25 21:28:25 1996  Andrew Cagney  <cagney@kremvax.highland.com.au>
1486
1487         * device_table.c (generic_device_init_address): Use
1488         assigned-addresses property in preference to any other reg
1489         property.
1490
1491 Fri Oct 25 21:28:25 1996  Andrew Cagney  <cagney@kremvax.highland.com.au>
1492
1493         * device.h, device.c (device_find_ranges_property): New function.
1494         Simplify the manipulation of "ranges" properties.
1495         
1496         * device.c (device_add_parsed): Extend to include support for the
1497         ranges property.
1498
1499         * device.c (device_add_parsed): Add assigned-addresses to the list
1500         of reg type properties.
1501         
1502         * device.c (device_tree_print_device): Add code to format and
1503         print a ranges property.
1504         
1505         * device.h, device.c (device_nr_address_cells,
1506         device_nr_size_cells): New functions. Determine the values of the
1507         standard properties #address-cells and #size-cells.  Both of which
1508         are optional and have default values of two and one respectfuly.
1509         Previously, code that determined #address-cells was incorrectly
1510         using a value of one.
1511
1512 Fri Oct 25 21:28:25 1996  Andrew Cagney  <cagney@kremvax.highland.com.au>
1513
1514         * debug.h, debug.c: Sort debug options, Add entries for the
1515         comming PHB device.
1516         
1517 Fri Oct 18 12:12:21 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
1518
1519         * ppc-instructions (Floating Select): Add support for fsel unless
1520         model is 601.  Allow user to filter out instruction unless -Fs is
1521         passed to igen.
1522         (Store Floating-Point as Integer Word Indexed): Raise optional
1523         instruction program abort.  Allow user to filter out instruction
1524         unless -Fs is passed to igen.
1525         (Floating Square Root{, Single}): Ditto.
1526         (Floating Reciprocal Estimate Single): Ditto.
1527         (Floating Reciprocal Square Root Estimate): Ditto.
1528
1529         * configure.in (--enable-sim-filter): If not passed, pass 32,f,s
1530         to igen.
1531         * configure: Regenerate.
1532
1533         * interrupts.h (program_interrupt_reasons): Add
1534         optional_instruction_program_interrupt.
1535
1536         * interrupts.c (program_interrupt): Call error with more detailed
1537         information on program interrupts, particularly in user mode.  Add
1538         support for optional_instruction_program_interrupt.
1539
1540 Wed Sep 25 10:20:29 1996  Andrew Cagney  <cagney@kremvax.highland.com.au>
1541
1542         * hw_glue.c: New device.  Hooks for manipulating interrupt ports.
1543
1544         * debug.h, debug.c (trace_glue_device): Add tracing support for
1545         the interrupt glue logic device.
1546
1547         * configure.in (hardware): Add glue device.
1548         * configure: Regenerate.
1549
1550 Tue Sep 24 20:55:38 1996  Andrew Cagney  <cagney@kremvax.highland.com.au>
1551
1552         * device.c (device_tree_parse_integer_property): New function,
1553         parse a list of integers as an array property.
1554         (device_tree_add_parsed): Call it.
1555
1556         * device.c (device_tree_parse_string_property): New function,
1557         parse a list of strings as a string property (with embeded
1558         null's).  For moment, don't try to implement a complext string
1559         parser.
1560         (device_tree_add_parsed): Call it.
1561
1562 Tue Sep 24 16:30:48 1996  Andrew Cagney  <cagney@kremvax.highland.com.au>
1563
1564         * hw_opic.c: New file.  OpenPIC interrupt controller.
1565
1566         * configure.in (hardware): Add opic device.
1567         * configure: re-generate.
1568
1569         * hw_pic.c: Delete, replaced with hw_opic.c.
1570
1571         * debug.h, debug.c: Add debug option for OpenPIC device. -
1572         opic-device.
1573
1574 Tue Sep 24 16:30:48 1996  Andrew Cagney  <cagney@kremvax.highland.com.au>
1575
1576         * Makefile.in (psim.o, idecode.o): Since idecode and not psim is
1577         now the file that does all the inlining.
1578
1579         * Makefile.in (LIB_SRC, LIB_INLINE_SRC, idecode.o): Break out the
1580         library source code that could be involved in an inlining.  Make
1581         idecode.o only dependant on the inlined library source code.
1582
1583         * Makefile.in (LIB_OBJ): Put options last on the list so that it
1584         is compiled last.
1585
1586         * std-config.h (DEVICE_INLINE): Only inline locals when the
1587         default is to inline.
1588
1589 Mon Sep 23 00:37:49 1996  Andrew Cagney  <cagney@kremvax.highland.com.au>
1590
1591         * hw_htab.c (htab_sum_binary): Determine the real-base for the
1592         binary.
1593
1594         * hw_htab.c (htab_map_binary): Depending on the value of the
1595         load-base, either map the program in as a contiguous section or as
1596         separate sections controled by th binaries lma values.
1597         (htab_init_data_callback): Ditto.
1598
1599 Sun Sep 22 15:56:22 1996  Andrew Cagney  <cagney@kremvax.highland.com.au>
1600
1601         * emul_generic.c (emul_add_tree_options): Remove load-base option.
1602
1603         * emul_chirp.c (map_over_chirp_note): Add load_base field to note
1604         struct.  Don't require the load_base field to be present - just
1605         issue warning - it is a recent addition.
1606         (emul_chirp_create): Support both virtual and physical modes.
1607
1608         * emul_chirp.c (emul_chirp_create): Add a stack initialization
1609         property so that any arguments specified on the command line can
1610         be passed on to user programs.
1611
1612         * hw_init.c (create_ppc_chirp_bootargs): Add support for chirp
1613         argument passing to the pseudo device stack.
1614
1615 Sat Sep 21 19:39:56 1996  Andrew Cagney  <cagney@kremvax.highland.com.au>
1616
1617         * device.c (device_error): Make it more tolerant to incomplete
1618         devices.
1619
1620         * hw_init.c (hw_data_init_data_callback): Extend the data device
1621         so that it can perform initialization operations either dma or a
1622         more complex instance open, seek, write operation.
1623         * hw_init.c: Update the description of the data device to reflect
1624         this.
1625
1626 Sat Sep 21 00:13:02 1996  Andrew Cagney  <cagney@kremvax.highland.com.au>
1627
1628         * device.c (device_event_queue_schedule,
1629         device_event_queue_deschedule, device_event_queue_time): Have the
1630         device object export the event operations.  Making these available
1631         from the device object should hopefully simplify writing device
1632         models.
1633
1634 Fri Sep 20 14:04:40 1996  Andrew Cagney  <cagney@kremvax.highland.com.au>
1635
1636         * configure.in (sim-hardware): Add eeprom device to default build.
1637
1638         * hw_eeprom.c: Rewrite so it works.
1639
1640         * debug.h, debug.c: Add tracing support for the eeprom and com
1641         devices.
1642
1643 Thu Sep 19 14:40:40 1996  Andrew Cagney  <cagney@kremvax.highland.com.au>
1644
1645         * debug.h: Add disklabel-package and disk-device trace options.
1646         debug.h (PTRACE): Add macro to simplify tracing in packages.
1647
1648 Thu Sep 19 14:40:40 1996  Andrew Cagney  <cagney@kremvax.highland.com.au>
1649
1650         * device.c (device_create_instance_from): Tighten up loop
1651         searching for device instances.
1652         (device_instance_delete): Ditto.
1653         (device_instance_delete): Only leaf instances need to be removed
1654         from a devices list of active instances.
1655
1656 Thu Sep 19 14:40:40 1996  Andrew Cagney  <cagney@kremvax.highland.com.au>
1657
1658         * hw_disk.c: Add the cdrom as an alias.
1659
1660         * pk_disklabel.c (disklabel_delete): Implement, remembering to
1661         delete the raw disk instance while we're at it.
1662
1663         * pk_disklabel.c (pk_disklabel_create_instance): Implement a
1664         little bit more - still a long way to go.
1665
1666         * pk_disklabel.c (disklabel_write, disklabel_read): Remember the
1667         new head position after a read or write.
1668
1669 Thu Sep 19 13:05:40 1996  Andrew Cagney  <cagney@kremvax.highland.com.au>
1670
1671         * emul_chirp.c (chirp_emul_read): Allow reads to be longer then
1672         the internal buffer.
1673
1674 Thu Sep 19 13:05:40 1996  Andrew Cagney  <cagney@kremvax.highland.com.au>
1675
1676         * emul_chirp.c (chirp_read_t2h_args): Call memset-0 with the args
1677         in the correct order.
1678
1679         * emul_chirp.c (chirp_emul_call_method): Correct computation for
1680         the address of the first stack argument passed in from the client
1681         program.
1682
1683 Wed Sep 18 19:33:54 1996  Andrew Cagney  <cagney@kremvax.highland.com.au>
1684
1685         * words.h: Add new types signed_cell and unsigned_cell which
1686         correspond to the signed and unsigned IEEE 1275 memory locations.
1687         * device.h, device.c, emul_chirp.c: Where refering to an IEEE 1275
1688         memory cell, replace uses of unsigned32 with unsigned_cell.
1689         * device_table.h: Ditto.
1690
1691         * sim-endian.h: Add new macros H2BE_cell and BE2H_cell which
1692         convert cell sized values to from big endian.
1693         * device.c, emul_chirp.c: Where refering to IEEE 1275 memory cells
1694         use these new macros.
1695
1696 Tue Sep 17 15:57:44 1996  Andrew Cagney  <cagney@kremvax.highland.com.au>
1697
1698         * device.c (device_tree_add_parsed): Detect and report an
1699         interrupt being attached to an invalid device. Was dumping core.
1700
1701 Mon Sep 16 23:09:12 1996  Andrew Cagney  <cagney@kremvax.highland.com.au>
1702
1703         * device.h, device.c (device_address_to_attach_address,
1704         device_size_to_attach_size): New functions.  Convert a devices
1705         unit address or unit size structure into a form suitable for
1706         passing on to the attach and detach functions.
1707         * device_table.h: Add extra methods to device table.
1708
1709         * device.h, device.c (device_find_reg_property): New function.
1710         For a reg type property, return the selected address + size
1711         tupple, along with a positive success status.  Add a reg_property
1712         to the list of property types.
1713         * (device_tree_add_parsed): Make array properties with the name
1714         reg or alternate-reg of type reg_property.
1715
1716         * hw_memory.c (hw_memory_init_address): Rewrite to use new
1717         find_reg_property method.
1718         * hw_nvram.c (hw_nvram_init_address): Ditto.
1719
1720         * device.c (device_tree_print_device): Add code to print out a reg
1721         property.
1722
1723         * device_table.c (generic_device_address_to_attach_address,
1724         generic_device_size_to_attach_size ): New functions.  Generic
1725         functions for converting between unit and attach address or size.
1726
1727         * device_table.c (generic_device_init_address): Rewrite to use the
1728         new find_reg and address convert functions.  Look for both reg and
1729         alternate-reg properties.
1730
1731 Mon Sep 16 23:09:12 1996  Andrew Cagney  <cagney@kremvax.highland.com.au>
1732
1733         * hw_com.c: New file.  A '550 serial device that can quickly be
1734         attached to any bus.
1735         * configure.in (enable-sim-hardware): Add the com device.
1736         * configure: re-generate.
1737
1738 Thu Sep 12 17:30:56 1996  Andrew Cagney  <cagney@kremvax.highland.com.au>
1739
1740         * device.c (device_tree_verify_reg_unit_address): New
1741         function. Check that the unit address as specified by the reg
1742         property correctly corresponds to any unit address previously
1743         specified by the devices name.
1744         (device_tree_add_parsed): When adding a reg property, verify
1745         that the unit-address - first value of property - correctly
1746         matches any previous value specified when creating the device
1747         node.
1748
1749 Thu Sep 12 17:30:56 1996  Andrew Cagney  <cagney@kremvax.highland.com.au>
1750
1751         * mon.c (mon_event): Remove assertion that an unsigned is >= 0.
1752
1753 Fri Aug 16 12:05:24 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
1754
1755         * device.c (device_full_name): Cast strdup to char *, since AIX
1756         3.2.5 mistakenly declares the function to be const char *.
1757         (device_create_from): Ditto.
1758         (device_create_instance_from): Ditto.
1759         (device_add_property): Ditto.
1760
1761 Tue Aug 13 11:40:14 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
1762
1763         * debug.c (trace_option): For -t all, do not set the
1764         trace_dump_device_tree flag, so that the simulator is run.
1765
1766 Tue Aug 13 11:40:14 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
1767
1768         * Makefile.in (options.o): Depend on defines.h.
1769         (defines.h): New rule, go through config.h and make strings of all
1770         of the #define HAVE_xxx macros.
1771         (distclean): Remove defines.h.
1772
1773         * options.c (print_options): Print whether many of the
1774         configuration macros are defined.
1775
1776         * main.c (main): If -t options and no filename, just print the
1777         options, and don't print the usage message.
1778
1779 Mon Aug 12 18:42:37 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
1780
1781         * configure.in: Test whether /dev/zero works on the system, and if
1782         it does, define HAVE_DEVZERO.
1783         * configure: Regenerate.
1784
1785         * emul_generic.c (emul_add_tree_hardware): Do not add /iobus/disk
1786         if we don't have a working /dev/zero on the system.
1787
1788         * emul_bugapi.c (emul_bugapi_init): If HAVE_DEVZERO is not
1789         defined, don't add disk support.
1790         (emul_bugapi_do_diskio): Ditto.
1791         (emul_bugapi_instruction_call): Ditto.
1792
1793 Wed Aug  7 14:34:20 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
1794
1795         * emul_unix.c (HAVE_TCGETATTR): If HAVE_TERMIOS_STRUCTURE is not
1796         defined, make sure HAVE_TCGETATTR is #undef'ed
1797
1798 Wed Aug  7 14:34:20 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
1799
1800         * std-config.h (REGPARM): Only define REGPARM attributes if using
1801         GNU C.  Test for __i686__ in case GCC ever defines it.  If not on
1802         a x86 platform, define REGPARM as nothing.
1803
1804         * sim-endian.h (WITH_HOST_BYTE_ORDER): Test for i686 and __i686__
1805         also.
1806
1807 Wed Aug  7 20:19:55 1996  Andrew Cagney  <cagney@kremvax.highland.com.au>
1808
1809         * ld-decode.h, ld-decode.c: Rename goto_gen to the more correct
1810         goto_switch_gen.
1811         * gen-idecode.c: Ditto.
1812
1813         * gen-idecode.c (print_idecode_table): Comment out check for
1814         switch/table combination until a bug with it is fixed.
1815
1816         * ppc-opcode-goto: New file.  Like complex and flat but uses
1817         goto-switch instead of padded-switch for the tables.
1818
1819         * gen-idecode.c (print_goto_switch_name): New function.
1820         (print_goto_switch_table_leaf): New function.
1821         (print_goto_switch_break): New function.
1822         (print_goto_switch_table): New function. Prints a jump table
1823         that can be jumped into instead of a switch statement.
1824
1825         * gen-idecode.c (*switch_*): As an option output a switch that is
1826         implemented using a jump table but only if the switch is not
1827         boolean.
1828         
1829 Tue Aug  6 09:28:22 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
1830
1831         * configure.in (--enable-sim-{hardware,packages}): Fix typos.
1832         * configure: Regenerate.
1833
1834         * device.c (device_instance_call_method): Fixup format message in
1835         error case.  Return 0 in case of error to shut up compiler
1836         warnings.
1837
1838 Wed Aug  7 00:17:37 1996  Andrew Cagney  <cagney@kremvax.highland.com.au>
1839
1840         * device_table.c (generic_device_unit_decode): Require a comma
1841         between elements of a unit address.
1842
1843         * device.c (device_tree_print_device): For reg, alternate-reg and
1844         ranges properties use special print functions.
1845         (device_print_ranges_property): Print formatted ranges property.
1846         (device_print_reg_property): Print formatted reg property.
1847
1848 Tue Aug  6 21:35:18 1996  Andrew Cagney  <cagney@kremvax.highland.com.au>
1849
1850         * device.c (device_tree_add_parsed): For reg, ranges and
1851         alternate-reg properties use a special parser.
1852         (device_tree_parse_reg_property): New function to parse a reg
1853         property.
1854         (device_tree_parse_ranges_property): New function to parse a
1855         ranges property.
1856         (device_encode_unit): Wrapper for encode_unit callback.
1857         (device_decoce_unit): Wrapper for decode_unit callback.
1858
1859 Wed Jul 31 00:02:30 1996  Andrew Cagney  <cagney@kremvax.highland.com.au>
1860
1861         * device_table.h (device_instance_callbacks): Relace the claim and
1862         release methods with a more general table mapping from method-name
1863         to method-function.
1864
1865         * device.c (device_instance_call_method): New function.  Implement
1866         the OpenBoot call-method client interface.  Attempts to locate the
1867         instances method in the callback table.
1868         (device_instance_claim, device_instance_release): Delete.
1869         Replaced with call-method and a lookup table.
1870
1871         * emul_chirp.c (chirp_emul_call_method): Use the new device
1872         instance call method and let that handle a client claim call.
1873
1874         * hw_htab.c (claim_memory): Wrapper function to call the memory
1875         devices "claim" method using the new device-instance call-method
1876         interface.  Replaces the previous direct calls to claim.
1877         (htab_map_region): Use claim_memory.
1878         (htab_init_data_callback): Ditto.
1879
1880         * hw_memory.c (hw_memory_instance_claim): Update function
1881         interface so that it is compatible with call-method.
1882         (hw_memory_instance_release): Ditto.
1883         (hw_memory_instance_methods): New table of memory specific
1884         methods claim and release.  Add to the hw_memory_callback
1885         table.
1886
1887 Tue Jul 30 21:26:14 1996  Andrew Cagney  <cagney@kremvax.highland.com.au>
1888
1889         * psim.c (psim_init): Back out of change to initial value of
1890         system->last_cpu.
1891
1892 Tue Jul 30 21:12:24 1996  Andrew Cagney  <cagney@kremvax.highland.com.au>
1893
1894         * sim_callbacks.h (sim_io_printf_filtered): Replace
1895         printf_filtered with a local simulator specific version.  Add
1896         #define printf_filtered to simplify updating of existing code.
1897
1898         * sim_callbacks.h (sim_io_write_stdout, sim_io_read_stdin,
1899         sim_io_write_stderr): New functions.  Read / write to the
1900         simulations stdin and stdout and stderr interfaces.  Merge in code
1901         from hw_pal that previously handled async I/O.
1902         (sim_io_flush_stdoutput): Rename flush_stdoutput.  Add #define
1903         flush_stdoutput to simplify updating of existing code.
1904
1905         * hw_pal.c (scan_hw_pal, write_hw_pal,
1906         hw_pal_instance_write_callback): Use the new sim_io functions.
1907
1908         * main.c: Implement standalone versions of the new sim_io
1909         functions.  Include support for async I/O.
1910         * sim_calls.c: Ditto.  This time using the gdb callback table.
1911
1912         * std-config.h (CURRENT_STDIO, current_stdio): New macro. Set up
1913         stdio configuration so that it works in the same way as the rest
1914         of the simulation.
1915         * psim.c (psim_create): Initialize current_stdio from the device
1916         tree.
1917         * emul_generic.c (emul_add_tree_options): Enter a default value
1918         for use-stdio in the device tree.
1919
1920 Fri Jul 26 19:43:03 1996  Andrew Cagney  <cagney@kremvax.highland.com.au>
1921
1922         * gen-idecode.c (print_jump): Was always generating a jump back to
1923         idecode.  Only necessary at tail of semantic code.
1924         (print_jump): Was always setting the processor's cia, even during
1925         startup when the processor was still undefined.
1926         (print_jump): For safety, restart smp loop when cpu_nr >= nr_cpus,
1927         not just equal.
1928         
1929         * options.c (print_options): Add printing of WITH_REGPARM and
1930         WITH_STDCALL.
1931
1932         * std-config.h (WITH_REGPARM, WITH_STDCALL): Provide default
1933         (disabled) values if not defined.
1934
1935 Fri Jul 26 00:36:35 1996  Andrew Cagney  <cagney@kremvax.highland.com.au>
1936
1937         * ppc-cache-rules (cache): Change RS and RB to cache instead of
1938         compute.  The block move instructions use them.
1939
1940         * idecode_expression.h (FPSCR_SET): New macro, set specific FPSCR
1941         register.
1942         (CR_FIELD): New macro, extract specific CR register.
1943         (FPSCR_FIELD): New macro, extract specific FPSCR register.
1944
1945         * registers.h (GPR): New macro, simplify accesses to GPR[i].
1946
1947         * bits.c (INSERTED): Covert INSERTED macro into a function.
1948         (EXTRACTED): Conditionally compile on correct bit size macro.
1949
1950         * bits.h (BIT8): New macro, set a single bit in an 8 bit byte.
1951
1952         * ppc-instructions: With hints from Paul Martin, type in missing
1953         some instruction semantics.  Leave disabled for the moment.
1954         (Load Multiple Word): Ditto.
1955         (Store Multiple Word): Ditto.
1956         (Load String Word Immediate): Ditto.
1957         (Load String Word Indexed): Ditto.
1958         (Store String Word Immedate): Ditto.
1959         (Store String Word Indexed): Ditto.
1960         (Move to Condition Register from XER): Ditto.
1961         (Move From Condition Register): Ditto.
1962         (Move From FPSCR): Ditto.
1963         (Move to Condition Register from FPSCR): Ditto.
1964         (Move To FPSCR Field Immediate): Ditto.
1965         (Move To FPSCR Fields): Ditto.
1966         (Move To FPSCR Bit 0): Ditto.
1967         (Move To FPSCR Bit 1): Ditto.
1968
1969 Thu Jul 25 22:10:40 1996  Andrew Cagney  <cagney@kremvax.highland.com.au>
1970
1971         * std-config.h (SEMANTICS_INLINE): By default, mask out the
1972         inlining of semantic functions from DEFAULT_INLINE.  Almost all
1973         configurations call the semantic code via a pointer so there is
1974         little benefit.
1975
1976         * std-config.h (ICACHE_INLINE): Ditto.
1977
1978 Thu Jul 25 20:07:30 1996  Andrew Cagney  <cagney@kremvax.highland.com.au>
1979
1980         * configure.in (sim_regparm): Add configuration option for
1981         enabling GCC's regparm attribute.
1982         * (sim_stdcall): Add configuration option for enabling GCC's
1983         stdcall attribute.
1984
1985         * Makefile.in (REGPARM_CFLAGS): Pass regparam configuration onto
1986         compilations.
1987         * (STDCALL_CFLAGS): Pass stdcall configuration onto compilations.
1988
1989         * std-config.h (REGPARM): Extend construction of REGPARM macro so
1990         that it can include __stdcall__ function attribute.
1991
1992 Wed Jul 24 19:04:20 1996  Andrew Cagney  <cagney@sawnoff>
1993
1994         * options.c (print_options): Include SUPPORT_INLINE in information
1995         dump.
1996
1997         * gen-idecode.c (print_run_until_stop_body): Only generate loop
1998         termination test if creating idecode_run_until_stop.  Push the
1999         loop termination test back into each alternative branch.
2000
2001 Wed Jul 24 15:47:09 1996  Andrew Cagney  <cagney@kremvax.highland.com.au>
2002
2003         * gen-icache.c (print_icache_function): Have the cache function
2004         always update the cache_entries semantic and address fields.
2005
2006         * gen-idecode.c (print_idecode_switch_illegal): Include a break
2007         when generating illegal instructions.  This was commented out
2008         which is a hangover from looking a at switch statements generated
2009         using indirect jumps.
2010
2011 Tue Jul 23 20:57:01 1996  Andrew Cagney  <cagney@kremvax.highland.com.au>
2012
2013         * igen.c (print_my_defines): Replaces print_define_my_index.
2014         Print both a definition for MY_INDEX and MY_PREFIX.
2015         * gen-icache.c (print_icache_function): Adjust.
2016         * gen-idecode.c (print_jump_insn): Adjust.
2017         * gen-semantics.c (print_c_semantic): Adjust.
2018
2019         * gen-support.c (gen_support_h): Add optional include to created
2020         support.h so that, like cpu, it is optionally inlined for all
2021         modules that include it.
2022         * inline.h, inline.c: Adjust so that support.[hc] is handled the
2023         same as cpu.[hc].
2024
2025         * idecode_fields.h (LABEL, GOTO): Macro's that create a unique
2026         name for a lable and then branch to it.
2027
2028         * ppc-instructions (convert_to_integer, Floating Round to
2029         Single-Precision, Floating Convert from Integer Doubleword): Use
2030         LABEL and GOTO instead of the recently added switch statements.
2031
2032 Wed Jul 24 14:02:42 1996  Andrew Cagney  <cagney@sawnoff.highland.com.au>
2033
2034         * gen-idecode.c (print_run_until_stop_body): Too many rparen in
2035         generated code.
2036
2037 Tue Jul 23 20:57:01 1996  Andrew Cagney  <cagney@kremvax.highland.com.au>
2038
2039         * configure.in (--enable-sim-line-nr): Typo - sim_line-nr.
2040         * (--enable-sim-inline): Reorder patern matching of arguments so
2041         that SUPPORT=ALL_INLINE is reconized as *=* and not *_INLINE.
2042
2043         * configure: rebuild.
2044
2045 Mon Jul 22 23:25:08 1996  Andrew Cagney  <cagney@highland.com.au>
2046
2047         * configure.in (--enable-sim-hardware, --enable-sim-packages): New
2048         configuration options.  Let the user specify the packages or
2049         hardware devices that are to be included in the build.  Makes it
2050         possible for user packages to be specified.
2051
2052         * Makefile.in (tmp-pk, tmp-hw): Just use the list of packages and
2053         hardware instead of checking it using ls.  configure.in should
2054         have taken care of any problems.
2055         (HW_SRC, HW_OBJ, PACKAGE_SRC, PACKAGE_OBJ): Set by configure.
2056
2057 Mon Jul 22 22:38:59 1996  Andrew Cagney  <cagney@highland.com.au>
2058
2059         * psim.c (psim_options): Enter the argument to the memory size
2060         option directly into the device tree.  Was using atol() which is
2061         dangerously non portable.
2062
2063 Mon Jul 22 22:17:08 1996  Andrew Cagney  <cagney@highland.com.au>
2064
2065         * configure.in (icache): Extend icache flag to include an insn
2066         option.  If specifyed the insn - aka instruction - is included in
2067         the instruction cache.  Make this the default.
2068         * configure: re-generate.
2069
2070         * igen.c (main), igen.h: Add option -S - inSn - for specifying
2071         that the instruction should be included in the icache.
2072
2073         * gen-icache.c (print_icache_body): If enabled, output code to put
2074         the instruction into the icache.
2075         (print_icache_struct): If enabled, add insn to the icache struct.
2076
2077 Mon Jul 22 20:46:12 1996  Andrew Cagney  <cagney@highland.com.au>
2078
2079         * Makefile.in (BUILD_CFLAGS): Include -g when building the
2080         generators.
2081
2082 Mon Jul 22 20:00:25 1996  Andrew Cagney  <cagney@highland.com.au>
2083
2084         * emul_generic.c (emul_add_tree_options): Was incorrectly setting
2085         the strict-alignment option when hardwired for non-strict
2086         alignment.
2087
2088 Sun Jul 21 21:18:05 1996  Andrew Cagney  <cagney@kremvax.highland.com.au>
2089
2090         * gen-semantics.c: Make the my_index variable a macro MY_INDEX.
2091
2092         * ppc-instructions: Adjust so that references are to MY_INDEX and
2093         not my_index.
2094
2095 Sun Jul 21 21:18:05 1996  Andrew Cagney  <cagney@kremvax.highland.com.au>
2096
2097         * gen-idecode.c: Output the complete run_until_stop function
2098         instead of just the code to handle a single instruction issue.
2099         * : Have the generated idecode.c include inline.c (instead of psim.c).
2100
2101         * std-config.h: Change psim.c so that it isn't inlined (as this is
2102         no longer needed).
2103
2104         * psim.c (run_until_stop): Delete the old run_until_stop function
2105         instead calling the idecode_run and idecode_run_until_stop
2106         functions that gen-idecode.c is now creating.
2107
2108 Sun Jul 21 21:18:05 1996  Andrew Cagney  <cagney@kremvax.highland.com.au>
2109
2110         * dgen.c: Maintenance - update to use new features found in lf.c.
2111
2112         * filter_filename.c (filter_filename): Maintenance - make the
2113         string constant.
2114
2115 Sun Jul 21 21:18:05 1996  Andrew Cagney  <cagney@kremvax.highland.com.au>
2116
2117         * debug.c (TRACE, ITRACE, DTRACE): Have GCC instead of CPP
2118         eliminate trace statements.
2119
2120         * debug.c: Change trace format so that it is consistent
2121         (file:line-nr) with CC's error output.
2122
2123         * gen-itable.c (itable_c_insn): Add the source file name and
2124         source line number to the instruction's informational entry.
2125
2126         * debug.c (ITRACE): Use the itable (and my_index) to get the
2127         current instructions name and source line number.
2128
2129         * gen-semantics.c, gen-icache.c: Adjust generated ITRACE calls to
2130         match new interface.
2131
2132         * emul_bugapi.c (emul_bugapi_instruction_call): Adjust
2133         corresponding call to ITRACE so that it still matches.
2134
2135         * idecode_expression.h (ALU_END, CR0_COMPARE): Use TRACE instead
2136         of ITRACE.  The CPP line directives would have previously set the
2137         line-nr and file name so ITRACE isn't needed.
2138
2139 Sun Jul 21 21:18:05 1996  Andrew Cagney  <cagney@kremvax.highland.com.au>
2140
2141         * gen-idecode.c (print_jump_until_stop_body): New function and
2142         idecode generation option.  Instead of generating and calling
2143         separate functions containing the semantic and icache code
2144         generate a single monolythic function and use goto's (and GCC's
2145         indirect jump) to move between code blocks.
2146
2147         * Makefile.in: Add sim_jump flag to those passed to igen.
2148
2149         * configure.in: New option --enable-sim-jump (default disabled)
2150
2151         * ppc-instructions: Eliminate any uses of labels and goto's.
2152         These result in duplicate declarations when a single flat function
2153         is being create.
2154
2155         * ppc-opcode-jump: New file.  Set of opcode rules useful when
2156         testing jumping idecodes.
2157
2158 Sun Jul 21 21:18:05 1996  Andrew Cagney  <cagney@kremvax.highland.com.au>
2159
2160         * gen-idecode.c: Optionally include the semantic code for an
2161         instruction in the function that is doing the decoding.
2162
2163         * igen.c: Add option (-C) to generate semantics in the instruction
2164         decode functions.
2165
2166         * configure.in (--enable-sim-icache): Accept an option list such
2167         as 1024,define.  Add a new choice to the list - semantic - which
2168         will cause igen to generate instruction decode functions that
2169         include the corresponding semantic code.
2170
2171 Sun Jul 21 21:18:05 1996  Andrew Cagney  <cagney@kremvax.highland.com.au>
2172
2173         * configure.in: New option --enable-sim-line-nr (default enabled).
2174         Enable/disable the inclusion of CPP line directives in the
2175         generated files.  Such directives refer back to the source files
2176         used when generating the simulator code.
2177
2178         * Makefile.in (sim_line_nr): Pass to igen.
2179
2180 Sun Jul 21 21:18:05 1996  Andrew Cagney  <cagney@kremvax.highland.com.au>
2181
2182         * igen.c (main): Revamp the options so that more letters are
2183         available.
2184
2185         * configure.in: Adjust to match igen's revamped options
2186
2187 Sun Jul 21 21:18:05 1996  Andrew Cagney  <cagney@kremvax.highland.com.au>
2188
2189         * Makefile.in (pk.h, hw.h): Rewrite depenencies for hw.h (etc) so
2190         that they use the same technique as igen (ie a dummy targets
2191         tmp-pk and tmp-hw are created).
2192
2193 Mon Jun 24 22:28:00 1996  Andrew Cagney  <cagney@kremvax.highland.com.au>
2194
2195         * Makefile.in (BUILD_CFLAGS): Include WARNING_CFLAGS.
2196
2197 Wed Jun 19 21:45:28 1996  Andrew Cagney  <cagney@kremvax.highland.com.au>
2198
2199         * ld-cache.[hc], ld-decode.[hc], ld-insn.[hc]: New files. Separate
2200         out the loading of each of the tables from the rest of igen.
2201         * Makefile.in: Adjust.
2202         * igen.c: Adjust.
2203
2204         * gen-icache.[hc], gen-idecode.[hc], gen-itable.[hc],
2205         gen-model.[hc], gen-semantics.[hc]: New files. Separate out the
2206         code creating each separate set of generated files.
2207         * Makefile.in: Adjust.
2208         * igen.c: Adjust.
2209
2210         * gen-support.[ch]: New files. Output the support functions (found
2211         in the ppc-instructions file) into a separate file.
2212         * Makefile.in: Add.
2213         * inline.h, inline.c: Add.
2214         * std-config.h: Add.
2215
2216         * ld-cache.c: Re-design the cache table format.
2217         * ppc-cache-rules: Update to new format.
2218
2219         * ld-decode.c: Re-design the decode table format.
2220         * ppc-opcode-simple: Update to new format
2221         * ppc-opcode-complex: Ditto
2222         * ppc-opcode-flat: Ditto
2223
2224         * filter.h, filter.c: New files. Separate the opcode filter table
2225         reading code from the rest of igen.c.  Re-design the filter so that
2226         it works inclusivly not exclusivly.
2227         * igen.c: Remove the opcode filter table loading code.
2228         * Makefile.in (filter.o): Adjust
2229         * configure.in: Adjust filter flag so that default includes 32bit
2230         and floating point.
2231         * ppc-instructions: Clean up filter fields so that only in use
2232         entries are specifed (ie delete `be').
2233
2234         * misc.c (name2i, i2name): New function.  Map between a string and
2235         an integer value.
2236
2237 Mon Jun 17 20:08:03 1996  Andrew Cagney  <cagney@kremvax.highland.com.au>
2238
2239         * sim_calls.c (sim_close): If simulator not created, skip printing
2240         of run information.
2241
2242 Mon Jun 17 20:08:03 1996  Andrew Cagney  <cagney@kremvax.highland.com.au>
2243
2244         * registers.c (register_description): Typo, insns not insn.
2245
2246         * ppc-instructions (model_get_number_of_stalls): New model function,
2247         returns number of stalls for the specified processor.
2248         * psim.c (psim_read_register): Add call to new function
2249         model_get_number_of_stalls().
2250
2251         * ppc-instructions (model_get_number_of_cycles): New model function,
2252         returns number of stalls for the specified processor.
2253         * psim.c (psim_read_register): Add call to new function
2254         model_get_number_of_cycles().
2255
2256 Fri Jun 14 00:11:56 1996  Andrew Cagney  <cagney@kremvax.highland.com.au>
2257
2258         * device_table.h: Don't pass the parent device into a devices
2259         create function.  This makes the create function consistent with
2260         the documentation.
2261         * device.c (device_template_create_device): Ditto
2262         * hw_pal.c (hw_pal_create): Ditto
2263         * hw_core.c (hw_core_create): Ditto
2264         * hw_vm.c (hw_vm_create): Ditto
2265         * hw_disk.c (hw_disk_create): Ditto
2266         * hw_nvram.c (hw_nvram_create): Ditto
2267         * hw_memory.c (hw_memory_create): Ditto
2268         * hw_cpu.c (hw_cpu_create): Ditto.
2269
2270         * device.c (split_find_device): Allow a null initial parent device.
2271         (device_template_create_device): Ditto.
2272
2273         * device.c (device_create_from): Make local (static) only used
2274         within device.c.
2275         * device_table.h: typedef device_callbacks moved here (from
2276         device.h) where it belongs.
2277
2278         * hw_core.c: New file. Implements just the core device using the
2279         core object.
2280
2281         * corefile.c: Moved all core device functions into the new
2282         hw_core.c file. core_device_create() disapears.
2283
2284         * psim.c (psim_tree): Use device_tree_add_parsed() to create the
2285         core device.
2286
2287 Thu Jun 13 00:09:29 1996  Andrew Cagney  <cagney@kremvax.highland.com.au>
2288
2289         * hw_init.c: Correct typo in comment.
2290
2291         * corefile.c (core_init): Remove any remaining references to a
2292         default map.
2293         (core_map_find_mapping): Ditto.
2294
2295 Wed Jun 12 22:30:32 1996  Andrew Cagney  <cagney@kremvax.highland.com.au>
2296
2297         * corefile.c (core_init): Make function global so that other
2298         devices are able to use the full core object.
2299
2300         * corefile.c (core_create, core_from_device): Break core_create
2301         into two functions.  The first creates a core object, the second
2302         returns the core object associated with a core device.
2303
2304         * corefile.c (core_device_create): Use core_create to make the
2305         core object.
2306
2307         * psim.c (psim_create): Use core_from_device() instead of
2308         core_create().
2309
2310         * device.c (device_template_create_device): Make static as only
2311         needed by functions internal to device.c.
2312
2313 Fri Jun  7 23:47:18 1996  Andrew Cagney  <cagney@kremvax.highland.com.au>
2314
2315         * ppc-opcode-test-2: Remove description of fields.
2316         * ppc-opcode-complex: Ditto
2317         * ppc-opcode-flat: Ditto
2318         * ppc-opcode-simple: Ditto
2319         * ppc-opcode-stupid: Ditto
2320         * ppc-opcode-test-1: Ditto
2321         * ppc-cache-rules: Ditto
2322
2323         * igen.c: Add description of files as a comment at the front.
2324
2325 Wed Jun 26 12:50:33 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
2326
2327         * configure.in: Check for whether the termios and termio
2328         structures are really defined, and whether or not, they define the
2329         c_line field.
2330         * configure: Regenerate.
2331
2332         * Makefile.in ({,TERMIO_}CFLAGS): Add TERMIO_CFLAGS options set by
2333         configure.
2334
2335         * emul_unix.c: Various changes to allow for building on systems
2336         with different termio and termios structures.  If host has both
2337         termio and termios, just use termios.  No longer include
2338         sys/ioctl.h.
2339
2340 Wed Jun 26 12:26:55 1996  Jason Molenda  (crash@godzilla.cygnus.co.jp)
2341
2342         * Makefile.in (bindir, libdir, datadir, mandir, infodir, includedir,
2343         INSTALL_PROGRAM, INSTALL_DATA): Use autoconf-set values.
2344         (docdir): Removed.
2345         * configure.in (AC_PREREQ): autoconf 2.5 or higher.
2346         (AC_PROG_INSTALL): Added.
2347         * configure: Rebuilt.
2348
2349 Wed Jun  5 23:53:42 1996  Andrew Cagney  <cagney@kremvax.highland.com.au>
2350
2351         * corefile.h: Rewrite documentation so that it can be extracted and
2352         converted into texinfo (and hence ready for translation into html,
2353         tex or nroff).
2354         * device.h: Ditto
2355
2356 Thu Jun  6 09:52:37 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
2357
2358         * hw_disk.c (SEEK_SET): If SEEK_SET is not defined, define as 0.
2359
2360 Wed Jun  5 11:46:52 1996  Andrew Cagney  <cagney@puddin>
2361
2362         * hw_disk.c: Include <unistd.h> if available.  Under SunOS, that
2363         is the source of SEEK_SET.
2364
2365 Wed Jun  5 01:39:07 1996  Andrew Cagney  <cagney@kremvax.highland.com.au>
2366
2367         * psim.c (psim_options): Correct type of dummy arguments being
2368         passed to a device_ioctl call.
2369
2370         * hw_init.c (hw_data_init_data_callback): Adjust printf arguments.
2371         (write_stack_arguments): Ditto.
2372         * hw_trace.c: Instance callback entry no longer a table.
2373
2374 Wed Jun  5 01:39:07 1996  Andrew Cagney  <cagney@kremvax.highland.com.au>
2375
2376         * emul_unix.c (do_unix_umask): Cast printf argument.
2377         (convert_to_linux_termios): Use LINUX_VSWTC not LINUX_VSWCH
2378
2379 Mon Jun  3 15:02:04 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
2380
2381         * hw_init.c (update_for_binary_section): Abort if we find an
2382         .interp section, which indicates the need for shared libraries to
2383         be loaded.
2384
2385 Mon Jun  3 15:02:04 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
2386
2387         * emul_unix.c (do_unix_{time,gettimeofday,getrusage}): Add support
2388         for time, gettimeofday, and getrusage system calls.
2389         ({solaris,linux}_descriptors): Add new system calls.
2390         (do_get{,e}{uid,gid}): Use gid_t/uid_t types.
2391         (do_get{,p}pid): Use pic_t types.
2392
2393         * configure.in (AC_TYPE_{GETGROUPS,SIGNAL}): Define.
2394         (AC_TYPE_{MODE,OFF,PID,SIZE,UID}_T): Define.
2395         * config{.in,ure}: Regenerate.
2396
2397 Mon Jun  3 23:19:57 1996  Andrew Cagney  <cagney@kremvax.highland.com.au>
2398
2399         * emul_netbsd.c (emul_netbsd_create): Use the more specific names
2400         `ppc-elf' and `ppc-xcoff' for the stack-type.
2401         * emul_unix.c (emul_unix_create): Ditto.
2402         * emul_bugapi.c (emul_bugapi_create): Ditto.
2403         * hw_init.c: Reconize the new names.
2404
2405         * emul_unix.c (do_unix_break): Adjust so that the updated ioctl
2406         call is used (no system parameter).
2407
2408 Sun Jun  2 11:21:17 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
2409
2410         * emul_unix.{h,c}: New files to provide Solaris and Linux system
2411         call emulations.
2412
2413         * Makefile.in (LIB_{SRC,OBJ}): Add emul_unix.{c,o}.
2414         (os_emul.o): Depend on emul_unix.h.
2415         (emul_unix.o): New dependency.
2416
2417         * configure.in (--enable-sim-alignment): Add 0|default to mean set
2418         alignment to 0, which means use appropriate alignment for mode.
2419         (AC_CHECK_FUNCS): Add new functions needed by emul_unix.c.
2420         (AC_CHECK_HEADERS): Add new include files needed by emul_unix.c.
2421         * config.in: Regenerate.
2422         * configure: Regenerate.
2423
2424         * emul_generic.c (emul_write2_status): New function to return
2425         results in r3 and r4 for Solaris system calls.
2426         (emul_do_system_call): If the system call is not support, but
2427         there is a string for the system call name, print out the string
2428         instead of the system call number.
2429
2430         * emul_generic.h (emul_write2_status): Declare it.
2431
2432         * emul_netbsd.c: Use /* */ around comment on #endif.
2433
2434         * os_emul.c: Include emul_unix.h.
2435         (os_emulations): Add emulations for Solaris, and Linux.
2436
2437         * psim.c (psim_usage): Add message about solaris, linux
2438         emulations.
2439
2440 Thu May 30 00:00:10 1996  Andrew Cagney  <cagney@kremvax.highland.com.au>
2441
2442         * hw_iobus.c: Tidy up notes so that they can be auto-extracted.
2443
2444         * README: Correct PSIM's title
2445
2446 Wed May 29 23:50:26 1996  Andrew Cagney  <cagney@kremvax.highland.com.au>
2447
2448         * basics.h: New global type object_disposition, used to indicate
2449         the status of objects when things are restarted.
2450
2451 Fri May 17 17:28:52 1996  Andrew Cagney  <cagney@benjimen.highland.com.au>
2452
2453         * device_table.h: Change the interrupt descriptor structure so
2454         that it includes an additional member - an upper bound on the
2455         interrupts by that name.
2456
2457         * device.c (device_interrupt_decode): Allow a range of interrupt
2458         ports (eg rst0 .. rst6) if the port descriptors bound is non zero.
2459
2460         * device.c (device_tree_print_device): Include a list of valid
2461         interrupt ports when listing supported devices.
2462
2463         * device.h, device.c (device_child_interrupt_*): Delete. Not used.
2464
2465         * emul_generic.c (emul_add_tree_hardware): Modify the creation of
2466         the interrupt net so that it uses int0 .. intN.
2467
2468 Tue May 14 23:03:53 1996  Andrew Cagney  <cagney@kremvax.highland.com.au>
2469
2470         * device.h, device.c (device_ioctl): Drop the system argument.
2471         Devices can not obtain this using the device_system() call.
2472         * device_table.h: Adjust accordingly.
2473         * hw_*.c: Adjust accordingly.
2474         * emul_netbsd.c (do_break): Adjust call to vm device accordingly.
2475         * psim.c (psim_options): Use a device_ioctl call to force the
2476         hw_trace device to update the trace options.
2477         * hw_trace.c: Replace the init function with an ioctl call.  Adjust
2478         doc accordingly.
2479
2480         * psim.c (psim_init): Re-order initialization so that the
2481         os-emulation is initialized after the device tree.  Without this,
2482         os-emul's are not able to create instances or access properties
2483         that contain an instance handle.
2484
2485         * device.h, device.c (device_add_*_property): Make these functions
2486         internal to device.c.  The user has access to the more generic
2487         device_tree_add_parsed function.  Differentiate between the initial
2488         and current value for each property.
2489         * (clean_device_properties): New function that deletes any
2490         properties created after the start of a simulation and restores
2491         the initial value of any others (ignoring ihandles).
2492         * (init_device_properties): (Re)Initialize any properties that
2493         contain ihandles. create
2494
2495         * (device_tree_init): Include calls to clean the device tree's
2496         properties and then initialize them.  Document this in the device.h
2497         file.
2498
2499 Mon May  6 17:36:15 1996  Andrew Cagney  <cagney@kremvax.highland.com.au>
2500
2501         * interrupts.c (decrementer_interrupt): Always pend a decrementer
2502         interrupt even if it is not yet possible to deliver it.
2503
2504 Wed May  1 12:26:51 1996  Andrew Cagney  <cagney@benjimen>
2505
2506         * mon.h, mon.c (mon_get_number_of_insns): Make this externally
2507         visable adjusting the arguments so that the interface is correct.
2508         (mon_print_info): Adjust calls.
2509         
2510         * registers.h, registers.c (register_description): Add phony
2511         cycle, insn and stall registers.
2512
2513         * psim.c (psim_read_register): Return nr of instructions for given
2514         processor.
2515
2516 Tue Apr 30 22:09:09 1996  Andrew Cagney  <cagney@kremvax.highland.com.au>
2517
2518         * hw_htab.c: New file. Extract contents from disk_table.c.
2519         Contains a device that, during initialization will create a
2520         PowerPC htab in memory.
2521         * hw_register.c: New file. Extract contents from disk_table.c.
2522         Contains a device that, during initialization, will parse its
2523         property list and use that to initialize various processor
2524         registers (not target specific).
2525         * hw_vm.c: New file. Extract contents from disk_table.c.  Contains
2526         a device that handles accesses to invalid virtual memory addresses
2527         (in user mode).
2528         * hw_init.c: New file. Extract contents from disk_table.c.  Misc
2529         devices that can initialize memory from a file.
2530         * hw_trace.c: New file. Extract contents from disk_table.c.
2531         Configure trace options from property values.
2532
2533         * Makefile.in (hw_htab.o, hw_register.o, hw_vm.o, hw_init.o,
2534         hw_trace.c): Add new device files.
2535
2536         * device_table.c: Remove above code, now in separate independant
2537         files.
2538
2539 Fri Apr 26 00:00:07 1996  Andrew Cagney  <cagney@kremvax.highland.com.au>
2540
2541         * hw_disk.c: New file.  Disk and CDROM device.
2542
2543         * Makefile.in (hw_disk.o): Add device hw_disk.c.
2544
2545         * pk_disklabel.c: New file.  Implement the miss-named disk-label
2546         package.
2547
2548         * Makefile.in (pk.h): Create the file pk.h that contains a list of all
2549         the packages.
2550
2551         * Makefile.in (hw.h, hw.c): Add dependancy on Makefile so that
2552         they are re-created when the makefile is updated.
2553
2554         * emul_generic.c (emul_add_tree_hardware): Add a disk device
2555         (below the iobus) to the device tree.  Include an ihandle of
2556         the disk as /chosen/disk.
2557
2558         * emul_bugapi.c (emul_bugapi_create): Don't initialize the input,
2559         output and (new) disk handles yet.
2560         * (emul_bugapi_init): Initialize the input, output (and just added)
2561         disk ihandles here.
2562         * (emul_bugapi_do_diskio): New.  Performs disk i/o (well at least
2563         what I think the behavour is).
2564         * emul_bugapi.c (emul_bugapi_instruction_call): Add hook to disk
2565         i/o bug call.  For RETURN call, exit using gpr[3]'s status even
2566         though this isn't part of the spec - makes it possible for machine
2567         code to signal the aporting of a simulation run.
2568
2569         * emul_chirp.c (chirp_emul_call_method): Add support for the
2570         claim/release methods.
2571         * (chirp_emul_exit): Add an optional exit status argument to
2572         the exit method.  Makes it possible for chirp emul simulations
2573         to abort upon an error.
2574         * device.h, device.c (device_instance_claim,
2575         device_instance_release): New methods for claiming and releasing
2576         memory.
2577         * hw_memory.c: add claim and release memory methods.
2578         * hw_*: Use the claim memory method when allocating physical
2579         memory.
2580
2581 Thu Apr 18 23:38:10 1996  Andrew Cagney  <cagney@kremvax.highland.com.au>
2582
2583         * hw_nvram.c (hw_nvram_update_clock): Use the current not previous
2584         time when updating the clock.
2585
2586         * hw_nvram.c: Tidy up documentation
2587
2588 Fri May 24 10:08:10 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
2589
2590         * configure.in (AC_STRUCT_ST_{BLKSIZE,BLOCKS,RDEV}): Use these
2591         macros to determine whether or not the appropriate st_<xxx> fields
2592         exist in the stat structure.
2593         (AC_CHECK_FUNCS): Check for all unix system calls used, except for
2594         the real basic ones like open, read, write, etc.
2595         * config{.in,ure}: Regenerate.
2596
2597         * emul_netbsd.c: Add support for missing system calls, and/or
2598         missing stat fields.
2599         (MAXPATHLEN): Undefine if including unistd.h, since sys/param.h
2600         might define it.
2601
2602         * hw_pal.c (WITH_STDIO): Redefine if O_NDELAY, F_GETFL, or F_SETFL
2603         are not defined.
2604         (scan_hw_pal): Do not cause syntax error if O_NDELAY, F_GETFL, or
2605         F_SETFL not defined.
2606
2607 Tue May 21 17:24:45 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
2608
2609         * emul_netbsd.c (write_stat): Don't convert st_blocks unless the
2610         host is netbsd.
2611
2612 Thu May 16 10:56:45 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
2613
2614         * configure.in (AC_CHECK_HEADERS): Add sys/ioctl.h.
2615         * config{.in,ure}: Regenerate.
2616         * emul_netbsd.c: If HAVE_SYS_IOCTL_H is not defined, don't include
2617         sys/ioctl.h.
2618
2619 Tue May  7 17:28:12 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
2620
2621         * hw_pal.c (hw_pal_instance_read_callback): Remove unused
2622         variable.
2623
2624         * misc.c ({,target_}a2i): Rewrite to not use strtoul.
2625
2626         * Makefile.in ({spreg,misc}.o): Add dependency on .c file.
2627         ({i,d}gen): Don't link in liberity.  Use BUILD_LIBS instead of
2628         LIBS.
2629
2630 Mon May  6 11:31:43 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
2631
2632         * hw_pal.c (hw_pal_instance_read_callback): If using stdio, use
2633         fgets to read line.  If not using stdio, do a simple blocking read
2634         of len bytes.
2635
2636 Fri May  3 15:07:42 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
2637
2638         * Makefile.in: Correctly build simulator for build machine != host
2639         machine.
2640
2641 Tue Apr 30 18:46:05 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
2642
2643         * configure.in (--enable-hostendian): Rework so the default uses
2644         the AC_C_BIGENDIAN results.  Only run AC_C_BIGENDIAN if not cross
2645         compiling.
2646         * configure: Regenerate.
2647         
2648         * sim-endian.h: Add more tests for host endian to support more
2649         platforms in a cross compilation environment.
2650
2651 Wed Apr 17 14:38:06 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
2652
2653         * hw_pal.c ({scan,write}_hw_pal): If WITH_STDIO == DO_USE_STDIO,
2654         use stdio, instead of unpended read/printf_filtered.
2655         (hw_pal_instance_write_callback): If WITH_STDIO == DO_USE_STDIO,
2656         flush stdout after writing the characters.
2657
2658         * options.c (print_options): Print out WITH_STDIO.
2659
2660         * Makefile.in (STDIO_CFLAGS): Pass on result of @sim_stdio@
2661         configuration variable.
2662         (CONFIG_CFLAGS): Include STDIO_CFLAGS.
2663         (hw.{c,h}): Allow for source dir != build dir, and for HW_SRC
2664         files to contain directory pieces.
2665
2666         * std-config.h (DO{,NT}_USE_STDIO): New flags for whether we
2667         should use stdio for console input.
2668         (WITH_STDIO): If not defined, define as DONT_USE_STDIO.
2669
2670         * configure.in (--enable-sim-stdio): Add new switch to control
2671         whether stdio is used for console I/O.
2672         * configure: Regenerate.
2673
2674         * interrupts.c (external_interrupt): Declare it to be
2675         INLINE_INTERRUPTS, not INLINE_CPU.
2676
2677 Mon Apr 15 23:30:56 1996  Andrew Cagney  <cagney@kremvax.highland.com.au>
2678
2679         * events.c (insert_event_entry): Allow events to be scheduled
2680         *NOW* (at delta time 0).  Add assertions to clarify behavour of
2681         event queue.
2682
2683         * events.c (update_time_from_event): New function. Calculates the
2684         number of ticks from the next event.  Use this.
2685
2686 Sun Apr 14 21:39:45 1996  Andrew Cagney  <cagney@highland.com.au>
2687
2688         * emul_netbsd.c (do_break): Return 0 if success (instead of
2689         adjusted break).
2690
2691         * device_table.c (vm_ioctl_callback): Don't return adjusted break
2692         (isn't needed).
2693
2694 Sun Apr 14 21:32:41 1996  Andrew Cagney  <cagney@highland.com.au>
2695
2696         * device_table.h: Change type of the device ioctl so that it
2697         returns an int (status).
2698         * device.h (device_ioctl): Ditto.
2699         * device.c (device_ioctl): Ditto.
2700
2701         * device_table.c (stack_ioctl_callback): Return 0 status.
2702         (vm_ioctl_callback): Ditto
2703
2704 Sat Apr 13 00:00:24 1996  Andrew Cagney  <cagney@kremvax.highland.com.au>
2705
2706         * emul_netbsd.c (do_read): Correctly set the return value.
2707         (do_getpid): Ditto.
2708         (do_getuid): Ditto.
2709         (do_geteuid): Ditto.
2710         (do_dup): Ditto.
2711         (do_getegid): Ditto.
2712         (do_getgid): Ditto.
2713         (do_sigprocmask): Ditto.
2714         (do_umask): Ditto.
2715         (do_dup2): Ditto.
2716         (do_gettimeofday): Ditto.
2717         (do_getrusage): Ditto.
2718         (do_fstat): Ditto.
2719         (do_stat): Ditto.
2720         (do_lseek): Ditto.
2721         (do___sysctl): Ditto.
2722
2723 Fri Apr 12 20:56:47 1996  Andrew Cagney  <cagney@kremvax.highland.com.au>
2724
2725         * device_table.c (vm_ioctl_callback): Don't access the processor
2726         registers directly, instead leave it to the caller to handle this.
2727
2728         * emul_netbsd.c (do_break): Which calls vm_ioctl_callback to
2729         perform a break.  Pass in the new break value and set the
2730         registers according to the result.
2731
2732         * emul_generic.c (emul_write_status): Change so that r3 contains
2733         either status or errno and failure is indicated by SO.
2734
2735 Thu Apr  4 23:03:38 1996  Andrew Cagney  <cagney@kremvax.highland.com.au>
2736
2737         * emul_bugapi.c (emul_bugapi_create): More strict check of OEA
2738         address.
2739
2740 Thu Apr  4 20:58:05 1996  Andrew Cagney  <cagney@highland.com.au>
2741
2742         * interrupts.h (interrupts): New structure contains state of
2743         pending interrupts.
2744
2745         * cpu.c (cpu_interrupts): New function.  Pending interrupt status
2746         in the cpu and grant access to it.  Add interrupts to cpu
2747         structure.
2748
2749 Fri Mar 29 22:09:25 1996  Andrew Cagney  <cagney@highland.com.au>
2750
2751         * device.c (device_tree_add_parsed): Check that the creation of a
2752         device instance worked before using it.
2753
2754         * psim.c (psim_halt): Remove cia argument from psim_halt.  This
2755         function does not save the CIA so do not pass it in.
2756
2757 Fri Mar 29 21:30:56 1996  Andrew Cagney  <cagney@highland.com.au>
2758
2759         * hw_pal.c (hw_pal): Merge the halt and icu and console devices
2760         found in device_table.c into a single hack pal.
2761
2762         * device_table.c (halt, icu, console): Delete.
2763
2764         * Makefile.in (hw_pal.o): New dependency.
2765
2766         * emul_generic.c (emul_add_tree_hardware): Re-arange device tree
2767         so that it uses the pal instead of the icu/halt/console devices.
2768         Wire the pal's interrupt ports up to the cpu nodes.
2769
2770 Fri Mar 29 20:17:17 1996  Andrew Cagney  <cagney@highland.com.au>
2771
2772         * hw_iobus.c (hw_iobus_attach_address_callback): Move from
2773         device_table.c to here.
2774
2775         * Makefile.in (hw_iobus.o): New dependency.
2776
2777 Fri Mar 29 12:17:58 1996  Andrew Cagney  <cagney@kremvax.highland.com.au>
2778
2779         * emul_bugapi.c (_os_emul_data): Add fields for output, input.
2780         (emul_bugapi_create): Create input, output from /chosen/stdin and
2781         /chosen/stdout.
2782         (emul_bugapi_do_{read,write}): Switch to use device_instance
2783         interface.
2784         (emul_bugapi_instruction_call): Change calls to
2785         emul_bugapi_do_{read,write} to pass device instance argument.
2786
2787 Tue Mar 26 14:57:58 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
2788
2789         * igen.c (idecode_switch_end): Fix 2/26 change so that an extra
2790         default is not written out if a default was already written.
2791
2792         * psim.c (psim_{read,write}_register): Use sizeof unsigned_8 to
2793         size cooked_buf, not sizeof natural_word, since floating point
2794         registers are 8 bytes.
2795
2796 Mon Mar 25 22:07:13 1996  Andrew Cagney  <cagney@kremvax.highland.com.au>
2797
2798         * configure: Regenerate with autoconf 2.9.
2799
2800 Thu Mar 21 00:14:26 1996  Andrew Cagney  <cagney@highland.com.au>
2801
2802         * device_table.h: Always include string headers.
2803
2804 Thu Mar 21 00:06:09 1996  Andrew Cagney  <cagney@kremvax.highland.com.au>
2805
2806         * main.c (error): Be careful to not try to print out statistics
2807         when the simulation was never created.
2808
2809 Sun Mar 17 22:40:57 1996  Andrew Cagney  <cagney@highland.com.au>
2810
2811         * basics.h: Move the event queue's definition to here so that it
2812         can be refered to globally with out importing all of events.h.
2813
2814         * psim.h, psim.c (psim_event_queue): New function.  Grant access
2815         to the simulation event queue.  Will make this the single point of
2816         access (there is after all only one event queue in the
2817         simulation).
2818
2819         * cpu.c (cpu_create): Use psim_event_queue to obtain the event
2820         queue instead of it being passed in.  No longer allow access to
2821         the cpu's copy of the event queue.
2822
2823 Sun Mar 17 22:40:57 1996  Andrew Cagney  <cagney@highland.com.au>
2824
2825         * events.h, events.c (event_handler): Remove event_queue from
2826         arguments passed to an event handler.  That argument is redundant
2827         - the `data' should refer to a data structure that contains the
2828         event queue if queing is needed.
2829
2830         * cpu.c (cpu_decrement_event): adjust
2831
2832         * events.c (event_queue_process): adjust
2833
2834 Sun Mar 17 22:40:57 1996  Andrew Cagney  <cagney@highland.com.au>
2835
2836         * device.h, device.c (device_system): New, returns a handle for
2837         the system given the device.
2838
2839         * device.c (device_address_init): Store a pointer back to the
2840         system in each devices node.
2841
2842         * device_table.h: Don't pass `system' into each device when it is
2843         being initialized, this is now available using device_system(me).
2844
2845         * device.c (device_address_init, device_data_init): Adjust.
2846
2847         * hw_cpu.c, hw_nvram.c, hw_memory.c, hw_eeprom.c, device_table.c:
2848         Adjust.
2849
2850 Sun Mar 17 22:40:57 1996  Andrew Cagney  <cagney@highland.com.au>
2851
2852         * interrupts.c (decrementer_interrupt, external_interrupt):
2853         Remember that an interrupt wasn't delivered so that it can be
2854         tried again later.
2855
2856         * interrupts.c (check_masked_interrupt): New function.  (re)
2857         checks for the posibility that a recent change to the MSR may have
2858         made it possible to deliver an interrupt that was previously
2859         masked be the EE bit.
2860
2861         * ppc-instructions (mtmsr, mfmsr, rfi): Check for posibility of
2862         a pending interrupt being delivered using check_masked_interrupt().
2863
2864         * cpu.c (cpu_decrement_event): Just call decrementer_interrupt()
2865         leaving it to that module to handle both interrupt synchronization
2866         and masking.
2867
2868         * cpu.c (struct _cpu): remove variables that were going to record
2869         pending decrementer and external interrupts.
2870
2871 Sun Mar 17 22:40:57 1996  Andrew Cagney  <cagney@highland.com.au>
2872
2873         * hw_cpu.c, hw_cpu.h: New files.  Implement a device that sits
2874         between the interrupt controller and the simulators internal
2875         processor model.  Maps device interrupts onto the processor
2876         interrupt function calls.
2877
2878 Mon Mar  4 06:06:54 1996  Andrew Cagney  <cagney@kremvax.highland.com.au>
2879
2880         * hw_nvram.c: NVRAM device that includes a real-time clock that is
2881         updated each second.
2882
2883 Mon Mar  4 04:18:50 1996  Andrew Cagney  <cagney@kremvax.highland.com.au>
2884
2885         * device.h (attach_type): Remove attach_default type address
2886         spaces.  Will replace with levels of callback memory.
2887
2888         * corefile.h, corefile.c (new_core_mapping), corefile.c
2889         (core_map_attach): Replace default attach with a layerd callback
2890         approach.
2891
2892 Sun Mar  3 03:58:46 1996  Andrew Cagney  <cagney@kremvax.highland.com.au>
2893
2894         * device.c (split_property_specifier): ensure that only a single
2895         property is found.
2896         (split_value): New function, parses the value part of a device
2897         spec.
2898
2899         * device.c (device_tree_add_parsed): Use the interrupt conversion
2900         functions to determine the interrupt port numbers.
2901
2902         * device_table.h: Add table that maps between an interrupts
2903         symbolic name and its port number.
2904
2905         * device.h, device.c (device_interrupt_decode,
2906         device_interrupt_encode): new functions use the recently added
2907         interrupt port name/number tables to perform conversion.
2908
2909 Sun Mar  3 03:23:59 1996  Andrew Cagney  <cagney@kremvax.highland.com.au>
2910
2911         * device.h, device.c (device_set_array_property,
2912         device_set_boolean_property, device_set_ihandle_property,
2913         device_set_integer_property, device_set_string_property): New
2914         functions - allow the value of a given property to be changed.
2915
2916         * device.h, device.c: Re-order declaration and definition of
2917         property functions.
2918
2919 Sun Mar  3 03:10:22 1996  Andrew Cagney  <cagney@kremvax.highland.com.au>
2920
2921         * device.c (device_tree_print_device, device_tree_add_parsed):
2922         Remove references to phandle properties.
2923
2924 Wed Feb 28 00:43:07 1996  Andrew Cagney - aka Noid  <cagney@highland.com.au>
2925
2926         * Makefile.in (corefile.o): missing dependency on device_table.h
2927         etc.
2928
2929 Tue Feb 27 23:59:35 1996  Andrew Cagney - aka Noid  <cagney@highland.com.au>
2930
2931         * device_table.h: Revamp device init callbacks so that they are a
2932         sub structure.
2933         * device.c (device_init_data, device_init_address): If an init
2934         callback is NULL assume it should do nothing.
2935         * device_table.c (ignore_device_init, unimp_device_init): delete
2936         as redundant.
2937         * device_table.c, hw_memory.c: adjust.
2938
2939         * (io): ditto.
2940         * (dma): ditto.
2941         * (device_instance): ditto.
2942         * (ioctl): ditto.
2943         * (address nee config_address): ditto.
2944         * (interrupt): ditto.
2945
2946 Mon Feb 26 21:11:20 1996  Andrew Cagney - aka Noid  <cagney@highland.com.au>
2947
2948         * igen.c (idecode_switch_end): Output a default entry when the
2949         switch statement is perfect.  Firstly stops GCC complaining about
2950         an incomplete switch and secondly it will be eliminated by a good
2951         compiler any way.
2952
2953 Mon Feb 26 22:47:15 1996  Andrew Cagney - aka Noid  <cagney@highland.com.au>
2954
2955         * Makefile.in (hw.h, hw.c): New targets. Create from the list of
2956         hw_*.c files. hw.h declares a device descriptor table for each hw
2957         device while hw.c lists those tables in a form suitable for the
2958         construction of a top leveltable in device_table.c.
2959
2960         * Makefile.in (device_table.o): now depends on hw.c a generated
2961         table of hw.
2962
2963         * device_table.c (device_table): Re-arange the table of devices so
2964         that two levels are possible.  Make use of hw.c.
2965         * device_table.h: ditto.
2966
2967         * device.c (device_template_create_device): Handle new two level
2968         device lookup table.
2969         * device.c (device_usage): ditto.
2970
2971 Mon Feb 26 22:24:00 1996  Andrew Cagney - aka Noid  <cagney@highland.com.au>
2972
2973         * device_table.c: Delete the memory device (moved to hw_memory.c).
2974
2975         * hw_memory.c: New file.  Just an OpenBoot memory device.
2976
2977 Wed Jan 17 21:47:34 1996  Andrew Cagney  <cagney@highland.com.au>
2978
2979         * device.c (device_init_address): New.  Split initialization into
2980         two stages, address and address spaces
2981         * device.c (device_init_data): New. ... and data or other work.
2982         With out this, devices try to modify memory before it as been
2983         attached.
2984
2985         * device.c (device_tree_init): Update to perform staged
2986         initialization.
2987
2988         * device.c (device_init): Delete.
2989
2990 Wed Jan 17 21:43:09 1996  Andrew Cagney  <cagney@highland.com.au>
2991
2992         * device_table.c (data_*): Rewrite to make heaver use of property
2993         nodes. Allow initialization by different data types.
2994         * device_table.c (htab_* pte_*): Rewrite to use properties.
2995
2996         * emul_chirp.c (emul_chirp_create): Use
2997         * emul_bugapi.c (emul_bugapi_create): Ditto
2998         * emul_netbsd.c (emul_netbsd_create): Ditto
2999
3000 Wed Jan 17 21:24:50 1996  Andrew Cagney  <cagney@highland.com.au>
3001
3002         * emul_generic.c (emul_add_tree_options): Annotate existing tree
3003         with options that haven't yet been specified.
3004         * emul_generic.c (emul_add_tree_hardware): Annotate existing tree
3005         with demo devices and properties.
3006
3007         * emul_chirp.c (emul_chirp_create): Update to use new
3008         device_tree_add_parsed call and additional information now
3009         included in the device tree.  Use emul_add_tree* functions to add
3010         any missing details.
3011         * emul_bugapi.c (emul_bugapi_create): Ditto
3012         * emul_netbsd.c (emul_netbsd_create): Ditto
3013
3014 Wed Jan 17 21:18:27 1996  Andrew Cagney  <cagney@highland.com.au>
3015
3016         * device.c (device_instance_create): New. Create/delete and
3017         operate on instances of a device.
3018         * device.c (device_instance_delete): Ditto
3019         * device.c (device_instance_read): Ditto
3020         * device.c (device_instance_write): Ditto
3021         * device.c (device_instance_seek): Ditto
3022         * device.c (device_instance_data): Ditto
3023         * device.c (device_instance_name): Ditto
3024         * device.c (device_instance_path): Ditto
3025
3026         * emul_chirp.c (chirp_emul_open): Implement using device_instance.
3027         * emul_chirp.c (chirp_emul_close): Ditto
3028         * emul_chirp.c (chirp_emul_read): Ditto
3029         * emul_chirp.c (chirp_emul_write): Ditto
3030         * emul_chirp.c (chirp_emul_seek): Ditto
3031
3032         * emul_chirp.c (chirp_read_t2h_args): Read arguments from device.
3033         Being careful to convert all from target to host byte order.
3034         * emul_chirp.c (chirp_write_h2t_args): Converse.
3035
3036 Wed Jan 17 20:07:15 1996  Andrew Cagney  <cagney@highland.com.au>
3037
3038         * device.c (device_tree_add_parsed): New.  Rewrite code to add
3039         devices to the device tree so that a single printf style function
3040         is used.
3041
3042         * device.c (device_tree_add_*): Delete. Replaced by above.
3043
3044         * device.c (split_device_specifier): Functions to manipulate a
3045         device specifier (path) breaking it into its components
3046         * device.c (split_property_specifier): Ditto
3047         * device.c (split_device_name): Ditto
3048         * device.c (split_find_device): Ditto
3049
3050         * device.c (scan_*): Delete
3051
3052         * device.c (device_tree_find_device): Rewrite to use above.
3053         * device.c (device_add_property): Ditto
3054
3055 Wed Jan 17 19:51:56 1996  Andrew Cagney  <cagney@highland.com.au>
3056
3057         * psim.c(psim_options): Parse the psim options, installing their
3058         value in the device tree.  Options are now first entered into a
3059         device tree and then extracted out again when needed.  This allows
3060         greater flexability in configuration.
3061
3062         * psim.c (psim_tree): Returns a basic device tree ready for
3063         parsing by psim_options.
3064         * psim.c (psim_usage): New.  Give usage to varing levels of detail
3065         according to the verbosity.  In turn output device and trace
3066         usage.
3067
3068         * main.c (main): Update to use new system
3069         * sim_calls.c (sim_open, sim_do_command): Ditto
3070
3071         * psim.c (psim_options): Add `r' option - ram size.
3072         * psim.c (psim_options): Add `o' option - openboot tree entry.
3073         * psim.c (psim_options): Add `h'/`H' options - more help.
3074
3075         * debug.c (trace_usage): Add more detailed help.
3076         * device.c (device_usage): New. Output help including a list of
3077         the devices currently available in the device table.
3078         * device_table.c: Add usage operator to each device.
3079
3080         * corefile.c (core_create, core_device_create): Adjust so that the
3081         core device is created earlier for psim_tree().  Core can later be
3082         created from it.
3083
3084         * psim.c (psim_create): Update to handle above way of creating
3085         things.  Extract all information from the device tree.
3086
3087         * device_tree.c (trace_*): New device node, its properties are
3088         used to set the value of the trace options.  Init this device (in
3089         psim_options) when ever the options are updated.
3090
3091 Wed Jan 17 19:46:07 1996  Andrew Cagney  <cagney@highland.com.au>
3092
3093         * debug.h: Add trace_print_info, trace_print_device_tree and
3094         trace_dump_device_tree.  The first is a replacement for the
3095         variable `print_info' found in main.c and sim_calls.c.  The latter
3096         two enable the dumping of the entire device tree.
3097
3098         * debug.c: Add to trace_description table.
3099
3100         * main.c (main): Use above trace instead of local variable
3101         * sim_calls.c (sim_close): Ditto
3102
3103         * device.c (device_tree_print_device): New.  Prints the device
3104         tree in a format that is consistent with what can be parsed by the
3105         device tree load from file code.
3106
3107         * psim.c (psim_create): Dump device tree if enabled. If nump
3108         selected, exit psim immediatly.
3109
3110 Wed Jan 17 19:36:52 1996  Andrew Cagney  <cagney@highland.com.au>
3111
3112         * corefile-n.h (core_map_read_N): When mapping from an address to
3113         a device, do not subtract the devices base.  The device its self
3114         can do this.  Brings the behavour into line with OpenBoot.
3115         * corefile-n.h (core_map_write_N): Ditto
3116         * corefile.c (core_map_read_buffer): Ditto
3117         * corefile.c (core_map_write_buffer): Ditto
3118
3119         * device_table.c (console_io_read_buffer_callback): Adjust to
3120         handle biased address.
3121         * device_table.c (console_io_write_buffer_callback): Ditto
3122
3123 Wed Jan 17 18:36:09 1996  Andrew Cagney  <cagney@highland.com.au>
3124
3125         * device.c (attach_device_interrupt_edge): New. Interrupt model
3126         did not allow interrupts to be wired up as a general net (edges).
3127         Re-implement so that interrupt events can be passed to multiple
3128         controllers and interrupt controllers can further propogate
3129         interrupt events.
3130
3131         * device.c (attach_device_interrupt_edge) : New, Ditto
3132         * device.c (detach_device_interrupt_edge) : New, Ditto
3133         * device.c (clean_device_interrupt_edges) : New, Ditto
3134         * device.c (device_interrupt_event) : New, Ditto
3135         * device.c (device_interrupt_attach) : New, Ditto
3136         * device.c (device_interrupt_detach) : New, Ditto
3137         * device.c (device_child_interrupt_attach) : New, Ditto
3138         * device.c (device_child_interrupt_detach) : New, Ditto
3139
3140         * device.c (device_attach_interrupt) : Delete old
3141         * device.c (device_detach_interrupt) : Delete old
3142         * device.c (device_interrupt) : Delete old
3143         * device.c (device_interrupt_ack) : Delete old
3144
3145         * device_table.c (unimp_*) : Update to match
3146         
3147         * device_table.c (icu_io_write_buffer_callback) : Update to use
3148         interface.
3149         * device_table.c (icu_interrupt_event_callback) : Ditto
3150
3151 Wed Jan 17 18:18:40 1996  Andrew Cagney  <cagney@highland.com.au>
3152
3153         * device.c (external_to_device) : New function that provides a
3154         standard mapping between a devices internal representation (a
3155         pointer) and its external (or what is passed to a client)
3156         representation (a phandle).  Implement using the cap object
3157         attached to the root node.
3158
3159         * device.c (device_to_external) : Ditto
3160         * device.c (external_to_device_instance) : Ditto but for ihandle
3161         and device instance.
3162         * device.c (device_instance_to_external) : Ditto
3163
3164         * Makefile (device.o): Add dependency on cap.
3165
3166         * emul_chirp.c (struct _emul_chirp_data) : Elimate use of cap. Code
3167         needing to translate between internal and external representations
3168         changed to use the external_to_device et.al. device operations.
3169         * emul_chirp.c (chirp_emul_*) : Ditto
3170
3171         * Makefile (emul_chirp.o): Remove dependency on cap
3172
3173 Sat Jan  6 10:13:26 1996  Andrew Cagney - aka Noid  <cagney@highland.com.au>
3174
3175         * emul_chirp.c (map_over_chirp_note): Tighten up (and fix) checks
3176         on OpenBoot note section.
3177
3178 Fri Jan  5 20:28:53 1996  Andrew Cagney  <cagney@hignland.com.au>
3179
3180         * emul_generic.c (emul_write_buffer): Use vm faulting byte
3181         read/write calls for buffer transfers.  This will cause a fault to
3182         occure if the transfer fails.  CHRP catches the fault while the
3183         others suffer the consequences.
3184         (emul_read_buffer): Ditto.
3185         (emul_write_word): Ditto.
3186         (emul_read_word): Ditto.
3187         (emul_read_string): Ditto.
3188
3189 Fri Jan  5 18:55:34 1996  Andrew Cagney  <cagney@highland.com.au>
3190
3191         * emul_chirp.c (emul_chirp_create, emul_chirp_instruction_call),
3192         emul_generic (emul_blr_instruction): Use a real blr instruction to
3193         return from a client service call.
3194
3195         * emul_chirp.c (services): Add all OpenBoot services to table.
3196
3197         * emul_generic.h, emul_bugapi.c (emul_bugapi_create), emul_chirp.c
3198         (emul_chirp_create) : Use names instead of numbers for
3199         instructions being stored in memory.
3200
3201 Fri Jan  5 18:52:28 1996  Andrew Cagney  <cagney@highland.com.au>
3202
3203         * Makefile.in (maintainer-clean): Remove .log, core and *.core
3204         (From NetBSD) files.
3205
3206 Wed May 29 22:57:40 1996  Andrew Cagney  <cagney@kremvax.highland.com.au>
3207
3208         * ChangeLog.00, ChangeLog: ChangeLog from gdb-4.16 becomes
3209         ChangeLog.00
3210