1 Wed Feb 14 17:38:12 1996 J. T. Conklin <jtc@cygnus.com>
3 * configure.in (AC_HEADER_DIRENT): Add, so that we can figure out
4 where the directory functions are declared.
5 * configure: Regenerate
7 * emul_netbsd.c: Use the macros defined by configure to find the
8 appropriate directory functions.
10 Fri Jan 19 00:32:27 1996 Andrew Cagney - aka Noid <cagney@highland.au.com>
12 * psim.c (psim_create): Re-order so that all options are set
13 before the CPU's are created. Was breaking mon_create();
15 * psim.c (psim_create): Tidy up conflicting configuration errors.
17 * debug.c: Add missing print-info entry to trace table.
19 * os_emul.c (os_emul_create): Fix `-e' option. Was looking under
22 * psim.c (psim_options): Fix `-r' option. Was entering under wrong
25 Thu Jan 18 20:33:48 1996 Andrew Cagney <cagney@highland.com.au>
27 * vm.c (om_unpack_bats): Fix checking of bat bits.
29 * emul_chirp.c (emul_chirp_create): Store address of OB in memory
30 in the os_emul_data structure.
32 * emul_bugapi.c (emul_bugapi_create): Store the address of the
33 bugapi code (in main memory) in the os_emul_data structure.
35 Thu Jan 18 01:14:55 1996 Andrew Cagney <cagney@highland.com.au>
37 * vm.c (om_translate_effective_to_real): Fix trace output.
39 Wed Jan 17 22:21:55 1996 Andrew Cagney <cagney@highland.com.au>
41 * device_table.c (generic_device_init_address): Create memory from
42 information obtained from `reg' property.
43 * device_table.c (vm_init_address_callback): Use information
44 obtained from properties.
45 * emul_netbsd.c (emul_netbsd_create): Update to create device and
46 property entries to match
48 Tue Jan 16 09:50:53 1996 Michael Meissner <meissner@tiktok.cygnus.com>
50 * idecode_expression.h (ALU_END): Add ITRACE of the result.
52 * ppc-instructions (Equivalent): Enable this instruction.
53 (Add to Minus One Extended): Ditto.
54 (Subtract from Minus One Extended): Ditto.
55 (Add/And/Or/Xor Immediate): Add alu trace of result.
56 (Add/And/Or/Xor Shifted Immediate): Ditto.
57 (And/Or/Equivalent/Nand/Nor): Ditto.
58 (And/Or with Complement): Ditto.
59 (Extend Sign Byte/Half Word): Ditto.
60 (Count Leading Zeros): Ditto.
61 (Shift Right Algerbraic Word): Ditto.
62 (Shift Right Algerbraic Word Immediate): Ditto.
64 Tue Jan 9 15:10:27 1996 Andrew Cagney <cagney@highland.com.au>
66 * emul_bugapi.c (emul_bugapi_instruction_call) : Make format type
68 * emul_chirp.c (map_over_chirp_note) : Ditto
69 * emul_chirp.c (chirp_emul_test) : Ditto
70 * device_table.c (register_init): Ditto
72 Tue Jan 9 14:16:26 1996 Andrew Cagney <cagney@highland.com.au>
74 * configure.in: Make disable-sim-switch default. Switch only
75 useful if using --enable-sim-opcode=ppc-opcode-stupid and then
78 Mon Jan 8 12:17:22 1996 Michael Meissner <meissner@tiktok.cygnus.com>
80 * device_table.c (register_init): Make format type correct.
82 Wed Jan 3 19:21:46 1996 Andrew Cagney <cagney@highland.com.au>
84 * emul_bugapi.c (emul_bugapi_create): Add nodes to init the
85 system-call trap to the emul instruction call instruction (Along
86 with an rfi and infinate loop).
88 * emul_bugapi.c (emul_bugapi_instruction_call): Expand to include
89 a few real PPC bug calls. Test with simple hello world.
91 Tue Jan 2 20:51:19 1996 Andrew Cagney - aka Noid <cagney@highland.com.au>
93 * device.h, device.c (device_child, device_sibling): New
94 functions. Return corresponding device value.
96 * emul_chirp.c (chirp_emul_child, chirp_emul_peer,
97 chirp_emul_parent): New functions - emulate corresponding OpenBoot
100 * device_table.c (register_init): Extend properties attached to
101 register init node to allow a specific processor's register to be
104 * emul_chirp.c (emul_chirp_create): Init SMP correctly - the
105 initial PC for all processors is an infinate loop but then, for
106 processor zero, is quickly changed to be the correct code starting
109 * emul_chirp.c (emul_chirp_create): Add fake bootpath
110 et.al. properties to tree.
112 * emul_chirp.c (chirp_emul_getproplen): New function. Emulate the
113 getproplen OpenBoot call.
115 * emul_chirp.c (emul_chirp_instruction_call): Document other
116 possible chirp emulation internal states.
118 * emul_chirp.c (emul_chirp_instruction_call): Trace failed lookups
119 as well as successful ones.
121 * emul_chirp.c (emul_chirp_open): New function - handle open
124 * Makefile.in (maintainer-clean): Proper rule that eliminates more
127 Tue Dec 19 13:00:11 1995 Andrew Cagney <cagney@highland.com.au>
129 * emul_chirp.c (chirp_emul_exit): Full out call.
131 * device_table.c (htab_map_page): Wasn't handling byte swap when
132 creating entries in the hash table.
134 * device.c (device_tree_find_node): Allow primative wild-card match
135 of device names with the path.
137 FIXME: As mentioned earlier, the device stuff needs work to bring
138 it into line with OpenBoot. Part of this work is rewriting the
139 find_node function so that it behaves as specified in p1275.
141 Mon Dec 18 19:58:56 1995 Andrew Cagney <cagney@highland.com.au>
143 * emul_chrp.c (chirp_emul_write, chirp_emul_finddevice): add
146 * emul_chrp.c: Change return type of emul functions to int. Emul
147 functions either return -1 or zero so unsigned was a bit
150 * inline.h (*), igen.c, dgen.c, *: Update INLINE macros so that
151 they are paramaterised with the type of the function. Gets around
152 the problem of `static' needing to come first with `attribute'
153 comming last. Format declarations and definitions so that emacs
154 doesn't get confused.
156 Fri Dec 15 17:06:44 1995 Andrew Cagney <cagney@highland.com.au>
158 * std-config.h (PSIM_INLINE): Add missing inline configuration
159 control for the main loop.
161 * mon.c (mon_print_info): If monitoring disabled still print out
162 the number seconds used.
164 * psim.c (run_until_stop): Don't monitor the cache misses when
165 monitoring is disabled.
167 * configure.in (sim_mon, sim_monitor): Correct typo - sim_mon ->
168 sim_monitor for shell variable (or should that have been the other
171 * vm.c (vm_synchronize_context): Fix wrong test for unsuported
172 change in endian-mode.
174 * std-config.h (WITH_REGPARM), inline.h (IDECODE_INLINE,
175 SEMANTICS_INLINE): Add -DWITH_REGPARM=<n> option. Enables the
176 __attribute__((__regparm(WITH_REGPARM))) for some functions.
177 configure with --enable-sim-cflags="-DWITH_REGPARAM=3" (say).
178 Unfortunatly it tickles a bug (gcc?) and can't be used.
180 Mon Dec 18 13:36:06 1995 Michael Meissner <meissner@tiktok.cygnus.com>
182 * device.c (device_tree_add_device): Make trace fprintf arguments
184 * device_table.c (htab_decode_hash_table): Ditto.
185 (htab_map_binary): Ditto.
186 (htab_init_callback): Ditto.
187 * vm.c (om_virtual_to_real): Ditto.
189 Sat Dec 16 09:54:18 1995 Michael Meissner <meissner@wogglebug.tiac.net>
191 * emul_netbsd.c (emul_netbsd_create): Deal with new BFD that
192 changed how big/little endian support is recorded, while remaining
193 compatible with the old BFD with #ifdefs.
194 * emul_chirp.c (emul_chirp_create): Ditto.
195 * emul_bugapi.c (emul_bugapi_create): Ditto.
197 Fri Dec 15 15:55:56 1995 Michael Meissner <meissner@tiktok.cygnus.com>
199 * std-config.h (MODEL_INLINE): Turn off INLINE_MODULE by default.
201 * corefile.h: Delete declarations for unknown functions.
203 * interrupts.h: Ditto.
204 * interrupts.c: Ditto.
206 Thu Dec 14 18:49:34 1995 Andrew Cagney <cagney@highland.com.au>
208 * lf.c (lf_print_function_type): New function. Munges a function
209 type so that the prefix (eg INLINE...) is inserted after the type
212 * igen.c: Change to output functions using this.
214 Wed Dec 13 23:47:00 1995 Andrew Cagney <cagney@highland.com.au>
216 FIXME: Emul CHIRP does not correctly implement the find device
219 FIXME: Emul CHIRP and device do not implement device instance
222 Wed Dec 13 23:47:00 1995 Andrew Cagney <cagney@highland.com.au>
224 * options.c (options_inline): Function to output meaningful
225 description of the INLINE options.
227 * configure.in (inline): Replace inline magic numbers with macro
228 names. Map 1->LOCALS_INLINE and 2->ALL_INLINE.
230 * inline.h, inline.c: update to use inline method.
232 * std-config.h (CPU_INLINE), cpu.h, inline.h, inline.c: make cpu.h
235 * std-config.h (EVENTS_INLINE): Inline events in psim.
237 Wed Dec 13 22:01:21 1995 Andrew Cagney <cagney@highland.com.au>
239 * device_table.c (htab_sum_binary): DMA binaries to correct byte
242 Tue Dec 12 22:51:18 1995 Andrew Cagney <cagney@highland.com.au>
244 * psim.c (psim_merge_device_file): Change `=' to `==', was this an
247 Tue Dec 5 11:56:14 1995 Andrew Cagney <cagney@highland.com.au>
249 * ppc-instructions (ppc_nr_mtcrf_crs, ppc_branch_conditional_name,
250 ppc_function_unit_name): Simplify by declaring these arrays as
251 pure and simple static (instead of STATIC_MODEL).
253 Tue Dec 5 00:45:34 1995 Andrew Cagney <cagney@highland.com.au>
255 * sim_calls.c (sim_create, sim_load), main.c (main), psim.c: Pass
256 an options device into psim_create() so that options can be merged
259 * device.c (*add*): Change semantics so the add functions only add
260 when the new device (or property) doesn't already exist. This
261 allows merging of options and data.
263 Mon Dec 4 17:12:13 1995 Andrew Cagney <cagney@highland.com.au>
265 * Makefile.in (BASICS_H): Didn't include basics.h in the list of
266 header files to depend on.
268 Mon Dec 4 17:12:13 1995 Andrew Cagney <cagney@highland.com.au>
270 * std-config.h: (*_MODULE): Extend the <module>_inline macro's so
271 that they also allow control over static functions. Rewrite
272 document to reflect this.
274 * std-config.h: (INLINE): Simplify definition, the above and
275 earlier changes to igen.h eliminate the need to be defensive about
276 enabling the inline of static functions.
278 * std-config.h: (SIM_ENDIAN_INLINE, BITS_INLINE): Document limited
279 suport for inlineing of modules for all callers. Adjust relevant
280 macro's so that DEFAULT_INLINE will enable this.
282 * basics.h: Re-order #includes and definitions so that c-code for
283 basic include files does not call functions delcared in later
286 * basics.h (__attribute__), sim_callbacks.h: Move attribute macro
287 to basics.h and add hack (include <stdio.h>) to try and bring that
288 and other possible conflicting macros into scope much earler.
290 * sim-endian.h,c (SIM_ENDIAN_INLINE) bits.h,c (BITS_INLINE):
291 Change to use the updated inline definitions. If enabled
292 immediatly include the corresponding c-code so that it will inline
295 * inline.h, inline.c (SIM_ENDIAN_INLINE, BITS_INLINE): Remove
296 these cases, moved to module specific header files.
298 Sat Dec 2 18:37:51 1995 Andrew Cagney <cagney@highland.com.au>
300 * vm.c, vm_n.c: Fix htab code.
302 * vm.c (vm_data_map_read_buffer): Was using EA not RA when reading
305 * device.c: Fix htab create code.
307 Fri Nov 24 23:10:09 1995 Andrew Cagney <cagney@highland.com.au>
309 * bits.h, bits.c (EXTRACTED): Convert to function, fix - had &&
312 * sim-endian.h (SWAP_N), sim-endian-n.h, sim-endian.c: How
313 embarasing - fix yet another bug in the swap code! Simplify
314 everything by using more functions. Add host to big-endian byte
317 Fri Nov 24 23:10:09 1995 Andrew Cagney <cagney@highland.com.au>
319 * devices.h, devices.c: delete, replaced by the files
320 device_table.[ch] and device.[ch].
321 * device_tree.h, device_tree.c: ditto
323 * device_table.h, device_table.c: New files. Contain a table of
326 * device.h, device.c, Makefile.in, std-config.h (DEVICE_INLINE),
327 options.c (print_options): New files. Define the device object
328 along with any attached properties.
330 * device_tree.h, device_tree.c: Update to use new device object.
331 For convenience, change the printd functions into device_tree_add
334 * psim.c (create_*_tree): Use new device_tree create functions.
336 * corefile.h, corefile.c corefile-n.h (core_n.h): Update to use
337 the new device.h / device_table.h interface. Rename core_n.h to
338 corefile-n.h to be consistent with other n files.
340 * Makefile.in (run): add corefile-n.h to dependencies for
343 * basics.h (device_instance), device.h, device.c, device_table.h,
344 device_table.c: Add the concept of a device instance and operators
345 on these instances - corresponds to ihandle in OpenBoot speak.
346 Don't yet implement it.
348 Tue Nov 14 12:27:08 1995 Andrew Cagney <cagney@highland.com.au>
350 * emul_generic.h, emul_generic.c (emul_syscall_enter,
351 emul_syscall_exit): rename from emul_enter_call /
352 emul_exit_call. As only used by emul_do_system_call simplify
355 * os_emul.h, os_emul.c, emul_generic.h: Correct and fill an
358 * os_emul.c, emul_bugapi.h, emul_bugapi.c, Makefile.in: Add
359 preliminary hooks for a kernel mode rom emulation.
361 * cap.h (new), cap.c (new): Capability data base. Some emulations
362 pass object identifiers (capabilities?) to/from the simulated code
363 (for instance the phandle in OpenBoot). The cap object is able to
364 check/map between internal and external (target program)
365 representations of each identifier.
367 * os_emul.c, emul_chirp.h, emul_chirp.c, Makefile.in: Add
368 preliminary hooks for a kernel mode IEEE-1275 emulation.
370 * cpu.h, cpu.c (cpu_create, cpu_os_emulation, cpu): Add os_emul to
371 list of arguments passed in when creating a cpu. Grant access to
374 * std-config.h (OS_EMUL_INLINE), options.c (print_options),
375 inline.h, inline.c: New to allow control over inline of
376 corresponding code files.
378 * ppc-instructions (instruction_call): Add illegal instruction to
379 call the instruction-call emulation handler.
381 * interrupts.c (system_call_interrupt): Call renamed
382 os_emul_system_call function().
384 * emul_netbsd.c: Update to interface to generic emulation. Since
385 all its functions are called via a table don't worry about any
388 * emul_generic.h, emul_generic.c, spa-*(delete): Remove references
389 and code for spa, no longer to be used.
391 * psim.c (create_chirp_device_tree): Fill out what was previously
392 the openboot create function so that it starts to create a full
393 OpenBoot device tree.
395 Tue Nov 28 21:48:06 1995 Andrew Cagney <cagney@highland.com.au>
397 * debug.h, debug.c: pte trace is made redundant by htab trace,
398 delete it. Add vm to list of options. Simplify tracing output so
399 lines are not as long.
401 Tue Nov 14 12:27:08 1995 Andrew Cagney <cagney@highland.com.au>
403 * events.h, events.c (event_queue_init), psim.c (psim_init): (re)
404 initialize the event queue.
411 Tue Nov 28 13:38:26 1995 Michael Meissner <meissner@tiktok.cygnus.com>
413 * sim-endian.h: Look at WORDS_BIGENDIAN to determine if the host
414 is big endian or little endian. For SWAP_n, use htonl/htons if
415 host is little endian, not big endian and if WITH_NTOH is defined.
417 * configure{,.in} (--enable-sim-model-issue): Instead of defining
418 0/1, define it to be MODEL_ISSUE_{PROCESS,IGNORE}. Add
419 AC_C_BIGENDIAN to determine if the host is big endian or not.
420 * config.in: Regenerate.
422 * std-config.h (WITH_MODEL_ISSUE): Default to 0.
423 (CURRENT_MODEL_ISSUE): Reference WITH_MODEL_ISSUE, and if that is
424 0, use current_model_issue.
425 (MODEL_ISSUE_{PROCESS,IGNORE}): Define as -1/1.
427 * psim.c (current_model_issue): New global variable.
429 * cpu.c (cpu_create): Use CURRENT_MODEL_ISSUE > 0 instead of
431 (cpu_{init,halt}): Ditto.
432 * mon.c (mon_print_info): Ditto.
433 * ppc-instructions (PPC_INSN_* macros, branch handling): Ditto.
435 * mon.c (mon_print_info): Print instructions/second if verbose > 0,
438 * main.c (main): Set current_model_issue to MODEL_ISSUE_PROCESS if
439 the -I switch is used.
440 * sim_calls (sim_open): Ditto.
442 * ppc-instructions (model support): Add support for determining
443 when we don't have enough writeback slots. Add tracing for the
444 beginning of each cycle.
446 Mon Nov 27 17:46:33 1995 Michael Meissner <meissner@tiktok.cygnus.com>
448 * mon.c: Check for whether to include sys/types.h and sys/time.h.
450 * configure.in: Check for include files sys/types.h and
452 * configure: Regenerate.
453 * config.in: Regenerate.
455 * cpu.h (CONST_ATTRIBUTE): Define as __attribute__((__const__)) if
457 (cpu_system): Use CONST_ATTRIBUTE, so that when we're not inlining
458 the world, the optimizer has a fair chance of CSE'ing function
460 (cpu_{monitor,nr,registers,model}): Ditto.
462 * std-config.h (MODEL_INLINE): If not defined, define as 1 if
463 DEFAULT_INLINE is non-zero, 0 otherwise, rather than just the
464 value of DEFAULT_INLINE.
466 Fri Nov 24 11:24:34 1995 Michael Meissner <meissner@tiktok.cygnus.com>
468 * lf.h (__attribute__): If not GCC and at least 2.7.0, define as
470 (lf_printf): Add printf __attribute__, so the compiler will
471 automatically check the format string.
473 * configure{,.in} (--enable-sim-icache): If argument is define,
474 add -R to flags passed to igen.
476 * igen.c (stdlib.h): Include if the system supplies one.
477 (semantics_use_cache_struct): New global for -R flag to say
478 semantics is to use the cache structure directly rather than
479 putting the values into local variables.
480 (first_undef, last_undef): New structures to remember names to
482 (lf_print_c_extraction): If -R and this is semantics, emit names
483 as #defines pointing to the cache structure, rather than loading
484 the values into local variables.
485 (lf_print_c_semantic_function): If -R, #undef all of the names
486 defined in lf_print_c_extraction.
487 (main): Recognize -R.
489 * idecode_fields.h (SPR_*): Redefine spr_* macros as SPR_* to
490 avoid a name confict if -R passed to igen.
492 * ppc-instructions (mfspr, mtspr): Rename spr field to SPR.
493 (model_data): Add field to count the various # of CRs that the
494 mtcrf instruction used.
495 (model_mon_info): Return structures counting the # of CRs that the
496 mtcrf instruction used.
497 (branches, sync instructions): Do not call model functions if
498 WITH_MODEL_ISSUE is 0.
500 * mon.c (stdlib.h): Include if the system supplies one.
501 (mon_sort_instruction_names): New function to sort instruction
502 names alphabetically.
503 (mon_print_info): Call qsort with mon_sort_instruction_names to
504 sort instruction names. Don't abort if WITH_MODEL_ISSUE is 0.
506 * debug.h (ITRACE): Make printf_filtered arguments type correct.
507 * idecode_expression.h (CR0_COMPARE): Ditto.
508 * psim.c (psim_read_register): Ditto.
510 * igen.c (lf_print_my_prefix): Use __attribute__((__unused__)) to
511 silence compiler warnings about unused automatically generated
513 (lf_print_c_extraction): Ditto.
514 * idecode_expression.h (FPSCR_BEGIN): Ditto.
516 * ppc-cache-rules: Define rules for making a bitmask for all
519 * ppc-instructions: Rewrite model specific functions to use the
520 bitmask of the register number, instead of using the register
521 pointer to get the register number, and then making the bitmask.
523 Wed Nov 22 15:24:27 1995 Michael Meissner <meissner@tiktok.cygnus.com>
525 * ppc-instructions (model_branches): Add conditional argument to
526 count the number of times each type of conditional branch is used.
527 (conditional branches): Pass B0 or -1 to model_branches.
528 (model_mon_info): Print out conditional branch counts.
529 (model-data): Add support for printing out conditional branch
532 Tue Nov 21 16:31:25 1995 Michael Meissner <meissner@tiktok.cygnus.com>
534 * igen.c (insn_table_load_insns): Add support for model-static for
535 internal functions that should not be inlined.
536 (lf_print_c_semantic): Remove model_cleanup.
537 (gen_model_{c,h}): Ditto.
539 * ppc-instructions: Redo model specific support once again. Add
540 floating point support to the model specific information. Flesh
541 out all of the floating mutiply add/subtract instructions. Add
542 better tracing support to the model specific information.
544 Sun Nov 19 23:00:52 1995 Michael Meissner <meissner@tiktok.cygnus.com>
546 * ppc-instructions (model data, model_busy): Rather than using a
547 bit mask for the busy units, just use a char array. Also, only
548 support 2 function units an insn can use, rather than a loop.
550 Fri Nov 17 14:08:08 1995 Michael Meissner <meissner@tiktok.cygnus.com>
552 * table.c (table_entry_read): Move setting entry->line_nr to after
553 the model specific fields so the line numbers for the annex are
556 * cpu.c (cpu_{create,init,halt}): Check for WITH_MODEL_ISSUE
557 before calling the model functions.
559 * debug.c (trace_descriptor): Add trace_model support.
560 * debug.h (trace_options): Ditto.
562 * igen.c (gen_icache_h): Create type idecode_cache as void if not
563 caching instructions.
564 (gen_model_{c,h}): Drop model_issue support. Add support for
566 (lf_print_my_prefix): Initialize a const itable_index with the
568 (lf_print_c_semantic): Call model_cleanup at the end of the
569 function to check for instructions that aren't supported yet by
572 * mon.h (count_type): New type for counters.
573 * mon.c: Use count_type instead of unsigned.
575 * ppc-instructions: Redo scheduling code once again. Make it all
576 inline friendly. Instead of having general code emitted by igen,
577 go the route of having each semantic routine call the appropriate
580 Thu Nov 16 09:52:26 1995 Michael Meissner <meissner@tiktok.cygnus.com>
582 * table.c (table_entry_read): Allow the annex to have blank lines.
584 * ppc-instructions: Change lines in model stuff that just have a
585 tab to just newline. Add 601 support. Document most instructions
586 in terms of model specific timing information. Drop 'FUNCTION'
587 from PPC_FUNCTION_UNIT_xxx enums. Change PPC_UNIT_UNKNOWN ->
588 PPC_UNIT_BAD. Add TRACE(trace_tbd) for all data cache
589 instruction.s. Signal illegal instruciton if data cache block
590 invalidate is issued from problem state.
592 * igen.c (max_model_fields_len): New static to keep track of the
593 max size for the model specific fields.
594 (model_c_insn): Use max_model_fields_len to size fields.
595 (insn_table_insert_insn): Set max_model_fields_len.
596 (model_table_insert): Ditto.
597 (gen_model_{c,h}): Model_issue is now called with a processor
600 * debug.c (trace_description): Add support for trace_tbd.
602 * mon.c (mon_issue): Pass processor argument to model_issue.
604 * Makefile.in: Delete all function unit support, since the newer
605 table driven model support replaces it.
608 * inline.{c,h}: Ditto.
609 * std-config.h: Ditto.
611 * configure{,.in}: Ditto.
612 * Makefile.in: Ditto.
614 * function_unit.{c,h}: Delete these now usused files.
616 * std-config.h (WITH_MODEL_ISSUE): Add new macro on whether to
617 trace instructions in a model specific manor.
618 * options.c (print_options): Print it out.
619 * configure{,.in}: Add --enable-sim-model-issue option.
620 * Makefile.in: Add --enable-sim-model-issue flags.
621 * igen.c (lf_print_c_semantic): Add call to mon_issue here. Check
622 for WITH_MODEL_ISSUE.
623 * mon.c (mon_issue): Remove call to mon_issue_here.
625 * ppc-instructions: Move branch tracing to the actual branch
626 instructions, rather than testing it in model_issue. Add code to
627 code successful/unsuccessful branch predictions, and the number of
628 conditional branches that fell through.
630 Wed Nov 15 17:32:13 1995 Michael Meissner <meissner@tiktok.cygnus.com>
632 * cpu.h (cpu_model): Add declaration.
634 * cpu.c (struct _cpu): Add model_ptr to hold model specific
636 (cpu_model): Return the model internal pointer.
637 (cpu_{create,init,halt}): Call the appropriate model function.
639 * inline.c (mon.c): Move include of mon.c after model.c.
641 * mon.c (_cpu_mon): Add fields to count unaligned memory
643 (mon_issue): Call model_issue, not function_unit_issue.
644 (mon_{read,write}): Count # of unaligned memory accesses.
645 (mon_print_info): Switch to calling model_mon_info and
646 model_mon_info_free instead of function_unit version. Print out
647 number of unaligned reads/writes.
649 * {ppc-instructions,igen.c}: More global changes to add model
652 * inline.{c,h}: Provide for inlining options.c.
653 * options.{c,h}: Ditto.
654 * std-config.h: Add OPTIONS_INLINE.
656 Tue Nov 14 04:47:25 1995 Michael Meissner <meissner@tiktok.cygnus.com>
658 * Makefile.in (devices.o, main.o): Update dependency.
660 * igen.c (gen_model_h): Use correct variable in loop.
661 (gen_model_c): Use strcmp, strcasecmp.
662 (gen_model_c): Use EXTERN_MODEL for arrays.
663 (gen_model_h): Use STATIC_MODEL for arrays.
664 (lf_print_c_semantic_function_header): Delete unused function.
666 * main.c (cpu.h): Include cpu.h to get model.h.
668 * inline.h ({EXTERN,STATIC}_MODEL): Define.
670 Mon Nov 13 09:14:13 1995 Michael Meissner <meissner@tiktok.cygnus.com>
672 * igen.c ({insn,model}_table_fields): Spell mnemonic correctly.
673 (gen_itable_h,itable_c_insn): Ditto.
674 (model support): Move model support around, add support for
675 model-data, model-internal. Use annex field for model-macros
678 * configure.in (--enable-sim-inline): If --enable-sim-inline=no,
679 also define INLINE as nothing.
680 * configure: Regenerate.
682 * std-config.h (INLINE): Rather than nuking INLINE, only define it
683 as __inline__ if any of the INLINE flags are non-zero.
685 * options.c (print_options): Print out WITH_XOR_ENDAIN.
687 Mon Nov 13 23:03:45 1995 Andrew Cagney <cagneyhighland.com.au>
689 * ppc-instructions (rfi): Add missing code.
691 * cpu.c (cpu_get_time_base): Fix calculation of current value of
694 * ppc-spr-table (TBL, TBU): Fix TBL/TBU entries - was confusing
695 m[tf]tb with m[tf]spr.
697 * ppc-instructions (mtspr, mfspr): Fix mttbl - wasn't storing
700 Mon Nov 13 21:35:37 1995 Andrew Cagney <cagneyhighland.com.au>
702 * std-config.h (INLINE, STATIC_INLINE): Was being set to static
703 inline.. Only problem being that with ppc-opcode-simple this gave
704 it the chance to inline all the idecode functions with potentially
705 disasterous results on a 16mb PC. For moment hobble INLINE.
707 * configure.in, std-config.h (WITH_SMP): Make that 5 processors by
710 * configure.in: Tweek flags passed to gcc for --with-sim-warnings.
711 Firstly make them errors and secondly remove the options gcc-245
714 Mon Nov 13 17:57:24 1995 Andrew Cagney <cagney@highland.com.au>
716 * misc.c (zalloc), cpu.c (cpu_init), devices
717 (console_io_read_buffer_callback, icu_io_read_buffer_callback,
718 vm_io_read_buffer_callback), main.c (zalloc), mon.c (memset),
719 sim_calls.c (zalloc) : replace bzero() with memset().
721 * emul_netbsd.c (write_direntries), psim.c (psim_read_register,
722 psim_write_register): replace bcopy() with memcpy().
724 Sun Nov 12 20:55:41 1995 Andrew Cagney <cagneyhighland.com.au>
726 * configure.in: for --disable-sim-inline (--enable-sim-inline=no),
727 force DEFAULT_INLINE to 0 rather then trusting the std
730 Sun Nov 12 20:55:41 1995 Andrew Cagney <cagneyhighland.com.au>
732 * igen.c (lf_print_idecode_table, idecode_table_leaf): Fix
733 generation of switch entries in tables - treat the same as
734 cracking/semantic functions.
736 * igen.c (idecode_switch_end, idecode_switch_leaf): Fix generation
737 of a boolean switch statement (field zero or non-zero).
739 * ppc-opcode-test-1, ppc-opcode-test-2: New files. These test the
740 switch/table generation ability of igen.
742 * igen.c (idecode_switch_leaf): Fix code output when a switch
743 statement needs to look up a table.
745 * igen.c (idecode_declare_if_switch): New function called from
746 gen_idecode_c - need to declare any idecode switch functions
747 before they are used in idecode tables.
749 * igen.c (lf_print_c_cracker_function, idecode_crack_leaf,
750 idecode_crack_insn): Add is_inline_function argument to code
751 printing cracker functions which indicates if STATIC_IDECODE or
752 STATIC_INLINE_IDECODE should be used for definition. For
753 idecode_crack_insn (which implies not duplicating/expanding) don't
754 declare function as inline - we assume that the only time this is
755 code is generated is when things are being tested. For
756 idecode_crack_leaf, make static (instead of INLINE) if the
757 instructions parent is a table as function will always be called
760 * igen.c (idecode_expand_if_switch): Declare as STATIC_IDECODE not
761 STATIC_INLINE_IDECODE. Only the outermost idecode switch will be
762 called directly, all others are called via a table.
764 * igen.c (lf_print_semantic_function_header, semantics_h_leaf,
765 semantics_h_insn, semantics_h_function,
766 lf_print_c_semantic_function, semantics_c_function): Add
767 is_inline_function argument to lf_print_semantic_function_header
768 to indicate if an inline or static function declaration/definition
769 should be output. Depending on situtation call accordingly:
770 functions (not instruction semantic routines) are always inline;
771 Semantic routines are made inline when there is no icache (cache
772 will contain the function address) and are duplicating (see above)
773 and the parent of the instruction is a switch statement.
775 * igen.c (opcode_field_new): Delete. Code changed to use ZALLOC
776 and moved to insn_table_find_opcode_field.
778 * table.c (table_open): Fix typo (nr_model_fields vs nr_fields).
780 * igen.c (model_c_insn): Suggestion - document the name of the
781 instruction on each line of the instruction model table.
783 Fri Nov 10 00:44:38 1995 Andrew Cagney <cagneyhighland.com.au>
785 * emul_netbsd.c (do_ioctl): Cleanup compilation.
787 * sim_callbacks.h (__attribute__): Only define if not defined (was
788 already defined on NetBSD host).
790 Wed Nov 8 21:49:52 1995 Andrew Cagney <cagneyhighland.com.au>
792 * std-config.h (WITH_XOR_ENDIAN), configure.in, Makefile.in: New
793 macro, indicates if the PowerPC's horrible XOR endian mode should
794 be suported. Add to configure and make.
796 * vm_n.h (vm_data_map_read_N, vm_data_map_write_N), vm.c
797 (vm_instruction_map_read): If XOR endian, xor the address
798 with a value from an xor table (indexed by size of access).
800 * vm.c (vm_synchronize_context), cpu.c (cpu_synchronize_context):
801 set up xor table to xor if there is a conflict between the
802 CURRENT_TARGET_ENDIAN and the endian indicated in the MSR. Move
803 check of suported change of endian mode from cpu.c to vm.c.
805 * vm.c (vm_data_map_write_buffer, vm_data_map_read_buffer):
806 Hopefully added correct hack to handle XOR endian mode.
808 FIXME: If NONSTRICT alignment and XOR ENDIAN and MSR indicates
809 little endian mode, the model accepts miss aligned transfers.
811 FIXME: Need to create an `init' device that, during
812 initializatioin for XOR mode, it mushes (XOR address) all the dma
813 data before passing it on to the core for storage. Just like the
816 Wed Nov 8 21:49:52 1995 Andrew Cagney <cagneyhighland.com.au>
818 * devices.c (halt_io_write_buffer_callback): Use value written to
819 halt device to determine exit status. Thus allowing
820 success/failure of OEA tests.
822 Wed Nov 8 00:10:38 1995 Andrew Cagney <cagneyhighland.com.au>
824 * ppc-instructions (icbi): If icache present flush it.
826 Tue Nov 7 23:36:31 1995 Andrew Cagney <cagneyhighland.com.au>
828 * devices.c (htab_init_callback): Add code to create htab/pte.
830 * devices.c (dma_file, file_init_callback, htab_init_callback):
831 New function - Dma the named file into memory at the specified
834 * device_tree.h, device_tree.c (scand_*): New functions.
836 Tue Nov 7 23:36:31 1995 Andrew Cagney <cagneyhighland.com.au>
838 * filter_filename.c, Makefile.in: Change so that only dependant on
839 a very limited nr of files. Stops an unnecessary dependency.
841 Tue Nov 7 15:44:33 1995 Andrew Cagney <cagney@highland.com.au>
843 * core.c (core_map_find_mapping): Use cpu_halt rather than error
844 to abort an access to an undefined address.
846 Sun Nov 12 07:58:09 1995 Michael Meissner <meissner@tiktok.cygnus.com>
848 * igen.c (model_table_insert_{macro,function}): New functions.
849 (insn_table_load_insns): Call them.
850 (gen_model_h): Move section emiting model-macros to be first.
851 (model_{c,h}_function): New functions cloned from semantic
852 functions to print out the prototype and function for
854 (gen_model_{c,h}): Print out model-functions.
856 * ppc-instructions (model_{start,halt,print_info}): Add dummy
859 * options.c (print_options): Print out WITH_{,DEFAULT_}MODEL, not
860 WITH_PPC_{,DEFAULT_}_MODEL.
861 (options_ppc): Delete now unused function.
862 (cpu.h): Include cpu.h, not just basics.h.
864 * std-config.h (WITH_{,DEFAULT_}MODEL): Define.
866 * igen.c (model_macros, last_model_macro): New statics to keep
867 track of macros to go in model.h.
868 (insn_table_load_insns): Add model-macros to model_macros linked
870 (model_table_fields): Add field for printable name.
871 (gen_model_h): If there are model macros defined, print them out.
872 Print out DEFAULT_MODEL as the first model if there any models
873 specified, otherwise MODEL_NONE. Print out external decl for
874 current_model. Print out decl for model_set.
875 (gen_model_c): Add function model_set. Switch to use printable
876 name for the model, not the internal identifier used.
878 * psim.c (current_model): New global variable.
880 * ppc-instructions: Add macros for flag defines. Switch first
881 model so 604 is first.
883 * main.c (main): Call model_set, not function_unit_model.
884 * sim_calls.c (sim_open): Ditto.
885 * sim_calls.c, Makefile.in: sim_calls.c now includes cpu.h.
887 Sat Nov 11 07:27:41 1995 Michael Meissner <meissner@tiktok.cygnus.com>
889 * mon.h (mon_events): New enumeration for other events we want to
891 (mon_event): Add declaration for function.
893 * mon.c (mon_event): New function.
894 (mon_print_info): Print icache misses.
896 * psim.c (run_until_stop): Monitor icache misses.
898 * configure.in (--enable-sim-inline): Fix typos in handling comma
899 separated inline options.
900 (--enable-sim-icache): Echo icache size.
901 * configure: Regenerate.
903 * igen.c (semantics_h_print_function): Emit STATIC_SEMANTICS
904 instead of INLINE_SEMANTICS so that the compiler won't keep all of
905 the semantic functions as inline RTL, given that the address of
906 the function is taken which forces outline calls anyway.
907 (lf_print_c_semantic_function_header): Ditto.
908 (gen_semantics_h): Define STATIC_SEMANTICS as nothing if not
910 (lf_print_c_cracker_function): Emit STATIC_IDECODE instead of
911 STATIC_INLINE_IDECODE.
912 (gen_idecode_c): Define STATIC_IDECODE if not defined.
913 (gen_model_h): Use #ifdefs to define types to hold model units,
915 (model_table_insert): Add a sentinel functional unit at the end to
916 simplify loop processing.
917 (model_c_insn): Use <function-unit>_SENTINAL instead of 0 for any
918 instruction not specifing a function unit for the current model.
919 (gen_model_{c,h}): Provide bounds for model_time_mapping.
921 * inline.h (STATIC_SEMANTICS): Define to be static if
922 SEMANTICS_INLINE is defined.
923 (STATIC_IDECODE): Define to be static if IDECODE_INLINE is
926 * options.c (print_options): Fix typo.
928 Fri Nov 10 06:39:46 1995 Michael Meissner <meissner@tiktok.cygnus.com>
930 * configure.in (--enable-sim-{opcode,config}): Use $srcdir when
931 check for the existence of files.
932 * configure: Regenerate.
934 * table.c (table): New field nr_model_fields.
935 (table_open): New parameter nr_model_fields.
936 (table_entry_read): Parse model fields that begin with a '*' after
938 * igen.c, dgen.c: Change callers of table_open.
940 * igen.c: Add support for dumping model specific information in
942 (insn_field_name): Delete unused array.
943 (global variables): Make global variables static, so we can tell
944 when they are no longer used.
945 (cache_semantic_actual): Delete unused variable.
946 (insn_table_load_insns): If the insn is really a machine model,
947 call model_table_insert instead of other processing.
948 (model_table_insert): New function to handle defining the
949 functional units of a particular machine model.
950 (insn_table): Add last_function field so we can add functions at
952 (insn_table_insert_function): Use last_function field when
953 appending new function.
955 * ppc-instructions: Add a few model specific information for 603,
956 603e, and 604 for testing purposes.
958 * table.h (table_model_entry): New linked list to hold model
959 specific information, one per line.
960 (table_entry): Add model_first, model_last fields.
962 * configure.in (--enable-sim-inline): If gcc is found and
963 --enable-sim-inline is not specified, defaine DEFAULT_INLINE to 1,
965 (--enable-sim-reserved-bits): New switch to check whether reserved
966 bits are set in the instruction.
967 (--enable-sim-opcode): Make complex the default.
968 (all switches): Add appropriate checks and error messages.
969 * configure: Regenerate.
971 * Makefile.in (RESERVED_CFLAGS): New variable set by
972 --enable-sim-reserved-bits.
973 (CONFIG_CFLAGS): Include RESERVED_CFLAGS.
974 (BUILT_SRC): igen now generates model.c and model.h.
975 (LIB_OBJ): Include table.o.
976 (tmp-igen): Add -m/-M options to write model.c/model.h.
977 (model.o): New object.
978 (CPU_H): Include model.h.
980 * cpu.h: Include model.h.
982 * std-config.h (WITH_RESERVED_BITS): Define.
983 (MODEL_INLINE): Ditto.
985 * options.c (print_options): Print out WITH_RESERVED_BITS.
987 Thu Nov 9 12:22:15 1995 Michael Meissner <meissner@tiktok.cygnus.com>
989 * configure.in: If --silent, don't output information messages.
990 * configure: Regenerate.
992 * configure.in (--enable-sim-alignment): Fix typo in specifing non
994 (--enable-sim-switch): Make default on.
995 (--enable-sim-duplicate): Make default on.
996 (--enable-sim-smp): Make default 0.
997 (--enable-sim-mon): Don't set sim_float if not set.
998 (--enable-sim-inline): If gcc is found and --enable-sim-inline is
999 not specified, define DEFAULT_INLINE to be 2.
1000 (all --enable-sim-* rules): Echo rules set to non empty to file
1002 * configure: Regenerate.
1004 * options.c (options_env): Fix typo if WITH_ENV is 0.
1005 (print_options): Print GCC compiler version if available and
1006 date/time options was compiled. If OPCODE_RULES, IGEN_FLAGS,
1007 and/or DGEN_FLAGS are defined, print them.
1009 * Makefile.in (all link actions): Pass SIM_CFLAGS as well as
1011 (options.o): Compile options.o with OPCODE_RULES, IGEN_FLAGS, and
1012 DGEN_FLAGS defined, so they can be printed out.
1014 * igen.c (lf_print_c_validate): Check for WITH_ASSERT, so that
1015 this test can be compiled away if the user really wants a fast
1016 simulator by not doing assertion failures.
1018 Wed Nov 8 13:19:47 1995 Michael Meissner <meissner@tiktok.cygnus.com>
1020 * options.c: New file to print out all of the WITH_ options.
1021 * options.h: New include file to declare print_options.
1022 * debug.h (trace_options): Add trace_opts to call print_options.
1023 * debug.c (trace_description): Add trace_opts support.
1024 * main.c (main): If user requested options, print them.
1025 * sim_calls.c (sim_open): Ditto.
1027 * igen.c (opcode_field_new): Add void to make it a proper prototype.
1029 * emul_generic.c (emul_enter_call): Make printf_filtered arguments
1031 * emul_netbsd.c (do_kill): Ditto.
1032 * registers.c (registers_dump): Ditto.
1033 * vm.c (om_translate_effective_to_real): Ditto.
1034 * vm_n.h (vm_data_map_read_N): Ditto.
1035 (vm_data_map_write_N): Ditto.
1036 * devices.h (DTRACE_INIT): Ditto.
1037 (DTRACE_{ATTACH,DETACH}_ADDRESS): Ditto.
1038 (DTRACE_IO_{READ,WRITE}_BUFFER): Ditto.
1039 (DTRACE_DMA_{READ,WRITE}_BUFFER): Ditto.
1040 * devices.c (update_for_binary_section): Ditto.
1041 (write_stack_arguments): Ditto.
1042 (stack_ioctl_callback): Ditto.
1043 * device_tree.c (device_tree_add_passthrough): Ditto.
1044 (device_tree_{add,find}_device): Ditto.
1045 (device_tree_{add,find}_integer): Ditto.
1046 (device_tree_find_{string,boolean}): Ditto.
1047 (device_tree_init{,_device}): Ditto.
1048 (device_tree_dump): Ditto.
1049 * sim_calls.c (sim_{read,write}): Ditto.
1050 (sim_{fetch,store}_register): Ditto.
1051 (sim_stop_reason): Ditto.
1053 * sim_callbacks.h (printf_filtered): Declare with attribute
1054 printf, so we can enable format checks.
1056 * devices.c (console_io_{read,write}_buffer_callback): Cast swtich
1057 argument to int, since ANSI doesn't allow long switch values.
1058 * emul_netbsd.c (do___sysctl): Ditto.
1060 * emul_netbsd.c (do___sysctl): Fix up printf call.
1062 * corefile.c (core_translate): Don't do arithmetic with void *
1063 pointers. Cast to char * first.
1065 * function_unit.c (FUNC_{LOAD,STORE}): Rename from {LOAD,STORE}
1066 and change all uses.
1068 * Makefile.in ({FUNC,MODEL,WARNING}_CFLAGS): New flags set by
1069 configure --enable switches.
1070 (CONFIG_CFLAGS): Include FUNC_CFLAGS and MODE_CFLAGS.
1071 (.c.o): Include WARNING_CFLAGS.
1072 (CPU_H): Include function_unit.h.
1073 (LIB_OBJ): Include function_unit.o.
1074 (BUILT_SRC_WO_CONFIG): Split from BUILT_SRC and do not include
1075 config.h or ppc-config.h.
1076 (BUILT_SRC): Include BUILT_SRC_WO_CONFIG, config.h and
1078 (filter_filename.o): Include config.h/ppc-config.h dependencies.
1079 (idecode.o, semantics.o, psim.o): Specify CC line without
1080 WARNING_CFLAGS so that we don't get all of the unused variable
1081 warnings that are generated.
1082 (function_unit.o): Add rule to build.
1083 (main.o, sim_calls.o): Add function_unit.h, itable.h dependencies.
1084 (mon.o): Include mon.c dependency.
1085 (TAGS): Depend on BUILT_SRC.
1086 (clean): Don't delete config.h or ppc-config.h
1088 * basics.h (sim_callbacks.h): Move include after the include of
1089 config.h and ppc-config.h.
1091 * bits.{h,c} (ROTL32,ROTL64): Move these functions to bits.c. Add
1092 support for BITS_INLINE to inline these. Add declarations to
1095 * configure.in (--enable-sim-warnings): Add new option to specify
1096 compiler warnings for all modules except idecode.o and semantics.o
1097 which have lots of unused variables because they are machine
1099 (--enable-sim-function-unit): New switch to configure whether
1100 function unit support is compiled in or not.
1101 (--enable-sim-{,default-}mode): New switches to control which cpu
1103 * configure: Regenerate.
1105 * corefile.c (core_attach_address_callback): Delete unused
1106 variable device_address.
1108 * cpu.c (struct _cpu): Add function unit pointer field func_unit.
1109 (cpu_create): If WITH_FUNCTION_UNIT, call function_unit_create.
1110 (cpu_init): If WITH_FUNCTION_UNIT, call function_unit_init.
1111 (cpu_halt): If WITH_FUNCTION_UNIT, call function_unit_halt.
1112 (cpu_function_unit): New function to return func_unit field.
1114 * cpu.h (function_unit.h): Include new include file.
1115 (cpu_function_unit): Declare.
1117 * debug.c (stdlib.h): Test HAVE_STDLIB_H, not HAVE_STDLIB.
1118 (config.h): Include config.h.
1120 * devices.c (icu_io_write_buffer_callback): Delete unused variable
1123 * emul_generic.c (emul_exit_call): Print out status value.
1125 * emul_netbsd.c (do_read): Delete unused variable nr_moved.
1127 * filter_filename.h (includes): Include config.h, ppc-config.h,
1130 * inline.c: Include bits.c if BITS_INLINE. Include
1131 function_unit.c if FUNCTION_UNIT_INLINE.
1133 * inline.h (INLINE_BITS): Define if BITS_INLINE.
1134 (INLINE_FUNCTION_UNIT): Define if FUNCTION_UNIT_INLINE.
1136 * interrupts.c (instruction_storage_interrupt): Delete unused
1139 * lf.h (config.h): Include config.h.
1141 * main.c (includes): Include function_unit.c. If HAVE_UNISTD_H,
1143 (usage): Update for -m model, -i, and -I options.
1144 (main): Delete unused variables stack_pointer and i. Add support
1145 for -i, -m model arguments. Call psim_print_info with verbose ==
1146 1 if -i, and verbose == 2 if -I.
1148 * mon.c (stdio.h): Include stdio.h to pick up sprintf prototype.
1149 (mon_issue): Call function_unit_issue if function units are
1151 (mon_print_info): Take psim * argument. Print out information
1152 from function_unit if available. Move read/write stats to always
1153 print, instead of printing if verbose > 1. Fix up plural
1156 * mon.h (mon_print_info): Update prototype.
1158 * psim.c (current_ppc_model): Add global variable.
1159 (psim_print_info): Pass system argument to mon_print_info.
1161 * sim_calls.c (function_unit.h): Include.
1162 (sim_open): Add support for -i and -m model options. If -i call
1163 psim_print_info with verbose == 1, if -I, with verbose == 2.
1164 (sim_resume): Delete unused variable program_counter.
1166 * std-config.h (WITH_FUNCTION_UNIT): Define.
1167 (ppc_model): Add enumeration giving all PowerPC models currently
1169 ({WITH,CURRENT}_PPC_MODEL): Define.
1170 (FUNCTION_UNIT_INLINE): Define.
1172 * table.c (config.h): Include config.h.
1174 * vm.c (om_virtual_to_real): Print pte_word_{0,1} so the compiler
1175 doesn't complain that they're unused.
1177 * vm_n.h (vm_data_map_read_N): Delete unused variable rval.
1179 Mon Nov 6 23:15:54 1995 Andrew Cagney <cagney@highland.com.au>
1181 * sim-endian.c (ppc-endian.c), sim-endian.h (ppc-endian.h):
1182 renameed. These files are target independant.
1183 * Makefile.in, basics.h: update for new name.
1185 * sim-endian.h (SWAP_N), sim-endian.c (_SWAP_1): Rename existing
1186 SWAP_<N> to _SWAP_<N> so that sim-endian.h can contain SWAP_N
1187 macro's as required.
1189 * sim-endian.c, sim-endian-n.h (new file): Move endian code into a
1190 debugable header file.
1192 * ppc-instructions (Byte-Reverse): Enable byte reverse
1193 instructions using SWAP_N macros.
1195 Mon Nov 6 10:39:28 1995 Michael Meissner <meissner@tiktok.cygnus.com>
1197 * Makefile.in (config.status): Remove references to config.make
1200 * config.{make,hdr}: Delete, no longer used.
1201 * build-psim: Ditto.
1203 Mon Nov 6 20:49:56 1995 Andrew Cagney <cagney@highland.com.au>
1205 * sim_calls.c (sim_open): Fix parsing of `target sim' options.
1207 * device_tree.c (device_tree_add_string): Wasn't saving the value
1208 of the string being entered into the tree.
1210 * psim.c (create_filed_device_tree): Not terminating string device
1213 * psim.c (psim_create): Use `env' instead of
1214 `environment-architecture' to be consistent with configure.
1215 Reconize user/uea, virtual/vea and operating/oea.
1217 Sat Nov 4 12:29:45 1995 Fred Fish <fnf@cygnus.com>
1219 * core.c: Rename to corefile.c
1220 * core.h: Rename to corefile.h
1221 * inline.c: Include corefile.h, renamed from core.h.
1222 * cpu.h: Include corefile.h, renamed from core.h
1223 * vm.c: Include corefile.h, renamed from core.h
1224 * corefile.c: Include corefile.h rather than core.h
1225 * README.psim (KNOWN PROBLEMS): Change core.* references to corefile.*
1227 * Makefile.in (CPU_H): Change core.h to corefile.h
1228 (vm.o): Change dependency to corefile.h
1229 (LIB_SRC): Change core.c to corefile.c.
1230 (LIB_OBJ): Change core.o to corefile.o.
1231 (corefile.o): Change dependencies to corefile.c, corefile.h.
1233 Fri Nov 3 11:37:24 1995 Michael Meissner <meissner@tiktok.cygnus.com>
1235 * ppc-instructions (data cache instructions): Make all data cache
1236 instructions nops instead of invalid instructions.
1238 * Makefile.in (CONFIG_CFLAGS): Add ALIGNMENT_CFLAGS and
1239 TIMEBASE_CFLAGS which weren't included.
1241 Thu Nov 2 08:54:04 1995 Michael Meissner <meissner@tiktok.cygnus.com>
1243 * Makefile.in: Uncomment built file dependencies.
1245 * configure.in: Rewrite --enable-sim switch handling to use the
1246 autoconf builtins so it works correctly if the configure or
1247 Makefile.in files are modified and make decides to rebuild
1248 Makefile. Also document all of the --enable-sim switches
1249 supported. Check whether getrusage and sys/resource.h are
1251 * config.in: Regenerate.
1252 * configure: Regenerate.
1253 * Makefile.in: Add support for all of the variables set with
1254 --enable-sim switches.
1256 * Makefile.in (clean): make clean now removes all built sources as
1259 * cpu.c: Use HAVE_STRING_H, HAVE_STRINGS_H, HAVE_UNISTD_H,
1260 HAVE_TIME_H, HAVE_SYS_TIMES_H, HAVE_SYS_RESOURCE_H defined in
1261 the generated config.h.
1263 * device_tree.c: Ditto.
1266 * emul_netbsd.c: Ditto.
1271 * registers.c: Ditto.
1272 * sim_calls.c: Ditt.
1276 * main.c (main): Call psim_print_info with verbose == 2.
1278 * mon.c (mon_print_info): Align the cpu number and number of
1279 instructions fields. Do not print an instruction category if the
1280 CPU did not execute any of those instructions. Print out number
1281 of reads and writes. If getrusage is supported, print out number
1282 of simulated instructins per second.
1284 * configure.in: Add support for --enable-sim-opcode=stupid.
1285 * configure: Regenerate.
1287 Wed Nov 1 23:46:59 1995 Andrew Cagney <cagney@highland.com.au>
1289 * std-config (INLINE_DEVICE_TREE): Don't inline either of
1290 device_tree.c or devices.c. There is no significant gain.
1292 * configure.in, Makefile.in: add --enable-sim-icache=[0-9]* and
1295 Wed Nov 1 23:46:59 1995 Andrew Cagney <cagney@highland.com.au>
1297 * igen.c (main), misc.h (target_a2i, i2target), misc.c: Add
1298 functions to convert between target and igen internal bit numbers.
1299 Make IO go through these functions. Add -b (bit size) and -h (high
1300 bit nr) options to igen. Typical usage would be: ./igen -b 16 -h
1301 15 for a 16 bit instruction format with the msb given a number 15.
1303 Wed Nov 1 22:17:32 1995 Andrew Cagney <cagney@highland.com.au>
1305 * dgen.c (main): Was outputting optarg even when it was NULL.
1307 Tue Oct 31 23:48:33 1995 Andrew Cagney <cagney@highland.com.au>
1309 * vm_n.h (vm_data_map_load_N, vm_data_map_store_n), debug.h,
1310 debug.c: Add tracing of load/store unit (virtual) with -t
1313 Tue Oct 31 21:44:01 1995 Andrew Cagney <cagney@highland.com.au>
1315 * std-config.h (WITH_ENVIRONMENT): Add USER_ENVIRONMENT which does
1316 not include things such as the time base and events.
1318 * interrupt.c, sim_calls.c, cpu.h, vm.c, configure.in: Add UEA to
1319 all environment switches for above.
1321 * psim.c (psim_create): ditto - new device tree node name is
1322 /options/environment-architecture with values user, virtual and
1325 Tue Oct 31 21:31:32 1995 Andrew Cagney <cagney@highland.com.au>
1327 * ppc-opcode-stupid: Third example of use of opcode table - this
1328 one expands all mtspr/mfspr and branch instructions. Appears to
1329 give about a 10% gain in performance if everything enabled. Also
1330 takes about 150mb of swap to build.
1332 Wed Nov 1 10:49:48 1995 Michael Meissner <meissner@tiktok.cygnus.com>
1334 * emul_netbsd.c (do_exit): Print arguments and close parenthesis
1335 if tracing, since exit doesn't go through emul_exit_call.
1336 (do_read): Print arguments if tracing.
1342 (do_sigprocmask): Replace trace with printing arguments if
1344 (do_ioctl): Print arguments if tracing.
1348 (do_gettimeofday): Ditto.
1349 (do_getrusage): Ditto.
1350 (do_fstatfs): Ditto.
1352 * filter_filename.c: New file to provide filter_filename to strip
1353 the directory prefix from a file.
1354 * filter_filename.h: New include file to declare filter_filename.
1356 * debug.h: Include filter_filename.h.
1357 (TRACE,DTRACE,ERROR): Use filter_filename on __FILE__.
1359 * misc.h: Include filter_filename.h.
1360 (ASSERT): Use filter_filename on __FILE__.
1362 * igen.c (lf_print_my_prefix): Use filter_filename on the filename
1365 * Makefile.in: Add filter_filename support.
1367 * ppc-instructions (dcbi, icbi): Make these NOPs rather than
1368 invalid instructions.
1370 * configure.in: Add support for more --enable-sim-* switches.
1371 Use config.make and config.hdr to write to Makefile and config.h
1372 respectively. Don't rewrite Makefile, just append to it.
1373 * configure: Regenerate.
1374 * config.{make,hdr}: New shell scripts.
1376 * Makefile.in: Remove all variables set by configure.in.
1377 (psim.o): Depend on $(BUILT_SRC) also.
1379 * emul_netbsd.c (do_gettimeofday,do_getrusage): When comparing an
1380 integer, use 0, not NULL.
1382 Tue Oct 31 15:20:04 1995 Michael Meissner <meissner@tiktok.cygnus.com>
1384 * configure.in: Add support for --enable-sim-inline,
1385 --enable-sim-bswap, --enable-sim-cflags, --enable-sim-complex,
1386 --enable-sim-switch, --enable-sim-duplicate, --enable-sim-filter,
1387 and --enable-sim-endian switch to control various Makefile
1389 * configure: Regenerate from configure.in.
1390 * Makefile.in: Add various Make variables that the various
1393 * std-config.h (DEFAULT_INLINE): Don't set this to 2 if using GCC
1394 and optimizing by default.
1396 Fri Oct 27 19:26:27 1995 Andrew Cagney <cagney@highland.com.au>
1398 * bits.h (ROTL32, ROTL64): Were functions, made them macros, now
1399 make them functions again. Appears 2.6.3 is confused by just a
1402 Thu Oct 26 18:31:58 1995 Andrew Cagney <cagney@highland.com.au>
1404 * ppc-endian.c (SWAP_8): Fix 8 byte swap!
1406 * psim.c (psim_create): Not correctly checking that runtime
1407 configuration of things like ENDIAN, ENVIRONMENT and ALIGNMENT
1408 matched the compiled in ones.
1410 * debug.h (ITRACE), igen.c: Tidy up more tracing flags -
1411 trace_semantics is now different to trace_idecode, the former
1414 Tue Oct 24 21:54:13 1995 Andrew Cagney <cagney@highland.com.au>
1416 * ppc-instructions (mtsrin): Missing instruction
1417 * ppc-instructions (mfsrin): Missing instruction
1418 * ppc-instructions (eieio): Missing instruction
1420 Tue Oct 24 20:55:29 1995 Andrew Cagney <cagney@highland.com.au>
1422 * build-psim: New shell script - see internals for usage,
1423 simplifies the process of building custom simulators.
1425 Mon Oct 23 23:48:59 1995 Andrew Cagney <cagney@highland.com.au>
1427 * std-config.h (SEMANTICS_INLINE): Tidy up notes on each of the
1428 INLINE macros. Make SEMANTICS_INLINE == 1 if DEFAULT_INLINE == 2.
1429 Don't use DEFAULT_INLINE to define REGISTERS_INLINE DEVICES_INLINE
1430 DEVICE_TREE_INLINE or INTERRUPTS_INLINE as none of these are on
1431 the instruction or data critical paths.
1433 * FIXME: devices.c/emul_netbsd.c would benefit (slightly) from
1434 the inclusion of device_tree.c/emul_generic.c.
1436 Mon Oct 23 00:31:50 1995 Andrew Cagney <cagney@highland.com.au>
1438 * os_emul.[hc], emul_generic.[hc], emul_netbsd.[hc]: replace
1439 system.[hc]. Start of suport for multiple emulations and
1440 emulation state (os_emul object).
1442 * emul_generic.[hc]: Start of code to implement proper system call
1445 Sun Oct 22 21:33:51 1995 Andrew Cagney <cagney@highland.com.au>
1447 * cpu.h, cpu.c (cpu_init): New function, zero the registers before
1448 the processor is started. Fixes problem of registers being
1449 undefined when restarting from within gdb.
1451 * cpu.h, cpu.c (cpu_flush_icache): New function, flushes the
1452 instruction cache (if present). Fixes problem of cpu caching gdb
1453 breakpoint instructions.
1455 FIXME: PSIM sometimes aborts calling error(), it should instead
1456 call sim_error() say which takes care of housekeeping such as
1457 saving the CIA before calling error.
1459 * NOTE: cpu_flush_cache() instead of cpu_synchronize_context() is
1460 used when restarting a simulation because the latter has the
1461 unwanted side effect (well I as a kernel hacker think it is) of
1462 performing an isync when the instruction stream doesn't contain
1465 Sun Oct 22 19:27:48 1995 Andrew Cagney <cagney@highland.com.au>
1467 * mon.h (new), mon.c (new), std-config.h (WITH_MON): Performance
1468 monitoring module. Counts both instructions issued and
1471 * NOTE: mon does not contain to count instruction loads as this
1472 information is already available from the mon_issue() hook.
1474 * igen.c (lf_print_c_semantic), vm_n.h: Add counting code.
1476 * psim.h, psim.c (psim_create), cpu.h, cpu.c (cpu_create): Attach
1477 a common monitor to each of the cpus. Delete
1478 cpu_increment_number_of_insns() and cpu_get_number_of_insns()
1479 replaced by copied code in mon.[hc].
1481 Sun Oct 22 18:42:45 1995 Andrew Cagney <cagney@highland.com.au>
1483 * sim_calls.c, main.c, psim.c (psim_create): always create
1484 `WITH_SMP' cpus. The actual number of CPU's active in a
1485 simulation run is taken from the device node: /init/smp (an
1486 integer). WITH_SMP changed to 2 (remember to put it back to 0).
1488 Fri Oct 20 17:26:54 1995 Andrew Cagney <cagney@highland.com.au>
1490 * system.c: More system call emulation. If code appears NetBSD
1491 specific, make conditional to being compiled on a NetBSD system
1494 Wed Oct 18 23:02:20 1995 Andrew Cagney <cagney@highland.com.au>
1496 * Makefile.in, gen.c(delete), igen.c(new), dgen.c(new),
1497 lf.[ch](new), table.[ch](new): Split into two generators - igen
1498 that outputs the instruction tables and dgen that outputs the spr
1499 tables. Add -f (filter out) flag to igen to filter out certain
1500 instructions (ex 64 bit ones) from the created tables. Include
1501 $(LIBIBERTY_LIB) in link options in case host lacks some libc
1504 * NOTE: igen, since it was originally written for the
1505 PowerPC/RS6000, things the MSB is 0 and the LSB is 63{31}.
1507 * Makefile.in, std-config.h, ppc-cache-rules(new),
1508 ppc-opcode-complex(new), ppc-opcode-simple(new): (for igen) Create
1509 cache-rule and opcode-rule tables from macros found std-config.h.
1510 Delete corresponding macro's from std-config.h.
1512 * igen.c (gen_itable_c, gen_itable_h), Makefile.in: code to output
1513 an table of all the instructions. Code to output a type
1514 enumerating all the instructin names.
1516 * igen.c(lf_print_c_semantic): Move call to increment instruction
1517 counter so that it occures _after_ the instruction has been fully
1518 validated, was double counting illegal/invalid instructions. Add
1519 conditional so only compiled in when WITH_PROFILE enabled (enabled
1522 * igen.c, cpu.h, cpu.c(cpu_increment_number_of_insns): Include
1523 itable.h, count individual instruction types not just total,
1524 adjust reporting functions to output this.
1526 * ppc-instructions (64 bit Load Doubleword with Update Indexed):
1527 Had 32./ instead of 31./
1529 * ppc-instructions (64 bit Store Double Word Conditional Indexed):
1530 bitrot - updated to use newer CR register operators.
1532 * ppc-instructions (64bit Floating Convert from Integer
1533 Doubleword): Correct call to Round_Float().
1535 Mon Oct 16 00:31:20 1995 Andrew Cagney <cagney@highland.com.au>
1537 * basics.h: #include "sim_callbacks.h" earlier so that its
1538 prototypes are declared in all other header files.
1540 * bits.h, bits.c, idecode_expression.h (ROTL32, ROTL64): Update
1541 doc in bits.h, remove dead code in bits.c, move ROTL32/ROTL64 into
1544 * cpu.c(cpu_add_commas), device_tree.h, device_tree.c(scand_*):
1545 Add size of buffer argument to functions writing a string into a
1546 buffer. Check for buffer overflow.
1548 Sun Oct 15 22:16:11 1995 Andrew Cagney <cagney@highland.com.au>
1550 * devices.h, devices.c, debug.h, debug.c: add macro's for tracing
1551 of each device. Make parameter names consistent so macros work.
1552 Use macro's in device functions.
1554 * device_tree.c, devices.h, devices.c: include path to device in a
1555 devices node when creating it.
1557 * device_tree.c, debug.h, debug.c: Add tracing of `device-tree'.
1559 * core.c: add tracing of core-device, adjust parameter names in
1560 core functions to be consistent with those in devices*.
1562 Sun Oct 15 20:33:20 1995 Andrew Cagney <cagney@highland.com.au>
1564 * debug.h, debug.c (trace_option): New function. Parses the trace
1565 option, updating the trace array.
1567 * debug.h, debug.c (trace_usage): New function. Outputs the list
1568 of all possible trace options.
1570 * sim_calls.c (sim_open), main.c (main): Use new trace_option() to
1571 parse trace options specified with the simpler -t flag. Adjust
1574 * FIXME: basic parsing of command line options is still duplicated
1575 by main.c and sim_calls.c
1577 Thu Oct 26 10:42:28 1995 Michael Meissner <meissner@tiktok.cygnus.com>
1579 * Makefile.in (clean): Delete *.i and *.out files.
1581 * ppc-endian.c (SWAP_n): Add SET argument to allow use of SWAP
1582 macros for either assignment or return. Fix SWAP_8 to use a
1583 union, and two SWAP_4's. Delete SWAP_N, since nobody uses it now.
1584 (ENDIAN_N): Add SET argument to SWAP_n calls. Delete macro defs
1585 that hardwired swapping on/off, let optimizer delete dead code.
1587 * main.c (main): Add printf that we caught a signal and print out
1588 the failing address.
1590 Thu Oct 19 21:43:39 1995 Fred Fish <fnf@fishfood.amigalib.com>
1592 * Makefile.in: Remove tabs from otherwise empty line.
1593 Confuses many non-GNU versions of "make".
1595 Wed Oct 18 08:51:25 1995 Michael Meissner <meissner@tiktok.cygnus.com>
1597 * Makefile.in (clean): Delete files produced by gen.
1599 Mon Oct 16 17:34:24 1995 Michael Meissner <meissner@tiktok.cygnus.com>
1601 * gen.c (lf_print_c_semantic_function): Move counting # of
1602 instructions here so it works with caching.
1603 (gen_idecode_c): Move from here.
1605 Wed Oct 11 17:13:15 1995 Andrew Cagney <cagney@highland.com.au>
1607 * gen.c, ppc-instructions, psim.c: Fix code for generating
1608 cracking instruction cache. Delete the code that cached just the
1609 result from doing an instruction lookup - this ran slower than no
1612 Fri Oct 13 09:58:43 1995 Michael Meissner <meissner@tiktok.cygnus.com>
1614 * Makefile.in (gen.o): Include $(INLINE_CFLAGS).
1616 * debug.h (ppc_trace): Rename from trace, to avoid a conflict with
1617 TCL when gdb is linked with the simulator.
1618 * debug.c (ppc_trace): Ditto.
1619 * sim_calls.c (sim_open): Change trace -> ppc_trace.
1620 * main.c (main): Ditto.
1622 * cpu.c (cpu_add_commas): Remove extra static.
1624 Thu Oct 12 11:35:53 1995 Michael Meissner <meissner@tiktok.cygnus.com>
1626 * Makefile.in (psim.o): Now that inlines are turned on, make
1627 psim.o depend on all sources.
1629 * cpu.c (cpu_add_commas): New function to format a long with
1631 (cpu_print_info): Use it to print number_of_insns.
1633 * ppc-endian.c (SWAP_n): New macros to speed up byte swapping for
1635 (ENDIAN_N): If both target and host byte orders are known, don't
1636 bother testing CURRENT_{TARGET,HOST}_BYTE_ORDER.
1638 * ppc-endian.h (target specific H2T_n/T2H_n macros): Remove #if 0
1639 to allow target specific H2T_n/T2H_n macros to be used.
1640 (htonl, ntohl): If compiled on a 486 by GCC and WITH_BSWAP is
1641 non-zero, redefine the htonl/ntohl macros to use the BSWAP instead
1642 of the 3 instruction sequence that runs on 386s.
1644 * std-config.h (WITH_{HOST,TARGET}_BYTE_ORDER): Don't override if
1645 specified on the compile line.
1646 (WITH_BSWAP): If not defined, define as 0.
1648 * Makefile.in (INLINE_CFLAGS): Add -DDEFAULT_INLINE=2 to add
1649 default inline support. Pass INLINE_CFLAGS when compiling.
1651 * devices.{h,c} (unimp_device_ioctl): Use STATIC_DEVICES, not
1652 INLINE_DEVICES since GCC doesn't like inline functions that
1653 accept variable arguments.
1654 (stack_ioctl_callback): Make function just static because GCC
1655 doesn't like inline functions that accept variable arguments.
1657 * devices.h (STATIC_DEVICES): Define as empty if not defined.
1659 * inline.c: Correct pathnames of included C files to match current
1662 * inline.h (STATIC_DEVICES): If DEVICES_INLINE is defined to be
1663 non-zero, define STATIC_DEVICES to be static.
1665 * std-config.h (INLINE): If GNU C and optimizing, define this as
1667 (DEFAULT_INLINE): If not defined, define as 0.
1668 (ENDIAN_INLINE): If not defined, define as DEFAULT_INLINE.
1669 ({CORE,VM,CPU,EVENTS,REGISTERS,INTERRUPTS}_INLINE): Ditto.
1670 ({SPREG,IDECODE}_INLINE): Ditto.
1672 Wed Oct 11 17:13:15 1995 Andrew Cagney <cagney@highland.com.au>
1674 * ppc-instructions: Initial cut of floating point suport added.
1675 Of note include - use of host IEEE floating point instructions,
1676 use of PowerPC manual pseudo code to handle the FPSCR. It is not
1677 currently a pretty sight.
1679 * memory_map.h, memory_map.c, memory_map_n.h, core.h, core.c:
1680 merge into core.h, core.c, core_n.h. The type memory_map replaced
1681 with core_map. This removes a level of pointer indirection when
1682 translating an address.
1684 * memory_map.h, memory_map.c, memory_map_n.h: delete.
1686 * Makefile.in et.al (sorry): tweek to use new core, core_map and
1689 Wed Oct 11 12:10:26 1995 Andrew Cagney <cagney@highland.com.au>
1691 * sim_calls.c, main.c: Add -g (trace_gdb) option, add tracing to
1692 most of the other functions in sim_calls.c.
1694 * basics.h (CONCAT3), memory_map.c, memory_map_n.h, Makefile.in:
1695 Add macros to better cover up `generic' code. Makes it possible
1696 to step through the generic code!
1698 * vm.c, vm_n.h, Makefile.in: ditto
1700 Tue Oct 10 15:42:59 1995 Andrew Cagney <cagney@highland.com.au>
1702 * devices.h, devices.c, memory_map.h, memory_map.c: Changed
1703 callback interface so that there is a read/write buffer but no
1704 read/write_word. VEA default memory read/write handler sometimes
1705 couldn't resolve an access and of those some were for a memory
1706 fault and some were because gdb was making a bogus request.
1708 * devices.h, devices.c, memory_map.h, memory_map.c, vm.h, vm.c:
1709 eliminate transfer_mode (raw or cooked) parameter from read/write
1712 Fri Oct 6 20:23:56 1995 Andrew Cagney <cagney@highland.com.au>
1714 * ppc-instructions (fmul, fmuls): correct instruction format - had
1717 Wed Oct 4 17:31:12 1995 Andrew Cagney <cagney@highland.com.au>
1719 * psim.c, device_tree.h, device_tree.c, devices.c (printd_*,
1720 scand_*): new functions to parse/print fields in device names
1721 while hiding any machine dependency.
1723 * devices.c, psim.c: Change the stack init code so that it is
1724 handled by a device. Arguments passed across using a device ioctl
1727 * devices.h, devices.c: device ioctl callback changed to allow a
1728 variable number of arguments. This gives greater flexability and
1729 greater chance of bugs.
1731 Tue Oct 3 22:01:56 1995 Andrew Cagney <cagney@highland.com.au>
1733 * main.c (printf_filtered, error): Missing va_end() to close off
1734 variable argument use.
1736 * Makefile.in (tmp-gencode): comment out hack to get around some
1737 versions of make not handling files being created as side-effects.
1739 * gen.c (lf_open): Add -n (real_file_name) option. Specifies an
1740 alternative file name to use in output files for things like #line
1743 Makefile.in (tmp-gencode): Use gen -n so that debug info is
1746 * Makefile.in (TARGETLIB): Use this instead of libsim.a in the
1749 Sat Oct 7 22:40:59 1995 Michael Meissner <meissner@tiktok.cygnus.com>
1751 * sim_calls.c (sim_set_callbacks): Define new function.
1753 Fri Oct 6 17:23:10 1995 Michael Meissner <meissner@tiktok.cygnus.com>
1755 * psim.c (psim_print_info): Print exit status or signal number.
1757 Mon Oct 2 11:46:37 1995 Michael Meissner <meissner@tiktok.cygnus.com>
1759 * cpu.c (struct _cpu): Add number_of_insns field to trace how many
1760 instructions are executed.
1761 (cpu_increment_number_of_insns): New function to increment the
1762 number of instructions issued.
1763 (cpu_get_number_of_insns): New function to return the number of
1764 instructions issued.
1765 (cpu_print_info): New function to print cpu related information.
1766 At present, print the number of instructions executed.
1768 * gen_idecode_c: Emit call to cpu_increment_number_of_insns within
1771 * psim.c (psim_print_info): New function to iterate over each of
1772 the CPU's calling cpu_print_info.
1774 * psim.h,cpu.h: Add new declarations.
1776 * sim_calls.c (sim_open): Add argument processing to add the same
1777 switches main.c accepts for the standalone processor.
1778 (sim_close): Call psim_print_info if -I.
1780 * main.c (main): Add comment saying to update sim_calls.c when
1781 adding switches. Add -I to call psim_print_info when done.
1782 (usage): Update usage message.
1784 Sun Oct 1 13:52:59 1995 Michael Meissner <meissner@tiktok.cygnus.com>
1786 * main.c (printf_filtered): Correct to match new prototype.
1788 Sat Sep 30 20:47:05 1995 Michael Meissner <meissner@tiktok.cygnus.com>
1790 * sim_callbacks.h (printf_filtered): Correct prototype.
1792 Thu Sep 21 16:26:49 1995 Michael Meissner <meissner@tiktok.cygnus.com>
1794 * device_tree.c (OEA_MEMORY_SIZE): Define if not defined to
1796 (clayton_memory_size): Define as OEA_MEMORY_SIZE.
1798 * std-config.h (WITH_TRACE): Default to 1 now.
1800 * psim.c (write_stack_arguments): Don't write any stack arguments
1803 * main.c (main): Switch to using getopt. Make -p also set
1804 trace_semantics. Make -a turn on all trace flags. Make -C turn
1807 * device_tree.c (create_option_device_node): Assume a program is
1808 OEA if the start address is < 4096, not just == 0.
1810 Wed Sep 20 13:36:06 1995 Ian Lance Taylor <ian@cygnus.com>
1812 * Makefile.in (maintainer-clean): New synonym for realclean.
1814 Sun Sep 10 10:23:56 1995 Michael Tiemann <tiemann@axon.cygnus.com>
1816 * registers.c (register_description): Add gdb synonyms for cr
1819 Fri Sep 8 13:16:10 1995 Ian Lance Taylor <ian@cygnus.com>
1821 * Makefile.in (install): Don't install in $(tooldir).
1823 * configure.in: Call AC_CONFIG_HEADER. Don't try to use
1824 bfd/hosts/*.h file or bfd/config/*.mh file. Call AC_PROG_CC and
1825 AC_PROG_RANLIB. Substitute in values for CFLAGS, HDEFINES, AR,
1826 and CC_FOR_BUILD. Call AC_CHECK_HEADERS for various header files.
1827 Touch stamp.h if creating config.h.
1828 * configure: Rebuild.
1829 * config.in: New file, created by autoheader.
1830 * Makefile.in (AR): Define as @AR@.
1831 (CC): New variable, defined as @CC@.
1832 (CFLAGS): Define as @CFLAGS@.
1833 (CC_FOR_BUILD): New variable, defined as @CC_FOR_BUILD@.
1834 (RANLIB): Define as @RANLIB@.
1835 (HDEFINES, TDEFINES): New variables.
1836 (@host_makefile_frag@): Remove.
1837 (mostlyclean): Make the same as clean, not distclean.
1838 (clean): Remove config.log.
1839 (distclean): Remove config.h and stamp-h.
1840 (Makefile): Don't depend upon @frags@. Just rebuild Makefile when
1841 invoking config.status.
1842 (config.h, stamp-h): New targets.
1843 (gen, gen.o): Build with CC_FOR_BUILD, not CC.
1844 (ppc-config.h): Rename from old config.h build.
1845 * (basics.h,gen.c,ppc-endian.c,psim.c): Include ppc-config.h.
1847 Fri Sep 8 09:51:03 1995 Michael Meissner <meissner@tiktok.cygnus.com>
1849 * configure{,.in}: Don't include sysdep.h from bfd, since bfd no
1851 * basics.h (sysdep.h): Don't include it.
1852 * Makefile.in (BASICS_H): Remove sysdep.h.
1854 Wed Sep 6 13:25:42 1995 Andrew Cagney <cagney@highland.com.au>
1856 * core.c (core_add_data): First growth of bss was being put at
1857 wrong address (0) instead of &end.
1859 * core.c (core_add_stack, core_add_data): Was not handling case
1860 where bss/stack is grown across the current end-of-{bss,stack}.
1862 Wed Sep 6 00:46:10 1995 Andrew Cagney <cagney@highland.com.au>
1864 * system.c (system_call): Fix SYS_break - was aligning bss to a
1865 page boundary instead of just an 8 byte one; On first call sbrk(0)
1868 Thu Aug 24 14:48:54 1995 Michael Meissner <meissner@tiktok.cygnus.com>
1870 * Makefile.in (install): Fix install rule.
1872 Tue Aug 22 09:31:18 1995 Michael Meissner <meissner@tiktok.cygnus.com>
1874 * system.c (system_call): Add read support.
1876 * main.c (main): -t sets trace_device_tree. Correct usage message
1879 * device_tree.c (update_memory_node_for_section): Make tracing
1880 output line up. If not code or readonly, assume that the section
1881 is a data section and has read/write permissions. Add readonly
1884 * core.c (create_core_from_addresses): Print end address in traces
1885 and make tracing output line up.
1887 * Makefile.in: Rewrite from Makefile to work with the Cygnus
1888 environment, and support compiling in a different directory than
1889 the sources reside in.
1891 * ppc-endian.h: Rename from endian.h so that it doesn't get
1892 confused with /usr/include/sys/endian.h on Linux. Add Linux
1895 * ppc-endian.c: Rename to be consistant with ppc-endian.h.
1896 Include ppc-endian.h, not endian.h.
1898 * basics.h (sysdep.h): Include sysdep.h that configure makes.
1899 Include ppc-endian.h, not endian.h.
1901 * std-config.h: Rename from ppc-config. Put #ifndefs around most
1902 configuration macros, so they can be overridden via CFLAGS. By
1903 default, turn off tracing.
1905 * configure.in: Clone from other simulator targets.
1906 * configure: Generate via autoconf from configure.in.
1908 Sat Aug 19 09:05:32 1995 Andrew Cagney <cagney@highland.com.au>
1910 * ppc-instructions: fix srawi (was geting XER[CA] real wrong).
1912 * interrupts.c (data_storage_interrupt): allow stack to grow by
1913 upto one MB per increment.
1915 * ppc-instructions: divw was computing rA / rA not rA / rB
1917 * main.c (main): really stupid. Wasn't exiting with correct status
1919 Fri Aug 18 00:38:01 1995 Andrew Cagney <cagney@highland.com.au>
1921 * system.c (system_call): add system calls kill(2) and getpid(2).
1923 * main.c (main): Check/return exit status when simulation
1926 Thu Aug 17 14:29:18 1995 Andrew Cagney <cagney@highland.com.au>
1928 * device_tree.c (create_option_device_node): Alignment rules (at
1929 least for the moment) now are for strict alignment only for LE OEA
1930 mode. (Because of compiler problems).
1932 * system.c (system_call) SYS_exit: Wasn't exiting with correct status.
1934 Thu Aug 17 01:16:38 1995 Andrew Cagney <cagney@highland.com.au>
1936 * vm.c (DEFINE_VM_DATA_MAP_WRITE_N): For miss aligned transfer
1939 * system.c (system_call): didn't page align break argument before
1940 determining increment break increment.
1942 * psim/ppc: Re-arange entire directory structure so that
1943 everything lives in the one directory. While a pain for cleaning,
1944 makes building across multiple architectures much simpler.
1946 * devices.c, device_tree.c: Added code that provides a simple
1947 illustration of how an interrupt control device could be
1950 * devices.c: Added code so that the dumb console device can read
1951 (from stdin) as well as write to stdout.