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