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