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