1 Tue Jan 16 09:50:53 1996 Michael Meissner <meissner@tiktok.cygnus.com>
3 * idecode_expression.h (ALU_END): Add ITRACE of the result.
5 * ppc-instructions (Equivalent): Enable this instruction.
6 (Add to Minus One Extended): Ditto.
7 (Subtract from Minus One Extended): Ditto.
8 (Add/And/Or/Xor Immediate): Add alu trace of result.
9 (Add/And/Or/Xor Shifted Immediate): Ditto.
10 (And/Or/Equivalent/Nand/Nor): Ditto.
11 (And/Or with Complement): Ditto.
12 (Extend Sign Byte/Half Word): Ditto.
13 (Count Leading Zeros): Ditto.
14 (Shift Right Algerbraic Word): Ditto.
15 (Shift Right Algerbraic Word Immediate): Ditto.
17 Tue Jan 9 15:10:27 1996 Andrew Cagney <cagney@highland.com.au>
19 * emul_bugapi.c (emul_bugapi_instruction_call) : Make format type
21 * emul_chirp.c (map_over_chirp_note) : Ditto
22 * emul_chirp.c (chirp_emul_test) : Ditto
23 * device_table.c (register_init): Ditto
25 Tue Jan 9 14:16:26 1996 Andrew Cagney <cagney@highland.com.au>
27 * configure.in: Make disable-sim-switch default. Switch only
28 useful if using --enable-sim-opcode=ppc-opcode-stupid and then
31 Mon Jan 8 12:17:22 1996 Michael Meissner <meissner@tiktok.cygnus.com>
33 * device_table.c (register_init): Make format type correct.
35 Wed Jan 3 19:21:46 1996 Andrew Cagney <cagney@highland.com.au>
37 * emul_bugapi.c (emul_bugapi_create): Add nodes to init the
38 system-call trap to the emul instruction call instruction (Along
39 with an rfi and infinate loop).
41 * emul_bugapi.c (emul_bugapi_instruction_call): Expand to include
42 a few real PPC bug calls. Test with simple hello world.
44 Tue Jan 2 20:51:19 1996 Andrew Cagney - aka Noid <cagney@highland.com.au>
46 * device.h, device.c (device_child, device_sibling): New
47 functions. Return corresponding device value.
49 * emul_chirp.c (chirp_emul_child, chirp_emul_peer,
50 chirp_emul_parent): New functions - emulate corresponding OpenBoot
53 * device_table.c (register_init): Extend properties attached to
54 register init node to allow a specific processor's register to be
57 * emul_chirp.c (emul_chirp_create): Init SMP correctly - the
58 initial PC for all processors is an infinate loop but then, for
59 processor zero, is quickly changed to be the correct code starting
62 * emul_chirp.c (emul_chirp_create): Add fake bootpath
63 et.al. properties to tree.
65 * emul_chirp.c (chirp_emul_getproplen): New function. Emulate the
66 getproplen OpenBoot call.
68 * emul_chirp.c (emul_chirp_instruction_call): Document other
69 possible chirp emulation internal states.
71 * emul_chirp.c (emul_chirp_instruction_call): Trace failed lookups
72 as well as successful ones.
74 * emul_chirp.c (emul_chirp_open): New function - handle open
77 * Makefile.in (maintainer-clean): Proper rule that eliminates more
80 Tue Dec 19 13:00:11 1995 Andrew Cagney <cagney@highland.com.au>
82 * emul_chirp.c (chirp_emul_exit): Full out call.
84 * device_table.c (htab_map_page): Wasn't handling byte swap when
85 creating entries in the hash table.
87 * device.c (device_tree_find_node): Allow primative wild-card match
88 of device names with the path.
90 FIXME: As mentioned earlier, the device stuff needs work to bring
91 it into line with OpenBoot. Part of this work is rewriting the
92 find_node function so that it behaves as specified in p1275.
94 Mon Dec 18 19:58:56 1995 Andrew Cagney <cagney@highland.com.au>
96 * emul_chrp.c (chirp_emul_write, chirp_emul_finddevice): add
99 * emul_chrp.c: Change return type of emul functions to int. Emul
100 functions either return -1 or zero so unsigned was a bit
103 * inline.h (*), igen.c, dgen.c, *: Update INLINE macros so that
104 they are paramaterised with the type of the function. Gets around
105 the problem of `static' needing to come first with `attribute'
106 comming last. Format declarations and definitions so that emacs
107 doesn't get confused.
109 Fri Dec 15 17:06:44 1995 Andrew Cagney <cagney@highland.com.au>
111 * std-config.h (PSIM_INLINE): Add missing inline configuration
112 control for the main loop.
114 * mon.c (mon_print_info): If monitoring disabled still print out
115 the number seconds used.
117 * psim.c (run_until_stop): Don't monitor the cache misses when
118 monitoring is disabled.
120 * configure.in (sim_mon, sim_monitor): Correct typo - sim_mon ->
121 sim_monitor for shell variable (or should that have been the other
124 * vm.c (vm_synchronize_context): Fix wrong test for unsuported
125 change in endian-mode.
127 * std-config.h (WITH_REGPARM), inline.h (IDECODE_INLINE,
128 SEMANTICS_INLINE): Add -DWITH_REGPARM=<n> option. Enables the
129 __attribute__((__regparm(WITH_REGPARM))) for some functions.
130 configure with --enable-sim-cflags="-DWITH_REGPARAM=3" (say).
131 Unfortunatly it tickles a bug (gcc?) and can't be used.
133 Mon Dec 18 13:36:06 1995 Michael Meissner <meissner@tiktok.cygnus.com>
135 * device.c (device_tree_add_device): Make trace fprintf arguments
137 * device_table.c (htab_decode_hash_table): Ditto.
138 (htab_map_binary): Ditto.
139 (htab_init_callback): Ditto.
140 * vm.c (om_virtual_to_real): Ditto.
142 Sat Dec 16 09:54:18 1995 Michael Meissner <meissner@wogglebug.tiac.net>
144 * emul_netbsd.c (emul_netbsd_create): Deal with new BFD that
145 changed how big/little endian support is recorded, while remaining
146 compatible with the old BFD with #ifdefs.
147 * emul_chirp.c (emul_chirp_create): Ditto.
148 * emul_bugapi.c (emul_bugapi_create): Ditto.
150 Fri Dec 15 15:55:56 1995 Michael Meissner <meissner@tiktok.cygnus.com>
152 * std-config.h (MODEL_INLINE): Turn off INLINE_MODULE by default.
154 * corefile.h: Delete declarations for unknown functions.
156 * interrupts.h: Ditto.
157 * interrupts.c: Ditto.
159 Thu Dec 14 18:49:34 1995 Andrew Cagney <cagney@highland.com.au>
161 * lf.c (lf_print_function_type): New function. Munges a function
162 type so that the prefix (eg INLINE...) is inserted after the type
165 * igen.c: Change to output functions using this.
167 Wed Dec 13 23:47:00 1995 Andrew Cagney <cagney@highland.com.au>
169 FIXME: Emul CHIRP does not correctly implement the find device
172 FIXME: Emul CHIRP and device do not implement device instance
175 Wed Dec 13 23:47:00 1995 Andrew Cagney <cagney@highland.com.au>
177 * options.c (options_inline): Function to output meaningful
178 description of the INLINE options.
180 * configure.in (inline): Replace inline magic numbers with macro
181 names. Map 1->LOCALS_INLINE and 2->ALL_INLINE.
183 * inline.h, inline.c: update to use inline method.
185 * std-config.h (CPU_INLINE), cpu.h, inline.h, inline.c: make cpu.h
188 * std-config.h (EVENTS_INLINE): Inline events in psim.
190 Wed Dec 13 22:01:21 1995 Andrew Cagney <cagney@highland.com.au>
192 * device_table.c (htab_sum_binary): DMA binaries to correct byte
195 Tue Dec 12 22:51:18 1995 Andrew Cagney <cagney@highland.com.au>
197 * psim.c (psim_merge_device_file): Change `=' to `==', was this an
200 Tue Dec 5 11:56:14 1995 Andrew Cagney <cagney@highland.com.au>
202 * ppc-instructions (ppc_nr_mtcrf_crs, ppc_branch_conditional_name,
203 ppc_function_unit_name): Simplify by declaring these arrays as
204 pure and simple static (instead of STATIC_MODEL).
206 Tue Dec 5 00:45:34 1995 Andrew Cagney <cagney@highland.com.au>
208 * sim_calls.c (sim_create, sim_load), main.c (main), psim.c: Pass
209 an options device into psim_create() so that options can be merged
212 * device.c (*add*): Change semantics so the add functions only add
213 when the new device (or property) doesn't already exist. This
214 allows merging of options and data.
216 Mon Dec 4 17:12:13 1995 Andrew Cagney <cagney@highland.com.au>
218 * Makefile.in (BASICS_H): Didn't include basics.h in the list of
219 header files to depend on.
221 Mon Dec 4 17:12:13 1995 Andrew Cagney <cagney@highland.com.au>
223 * std-config.h: (*_MODULE): Extend the <module>_inline macro's so
224 that they also allow control over static functions. Rewrite
225 document to reflect this.
227 * std-config.h: (INLINE): Simplify definition, the above and
228 earlier changes to igen.h eliminate the need to be defensive about
229 enabling the inline of static functions.
231 * std-config.h: (SIM_ENDIAN_INLINE, BITS_INLINE): Document limited
232 suport for inlineing of modules for all callers. Adjust relevant
233 macro's so that DEFAULT_INLINE will enable this.
235 * basics.h: Re-order #includes and definitions so that c-code for
236 basic include files does not call functions delcared in later
239 * basics.h (__attribute__), sim_callbacks.h: Move attribute macro
240 to basics.h and add hack (include <stdio.h>) to try and bring that
241 and other possible conflicting macros into scope much earler.
243 * sim-endian.h,c (SIM_ENDIAN_INLINE) bits.h,c (BITS_INLINE):
244 Change to use the updated inline definitions. If enabled
245 immediatly include the corresponding c-code so that it will inline
248 * inline.h, inline.c (SIM_ENDIAN_INLINE, BITS_INLINE): Remove
249 these cases, moved to module specific header files.
251 Sat Dec 2 18:37:51 1995 Andrew Cagney <cagney@highland.com.au>
253 * vm.c, vm_n.c: Fix htab code.
255 * vm.c (vm_data_map_read_buffer): Was using EA not RA when reading
258 * device.c: Fix htab create code.
260 Fri Nov 24 23:10:09 1995 Andrew Cagney <cagney@highland.com.au>
262 * bits.h, bits.c (EXTRACTED): Convert to function, fix - had &&
265 * sim-endian.h (SWAP_N), sim-endian-n.h, sim-endian.c: How
266 embarasing - fix yet another bug in the swap code! Simplify
267 everything by using more functions. Add host to big-endian byte
270 Fri Nov 24 23:10:09 1995 Andrew Cagney <cagney@highland.com.au>
272 * devices.h, devices.c: delete, replaced by the files
273 device_table.[ch] and device.[ch].
274 * device_tree.h, device_tree.c: ditto
276 * device_table.h, device_table.c: New files. Contain a table of
279 * device.h, device.c, Makefile.in, std-config.h (DEVICE_INLINE),
280 options.c (print_options): New files. Define the device object
281 along with any attached properties.
283 * device_tree.h, device_tree.c: Update to use new device object.
284 For convenience, change the printd functions into device_tree_add
287 * psim.c (create_*_tree): Use new device_tree create functions.
289 * corefile.h, corefile.c corefile-n.h (core_n.h): Update to use
290 the new device.h / device_table.h interface. Rename core_n.h to
291 corefile-n.h to be consistent with other n files.
293 * Makefile.in (run): add corefile-n.h to dependencies for
296 * basics.h (device_instance), device.h, device.c, device_table.h,
297 device_table.c: Add the concept of a device instance and operators
298 on these instances - corresponds to ihandle in OpenBoot speak.
299 Don't yet implement it.
301 Tue Nov 14 12:27:08 1995 Andrew Cagney <cagney@highland.com.au>
303 * emul_generic.h, emul_generic.c (emul_syscall_enter,
304 emul_syscall_exit): rename from emul_enter_call /
305 emul_exit_call. As only used by emul_do_system_call simplify
308 * os_emul.h, os_emul.c, emul_generic.h: Correct and fill an
311 * os_emul.c, emul_bugapi.h, emul_bugapi.c, Makefile.in: Add
312 preliminary hooks for a kernel mode rom emulation.
314 * cap.h (new), cap.c (new): Capability data base. Some emulations
315 pass object identifiers (capabilities?) to/from the simulated code
316 (for instance the phandle in OpenBoot). The cap object is able to
317 check/map between internal and external (target program)
318 representations of each identifier.
320 * os_emul.c, emul_chirp.h, emul_chirp.c, Makefile.in: Add
321 preliminary hooks for a kernel mode IEEE-1275 emulation.
323 * cpu.h, cpu.c (cpu_create, cpu_os_emulation, cpu): Add os_emul to
324 list of arguments passed in when creating a cpu. Grant access to
327 * std-config.h (OS_EMUL_INLINE), options.c (print_options),
328 inline.h, inline.c: New to allow control over inline of
329 corresponding code files.
331 * ppc-instructions (instruction_call): Add illegal instruction to
332 call the instruction-call emulation handler.
334 * interrupts.c (system_call_interrupt): Call renamed
335 os_emul_system_call function().
337 * emul_netbsd.c: Update to interface to generic emulation. Since
338 all its functions are called via a table don't worry about any
341 * emul_generic.h, emul_generic.c, spa-*(delete): Remove references
342 and code for spa, no longer to be used.
344 * psim.c (create_chirp_device_tree): Fill out what was previously
345 the openboot create function so that it starts to create a full
346 OpenBoot device tree.
348 Tue Nov 28 21:48:06 1995 Andrew Cagney <cagney@highland.com.au>
350 * debug.h, debug.c: pte trace is made redundant by htab trace,
351 delete it. Add vm to list of options. Simplify tracing output so
352 lines are not as long.
354 Tue Nov 14 12:27:08 1995 Andrew Cagney <cagney@highland.com.au>
356 * events.h, events.c (event_queue_init), psim.c (psim_init): (re)
357 initialize the event queue.
364 Tue Nov 28 13:38:26 1995 Michael Meissner <meissner@tiktok.cygnus.com>
366 * sim-endian.h: Look at WORDS_BIGENDIAN to determine if the host
367 is big endian or little endian. For SWAP_n, use htonl/htons if
368 host is little endian, not big endian and if WITH_NTOH is defined.
370 * configure{,.in} (--enable-sim-model-issue): Instead of defining
371 0/1, define it to be MODEL_ISSUE_{PROCESS,IGNORE}. Add
372 AC_C_BIGENDIAN to determine if the host is big endian or not.
373 * config.in: Regenerate.
375 * std-config.h (WITH_MODEL_ISSUE): Default to 0.
376 (CURRENT_MODEL_ISSUE): Reference WITH_MODEL_ISSUE, and if that is
377 0, use current_model_issue.
378 (MODEL_ISSUE_{PROCESS,IGNORE}): Define as -1/1.
380 * psim.c (current_model_issue): New global variable.
382 * cpu.c (cpu_create): Use CURRENT_MODEL_ISSUE > 0 instead of
384 (cpu_{init,halt}): Ditto.
385 * mon.c (mon_print_info): Ditto.
386 * ppc-instructions (PPC_INSN_* macros, branch handling): Ditto.
388 * mon.c (mon_print_info): Print instructions/second if verbose > 0,
391 * main.c (main): Set current_model_issue to MODEL_ISSUE_PROCESS if
392 the -I switch is used.
393 * sim_calls (sim_open): Ditto.
395 * ppc-instructions (model support): Add support for determining
396 when we don't have enough writeback slots. Add tracing for the
397 beginning of each cycle.
399 Mon Nov 27 17:46:33 1995 Michael Meissner <meissner@tiktok.cygnus.com>
401 * mon.c: Check for whether to include sys/types.h and sys/time.h.
403 * configure.in: Check for include files sys/types.h and
405 * configure: Regenerate.
406 * config.in: Regenerate.
408 * cpu.h (CONST_ATTRIBUTE): Define as __attribute__((__const__)) if
410 (cpu_system): Use CONST_ATTRIBUTE, so that when we're not inlining
411 the world, the optimizer has a fair chance of CSE'ing function
413 (cpu_{monitor,nr,registers,model}): Ditto.
415 * std-config.h (MODEL_INLINE): If not defined, define as 1 if
416 DEFAULT_INLINE is non-zero, 0 otherwise, rather than just the
417 value of DEFAULT_INLINE.
419 Fri Nov 24 11:24:34 1995 Michael Meissner <meissner@tiktok.cygnus.com>
421 * lf.h (__attribute__): If not GCC and at least 2.7.0, define as
423 (lf_printf): Add printf __attribute__, so the compiler will
424 automatically check the format string.
426 * configure{,.in} (--enable-sim-icache): If argument is define,
427 add -R to flags passed to igen.
429 * igen.c (stdlib.h): Include if the system supplies one.
430 (semantics_use_cache_struct): New global for -R flag to say
431 semantics is to use the cache structure directly rather than
432 putting the values into local variables.
433 (first_undef, last_undef): New structures to remember names to
435 (lf_print_c_extraction): If -R and this is semantics, emit names
436 as #defines pointing to the cache structure, rather than loading
437 the values into local variables.
438 (lf_print_c_semantic_function): If -R, #undef all of the names
439 defined in lf_print_c_extraction.
440 (main): Recognize -R.
442 * idecode_fields.h (SPR_*): Redefine spr_* macros as SPR_* to
443 avoid a name confict if -R passed to igen.
445 * ppc-instructions (mfspr, mtspr): Rename spr field to SPR.
446 (model_data): Add field to count the various # of CRs that the
447 mtcrf instruction used.
448 (model_mon_info): Return structures counting the # of CRs that the
449 mtcrf instruction used.
450 (branches, sync instructions): Do not call model functions if
451 WITH_MODEL_ISSUE is 0.
453 * mon.c (stdlib.h): Include if the system supplies one.
454 (mon_sort_instruction_names): New function to sort instruction
455 names alphabetically.
456 (mon_print_info): Call qsort with mon_sort_instruction_names to
457 sort instruction names. Don't abort if WITH_MODEL_ISSUE is 0.
459 * debug.h (ITRACE): Make printf_filtered arguments type correct.
460 * idecode_expression.h (CR0_COMPARE): Ditto.
461 * psim.c (psim_read_register): Ditto.
463 * igen.c (lf_print_my_prefix): Use __attribute__((__unused__)) to
464 silence compiler warnings about unused automatically generated
466 (lf_print_c_extraction): Ditto.
467 * idecode_expression.h (FPSCR_BEGIN): Ditto.
469 * ppc-cache-rules: Define rules for making a bitmask for all
472 * ppc-instructions: Rewrite model specific functions to use the
473 bitmask of the register number, instead of using the register
474 pointer to get the register number, and then making the bitmask.
476 Wed Nov 22 15:24:27 1995 Michael Meissner <meissner@tiktok.cygnus.com>
478 * ppc-instructions (model_branches): Add conditional argument to
479 count the number of times each type of conditional branch is used.
480 (conditional branches): Pass B0 or -1 to model_branches.
481 (model_mon_info): Print out conditional branch counts.
482 (model-data): Add support for printing out conditional branch
485 Tue Nov 21 16:31:25 1995 Michael Meissner <meissner@tiktok.cygnus.com>
487 * igen.c (insn_table_load_insns): Add support for model-static for
488 internal functions that should not be inlined.
489 (lf_print_c_semantic): Remove model_cleanup.
490 (gen_model_{c,h}): Ditto.
492 * ppc-instructions: Redo model specific support once again. Add
493 floating point support to the model specific information. Flesh
494 out all of the floating mutiply add/subtract instructions. Add
495 better tracing support to the model specific information.
497 Sun Nov 19 23:00:52 1995 Michael Meissner <meissner@tiktok.cygnus.com>
499 * ppc-instructions (model data, model_busy): Rather than using a
500 bit mask for the busy units, just use a char array. Also, only
501 support 2 function units an insn can use, rather than a loop.
503 Fri Nov 17 14:08:08 1995 Michael Meissner <meissner@tiktok.cygnus.com>
505 * table.c (table_entry_read): Move setting entry->line_nr to after
506 the model specific fields so the line numbers for the annex are
509 * cpu.c (cpu_{create,init,halt}): Check for WITH_MODEL_ISSUE
510 before calling the model functions.
512 * debug.c (trace_descriptor): Add trace_model support.
513 * debug.h (trace_options): Ditto.
515 * igen.c (gen_icache_h): Create type idecode_cache as void if not
516 caching instructions.
517 (gen_model_{c,h}): Drop model_issue support. Add support for
519 (lf_print_my_prefix): Initialize a const itable_index with the
521 (lf_print_c_semantic): Call model_cleanup at the end of the
522 function to check for instructions that aren't supported yet by
525 * mon.h (count_type): New type for counters.
526 * mon.c: Use count_type instead of unsigned.
528 * ppc-instructions: Redo scheduling code once again. Make it all
529 inline friendly. Instead of having general code emitted by igen,
530 go the route of having each semantic routine call the appropriate
533 Thu Nov 16 09:52:26 1995 Michael Meissner <meissner@tiktok.cygnus.com>
535 * table.c (table_entry_read): Allow the annex to have blank lines.
537 * ppc-instructions: Change lines in model stuff that just have a
538 tab to just newline. Add 601 support. Document most instructions
539 in terms of model specific timing information. Drop 'FUNCTION'
540 from PPC_FUNCTION_UNIT_xxx enums. Change PPC_UNIT_UNKNOWN ->
541 PPC_UNIT_BAD. Add TRACE(trace_tbd) for all data cache
542 instruction.s. Signal illegal instruciton if data cache block
543 invalidate is issued from problem state.
545 * igen.c (max_model_fields_len): New static to keep track of the
546 max size for the model specific fields.
547 (model_c_insn): Use max_model_fields_len to size fields.
548 (insn_table_insert_insn): Set max_model_fields_len.
549 (model_table_insert): Ditto.
550 (gen_model_{c,h}): Model_issue is now called with a processor
553 * debug.c (trace_description): Add support for trace_tbd.
555 * mon.c (mon_issue): Pass processor argument to model_issue.
557 * Makefile.in: Delete all function unit support, since the newer
558 table driven model support replaces it.
561 * inline.{c,h}: Ditto.
562 * std-config.h: Ditto.
564 * configure{,.in}: Ditto.
565 * Makefile.in: Ditto.
567 * function_unit.{c,h}: Delete these now usused files.
569 * std-config.h (WITH_MODEL_ISSUE): Add new macro on whether to
570 trace instructions in a model specific manor.
571 * options.c (print_options): Print it out.
572 * configure{,.in}: Add --enable-sim-model-issue option.
573 * Makefile.in: Add --enable-sim-model-issue flags.
574 * igen.c (lf_print_c_semantic): Add call to mon_issue here. Check
575 for WITH_MODEL_ISSUE.
576 * mon.c (mon_issue): Remove call to mon_issue_here.
578 * ppc-instructions: Move branch tracing to the actual branch
579 instructions, rather than testing it in model_issue. Add code to
580 code successful/unsuccessful branch predictions, and the number of
581 conditional branches that fell through.
583 Wed Nov 15 17:32:13 1995 Michael Meissner <meissner@tiktok.cygnus.com>
585 * cpu.h (cpu_model): Add declaration.
587 * cpu.c (struct _cpu): Add model_ptr to hold model specific
589 (cpu_model): Return the model internal pointer.
590 (cpu_{create,init,halt}): Call the appropriate model function.
592 * inline.c (mon.c): Move include of mon.c after model.c.
594 * mon.c (_cpu_mon): Add fields to count unaligned memory
596 (mon_issue): Call model_issue, not function_unit_issue.
597 (mon_{read,write}): Count # of unaligned memory accesses.
598 (mon_print_info): Switch to calling model_mon_info and
599 model_mon_info_free instead of function_unit version. Print out
600 number of unaligned reads/writes.
602 * {ppc-instructions,igen.c}: More global changes to add model
605 * inline.{c,h}: Provide for inlining options.c.
606 * options.{c,h}: Ditto.
607 * std-config.h: Add OPTIONS_INLINE.
609 Tue Nov 14 04:47:25 1995 Michael Meissner <meissner@tiktok.cygnus.com>
611 * Makefile.in (devices.o, main.o): Update dependency.
613 * igen.c (gen_model_h): Use correct variable in loop.
614 (gen_model_c): Use strcmp, strcasecmp.
615 (gen_model_c): Use EXTERN_MODEL for arrays.
616 (gen_model_h): Use STATIC_MODEL for arrays.
617 (lf_print_c_semantic_function_header): Delete unused function.
619 * main.c (cpu.h): Include cpu.h to get model.h.
621 * inline.h ({EXTERN,STATIC}_MODEL): Define.
623 Mon Nov 13 09:14:13 1995 Michael Meissner <meissner@tiktok.cygnus.com>
625 * igen.c ({insn,model}_table_fields): Spell mnemonic correctly.
626 (gen_itable_h,itable_c_insn): Ditto.
627 (model support): Move model support around, add support for
628 model-data, model-internal. Use annex field for model-macros
631 * configure.in (--enable-sim-inline): If --enable-sim-inline=no,
632 also define INLINE as nothing.
633 * configure: Regenerate.
635 * std-config.h (INLINE): Rather than nuking INLINE, only define it
636 as __inline__ if any of the INLINE flags are non-zero.
638 * options.c (print_options): Print out WITH_XOR_ENDAIN.
640 Mon Nov 13 23:03:45 1995 Andrew Cagney <cagneyhighland.com.au>
642 * ppc-instructions (rfi): Add missing code.
644 * cpu.c (cpu_get_time_base): Fix calculation of current value of
647 * ppc-spr-table (TBL, TBU): Fix TBL/TBU entries - was confusing
648 m[tf]tb with m[tf]spr.
650 * ppc-instructions (mtspr, mfspr): Fix mttbl - wasn't storing
653 Mon Nov 13 21:35:37 1995 Andrew Cagney <cagneyhighland.com.au>
655 * std-config.h (INLINE, STATIC_INLINE): Was being set to static
656 inline.. Only problem being that with ppc-opcode-simple this gave
657 it the chance to inline all the idecode functions with potentially
658 disasterous results on a 16mb PC. For moment hobble INLINE.
660 * configure.in, std-config.h (WITH_SMP): Make that 5 processors by
663 * configure.in: Tweek flags passed to gcc for --with-sim-warnings.
664 Firstly make them errors and secondly remove the options gcc-245
667 Mon Nov 13 17:57:24 1995 Andrew Cagney <cagney@highland.com.au>
669 * misc.c (zalloc), cpu.c (cpu_init), devices
670 (console_io_read_buffer_callback, icu_io_read_buffer_callback,
671 vm_io_read_buffer_callback), main.c (zalloc), mon.c (memset),
672 sim_calls.c (zalloc) : replace bzero() with memset().
674 * emul_netbsd.c (write_direntries), psim.c (psim_read_register,
675 psim_write_register): replace bcopy() with memcpy().
677 Sun Nov 12 20:55:41 1995 Andrew Cagney <cagneyhighland.com.au>
679 * configure.in: for --disable-sim-inline (--enable-sim-inline=no),
680 force DEFAULT_INLINE to 0 rather then trusting the std
683 Sun Nov 12 20:55:41 1995 Andrew Cagney <cagneyhighland.com.au>
685 * igen.c (lf_print_idecode_table, idecode_table_leaf): Fix
686 generation of switch entries in tables - treat the same as
687 cracking/semantic functions.
689 * igen.c (idecode_switch_end, idecode_switch_leaf): Fix generation
690 of a boolean switch statement (field zero or non-zero).
692 * ppc-opcode-test-1, ppc-opcode-test-2: New files. These test the
693 switch/table generation ability of igen.
695 * igen.c (idecode_switch_leaf): Fix code output when a switch
696 statement needs to look up a table.
698 * igen.c (idecode_declare_if_switch): New function called from
699 gen_idecode_c - need to declare any idecode switch functions
700 before they are used in idecode tables.
702 * igen.c (lf_print_c_cracker_function, idecode_crack_leaf,
703 idecode_crack_insn): Add is_inline_function argument to code
704 printing cracker functions which indicates if STATIC_IDECODE or
705 STATIC_INLINE_IDECODE should be used for definition. For
706 idecode_crack_insn (which implies not duplicating/expanding) don't
707 declare function as inline - we assume that the only time this is
708 code is generated is when things are being tested. For
709 idecode_crack_leaf, make static (instead of INLINE) if the
710 instructions parent is a table as function will always be called
713 * igen.c (idecode_expand_if_switch): Declare as STATIC_IDECODE not
714 STATIC_INLINE_IDECODE. Only the outermost idecode switch will be
715 called directly, all others are called via a table.
717 * igen.c (lf_print_semantic_function_header, semantics_h_leaf,
718 semantics_h_insn, semantics_h_function,
719 lf_print_c_semantic_function, semantics_c_function): Add
720 is_inline_function argument to lf_print_semantic_function_header
721 to indicate if an inline or static function declaration/definition
722 should be output. Depending on situtation call accordingly:
723 functions (not instruction semantic routines) are always inline;
724 Semantic routines are made inline when there is no icache (cache
725 will contain the function address) and are duplicating (see above)
726 and the parent of the instruction is a switch statement.
728 * igen.c (opcode_field_new): Delete. Code changed to use ZALLOC
729 and moved to insn_table_find_opcode_field.
731 * table.c (table_open): Fix typo (nr_model_fields vs nr_fields).
733 * igen.c (model_c_insn): Suggestion - document the name of the
734 instruction on each line of the instruction model table.
736 Fri Nov 10 00:44:38 1995 Andrew Cagney <cagneyhighland.com.au>
738 * emul_netbsd.c (do_ioctl): Cleanup compilation.
740 * sim_callbacks.h (__attribute__): Only define if not defined (was
741 already defined on NetBSD host).
743 Wed Nov 8 21:49:52 1995 Andrew Cagney <cagneyhighland.com.au>
745 * std-config.h (WITH_XOR_ENDIAN), configure.in, Makefile.in: New
746 macro, indicates if the PowerPC's horrible XOR endian mode should
747 be suported. Add to configure and make.
749 * vm_n.h (vm_data_map_read_N, vm_data_map_write_N), vm.c
750 (vm_instruction_map_read): If XOR endian, xor the address
751 with a value from an xor table (indexed by size of access).
753 * vm.c (vm_synchronize_context), cpu.c (cpu_synchronize_context):
754 set up xor table to xor if there is a conflict between the
755 CURRENT_TARGET_ENDIAN and the endian indicated in the MSR. Move
756 check of suported change of endian mode from cpu.c to vm.c.
758 * vm.c (vm_data_map_write_buffer, vm_data_map_read_buffer):
759 Hopefully added correct hack to handle XOR endian mode.
761 FIXME: If NONSTRICT alignment and XOR ENDIAN and MSR indicates
762 little endian mode, the model accepts miss aligned transfers.
764 FIXME: Need to create an `init' device that, during
765 initializatioin for XOR mode, it mushes (XOR address) all the dma
766 data before passing it on to the core for storage. Just like the
769 Wed Nov 8 21:49:52 1995 Andrew Cagney <cagneyhighland.com.au>
771 * devices.c (halt_io_write_buffer_callback): Use value written to
772 halt device to determine exit status. Thus allowing
773 success/failure of OEA tests.
775 Wed Nov 8 00:10:38 1995 Andrew Cagney <cagneyhighland.com.au>
777 * ppc-instructions (icbi): If icache present flush it.
779 Tue Nov 7 23:36:31 1995 Andrew Cagney <cagneyhighland.com.au>
781 * devices.c (htab_init_callback): Add code to create htab/pte.
783 * devices.c (dma_file, file_init_callback, htab_init_callback):
784 New function - Dma the named file into memory at the specified
787 * device_tree.h, device_tree.c (scand_*): New functions.
789 Tue Nov 7 23:36:31 1995 Andrew Cagney <cagneyhighland.com.au>
791 * filter_filename.c, Makefile.in: Change so that only dependant on
792 a very limited nr of files. Stops an unnecessary dependency.
794 Tue Nov 7 15:44:33 1995 Andrew Cagney <cagney@highland.com.au>
796 * core.c (core_map_find_mapping): Use cpu_halt rather than error
797 to abort an access to an undefined address.
799 Sun Nov 12 07:58:09 1995 Michael Meissner <meissner@tiktok.cygnus.com>
801 * igen.c (model_table_insert_{macro,function}): New functions.
802 (insn_table_load_insns): Call them.
803 (gen_model_h): Move section emiting model-macros to be first.
804 (model_{c,h}_function): New functions cloned from semantic
805 functions to print out the prototype and function for
807 (gen_model_{c,h}): Print out model-functions.
809 * ppc-instructions (model_{start,halt,print_info}): Add dummy
812 * options.c (print_options): Print out WITH_{,DEFAULT_}MODEL, not
813 WITH_PPC_{,DEFAULT_}_MODEL.
814 (options_ppc): Delete now unused function.
815 (cpu.h): Include cpu.h, not just basics.h.
817 * std-config.h (WITH_{,DEFAULT_}MODEL): Define.
819 * igen.c (model_macros, last_model_macro): New statics to keep
820 track of macros to go in model.h.
821 (insn_table_load_insns): Add model-macros to model_macros linked
823 (model_table_fields): Add field for printable name.
824 (gen_model_h): If there are model macros defined, print them out.
825 Print out DEFAULT_MODEL as the first model if there any models
826 specified, otherwise MODEL_NONE. Print out external decl for
827 current_model. Print out decl for model_set.
828 (gen_model_c): Add function model_set. Switch to use printable
829 name for the model, not the internal identifier used.
831 * psim.c (current_model): New global variable.
833 * ppc-instructions: Add macros for flag defines. Switch first
834 model so 604 is first.
836 * main.c (main): Call model_set, not function_unit_model.
837 * sim_calls.c (sim_open): Ditto.
838 * sim_calls.c, Makefile.in: sim_calls.c now includes cpu.h.
840 Sat Nov 11 07:27:41 1995 Michael Meissner <meissner@tiktok.cygnus.com>
842 * mon.h (mon_events): New enumeration for other events we want to
844 (mon_event): Add declaration for function.
846 * mon.c (mon_event): New function.
847 (mon_print_info): Print icache misses.
849 * psim.c (run_until_stop): Monitor icache misses.
851 * configure.in (--enable-sim-inline): Fix typos in handling comma
852 separated inline options.
853 (--enable-sim-icache): Echo icache size.
854 * configure: Regenerate.
856 * igen.c (semantics_h_print_function): Emit STATIC_SEMANTICS
857 instead of INLINE_SEMANTICS so that the compiler won't keep all of
858 the semantic functions as inline RTL, given that the address of
859 the function is taken which forces outline calls anyway.
860 (lf_print_c_semantic_function_header): Ditto.
861 (gen_semantics_h): Define STATIC_SEMANTICS as nothing if not
863 (lf_print_c_cracker_function): Emit STATIC_IDECODE instead of
864 STATIC_INLINE_IDECODE.
865 (gen_idecode_c): Define STATIC_IDECODE if not defined.
866 (gen_model_h): Use #ifdefs to define types to hold model units,
868 (model_table_insert): Add a sentinel functional unit at the end to
869 simplify loop processing.
870 (model_c_insn): Use <function-unit>_SENTINAL instead of 0 for any
871 instruction not specifing a function unit for the current model.
872 (gen_model_{c,h}): Provide bounds for model_time_mapping.
874 * inline.h (STATIC_SEMANTICS): Define to be static if
875 SEMANTICS_INLINE is defined.
876 (STATIC_IDECODE): Define to be static if IDECODE_INLINE is
879 * options.c (print_options): Fix typo.
881 Fri Nov 10 06:39:46 1995 Michael Meissner <meissner@tiktok.cygnus.com>
883 * configure.in (--enable-sim-{opcode,config}): Use $srcdir when
884 check for the existence of files.
885 * configure: Regenerate.
887 * table.c (table): New field nr_model_fields.
888 (table_open): New parameter nr_model_fields.
889 (table_entry_read): Parse model fields that begin with a '*' after
891 * igen.c, dgen.c: Change callers of table_open.
893 * igen.c: Add support for dumping model specific information in
895 (insn_field_name): Delete unused array.
896 (global variables): Make global variables static, so we can tell
897 when they are no longer used.
898 (cache_semantic_actual): Delete unused variable.
899 (insn_table_load_insns): If the insn is really a machine model,
900 call model_table_insert instead of other processing.
901 (model_table_insert): New function to handle defining the
902 functional units of a particular machine model.
903 (insn_table): Add last_function field so we can add functions at
905 (insn_table_insert_function): Use last_function field when
906 appending new function.
908 * ppc-instructions: Add a few model specific information for 603,
909 603e, and 604 for testing purposes.
911 * table.h (table_model_entry): New linked list to hold model
912 specific information, one per line.
913 (table_entry): Add model_first, model_last fields.
915 * configure.in (--enable-sim-inline): If gcc is found and
916 --enable-sim-inline is not specified, defaine DEFAULT_INLINE to 1,
918 (--enable-sim-reserved-bits): New switch to check whether reserved
919 bits are set in the instruction.
920 (--enable-sim-opcode): Make complex the default.
921 (all switches): Add appropriate checks and error messages.
922 * configure: Regenerate.
924 * Makefile.in (RESERVED_CFLAGS): New variable set by
925 --enable-sim-reserved-bits.
926 (CONFIG_CFLAGS): Include RESERVED_CFLAGS.
927 (BUILT_SRC): igen now generates model.c and model.h.
928 (LIB_OBJ): Include table.o.
929 (tmp-igen): Add -m/-M options to write model.c/model.h.
930 (model.o): New object.
931 (CPU_H): Include model.h.
933 * cpu.h: Include model.h.
935 * std-config.h (WITH_RESERVED_BITS): Define.
936 (MODEL_INLINE): Ditto.
938 * options.c (print_options): Print out WITH_RESERVED_BITS.
940 Thu Nov 9 12:22:15 1995 Michael Meissner <meissner@tiktok.cygnus.com>
942 * configure.in: If --silent, don't output information messages.
943 * configure: Regenerate.
945 * configure.in (--enable-sim-alignment): Fix typo in specifing non
947 (--enable-sim-switch): Make default on.
948 (--enable-sim-duplicate): Make default on.
949 (--enable-sim-smp): Make default 0.
950 (--enable-sim-mon): Don't set sim_float if not set.
951 (--enable-sim-inline): If gcc is found and --enable-sim-inline is
952 not specified, define DEFAULT_INLINE to be 2.
953 (all --enable-sim-* rules): Echo rules set to non empty to file
955 * configure: Regenerate.
957 * options.c (options_env): Fix typo if WITH_ENV is 0.
958 (print_options): Print GCC compiler version if available and
959 date/time options was compiled. If OPCODE_RULES, IGEN_FLAGS,
960 and/or DGEN_FLAGS are defined, print them.
962 * Makefile.in (all link actions): Pass SIM_CFLAGS as well as
964 (options.o): Compile options.o with OPCODE_RULES, IGEN_FLAGS, and
965 DGEN_FLAGS defined, so they can be printed out.
967 * igen.c (lf_print_c_validate): Check for WITH_ASSERT, so that
968 this test can be compiled away if the user really wants a fast
969 simulator by not doing assertion failures.
971 Wed Nov 8 13:19:47 1995 Michael Meissner <meissner@tiktok.cygnus.com>
973 * options.c: New file to print out all of the WITH_ options.
974 * options.h: New include file to declare print_options.
975 * debug.h (trace_options): Add trace_opts to call print_options.
976 * debug.c (trace_description): Add trace_opts support.
977 * main.c (main): If user requested options, print them.
978 * sim_calls.c (sim_open): Ditto.
980 * igen.c (opcode_field_new): Add void to make it a proper prototype.
982 * emul_generic.c (emul_enter_call): Make printf_filtered arguments
984 * emul_netbsd.c (do_kill): Ditto.
985 * registers.c (registers_dump): Ditto.
986 * vm.c (om_translate_effective_to_real): Ditto.
987 * vm_n.h (vm_data_map_read_N): Ditto.
988 (vm_data_map_write_N): Ditto.
989 * devices.h (DTRACE_INIT): Ditto.
990 (DTRACE_{ATTACH,DETACH}_ADDRESS): Ditto.
991 (DTRACE_IO_{READ,WRITE}_BUFFER): Ditto.
992 (DTRACE_DMA_{READ,WRITE}_BUFFER): Ditto.
993 * devices.c (update_for_binary_section): Ditto.
994 (write_stack_arguments): Ditto.
995 (stack_ioctl_callback): Ditto.
996 * device_tree.c (device_tree_add_passthrough): Ditto.
997 (device_tree_{add,find}_device): Ditto.
998 (device_tree_{add,find}_integer): Ditto.
999 (device_tree_find_{string,boolean}): Ditto.
1000 (device_tree_init{,_device}): Ditto.
1001 (device_tree_dump): Ditto.
1002 * sim_calls.c (sim_{read,write}): Ditto.
1003 (sim_{fetch,store}_register): Ditto.
1004 (sim_stop_reason): Ditto.
1006 * sim_callbacks.h (printf_filtered): Declare with attribute
1007 printf, so we can enable format checks.
1009 * devices.c (console_io_{read,write}_buffer_callback): Cast swtich
1010 argument to int, since ANSI doesn't allow long switch values.
1011 * emul_netbsd.c (do___sysctl): Ditto.
1013 * emul_netbsd.c (do___sysctl): Fix up printf call.
1015 * corefile.c (core_translate): Don't do arithmetic with void *
1016 pointers. Cast to char * first.
1018 * function_unit.c (FUNC_{LOAD,STORE}): Rename from {LOAD,STORE}
1019 and change all uses.
1021 * Makefile.in ({FUNC,MODEL,WARNING}_CFLAGS): New flags set by
1022 configure --enable switches.
1023 (CONFIG_CFLAGS): Include FUNC_CFLAGS and MODE_CFLAGS.
1024 (.c.o): Include WARNING_CFLAGS.
1025 (CPU_H): Include function_unit.h.
1026 (LIB_OBJ): Include function_unit.o.
1027 (BUILT_SRC_WO_CONFIG): Split from BUILT_SRC and do not include
1028 config.h or ppc-config.h.
1029 (BUILT_SRC): Include BUILT_SRC_WO_CONFIG, config.h and
1031 (filter_filename.o): Include config.h/ppc-config.h dependencies.
1032 (idecode.o, semantics.o, psim.o): Specify CC line without
1033 WARNING_CFLAGS so that we don't get all of the unused variable
1034 warnings that are generated.
1035 (function_unit.o): Add rule to build.
1036 (main.o, sim_calls.o): Add function_unit.h, itable.h dependencies.
1037 (mon.o): Include mon.c dependency.
1038 (TAGS): Depend on BUILT_SRC.
1039 (clean): Don't delete config.h or ppc-config.h
1041 * basics.h (sim_callbacks.h): Move include after the include of
1042 config.h and ppc-config.h.
1044 * bits.{h,c} (ROTL32,ROTL64): Move these functions to bits.c. Add
1045 support for BITS_INLINE to inline these. Add declarations to
1048 * configure.in (--enable-sim-warnings): Add new option to specify
1049 compiler warnings for all modules except idecode.o and semantics.o
1050 which have lots of unused variables because they are machine
1052 (--enable-sim-function-unit): New switch to configure whether
1053 function unit support is compiled in or not.
1054 (--enable-sim-{,default-}mode): New switches to control which cpu
1056 * configure: Regenerate.
1058 * corefile.c (core_attach_address_callback): Delete unused
1059 variable device_address.
1061 * cpu.c (struct _cpu): Add function unit pointer field func_unit.
1062 (cpu_create): If WITH_FUNCTION_UNIT, call function_unit_create.
1063 (cpu_init): If WITH_FUNCTION_UNIT, call function_unit_init.
1064 (cpu_halt): If WITH_FUNCTION_UNIT, call function_unit_halt.
1065 (cpu_function_unit): New function to return func_unit field.
1067 * cpu.h (function_unit.h): Include new include file.
1068 (cpu_function_unit): Declare.
1070 * debug.c (stdlib.h): Test HAVE_STDLIB_H, not HAVE_STDLIB.
1071 (config.h): Include config.h.
1073 * devices.c (icu_io_write_buffer_callback): Delete unused variable
1076 * emul_generic.c (emul_exit_call): Print out status value.
1078 * emul_netbsd.c (do_read): Delete unused variable nr_moved.
1080 * filter_filename.h (includes): Include config.h, ppc-config.h,
1083 * inline.c: Include bits.c if BITS_INLINE. Include
1084 function_unit.c if FUNCTION_UNIT_INLINE.
1086 * inline.h (INLINE_BITS): Define if BITS_INLINE.
1087 (INLINE_FUNCTION_UNIT): Define if FUNCTION_UNIT_INLINE.
1089 * interrupts.c (instruction_storage_interrupt): Delete unused
1092 * lf.h (config.h): Include config.h.
1094 * main.c (includes): Include function_unit.c. If HAVE_UNISTD_H,
1096 (usage): Update for -m model, -i, and -I options.
1097 (main): Delete unused variables stack_pointer and i. Add support
1098 for -i, -m model arguments. Call psim_print_info with verbose ==
1099 1 if -i, and verbose == 2 if -I.
1101 * mon.c (stdio.h): Include stdio.h to pick up sprintf prototype.
1102 (mon_issue): Call function_unit_issue if function units are
1104 (mon_print_info): Take psim * argument. Print out information
1105 from function_unit if available. Move read/write stats to always
1106 print, instead of printing if verbose > 1. Fix up plural
1109 * mon.h (mon_print_info): Update prototype.
1111 * psim.c (current_ppc_model): Add global variable.
1112 (psim_print_info): Pass system argument to mon_print_info.
1114 * sim_calls.c (function_unit.h): Include.
1115 (sim_open): Add support for -i and -m model options. If -i call
1116 psim_print_info with verbose == 1, if -I, with verbose == 2.
1117 (sim_resume): Delete unused variable program_counter.
1119 * std-config.h (WITH_FUNCTION_UNIT): Define.
1120 (ppc_model): Add enumeration giving all PowerPC models currently
1122 ({WITH,CURRENT}_PPC_MODEL): Define.
1123 (FUNCTION_UNIT_INLINE): Define.
1125 * table.c (config.h): Include config.h.
1127 * vm.c (om_virtual_to_real): Print pte_word_{0,1} so the compiler
1128 doesn't complain that they're unused.
1130 * vm_n.h (vm_data_map_read_N): Delete unused variable rval.
1132 Mon Nov 6 23:15:54 1995 Andrew Cagney <cagney@highland.com.au>
1134 * sim-endian.c (ppc-endian.c), sim-endian.h (ppc-endian.h):
1135 renameed. These files are target independant.
1136 * Makefile.in, basics.h: update for new name.
1138 * sim-endian.h (SWAP_N), sim-endian.c (_SWAP_1): Rename existing
1139 SWAP_<N> to _SWAP_<N> so that sim-endian.h can contain SWAP_N
1140 macro's as required.
1142 * sim-endian.c, sim-endian-n.h (new file): Move endian code into a
1143 debugable header file.
1145 * ppc-instructions (Byte-Reverse): Enable byte reverse
1146 instructions using SWAP_N macros.
1148 Mon Nov 6 10:39:28 1995 Michael Meissner <meissner@tiktok.cygnus.com>
1150 * Makefile.in (config.status): Remove references to config.make
1153 * config.{make,hdr}: Delete, no longer used.
1154 * build-psim: Ditto.
1156 Mon Nov 6 20:49:56 1995 Andrew Cagney <cagney@highland.com.au>
1158 * sim_calls.c (sim_open): Fix parsing of `target sim' options.
1160 * device_tree.c (device_tree_add_string): Wasn't saving the value
1161 of the string being entered into the tree.
1163 * psim.c (create_filed_device_tree): Not terminating string device
1166 * psim.c (psim_create): Use `env' instead of
1167 `environment-architecture' to be consistent with configure.
1168 Reconize user/uea, virtual/vea and operating/oea.
1170 Sat Nov 4 12:29:45 1995 Fred Fish <fnf@cygnus.com>
1172 * core.c: Rename to corefile.c
1173 * core.h: Rename to corefile.h
1174 * inline.c: Include corefile.h, renamed from core.h.
1175 * cpu.h: Include corefile.h, renamed from core.h
1176 * vm.c: Include corefile.h, renamed from core.h
1177 * corefile.c: Include corefile.h rather than core.h
1178 * README.psim (KNOWN PROBLEMS): Change core.* references to corefile.*
1180 * Makefile.in (CPU_H): Change core.h to corefile.h
1181 (vm.o): Change dependency to corefile.h
1182 (LIB_SRC): Change core.c to corefile.c.
1183 (LIB_OBJ): Change core.o to corefile.o.
1184 (corefile.o): Change dependencies to corefile.c, corefile.h.
1186 Fri Nov 3 11:37:24 1995 Michael Meissner <meissner@tiktok.cygnus.com>
1188 * ppc-instructions (data cache instructions): Make all data cache
1189 instructions nops instead of invalid instructions.
1191 * Makefile.in (CONFIG_CFLAGS): Add ALIGNMENT_CFLAGS and
1192 TIMEBASE_CFLAGS which weren't included.
1194 Thu Nov 2 08:54:04 1995 Michael Meissner <meissner@tiktok.cygnus.com>
1196 * Makefile.in: Uncomment built file dependencies.
1198 * configure.in: Rewrite --enable-sim switch handling to use the
1199 autoconf builtins so it works correctly if the configure or
1200 Makefile.in files are modified and make decides to rebuild
1201 Makefile. Also document all of the --enable-sim switches
1202 supported. Check whether getrusage and sys/resource.h are
1204 * config.in: Regenerate.
1205 * configure: Regenerate.
1206 * Makefile.in: Add support for all of the variables set with
1207 --enable-sim switches.
1209 * Makefile.in (clean): make clean now removes all built sources as
1212 * cpu.c: Use HAVE_STRING_H, HAVE_STRINGS_H, HAVE_UNISTD_H,
1213 HAVE_TIME_H, HAVE_SYS_TIMES_H, HAVE_SYS_RESOURCE_H defined in
1214 the generated config.h.
1216 * device_tree.c: Ditto.
1219 * emul_netbsd.c: Ditto.
1224 * registers.c: Ditto.
1225 * sim_calls.c: Ditt.
1229 * main.c (main): Call psim_print_info with verbose == 2.
1231 * mon.c (mon_print_info): Align the cpu number and number of
1232 instructions fields. Do not print an instruction category if the
1233 CPU did not execute any of those instructions. Print out number
1234 of reads and writes. If getrusage is supported, print out number
1235 of simulated instructins per second.
1237 * configure.in: Add support for --enable-sim-opcode=stupid.
1238 * configure: Regenerate.
1240 Wed Nov 1 23:46:59 1995 Andrew Cagney <cagney@highland.com.au>
1242 * std-config (INLINE_DEVICE_TREE): Don't inline either of
1243 device_tree.c or devices.c. There is no significant gain.
1245 * configure.in, Makefile.in: add --enable-sim-icache=[0-9]* and
1248 Wed Nov 1 23:46:59 1995 Andrew Cagney <cagney@highland.com.au>
1250 * igen.c (main), misc.h (target_a2i, i2target), misc.c: Add
1251 functions to convert between target and igen internal bit numbers.
1252 Make IO go through these functions. Add -b (bit size) and -h (high
1253 bit nr) options to igen. Typical usage would be: ./igen -b 16 -h
1254 15 for a 16 bit instruction format with the msb given a number 15.
1256 Wed Nov 1 22:17:32 1995 Andrew Cagney <cagney@highland.com.au>
1258 * dgen.c (main): Was outputting optarg even when it was NULL.
1260 Tue Oct 31 23:48:33 1995 Andrew Cagney <cagney@highland.com.au>
1262 * vm_n.h (vm_data_map_load_N, vm_data_map_store_n), debug.h,
1263 debug.c: Add tracing of load/store unit (virtual) with -t
1266 Tue Oct 31 21:44:01 1995 Andrew Cagney <cagney@highland.com.au>
1268 * std-config.h (WITH_ENVIRONMENT): Add USER_ENVIRONMENT which does
1269 not include things such as the time base and events.
1271 * interrupt.c, sim_calls.c, cpu.h, vm.c, configure.in: Add UEA to
1272 all environment switches for above.
1274 * psim.c (psim_create): ditto - new device tree node name is
1275 /options/environment-architecture with values user, virtual and
1278 Tue Oct 31 21:31:32 1995 Andrew Cagney <cagney@highland.com.au>
1280 * ppc-opcode-stupid: Third example of use of opcode table - this
1281 one expands all mtspr/mfspr and branch instructions. Appears to
1282 give about a 10% gain in performance if everything enabled. Also
1283 takes about 150mb of swap to build.
1285 Wed Nov 1 10:49:48 1995 Michael Meissner <meissner@tiktok.cygnus.com>
1287 * emul_netbsd.c (do_exit): Print arguments and close parenthesis
1288 if tracing, since exit doesn't go through emul_exit_call.
1289 (do_read): Print arguments if tracing.
1295 (do_sigprocmask): Replace trace with printing arguments if
1297 (do_ioctl): Print arguments if tracing.
1301 (do_gettimeofday): Ditto.
1302 (do_getrusage): Ditto.
1303 (do_fstatfs): Ditto.
1305 * filter_filename.c: New file to provide filter_filename to strip
1306 the directory prefix from a file.
1307 * filter_filename.h: New include file to declare filter_filename.
1309 * debug.h: Include filter_filename.h.
1310 (TRACE,DTRACE,ERROR): Use filter_filename on __FILE__.
1312 * misc.h: Include filter_filename.h.
1313 (ASSERT): Use filter_filename on __FILE__.
1315 * igen.c (lf_print_my_prefix): Use filter_filename on the filename
1318 * Makefile.in: Add filter_filename support.
1320 * ppc-instructions (dcbi, icbi): Make these NOPs rather than
1321 invalid instructions.
1323 * configure.in: Add support for more --enable-sim-* switches.
1324 Use config.make and config.hdr to write to Makefile and config.h
1325 respectively. Don't rewrite Makefile, just append to it.
1326 * configure: Regenerate.
1327 * config.{make,hdr}: New shell scripts.
1329 * Makefile.in: Remove all variables set by configure.in.
1330 (psim.o): Depend on $(BUILT_SRC) also.
1332 * emul_netbsd.c (do_gettimeofday,do_getrusage): When comparing an
1333 integer, use 0, not NULL.
1335 Tue Oct 31 15:20:04 1995 Michael Meissner <meissner@tiktok.cygnus.com>
1337 * configure.in: Add support for --enable-sim-inline,
1338 --enable-sim-bswap, --enable-sim-cflags, --enable-sim-complex,
1339 --enable-sim-switch, --enable-sim-duplicate, --enable-sim-filter,
1340 and --enable-sim-endian switch to control various Makefile
1342 * configure: Regenerate from configure.in.
1343 * Makefile.in: Add various Make variables that the various
1346 * std-config.h (DEFAULT_INLINE): Don't set this to 2 if using GCC
1347 and optimizing by default.
1349 Fri Oct 27 19:26:27 1995 Andrew Cagney <cagney@highland.com.au>
1351 * bits.h (ROTL32, ROTL64): Were functions, made them macros, now
1352 make them functions again. Appears 2.6.3 is confused by just a
1355 Thu Oct 26 18:31:58 1995 Andrew Cagney <cagney@highland.com.au>
1357 * ppc-endian.c (SWAP_8): Fix 8 byte swap!
1359 * psim.c (psim_create): Not correctly checking that runtime
1360 configuration of things like ENDIAN, ENVIRONMENT and ALIGNMENT
1361 matched the compiled in ones.
1363 * debug.h (ITRACE), igen.c: Tidy up more tracing flags -
1364 trace_semantics is now different to trace_idecode, the former
1367 Tue Oct 24 21:54:13 1995 Andrew Cagney <cagney@highland.com.au>
1369 * ppc-instructions (mtsrin): Missing instruction
1370 * ppc-instructions (mfsrin): Missing instruction
1371 * ppc-instructions (eieio): Missing instruction
1373 Tue Oct 24 20:55:29 1995 Andrew Cagney <cagney@highland.com.au>
1375 * build-psim: New shell script - see internals for usage,
1376 simplifies the process of building custom simulators.
1378 Mon Oct 23 23:48:59 1995 Andrew Cagney <cagney@highland.com.au>
1380 * std-config.h (SEMANTICS_INLINE): Tidy up notes on each of the
1381 INLINE macros. Make SEMANTICS_INLINE == 1 if DEFAULT_INLINE == 2.
1382 Don't use DEFAULT_INLINE to define REGISTERS_INLINE DEVICES_INLINE
1383 DEVICE_TREE_INLINE or INTERRUPTS_INLINE as none of these are on
1384 the instruction or data critical paths.
1386 * FIXME: devices.c/emul_netbsd.c would benefit (slightly) from
1387 the inclusion of device_tree.c/emul_generic.c.
1389 Mon Oct 23 00:31:50 1995 Andrew Cagney <cagney@highland.com.au>
1391 * os_emul.[hc], emul_generic.[hc], emul_netbsd.[hc]: replace
1392 system.[hc]. Start of suport for multiple emulations and
1393 emulation state (os_emul object).
1395 * emul_generic.[hc]: Start of code to implement proper system call
1398 Sun Oct 22 21:33:51 1995 Andrew Cagney <cagney@highland.com.au>
1400 * cpu.h, cpu.c (cpu_init): New function, zero the registers before
1401 the processor is started. Fixes problem of registers being
1402 undefined when restarting from within gdb.
1404 * cpu.h, cpu.c (cpu_flush_icache): New function, flushes the
1405 instruction cache (if present). Fixes problem of cpu caching gdb
1406 breakpoint instructions.
1408 FIXME: PSIM sometimes aborts calling error(), it should instead
1409 call sim_error() say which takes care of housekeeping such as
1410 saving the CIA before calling error.
1412 * NOTE: cpu_flush_cache() instead of cpu_synchronize_context() is
1413 used when restarting a simulation because the latter has the
1414 unwanted side effect (well I as a kernel hacker think it is) of
1415 performing an isync when the instruction stream doesn't contain
1418 Sun Oct 22 19:27:48 1995 Andrew Cagney <cagney@highland.com.au>
1420 * mon.h (new), mon.c (new), std-config.h (WITH_MON): Performance
1421 monitoring module. Counts both instructions issued and
1424 * NOTE: mon does not contain to count instruction loads as this
1425 information is already available from the mon_issue() hook.
1427 * igen.c (lf_print_c_semantic), vm_n.h: Add counting code.
1429 * psim.h, psim.c (psim_create), cpu.h, cpu.c (cpu_create): Attach
1430 a common monitor to each of the cpus. Delete
1431 cpu_increment_number_of_insns() and cpu_get_number_of_insns()
1432 replaced by copied code in mon.[hc].
1434 Sun Oct 22 18:42:45 1995 Andrew Cagney <cagney@highland.com.au>
1436 * sim_calls.c, main.c, psim.c (psim_create): always create
1437 `WITH_SMP' cpus. The actual number of CPU's active in a
1438 simulation run is taken from the device node: /init/smp (an
1439 integer). WITH_SMP changed to 2 (remember to put it back to 0).
1441 Fri Oct 20 17:26:54 1995 Andrew Cagney <cagney@highland.com.au>
1443 * system.c: More system call emulation. If code appears NetBSD
1444 specific, make conditional to being compiled on a NetBSD system
1447 Wed Oct 18 23:02:20 1995 Andrew Cagney <cagney@highland.com.au>
1449 * Makefile.in, gen.c(delete), igen.c(new), dgen.c(new),
1450 lf.[ch](new), table.[ch](new): Split into two generators - igen
1451 that outputs the instruction tables and dgen that outputs the spr
1452 tables. Add -f (filter out) flag to igen to filter out certain
1453 instructions (ex 64 bit ones) from the created tables. Include
1454 $(LIBIBERTY_LIB) in link options in case host lacks some libc
1457 * NOTE: igen, since it was originally written for the
1458 PowerPC/RS6000, things the MSB is 0 and the LSB is 63{31}.
1460 * Makefile.in, std-config.h, ppc-cache-rules(new),
1461 ppc-opcode-complex(new), ppc-opcode-simple(new): (for igen) Create
1462 cache-rule and opcode-rule tables from macros found std-config.h.
1463 Delete corresponding macro's from std-config.h.
1465 * igen.c (gen_itable_c, gen_itable_h), Makefile.in: code to output
1466 an table of all the instructions. Code to output a type
1467 enumerating all the instructin names.
1469 * igen.c(lf_print_c_semantic): Move call to increment instruction
1470 counter so that it occures _after_ the instruction has been fully
1471 validated, was double counting illegal/invalid instructions. Add
1472 conditional so only compiled in when WITH_PROFILE enabled (enabled
1475 * igen.c, cpu.h, cpu.c(cpu_increment_number_of_insns): Include
1476 itable.h, count individual instruction types not just total,
1477 adjust reporting functions to output this.
1479 * ppc-instructions (64 bit Load Doubleword with Update Indexed):
1480 Had 32./ instead of 31./
1482 * ppc-instructions (64 bit Store Double Word Conditional Indexed):
1483 bitrot - updated to use newer CR register operators.
1485 * ppc-instructions (64bit Floating Convert from Integer
1486 Doubleword): Correct call to Round_Float().
1488 Mon Oct 16 00:31:20 1995 Andrew Cagney <cagney@highland.com.au>
1490 * basics.h: #include "sim_callbacks.h" earlier so that its
1491 prototypes are declared in all other header files.
1493 * bits.h, bits.c, idecode_expression.h (ROTL32, ROTL64): Update
1494 doc in bits.h, remove dead code in bits.c, move ROTL32/ROTL64 into
1497 * cpu.c(cpu_add_commas), device_tree.h, device_tree.c(scand_*):
1498 Add size of buffer argument to functions writing a string into a
1499 buffer. Check for buffer overflow.
1501 Sun Oct 15 22:16:11 1995 Andrew Cagney <cagney@highland.com.au>
1503 * devices.h, devices.c, debug.h, debug.c: add macro's for tracing
1504 of each device. Make parameter names consistent so macros work.
1505 Use macro's in device functions.
1507 * device_tree.c, devices.h, devices.c: include path to device in a
1508 devices node when creating it.
1510 * device_tree.c, debug.h, debug.c: Add tracing of `device-tree'.
1512 * core.c: add tracing of core-device, adjust parameter names in
1513 core functions to be consistent with those in devices*.
1515 Sun Oct 15 20:33:20 1995 Andrew Cagney <cagney@highland.com.au>
1517 * debug.h, debug.c (trace_option): New function. Parses the trace
1518 option, updating the trace array.
1520 * debug.h, debug.c (trace_usage): New function. Outputs the list
1521 of all possible trace options.
1523 * sim_calls.c (sim_open), main.c (main): Use new trace_option() to
1524 parse trace options specified with the simpler -t flag. Adjust
1527 * FIXME: basic parsing of command line options is still duplicated
1528 by main.c and sim_calls.c
1530 Thu Oct 26 10:42:28 1995 Michael Meissner <meissner@tiktok.cygnus.com>
1532 * Makefile.in (clean): Delete *.i and *.out files.
1534 * ppc-endian.c (SWAP_n): Add SET argument to allow use of SWAP
1535 macros for either assignment or return. Fix SWAP_8 to use a
1536 union, and two SWAP_4's. Delete SWAP_N, since nobody uses it now.
1537 (ENDIAN_N): Add SET argument to SWAP_n calls. Delete macro defs
1538 that hardwired swapping on/off, let optimizer delete dead code.
1540 * main.c (main): Add printf that we caught a signal and print out
1541 the failing address.
1543 Thu Oct 19 21:43:39 1995 Fred Fish <fnf@fishfood.amigalib.com>
1545 * Makefile.in: Remove tabs from otherwise empty line.
1546 Confuses many non-GNU versions of "make".
1548 Wed Oct 18 08:51:25 1995 Michael Meissner <meissner@tiktok.cygnus.com>
1550 * Makefile.in (clean): Delete files produced by gen.
1552 Mon Oct 16 17:34:24 1995 Michael Meissner <meissner@tiktok.cygnus.com>
1554 * gen.c (lf_print_c_semantic_function): Move counting # of
1555 instructions here so it works with caching.
1556 (gen_idecode_c): Move from here.
1558 Wed Oct 11 17:13:15 1995 Andrew Cagney <cagney@highland.com.au>
1560 * gen.c, ppc-instructions, psim.c: Fix code for generating
1561 cracking instruction cache. Delete the code that cached just the
1562 result from doing an instruction lookup - this ran slower than no
1565 Fri Oct 13 09:58:43 1995 Michael Meissner <meissner@tiktok.cygnus.com>
1567 * Makefile.in (gen.o): Include $(INLINE_CFLAGS).
1569 * debug.h (ppc_trace): Rename from trace, to avoid a conflict with
1570 TCL when gdb is linked with the simulator.
1571 * debug.c (ppc_trace): Ditto.
1572 * sim_calls.c (sim_open): Change trace -> ppc_trace.
1573 * main.c (main): Ditto.
1575 * cpu.c (cpu_add_commas): Remove extra static.
1577 Thu Oct 12 11:35:53 1995 Michael Meissner <meissner@tiktok.cygnus.com>
1579 * Makefile.in (psim.o): Now that inlines are turned on, make
1580 psim.o depend on all sources.
1582 * cpu.c (cpu_add_commas): New function to format a long with
1584 (cpu_print_info): Use it to print number_of_insns.
1586 * ppc-endian.c (SWAP_n): New macros to speed up byte swapping for
1588 (ENDIAN_N): If both target and host byte orders are known, don't
1589 bother testing CURRENT_{TARGET,HOST}_BYTE_ORDER.
1591 * ppc-endian.h (target specific H2T_n/T2H_n macros): Remove #if 0
1592 to allow target specific H2T_n/T2H_n macros to be used.
1593 (htonl, ntohl): If compiled on a 486 by GCC and WITH_BSWAP is
1594 non-zero, redefine the htonl/ntohl macros to use the BSWAP instead
1595 of the 3 instruction sequence that runs on 386s.
1597 * std-config.h (WITH_{HOST,TARGET}_BYTE_ORDER): Don't override if
1598 specified on the compile line.
1599 (WITH_BSWAP): If not defined, define as 0.
1601 * Makefile.in (INLINE_CFLAGS): Add -DDEFAULT_INLINE=2 to add
1602 default inline support. Pass INLINE_CFLAGS when compiling.
1604 * devices.{h,c} (unimp_device_ioctl): Use STATIC_DEVICES, not
1605 INLINE_DEVICES since GCC doesn't like inline functions that
1606 accept variable arguments.
1607 (stack_ioctl_callback): Make function just static because GCC
1608 doesn't like inline functions that accept variable arguments.
1610 * devices.h (STATIC_DEVICES): Define as empty if not defined.
1612 * inline.c: Correct pathnames of included C files to match current
1615 * inline.h (STATIC_DEVICES): If DEVICES_INLINE is defined to be
1616 non-zero, define STATIC_DEVICES to be static.
1618 * std-config.h (INLINE): If GNU C and optimizing, define this as
1620 (DEFAULT_INLINE): If not defined, define as 0.
1621 (ENDIAN_INLINE): If not defined, define as DEFAULT_INLINE.
1622 ({CORE,VM,CPU,EVENTS,REGISTERS,INTERRUPTS}_INLINE): Ditto.
1623 ({SPREG,IDECODE}_INLINE): Ditto.
1625 Wed Oct 11 17:13:15 1995 Andrew Cagney <cagney@highland.com.au>
1627 * ppc-instructions: Initial cut of floating point suport added.
1628 Of note include - use of host IEEE floating point instructions,
1629 use of PowerPC manual pseudo code to handle the FPSCR. It is not
1630 currently a pretty sight.
1632 * memory_map.h, memory_map.c, memory_map_n.h, core.h, core.c:
1633 merge into core.h, core.c, core_n.h. The type memory_map replaced
1634 with core_map. This removes a level of pointer indirection when
1635 translating an address.
1637 * memory_map.h, memory_map.c, memory_map_n.h: delete.
1639 * Makefile.in et.al (sorry): tweek to use new core, core_map and
1642 Wed Oct 11 12:10:26 1995 Andrew Cagney <cagney@highland.com.au>
1644 * sim_calls.c, main.c: Add -g (trace_gdb) option, add tracing to
1645 most of the other functions in sim_calls.c.
1647 * basics.h (CONCAT3), memory_map.c, memory_map_n.h, Makefile.in:
1648 Add macros to better cover up `generic' code. Makes it possible
1649 to step through the generic code!
1651 * vm.c, vm_n.h, Makefile.in: ditto
1653 Tue Oct 10 15:42:59 1995 Andrew Cagney <cagney@highland.com.au>
1655 * devices.h, devices.c, memory_map.h, memory_map.c: Changed
1656 callback interface so that there is a read/write buffer but no
1657 read/write_word. VEA default memory read/write handler sometimes
1658 couldn't resolve an access and of those some were for a memory
1659 fault and some were because gdb was making a bogus request.
1661 * devices.h, devices.c, memory_map.h, memory_map.c, vm.h, vm.c:
1662 eliminate transfer_mode (raw or cooked) parameter from read/write
1665 Fri Oct 6 20:23:56 1995 Andrew Cagney <cagney@highland.com.au>
1667 * ppc-instructions (fmul, fmuls): correct instruction format - had
1670 Wed Oct 4 17:31:12 1995 Andrew Cagney <cagney@highland.com.au>
1672 * psim.c, device_tree.h, device_tree.c, devices.c (printd_*,
1673 scand_*): new functions to parse/print fields in device names
1674 while hiding any machine dependency.
1676 * devices.c, psim.c: Change the stack init code so that it is
1677 handled by a device. Arguments passed across using a device ioctl
1680 * devices.h, devices.c: device ioctl callback changed to allow a
1681 variable number of arguments. This gives greater flexability and
1682 greater chance of bugs.
1684 Tue Oct 3 22:01:56 1995 Andrew Cagney <cagney@highland.com.au>
1686 * main.c (printf_filtered, error): Missing va_end() to close off
1687 variable argument use.
1689 * Makefile.in (tmp-gencode): comment out hack to get around some
1690 versions of make not handling files being created as side-effects.
1692 * gen.c (lf_open): Add -n (real_file_name) option. Specifies an
1693 alternative file name to use in output files for things like #line
1696 Makefile.in (tmp-gencode): Use gen -n so that debug info is
1699 * Makefile.in (TARGETLIB): Use this instead of libsim.a in the
1702 Sat Oct 7 22:40:59 1995 Michael Meissner <meissner@tiktok.cygnus.com>
1704 * sim_calls.c (sim_set_callbacks): Define new function.
1706 Fri Oct 6 17:23:10 1995 Michael Meissner <meissner@tiktok.cygnus.com>
1708 * psim.c (psim_print_info): Print exit status or signal number.
1710 Mon Oct 2 11:46:37 1995 Michael Meissner <meissner@tiktok.cygnus.com>
1712 * cpu.c (struct _cpu): Add number_of_insns field to trace how many
1713 instructions are executed.
1714 (cpu_increment_number_of_insns): New function to increment the
1715 number of instructions issued.
1716 (cpu_get_number_of_insns): New function to return the number of
1717 instructions issued.
1718 (cpu_print_info): New function to print cpu related information.
1719 At present, print the number of instructions executed.
1721 * gen_idecode_c: Emit call to cpu_increment_number_of_insns within
1724 * psim.c (psim_print_info): New function to iterate over each of
1725 the CPU's calling cpu_print_info.
1727 * psim.h,cpu.h: Add new declarations.
1729 * sim_calls.c (sim_open): Add argument processing to add the same
1730 switches main.c accepts for the standalone processor.
1731 (sim_close): Call psim_print_info if -I.
1733 * main.c (main): Add comment saying to update sim_calls.c when
1734 adding switches. Add -I to call psim_print_info when done.
1735 (usage): Update usage message.
1737 Sun Oct 1 13:52:59 1995 Michael Meissner <meissner@tiktok.cygnus.com>
1739 * main.c (printf_filtered): Correct to match new prototype.
1741 Sat Sep 30 20:47:05 1995 Michael Meissner <meissner@tiktok.cygnus.com>
1743 * sim_callbacks.h (printf_filtered): Correct prototype.
1745 Thu Sep 21 16:26:49 1995 Michael Meissner <meissner@tiktok.cygnus.com>
1747 * device_tree.c (OEA_MEMORY_SIZE): Define if not defined to
1749 (clayton_memory_size): Define as OEA_MEMORY_SIZE.
1751 * std-config.h (WITH_TRACE): Default to 1 now.
1753 * psim.c (write_stack_arguments): Don't write any stack arguments
1756 * main.c (main): Switch to using getopt. Make -p also set
1757 trace_semantics. Make -a turn on all trace flags. Make -C turn
1760 * device_tree.c (create_option_device_node): Assume a program is
1761 OEA if the start address is < 4096, not just == 0.
1763 Wed Sep 20 13:36:06 1995 Ian Lance Taylor <ian@cygnus.com>
1765 * Makefile.in (maintainer-clean): New synonym for realclean.
1767 Sun Sep 10 10:23:56 1995 Michael Tiemann <tiemann@axon.cygnus.com>
1769 * registers.c (register_description): Add gdb synonyms for cr
1772 Fri Sep 8 13:16:10 1995 Ian Lance Taylor <ian@cygnus.com>
1774 * Makefile.in (install): Don't install in $(tooldir).
1776 * configure.in: Call AC_CONFIG_HEADER. Don't try to use
1777 bfd/hosts/*.h file or bfd/config/*.mh file. Call AC_PROG_CC and
1778 AC_PROG_RANLIB. Substitute in values for CFLAGS, HDEFINES, AR,
1779 and CC_FOR_BUILD. Call AC_CHECK_HEADERS for various header files.
1780 Touch stamp.h if creating config.h.
1781 * configure: Rebuild.
1782 * config.in: New file, created by autoheader.
1783 * Makefile.in (AR): Define as @AR@.
1784 (CC): New variable, defined as @CC@.
1785 (CFLAGS): Define as @CFLAGS@.
1786 (CC_FOR_BUILD): New variable, defined as @CC_FOR_BUILD@.
1787 (RANLIB): Define as @RANLIB@.
1788 (HDEFINES, TDEFINES): New variables.
1789 (@host_makefile_frag@): Remove.
1790 (mostlyclean): Make the same as clean, not distclean.
1791 (clean): Remove config.log.
1792 (distclean): Remove config.h and stamp-h.
1793 (Makefile): Don't depend upon @frags@. Just rebuild Makefile when
1794 invoking config.status.
1795 (config.h, stamp-h): New targets.
1796 (gen, gen.o): Build with CC_FOR_BUILD, not CC.
1797 (ppc-config.h): Rename from old config.h build.
1798 * (basics.h,gen.c,ppc-endian.c,psim.c): Include ppc-config.h.
1800 Fri Sep 8 09:51:03 1995 Michael Meissner <meissner@tiktok.cygnus.com>
1802 * configure{,.in}: Don't include sysdep.h from bfd, since bfd no
1804 * basics.h (sysdep.h): Don't include it.
1805 * Makefile.in (BASICS_H): Remove sysdep.h.
1807 Wed Sep 6 13:25:42 1995 Andrew Cagney <cagney@highland.com.au>
1809 * core.c (core_add_data): First growth of bss was being put at
1810 wrong address (0) instead of &end.
1812 * core.c (core_add_stack, core_add_data): Was not handling case
1813 where bss/stack is grown across the current end-of-{bss,stack}.
1815 Wed Sep 6 00:46:10 1995 Andrew Cagney <cagney@highland.com.au>
1817 * system.c (system_call): Fix SYS_break - was aligning bss to a
1818 page boundary instead of just an 8 byte one; On first call sbrk(0)
1821 Thu Aug 24 14:48:54 1995 Michael Meissner <meissner@tiktok.cygnus.com>
1823 * Makefile.in (install): Fix install rule.
1825 Tue Aug 22 09:31:18 1995 Michael Meissner <meissner@tiktok.cygnus.com>
1827 * system.c (system_call): Add read support.
1829 * main.c (main): -t sets trace_device_tree. Correct usage message
1832 * device_tree.c (update_memory_node_for_section): Make tracing
1833 output line up. If not code or readonly, assume that the section
1834 is a data section and has read/write permissions. Add readonly
1837 * core.c (create_core_from_addresses): Print end address in traces
1838 and make tracing output line up.
1840 * Makefile.in: Rewrite from Makefile to work with the Cygnus
1841 environment, and support compiling in a different directory than
1842 the sources reside in.
1844 * ppc-endian.h: Rename from endian.h so that it doesn't get
1845 confused with /usr/include/sys/endian.h on Linux. Add Linux
1848 * ppc-endian.c: Rename to be consistant with ppc-endian.h.
1849 Include ppc-endian.h, not endian.h.
1851 * basics.h (sysdep.h): Include sysdep.h that configure makes.
1852 Include ppc-endian.h, not endian.h.
1854 * std-config.h: Rename from ppc-config. Put #ifndefs around most
1855 configuration macros, so they can be overridden via CFLAGS. By
1856 default, turn off tracing.
1858 * configure.in: Clone from other simulator targets.
1859 * configure: Generate via autoconf from configure.in.
1861 Sat Aug 19 09:05:32 1995 Andrew Cagney <cagney@highland.com.au>
1863 * ppc-instructions: fix srawi (was geting XER[CA] real wrong).
1865 * interrupts.c (data_storage_interrupt): allow stack to grow by
1866 upto one MB per increment.
1868 * ppc-instructions: divw was computing rA / rA not rA / rB
1870 * main.c (main): really stupid. Wasn't exiting with correct status
1872 Fri Aug 18 00:38:01 1995 Andrew Cagney <cagney@highland.com.au>
1874 * system.c (system_call): add system calls kill(2) and getpid(2).
1876 * main.c (main): Check/return exit status when simulation
1879 Thu Aug 17 14:29:18 1995 Andrew Cagney <cagney@highland.com.au>
1881 * device_tree.c (create_option_device_node): Alignment rules (at
1882 least for the moment) now are for strict alignment only for LE OEA
1883 mode. (Because of compiler problems).
1885 * system.c (system_call) SYS_exit: Wasn't exiting with correct status.
1887 Thu Aug 17 01:16:38 1995 Andrew Cagney <cagney@highland.com.au>
1889 * vm.c (DEFINE_VM_DATA_MAP_WRITE_N): For miss aligned transfer
1892 * system.c (system_call): didn't page align break argument before
1893 determining increment break increment.
1895 * psim/ppc: Re-arange entire directory structure so that
1896 everything lives in the one directory. While a pain for cleaning,
1897 makes building across multiple architectures much simpler.
1899 * devices.c, device_tree.c: Added code that provides a simple
1900 illustration of how an interrupt control device could be
1903 * devices.c: Added code so that the dumb console device can read
1904 (from stdin) as well as write to stdout.