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