3 * configure.in: If --silent, don't output information messages.
4 * configure: Regenerate.
6 * configure.in (--enable-sim-alignment): Fix typo in specifing non
8 (--enable-sim-switch): Make default on.
9 (--enable-sim-duplicate): Make default on.
10 (--enable-sim-smp): Make default 0.
11 (--enable-sim-mon): Don't set sim_float if not set.
12 (--enable-sim-inline): If gcc is found and --enable-sim-inline is
13 not specified, define DEFAULT_INLINE to be 2.
14 (all --enable-sim-* rules): Echo rules set to non empty to file
16 * configure: Regenerate.
18 * options.c (options_env): Fix typo if WITH_ENV is 0.
19 (print_options): Print GCC compiler version if available and
20 date/time options was compiled. If OPCODE_RULES, IGEN_FLAGS,
21 and/or DGEN_FLAGS are defined, print them.
23 * Makefile.in (all link actions): Pass SIM_CFLAGS as well as
25 (options.o): Compile options.o with OPCODE_RULES, IGEN_FLAGS, and
26 DGEN_FLAGS defined, so they can be printed out.
28 * igen.c (lf_print_c_validate): Check for WITH_ASSERT, so that
29 this test can be compiled away if the user really wants a fast
30 simulator by not doing assertion failures.
34 * options.c: New file to print out all of the WITH_ options.
35 * options.h: New include file to declare print_options.
36 * debug.h (trace_options): Add trace_opts to call print_options.
37 * debug.c (trace_description): Add trace_opts support.
38 * main.c (main): If user requested options, print them.
39 * sim_calls.c (sim_open): Ditto.
41 * igen.c (opcode_field_new): Add void to make it a proper prototype.
43 * emul_generic.c (emul_enter_call): Make printf_filtered arguments
45 * emul_netbsd.c (do_kill): Ditto.
46 * registers.c (registers_dump): Ditto.
47 * vm.c (om_translate_effective_to_real): Ditto.
48 * vm_n.h (vm_data_map_read_N): Ditto.
49 (vm_data_map_write_N): Ditto.
50 * devices.h (DTRACE_INIT): Ditto.
51 (DTRACE_{ATTACH,DETACH}_ADDRESS): Ditto.
52 (DTRACE_IO_{READ,WRITE}_BUFFER): Ditto.
53 (DTRACE_DMA_{READ,WRITE}_BUFFER): Ditto.
54 * devices.c (update_for_binary_section): Ditto.
55 (write_stack_arguments): Ditto.
56 (stack_ioctl_callback): Ditto.
57 * device_tree.c (device_tree_add_passthrough): Ditto.
58 (device_tree_{add,find}_device): Ditto.
59 (device_tree_{add,find}_integer): Ditto.
60 (device_tree_find_{string,boolean}): Ditto.
61 (device_tree_init{,_device}): Ditto.
62 (device_tree_dump): Ditto.
63 * sim_calls.c (sim_{read,write}): Ditto.
64 (sim_{fetch,store}_register): Ditto.
65 (sim_stop_reason): Ditto.
67 * sim_callbacks.h (printf_filtered): Declare with attribute
68 printf, so we can enable format checks.
70 * devices.c (console_io_{read,write}_buffer_callback): Cast swtich
71 argument to int, since ANSI doesn't allow long switch values.
72 * emul_netbsd.c (do___sysctl): Ditto.
74 * emul_netbsd.c (do___sysctl): Fix up printf call.
76 * corefile.c (core_translate): Don't do arithmetic with void *
77 pointers. Cast to char * first.
79 * function_unit.c (FUNC_{LOAD,STORE}): Rename from {LOAD,STORE}
82 * Makefile.in ({FUNC,MODEL,WARNING}_CFLAGS): New flags set by
83 configure --enable switches.
84 (CONFIG_CFLAGS): Include FUNC_CFLAGS and MODE_CFLAGS.
85 (.c.o): Include WARNING_CFLAGS.
86 (CPU_H): Include function_unit.h.
87 (LIB_OBJ): Include function_unit.o.
88 (BUILT_SRC_WO_CONFIG): Split from BUILT_SRC and do not include
89 config.h or ppc-config.h.
90 (BUILT_SRC): Include BUILT_SRC_WO_CONFIG, config.h and
92 (filter_filename.o): Include config.h/ppc-config.h dependencies.
93 (idecode.o, semantics.o, psim.o): Specify CC line without
94 WARNING_CFLAGS so that we don't get all of the unused variable
95 warnings that are generated.
96 (function_unit.o): Add rule to build.
97 (main.o, sim_calls.o): Add function_unit.h, itable.h dependencies.
98 (mon.o): Include mon.c dependency.
99 (TAGS): Depend on BUILT_SRC.
100 (clean): Don't delete config.h or ppc-config.h
102 * basics.h (sim_callbacks.h): Move include after the include of
103 config.h and ppc-config.h.
105 * bits.{h,c} (ROTL32,ROTL64): Move these functions to bits.c. Add
106 support for BITS_INLINE to inline these. Add declarations to
109 * configure.in (--enable-sim-warnings): Add new option to specify
110 compiler warnings for all modules except idecode.o and semantics.o
111 which have lots of unused variables because they are machine
113 (--enable-sim-function-unit): New switch to configure whether
114 function unit support is compiled in or not.
115 (--enable-sim-{,default-}mode): New switches to control which cpu
117 * configure: Regenerate.
119 * corefile.c (core_attach_address_callback): Delete unused
120 variable device_address.
122 * cpu.c (struct _cpu): Add function unit pointer field func_unit.
123 (cpu_create): If WITH_FUNCTION_UNIT, call function_unit_create.
124 (cpu_init): If WITH_FUNCTION_UNIT, call function_unit_init.
125 (cpu_halt): If WITH_FUNCTION_UNIT, call function_unit_halt.
126 (cpu_function_unit): New function to return func_unit field.
128 * cpu.h (function_unit.h): Include new include file.
129 (cpu_function_unit): Declare.
131 * debug.c (stdlib.h): Test HAVE_STDLIB_H, not HAVE_STDLIB.
132 (config.h): Include config.h.
134 * devices.c (icu_io_write_buffer_callback): Delete unused variable
137 * emul_generic.c (emul_exit_call): Print out status value.
139 * emul_netbsd.c (do_read): Delete unused variable nr_moved.
141 * filter_filename.h (includes): Include config.h, ppc-config.h,
144 * inline.c: Include bits.c if BITS_INLINE. Include
145 function_unit.c if FUNCTION_UNIT_INLINE.
147 * inline.h (INLINE_BITS): Define if BITS_INLINE.
148 (INLINE_FUNCTION_UNIT): Define if FUNCTION_UNIT_INLINE.
150 * interrupts.c (instruction_storage_interrupt): Delete unused
153 * lf.h (config.h): Include config.h.
155 * main.c (includes): Include function_unit.c. If HAVE_UNISTD_H,
157 (usage): Update for -m model, -i, and -I options.
158 (main): Delete unused variables stack_pointer and i. Add support
159 for -i, -m model arguments. Call psim_print_info with verbose ==
160 1 if -i, and verbose == 2 if -I.
162 * mon.c (stdio.h): Include stdio.h to pick up sprintf prototype.
163 (mon_issue): Call function_unit_issue if function units are
165 (mon_print_info): Take psim * argument. Print out information
166 from function_unit if available. Move read/write stats to always
167 print, instead of printing if verbose > 1. Fix up plural
170 * mon.h (mon_print_info): Update prototype.
172 * psim.c (current_ppc_model): Add global variable.
173 (psim_print_info): Pass system argument to mon_print_info.
175 * sim_calls.c (function_unit.h): Include.
176 (sim_open): Add support for -i and -m model options. If -i call
177 psim_print_info with verbose == 1, if -I, with verbose == 2.
178 (sim_resume): Delete unused variable program_counter.
180 * std-config.h (WITH_FUNCTION_UNIT): Define.
181 (ppc_model): Add enumeration giving all PowerPC models currently
183 ({WITH,CURRENT}_PPC_MODEL): Define.
184 (FUNCTION_UNIT_INLINE): Define.
186 * table.c (config.h): Include config.h.
188 * vm.c (om_virtual_to_real): Print pte_word_{0,1} so the compiler
189 doesn't complain that they're unused.
191 * vm_n.h (vm_data_map_read_N): Delete unused variable rval.
195 * sim-endian.c (ppc-endian.c), sim-endian.h (ppc-endian.h):
196 renameed. These files are target independant.
197 * Makefile.in, basics.h: update for new name.
199 * sim-endian.h (SWAP_N), sim-endian.c (_SWAP_1): Rename existing
200 SWAP_<N> to _SWAP_<N> so that sim-endian.h can contain SWAP_N
203 * sim-endian.c, sim-endian-n.h (new file): Move endian code into a
204 debugable header file.
206 * ppc-instructions (Byte-Reverse): Enable byte reverse
207 instructions using SWAP_N macros.
211 * Makefile.in (config.status): Remove references to config.make
214 * config.{make,hdr}: Delete, no longer used.
219 * sim_calls.c (sim_open): Fix parsing of `target sim' options.
221 * device_tree.c (device_tree_add_string): Wasn't saving the value
222 of the string being entered into the tree.
224 * psim.c (create_filed_device_tree): Not terminating string device
227 * psim.c (psim_create): Use `env' instead of
228 `environment-architecture' to be consistent with configure.
229 Reconize user/uea, virtual/vea and operating/oea.
233 * core.c: Rename to corefile.c
234 * core.h: Rename to corefile.h
235 * inline.c: Include corefile.h, renamed from core.h.
236 * cpu.h: Include corefile.h, renamed from core.h
237 * vm.c: Include corefile.h, renamed from core.h
238 * corefile.c: Include corefile.h rather than core.h
239 * README.psim (KNOWN PROBLEMS): Change core.* references to corefile.*
241 * Makefile.in (CPU_H): Change core.h to corefile.h
242 (vm.o): Change dependency to corefile.h
243 (LIB_SRC): Change core.c to corefile.c.
244 (LIB_OBJ): Change core.o to corefile.o.
245 (corefile.o): Change dependencies to corefile.c, corefile.h.
249 * ppc-instructions (data cache instructions): Make all data cache
250 instructions nops instead of invalid instructions.
252 * Makefile.in (CONFIG_CFLAGS): Add ALIGNMENT_CFLAGS and
253 TIMEBASE_CFLAGS which weren't included.
257 * Makefile.in: Uncomment built file dependencies.
259 * configure.in: Rewrite --enable-sim switch handling to use the
260 autoconf builtins so it works correctly if the configure or
261 Makefile.in files are modified and make decides to rebuild
262 Makefile. Also document all of the --enable-sim switches
263 supported. Check whether getrusage and sys/resource.h are
265 * config.in: Regenerate.
266 * configure: Regenerate.
267 * Makefile.in: Add support for all of the variables set with
268 --enable-sim switches.
270 * Makefile.in (clean): make clean now removes all built sources as
273 * cpu.c: Use HAVE_STRING_H, HAVE_STRINGS_H, HAVE_UNISTD_H,
274 HAVE_TIME_H, HAVE_SYS_TIMES_H, HAVE_SYS_RESOURCE_H defined in
275 the generated config.h.
277 * device_tree.c: Ditto.
280 * emul_netbsd.c: Ditto.
285 * registers.c: Ditto.
290 * main.c (main): Call psim_print_info with verbose == 2.
292 * mon.c (mon_print_info): Align the cpu number and number of
293 instructions fields. Do not print an instruction category if the
294 CPU did not execute any of those instructions. Print out number
295 of reads and writes. If getrusage is supported, print out number
296 of simulated instructins per second.
298 * configure.in: Add support for --enable-sim-opcode=stupid.
299 * configure: Regenerate.
303 * std-config (INLINE_DEVICE_TREE): Don't inline either of
304 device_tree.c or devices.c. There is no significant gain.
306 * configure.in, Makefile.in: add --enable-sim-icache=[0-9]* and
311 * igen.c (main), misc.h (target_a2i, i2target), misc.c: Add
312 functions to convert between target and igen internal bit numbers.
313 Make IO go through these functions. Add -b (bit size) and -h (high
314 bit nr) options to igen. Typical usage would be: ./igen -b 16 -h
315 15 for a 16 bit instruction format with the msb given a number 15.
319 * dgen.c (main): Was outputting optarg even when it was NULL.
323 * vm_n.h (vm_data_map_load_N, vm_data_map_store_n), debug.h,
324 debug.c: Add tracing of load/store unit (virtual) with -t
329 * std-config.h (WITH_ENVIRONMENT): Add USER_ENVIRONMENT which does
330 not include things such as the time base and events.
332 * interrupt.c, sim_calls.c, cpu.h, vm.c, configure.in: Add UEA to
333 all environment switches for above.
335 * psim.c (psim_create): ditto - new device tree node name is
336 /options/environment-architecture with values user, virtual and
341 * ppc-opcode-stupid: Third example of use of opcode table - this
342 one expands all mtspr/mfspr and branch instructions. Appears to
343 give about a 10% gain in performance if everything enabled. Also
344 takes about 150mb of swap to build.
348 * emul_netbsd.c (do_exit): Print arguments and close parenthesis
349 if tracing, since exit doesn't go through emul_exit_call.
350 (do_read): Print arguments if tracing.
356 (do_sigprocmask): Replace trace with printing arguments if
358 (do_ioctl): Print arguments if tracing.
362 (do_gettimeofday): Ditto.
363 (do_getrusage): Ditto.
366 * filter_filename.c: New file to provide filter_filename to strip
367 the directory prefix from a file.
368 * filter_filename.h: New include file to declare filter_filename.
370 * debug.h: Include filter_filename.h.
371 (TRACE,DTRACE,ERROR): Use filter_filename on __FILE__.
373 * misc.h: Include filter_filename.h.
374 (ASSERT): Use filter_filename on __FILE__.
376 * igen.c (lf_print_my_prefix): Use filter_filename on the filename
379 * Makefile.in: Add filter_filename support.
381 * ppc-instructions (dcbi, icbi): Make these NOPs rather than
382 invalid instructions.
384 * configure.in: Add support for more --enable-sim-* switches.
385 Use config.make and config.hdr to write to Makefile and config.h
386 respectively. Don't rewrite Makefile, just append to it.
387 * configure: Regenerate.
388 * config.{make,hdr}: New shell scripts.
390 * Makefile.in: Remove all variables set by configure.in.
391 (psim.o): Depend on $(BUILT_SRC) also.
393 * emul_netbsd.c (do_gettimeofday,do_getrusage): When comparing an
394 integer, use 0, not NULL.
398 * configure.in: Add support for --enable-sim-inline,
399 --enable-sim-bswap, --enable-sim-cflags, --enable-sim-complex,
400 --enable-sim-switch, --enable-sim-duplicate, --enable-sim-filter,
401 and --enable-sim-endian switch to control various Makefile
403 * configure: Regenerate from configure.in.
404 * Makefile.in: Add various Make variables that the various
407 * std-config.h (DEFAULT_INLINE): Don't set this to 2 if using GCC
408 and optimizing by default.
412 * bits.h (ROTL32, ROTL64): Were functions, made them macros, now
413 make them functions again. Appears 2.6.3 is confused by just a
418 * ppc-endian.c (SWAP_8): Fix 8 byte swap!
420 * psim.c (psim_create): Not correctly checking that runtime
421 configuration of things like ENDIAN, ENVIRONMENT and ALIGNMENT
422 matched the compiled in ones.
424 * debug.h (ITRACE), igen.c: Tidy up more tracing flags -
425 trace_semantics is now different to trace_idecode, the former
430 * ppc-instructions (mtsrin): Missing instruction
431 * ppc-instructions (mfsrin): Missing instruction
432 * ppc-instructions (eieio): Missing instruction
436 * build-psim: New shell script - see internals for usage,
437 simplifies the process of building custom simulators.
441 * std-config.h (SEMANTICS_INLINE): Tidy up notes on each of the
442 INLINE macros. Make SEMANTICS_INLINE == 1 if DEFAULT_INLINE == 2.
443 Don't use DEFAULT_INLINE to define REGISTERS_INLINE DEVICES_INLINE
444 DEVICE_TREE_INLINE or INTERRUPTS_INLINE as none of these are on
445 the instruction or data critical paths.
447 * FIXME: need to set up OS_EMUL_INLINE/EMUL_GENERIC_INLINE but
448 not on critical path.
450 * FIXME: devices.c/emul_netbsd.c would benefit (slightly) from
451 the inclusion of device_tree.c/emul_generic.c.
455 * os_emul.[hc], emul_generic.[hc], emul_netbsd.[hc]: replace
456 system.[hc]. Start of suport for multiple emulations and
457 emulation state (os_emul object).
459 * emul_generic.[hc]: Start of code to implement proper system call
464 * cpu.h, cpu.c (cpu_init): New function, zero the registers before
465 the processor is started. Fixes problem of registers being
466 undefined when restarting from within gdb.
468 * cpu.h, cpu.c (cpu_flush_icache): New function, flushes the
469 instruction cache (if present). Fixes problem of cpu caching gdb
470 breakpoint instructions.
472 FIXME: PSIM sometimes aborts calling error(), it should instead
473 call sim_error() say which takes care of housekeeping such as
474 saving the CIA before calling error.
476 * NOTE: cpu_flush_cache() instead of cpu_synchronize_context() is
477 used when restarting a simulation because the latter has the
478 unwanted side effect (well I as a kernel hacker think it is) of
479 performing an isync when the instruction stream doesn't contain
484 * mon.h (new), mon.c (new), std-config.h (WITH_MON): Performance
485 monitoring module. Counts both instructions issued and
488 * NOTE: mon does not contain to count instruction loads as this
489 information is already available from the mon_issue() hook.
491 * FIXME: mon doesn't have access to register usage information.
492 This is needed if the user wants to monitor things like register
495 * igen.c (lf_print_c_semantic), vm_n.h: Add counting code.
497 * psim.h, psim.c (psim_create), cpu.h, cpu.c (cpu_create): Attach
498 a common monitor to each of the cpus. Delete
499 cpu_increment_number_of_insns() and cpu_get_number_of_insns()
500 replaced by copied code in mon.[hc].
504 * sim_calls.c, main.c, psim.c (psim_create): always create
505 `WITH_SMP' cpus. The actual number of CPU's active in a
506 simulation run is taken from the device node: /init/smp (an
507 integer). WITH_SMP changed to 2 (remember to put it back to 0).
511 * system.c: More system call emulation. If code appears NetBSD
512 specific, make conditional to being compiled on a NetBSD system
517 * Makefile.in, gen.c(delete), igen.c(new), dgen.c(new),
518 lf.[ch](new), table.[ch](new): Split into two generators - igen
519 that outputs the instruction tables and dgen that outputs the spr
520 tables. Add -f (filter out) flag to igen to filter out certain
521 instructions (ex 64 bit ones) from the created tables. Include
522 $(LIBIBERTY_LIB) in link options in case host lacks some libc
525 * NOTE: igen, since it was originally written for the
526 PowerPC/RS6000, things the MSB is 0 and the LSB is 63{31}.
528 * Makefile.in, std-config.h, ppc-cache-rules(new),
529 ppc-opcode-complex(new), ppc-opcode-simple(new): (for igen) Create
530 cache-rule and opcode-rule tables from macros found std-config.h.
531 Delete corresponding macro's from std-config.h.
533 * FIXME: under this new igen scheme, when playing around with igen
534 options, you'll find that depenencies don't work very well.
536 * igen.c (gen_itable_c, gen_itable_h), Makefile.in: code to output
537 an table of all the instructions. Code to output a type
538 enumerating all the instructin names.
540 * igen.c(lf_print_c_semantic): Move call to increment instruction
541 counter so that it occures _after_ the instruction has been fully
542 validated, was double counting illegal/invalid instructions. Add
543 conditional so only compiled in when WITH_PROFILE enabled (enabled
546 * igen.c, cpu.h, cpu.c(cpu_increment_number_of_insns): Include
547 itable.h, count individual instruction types not just total,
548 adjust reporting functions to output this.
550 * ppc-instructions (64 bit Load Doubleword with Update Indexed):
551 Had 32./ instead of 31./
553 * ppc-instructions (64 bit Store Double Word Conditional Indexed):
554 bitrot - updated to use newer CR register operators.
556 * ppc-instructions (64bit Floating Convert from Integer
557 Doubleword): Correct call to Round_Float().
561 * basics.h: #include "sim_callbacks.h" earlier so that its
562 prototypes are declared in all other header files.
564 * bits.h, bits.c, idecode_expression.h (ROTL32, ROTL64): Update
565 doc in bits.h, remove dead code in bits.c, move ROTL32/ROTL64 into
568 * FIXME: the bits.h/bits.c macro's should be replaced with
569 (inline) c functions.
571 * cpu.c(cpu_add_commas), device_tree.h, device_tree.c(scand_*):
572 Add size of buffer argument to functions writing a string into a
573 buffer. Check for buffer overflow.
577 * devices.h, devices.c, debug.h, debug.c: add macro's for tracing
578 of each device. Make parameter names consistent so macros work.
579 Use macro's in device functions.
581 * device_tree.c, devices.h, devices.c: include path to device in a
582 devices node when creating it.
584 * device_tree.c, debug.h, debug.c: Add tracing of `device-tree'.
586 * core.c: add tracing of core-device, adjust parameter names in
587 core functions to be consistent with those in devices*.
591 * debug.h, debug.c (trace_option): New function. Parses the trace
592 option, updating the trace array.
594 * debug.h, debug.c (trace_usage): New function. Outputs the list
595 of all possible trace options.
597 * sim_calls.c (sim_open), main.c (main): Use new trace_option() to
598 parse trace options specified with the simpler -t flag. Adjust
601 * FIXME: basic parsing of command line options is still duplicated
602 by main.c and sim_calls.c
606 * Makefile.in (clean): Delete *.i and *.out files.
608 * ppc-endian.c (SWAP_n): Add SET argument to allow use of SWAP
609 macros for either assignment or return. Fix SWAP_8 to use a
610 union, and two SWAP_4's. Delete SWAP_N, since nobody uses it now.
611 (ENDIAN_N): Add SET argument to SWAP_n calls. Delete macro defs
612 that hardwired swapping on/off, let optimizer delete dead code.
614 * main.c (main): Add printf that we caught a signal and print out
619 * Makefile.in: Remove tabs from otherwise empty line.
620 Confuses many non-GNU versions of "make".
624 * Makefile.in (clean): Delete files produced by gen.
628 * gen.c (lf_print_c_semantic_function): Move counting # of
629 instructions here so it works with caching.
630 (gen_idecode_c): Move from here.
634 * gen.c, ppc-instructions, psim.c: Fix code for generating
635 cracking instruction cache. Delete the code that cached just the
636 result from doing an instruction lookup - this ran slower than no
641 * Makefile.in (gen.o): Include $(INLINE_CFLAGS).
643 * debug.h (ppc_trace): Rename from trace, to avoid a conflict with
644 TCL when gdb is linked with the simulator.
645 * debug.c (ppc_trace): Ditto.
646 * sim_calls.c (sim_open): Change trace -> ppc_trace.
647 * main.c (main): Ditto.
649 * cpu.c (cpu_add_commas): Remove extra static.
653 * Makefile.in (psim.o): Now that inlines are turned on, make
654 psim.o depend on all sources.
656 * cpu.c (cpu_add_commas): New function to format a long with
658 (cpu_print_info): Use it to print number_of_insns.
660 * ppc-endian.c (SWAP_n): New macros to speed up byte swapping for
662 (ENDIAN_N): If both target and host byte orders are known, don't
663 bother testing CURRENT_{TARGET,HOST}_BYTE_ORDER.
665 * ppc-endian.h (target specific H2T_n/T2H_n macros): Remove #if 0
666 to allow target specific H2T_n/T2H_n macros to be used.
667 (htonl, ntohl): If compiled on a 486 by GCC and WITH_BSWAP is
668 non-zero, redefine the htonl/ntohl macros to use the BSWAP instead
669 of the 3 instruction sequence that runs on 386s.
671 * std-config.h (WITH_{HOST,TARGET}_BYTE_ORDER): Don't override if
672 specified on the compile line.
673 (WITH_BSWAP): If not defined, define as 0.
675 * Makefile.in (INLINE_CFLAGS): Add -DDEFAULT_INLINE=2 to add
676 default inline support. Pass INLINE_CFLAGS when compiling.
678 * devices.{h,c} (unimp_device_ioctl): Use STATIC_DEVICES, not
679 INLINE_DEVICES since GCC doesn't like inline functions that
680 accept variable arguments.
681 (stack_ioctl_callback): Make function just static because GCC
682 doesn't like inline functions that accept variable arguments.
684 * devices.h (STATIC_DEVICES): Define as empty if not defined.
686 * inline.c: Correct pathnames of included C files to match current
689 * inline.h (STATIC_DEVICES): If DEVICES_INLINE is defined to be
690 non-zero, define STATIC_DEVICES to be static.
692 * std-config.h (INLINE): If GNU C and optimizing, define this as
694 (DEFAULT_INLINE): If not defined, define as 0.
695 (ENDIAN_INLINE): If not defined, define as DEFAULT_INLINE.
696 ({CORE,VM,CPU,EVENTS,REGISTERS,INTERRUPTS}_INLINE): Ditto.
697 ({SPREG,IDECODE}_INLINE): Ditto.
701 * ppc-instructions: Initial cut of floating point suport added.
702 Of note include - use of host IEEE floating point instructions,
703 use of PowerPC manual pseudo code to handle the FPSCR. It is not
704 currently a pretty sight.
706 * memory_map.h, memory_map.c, memory_map_n.h, core.h, core.c:
707 merge into core.h, core.c, core_n.h. The type memory_map replaced
708 with core_map. This removes a level of pointer indirection when
709 translating an address.
711 * memory_map.h, memory_map.c, memory_map_n.h: delete.
713 * Makefile.in et.al (sorry): tweek to use new core, core_map and
718 * sim_calls.c, main.c: Add -g (trace_gdb) option, add tracing to
719 most of the other functions in sim_calls.c.
721 * basics.h (CONCAT3), memory_map.c, memory_map_n.h, Makefile.in:
722 Add macros to better cover up `generic' code. Makes it possible
723 to step through the generic code!
725 * vm.c, vm_n.h, Makefile.in: ditto
729 * devices.h, devices.c, memory_map.h, memory_map.c: Changed
730 callback interface so that there is a read/write buffer but no
731 read/write_word. VEA default memory read/write handler sometimes
732 couldn't resolve an access and of those some were for a memory
733 fault and some were because gdb was making a bogus request.
735 * devices.h, devices.c, memory_map.h, memory_map.c, vm.h, vm.c:
736 eliminate transfer_mode (raw or cooked) parameter from read/write
741 * ppc-instructions (fmul, fmuls): correct instruction format - had
746 * psim.c, device_tree.h, device_tree.c, devices.c (printd_*,
747 scand_*): new functions to parse/print fields in device names
748 while hiding any machine dependency.
750 * devices.c, psim.c: Change the stack init code so that it is
751 handled by a device. Arguments passed across using a device ioctl
754 * devices.h, devices.c: device ioctl callback changed to allow a
755 variable number of arguments. This gives greater flexability and
756 greater chance of bugs.
760 * main.c (printf_filtered, error): Missing va_end() to close off
761 variable argument use.
763 * Makefile.in (tmp-gencode): comment out hack to get around some
764 versions of make not handling files being created as side-effects.
766 * gen.c (lf_open): Add -n (real_file_name) option. Specifies an
767 alternative file name to use in output files for things like #line
770 Makefile.in (tmp-gencode): Use gen -n so that debug info is
773 * Makefile.in (TARGETLIB): Use this instead of libsim.a in the
778 * sim_calls.c (sim_set_callbacks): Define new function.
782 * psim.c (psim_print_info): Print exit status or signal number.
786 * cpu.c (struct _cpu): Add number_of_insns field to trace how many
787 instructions are executed.
788 (cpu_increment_number_of_insns): New function to increment the
789 number of instructions issued.
790 (cpu_get_number_of_insns): New function to return the number of
792 (cpu_print_info): New function to print cpu related information.
793 At present, print the number of instructions executed.
795 * gen_idecode_c: Emit call to cpu_increment_number_of_insns within
798 * psim.c (psim_print_info): New function to iterate over each of
799 the CPU's calling cpu_print_info.
801 * psim.h,cpu.h: Add new declarations.
803 * sim_calls.c (sim_open): Add argument processing to add the same
804 switches main.c accepts for the standalone processor.
805 (sim_close): Call psim_print_info if -I.
807 * main.c (main): Add comment saying to update sim_calls.c when
808 adding switches. Add -I to call psim_print_info when done.
809 (usage): Update usage message.
813 * main.c (printf_filtered): Correct to match new prototype.
817 * sim_callbacks.h (printf_filtered): Correct prototype.
821 * device_tree.c (OEA_MEMORY_SIZE): Define if not defined to
823 (clayton_memory_size): Define as OEA_MEMORY_SIZE.
825 * std-config.h (WITH_TRACE): Default to 1 now.
827 * psim.c (write_stack_arguments): Don't write any stack arguments
830 * main.c (main): Switch to using getopt. Make -p also set
831 trace_semantics. Make -a turn on all trace flags. Make -C turn
834 * device_tree.c (create_option_device_node): Assume a program is
835 OEA if the start address is < 4096, not just == 0.
839 * Makefile.in (maintainer-clean): New synonym for realclean.
843 * registers.c (register_description): Add gdb synonyms for cr
848 * Makefile.in (install): Don't install in $(tooldir).
850 * configure.in: Call AC_CONFIG_HEADER. Don't try to use
851 bfd/hosts/*.h file or bfd/config/*.mh file. Call AC_PROG_CC and
852 AC_PROG_RANLIB. Substitute in values for CFLAGS, HDEFINES, AR,
853 and CC_FOR_BUILD. Call AC_CHECK_HEADERS for various header files.
854 Touch stamp.h if creating config.h.
855 * configure: Rebuild.
856 * config.in: New file, created by autoheader.
857 * Makefile.in (AR): Define as @AR@.
858 (CC): New variable, defined as @CC@.
859 (CFLAGS): Define as @CFLAGS@.
860 (CC_FOR_BUILD): New variable, defined as @CC_FOR_BUILD@.
861 (RANLIB): Define as @RANLIB@.
862 (HDEFINES, TDEFINES): New variables.
863 (@host_makefile_frag@): Remove.
864 (mostlyclean): Make the same as clean, not distclean.
865 (clean): Remove config.log.
866 (distclean): Remove config.h and stamp-h.
867 (Makefile): Don't depend upon @frags@. Just rebuild Makefile when
868 invoking config.status.
869 (config.h, stamp-h): New targets.
870 (gen, gen.o): Build with CC_FOR_BUILD, not CC.
871 (ppc-config.h): Rename from old config.h build.
872 * (basics.h,gen.c,ppc-endian.c,psim.c): Include ppc-config.h.
876 * configure{,.in}: Don't include sysdep.h from bfd, since bfd no
878 * basics.h (sysdep.h): Don't include it.
879 * Makefile.in (BASICS_H): Remove sysdep.h.
883 * core.c (core_add_data): First growth of bss was being put at
884 wrong address (0) instead of &end.
886 * core.c (core_add_stack, core_add_data): Was not handling case
887 where bss/stack is grown across the current end-of-{bss,stack}.
891 * system.c (system_call): Fix SYS_break - was aligning bss to a
892 page boundary instead of just an 8 byte one; On first call sbrk(0)
897 * Makefile.in (install): Fix install rule.
901 * system.c (system_call): Add read support.
903 * main.c (main): -t sets trace_device_tree. Correct usage message
906 * device_tree.c (update_memory_node_for_section): Make tracing
907 output line up. If not code or readonly, assume that the section
908 is a data section and has read/write permissions. Add readonly
911 * core.c (create_core_from_addresses): Print end address in traces
912 and make tracing output line up.
914 * Makefile.in: Rewrite from Makefile to work with the Cygnus
915 environment, and support compiling in a different directory than
916 the sources reside in.
918 * ppc-endian.h: Rename from endian.h so that it doesn't get
919 confused with /usr/include/sys/endian.h on Linux. Add Linux
922 * ppc-endian.c: Rename to be consistant with ppc-endian.h.
923 Include ppc-endian.h, not endian.h.
925 * basics.h (sysdep.h): Include sysdep.h that configure makes.
926 Include ppc-endian.h, not endian.h.
928 * std-config.h: Rename from ppc-config. Put #ifndefs around most
929 configuration macros, so they can be overridden via CFLAGS. By
930 default, turn off tracing.
932 * configure.in: Clone from other simulator targets.
933 * configure: Generate via autoconf from configure.in.
937 * ppc-instructions: fix srawi (was geting XER[CA] real wrong).
939 * interrupts.c (data_storage_interrupt): allow stack to grow by
940 upto one MB per increment.
942 * ppc-instructions: divw was computing rA / rA not rA / rB
944 * main.c (main): really stupid. Wasn't exiting with correct status
948 * system.c (system_call): add system calls kill(2) and getpid(2).
950 * main.c (main): Check/return exit status when simulation
955 * device_tree.c (create_option_device_node): Alignment rules (at
956 least for the moment) now are for strict alignment only for LE OEA
957 mode. (Because of compiler problems).
959 * system.c (system_call) SYS_exit: Wasn't exiting with correct status.
963 * vm.c (DEFINE_VM_DATA_MAP_WRITE_N): For miss aligned transfer
966 * system.c (system_call): didn't page align break argument before
967 determining increment break increment.
969 * psim/ppc: Re-arange entire directory structure so that
970 everything lives in the one directory. While a pain for cleaning,
971 makes building across multiple architectures much simpler.
973 * devices.c, device_tree.c: Added code that provides a simple
974 illustration of how an interrupt control device could be
977 * devices.c: Added code so that the dumb console device can read
978 (from stdin) as well as write to stdout.