1 Sun Nov 12 07:58:09 1995 Michael Meissner <meissner@wogglebug.tiac.net>
3 * options.c (print_options): Print out WITH_{,DEFAULT_}MODEL, not
4 WITH_PPC_{,DEFAULT_}_MODEL.
5 (options_ppc): Delete now unused function.
6 (cpu.h): Include cpu.h, not just basics.h.
8 * std-config.h (WITH_{,DEFAULT_}MODEL): Define.
10 * igen.c (model_macros, last_model_macro): New statics to keep
11 track of macros to go in model.h.
12 (insn_table_load_insns): Add model-macros to model_macros linked
14 (model_table_fields): Add field for printable name.
15 (gen_model_h): If there are model macros defined, print them out.
16 Print out DEFAULT_MODEL as the first model if there any models
17 specified, otherwise MODEL_NONE. Print out external decl for
18 current_model. Print out decl for model_set.
19 (gen_model_c): Add function model_set. Switch to use printable
20 name for the model, not the internal identifier used.
22 * psim.c (current_model): New global variable.
24 * ppc-instructions: Add macros for flag defines. Switch first
25 model so 604 is first.
27 * main.c (main): Call model_set, not function_unit_model.
28 * sim_calls.c (sim_open): Ditto.
29 * sim_calls.c, Makefile.in: sim_calls.c now includes cpu.h.
31 Sat Nov 11 07:27:41 1995 Michael Meissner <meissner@tiktok.cygnus.com>
33 * mon.h (mon_events): New enumeration for other events we want to
35 (mon_event): Add declaration for function.
37 * mon.c (mon_event): New function.
38 (mon_print_info): Print icache misses.
40 * psim.c (run_until_stop): Monitor icache misses.
42 * configure.in (--enable-sim-inline): Fix typos in handling comma
43 separated inline options.
44 (--enable-sim-icache): Echo icache size.
45 * configure: Regenerate.
47 * igen.c (semantics_h_print_function): Emit STATIC_SEMANTICS
48 instead of INLINE_SEMANTICS so that the compiler won't keep all of
49 the semantic functions as inline RTL, given that the address of
50 the function is taken which forces outline calls anyway.
51 (lf_print_c_semantic_function_header): Ditto.
52 (gen_semantics_h): Define STATIC_SEMANTICS as nothing if not
54 (lf_print_c_cracker_function): Emit STATIC_IDECODE instead of
55 STATIC_INLINE_IDECODE.
56 (gen_idecode_c): Define STATIC_IDECODE if not defined.
57 (gen_model_h): Use #ifdefs to define types to hold model units,
59 (model_table_insert): Add a sentinel functional unit at the end to
60 simplify loop processing.
61 (model_c_insn): Use <function-unit>_SENTINAL instead of 0 for any
62 instruction not specifing a function unit for the current model.
63 (gen_model_{c,h}): Provide bounds for model_time_mapping.
65 * inline.h (STATIC_SEMANTICS): Define to be static if
66 SEMANTICS_INLINE is defined.
67 (STATIC_IDECODE): Define to be static if IDECODE_INLINE is
70 * options.c (print_options): Fix typo.
72 Fri Nov 10 06:39:46 1995 Michael Meissner <meissner@tiktok.cygnus.com>
74 * configure.in (--enable-sim-{opcode,config}): Use $srcdir when
75 check for the existence of files.
76 * configure: Regenerate.
78 * table.c (table): New field nr_model_fields.
79 (table_open): New parameter nr_model_fields.
80 (table_entry_read): Parse model fields that begin with a '*' after
82 * igen.c, dgen.c: Change callers of table_open.
84 * igen.c: Add support for dumping model specific information in
86 (insn_field_name): Delete unused array.
87 (global variables): Make global variables static, so we can tell
88 when they are no longer used.
89 (cache_semantic_actual): Delete unused variable.
90 (insn_table_load_insns): If the insn is really a machine model,
91 call model_table_insert instead of other processing.
92 (model_table_insert): New function to handle defining the
93 functional units of a particular machine model.
94 (insn_table): Add last_function field so we can add functions at
96 (insn_table_insert_function): Use last_function field when
97 appending new function.
99 * ppc-instructions: Add a few model specific information for 603,
100 603e, and 604 for testing purposes.
102 * table.h (table_model_entry): New linked list to hold model
103 specific information, one per line.
104 (table_entry): Add model_first, model_last fields.
106 * configure.in (--enable-sim-inline): If gcc is found and
107 --enable-sim-inline is not specified, defaine DEFAULT_INLINE to 1,
109 (--enable-sim-reserved-bits): New switch to check whether reserved
110 bits are set in the instruction.
111 (--enable-sim-opcode): Make complex the default.
112 (all switches): Add appropriate checks and error messages.
113 * configure: Regenerate.
115 * Makefile.in (RESERVED_CFLAGS): New variable set by
116 --enable-sim-reserved-bits.
117 (CONFIG_CFLAGS): Include RESERVED_CFLAGS.
118 (BUILT_SRC): igen now generates model.c and model.h.
119 (LIB_OBJ): Include table.o.
120 (tmp-igen): Add -m/-M options to write model.c/model.h.
121 (model.o): New object.
122 (CPU_H): Include model.h.
124 * cpu.h: Include model.h.
126 * std-config.h (WITH_RESERVED_BITS): Define.
127 (MODEL_INLINE): Ditto.
129 * options.c (print_options): Print out WITH_RESERVED_BITS.
131 Thu Nov 9 12:22:15 1995 Michael Meissner <meissner@tiktok.cygnus.com>
133 * configure.in: If --silent, don't output information messages.
134 * configure: Regenerate.
136 * configure.in (--enable-sim-alignment): Fix typo in specifing non
138 (--enable-sim-switch): Make default on.
139 (--enable-sim-duplicate): Make default on.
140 (--enable-sim-smp): Make default 0.
141 (--enable-sim-mon): Don't set sim_float if not set.
142 (--enable-sim-inline): If gcc is found and --enable-sim-inline is
143 not specified, define DEFAULT_INLINE to be 2.
144 (all --enable-sim-* rules): Echo rules set to non empty to file
146 * configure: Regenerate.
148 * options.c (options_env): Fix typo if WITH_ENV is 0.
149 (print_options): Print GCC compiler version if available and
150 date/time options was compiled. If OPCODE_RULES, IGEN_FLAGS,
151 and/or DGEN_FLAGS are defined, print them.
153 * Makefile.in (all link actions): Pass SIM_CFLAGS as well as
155 (options.o): Compile options.o with OPCODE_RULES, IGEN_FLAGS, and
156 DGEN_FLAGS defined, so they can be printed out.
158 * igen.c (lf_print_c_validate): Check for WITH_ASSERT, so that
159 this test can be compiled away if the user really wants a fast
160 simulator by not doing assertion failures.
162 Wed Nov 8 13:19:47 1995 Michael Meissner <meissner@tiktok.cygnus.com>
164 * options.c: New file to print out all of the WITH_ options.
165 * options.h: New include file to declare print_options.
166 * debug.h (trace_options): Add trace_opts to call print_options.
167 * debug.c (trace_description): Add trace_opts support.
168 * main.c (main): If user requested options, print them.
169 * sim_calls.c (sim_open): Ditto.
171 * igen.c (opcode_field_new): Add void to make it a proper prototype.
173 * emul_generic.c (emul_enter_call): Make printf_filtered arguments
175 * emul_netbsd.c (do_kill): Ditto.
176 * registers.c (registers_dump): Ditto.
177 * vm.c (om_translate_effective_to_real): Ditto.
178 * vm_n.h (vm_data_map_read_N): Ditto.
179 (vm_data_map_write_N): Ditto.
180 * devices.h (DTRACE_INIT): Ditto.
181 (DTRACE_{ATTACH,DETACH}_ADDRESS): Ditto.
182 (DTRACE_IO_{READ,WRITE}_BUFFER): Ditto.
183 (DTRACE_DMA_{READ,WRITE}_BUFFER): Ditto.
184 * devices.c (update_for_binary_section): Ditto.
185 (write_stack_arguments): Ditto.
186 (stack_ioctl_callback): Ditto.
187 * device_tree.c (device_tree_add_passthrough): Ditto.
188 (device_tree_{add,find}_device): Ditto.
189 (device_tree_{add,find}_integer): Ditto.
190 (device_tree_find_{string,boolean}): Ditto.
191 (device_tree_init{,_device}): Ditto.
192 (device_tree_dump): Ditto.
193 * sim_calls.c (sim_{read,write}): Ditto.
194 (sim_{fetch,store}_register): Ditto.
195 (sim_stop_reason): Ditto.
197 * sim_callbacks.h (printf_filtered): Declare with attribute
198 printf, so we can enable format checks.
200 * devices.c (console_io_{read,write}_buffer_callback): Cast swtich
201 argument to int, since ANSI doesn't allow long switch values.
202 * emul_netbsd.c (do___sysctl): Ditto.
204 * emul_netbsd.c (do___sysctl): Fix up printf call.
206 * corefile.c (core_translate): Don't do arithmetic with void *
207 pointers. Cast to char * first.
209 * function_unit.c (FUNC_{LOAD,STORE}): Rename from {LOAD,STORE}
212 * Makefile.in ({FUNC,MODEL,WARNING}_CFLAGS): New flags set by
213 configure --enable switches.
214 (CONFIG_CFLAGS): Include FUNC_CFLAGS and MODE_CFLAGS.
215 (.c.o): Include WARNING_CFLAGS.
216 (CPU_H): Include function_unit.h.
217 (LIB_OBJ): Include function_unit.o.
218 (BUILT_SRC_WO_CONFIG): Split from BUILT_SRC and do not include
219 config.h or ppc-config.h.
220 (BUILT_SRC): Include BUILT_SRC_WO_CONFIG, config.h and
222 (filter_filename.o): Include config.h/ppc-config.h dependencies.
223 (idecode.o, semantics.o, psim.o): Specify CC line without
224 WARNING_CFLAGS so that we don't get all of the unused variable
225 warnings that are generated.
226 (function_unit.o): Add rule to build.
227 (main.o, sim_calls.o): Add function_unit.h, itable.h dependencies.
228 (mon.o): Include mon.c dependency.
229 (TAGS): Depend on BUILT_SRC.
230 (clean): Don't delete config.h or ppc-config.h
232 * basics.h (sim_callbacks.h): Move include after the include of
233 config.h and ppc-config.h.
235 * bits.{h,c} (ROTL32,ROTL64): Move these functions to bits.c. Add
236 support for BITS_INLINE to inline these. Add declarations to
239 * configure.in (--enable-sim-warnings): Add new option to specify
240 compiler warnings for all modules except idecode.o and semantics.o
241 which have lots of unused variables because they are machine
243 (--enable-sim-function-unit): New switch to configure whether
244 function unit support is compiled in or not.
245 (--enable-sim-{,default-}mode): New switches to control which cpu
247 * configure: Regenerate.
249 * corefile.c (core_attach_address_callback): Delete unused
250 variable device_address.
252 * cpu.c (struct _cpu): Add function unit pointer field func_unit.
253 (cpu_create): If WITH_FUNCTION_UNIT, call function_unit_create.
254 (cpu_init): If WITH_FUNCTION_UNIT, call function_unit_init.
255 (cpu_halt): If WITH_FUNCTION_UNIT, call function_unit_halt.
256 (cpu_function_unit): New function to return func_unit field.
258 * cpu.h (function_unit.h): Include new include file.
259 (cpu_function_unit): Declare.
261 * debug.c (stdlib.h): Test HAVE_STDLIB_H, not HAVE_STDLIB.
262 (config.h): Include config.h.
264 * devices.c (icu_io_write_buffer_callback): Delete unused variable
267 * emul_generic.c (emul_exit_call): Print out status value.
269 * emul_netbsd.c (do_read): Delete unused variable nr_moved.
271 * filter_filename.h (includes): Include config.h, ppc-config.h,
274 * inline.c: Include bits.c if BITS_INLINE. Include
275 function_unit.c if FUNCTION_UNIT_INLINE.
277 * inline.h (INLINE_BITS): Define if BITS_INLINE.
278 (INLINE_FUNCTION_UNIT): Define if FUNCTION_UNIT_INLINE.
280 * interrupts.c (instruction_storage_interrupt): Delete unused
283 * lf.h (config.h): Include config.h.
285 * main.c (includes): Include function_unit.c. If HAVE_UNISTD_H,
287 (usage): Update for -m model, -i, and -I options.
288 (main): Delete unused variables stack_pointer and i. Add support
289 for -i, -m model arguments. Call psim_print_info with verbose ==
290 1 if -i, and verbose == 2 if -I.
292 * mon.c (stdio.h): Include stdio.h to pick up sprintf prototype.
293 (mon_issue): Call function_unit_issue if function units are
295 (mon_print_info): Take psim * argument. Print out information
296 from function_unit if available. Move read/write stats to always
297 print, instead of printing if verbose > 1. Fix up plural
300 * mon.h (mon_print_info): Update prototype.
302 * psim.c (current_ppc_model): Add global variable.
303 (psim_print_info): Pass system argument to mon_print_info.
305 * sim_calls.c (function_unit.h): Include.
306 (sim_open): Add support for -i and -m model options. If -i call
307 psim_print_info with verbose == 1, if -I, with verbose == 2.
308 (sim_resume): Delete unused variable program_counter.
310 * std-config.h (WITH_FUNCTION_UNIT): Define.
311 (ppc_model): Add enumeration giving all PowerPC models currently
313 ({WITH,CURRENT}_PPC_MODEL): Define.
314 (FUNCTION_UNIT_INLINE): Define.
316 * table.c (config.h): Include config.h.
318 * vm.c (om_virtual_to_real): Print pte_word_{0,1} so the compiler
319 doesn't complain that they're unused.
321 * vm_n.h (vm_data_map_read_N): Delete unused variable rval.
323 Mon Nov 6 23:15:54 1995 Andrew Cagney <cagney@highland.com.au>
325 * sim-endian.c (ppc-endian.c), sim-endian.h (ppc-endian.h):
326 renameed. These files are target independant.
327 * Makefile.in, basics.h: update for new name.
329 * sim-endian.h (SWAP_N), sim-endian.c (_SWAP_1): Rename existing
330 SWAP_<N> to _SWAP_<N> so that sim-endian.h can contain SWAP_N
333 * sim-endian.c, sim-endian-n.h (new file): Move endian code into a
334 debugable header file.
336 * ppc-instructions (Byte-Reverse): Enable byte reverse
337 instructions using SWAP_N macros.
339 Mon Nov 6 10:39:28 1995 Michael Meissner <meissner@tiktok.cygnus.com>
341 * Makefile.in (config.status): Remove references to config.make
344 * config.{make,hdr}: Delete, no longer used.
347 Mon Nov 6 20:49:56 1995 Andrew Cagney <cagney@highland.com.au>
349 * sim_calls.c (sim_open): Fix parsing of `target sim' options.
351 * device_tree.c (device_tree_add_string): Wasn't saving the value
352 of the string being entered into the tree.
354 * psim.c (create_filed_device_tree): Not terminating string device
357 * psim.c (psim_create): Use `env' instead of
358 `environment-architecture' to be consistent with configure.
359 Reconize user/uea, virtual/vea and operating/oea.
361 Sat Nov 4 12:29:45 1995 Fred Fish <fnf@cygnus.com>
363 * core.c: Rename to corefile.c
364 * core.h: Rename to corefile.h
365 * inline.c: Include corefile.h, renamed from core.h.
366 * cpu.h: Include corefile.h, renamed from core.h
367 * vm.c: Include corefile.h, renamed from core.h
368 * corefile.c: Include corefile.h rather than core.h
369 * README.psim (KNOWN PROBLEMS): Change core.* references to corefile.*
371 * Makefile.in (CPU_H): Change core.h to corefile.h
372 (vm.o): Change dependency to corefile.h
373 (LIB_SRC): Change core.c to corefile.c.
374 (LIB_OBJ): Change core.o to corefile.o.
375 (corefile.o): Change dependencies to corefile.c, corefile.h.
377 Fri Nov 3 11:37:24 1995 Michael Meissner <meissner@tiktok.cygnus.com>
379 * ppc-instructions (data cache instructions): Make all data cache
380 instructions nops instead of invalid instructions.
382 * Makefile.in (CONFIG_CFLAGS): Add ALIGNMENT_CFLAGS and
383 TIMEBASE_CFLAGS which weren't included.
385 Thu Nov 2 08:54:04 1995 Michael Meissner <meissner@tiktok.cygnus.com>
387 * Makefile.in: Uncomment built file dependencies.
389 * configure.in: Rewrite --enable-sim switch handling to use the
390 autoconf builtins so it works correctly if the configure or
391 Makefile.in files are modified and make decides to rebuild
392 Makefile. Also document all of the --enable-sim switches
393 supported. Check whether getrusage and sys/resource.h are
395 * config.in: Regenerate.
396 * configure: Regenerate.
397 * Makefile.in: Add support for all of the variables set with
398 --enable-sim switches.
400 * Makefile.in (clean): make clean now removes all built sources as
403 * cpu.c: Use HAVE_STRING_H, HAVE_STRINGS_H, HAVE_UNISTD_H,
404 HAVE_TIME_H, HAVE_SYS_TIMES_H, HAVE_SYS_RESOURCE_H defined in
405 the generated config.h.
407 * device_tree.c: Ditto.
410 * emul_netbsd.c: Ditto.
415 * registers.c: Ditto.
420 * main.c (main): Call psim_print_info with verbose == 2.
422 * mon.c (mon_print_info): Align the cpu number and number of
423 instructions fields. Do not print an instruction category if the
424 CPU did not execute any of those instructions. Print out number
425 of reads and writes. If getrusage is supported, print out number
426 of simulated instructins per second.
428 * configure.in: Add support for --enable-sim-opcode=stupid.
429 * configure: Regenerate.
431 Wed Nov 1 23:46:59 1995 Andrew Cagney - aka Noid <cagney@highland.com.au>
433 * std-config (INLINE_DEVICE_TREE): Don't inline either of
434 device_tree.c or devices.c. There is no significant gain.
436 * configure.in, Makefile.in: add --enable-sim-icache=[0-9]* and
439 Wed Nov 1 23:46:59 1995 Andrew Cagney - aka Noid <cagney@highland.com.au>
441 * igen.c (main), misc.h (target_a2i, i2target), misc.c: Add
442 functions to convert between target and igen internal bit numbers.
443 Make IO go through these functions. Add -b (bit size) and -h (high
444 bit nr) options to igen. Typical usage would be: ./igen -b 16 -h
445 15 for a 16 bit instruction format with the msb given a number 15.
447 Wed Nov 1 22:17:32 1995 Andrew Cagney - aka Noid <cagney@highland.com.au>
449 * dgen.c (main): Was outputting optarg even when it was NULL.
451 Tue Oct 31 23:48:33 1995 Andrew Cagney - aka Noid <cagney@highland.com.au>
453 * vm_n.h (vm_data_map_load_N, vm_data_map_store_n), debug.h,
454 debug.c: Add tracing of load/store unit (virtual) with -t
457 Tue Oct 31 21:44:01 1995 Andrew Cagney - aka Noid <cagney@highland.com.au>
459 * std-config.h (WITH_ENVIRONMENT): Add USER_ENVIRONMENT which does
460 not include things such as the time base and events.
462 * interrupt.c, sim_calls.c, cpu.h, vm.c, configure.in: Add UEA to
463 all environment switches for above.
465 * psim.c (psim_create): ditto - new device tree node name is
466 /options/environment-architecture with values user, virtual and
469 Tue Oct 31 21:31:32 1995 Andrew Cagney - aka Noid <cagney@highland.com.au>
471 * ppc-opcode-stupid: Third example of use of opcode table - this
472 one expands all mtspr/mfspr and branch instructions. Appears to
473 give about a 10% gain in performance if everything enabled. Also
474 takes about 150mb of swap to build.
476 Wed Nov 1 10:49:48 1995 Michael Meissner <meissner@tiktok.cygnus.com>
478 * emul_netbsd.c (do_exit): Print arguments and close parenthesis
479 if tracing, since exit doesn't go through emul_exit_call.
480 (do_read): Print arguments if tracing.
486 (do_sigprocmask): Replace trace with printing arguments if
488 (do_ioctl): Print arguments if tracing.
492 (do_gettimeofday): Ditto.
493 (do_getrusage): Ditto.
496 * filter_filename.c: New file to provide filter_filename to strip
497 the directory prefix from a file.
498 * filter_filename.h: New include file to declare filter_filename.
500 * debug.h: Include filter_filename.h.
501 (TRACE,DTRACE,ERROR): Use filter_filename on __FILE__.
503 * misc.h: Include filter_filename.h.
504 (ASSERT): Use filter_filename on __FILE__.
506 * igen.c (lf_print_my_prefix): Use filter_filename on the filename
509 * Makefile.in: Add filter_filename support.
511 * ppc-instructions (dcbi, icbi): Make these NOPs rather than
512 invalid instructions.
514 * configure.in: Add support for more --enable-sim-* switches.
515 Use config.make and config.hdr to write to Makefile and config.h
516 respectively. Don't rewrite Makefile, just append to it.
517 * configure: Regenerate.
518 * config.{make,hdr}: New shell scripts.
520 * Makefile.in: Remove all variables set by configure.in.
521 (psim.o): Depend on $(BUILT_SRC) also.
523 * emul_netbsd.c (do_gettimeofday,do_getrusage): When comparing an
524 integer, use 0, not NULL.
526 Tue Oct 31 15:20:04 1995 Michael Meissner <meissner@tiktok.cygnus.com>
528 * configure.in: Add support for --enable-sim-inline,
529 --enable-sim-bswap, --enable-sim-cflags, --enable-sim-complex,
530 --enable-sim-switch, --enable-sim-duplicate, --enable-sim-filter,
531 and --enable-sim-endian switch to control various Makefile
533 * configure: Regenerate from configure.in.
534 * Makefile.in: Add various Make variables that the various
537 * std-config.h (DEFAULT_INLINE): Don't set this to 2 if using GCC
538 and optimizing by default.
540 Fri Oct 27 19:26:27 1995 Andrew Cagney <cagney@highland.com.au>
542 * bits.h (ROTL32, ROTL64): Were functions, made them macros, now
543 make them functions again. Appears 2.6.3 is confused by just a
546 Thu Oct 26 18:31:58 1995 Andrew Cagney <cagney@highland.com.au>
548 * ppc-endian.c (SWAP_8): Fix 8 byte swap!
550 * psim.c (psim_create): Not correctly checking that runtime
551 configuration of things like ENDIAN, ENVIRONMENT and ALIGNMENT
552 matched the compiled in ones.
554 * debug.h (ITRACE), igen.c: Tidy up more tracing flags -
555 trace_semantics is now different to trace_idecode, the former
558 Tue Oct 24 21:54:13 1995 Andrew Cagney <cagney@highland.com.au>
560 * ppc-instructions (mtsrin): Missing instruction
561 * ppc-instructions (mfsrin): Missing instruction
562 * ppc-instructions (eieio): Missing instruction
564 Tue Oct 24 20:55:29 1995 Andrew Cagney <cagney@highland.com.au>
566 * build-psim: New shell script - see internals for usage,
567 simplifies the process of building custom simulators.
569 Mon Oct 23 23:48:59 1995 Andrew Cagney <cagney@highland.com.au>
571 * std-config.h (SEMANTICS_INLINE): Tidy up notes on each of the
572 INLINE macros. Make SEMANTICS_INLINE == 1 if DEFAULT_INLINE == 2.
573 Don't use DEFAULT_INLINE to define REGISTERS_INLINE DEVICES_INLINE
574 DEVICE_TREE_INLINE or INTERRUPTS_INLINE as none of these are on
575 the instruction or data critical paths.
577 * FIXME: need to set up OS_EMUL_INLINE/EMUL_GENERIC_INLINE but
578 not on critical path.
580 * FIXME: devices.c/emul_netbsd.c would benefit (slightly) from
581 the inclusion of device_tree.c/emul_generic.c.
583 Mon Oct 23 00:31:50 1995 Andrew Cagney <cagney@highland.com.au>
585 * os_emul.[hc], emul_generic.[hc], emul_netbsd.[hc]: replace
586 system.[hc]. Start of suport for multiple emulations and
587 emulation state (os_emul object).
589 * emul_generic.[hc]: Start of code to implement proper system call
592 Sun Oct 22 21:33:51 1995 Andrew Cagney <cagney@highland.com.au>
594 * cpu.h, cpu.c (cpu_init): New function, zero the registers before
595 the processor is started. Fixes problem of registers being
596 undefined when restarting from within gdb.
598 * cpu.h, cpu.c (cpu_flush_icache): New function, flushes the
599 instruction cache (if present). Fixes problem of cpu caching gdb
600 breakpoint instructions.
602 FIXME: PSIM sometimes aborts calling error(), it should instead
603 call sim_error() say which takes care of housekeeping such as
604 saving the CIA before calling error.
606 * NOTE: cpu_flush_cache() instead of cpu_synchronize_context() is
607 used when restarting a simulation because the latter has the
608 unwanted side effect (well I as a kernel hacker think it is) of
609 performing an isync when the instruction stream doesn't contain
612 Sun Oct 22 19:27:48 1995 Andrew Cagney <cagney@highland.com.au>
614 * mon.h (new), mon.c (new), std-config.h (WITH_MON): Performance
615 monitoring module. Counts both instructions issued and
618 * NOTE: mon does not contain to count instruction loads as this
619 information is already available from the mon_issue() hook.
621 * FIXME: mon doesn't have access to register usage information.
622 This is needed if the user wants to monitor things like register
625 * igen.c (lf_print_c_semantic), vm_n.h: Add counting code.
627 * psim.h, psim.c (psim_create), cpu.h, cpu.c (cpu_create): Attach
628 a common monitor to each of the cpus. Delete
629 cpu_increment_number_of_insns() and cpu_get_number_of_insns()
630 replaced by copied code in mon.[hc].
632 Sun Oct 22 18:42:45 1995 Andrew Cagney <cagney@highland.com.au>
634 * sim_calls.c, main.c, psim.c (psim_create): always create
635 `WITH_SMP' cpus. The actual number of CPU's active in a
636 simulation run is taken from the device node: /init/smp (an
637 integer). WITH_SMP changed to 2 (remember to put it back to 0).
639 Fri Oct 20 17:26:54 1995 Andrew Cagney <cagney@highland.com.au>
641 * system.c: More system call emulation. If code appears NetBSD
642 specific, make conditional to being compiled on a NetBSD system
645 Wed Oct 18 23:02:20 1995 Andrew Cagney <cagney@highland.com.au>
647 * Makefile.in, gen.c(delete), igen.c(new), dgen.c(new),
648 lf.[ch](new), table.[ch](new): Split into two generators - igen
649 that outputs the instruction tables and dgen that outputs the spr
650 tables. Add -f (filter out) flag to igen to filter out certain
651 instructions (ex 64 bit ones) from the created tables. Include
652 $(LIBIBERTY_LIB) in link options in case host lacks some libc
655 * NOTE: igen, since it was originally written for the
656 PowerPC/RS6000, things the MSB is 0 and the LSB is 63{31}.
658 * Makefile.in, std-config.h, ppc-cache-rules(new),
659 ppc-opcode-complex(new), ppc-opcode-simple(new): (for igen) Create
660 cache-rule and opcode-rule tables from macros found std-config.h.
661 Delete corresponding macro's from std-config.h.
663 * FIXME: under this new igen scheme, when playing around with igen
664 options, you'll find that depenencies don't work very well.
666 * igen.c (gen_itable_c, gen_itable_h), Makefile.in: code to output
667 an table of all the instructions. Code to output a type
668 enumerating all the instructin names.
670 * igen.c(lf_print_c_semantic): Move call to increment instruction
671 counter so that it occures _after_ the instruction has been fully
672 validated, was double counting illegal/invalid instructions. Add
673 conditional so only compiled in when WITH_PROFILE enabled (enabled
676 * igen.c, cpu.h, cpu.c(cpu_increment_number_of_insns): Include
677 itable.h, count individual instruction types not just total,
678 adjust reporting functions to output this.
680 * ppc-instructions (64 bit Load Doubleword with Update Indexed):
681 Had 32./ instead of 31./
683 * ppc-instructions (64 bit Store Double Word Conditional Indexed):
684 bitrot - updated to use newer CR register operators.
686 * ppc-instructions (64bit Floating Convert from Integer
687 Doubleword): Correct call to Round_Float().
689 Mon Oct 16 00:31:20 1995 Andrew Cagney <cagney@highland.com.au>
691 * basics.h: #include "sim_callbacks.h" earlier so that its
692 prototypes are declared in all other header files.
694 * bits.h, bits.c, idecode_expression.h (ROTL32, ROTL64): Update
695 doc in bits.h, remove dead code in bits.c, move ROTL32/ROTL64 into
698 * FIXME: the bits.h/bits.c macro's should be replaced with
699 (inline) c functions.
701 * cpu.c(cpu_add_commas), device_tree.h, device_tree.c(scand_*):
702 Add size of buffer argument to functions writing a string into a
703 buffer. Check for buffer overflow.
705 Sun Oct 15 22:16:11 1995 Andrew Cagney <cagney@highland.com.au>
707 * devices.h, devices.c, debug.h, debug.c: add macro's for tracing
708 of each device. Make parameter names consistent so macros work.
709 Use macro's in device functions.
711 * device_tree.c, devices.h, devices.c: include path to device in a
712 devices node when creating it.
714 * device_tree.c, debug.h, debug.c: Add tracing of `device-tree'.
716 * core.c: add tracing of core-device, adjust parameter names in
717 core functions to be consistent with those in devices*.
719 Sun Oct 15 20:33:20 1995 Andrew Cagney <cagney@highland.com.au>
721 * debug.h, debug.c (trace_option): New function. Parses the trace
722 option, updating the trace array.
724 * debug.h, debug.c (trace_usage): New function. Outputs the list
725 of all possible trace options.
727 * sim_calls.c (sim_open), main.c (main): Use new trace_option() to
728 parse trace options specified with the simpler -t flag. Adjust
731 * FIXME: basic parsing of command line options is still duplicated
732 by main.c and sim_calls.c
734 Thu Oct 26 10:42:28 1995 Michael Meissner <meissner@tiktok.cygnus.com>
736 * Makefile.in (clean): Delete *.i and *.out files.
738 * ppc-endian.c (SWAP_n): Add SET argument to allow use of SWAP
739 macros for either assignment or return. Fix SWAP_8 to use a
740 union, and two SWAP_4's. Delete SWAP_N, since nobody uses it now.
741 (ENDIAN_N): Add SET argument to SWAP_n calls. Delete macro defs
742 that hardwired swapping on/off, let optimizer delete dead code.
744 * main.c (main): Add printf that we caught a signal and print out
747 Thu Oct 19 21:43:39 1995 Fred Fish <fnf@fishfood.amigalib.com>
749 * Makefile.in: Remove tabs from otherwise empty line.
750 Confuses many non-GNU versions of "make".
752 Wed Oct 18 08:51:25 1995 Michael Meissner <meissner@tiktok.cygnus.com>
754 * Makefile.in (clean): Delete files produced by gen.
756 Mon Oct 16 17:34:24 1995 Michael Meissner <meissner@tiktok.cygnus.com>
758 * gen.c (lf_print_c_semantic_function): Move counting # of
759 instructions here so it works with caching.
760 (gen_idecode_c): Move from here.
762 Wed Oct 11 17:13:15 1995 Andrew Cagney <cagney@highland.com.au>
764 * gen.c, ppc-instructions, psim.c: Fix code for generating
765 cracking instruction cache. Delete the code that cached just the
766 result from doing an instruction lookup - this ran slower than no
769 Fri Oct 13 09:58:43 1995 Michael Meissner <meissner@tiktok.cygnus.com>
771 * Makefile.in (gen.o): Include $(INLINE_CFLAGS).
773 * debug.h (ppc_trace): Rename from trace, to avoid a conflict with
774 TCL when gdb is linked with the simulator.
775 * debug.c (ppc_trace): Ditto.
776 * sim_calls.c (sim_open): Change trace -> ppc_trace.
777 * main.c (main): Ditto.
779 * cpu.c (cpu_add_commas): Remove extra static.
781 Thu Oct 12 11:35:53 1995 Michael Meissner <meissner@tiktok.cygnus.com>
783 * Makefile.in (psim.o): Now that inlines are turned on, make
784 psim.o depend on all sources.
786 * cpu.c (cpu_add_commas): New function to format a long with
788 (cpu_print_info): Use it to print number_of_insns.
790 * ppc-endian.c (SWAP_n): New macros to speed up byte swapping for
792 (ENDIAN_N): If both target and host byte orders are known, don't
793 bother testing CURRENT_{TARGET,HOST}_BYTE_ORDER.
795 * ppc-endian.h (target specific H2T_n/T2H_n macros): Remove #if 0
796 to allow target specific H2T_n/T2H_n macros to be used.
797 (htonl, ntohl): If compiled on a 486 by GCC and WITH_BSWAP is
798 non-zero, redefine the htonl/ntohl macros to use the BSWAP instead
799 of the 3 instruction sequence that runs on 386s.
801 * std-config.h (WITH_{HOST,TARGET}_BYTE_ORDER): Don't override if
802 specified on the compile line.
803 (WITH_BSWAP): If not defined, define as 0.
805 * Makefile.in (INLINE_CFLAGS): Add -DDEFAULT_INLINE=2 to add
806 default inline support. Pass INLINE_CFLAGS when compiling.
808 * devices.{h,c} (unimp_device_ioctl): Use STATIC_DEVICES, not
809 INLINE_DEVICES since GCC doesn't like inline functions that
810 accept variable arguments.
811 (stack_ioctl_callback): Make function just static because GCC
812 doesn't like inline functions that accept variable arguments.
814 * devices.h (STATIC_DEVICES): Define as empty if not defined.
816 * inline.c: Correct pathnames of included C files to match current
819 * inline.h (STATIC_DEVICES): If DEVICES_INLINE is defined to be
820 non-zero, define STATIC_DEVICES to be static.
822 * std-config.h (INLINE): If GNU C and optimizing, define this as
824 (DEFAULT_INLINE): If not defined, define as 0.
825 (ENDIAN_INLINE): If not defined, define as DEFAULT_INLINE.
826 ({CORE,VM,CPU,EVENTS,REGISTERS,INTERRUPTS}_INLINE): Ditto.
827 ({SPREG,IDECODE}_INLINE): Ditto.
829 Wed Oct 11 17:13:15 1995 Andrew Cagney <cagney@highland.com.au>
831 * ppc-instructions: Initial cut of floating point suport added.
832 Of note include - use of host IEEE floating point instructions,
833 use of PowerPC manual pseudo code to handle the FPSCR. It is not
834 currently a pretty sight.
836 * memory_map.h, memory_map.c, memory_map_n.h, core.h, core.c:
837 merge into core.h, core.c, core_n.h. The type memory_map replaced
838 with core_map. This removes a level of pointer indirection when
839 translating an address.
841 * memory_map.h, memory_map.c, memory_map_n.h: delete.
843 * Makefile.in et.al (sorry): tweek to use new core, core_map and
846 Wed Oct 11 12:10:26 1995 Andrew Cagney <cagney@highland.com.au>
848 * sim_calls.c, main.c: Add -g (trace_gdb) option, add tracing to
849 most of the other functions in sim_calls.c.
851 * basics.h (CONCAT3), memory_map.c, memory_map_n.h, Makefile.in:
852 Add macros to better cover up `generic' code. Makes it possible
853 to step through the generic code!
855 * vm.c, vm_n.h, Makefile.in: ditto
857 Tue Oct 10 15:42:59 1995 Andrew Cagney <cagney@highland.com.au>
859 * devices.h, devices.c, memory_map.h, memory_map.c: Changed
860 callback interface so that there is a read/write buffer but no
861 read/write_word. VEA default memory read/write handler sometimes
862 couldn't resolve an access and of those some were for a memory
863 fault and some were because gdb was making a bogus request.
865 * devices.h, devices.c, memory_map.h, memory_map.c, vm.h, vm.c:
866 eliminate transfer_mode (raw or cooked) parameter from read/write
869 Fri Oct 6 20:23:56 1995 Andrew Cagney <cagney@highland.com.au>
871 * ppc-instructions (fmul, fmuls): correct instruction format - had
874 Wed Oct 4 17:31:12 1995 Andrew Cagney <cagney@highland.com.au>
876 * psim.c, device_tree.h, device_tree.c, devices.c (printd_*,
877 scand_*): new functions to parse/print fields in device names
878 while hiding any machine dependency.
880 * devices.c, psim.c: Change the stack init code so that it is
881 handled by a device. Arguments passed across using a device ioctl
884 * devices.h, devices.c: device ioctl callback changed to allow a
885 variable number of arguments. This gives greater flexability and
886 greater chance of bugs.
888 Tue Oct 3 22:01:56 1995 Andrew Cagney <cagney@highland.com.au>
890 * main.c (printf_filtered, error): Missing va_end() to close off
891 variable argument use.
893 * Makefile.in (tmp-gencode): comment out hack to get around some
894 versions of make not handling files being created as side-effects.
896 * gen.c (lf_open): Add -n (real_file_name) option. Specifies an
897 alternative file name to use in output files for things like #line
900 Makefile.in (tmp-gencode): Use gen -n so that debug info is
903 * Makefile.in (TARGETLIB): Use this instead of libsim.a in the
906 Sat Oct 7 22:40:59 1995 Michael Meissner <meissner@tiktok.cygnus.com>
908 * sim_calls.c (sim_set_callbacks): Define new function.
910 Fri Oct 6 17:23:10 1995 Michael Meissner <meissner@tiktok.cygnus.com>
912 * psim.c (psim_print_info): Print exit status or signal number.
914 Mon Oct 2 11:46:37 1995 Michael Meissner <meissner@tiktok.cygnus.com>
916 * cpu.c (struct _cpu): Add number_of_insns field to trace how many
917 instructions are executed.
918 (cpu_increment_number_of_insns): New function to increment the
919 number of instructions issued.
920 (cpu_get_number_of_insns): New function to return the number of
922 (cpu_print_info): New function to print cpu related information.
923 At present, print the number of instructions executed.
925 * gen_idecode_c: Emit call to cpu_increment_number_of_insns within
928 * psim.c (psim_print_info): New function to iterate over each of
929 the CPU's calling cpu_print_info.
931 * psim.h,cpu.h: Add new declarations.
933 * sim_calls.c (sim_open): Add argument processing to add the same
934 switches main.c accepts for the standalone processor.
935 (sim_close): Call psim_print_info if -I.
937 * main.c (main): Add comment saying to update sim_calls.c when
938 adding switches. Add -I to call psim_print_info when done.
939 (usage): Update usage message.
941 Sun Oct 1 13:52:59 1995 Michael Meissner <meissner@tiktok.cygnus.com>
943 * main.c (printf_filtered): Correct to match new prototype.
945 Sat Sep 30 20:47:05 1995 Michael Meissner <meissner@tiktok.cygnus.com>
947 * sim_callbacks.h (printf_filtered): Correct prototype.
949 Thu Sep 21 16:26:49 1995 Michael Meissner <meissner@tiktok.cygnus.com>
951 * device_tree.c (OEA_MEMORY_SIZE): Define if not defined to
953 (clayton_memory_size): Define as OEA_MEMORY_SIZE.
955 * std-config.h (WITH_TRACE): Default to 1 now.
957 * psim.c (write_stack_arguments): Don't write any stack arguments
960 * main.c (main): Switch to using getopt. Make -p also set
961 trace_semantics. Make -a turn on all trace flags. Make -C turn
964 * device_tree.c (create_option_device_node): Assume a program is
965 OEA if the start address is < 4096, not just == 0.
967 Wed Sep 20 13:36:06 1995 Ian Lance Taylor <ian@cygnus.com>
969 * Makefile.in (maintainer-clean): New synonym for realclean.
971 Sun Sep 10 10:23:56 1995 Michael Tiemann <tiemann@axon.cygnus.com>
973 * registers.c (register_description): Add gdb synonyms for cr
976 Fri Sep 8 13:16:10 1995 Ian Lance Taylor <ian@cygnus.com>
978 * Makefile.in (install): Don't install in $(tooldir).
980 * configure.in: Call AC_CONFIG_HEADER. Don't try to use
981 bfd/hosts/*.h file or bfd/config/*.mh file. Call AC_PROG_CC and
982 AC_PROG_RANLIB. Substitute in values for CFLAGS, HDEFINES, AR,
983 and CC_FOR_BUILD. Call AC_CHECK_HEADERS for various header files.
984 Touch stamp.h if creating config.h.
985 * configure: Rebuild.
986 * config.in: New file, created by autoheader.
987 * Makefile.in (AR): Define as @AR@.
988 (CC): New variable, defined as @CC@.
989 (CFLAGS): Define as @CFLAGS@.
990 (CC_FOR_BUILD): New variable, defined as @CC_FOR_BUILD@.
991 (RANLIB): Define as @RANLIB@.
992 (HDEFINES, TDEFINES): New variables.
993 (@host_makefile_frag@): Remove.
994 (mostlyclean): Make the same as clean, not distclean.
995 (clean): Remove config.log.
996 (distclean): Remove config.h and stamp-h.
997 (Makefile): Don't depend upon @frags@. Just rebuild Makefile when
998 invoking config.status.
999 (config.h, stamp-h): New targets.
1000 (gen, gen.o): Build with CC_FOR_BUILD, not CC.
1001 (ppc-config.h): Rename from old config.h build.
1002 * (basics.h,gen.c,ppc-endian.c,psim.c): Include ppc-config.h.
1004 Fri Sep 8 09:51:03 1995 Michael Meissner <meissner@tiktok.cygnus.com>
1006 * configure{,.in}: Don't include sysdep.h from bfd, since bfd no
1008 * basics.h (sysdep.h): Don't include it.
1009 * Makefile.in (BASICS_H): Remove sysdep.h.
1011 Wed Sep 6 13:25:42 1995 Andrew Cagney <cagney@highland.com.au>
1013 * core.c (core_add_data): First growth of bss was being put at
1014 wrong address (0) instead of &end.
1016 * core.c (core_add_stack, core_add_data): Was not handling case
1017 where bss/stack is grown across the current end-of-{bss,stack}.
1019 Wed Sep 6 00:46:10 1995 Andrew Cagney <cagney@highland.com.au>
1021 * system.c (system_call): Fix SYS_break - was aligning bss to a
1022 page boundary instead of just an 8 byte one; On first call sbrk(0)
1025 Thu Aug 24 14:48:54 1995 Michael Meissner <meissner@tiktok.cygnus.com>
1027 * Makefile.in (install): Fix install rule.
1029 Tue Aug 22 09:31:18 1995 Michael Meissner <meissner@tiktok.cygnus.com>
1031 * system.c (system_call): Add read support.
1033 * main.c (main): -t sets trace_device_tree. Correct usage message
1036 * device_tree.c (update_memory_node_for_section): Make tracing
1037 output line up. If not code or readonly, assume that the section
1038 is a data section and has read/write permissions. Add readonly
1041 * core.c (create_core_from_addresses): Print end address in traces
1042 and make tracing output line up.
1044 * Makefile.in: Rewrite from Makefile to work with the Cygnus
1045 environment, and support compiling in a different directory than
1046 the sources reside in.
1048 * ppc-endian.h: Rename from endian.h so that it doesn't get
1049 confused with /usr/include/sys/endian.h on Linux. Add Linux
1052 * ppc-endian.c: Rename to be consistant with ppc-endian.h.
1053 Include ppc-endian.h, not endian.h.
1055 * basics.h (sysdep.h): Include sysdep.h that configure makes.
1056 Include ppc-endian.h, not endian.h.
1058 * std-config.h: Rename from ppc-config. Put #ifndefs around most
1059 configuration macros, so they can be overridden via CFLAGS. By
1060 default, turn off tracing.
1062 * configure.in: Clone from other simulator targets.
1063 * configure: Generate via autoconf from configure.in.
1065 Sat Aug 19 09:05:32 1995 Andrew Cagney <cagney@highland.com.au>
1067 * ppc-instructions: fix srawi (was geting XER[CA] real wrong).
1069 * interrupts.c (data_storage_interrupt): allow stack to grow by
1070 upto one MB per increment.
1072 * ppc-instructions: divw was computing rA / rA not rA / rB
1074 * main.c (main): really stupid. Wasn't exiting with correct status
1076 Fri Aug 18 00:38:01 1995 Andrew Cagney <cagney@highland.com.au>
1078 * system.c (system_call): add system calls kill(2) and getpid(2).
1080 * main.c (main): Check/return exit status when simulation
1083 Thu Aug 17 14:29:18 1995 Andrew Cagney <cagney@highland.com.au>
1085 * device_tree.c (create_option_device_node): Alignment rules (at
1086 least for the moment) now are for strict alignment only for LE OEA
1087 mode. (Because of compiler problems).
1089 * system.c (system_call) SYS_exit: Wasn't exiting with correct status.
1091 Thu Aug 17 01:16:38 1995 Andrew Cagney <cagney@highland.com.au>
1093 * vm.c (DEFINE_VM_DATA_MAP_WRITE_N): For miss aligned transfer
1096 * system.c (system_call): didn't page align break argument before
1097 determining increment break increment.
1099 * psim/ppc: Re-arange entire directory structure so that
1100 everything lives in the one directory. While a pain for cleaning,
1101 makes building across multiple architectures much simpler.
1103 * devices.c, device_tree.c: Added code that provides a simple
1104 illustration of how an interrupt control device could be
1107 * devices.c: Added code so that the dumb console device can read
1108 (from stdin) as well as write to stdout.