1 Mon Sep 29 10:05:01 1997 Andrew Cagney <cagney@b1.cygnus.com>
3 * sim_calls.c (zfree): Use free, not mfree.
4 (sim_io_flush_stdoutput): Replace gdb_flush with callback ->
7 Fri Sep 26 09:50:29 1997 Andrew Cagney <cagney@b1.cygnus.com>
10 (ldhau): From Johannes Reisinger, update rA after load.
12 Tue Sep 9 22:13:23 1997 Felix Lee <flee@cygnus.com>
14 * basics.h (CONCAT*): token-pasting macros, if ALMOST_STDC,
16 * words.h: __int64 instead of long long for MSVC.
18 Wed Aug 27 10:24:15 1997 Andrew Cagney <cagney@b1.cygnus.com>
20 * sim_calls.c (sim_create_inferior): Check the simulator was
21 initialized before creating inferior.
23 * idecode_expression.h (ALU_END): From Charles Lefurgy - Extract
24 sign bit using 64 bit and not a 32 bit mask.
26 Wed Aug 27 10:15:48 1997 Andrew Cagney <cagney@b1.cygnus.com>
28 * sim_calls.c (sim_load): From Ian Lance Taylor - free argv after
29 it has been used, not before.
31 Tue Aug 26 10:41:35 1997 Andrew Cagney <cagney@b1.cygnus.com>
33 * sim_calls.c (sim_kill): Delete.
34 (sim_create_inferior): Add ABFD argument.
35 (entry_point): Delete variable.
36 (sim_load): Move setting of PC from here.
37 (sim_create_inferior): To here.
39 Mon Aug 25 16:17:06 1997 Andrew Cagney <cagney@b1.cygnus.com>
41 * sim_calls.c (sim_open): Add ABFD argument.
43 Thu Jul 3 10:18:06 1997 Andrew Cagney <cagney@b1.cygnus.com>
45 * ppc-instructions (PPC_INSN_INT): From Michael Thies - Monitoring
46 CR register updates dependant on RC value had logic backwards.
48 * ppc-instructions (Load String Word Immediate): From Brad Parker
49 - sense of wrap test in check for overwriting RA wrong.
50 (Load String Word Indexed): Ditto.
52 * configure.in: From Erik Landry - set sim_default_model not
53 sim_model for sim-default-model option.
54 * configure: Regenerate.
56 * interrupts.c (check_masked_interrupts): Schedule a hardware
57 interrupt delivery when FP interrupts get enabled.
58 (program_interrupt): Generate FP exceptions instead of aborting.
59 (deliver_hardware_interrupt): Deliver a FP exception if so
62 * registers.h: Add definition of fpscr_vx_bits.
64 * idecode_expression.h (FPSCR_END): Always update FEX and VX bits
66 (FPSCR_END): Explicitly check for possible floating point
68 (FPSCR_BEGIN): Simplify.
70 * ppc-instructions (Move From FPSCR): Enable.
71 (Move To FPSCR Bit 1): Ditto.
72 (Move To FPSCR Bit 0): Ditto.
73 (Move To FPSCR Field Immediate): Ditto.
74 (Move to Condition Register from FPSCR): Simplify.
75 (invalid_arithemetic_operation): Generate a QNaN when invalid
76 operation exception disabled.
78 Tue May 20 10:22:50 1997 Andrew Cagney <cagney@b1.cygnus.com>
80 * sim_calls.c (sim_open): Add callback argument.
81 (sim_set_callbacks): Delete.
83 Tue Apr 22 22:36:57 1997 Mike Meissner <meissner@cygnus.com>
85 * sim_callbacks.h (error): Make declaration match gdb's.
86 * main.c (error): Ditto.
88 Fri Apr 18 17:03:09 1997 Andrew Cagney <cagney@b1.cygnus.com>
90 * sim_calls.c (sim_stop_reason): Simplify. Was running implies
91 stopped/SIGINT. Exit implies a status code.
93 * psim.c (cntrl_c_simulation): From main.c. Event function that
95 (psim_stop): New. Asynchronously schedule a stop simulator event.
96 (psim_run_until_stop): Delete. Made redundant by psim_stop.
98 * main.c (cntrl_c): Update.
99 (cntrl_c_simulation): Moved to psim.c.
101 * sim_calls.c (sim_stop): New function. Use psim_stop which
102 schedules a stop event.
103 (sim_resume): Drop SIGINT handler, now in gdb/main.c.
104 (sim_resume): Use psim_run as stop variable no longer needed.
106 Fri Apr 18 17:03:08 1997 Andrew Cagney <cagney@b1.cygnus.com>
108 * psim.c (psim_options): Handle -E option correctly.
109 (psim_usage): Document.
111 Thu Apr 17 03:28:03 1997 Doug Evans <dje@canuck.cygnus.com>
113 * psim.c (psim_options): Ignore -E option (sets endianness).
114 * sim_calls.c: #include bfd.h.
115 (entry_point): New static local.
116 (sim_load): Return SIM_RC. New arg abfd. Set start address from bfd.
117 (sim_create_inferior): Return SIM_RC. Delete arg start_address.
119 Tue Apr 15 14:57:18 1997 Ian Lance Taylor <ian@cygnus.com>
121 * Makefile.in (INSTALL): Set to @INSTALL@.
122 (INSTALL_XFORM, INSTALL_XFORM1): Remove.
123 (install): Depend upon installdirs. Use $(program_transform_name)
124 directly, rather than using $(INSTALL_XFORM).
125 (installdirs): New target.
127 Fri Apr 4 17:54:36 1997 Jim Wilson <wilson@cygnus.com>
129 * Makefile.in (tmp-hw, tmp-pk): Use for loop to eliminate duplicates
130 rather than the non-portable cat -n.
132 Mon Apr 14 16:29:51 1997 Ian Lance Taylor <ian@cygnus.com>
134 * Makefile.in (INSTALL): Change install.sh to install-sh.
136 Tue Apr 1 18:15:14 1997 Jim Wilson <wilson@cygnus.com>
138 * ppc-instructions: Change milhwu to mulhwu.
140 Wed Apr 2 15:38:08 1997 Doug Evans <dje@canuck.cygnus.com>
142 * sim_calls.c (sim_open): New arg `kind'.
144 Wed Apr 2 14:51:17 1997 Ian Lance Taylor <ian@cygnus.com>
146 * COPYING: Update FSF address.
148 Tue Mar 25 16:17:59 1997 Andrew Cagney <cagney@kremvax.cygnus.com>
150 * main.c (sim_io_read_stdin): Only compile unbuffered IO code if
151 all the required features are supported by the host OS.
153 Tue Mar 25 12:13:02 1997 Andrew Cagney <cagney@kremvax.cygnus.com>
155 * emul_bugapi.c (emul_bugapi_create): Guard against NULL images.
157 * configure.in (enable-sim-endain): Correct typo in usage (from
158 Erik Landry <landry@ENGR.ORST.EDU>).
159 * configure: Re-generate.
161 Fri Mar 14 18:23:02 1997 Andrew Cagney <cagney@kremvax.cygnus.com>
163 * Makefile.in (targ-vals.def): Re-do rule so that it works with
164 FreeBSD's make. Didn't like $<.
166 Thu Mar 13 12:55:48 1997 Doug Evans <dje@canuck.cygnus.com>
168 * sim_calls.c (sim_open): New SIM_DESC result. Argument is now
170 (other sim_*): New SIM_DESC argument.
172 Thu Feb 13 10:35:14 1997 Andrew Cagney <cagney@phydeaux.cygnus.com>
174 * ppc-opcode-simple-array, ppc-opcode-simple-goto,
175 ppc-opcode-simple-switch, ppc-opcode-complex-array,
176 ppc-opcode-complex-goto, ppc-opcode-complex-switch,
177 ppc-opcode-jump, ppc-opcode-goto, ppc-opcode-flat: Delete,
178 superseeded by --sim-decode-mechanism option.
180 * ppc-opcode-simple, dc-simple: Rename to be 8.3
181 * ppc-opcode-complex, dc-complex: Ditto.
182 * ppc-opcode-stupid, dc-stupid: Ditto.
183 * ppc-opcode-test-1, dc-test.01: Ditto.
184 * ppc-opcode-test-2, dc-test.02: Ditto.
186 * configure.in (--enable-sim-opcode): Change prefix to dc- instead
189 Wed Feb 12 19:33:45 1997 Andrew Cagney <cagney@phydeaux.cygnus.com>
191 * Many of the ppc-opcode-* files are identical baring the type of
192 lookup table. Instead of having multiple tables, igen can do this
193 via an additional option.
195 * ld-decode.h, ld-decode.c (force_decode_gen_type): New function,
196 allow the type of generated table specified in the decode file to
199 * ld-decode.c (load_decode_table): Allow the table type to be
202 * igen.c (main): Add -T <mechanism> option so that an overriding
203 instruction decode mechanism can be specified.
205 * configure.in: New option --sim-decode-mechanism to control
206 igen's new -T <mechanism> flag.
207 * Makefile.in (IGEN_FLAGS): Add IGEN_IDECODE_MECHANISM set by the
209 * configure: Regenerate.
211 Tue Feb 11 13:49:10 1997 Michael Meissner <meissner@tiktok.cygnus.com>
213 * events.c (event_queue_create): Don't use NULL to initialize an
215 (even_queue_{init,schedule_after_signal,tick}): Conditionalize use
216 of sigprocmask to appropriate autoconf test.
218 * main.c ({cntrl_c,main}): Use RETSIGTYPE for signal return type,
220 * sim_calls.c (sim_{ctrl_c,resume}): Ditto.
222 * Makefile.in (callback.o): Define HAVE_CONFIG_H, so callback.c
223 includes our config.h.
225 Tue Feb 4 13:42:59 1997 Doug Evans <dje@canuck.cygnus.com>
227 * configure.in: Fix typo in test for callback.c.
228 * configure: Regenerated.
230 Fri Feb 7 10:04:25 1997 Andrew Cagney <cagney@kremvax.tpgi.com.au>
232 * emul_chirp.c (emul_chirp_create): Handle a virtbase of -1 being
233 found in the device tree.
235 Wed Feb 5 10:56:27 1997 Andrew Cagney <cagney@kremvax.tpgi.com.au>
237 * Property create/initialization still wasn't correctly ordered.
238 Should be delaying everything related to ihandle creation until
239 after the rest of the tree has been established.
241 * device.c (device_find_ihandle_runtime_property): Update.
242 (device_add_ihandle_runtime_property): Update.
244 * tree.c (parse_ihandle_property): Delay lookup of the device to
245 be opened until the ihandle initialization phase.
246 * tree.c (print_properties): Update.
248 Wed Feb 5 10:56:27 1997 Andrew Cagney <cagney@kremvax.tpgi.com.au>
250 * gen-icache.c (print_icache_extraction): Add a reason parameter.
251 Augment each extracted field with a comment citing the codes
252 origin. Should simplify tracking down incorrect cache
255 Tue Feb 4 17:44:51 1997 Andrew Cagney <cagney@kremvax.tpgi.com.au>
257 * gen-icache.c: Generalize code handling XXX_is_NNN so that it
258 works for normal and boolean table entries.
260 * psim.c (psim_write_memory): last_cpu == -1 or nr_cpus is now
261 valid. Handle this just like *_{read,write}_register now handles
264 Mon Feb 3 17:18:16 1997 Andrew Cagney <cagney@kremvax.tpgi.com.au>
266 * events.c (insert_event_entry): Correct loop termination
269 Fri Jan 31 16:20:26 1997 Andrew Cagney <cagney@kremvax.tpgi.com.au>
271 * psim.c (psim_options): Add new option -c for max-iterations or
273 (psim_usage): Document.
274 (psim_max_iterations_exceeded): New function, abort simulation if
275 max iterations exceeded.
277 * gen-idecode.c: Re-work the table lookup code so that it assumes
278 that the entry is a leaf by default. Simplify the boolean table
279 entry code so that it involves a mask + test instead of shift +
282 * gen-idecode.c: Correct generated igen body so that it no drops
283 or doubles clock interrupts.
286 Thu Jan 30 11:23:20 1997 Andrew Cagney <cagney@kremvax.tpgi.com.au>
288 * Makefile.in (BUILT_SRC_WO_CONFIG): Change targ-vals.* to
291 * configure.in (sim_callback, sim_targ_vals): Set sim_targ_valls
292 if common callback is present.
294 Wed Jan 29 12:32:41 1997 Michael Meissner <meissner@tiktok.cygnus.com>
296 * configure.in (sim_callback): If the gdb is post 4.16, configure
297 callback support from the common directory.
298 * configure: Regenerate.
300 * Makefile.in (BUILT_SRC_WO_CONFIG): Add targ-vals.{h,def} and
302 (GDB_OBJ): Add callback support configured in.
303 (gentmap,targ-vals.def): Build from common directory.
304 (targ-vals.h,targ-map.c): Build by running gentmap.
305 (callback.o): Build from source in common directory.
306 (targ-map.o): Add dependency.
307 (clean): Remove gentmap.
309 Wed Jan 29 12:14:19 1997 Andrew Cagney <cagney@kremvax.tpgi.com.au>
311 * igen wasn't aborting if the opcode table contained no valid
314 * misc.c (name2i): Possibly abort if an invalid name is
316 * ld-decode.c: Abort if the table type isn't found.
318 Wed Jan 29 12:14:19 1997 Andrew Cagney <cagney@kremvax.tpgi.com.au>
320 * When performance monitoring is disabled, it is still possible to
321 determine the simulation speed by looking at the number of elapsed
322 ticks recorded by the event queue.
324 * psim.c (psim_write_register, psim_read_register): Force the cpu
325 to zero when it is either of `-1' or `nr_cpus'. In both cases the
326 next cpu would be zero any way.
328 * mon.c (mon_print_info): If possible, print the system cycle
329 performance. This is an indication of the number of instructions
332 Wed Jan 29 12:14:19 1997 Andrew Cagney <cagney@kremvax.tpgi.com.au>
334 * The code to allow an event queue to be updated during a signal
335 was missing. For main.c, a cntrl-c simulation termination wasn't
338 * The simulation would not correctly restart if an event requested
339 that the simulation be halted.
341 * psim.c (psim_options): Add hack to -i option to optionally
342 include a level vis -i2.
343 (psim_usage): Document.
345 * main.c (cntrl_c, cntrl_c_simulation): New functions. When a
346 cntrl-c occures schedule an event to halt the simulation.
347 (main): Catch CNTRL-C signals with the function cntrl_c.
349 * events.c (event_queue_process): Mask interrupts while
350 manipulating the async event queue.
351 (event_queue_init): Ditto.
352 (event_queue_schedule_after_signal): Ditto.
354 * events.c (event_queue_process): Mark the event queue as being in
355 the processing state when processing has started. Adjust code
356 so that it is tolerant of halts.
357 (event_queue_init): Start the event queue out with processing
359 (event_queue_tick): Check that processing isn't still being
362 * gen-idecode.c (print_run_until_stop_body): Call
363 event_queue_process_events to clear possibly pending events before
364 starting a simulation run. Re-arange main loop so that simulator
365 is correctly restarted when an event halts the simulation.
367 * psim.c (psim_halt): Handle an event halting the simulation.
368 * psim.c (psim_init): Adjust initial cpu - == -1 - to match
371 Wed Jan 29 12:14:19 1997 Andrew Cagney <cagney@kremvax.tpgi.com.au>
373 * ppc-opcode-complex: Correct typo - was expanding ORA instead of
374 RA. Based on instruction frequency stats, expand additional
376 * ppc-instructions: Change all `RA == 0' to RA_is_0.
378 * ppc-opcode-stupid: Move all but the basic table in -complex into
379 here. Update to new format.
381 * Makefile.in (tmp-defines): New target. Force defines.h to always
382 be built. Hence get ppc-opcode-goto to build.
384 Tue Jan 28 13:00:19 1997 Andrew Cagney <cagney@kremvax.tpgi.com.au>
386 * hw_com.c (hw_com_instance_read, hw_com_instance_write):
389 Thu Jan 23 09:07:26 1997 Andrew Cagney <cagney@kremvax.tpgi.com.au>
391 * hw_trace.c (hw_trace_init_data): Delete. The trace options need
392 to be initialized independant of the rest of the simulation
393 initalization. Otherwize a trace option explictly set from gdb
394 could be overridden by hw_trace.
396 * psim.c (psim_options): Clarify reason why the trace ioctl occures.
398 * FIXME: The trace code is too scattered - hw_trace.c, psim.c,
399 debug.c. It could be much simpler.
401 Thu Jan 23 09:07:26 1997 Andrew Cagney <cagney@kremvax.tpgi.com.au>
403 * Some devices support removable media. Add hooks to the disk
404 device so that it supports this.
406 * device.c (device_add_string_array_property,
407 device_find_string_array_property): New functions, manipulate
408 properties containing an array of strings.
409 (device_find_string_property): Allow a string array.
410 (device_init_static_properties): Update.
411 (device_init_runtime_properties): Update.
413 * hw_disk.c (hw_disk_ioctl): Add ioctl for changing the disk
414 media. If no file image is specified, use the next one in the
416 (hw_disk_init_address): Change the file property so that it is a
417 string array - use the first entry for the initial file image.
419 * tree.c (print_string_aray_property): New function - print a
421 (print_properties): Adjust.
422 (print_string): Write a string, handling double quotes.
424 * device.h: Define an ioctl to `change-media' with an optional new
427 * hw_disk.c: Allow floppy disk devices to be specified.
429 * psim.c (psim_command): New function, parse more complex psim
430 commands such as "change-media" and "trace".
431 * sim_calls.c (sim_do_command): Use.
433 Wed Jan 22 09:38:33 1997 Andrew Cagney <cagney@kremvax.tpgi.com.au>
435 * For expressions like (RA == 0) that are entered in to the cache
436 as RA_is_0. If possible generate the result of the expression so
437 that the compiler gets a better chance of eliminating dead
440 * gen-icache.c (print_icache_extraction): For a cache entry of
441 the form <name>_is_<const> where it is a boolean field, generate
442 the result of the expression instead of the expression its self.
443 (print_icache_body): Remove code that was looking for *_is_0 and
444 then generating corresponding definitions.
446 * gen-icache.c (print_icache_struct): If there is no cache, do not
447 output expressions in idecode.h file.
449 * gen-icache.c (print_icache_body): Output them here.
451 * ppc-opcode-complex: Clarify constant values for SPR==LR register
454 * ppc-cache-rules (RA_is_0, SPR_is_256): Two new cache entries.
456 Wed Jan 22 12:24:52 1997 Andrew Cagney <cagney@kremvax.tpgi.com.au>
458 * The code that put values in and extracted values from the cache
459 was too compilicated. The cache table did not allow values to be
460 computed from cache entries. #defines could only be used when a
461 cache was present, remove the restriction.
463 * ld-cache.h, ld-cache.c: Add a new cache entry type - SCRATCH. A
464 scratch variable is defined when a cache entry is beinf
465 filled. Change the definition of a COMPUTE variable to be defined
466 when the cache entry is being used.
467 * gen-icache.c: Update.
469 * ld-cache.h, ld-cache.c: Change field names so that their meaning
470 is more obvious. old_name->field_name, new_name->derived_name.
471 * gen-icache.c: Update
473 * gen-icache.h, gen-icache.c (print_icache_body): Make the three
474 different types of cache code - put into cache, extract from
475 cache, no cache - an explicit argument to print_icache_body.
476 * gen-icache.c (print_icache_extraction): Ditto.
478 * gen-semantics.c (print_c_semantic): Update use.
479 * gen-idecode.c (print_jump_insn): Update use.
480 * gen-icache.c (print_icache_function): Update use.
482 * igen.c (main): Change 'R' option so that it does not force the
485 * configure.in (enable-sim-icache): Clarify description. Make
486 #define one of the defaults regardless of the cache. Probably
487 should revamp and add a separate option.
489 Tue Jan 21 13:26:10 1997 Andrew Cagney <cagney@kremvax.tpgi.com.au>
491 * pk_disklabel.c (block_is_fdisk): Tidy up traces - use dos
493 (pk_disklabel_create_instance): Partition 1..4 are valid - not
495 (is_iso9660): New function, verify a CD9660 File system.
496 (pk_disklabel_create_instance): Start expanding so that active
497 partition selection is supported.
499 Mon Jan 20 11:20:15 1997 Andrew Cagney <cagney@kremvax.tpgi.com.au>
501 * The cap object was retaining a reference to the instance of a
502 device after it was deleted. Instead add and remove cap's from the
503 cap db as they are created and deleted. This ensuring that a
504 capibility is only used during the lifetime of the corresponding
507 * cap.h, cap.c: Correct cap type - was signed32 should be
510 * cap.c (cap_add, cap_remove): New methods for cap object that
511 allow the explicit addition and removal of internal objects that
514 * cap.c (cap_init): Rewrite. Verify that the only objects
515 remaining in the cap data base are those that were entered first.
516 Thse objects will be the permenant ones.
517 * device.c (device_init_address): Remember to initialize the cap
520 * device.c (device_create_instance_from): Explicitly add device
521 instances to the cap database. Simplify create code.
522 (device_instance_delete): Explicitly remove device instances from
525 * device.c (device_create_from): Explicitly add a device to the
528 * device.c (device_create_from): Always set the cap members.
530 * hw_disk.c: Output the instance when tracing.
532 Sun Jan 19 16:44:29 1997 Andrew Cagney <cagney@kremvax.tpgi.com.au>
534 * tree.c (split_device_specifier): Add support for aliases when
535 looking up a device. Now needs a device as an argument.
536 (split_property_specifier): Ditto.
538 Sun Jan 19 15:28:23 1997 Andrew Cagney <cagney@kremvax.tpgi.com.au>
540 * The memory "claim" and "release" methods take an address and
541 size as arguments. These may be multi cell values. Initially fix
542 the memory code so that they check/detect this. Leave the
543 adjustment of any clients to later.
545 * hw_memory.c (hw_memory_instance_claim,
546 hw_memory_instance_release): Handle multi-cell memory devices.
548 * hw_memory.c (hw_memory_instance_claim): Be tolerant towards the
549 release of memory regions that were not claimed.
551 Fri Jan 17 12:01:07 1997 Andrew Cagney <cagney@kremvax.tpgi.com.au>
553 * device.h, device.c (device_instance_call_method): Correct return
554 type - can return either 0 or -1, hence should be a signed type.
555 * device_table.h: Ditto.
557 * hw_memory.c (hw_memory_instance_claim,
558 hw_memory_instance_release): Update.
559 * hw_disk.c (hw_disk_max_transfer, hw_disk_block_size,
560 hw_disk_nr_blocks): Ditto.
562 Fri Jan 17 11:50:13 1997 Andrew Cagney <cagney@kremvax.tpgi.com.au>
564 * emul_chirp.c (chirp_emul_claim): Implement using the "claim"
565 method belonging to "/chosen/memory".
566 (chirm_emul_release): Ditto.
568 * Makefile.in (LIB_INLINE_SRC): Remove emul_* from list of files
569 that are inlined. These modules are called via a table and are
572 * hw_init.c (update_for_binary_section): Fix failure to allocate
573 memory used by the binary in real-mode executions. If "claim"
574 property is present, allocate memory from the "/chosen/memory"
577 * emul_chirp.c (emul_chirp_create): Specify that memory should be
578 claimed when loading a real image.
580 * hw_memory.c (hw_memory_instance_claim): Don't page align memory
583 * hw_memory.c (hw_memory_instance_release): Avoid infinite loop
584 when merging adjacent memory chunks.
586 Thu Jan 16 08:51:25 1997 Andrew Cagney <cagney@kremvax.tpgi.com.au>
588 * vm.h (vm_data_map_read_buffer, vm_data_map_write_buffer): Add
589 optional PROCESSOR & CIA args so that this routine also abort an
592 * vm_n.h (vm_data_map_read_N, vm_data_map_write_N): For a
593 miss-aligned access when a transfer fails abort.
595 * emul_bugapi.c (emul_bugapi_do_write): Use emul_read_buffer
596 instead of the vm_read_buffer.
597 * emul_netbsd.c (do_write): Ditto.
598 * emul_unix.c (do_unix_write): Ditto.
600 Wed Jan 15 14:38:25 1997 Andrew Cagney <cagney@kremvax.tpgi.com.au>
602 * configure.in (--enable-sim-jump): Default is NULL and not -E.
603 * configure: Regenerate.
605 * basics.h (__attribute__): Enable attributes if GCC >= 2.6.
606 (UNUSED): Only enable UNUSED if GCC >= 2.7.
608 * gen-icache.c (print_icache_extraction): Print UNUSED macro
609 instead of explicit __unused__ attribute.
610 (print_icache_body): Ditto.
611 * idecode_expression.h (FPSCR_BEGIN): Use UNUSED.
613 Wed Jan 15 13:54:50 1997 Andrew Cagney <cagney@kremvax.tpgi.com.au>
615 * cpu.h, cpu.c (cpu_synchronize_context): Add CIA argument as
618 * vm.c (vm_synchronize_context): Add PROCESSOR and CIA as
619 arguments so that there is a reference point for recovery.
620 (vm_synchronize_context): Pass processor+cia for errors.
621 (om_unpack_sr): Ditto.
622 (om_unpack_srs): Ditto.
623 * vm.c (vm_create): Review error messages.
625 * vm.c: Include "cpu.h" so that cpu_error is visible.
627 * ppc-instructions (Return From Interrupt): Pass CIA.
628 (Instruction Synchronize): Ditto.
629 * psim.c (psim_init): Ditto.
631 Wed Jan 15 12:25:11 1997 Andrew Cagney <cagney@kremvax.tpgi.com.au>
633 * cpu.h, cpu.c (cpu_error): Aborts simulation with error message,
634 but also saves current processor state.
636 * basics.h: Move #include <stdarg.h> to here from device_table.h.
638 * interrupts.c (perform_oea_interrupt): Use. No longer loose CIA
639 when simulation aborted.
640 (program_interrupt): Ditto.
641 (floating_point_unavailable_interrupt): Ditto.
642 (alignment_interrupt): Ditto.
643 (floating_point_assist_interrupt): Ditto.
644 (perform_oea_interrupt): Ditto.
645 (machine_check_interrupt): Ditto.
647 Tue Jan 14 12:19:10 1997 Andrew Cagney <cagney@kremvax.tpgi.com.au>
649 * ppc-instructions (Move from Special Purpose Register): Support
652 Mon Jan 13 16:58:12 1997 Andrew Cagney <cagney@kremvax.tpgi.com.au>
654 * debug.h, debug.c: Add "interrupts" trace option.
656 * interrupts.c (data_storage_interrupt): Add tracing.
657 (machine_check_interrupt): Ditto.
658 (instruction_storage_interrupt): Ditto.
659 (alignment_interrupt): Ditto.
660 (program_interrupt): Ditto.
661 (floating_point_unavailable_interrupt): Ditto.
662 (system_call_interrupt): Ditto.
663 (floating_point_assist_interrupt): Ditto.
664 (deliver_hardware_interrupt): Ditto.
666 * interrupts.c (program_interrupt): For UEA mode, halt the
667 processor - so that the current state is saved - instead of
669 (floating_point_unavailable_interrupt): Ditto.
670 (floating_point_assist_interrupt): Ditto.
672 Thu Jan 2 09:10:41 1997 Andrew Cagney <cagney@kremvax.tpgi.com.au>
674 * interrupts.c (perform_oea_interrupt): Halt rather than abort on
677 Wed Jan 1 22:54:52 1997 Andrew Cagney <cagney@kremvax.tpgi.com.au>
679 * ppc-instructions (Store Multiple Word, Load Multiple Word):
682 * tree.c (print_properties): For an array consider printing it out
685 * hw_memory.c (hw_memory_init_address): If an "available" property
686 is present, use that to initialize the available memory instead of
687 using the reg property.
689 * emul_generic.c (emul_add_tree_hardware): Add "available"
690 property to memory device.
692 Fri Dec 20 13:19:07 1996 Andrew Cagney <cagney@kremvax.tpgi.com.au>
694 * ppc-instructions (Rotate Left Word then AND with Mask): Enable.
696 * device.c (device_instance_call_method): Was only looking at the
699 * hw_disk.c (hw_disk_nr_blocks): Implement #blocks method.
700 (hw_disk_block_size): Implement block-size method.
701 (hw_disk_max_transfer): Implement max-transfer method.
703 * hw_phb.c (hw_phb_init_address): Reinit the rest of the PHB.
705 * emul_chirp.c (chirp_emul_instance_to_path): Recover from an
707 (chirp_emul_instance_to_package): Ditto.
708 (chirp_emul_method): Ditto.
709 (chirp_emul_read): Ditto.
710 (chirp_emul_write): Ditto.
711 (chirp_emul_close): Ditto.
712 (chirp_emul_seek): Ditto.
713 (chirp_emul_package_to_path): Ditto (for phandle).
714 (chirp_emul_package_to_path): Return the length.
716 * psim.c (psim_merge_device_file): Allow continuation lines.
718 Thu Dec 19 11:09:43 1996 Andrew Cagney <cagney@kremvax.tpgi.com.au>
720 * emul_chirp.c (chirp_emul_boot): Implement. Well report the new
723 * emul_chirp.c (chirp_emul_exit): Correct type of args struct
724 members - *_cell not host dependant int.
726 Wed Dec 18 17:49:59 1996 Andrew Cagney <cagney@kremvax.tpgi.com.au>
728 * interrupts.c (perform_oea_interrupt): Print additional
729 information if a double interrupt is encountered.
731 Wed Dec 18 17:49:59 1996 Andrew Cagney <cagney@kremvax.tpgi.com.au>
733 * psim.c (psim_merge_device_file): Tolerate an incorrect file-name
734 being specified with the -f option.
735 (psim_merge_device_file): Correct check for end of string.
737 Wed Dec 18 17:49:59 1996 Andrew Cagney <cagney@kremvax.tpgi.com.au>
739 * emul_chirp.c (chirp_emul_peer): Was falling off the end of the
740 list of devices. Return zero to the client instead.
741 * emul_chirp.c (chirp_emul_child): Ditto
742 * emul_chirp.c (chirp_emul_parent): Ditto
744 * device.c (device_root): Assert assumption about the device being
747 Tue Dec 17 15:12:38 1996 Andrew Cagney <cagney@kremvax.tpgi.com.au>
749 * emul_chirp.c (emul_chirp_create): Add description property to
750 each significant node in the device tree.
751 * emul_bugapi.c (emul_bugapi_create): Ditto.
753 Fri Dec 13 14:30:31 1996 Andrew Cagney <cagney@kremvax.tpgi.com.au>
755 * main.c (sim_io_read_stdin): For a single byte STDIO read, use a
756 tempoary two byte buffer. Single byte read with fgets will not
758 * main.c: Include errno.h.
759 (sim_io_read_stdin): For non-STDIO, make it work.
761 * emul_chirp.c (chirp_emul_read): Return the correct error status.
763 Fri Dec 13 14:30:31 1996 Andrew Cagney <cagney@kremvax.tpgi.com.au>
765 * std-config.h (WITH_STDIO): Don't hard-wire the STDIO mechanism.
766 Instead have each emulation default it to DO_USE_STDIO.
768 * emul_generic.c (emul_add_tree_options): Select the STDIO I/O
769 mechanism as the default if enabled or if nothing selected.
771 * sim_calls.c (sim_io_read_stdin): Passify GCC's desire for a
773 (sim_io_write_stdout): Ditto.
774 (sim_io_write_stderr): Ditto.
775 * main.c (sim_io_write_stdout): Ditto.
776 (sim_io_write_stderr): Ditto.
777 (sim_io_read_stdin): Ditto.
779 Tue Dec 10 10:31:48 1996 Michael Meissner <meissner@tiktok.cygnus.com>
781 * emul_chirp.c (emul_chirp_instruction_call): Make *printf calls
783 * vm.c (om_effective_to_virtual): Ditto.
784 * events.c (event_queue_schedule{,_after_signal}): Ditto.
785 (event_queue_{deschedule,process}): Ditto.
786 * hw_htab.c (htab_decode_hash_table): Ditto.
787 (htab_map_{page,binary}): Ditto.
788 * hw_opic.c (hw_opic_init_data): Ditto.
789 (handle_interrupt): Ditto.
790 (do_processor_init_register_{read,write}): Ditto.
791 (write_vector_priority_register): Ditto.
792 ({read,write}_destination_register): Ditto.
793 (do_suprious_vector_register_{read,write}): Ditto.
794 (do_current_task_priority_register_N_{read,write}): Ditto.
795 (do_timer_frequency_reporting_register_{read,write}): Ditto.
796 (do_timer_N_{current,base}_count_register_{read,write}): Ditto.
797 (do_ipi_N_dispatch_register_write): Ditto.
798 (do_vendor_identification_register_read): Ditto.
799 (do_feature_reporting_register_N_read): Ditto.
800 (do_global_configuration_register_N_{read,write}): Ditto.
801 * hw_phb.c (hw_phb_attach_address): Ditto.
802 (hw_phb_unit_decode): Ditto.
803 (hw_phb_address_to_attach_address): Ditto.
804 (hw_phb_io_{read,write}_buffer): Ditto.
805 * hw_ide.c (setup_fifo): Ditto.
807 * sim_calls.c ({defs,callback,remote-sim}.h): Find gdb include
808 files via -I<dir> instead of using "../../gdb/" prefixes.
810 Tue Dec 10 10:12:44 1996 Andrew Cagney <cagney@kremvax.tpgi.com.au>
812 * debug.h: Add tracing for the pal device.
815 * emul_chirp.c (chirp_emul_getprop): More tracing.
817 Tue Dec 10 10:12:44 1996 Andrew Cagney <cagney@kremvax.tpgi.com.au>
819 * device.h, device.c (device_find_ihandle_runtime_property): New
820 function. Reverse of add_ihandle_runtime property.
821 (device_init_runtime_properties): Use it.
823 * device.c (find_property_entry): New function returns the
824 internal property spec.
825 (device_set_property): Use.
826 (device_find_property): Use.
828 Tue Dec 10 10:12:44 1996 Andrew Cagney <cagney@kremvax.tpgi.com.au>
830 * psim.c (psim_merge_device_file): Strip newline from device
833 Tue Dec 10 10:12:44 1996 Andrew Cagney <cagney@kremvax.tpgi.com.au>
835 * hw_htab.c (htab_map_binary): For overlapping text / data maps
836 merge the two. Also check that the merge is safe.
838 * emul_chirp.c (emul_chirp_create): Add a description property to
839 the pte's so that they are easier to identify.
841 (emul_chirp_create): Don't specify a load address for the CHRP
842 image. Always use the values specified by the executable.
844 * hw_htab.c (htab_map_page): Abort if a duplicate map is
847 Mon Dec 9 12:08:46 1996 Andrew Cagney <cagney@kremvax.tpgi.com.au>
849 * hw_htab.c (htab_map_page): Formatting.
851 * emul_chirp.c (emul_chirp_instruction_call): Check for a NULL
852 method name when handling the client call. Also check for other
855 * emul_chirp.c (emul_chirp_create): Allow real-mode?, real-base,
858 Mon Dec 9 12:08:46 1996 Andrew Cagney <cagney@kremvax.tpgi.com.au>
860 * os_emul.c (os_emul_create): Use tree find property instead of
861 device find property - sigh.
863 Thu Dec 5 10:46:42 1996 Andrew Cagney <cagney@kremvax.tpgi.com.au>
865 * 961205: Release snapshot 961205.
867 Thu Dec 5 10:46:42 1996 Andrew Cagney <cagney@kremvax.tpgi.com.au>
869 * configure.in (hostbitsize, bitsize): Fix typo in error message -
870 cannot contain a comma.
871 (sim-warnings): Check for more potential errors.
873 * psim.c (psim_usage): Add -f <file> option. Specifies a file
874 containing device tree specifications that should be merged into
877 * configure.in: Sort options.
880 Wed Dec 4 13:57:31 1996 Andrew Cagney <cagney@kremvax.tpgi.com.au>
882 * psim.c (psim_usage): Add -n option - specify number of
885 * emul_chirp.c: Add description.
886 * emul_bugapi.c: Ditto.
887 * emul_unix.c: Ditto.
888 * emul_netbsd.c: Ditto.
890 Fri Nov 29 11:12:22 1996 Andrew Cagney <cagney@kremvax.tpgi.com.au>
892 * hw_pal.c (hw_pal_attach_address): New function, if an attach is
893 encountered, assume that it is the single disk.
894 * hw_pal.c: Add generic device/size decode methods.
896 * hw_nvram.c (hw_nvram_init_address): Use the first nonzero reg
897 property entry when determining the nvram size.
899 * hw_core.c: Add generic address/size decode methods.
901 * emul_chirp.c (emul_chirp_instruction_call): Return and trace
902 nonzero status from client functions.
904 * main.c (error): Always include a cariage return when writing out
907 Wed Nov 20 00:36:55 1996 Doug Evans <dje@canuck.cygnus.com>
909 * sim_calls.c (sim_resume): Reset sim_should_run if single
912 Thu Nov 28 13:19:46 1996 Andrew Cagney <cagney@kremvax.tpgi.com.au>
914 * emul_bugapi.c (emul_bugapi_do_diskio): Add support for multiple
917 * emul_generic.c (emul_add_tree_hardware): Drop the dummy eeprom.
918 Attach the pal - for I/O - as a pseudo device haning from the
921 * emul_bugapi.c (emul_bugapi_create): Add a small memory device to
922 the device tree at the address of the hi-mem interrupt vector
923 addreses. Used by bugapi to establish its trap instructions.
925 * debug.h: Add a new macro DITRACE for tracing device instances.
927 * debug.h: Extend the DTRACE macro so that it can also tests for
928 device specific tracint.
930 * device.h, device.c (device_trace): Add method to determine
931 device specific tracing.
932 (device_init_address): Set the devices tracing level.
934 Thu Nov 21 12:05:32 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
936 * tree.h, tree.c (tree_device): New files - separate out the
937 device parser and other tree operations from the device.
939 * inline.h, inline.c (INLINE_TREE): Add.
940 * device.h, device.c (device_tree_add_parsed): Delete.
941 * Makefile.in (tree.c): Add rules for new file.
942 * Makefile.in: Better order the emul_* files.
944 * emul_generic.c (emul_add_tree_hardware): Update.
945 * emul_netbsd.c (emul_netbsd_create): Update.
946 * emul_unix.c (emul_unix_create): Ditto.
947 * emul_chirp.c (emul_chirp_create): Ditto.
948 * emul_bugapi.c (emul_bugapi_create): Ditto.
949 * psim.c (psim_tree): Ditto.
952 * emul_generic.h: Include tree.h
953 * Makefile.in: Add to EMUL_GENERIC_H dependencies.
955 * device.h, device.c (device_root): New function - returns the
959 * device.h, device.c (device_clean): New function, clean up device
960 ready for next simulation run. This includes things like deleting
961 interrupt edges and properties created during the simulation and
962 also scrubbing any pre-defined properties.
963 * tree.c (tree_init): Use.
965 * device.h, device.c (device_init_static_properties): New
966 function. Initialize any static predefined properties. By static
967 we mean those that have values that can be determined before the
968 device tree initialization has started.
969 * tree.c (tree_init): Use.
971 * device.h, device.c (device_init_address): Add code to
972 check/verify the devices #address-cells and #size-cells.
973 (device_add_integer_property): Delete corresponding code.
974 (device_nr_address_cells, device_nr_data_cells): Check for
975 property when returning value.
977 * device.h, device.c (device_init_runtime_properties): New
978 function. Initialize those properties that are not `static'. At
979 present the only such property is the ihandle.
980 * tree.c (tree_init): Use.
982 * device.h, device.c (reg, ranges): Rework these so that they use
983 an array of the fundamental type - single reg or single range
986 * device.h, device.c (device_add_ihandle_runtime_property):
987 Re-implement the adding of an ihandle during tree construction so
988 that it better fits in with device initialization.
990 Thu Nov 21 12:05:32 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
992 * device.h, device.c (device_ioctl): Add additional argument -
993 request - so that the caller must always specify the type of
996 * device_table.h: Update.
997 * hw_trace.c (hw_trace_ioctl): Ditto.
998 * hw_vm.c (hw_vm_ioctl_callback): Ditto.
999 * hw_init.c (hw_stack_ioctl_callback): Ditto.
1000 * psim.c (psim_options): Ditto.
1002 Thu Nov 21 12:05:32 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
1004 * BUGS: Updated a bit.
1006 Wed Nov 20 14:06:37 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
1008 * hw_opic.c: Finish - third round.
1010 Wed Nov 20 12:02:08 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
1012 * hw_glue.c (hw_glue_io_read_buffer_callback): Fix miscalc of glue
1014 (hw_glue_io_write_buffer_callback): Ditto.
1016 Tue Nov 19 21:17:08 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
1018 * events.c (event_queue_process): Was incorrectly consuming future
1019 events on the queue when they should be left alone.
1021 * debug.h, debug.c (events): Add support for event queue tracing.
1022 * events.c: Add event tracing.
1024 * debug.h, debug.c: Order device trace options.
1026 Fri Nov 15 15:23:39 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1028 * pk_disklabel.c (pk_disklabel_create_instance): Fix up some
1029 warnings generated by GCC.
1031 Sun Nov 17 17:59:14 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
1033 * sim-endian.h: Add LE versions of byte swap macros. Needed for
1034 PCI devices which are little-endian.
1036 * sim-endian-n.h (endian_le2h_N, endian_h2le_N): Ditto
1038 Sun Nov 17 17:59:14 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
1040 * hw_iobus.c (hw_iobus_attach_address_callback): Change the iobus
1041 so that it is implementing a 1-1 address map.
1043 * emul_generic.c (emul_add_tree_hardware): Adjust.
1045 * emul_generic.c (emul_add_tree_hardware): Don't add the nvram as
1048 Sun Nov 17 17:59:14 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
1050 * device.c (split_find_device): Be tolerant of missing unit
1053 Fri Nov 15 16:49:49 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
1055 * basics.h (port_direction): New type, specify the direction of
1058 * device.h, device.c (device_interrupt_decode): Include
1059 specification of port direction in operations.
1060 (device_interrupt_encode): Ditto.
1062 * device_table.h: Add a direction field to the interrupt port
1065 * device.c (device_tree_add_parsed): Specify port direction.
1067 Thu Nov 14 21:38:13 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
1069 * hw_opic.c: Finish - second round.
1071 Thu Nov 7 00:18:59 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
1073 * hw_htab.c (htab_init_data_callback): Allow the virtual-address
1074 to be specified as an array which allows 64bit addresses.
1076 * device.c (device_find_integer_array_property): New function.
1077 Simplify the querying of elements of an integer array.
1078 (device_add_integer_property, device_find_integer_property):
1079 Update to correctly use the cell type.
1081 * vm.c (om_unpack_sr): Clarify shifting comment.
1082 (om_pte_0_masked_vsid): Ditto. Add 64bit version.
1084 * emul_chirp.c (emul_chirp_create): Initialize the segment
1087 * vm.c (om_effective_to_virtual): Trace segment register use.
1089 * hw_htab.c (htab_map_page): Print out the pteg base address to
1090 simplify cross checking between vm and the htab.
1091 (htab_decode_hash_table): Use device_error instead of error.
1092 (htab_map_page): Ditto.
1093 (htab_dma_binary): Ditto.
1094 (htab_map_binary): Ditto.
1095 (htab_init_data_callback): Ditto.
1097 Wed Nov 6 20:20:58 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
1099 * interrupts.h: Clarify what the optional instruction program
1100 interrupt is - a subset of illegal instruction program interrupt.
1102 * interrupts.c (program_interrupt): For UEA mode, clarify what an
1103 optional instruction program interrupt is.
1104 (program_interrupt): For OEA mode, as per spec, generate an
1105 illegal instruction program interrupt when an optional instruction
1108 * gen-semantics.c (print_semantic_body): Delete code
1109 differentiating between an unimplemented floating point and normal
1110 instruction. Instead, such a case can be handled explicitly.
1112 * ppc-instructions (store floating-point as integer word indexed):
1114 (Floating Convert to Integer Doubleword): Make the floating point
1115 assist interrupt explicit.
1116 (Floating Convert To Integer Doubleword with round towards Zero):
1118 (Floating Convert To Integer Word): Ditto
1119 (Move From FPSCR): Ditto.
1120 (Move to Condition Register from FPSCR): Ditto.
1121 (Move To FPSCR Fields): Ditto.
1122 (Move To FPSCR Field Immediate): Ditto.
1123 (Move To FPSCR Bit 0): Ditto.
1124 (Move To FPSCR Bit 1): Ditto.
1126 Mon Nov 4 12:49:13 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
1128 * corefile.c (core_map_read_buffer, core_map_write_buffer): Avoid
1129 breaking up transfers.
1131 * corefile.c: Adjust arguments so that the client server
1132 relationship is clarified.
1134 * hw_glue.c (hw_glue_init_address): Update so it can be attached
1137 * hw_disk.c (hw_disk_instance_write): Add more checks to disk IO -
1138 looking for things like overflow/underflow.
1140 Sun Nov 3 18:45:20 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
1142 * emul_generic.c (emul_add_tree_hardware): Hang the disk off the
1143 PAL device instead of the IOBUS. The disk must be attached to a
1146 * hw_disk.c (hw_disk_init_address): Just use the unit address
1147 directly in the attach - the rest isn't relevant.
1149 Sat Nov 2 21:48:57 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
1151 * configure.in (sim-hardware, sim-packages): Allow additional
1152 hardware and packages to be prefixed as well as appended.
1154 * Makefile.in (tmp-hw, tmp-pk): Retain the user specified order of
1155 packages when building them. Consequently, a user can override a
1156 standard device by prefixing their own version.
1158 * Makefile.in (hw_opic.o, hw_pci.o, hw_ide.o): Add dependencies.
1160 Fri Nov 1 14:42:57 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1162 * mon.c (_cpu_mon): Add fields for counting 1, 2, 4, and 8 byte
1164 (mon_{read,write}): Count 1, 2, 4, and 8 byte reads/writes.
1165 (mon_print_info): Correct typo regarding # of unaligned reads and
1166 writes. Print out how many 1, 2, 4, and 8 byte reads/writes there
1169 Tue Oct 29 17:55:43 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1171 * configure.in (AC_CHECK_FUNCS): Add access.
1172 * config{.in,ure}: Regenerate.
1174 * emul_unix.c (do_unix_nop): System call that always succeeds.
1175 (do_unix_access): Support access system call.
1176 (solaris_descriptors): Make sigaltstack and sigaction nops.
1177 ({solaris,linux}_descriptors): Add support for access.
1179 Tue, 8 Oct 18:42:26 1996 Jason Molenda <crash@cygnus.co.jp>
1181 * Makefile.in (clean): Move config.log to distclean.
1183 Fri Nov 1 16:44:28 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
1185 * corefile-n.h (core_map_write_N): Improve abort messages.
1187 * device.h, device.c (device_attach_address): Remove unused name
1189 (device_detach_address): Ditto.
1190 * device_table.h, device_table.c: Update.
1191 * hw_iobus.c (hw_iobus_attach_address_callback): Ditto.
1192 * hw_nvram.c (hw_nvram_init_address): Ditto.
1193 * hw_memory.c (hw_memory_init_address): Ditto.
1194 * hw_vm.c (hw_vm_init_address_callback): Ditto.
1195 (hw_vm_attach_address): Ditto.
1196 (hw_vm_add_space): Ditto.
1197 * hw_init.c (update_for_binary_section): Ditto.
1198 * hw_core.c (hw_core_attach_address_callback): Ditto.
1200 * hw_iobus.c (hw_iobus_attach_address_callback): Rewrite to handle
1201 configurable parent busses.
1203 Wed Oct 30 18:46:32 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
1205 * device_table.c (generic_device_size_to_attach_size): Provide
1206 limited support for multi-cell sizes.
1207 (generic_device_address_to_attach_address): Ditto for addresses.
1209 Tue Oct 29 02:01:29 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
1211 * device.c (device_add_integer_property): Check for setting of
1212 #address-cells and #size-cells properties. For these, update the
1213 corresponding device values.
1214 (device_nr_address_cells, device_nr_size_cells): Use the value
1215 from the device instead of the property.
1217 * hw_core.c: Use generic address and size conversions for the top
1220 * hw_memory.c (hw_memory_init_address): Tolerate case where
1221 #address and #size cells is greater than 1.
1223 * device.c (device_tree_print_device): Clean out printing of
1226 * device.c (split_device_specifier): Don't detect comments here -
1227 "#" can be a valid prefix - eg #size-cells.
1229 * psim.c (psim_merge_device_file): Suppress comments and blank
1232 * emul_generic.c (emul_add_tree_hardware): Fix typo of incorrect
1233 pal unit address. Add the property /#address-cells to the root of
1236 * device.c (device_template_create_device): Check that the unit
1237 address was successfully parsed.
1239 * device_table.c (generic_device_unit_decode): Rewrite to better
1240 handle multi-cell addresses.
1241 (generic_device_unit_encode): Ditto.
1243 * emul_generic.c (emul_add_tree_hardware): "reg" properties no
1244 longer need the explicit array type - the parser takes care of it.
1246 * pk_disklabel.c (pk_disklabel_create_instance): Add NULL return
1249 Mon Oct 28 22:55:48 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
1251 * hw_ide.c: New file. Model of a basic IDE interface attached to
1254 * configure.in (hardware): Add the ide device to the default
1256 * configure: Regenerate.
1258 * debug.h, debug.c: Add tracing option for the IDE device.
1260 Fri Oct 25 21:28:25 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
1262 * hw_phb.c, hw_phb.h: New files - implement a PHB.
1264 * configure.in (hardware): Add the phb to the list of devices to
1267 Fri Oct 25 21:28:25 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
1269 * hw_com.c: Review description.
1272 * hw_eeprom.c: Ditto.
1276 * hw_com.c: Update event handling.
1278 * hw_disk.c: Implement tracing.
1280 Fri Oct 25 21:28:25 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
1282 * device_table.c (generic_device_init_address): Use
1283 assigned-addresses property in preference to any other reg
1286 Fri Oct 25 21:28:25 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
1288 * device.h, device.c (device_find_ranges_property): New function.
1289 Simplify the manipulation of "ranges" properties.
1291 * device.c (device_add_parsed): Extend to include support for the
1294 * device.c (device_add_parsed): Add assigned-addresses to the list
1295 of reg type properties.
1297 * device.c (device_tree_print_device): Add code to format and
1298 print a ranges property.
1300 * device.h, device.c (device_nr_address_cells,
1301 device_nr_size_cells): New functions. Determine the values of the
1302 standard properties #address-cells and #size-cells. Both of which
1303 are optional and have default values of two and one respectfuly.
1304 Previously, code that determined #address-cells was incorrectly
1305 using a value of one.
1307 Fri Oct 25 21:28:25 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
1309 * debug.h, debug.c: Sort debug options, Add entries for the
1312 Fri Oct 18 12:12:21 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1314 * ppc-instructions (Floating Select): Add support for fsel unless
1315 model is 601. Allow user to filter out instruction unless -Fs is
1317 (Store Floating-Point as Integer Word Indexed): Raise optional
1318 instruction program abort. Allow user to filter out instruction
1319 unless -Fs is passed to igen.
1320 (Floating Square Root{, Single}): Ditto.
1321 (Floating Reciprocal Estimate Single): Ditto.
1322 (Floating Reciprocal Square Root Estimate): Ditto.
1324 * configure.in (--enable-sim-filter): If not passed, pass 32,f,s
1326 * configure: Regenerate.
1328 * interrupts.h (program_interrupt_reasons): Add
1329 optional_instruction_program_interrupt.
1331 * interrupts.c (program_interrupt): Call error with more detailed
1332 information on program interrupts, particularly in user mode. Add
1333 support for optional_instruction_program_interrupt.
1335 Wed Sep 25 10:20:29 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
1337 * hw_glue.c: New device. Hooks for manipulating interrupt ports.
1339 * debug.h, debug.c (trace_glue_device): Add tracing support for
1340 the interrupt glue logic device.
1342 * configure.in (hardware): Add glue device.
1343 * configure: Regenerate.
1345 Tue Sep 24 20:55:38 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
1347 * device.c (device_tree_parse_integer_property): New function,
1348 parse a list of integers as an array property.
1349 (device_tree_add_parsed): Call it.
1351 * device.c (device_tree_parse_string_property): New function,
1352 parse a list of strings as a string property (with embeded
1353 null's). For moment, don't try to implement a complext string
1355 (device_tree_add_parsed): Call it.
1357 Tue Sep 24 16:30:48 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
1359 * hw_opic.c: New file. OpenPIC interrupt controller.
1361 * configure.in (hardware): Add opic device.
1362 * configure: re-generate.
1364 * hw_pic.c: Delete, replaced with hw_opic.c.
1366 * debug.h, debug.c: Add debug option for OpenPIC device. -
1369 Tue Sep 24 16:30:48 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
1371 * Makefile.in (psim.o, idecode.o): Since idecode and not psim is
1372 now the file that does all the inlining.
1374 * Makefile.in (LIB_SRC, LIB_INLINE_SRC, idecode.o): Break out the
1375 library source code that could be involved in an inlining. Make
1376 idecode.o only dependant on the inlined library source code.
1378 * Makefile.in (LIB_OBJ): Put options last on the list so that it
1381 * std-config.h (DEVICE_INLINE): Only inline locals when the
1382 default is to inline.
1384 Mon Sep 23 00:37:49 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
1386 * hw_htab.c (htab_sum_binary): Determine the real-base for the
1389 * hw_htab.c (htab_map_binary): Depending on the value of the
1390 load-base, either map the program in as a contiguous section or as
1391 separate sections controled by th binaries lma values.
1392 (htab_init_data_callback): Ditto.
1394 Sun Sep 22 15:56:22 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
1396 * emul_generic.c (emul_add_tree_options): Remove load-base option.
1398 * emul_chirp.c (map_over_chirp_note): Add load_base field to note
1399 struct. Don't require the load_base field to be present - just
1400 issue warning - it is a recent addition.
1401 (emul_chirp_create): Support both virtual and physical modes.
1403 * emul_chirp.c (emul_chirp_create): Add a stack initialization
1404 property so that any arguments specified on the command line can
1405 be passed on to user programs.
1407 * hw_init.c (create_ppc_chirp_bootargs): Add support for chirp
1408 argument passing to the pseudo device stack.
1410 Sat Sep 21 19:39:56 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
1412 * device.c (device_error): Make it more tolerant to incomplete
1415 * hw_init.c (hw_data_init_data_callback): Extend the data device
1416 so that it can perform initialization operations either dma or a
1417 more complex instance open, seek, write operation.
1418 * hw_init.c: Update the description of the data device to reflect
1421 Sat Sep 21 00:13:02 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
1423 * device.c (device_event_queue_schedule,
1424 device_event_queue_deschedule, device_event_queue_time): Have the
1425 device object export the event operations. Making these available
1426 from the device object should hopefully simplify writing device
1429 Fri Sep 20 14:04:40 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
1431 * configure.in (sim-hardware): Add eeprom device to default build.
1433 * hw_eeprom.c: Rewrite so it works.
1435 * debug.h, debug.c: Add tracing support for the eeprom and com
1438 Thu Sep 19 14:40:40 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
1440 * debug.h: Add disklabel-package and disk-device trace options.
1441 debug.h (PTRACE): Add macro to simplify tracing in packages.
1443 Thu Sep 19 14:40:40 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
1445 * device.c (device_create_instance_from): Tighten up loop
1446 searching for device instances.
1447 (device_instance_delete): Ditto.
1448 (device_instance_delete): Only leaf instances need to be removed
1449 from a devices list of active instances.
1451 Thu Sep 19 14:40:40 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
1453 * hw_disk.c: Add the cdrom as an alias.
1455 * pk_disklabel.c (disklabel_delete): Implement, remembering to
1456 delete the raw disk instance while we're at it.
1458 * pk_disklabel.c (pk_disklabel_create_instance): Implement a
1459 little bit more - still a long way to go.
1461 * pk_disklabel.c (disklabel_write, disklabel_read): Remember the
1462 new head position after a read or write.
1464 Thu Sep 19 13:05:40 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
1466 * emul_chirp.c (chirp_emul_read): Allow reads to be longer then
1467 the internal buffer.
1469 Thu Sep 19 13:05:40 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
1471 * emul_chirp.c (chirp_read_t2h_args): Call memset-0 with the args
1472 in the correct order.
1474 * emul_chirp.c (chirp_emul_call_method): Correct computation for
1475 the address of the first stack argument passed in from the client
1478 Wed Sep 18 19:33:54 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
1480 * words.h: Add new types signed_cell and unsigned_cell which
1481 correspond to the signed and unsigned IEEE 1275 memory locations.
1482 * device.h, device.c, emul_chirp.c: Where refering to an IEEE 1275
1483 memory cell, replace uses of unsigned32 with unsigned_cell.
1484 * device_table.h: Ditto.
1486 * sim-endian.h: Add new macros H2BE_cell and BE2H_cell which
1487 convert cell sized values to from big endian.
1488 * device.c, emul_chirp.c: Where refering to IEEE 1275 memory cells
1489 use these new macros.
1491 Tue Sep 17 15:57:44 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
1493 * device.c (device_tree_add_parsed): Detect and report an
1494 interrupt being attached to an invalid device. Was dumping core.
1496 Mon Sep 16 23:09:12 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
1498 * device.h, device.c (device_address_to_attach_address,
1499 device_size_to_attach_size): New functions. Convert a devices
1500 unit address or unit size structure into a form suitable for
1501 passing on to the attach and detach functions.
1502 * device_table.h: Add extra methods to device table.
1504 * device.h, device.c (device_find_reg_property): New function.
1505 For a reg type property, return the selected address + size
1506 tupple, along with a positive success status. Add a reg_property
1507 to the list of property types.
1508 * (device_tree_add_parsed): Make array properties with the name
1509 reg or alternate-reg of type reg_property.
1511 * hw_memory.c (hw_memory_init_address): Rewrite to use new
1512 find_reg_property method.
1513 * hw_nvram.c (hw_nvram_init_address): Ditto.
1515 * device.c (device_tree_print_device): Add code to print out a reg
1518 * device_table.c (generic_device_address_to_attach_address,
1519 generic_device_size_to_attach_size ): New functions. Generic
1520 functions for converting between unit and attach address or size.
1522 * device_table.c (generic_device_init_address): Rewrite to use the
1523 new find_reg and address convert functions. Look for both reg and
1524 alternate-reg properties.
1526 Mon Sep 16 23:09:12 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
1528 * hw_com.c: New file. A '550 serial device that can quickly be
1529 attached to any bus.
1530 * configure.in (enable-sim-hardware): Add the com device.
1531 * configure: re-generate.
1533 Thu Sep 12 17:30:56 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
1535 * device.c (device_tree_verify_reg_unit_address): New
1536 function. Check that the unit address as specified by the reg
1537 property correctly corresponds to any unit address previously
1538 specified by the devices name.
1539 (device_tree_add_parsed): When adding a reg property, verify
1540 that the unit-address - first value of property - correctly
1541 matches any previous value specified when creating the device
1544 Thu Sep 12 17:30:56 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
1546 * mon.c (mon_event): Remove assertion that an unsigned is >= 0.
1548 Fri Aug 16 12:05:24 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1550 * device.c (device_full_name): Cast strdup to char *, since AIX
1551 3.2.5 mistakenly declares the function to be const char *.
1552 (device_create_from): Ditto.
1553 (device_create_instance_from): Ditto.
1554 (device_add_property): Ditto.
1556 Tue Aug 13 11:40:14 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1558 * debug.c (trace_option): For -t all, do not set the
1559 trace_dump_device_tree flag, so that the simulator is run.
1561 Tue Aug 13 11:40:14 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1563 * Makefile.in (options.o): Depend on defines.h.
1564 (defines.h): New rule, go through config.h and make strings of all
1565 of the #define HAVE_xxx macros.
1566 (distclean): Remove defines.h.
1568 * options.c (print_options): Print whether many of the
1569 configuration macros are defined.
1571 * main.c (main): If -t options and no filename, just print the
1572 options, and don't print the usage message.
1574 Mon Aug 12 18:42:37 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1576 * configure.in: Test whether /dev/zero works on the system, and if
1577 it does, define HAVE_DEVZERO.
1578 * configure: Regenerate.
1580 * emul_generic.c (emul_add_tree_hardware): Do not add /iobus/disk
1581 if we don't have a working /dev/zero on the system.
1583 * emul_bugapi.c (emul_bugapi_init): If HAVE_DEVZERO is not
1584 defined, don't add disk support.
1585 (emul_bugapi_do_diskio): Ditto.
1586 (emul_bugapi_instruction_call): Ditto.
1588 Wed Aug 7 14:34:20 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1590 * emul_unix.c (HAVE_TCGETATTR): If HAVE_TERMIOS_STRUCTURE is not
1591 defined, make sure HAVE_TCGETATTR is #undef'ed
1593 Wed Aug 7 14:34:20 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1595 * std-config.h (REGPARM): Only define REGPARM attributes if using
1596 GNU C. Test for __i686__ in case GCC ever defines it. If not on
1597 a x86 platform, define REGPARM as nothing.
1599 * sim-endian.h (WITH_HOST_BYTE_ORDER): Test for i686 and __i686__
1602 Wed Aug 7 20:19:55 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
1604 * ld-decode.h, ld-decode.c: Rename goto_gen to the more correct
1606 * gen-idecode.c: Ditto.
1608 * gen-idecode.c (print_idecode_table): Comment out check for
1609 switch/table combination until a bug with it is fixed.
1611 * ppc-opcode-goto: New file. Like complex and flat but uses
1612 goto-switch instead of padded-switch for the tables.
1614 * gen-idecode.c (print_goto_switch_name): New function.
1615 (print_goto_switch_table_leaf): New function.
1616 (print_goto_switch_break): New function.
1617 (print_goto_switch_table): New function. Prints a jump table
1618 that can be jumped into instead of a switch statement.
1620 * gen-idecode.c (*switch_*): As an option output a switch that is
1621 implemented using a jump table but only if the switch is not
1624 Tue Aug 6 09:28:22 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1626 * configure.in (--enable-sim-{hardware,packages}): Fix typos.
1627 * configure: Regenerate.
1629 * device.c (device_instance_call_method): Fixup format message in
1630 error case. Return 0 in case of error to shut up compiler
1633 Wed Aug 7 00:17:37 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
1635 * device_table.c (generic_device_unit_decode): Require a comma
1636 between elements of a unit address.
1638 * device.c (device_tree_print_device): For reg, alternate-reg and
1639 ranges properties use special print functions.
1640 (device_print_ranges_property): Print formatted ranges property.
1641 (device_print_reg_property): Print formatted reg property.
1643 Tue Aug 6 21:35:18 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
1645 * device.c (device_tree_add_parsed): For reg, ranges and
1646 alternate-reg properties use a special parser.
1647 (device_tree_parse_reg_property): New function to parse a reg
1649 (device_tree_parse_ranges_property): New function to parse a
1651 (device_encode_unit): Wrapper for encode_unit callback.
1652 (device_decoce_unit): Wrapper for decode_unit callback.
1654 Wed Jul 31 00:02:30 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
1656 * device_table.h (device_instance_callbacks): Relace the claim and
1657 release methods with a more general table mapping from method-name
1660 * device.c (device_instance_call_method): New function. Implement
1661 the OpenBoot call-method client interface. Attempts to locate the
1662 instances method in the callback table.
1663 (device_instance_claim, device_instance_release): Delete.
1664 Replaced with call-method and a lookup table.
1666 * emul_chirp.c (chirp_emul_call_method): Use the new device
1667 instance call method and let that handle a client claim call.
1669 * hw_htab.c (claim_memory): Wrapper function to call the memory
1670 devices "claim" method using the new device-instance call-method
1671 interface. Replaces the previous direct calls to claim.
1672 (htab_map_region): Use claim_memory.
1673 (htab_init_data_callback): Ditto.
1675 * hw_memory.c (hw_memory_instance_claim): Update function
1676 interface so that it is compatible with call-method.
1677 (hw_memory_instance_release): Ditto.
1678 (hw_memory_instance_methods): New table of memory specific
1679 methods claim and release. Add to the hw_memory_callback
1682 Tue Jul 30 21:26:14 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
1684 * psim.c (psim_init): Back out of change to initial value of
1687 Tue Jul 30 21:12:24 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
1689 * sim_callbacks.h (sim_io_printf_filtered): Replace
1690 printf_filtered with a local simulator specific version. Add
1691 #define printf_filtered to simplify updating of existing code.
1693 * sim_callbacks.h (sim_io_write_stdout, sim_io_read_stdin,
1694 sim_io_write_stderr): New functions. Read / write to the
1695 simulations stdin and stdout and stderr interfaces. Merge in code
1696 from hw_pal that previously handled async I/O.
1697 (sim_io_flush_stdoutput): Rename flush_stdoutput. Add #define
1698 flush_stdoutput to simplify updating of existing code.
1700 * hw_pal.c (scan_hw_pal, write_hw_pal,
1701 hw_pal_instance_write_callback): Use the new sim_io functions.
1703 * main.c: Implement standalone versions of the new sim_io
1704 functions. Include support for async I/O.
1705 * sim_calls.c: Ditto. This time using the gdb callback table.
1707 * std-config.h (CURRENT_STDIO, current_stdio): New macro. Set up
1708 stdio configuration so that it works in the same way as the rest
1710 * psim.c (psim_create): Initialize current_stdio from the device
1712 * emul_generic.c (emul_add_tree_options): Enter a default value
1713 for use-stdio in the device tree.
1715 Fri Jul 26 19:43:03 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
1717 * gen-idecode.c (print_jump): Was always generating a jump back to
1718 idecode. Only necessary at tail of semantic code.
1719 (print_jump): Was always setting the processor's cia, even during
1720 startup when the processor was still undefined.
1721 (print_jump): For safety, restart smp loop when cpu_nr >= nr_cpus,
1724 * options.c (print_options): Add printing of WITH_REGPARM and
1727 * std-config.h (WITH_REGPARM, WITH_STDCALL): Provide default
1728 (disabled) values if not defined.
1730 Fri Jul 26 00:36:35 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
1732 * ppc-cache-rules (cache): Change RS and RB to cache instead of
1733 compute. The block move instructions use them.
1735 * idecode_expression.h (FPSCR_SET): New macro, set specific FPSCR
1737 (CR_FIELD): New macro, extract specific CR register.
1738 (FPSCR_FIELD): New macro, extract specific FPSCR register.
1740 * registers.h (GPR): New macro, simplify accesses to GPR[i].
1742 * bits.c (INSERTED): Covert INSERTED macro into a function.
1743 (EXTRACTED): Conditionally compile on correct bit size macro.
1745 * bits.h (BIT8): New macro, set a single bit in an 8 bit byte.
1747 * ppc-instructions: With hints from Paul Martin, type in missing
1748 some instruction semantics. Leave disabled for the moment.
1749 (Load Multiple Word): Ditto.
1750 (Store Multiple Word): Ditto.
1751 (Load String Word Immediate): Ditto.
1752 (Load String Word Indexed): Ditto.
1753 (Store String Word Immedate): Ditto.
1754 (Store String Word Indexed): Ditto.
1755 (Move to Condition Register from XER): Ditto.
1756 (Move From Condition Register): Ditto.
1757 (Move From FPSCR): Ditto.
1758 (Move to Condition Register from FPSCR): Ditto.
1759 (Move To FPSCR Field Immediate): Ditto.
1760 (Move To FPSCR Fields): Ditto.
1761 (Move To FPSCR Bit 0): Ditto.
1762 (Move To FPSCR Bit 1): Ditto.
1764 Thu Jul 25 22:10:40 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
1766 * std-config.h (SEMANTICS_INLINE): By default, mask out the
1767 inlining of semantic functions from DEFAULT_INLINE. Almost all
1768 configurations call the semantic code via a pointer so there is
1771 * std-config.h (ICACHE_INLINE): Ditto.
1773 Thu Jul 25 20:07:30 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
1775 * configure.in (sim_regparm): Add configuration option for
1776 enabling GCC's regparm attribute.
1777 * (sim_stdcall): Add configuration option for enabling GCC's
1780 * Makefile.in (REGPARM_CFLAGS): Pass regparam configuration onto
1782 * (STDCALL_CFLAGS): Pass stdcall configuration onto compilations.
1784 * std-config.h (REGPARM): Extend construction of REGPARM macro so
1785 that it can include __stdcall__ function attribute.
1787 Wed Jul 24 19:04:20 1996 Andrew Cagney <cagney@sawnoff>
1789 * options.c (print_options): Include SUPPORT_INLINE in information
1792 * gen-idecode.c (print_run_until_stop_body): Only generate loop
1793 termination test if creating idecode_run_until_stop. Push the
1794 loop termination test back into each alternative branch.
1796 Wed Jul 24 15:47:09 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
1798 * gen-icache.c (print_icache_function): Have the cache function
1799 always update the cache_entries semantic and address fields.
1801 * gen-idecode.c (print_idecode_switch_illegal): Include a break
1802 when generating illegal instructions. This was commented out
1803 which is a hangover from looking a at switch statements generated
1804 using indirect jumps.
1806 Tue Jul 23 20:57:01 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
1808 * igen.c (print_my_defines): Replaces print_define_my_index.
1809 Print both a definition for MY_INDEX and MY_PREFIX.
1810 * gen-icache.c (print_icache_function): Adjust.
1811 * gen-idecode.c (print_jump_insn): Adjust.
1812 * gen-semantics.c (print_c_semantic): Adjust.
1814 * gen-support.c (gen_support_h): Add optional include to created
1815 support.h so that, like cpu, it is optionally inlined for all
1816 modules that include it.
1817 * inline.h, inline.c: Adjust so that support.[hc] is handled the
1820 * idecode_fields.h (LABEL, GOTO): Macro's that create a unique
1821 name for a lable and then branch to it.
1823 * ppc-instructions (convert_to_integer, Floating Round to
1824 Single-Precision, Floating Convert from Integer Doubleword): Use
1825 LABEL and GOTO instead of the recently added switch statements.
1827 Wed Jul 24 14:02:42 1996 Andrew Cagney <cagney@sawnoff.highland.com.au>
1829 * gen-idecode.c (print_run_until_stop_body): Too many rparen in
1832 Tue Jul 23 20:57:01 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
1834 * configure.in (--enable-sim-line-nr): Typo - sim_line-nr.
1835 * (--enable-sim-inline): Reorder patern matching of arguments so
1836 that SUPPORT=ALL_INLINE is reconized as *=* and not *_INLINE.
1838 * configure: rebuild.
1840 Mon Jul 22 23:25:08 1996 Andrew Cagney <cagney@highland.com.au>
1842 * configure.in (--enable-sim-hardware, --enable-sim-packages): New
1843 configuration options. Let the user specify the packages or
1844 hardware devices that are to be included in the build. Makes it
1845 possible for user packages to be specified.
1847 * Makefile.in (tmp-pk, tmp-hw): Just use the list of packages and
1848 hardware instead of checking it using ls. configure.in should
1849 have taken care of any problems.
1850 (HW_SRC, HW_OBJ, PACKAGE_SRC, PACKAGE_OBJ): Set by configure.
1852 Mon Jul 22 22:38:59 1996 Andrew Cagney <cagney@highland.com.au>
1854 * psim.c (psim_options): Enter the argument to the memory size
1855 option directly into the device tree. Was using atol() which is
1856 dangerously non portable.
1858 Mon Jul 22 22:17:08 1996 Andrew Cagney <cagney@highland.com.au>
1860 * configure.in (icache): Extend icache flag to include an insn
1861 option. If specifyed the insn - aka instruction - is included in
1862 the instruction cache. Make this the default.
1863 * configure: re-generate.
1865 * igen.c (main), igen.h: Add option -S - inSn - for specifying
1866 that the instruction should be included in the icache.
1868 * gen-icache.c (print_icache_body): If enabled, output code to put
1869 the instruction into the icache.
1870 (print_icache_struct): If enabled, add insn to the icache struct.
1872 Mon Jul 22 20:46:12 1996 Andrew Cagney <cagney@highland.com.au>
1874 * Makefile.in (BUILD_CFLAGS): Include -g when building the
1877 Mon Jul 22 20:00:25 1996 Andrew Cagney <cagney@highland.com.au>
1879 * emul_generic.c (emul_add_tree_options): Was incorrectly setting
1880 the strict-alignment option when hardwired for non-strict
1883 Sun Jul 21 21:18:05 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
1885 * gen-semantics.c: Make the my_index variable a macro MY_INDEX.
1887 * ppc-instructions: Adjust so that references are to MY_INDEX and
1890 Sun Jul 21 21:18:05 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
1892 * gen-idecode.c: Output the complete run_until_stop function
1893 instead of just the code to handle a single instruction issue.
1894 * : Have the generated idecode.c include inline.c (instead of psim.c).
1896 * std-config.h: Change psim.c so that it isn't inlined (as this is
1899 * psim.c (run_until_stop): Delete the old run_until_stop function
1900 instead calling the idecode_run and idecode_run_until_stop
1901 functions that gen-idecode.c is now creating.
1903 Sun Jul 21 21:18:05 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
1905 * dgen.c: Maintenance - update to use new features found in lf.c.
1907 * filter_filename.c (filter_filename): Maintenance - make the
1910 Sun Jul 21 21:18:05 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
1912 * debug.c (TRACE, ITRACE, DTRACE): Have GCC instead of CPP
1913 eliminate trace statements.
1915 * debug.c: Change trace format so that it is consistent
1916 (file:line-nr) with CC's error output.
1918 * gen-itable.c (itable_c_insn): Add the source file name and
1919 source line number to the instruction's informational entry.
1921 * debug.c (ITRACE): Use the itable (and my_index) to get the
1922 current instructions name and source line number.
1924 * gen-semantics.c, gen-icache.c: Adjust generated ITRACE calls to
1925 match new interface.
1927 * emul_bugapi.c (emul_bugapi_instruction_call): Adjust
1928 corresponding call to ITRACE so that it still matches.
1930 * idecode_expression.h (ALU_END, CR0_COMPARE): Use TRACE instead
1931 of ITRACE. The CPP line directives would have previously set the
1932 line-nr and file name so ITRACE isn't needed.
1934 Sun Jul 21 21:18:05 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
1936 * gen-idecode.c (print_jump_until_stop_body): New function and
1937 idecode generation option. Instead of generating and calling
1938 separate functions containing the semantic and icache code
1939 generate a single monolythic function and use goto's (and GCC's
1940 indirect jump) to move between code blocks.
1942 * Makefile.in: Add sim_jump flag to those passed to igen.
1944 * configure.in: New option --enable-sim-jump (default disabled)
1946 * ppc-instructions: Eliminate any uses of labels and goto's.
1947 These result in duplicate declarations when a single flat function
1950 * ppc-opcode-jump: New file. Set of opcode rules useful when
1951 testing jumping idecodes.
1953 Sun Jul 21 21:18:05 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
1955 * gen-idecode.c: Optionally include the semantic code for an
1956 instruction in the function that is doing the decoding.
1958 * igen.c: Add option (-C) to generate semantics in the instruction
1961 * configure.in (--enable-sim-icache): Accept an option list such
1962 as 1024,define. Add a new choice to the list - semantic - which
1963 will cause igen to generate instruction decode functions that
1964 include the corresponding semantic code.
1966 Sun Jul 21 21:18:05 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
1968 * configure.in: New option --enable-sim-line-nr (default enabled).
1969 Enable/disable the inclusion of CPP line directives in the
1970 generated files. Such directives refer back to the source files
1971 used when generating the simulator code.
1973 * Makefile.in (sim_line_nr): Pass to igen.
1975 Sun Jul 21 21:18:05 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
1977 * igen.c (main): Revamp the options so that more letters are
1980 * configure.in: Adjust to match igen's revamped options
1982 Sun Jul 21 21:18:05 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
1984 * Makefile.in (pk.h, hw.h): Rewrite depenencies for hw.h (etc) so
1985 that they use the same technique as igen (ie a dummy targets
1986 tmp-pk and tmp-hw are created).
1988 Mon Jun 24 22:28:00 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
1990 * Makefile.in (BUILD_CFLAGS): Include WARNING_CFLAGS.
1992 Wed Jun 19 21:45:28 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
1994 * ld-cache.[hc], ld-decode.[hc], ld-insn.[hc]: New files. Separate
1995 out the loading of each of the tables from the rest of igen.
1996 * Makefile.in: Adjust.
1999 * gen-icache.[hc], gen-idecode.[hc], gen-itable.[hc],
2000 gen-model.[hc], gen-semantics.[hc]: New files. Separate out the
2001 code creating each separate set of generated files.
2002 * Makefile.in: Adjust.
2005 * gen-support.[ch]: New files. Output the support functions (found
2006 in the ppc-instructions file) into a separate file.
2008 * inline.h, inline.c: Add.
2009 * std-config.h: Add.
2011 * ld-cache.c: Re-design the cache table format.
2012 * ppc-cache-rules: Update to new format.
2014 * ld-decode.c: Re-design the decode table format.
2015 * ppc-opcode-simple: Update to new format
2016 * ppc-opcode-complex: Ditto
2017 * ppc-opcode-flat: Ditto
2019 * filter.h, filter.c: New files. Separate the opcode filter table
2020 reading code from the rest of igen.c. Re-design the filter so that
2021 it works inclusivly not exclusivly.
2022 * igen.c: Remove the opcode filter table loading code.
2023 * Makefile.in (filter.o): Adjust
2024 * configure.in: Adjust filter flag so that default includes 32bit
2026 * ppc-instructions: Clean up filter fields so that only in use
2027 entries are specifed (ie delete `be').
2029 * misc.c (name2i, i2name): New function. Map between a string and
2032 Mon Jun 17 20:08:03 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
2034 * sim_calls.c (sim_close): If simulator not created, skip printing
2037 Mon Jun 17 20:08:03 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
2039 * registers.c (register_description): Typo, insns not insn.
2041 * ppc-instructions (model_get_number_of_stalls): New model function,
2042 returns number of stalls for the specified processor.
2043 * psim.c (psim_read_register): Add call to new function
2044 model_get_number_of_stalls().
2046 * ppc-instructions (model_get_number_of_cycles): New model function,
2047 returns number of stalls for the specified processor.
2048 * psim.c (psim_read_register): Add call to new function
2049 model_get_number_of_cycles().
2051 Fri Jun 14 00:11:56 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
2053 * device_table.h: Don't pass the parent device into a devices
2054 create function. This makes the create function consistent with
2056 * device.c (device_template_create_device): Ditto
2057 * hw_pal.c (hw_pal_create): Ditto
2058 * hw_core.c (hw_core_create): Ditto
2059 * hw_vm.c (hw_vm_create): Ditto
2060 * hw_disk.c (hw_disk_create): Ditto
2061 * hw_nvram.c (hw_nvram_create): Ditto
2062 * hw_memory.c (hw_memory_create): Ditto
2063 * hw_cpu.c (hw_cpu_create): Ditto.
2065 * device.c (split_find_device): Allow a null initial parent device.
2066 (device_template_create_device): Ditto.
2068 * device.c (device_create_from): Make local (static) only used
2070 * device_table.h: typedef device_callbacks moved here (from
2071 device.h) where it belongs.
2073 * hw_core.c: New file. Implements just the core device using the
2076 * corefile.c: Moved all core device functions into the new
2077 hw_core.c file. core_device_create() disapears.
2079 * psim.c (psim_tree): Use device_tree_add_parsed() to create the
2082 Thu Jun 13 00:09:29 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
2084 * hw_init.c: Correct typo in comment.
2086 * corefile.c (core_init): Remove any remaining references to a
2088 (core_map_find_mapping): Ditto.
2090 Wed Jun 12 22:30:32 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
2092 * corefile.c (core_init): Make function global so that other
2093 devices are able to use the full core object.
2095 * corefile.c (core_create, core_from_device): Break core_create
2096 into two functions. The first creates a core object, the second
2097 returns the core object associated with a core device.
2099 * corefile.c (core_device_create): Use core_create to make the
2102 * psim.c (psim_create): Use core_from_device() instead of
2105 * device.c (device_template_create_device): Make static as only
2106 needed by functions internal to device.c.
2108 Fri Jun 7 23:47:18 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
2110 * ppc-opcode-test-2: Remove description of fields.
2111 * ppc-opcode-complex: Ditto
2112 * ppc-opcode-flat: Ditto
2113 * ppc-opcode-simple: Ditto
2114 * ppc-opcode-stupid: Ditto
2115 * ppc-opcode-test-1: Ditto
2116 * ppc-cache-rules: Ditto
2118 * igen.c: Add description of files as a comment at the front.
2120 Wed Jun 26 12:50:33 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2122 * configure.in: Check for whether the termios and termio
2123 structures are really defined, and whether or not, they define the
2125 * configure: Regenerate.
2127 * Makefile.in ({,TERMIO_}CFLAGS): Add TERMIO_CFLAGS options set by
2130 * emul_unix.c: Various changes to allow for building on systems
2131 with different termio and termios structures. If host has both
2132 termio and termios, just use termios. No longer include
2135 Wed Jun 26 12:26:55 1996 Jason Molenda (crash@godzilla.cygnus.co.jp)
2137 * Makefile.in (bindir, libdir, datadir, mandir, infodir, includedir,
2138 INSTALL_PROGRAM, INSTALL_DATA): Use autoconf-set values.
2140 * configure.in (AC_PREREQ): autoconf 2.5 or higher.
2141 (AC_PROG_INSTALL): Added.
2142 * configure: Rebuilt.
2144 Wed Jun 5 23:53:42 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
2146 * corefile.h: Rewrite documentation so that it can be extracted and
2147 converted into texinfo (and hence ready for translation into html,
2151 Thu Jun 6 09:52:37 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2153 * hw_disk.c (SEEK_SET): If SEEK_SET is not defined, define as 0.
2155 Wed Jun 5 11:46:52 1996 Andrew Cagney <cagney@puddin>
2157 * hw_disk.c: Include <unistd.h> if available. Under SunOS, that
2158 is the source of SEEK_SET.
2160 Wed Jun 5 01:39:07 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
2162 * psim.c (psim_options): Correct type of dummy arguments being
2163 passed to a device_ioctl call.
2165 * hw_init.c (hw_data_init_data_callback): Adjust printf arguments.
2166 (write_stack_arguments): Ditto.
2167 * hw_trace.c: Instance callback entry no longer a table.
2169 Wed Jun 5 01:39:07 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
2171 * emul_unix.c (do_unix_umask): Cast printf argument.
2172 (convert_to_linux_termios): Use LINUX_VSWTC not LINUX_VSWCH
2174 Mon Jun 3 15:02:04 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2176 * hw_init.c (update_for_binary_section): Abort if we find an
2177 .interp section, which indicates the need for shared libraries to
2180 Mon Jun 3 15:02:04 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2182 * emul_unix.c (do_unix_{time,gettimeofday,getrusage}): Add support
2183 for time, gettimeofday, and getrusage system calls.
2184 ({solaris,linux}_descriptors): Add new system calls.
2185 (do_get{,e}{uid,gid}): Use gid_t/uid_t types.
2186 (do_get{,p}pid): Use pic_t types.
2188 * configure.in (AC_TYPE_{GETGROUPS,SIGNAL}): Define.
2189 (AC_TYPE_{MODE,OFF,PID,SIZE,UID}_T): Define.
2190 * config{.in,ure}: Regenerate.
2192 Mon Jun 3 23:19:57 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
2194 * emul_netbsd.c (emul_netbsd_create): Use the more specific names
2195 `ppc-elf' and `ppc-xcoff' for the stack-type.
2196 * emul_unix.c (emul_unix_create): Ditto.
2197 * emul_bugapi.c (emul_bugapi_create): Ditto.
2198 * hw_init.c: Reconize the new names.
2200 * emul_unix.c (do_unix_break): Adjust so that the updated ioctl
2201 call is used (no system parameter).
2203 Sun Jun 2 11:21:17 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2205 * emul_unix.{h,c}: New files to provide Solaris and Linux system
2208 * Makefile.in (LIB_{SRC,OBJ}): Add emul_unix.{c,o}.
2209 (os_emul.o): Depend on emul_unix.h.
2210 (emul_unix.o): New dependency.
2212 * configure.in (--enable-sim-alignment): Add 0|default to mean set
2213 alignment to 0, which means use appropriate alignment for mode.
2214 (AC_CHECK_FUNCS): Add new functions needed by emul_unix.c.
2215 (AC_CHECK_HEADERS): Add new include files needed by emul_unix.c.
2216 * config.in: Regenerate.
2217 * configure: Regenerate.
2219 * emul_generic.c (emul_write2_status): New function to return
2220 results in r3 and r4 for Solaris system calls.
2221 (emul_do_system_call): If the system call is not support, but
2222 there is a string for the system call name, print out the string
2223 instead of the system call number.
2225 * emul_generic.h (emul_write2_status): Declare it.
2227 * emul_netbsd.c: Use /* */ around comment on #endif.
2229 * os_emul.c: Include emul_unix.h.
2230 (os_emulations): Add emulations for Solaris, and Linux.
2232 * psim.c (psim_usage): Add message about solaris, linux
2235 Thu May 30 00:00:10 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
2237 * hw_iobus.c: Tidy up notes so that they can be auto-extracted.
2239 * README: Correct PSIM's title
2241 Wed May 29 23:50:26 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
2243 * basics.h: New global type object_disposition, used to indicate
2244 the status of objects when things are restarted.
2246 Fri May 17 17:28:52 1996 Andrew Cagney <cagney@benjimen.highland.com.au>
2248 * device_table.h: Change the interrupt descriptor structure so
2249 that it includes an additional member - an upper bound on the
2250 interrupts by that name.
2252 * device.c (device_interrupt_decode): Allow a range of interrupt
2253 ports (eg rst0 .. rst6) if the port descriptors bound is non zero.
2255 * device.c (device_tree_print_device): Include a list of valid
2256 interrupt ports when listing supported devices.
2258 * device.h, device.c (device_child_interrupt_*): Delete. Not used.
2260 * emul_generic.c (emul_add_tree_hardware): Modify the creation of
2261 the interrupt net so that it uses int0 .. intN.
2263 Tue May 14 23:03:53 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
2265 * device.h, device.c (device_ioctl): Drop the system argument.
2266 Devices can not obtain this using the device_system() call.
2267 * device_table.h: Adjust accordingly.
2268 * hw_*.c: Adjust accordingly.
2269 * emul_netbsd.c (do_break): Adjust call to vm device accordingly.
2270 * psim.c (psim_options): Use a device_ioctl call to force the
2271 hw_trace device to update the trace options.
2272 * hw_trace.c: Replace the init function with an ioctl call. Adjust
2275 * psim.c (psim_init): Re-order initialization so that the
2276 os-emulation is initialized after the device tree. Without this,
2277 os-emul's are not able to create instances or access properties
2278 that contain an instance handle.
2280 * device.h, device.c (device_add_*_property): Make these functions
2281 internal to device.c. The user has access to the more generic
2282 device_tree_add_parsed function. Differentiate between the initial
2283 and current value for each property.
2284 * (clean_device_properties): New function that deletes any
2285 properties created after the start of a simulation and restores
2286 the initial value of any others (ignoring ihandles).
2287 * (init_device_properties): (Re)Initialize any properties that
2288 contain ihandles. create
2290 * (device_tree_init): Include calls to clean the device tree's
2291 properties and then initialize them. Document this in the device.h
2294 Mon May 6 17:36:15 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
2296 * interrupts.c (decrementer_interrupt): Always pend a decrementer
2297 interrupt even if it is not yet possible to deliver it.
2299 Wed May 1 12:26:51 1996 Andrew Cagney <cagney@benjimen>
2301 * mon.h, mon.c (mon_get_number_of_insns): Make this externally
2302 visable adjusting the arguments so that the interface is correct.
2303 (mon_print_info): Adjust calls.
2305 * registers.h, registers.c (register_description): Add phony
2306 cycle, insn and stall registers.
2308 * psim.c (psim_read_register): Return nr of instructions for given
2311 Tue Apr 30 22:09:09 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
2313 * hw_htab.c: New file. Extract contents from disk_table.c.
2314 Contains a device that, during initialization will create a
2315 PowerPC htab in memory.
2316 * hw_register.c: New file. Extract contents from disk_table.c.
2317 Contains a device that, during initialization, will parse its
2318 property list and use that to initialize various processor
2319 registers (not target specific).
2320 * hw_vm.c: New file. Extract contents from disk_table.c. Contains
2321 a device that handles accesses to invalid virtual memory addresses
2323 * hw_init.c: New file. Extract contents from disk_table.c. Misc
2324 devices that can initialize memory from a file.
2325 * hw_trace.c: New file. Extract contents from disk_table.c.
2326 Configure trace options from property values.
2328 * Makefile.in (hw_htab.o, hw_register.o, hw_vm.o, hw_init.o,
2329 hw_trace.c): Add new device files.
2331 * device_table.c: Remove above code, now in separate independant
2334 Fri Apr 26 00:00:07 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
2336 * hw_disk.c: New file. Disk and CDROM device.
2338 * Makefile.in (hw_disk.o): Add device hw_disk.c.
2340 * pk_disklabel.c: New file. Implement the miss-named disk-label
2343 * Makefile.in (pk.h): Create the file pk.h that contains a list of all
2346 * Makefile.in (hw.h, hw.c): Add dependancy on Makefile so that
2347 they are re-created when the makefile is updated.
2349 * emul_generic.c (emul_add_tree_hardware): Add a disk device
2350 (below the iobus) to the device tree. Include an ihandle of
2351 the disk as /chosen/disk.
2353 * emul_bugapi.c (emul_bugapi_create): Don't initialize the input,
2354 output and (new) disk handles yet.
2355 * (emul_bugapi_init): Initialize the input, output (and just added)
2357 * (emul_bugapi_do_diskio): New. Performs disk i/o (well at least
2358 what I think the behavour is).
2359 * emul_bugapi.c (emul_bugapi_instruction_call): Add hook to disk
2360 i/o bug call. For RETURN call, exit using gpr[3]'s status even
2361 though this isn't part of the spec - makes it possible for machine
2362 code to signal the aporting of a simulation run.
2364 * emul_chirp.c (chirp_emul_call_method): Add support for the
2365 claim/release methods.
2366 * (chirp_emul_exit): Add an optional exit status argument to
2367 the exit method. Makes it possible for chirp emul simulations
2368 to abort upon an error.
2369 * device.h, device.c (device_instance_claim,
2370 device_instance_release): New methods for claiming and releasing
2372 * hw_memory.c: add claim and release memory methods.
2373 * hw_*: Use the claim memory method when allocating physical
2376 Thu Apr 18 23:38:10 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
2378 * hw_nvram.c (hw_nvram_update_clock): Use the current not previous
2379 time when updating the clock.
2381 * hw_nvram.c: Tidy up documentation
2383 Fri May 24 10:08:10 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2385 * configure.in (AC_STRUCT_ST_{BLKSIZE,BLOCKS,RDEV}): Use these
2386 macros to determine whether or not the appropriate st_<xxx> fields
2387 exist in the stat structure.
2388 (AC_CHECK_FUNCS): Check for all unix system calls used, except for
2389 the real basic ones like open, read, write, etc.
2390 * config{.in,ure}: Regenerate.
2392 * emul_netbsd.c: Add support for missing system calls, and/or
2393 missing stat fields.
2394 (MAXPATHLEN): Undefine if including unistd.h, since sys/param.h
2397 * hw_pal.c (WITH_STDIO): Redefine if O_NDELAY, F_GETFL, or F_SETFL
2399 (scan_hw_pal): Do not cause syntax error if O_NDELAY, F_GETFL, or
2400 F_SETFL not defined.
2402 Tue May 21 17:24:45 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2404 * emul_netbsd.c (write_stat): Don't convert st_blocks unless the
2407 Thu May 16 10:56:45 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2409 * configure.in (AC_CHECK_HEADERS): Add sys/ioctl.h.
2410 * config{.in,ure}: Regenerate.
2411 * emul_netbsd.c: If HAVE_SYS_IOCTL_H is not defined, don't include
2414 Tue May 7 17:28:12 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2416 * hw_pal.c (hw_pal_instance_read_callback): Remove unused
2419 * misc.c ({,target_}a2i): Rewrite to not use strtoul.
2421 * Makefile.in ({spreg,misc}.o): Add dependency on .c file.
2422 ({i,d}gen): Don't link in liberity. Use BUILD_LIBS instead of
2425 Mon May 6 11:31:43 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2427 * hw_pal.c (hw_pal_instance_read_callback): If using stdio, use
2428 fgets to read line. If not using stdio, do a simple blocking read
2431 Fri May 3 15:07:42 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2433 * Makefile.in: Correctly build simulator for build machine != host
2436 Tue Apr 30 18:46:05 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2438 * configure.in (--enable-hostendian): Rework so the default uses
2439 the AC_C_BIGENDIAN results. Only run AC_C_BIGENDIAN if not cross
2441 * configure: Regenerate.
2443 * sim-endian.h: Add more tests for host endian to support more
2444 platforms in a cross compilation environment.
2446 Wed Apr 17 14:38:06 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2448 * hw_pal.c ({scan,write}_hw_pal): If WITH_STDIO == DO_USE_STDIO,
2449 use stdio, instead of unpended read/printf_filtered.
2450 (hw_pal_instance_write_callback): If WITH_STDIO == DO_USE_STDIO,
2451 flush stdout after writing the characters.
2453 * options.c (print_options): Print out WITH_STDIO.
2455 * Makefile.in (STDIO_CFLAGS): Pass on result of @sim_stdio@
2456 configuration variable.
2457 (CONFIG_CFLAGS): Include STDIO_CFLAGS.
2458 (hw.{c,h}): Allow for source dir != build dir, and for HW_SRC
2459 files to contain directory pieces.
2461 * std-config.h (DO{,NT}_USE_STDIO): New flags for whether we
2462 should use stdio for console input.
2463 (WITH_STDIO): If not defined, define as DONT_USE_STDIO.
2465 * configure.in (--enable-sim-stdio): Add new switch to control
2466 whether stdio is used for console I/O.
2467 * configure: Regenerate.
2469 * interrupts.c (external_interrupt): Declare it to be
2470 INLINE_INTERRUPTS, not INLINE_CPU.
2472 Mon Apr 15 23:30:56 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
2474 * events.c (insert_event_entry): Allow events to be scheduled
2475 *NOW* (at delta time 0). Add assertions to clarify behavour of
2478 * events.c (update_time_from_event): New function. Calculates the
2479 number of ticks from the next event. Use this.
2481 Sun Apr 14 21:39:45 1996 Andrew Cagney <cagney@highland.com.au>
2483 * emul_netbsd.c (do_break): Return 0 if success (instead of
2486 * device_table.c (vm_ioctl_callback): Don't return adjusted break
2489 Sun Apr 14 21:32:41 1996 Andrew Cagney <cagney@highland.com.au>
2491 * device_table.h: Change type of the device ioctl so that it
2492 returns an int (status).
2493 * device.h (device_ioctl): Ditto.
2494 * device.c (device_ioctl): Ditto.
2496 * device_table.c (stack_ioctl_callback): Return 0 status.
2497 (vm_ioctl_callback): Ditto
2499 Sat Apr 13 00:00:24 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
2501 * emul_netbsd.c (do_read): Correctly set the return value.
2504 (do_geteuid): Ditto.
2506 (do_getegid): Ditto.
2508 (do_sigprocmask): Ditto.
2511 (do_gettimeofday): Ditto.
2512 (do_getrusage): Ditto.
2516 (do___sysctl): Ditto.
2518 Fri Apr 12 20:56:47 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
2520 * device_table.c (vm_ioctl_callback): Don't access the processor
2521 registers directly, instead leave it to the caller to handle this.
2523 * emul_netbsd.c (do_break): Which calls vm_ioctl_callback to
2524 perform a break. Pass in the new break value and set the
2525 registers according to the result.
2527 * emul_generic.c (emul_write_status): Change so that r3 contains
2528 either status or errno and failure is indicated by SO.
2530 Thu Apr 4 23:03:38 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
2532 * emul_bugapi.c (emul_bugapi_create): More strict check of OEA
2535 Thu Apr 4 20:58:05 1996 Andrew Cagney <cagney@highland.com.au>
2537 * interrupts.h (interrupts): New structure contains state of
2540 * cpu.c (cpu_interrupts): New function. Pending interrupt status
2541 in the cpu and grant access to it. Add interrupts to cpu
2544 Fri Mar 29 22:09:25 1996 Andrew Cagney <cagney@highland.com.au>
2546 * device.c (device_tree_add_parsed): Check that the creation of a
2547 device instance worked before using it.
2549 * psim.c (psim_halt): Remove cia argument from psim_halt. This
2550 function does not save the CIA so do not pass it in.
2552 Fri Mar 29 21:30:56 1996 Andrew Cagney <cagney@highland.com.au>
2554 * hw_pal.c (hw_pal): Merge the halt and icu and console devices
2555 found in device_table.c into a single hack pal.
2557 * device_table.c (halt, icu, console): Delete.
2559 * Makefile.in (hw_pal.o): New dependency.
2561 * emul_generic.c (emul_add_tree_hardware): Re-arange device tree
2562 so that it uses the pal instead of the icu/halt/console devices.
2563 Wire the pal's interrupt ports up to the cpu nodes.
2565 Fri Mar 29 20:17:17 1996 Andrew Cagney <cagney@highland.com.au>
2567 * hw_iobus.c (hw_iobus_attach_address_callback): Move from
2568 device_table.c to here.
2570 * Makefile.in (hw_iobus.o): New dependency.
2572 Fri Mar 29 12:17:58 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
2574 * emul_bugapi.c (_os_emul_data): Add fields for output, input.
2575 (emul_bugapi_create): Create input, output from /chosen/stdin and
2577 (emul_bugapi_do_{read,write}): Switch to use device_instance
2579 (emul_bugapi_instruction_call): Change calls to
2580 emul_bugapi_do_{read,write} to pass device instance argument.
2582 Tue Mar 26 14:57:58 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2584 * igen.c (idecode_switch_end): Fix 2/26 change so that an extra
2585 default is not written out if a default was already written.
2587 * psim.c (psim_{read,write}_register): Use sizeof unsigned_8 to
2588 size cooked_buf, not sizeof natural_word, since floating point
2589 registers are 8 bytes.
2591 Mon Mar 25 22:07:13 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
2593 * configure: Regenerate with autoconf 2.9.
2595 Thu Mar 21 00:14:26 1996 Andrew Cagney <cagney@highland.com.au>
2597 * device_table.h: Always include string headers.
2599 Thu Mar 21 00:06:09 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
2601 * main.c (error): Be careful to not try to print out statistics
2602 when the simulation was never created.
2604 Sun Mar 17 22:40:57 1996 Andrew Cagney <cagney@highland.com.au>
2606 * basics.h: Move the event queue's definition to here so that it
2607 can be refered to globally with out importing all of events.h.
2609 * psim.h, psim.c (psim_event_queue): New function. Grant access
2610 to the simulation event queue. Will make this the single point of
2611 access (there is after all only one event queue in the
2614 * cpu.c (cpu_create): Use psim_event_queue to obtain the event
2615 queue instead of it being passed in. No longer allow access to
2616 the cpu's copy of the event queue.
2618 Sun Mar 17 22:40:57 1996 Andrew Cagney <cagney@highland.com.au>
2620 * events.h, events.c (event_handler): Remove event_queue from
2621 arguments passed to an event handler. That argument is redundant
2622 - the `data' should refer to a data structure that contains the
2623 event queue if queing is needed.
2625 * cpu.c (cpu_decrement_event): adjust
2627 * events.c (event_queue_process): adjust
2629 Sun Mar 17 22:40:57 1996 Andrew Cagney <cagney@highland.com.au>
2631 * device.h, device.c (device_system): New, returns a handle for
2632 the system given the device.
2634 * device.c (device_address_init): Store a pointer back to the
2635 system in each devices node.
2637 * device_table.h: Don't pass `system' into each device when it is
2638 being initialized, this is now available using device_system(me).
2640 * device.c (device_address_init, device_data_init): Adjust.
2642 * hw_cpu.c, hw_nvram.c, hw_memory.c, hw_eeprom.c, device_table.c:
2645 Sun Mar 17 22:40:57 1996 Andrew Cagney <cagney@highland.com.au>
2647 * interrupts.c (decrementer_interrupt, external_interrupt):
2648 Remember that an interrupt wasn't delivered so that it can be
2651 * interrupts.c (check_masked_interrupt): New function. (re)
2652 checks for the posibility that a recent change to the MSR may have
2653 made it possible to deliver an interrupt that was previously
2654 masked be the EE bit.
2656 * ppc-instructions (mtmsr, mfmsr, rfi): Check for posibility of
2657 a pending interrupt being delivered using check_masked_interrupt().
2659 * cpu.c (cpu_decrement_event): Just call decrementer_interrupt()
2660 leaving it to that module to handle both interrupt synchronization
2663 * cpu.c (struct _cpu): remove variables that were going to record
2664 pending decrementer and external interrupts.
2666 Sun Mar 17 22:40:57 1996 Andrew Cagney <cagney@highland.com.au>
2668 * hw_cpu.c, hw_cpu.h: New files. Implement a device that sits
2669 between the interrupt controller and the simulators internal
2670 processor model. Maps device interrupts onto the processor
2671 interrupt function calls.
2673 Mon Mar 4 06:06:54 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
2675 * hw_nvram.c: NVRAM device that includes a real-time clock that is
2676 updated each second.
2678 Mon Mar 4 04:18:50 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
2680 * device.h (attach_type): Remove attach_default type address
2681 spaces. Will replace with levels of callback memory.
2683 * corefile.h, corefile.c (new_core_mapping), corefile.c
2684 (core_map_attach): Replace default attach with a layerd callback
2687 Sun Mar 3 03:58:46 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
2689 * device.c (split_property_specifier): ensure that only a single
2691 (split_value): New function, parses the value part of a device
2694 * device.c (device_tree_add_parsed): Use the interrupt conversion
2695 functions to determine the interrupt port numbers.
2697 * device_table.h: Add table that maps between an interrupts
2698 symbolic name and its port number.
2700 * device.h, device.c (device_interrupt_decode,
2701 device_interrupt_encode): new functions use the recently added
2702 interrupt port name/number tables to perform conversion.
2704 Sun Mar 3 03:23:59 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
2706 * device.h, device.c (device_set_array_property,
2707 device_set_boolean_property, device_set_ihandle_property,
2708 device_set_integer_property, device_set_string_property): New
2709 functions - allow the value of a given property to be changed.
2711 * device.h, device.c: Re-order declaration and definition of
2714 Sun Mar 3 03:10:22 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
2716 * device.c (device_tree_print_device, device_tree_add_parsed):
2717 Remove references to phandle properties.
2719 Wed Feb 28 00:43:07 1996 Andrew Cagney - aka Noid <cagney@highland.com.au>
2721 * Makefile.in (corefile.o): missing dependency on device_table.h
2724 Tue Feb 27 23:59:35 1996 Andrew Cagney - aka Noid <cagney@highland.com.au>
2726 * device_table.h: Revamp device init callbacks so that they are a
2728 * device.c (device_init_data, device_init_address): If an init
2729 callback is NULL assume it should do nothing.
2730 * device_table.c (ignore_device_init, unimp_device_init): delete
2732 * device_table.c, hw_memory.c: adjust.
2736 * (device_instance): ditto.
2738 * (address nee config_address): ditto.
2739 * (interrupt): ditto.
2741 Mon Feb 26 21:11:20 1996 Andrew Cagney - aka Noid <cagney@highland.com.au>
2743 * igen.c (idecode_switch_end): Output a default entry when the
2744 switch statement is perfect. Firstly stops GCC complaining about
2745 an incomplete switch and secondly it will be eliminated by a good
2748 Mon Feb 26 22:47:15 1996 Andrew Cagney - aka Noid <cagney@highland.com.au>
2750 * Makefile.in (hw.h, hw.c): New targets. Create from the list of
2751 hw_*.c files. hw.h declares a device descriptor table for each hw
2752 device while hw.c lists those tables in a form suitable for the
2753 construction of a top leveltable in device_table.c.
2755 * Makefile.in (device_table.o): now depends on hw.c a generated
2758 * device_table.c (device_table): Re-arange the table of devices so
2759 that two levels are possible. Make use of hw.c.
2760 * device_table.h: ditto.
2762 * device.c (device_template_create_device): Handle new two level
2763 device lookup table.
2764 * device.c (device_usage): ditto.
2766 Mon Feb 26 22:24:00 1996 Andrew Cagney - aka Noid <cagney@highland.com.au>
2768 * device_table.c: Delete the memory device (moved to hw_memory.c).
2770 * hw_memory.c: New file. Just an OpenBoot memory device.
2772 Wed Jan 17 21:47:34 1996 Andrew Cagney <cagney@highland.com.au>
2774 * device.c (device_init_address): New. Split initialization into
2775 two stages, address and address spaces
2776 * device.c (device_init_data): New. ... and data or other work.
2777 With out this, devices try to modify memory before it as been
2780 * device.c (device_tree_init): Update to perform staged
2783 * device.c (device_init): Delete.
2785 Wed Jan 17 21:43:09 1996 Andrew Cagney <cagney@highland.com.au>
2787 * device_table.c (data_*): Rewrite to make heaver use of property
2788 nodes. Allow initialization by different data types.
2789 * device_table.c (htab_* pte_*): Rewrite to use properties.
2791 * emul_chirp.c (emul_chirp_create): Use
2792 * emul_bugapi.c (emul_bugapi_create): Ditto
2793 * emul_netbsd.c (emul_netbsd_create): Ditto
2795 Wed Jan 17 21:24:50 1996 Andrew Cagney <cagney@highland.com.au>
2797 * emul_generic.c (emul_add_tree_options): Annotate existing tree
2798 with options that haven't yet been specified.
2799 * emul_generic.c (emul_add_tree_hardware): Annotate existing tree
2800 with demo devices and properties.
2802 * emul_chirp.c (emul_chirp_create): Update to use new
2803 device_tree_add_parsed call and additional information now
2804 included in the device tree. Use emul_add_tree* functions to add
2805 any missing details.
2806 * emul_bugapi.c (emul_bugapi_create): Ditto
2807 * emul_netbsd.c (emul_netbsd_create): Ditto
2809 Wed Jan 17 21:18:27 1996 Andrew Cagney <cagney@highland.com.au>
2811 * device.c (device_instance_create): New. Create/delete and
2812 operate on instances of a device.
2813 * device.c (device_instance_delete): Ditto
2814 * device.c (device_instance_read): Ditto
2815 * device.c (device_instance_write): Ditto
2816 * device.c (device_instance_seek): Ditto
2817 * device.c (device_instance_data): Ditto
2818 * device.c (device_instance_name): Ditto
2819 * device.c (device_instance_path): Ditto
2821 * emul_chirp.c (chirp_emul_open): Implement using device_instance.
2822 * emul_chirp.c (chirp_emul_close): Ditto
2823 * emul_chirp.c (chirp_emul_read): Ditto
2824 * emul_chirp.c (chirp_emul_write): Ditto
2825 * emul_chirp.c (chirp_emul_seek): Ditto
2827 * emul_chirp.c (chirp_read_t2h_args): Read arguments from device.
2828 Being careful to convert all from target to host byte order.
2829 * emul_chirp.c (chirp_write_h2t_args): Converse.
2831 Wed Jan 17 20:07:15 1996 Andrew Cagney <cagney@highland.com.au>
2833 * device.c (device_tree_add_parsed): New. Rewrite code to add
2834 devices to the device tree so that a single printf style function
2837 * device.c (device_tree_add_*): Delete. Replaced by above.
2839 * device.c (split_device_specifier): Functions to manipulate a
2840 device specifier (path) breaking it into its components
2841 * device.c (split_property_specifier): Ditto
2842 * device.c (split_device_name): Ditto
2843 * device.c (split_find_device): Ditto
2845 * device.c (scan_*): Delete
2847 * device.c (device_tree_find_device): Rewrite to use above.
2848 * device.c (device_add_property): Ditto
2850 Wed Jan 17 19:51:56 1996 Andrew Cagney <cagney@highland.com.au>
2852 * psim.c(psim_options): Parse the psim options, installing their
2853 value in the device tree. Options are now first entered into a
2854 device tree and then extracted out again when needed. This allows
2855 greater flexability in configuration.
2857 * psim.c (psim_tree): Returns a basic device tree ready for
2858 parsing by psim_options.
2859 * psim.c (psim_usage): New. Give usage to varing levels of detail
2860 according to the verbosity. In turn output device and trace
2863 * main.c (main): Update to use new system
2864 * sim_calls.c (sim_open, sim_do_command): Ditto
2866 * psim.c (psim_options): Add `r' option - ram size.
2867 * psim.c (psim_options): Add `o' option - openboot tree entry.
2868 * psim.c (psim_options): Add `h'/`H' options - more help.
2870 * debug.c (trace_usage): Add more detailed help.
2871 * device.c (device_usage): New. Output help including a list of
2872 the devices currently available in the device table.
2873 * device_table.c: Add usage operator to each device.
2875 * corefile.c (core_create, core_device_create): Adjust so that the
2876 core device is created earlier for psim_tree(). Core can later be
2879 * psim.c (psim_create): Update to handle above way of creating
2880 things. Extract all information from the device tree.
2882 * device_tree.c (trace_*): New device node, its properties are
2883 used to set the value of the trace options. Init this device (in
2884 psim_options) when ever the options are updated.
2886 Wed Jan 17 19:46:07 1996 Andrew Cagney <cagney@highland.com.au>
2888 * debug.h: Add trace_print_info, trace_print_device_tree and
2889 trace_dump_device_tree. The first is a replacement for the
2890 variable `print_info' found in main.c and sim_calls.c. The latter
2891 two enable the dumping of the entire device tree.
2893 * debug.c: Add to trace_description table.
2895 * main.c (main): Use above trace instead of local variable
2896 * sim_calls.c (sim_close): Ditto
2898 * device.c (device_tree_print_device): New. Prints the device
2899 tree in a format that is consistent with what can be parsed by the
2900 device tree load from file code.
2902 * psim.c (psim_create): Dump device tree if enabled. If nump
2903 selected, exit psim immediatly.
2905 Wed Jan 17 19:36:52 1996 Andrew Cagney <cagney@highland.com.au>
2907 * corefile-n.h (core_map_read_N): When mapping from an address to
2908 a device, do not subtract the devices base. The device its self
2909 can do this. Brings the behavour into line with OpenBoot.
2910 * corefile-n.h (core_map_write_N): Ditto
2911 * corefile.c (core_map_read_buffer): Ditto
2912 * corefile.c (core_map_write_buffer): Ditto
2914 * device_table.c (console_io_read_buffer_callback): Adjust to
2915 handle biased address.
2916 * device_table.c (console_io_write_buffer_callback): Ditto
2918 Wed Jan 17 18:36:09 1996 Andrew Cagney <cagney@highland.com.au>
2920 * device.c (attach_device_interrupt_edge): New. Interrupt model
2921 did not allow interrupts to be wired up as a general net (edges).
2922 Re-implement so that interrupt events can be passed to multiple
2923 controllers and interrupt controllers can further propogate
2926 * device.c (attach_device_interrupt_edge) : New, Ditto
2927 * device.c (detach_device_interrupt_edge) : New, Ditto
2928 * device.c (clean_device_interrupt_edges) : New, Ditto
2929 * device.c (device_interrupt_event) : New, Ditto
2930 * device.c (device_interrupt_attach) : New, Ditto
2931 * device.c (device_interrupt_detach) : New, Ditto
2932 * device.c (device_child_interrupt_attach) : New, Ditto
2933 * device.c (device_child_interrupt_detach) : New, Ditto
2935 * device.c (device_attach_interrupt) : Delete old
2936 * device.c (device_detach_interrupt) : Delete old
2937 * device.c (device_interrupt) : Delete old
2938 * device.c (device_interrupt_ack) : Delete old
2940 * device_table.c (unimp_*) : Update to match
2942 * device_table.c (icu_io_write_buffer_callback) : Update to use
2944 * device_table.c (icu_interrupt_event_callback) : Ditto
2946 Wed Jan 17 18:18:40 1996 Andrew Cagney <cagney@highland.com.au>
2948 * device.c (external_to_device) : New function that provides a
2949 standard mapping between a devices internal representation (a
2950 pointer) and its external (or what is passed to a client)
2951 representation (a phandle). Implement using the cap object
2952 attached to the root node.
2954 * device.c (device_to_external) : Ditto
2955 * device.c (external_to_device_instance) : Ditto but for ihandle
2956 and device instance.
2957 * device.c (device_instance_to_external) : Ditto
2959 * Makefile (device.o): Add dependency on cap.
2961 * emul_chirp.c (struct _emul_chirp_data) : Elimate use of cap. Code
2962 needing to translate between internal and external representations
2963 changed to use the external_to_device et.al. device operations.
2964 * emul_chirp.c (chirp_emul_*) : Ditto
2966 * Makefile (emul_chirp.o): Remove dependency on cap
2968 Sat Jan 6 10:13:26 1996 Andrew Cagney - aka Noid <cagney@highland.com.au>
2970 * emul_chirp.c (map_over_chirp_note): Tighten up (and fix) checks
2971 on OpenBoot note section.
2973 Fri Jan 5 20:28:53 1996 Andrew Cagney <cagney@hignland.com.au>
2975 * emul_generic.c (emul_write_buffer): Use vm faulting byte
2976 read/write calls for buffer transfers. This will cause a fault to
2977 occure if the transfer fails. CHRP catches the fault while the
2978 others suffer the consequences.
2979 (emul_read_buffer): Ditto.
2980 (emul_write_word): Ditto.
2981 (emul_read_word): Ditto.
2982 (emul_read_string): Ditto.
2984 Fri Jan 5 18:55:34 1996 Andrew Cagney <cagney@highland.com.au>
2986 * emul_chirp.c (emul_chirp_create, emul_chirp_instruction_call),
2987 emul_generic (emul_blr_instruction): Use a real blr instruction to
2988 return from a client service call.
2990 * emul_chirp.c (services): Add all OpenBoot services to table.
2992 * emul_generic.h, emul_bugapi.c (emul_bugapi_create), emul_chirp.c
2993 (emul_chirp_create) : Use names instead of numbers for
2994 instructions being stored in memory.
2996 Fri Jan 5 18:52:28 1996 Andrew Cagney <cagney@highland.com.au>
2998 * Makefile.in (maintainer-clean): Remove .log, core and *.core
2999 (From NetBSD) files.
3001 Wed May 29 22:57:40 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
3003 * ChangeLog.00, ChangeLog: ChangeLog from gdb-4.16 becomes