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