1 Tue Nov 21 16:31:25 1995 Michael Meissner <meissner@tiktok.cygnus.com>
3 * igen.c (insn_table_load_insns): Add support for model-static for
4 internal functions that should not be inlined.
5 (lf_print_c_semantic): Remove model_cleanup.
6 (gen_model_{c,h}): Ditto.
8 * ppc-instructions: Redo model specific support once again. Add
9 floating point support to the model specific information. Flesh
10 out all of the floating mutiply add/subtract instructions. Add
11 better tracing support to the model specific information.
13 Sun Nov 19 23:00:52 1995 Michael Meissner <meissner@tiktok.cygnus.com>
15 * ppc-instructions (model data, model_busy): Rather than using a
16 bit mask for the busy units, just use a char array. Also, only
17 support 2 function units an insn can use, rather than a loop.
19 Fri Nov 17 14:08:08 1995 Michael Meissner <meissner@tiktok.cygnus.com>
21 * table.c (table_entry_read): Move setting entry->line_nr to after
22 the model specific fields so the line numbers for the annex are
25 * cpu.c (cpu_{create,init,halt}): Check for WITH_MODEL_ISSUE
26 before calling the model functions.
28 * debug.c (trace_descriptor): Add trace_model support.
29 * debug.h (trace_options): Ditto.
31 * igen.c (gen_icache_h): Create type idecode_cache as void if not
33 (gen_model_{c,h}): Drop model_issue support. Add support for
35 (lf_print_my_prefix): Initialize a const itable_index with the
37 (lf_print_c_semantic): Call model_cleanup at the end of the
38 function to check for instructions that aren't supported yet by
41 * mon.h (count_type): New type for counters.
42 * mon.c: Use count_type instead of unsigned.
44 * ppc-instructions: Redo scheduling code once again. Make it all
45 inline friendly. Instead of having general code emitted by igen,
46 go the route of having each semantic routine call the appropriate
49 Thu Nov 16 09:52:26 1995 Michael Meissner <meissner@tiktok.cygnus.com>
51 * table.c (table_entry_read): Allow the annex to have blank lines.
53 * ppc-instructions: Change lines in model stuff that just have a
54 tab to just newline. Add 601 support. Document most instructions
55 in terms of model specific timing information. Drop 'FUNCTION'
56 from PPC_FUNCTION_UNIT_xxx enums. Change PPC_UNIT_UNKNOWN ->
57 PPC_UNIT_BAD. Add TRACE(trace_tbd) for all data cache
58 instruction.s. Signal illegal instruciton if data cache block
59 invalidate is issued from problem state.
61 * igen.c (max_model_fields_len): New static to keep track of the
62 max size for the model specific fields.
63 (model_c_insn): Use max_model_fields_len to size fields.
64 (insn_table_insert_insn): Set max_model_fields_len.
65 (model_table_insert): Ditto.
66 (gen_model_{c,h}): Model_issue is now called with a processor
69 * debug.c (trace_description): Add support for trace_tbd.
71 * mon.c (mon_issue): Pass processor argument to model_issue.
73 * Makefile.in: Delete all function unit support, since the newer
74 table driven model support replaces it.
77 * inline.{c,h}: Ditto.
78 * std-config.h: Ditto.
80 * configure{,.in}: Ditto.
83 * function_unit.{c,h}: Delete these now usused files.
85 * std-config.h (WITH_MODEL_ISSUE): Add new macro on whether to
86 trace instructions in a model specific manor.
87 * options.c (print_options): Print it out.
88 * configure{,.in}: Add --enable-sim-model-issue option.
89 * Makefile.in: Add --enable-sim-model-issue flags.
90 * igen.c (lf_print_c_semantic): Add call to mon_issue here. Check
92 * mon.c (mon_issue): Remove call to mon_issue_here.
94 * ppc-instructions: Move branch tracing to the actual branch
95 instructions, rather than testing it in model_issue. Add code to
96 code successful/unsuccessful branch predictions, and the number of
97 conditional branches that fell through.
99 Wed Nov 15 17:32:13 1995 Michael Meissner <meissner@tiktok.cygnus.com>
101 * cpu.h (cpu_model): Add declaration.
103 * cpu.c (struct _cpu): Add model_ptr to hold model specific
105 (cpu_model): Return the model internal pointer.
106 (cpu_{create,init,halt}): Call the appropriate model function.
108 * inline.c (mon.c): Move include of mon.c after model.c.
110 * mon.c (_cpu_mon): Add fields to count unaligned memory
112 (mon_issue): Call model_issue, not function_unit_issue.
113 (mon_{read,write}): Count # of unaligned memory accesses.
114 (mon_print_info): Switch to calling model_mon_info and
115 model_mon_info_free instead of function_unit version. Print out
116 number of unaligned reads/writes.
118 * {ppc-instructions,igen.c}: More global changes to add model
121 * inline.{c,h}: Provide for inlining options.c.
122 * options.{c,h}: Ditto.
123 * std-config.h: Add OPTIONS_INLINE.
125 Tue Nov 14 04:47:25 1995 Michael Meissner <meissner@tiktok.cygnus.com>
127 * Makefile.in (devices.o, main.o): Update dependency.
129 * igen.c (gen_model_h): Use correct variable in loop.
130 (gen_model_c): Use strcmp, strcasecmp.
131 (gen_model_c): Use EXTERN_MODEL for arrays.
132 (gen_model_h): Use STATIC_MODEL for arrays.
133 (lf_print_c_semantic_function_header): Delete unused function.
135 * main.c (cpu.h): Include cpu.h to get model.h.
137 * inline.h ({EXTERN,STATIC}_MODEL): Define.
139 Mon Nov 13 09:14:13 1995 Michael Meissner <meissner@tiktok.cygnus.com>
141 * igen.c ({insn,model}_table_fields): Spell mnemonic correctly.
142 (gen_itable_h,itable_c_insn): Ditto.
143 (model support): Move model support around, add support for
144 model-data, model-internal. Use annex field for model-macros
147 * configure.in (--enable-sim-inline): If --enable-sim-inline=no,
148 also define INLINE as nothing.
149 * configure: Regenerate.
151 * std-config.h (INLINE): Rather than nuking INLINE, only define it
152 as __inline__ if any of the INLINE flags are non-zero.
154 * options.c (print_options): Print out WITH_XOR_ENDAIN.
156 Mon Nov 13 23:03:45 1995 Andrew Cagney <cagneyhighland.com.au>
158 * ppc-instructions (rfi): Add missing code.
160 * cpu.c (cpu_get_time_base): Fix calculation of current value of
163 * ppc-spr-table (TBL, TBU): Fix TBL/TBU entries - was confusing
164 m[tf]tb with m[tf]spr.
166 * ppc-instructions (mtspr, mfspr): Fix mttbl - wasn't storing
169 Mon Nov 13 21:35:37 1995 Andrew Cagney <cagneyhighland.com.au>
171 * std-config.h (INLINE, STATIC_INLINE): Was being set to static
172 inline.. Only problem being that with ppc-opcode-simple this gave
173 it the chance to inline all the idecode functions with potentially
174 disasterous results on a 16mb PC. For moment hobble INLINE.
176 * configure.in, std-config.h (WITH_SMP): Make that 5 processors by
179 * configure.in: Tweek flags passed to gcc for --with-sim-warnings.
180 Firstly make them errors and secondly remove the options gcc-245
183 Mon Nov 13 17:57:24 1995 Andrew Cagney <cagney@highland.com.au>
185 * misc.c (zalloc), cpu.c (cpu_init), devices
186 (console_io_read_buffer_callback, icu_io_read_buffer_callback,
187 vm_io_read_buffer_callback), main.c (zalloc), mon.c (memset),
188 sim_calls.c (zalloc) : replace bzero() with memset().
190 * emul_netbsd.c (write_direntries), psim.c (psim_read_register,
191 psim_write_register): replace bcopy() with memcpy().
193 Sun Nov 12 20:55:41 1995 Andrew Cagney <cagneyhighland.com.au>
195 * configure.in: for --disable-sim-inline (--enable-sim-inline=no),
196 force DEFAULT_INLINE to 0 rather then trusting the std
199 Sun Nov 12 20:55:41 1995 Andrew Cagney <cagneyhighland.com.au>
201 * igen.c (lf_print_idecode_table, idecode_table_leaf): Fix
202 generation of switch entries in tables - treat the same as
203 cracking/semantic functions.
205 * igen.c (idecode_switch_end, idecode_switch_leaf): Fix generation
206 of a boolean switch statement (field zero or non-zero).
208 * ppc-opcode-test-1, ppc-opcode-test-2: New files. These test the
209 switch/table generation ability of igen.
211 * igen.c (idecode_switch_leaf): Fix code output when a switch
212 statement needs to look up a table.
214 * igen.c (idecode_declare_if_switch): New function called from
215 gen_idecode_c - need to declare any idecode switch functions
216 before they are used in idecode tables.
218 * igen.c (lf_print_c_cracker_function, idecode_crack_leaf,
219 idecode_crack_insn): Add is_inline_function argument to code
220 printing cracker functions which indicates if STATIC_IDECODE or
221 STATIC_INLINE_IDECODE should be used for definition. For
222 idecode_crack_insn (which implies not duplicating/expanding) don't
223 declare function as inline - we assume that the only time this is
224 code is generated is when things are being tested. For
225 idecode_crack_leaf, make static (instead of INLINE) if the
226 instructions parent is a table as function will always be called
229 * igen.c (idecode_expand_if_switch): Declare as STATIC_IDECODE not
230 STATIC_INLINE_IDECODE. Only the outermost idecode switch will be
231 called directly, all others are called via a table.
233 * igen.c (lf_print_semantic_function_header, semantics_h_leaf,
234 semantics_h_insn, semantics_h_function,
235 lf_print_c_semantic_function, semantics_c_function): Add
236 is_inline_function argument to lf_print_semantic_function_header
237 to indicate if an inline or static function declaration/definition
238 should be output. Depending on situtation call accordingly:
239 functions (not instruction semantic routines) are always inline;
240 Semantic routines are made inline when there is no icache (cache
241 will contain the function address) and are duplicating (see above)
242 and the parent of the instruction is a switch statement.
244 * igen.c (opcode_field_new): Delete. Code changed to use ZALLOC
245 and moved to insn_table_find_opcode_field.
247 * table.c (table_open): Fix typo (nr_model_fields vs nr_fields).
249 * igen.c (model_c_insn): Suggestion - document the name of the
250 instruction on each line of the instruction model table.
252 Fri Nov 10 00:44:38 1995 Andrew Cagney <cagneyhighland.com.au>
254 * emul_netbsd.c (do_ioctl): Cleanup compilation.
256 * sim_callbacks.h (__attribute__): Only define if not defined (was
257 already defined on NetBSD host).
259 Wed Nov 8 21:49:52 1995 Andrew Cagney <cagneyhighland.com.au>
261 * std-config.h (WITH_XOR_ENDIAN), configure.in, Makefile.in: New
262 macro, indicates if the PowerPC's horrible XOR endian mode should
263 be suported. Add to configure and make.
265 * vm_n.h (vm_data_map_read_N, vm_data_map_write_N), vm.c
266 (vm_instruction_map_read): If XOR endian, xor the address
267 with a value from an xor table (indexed by size of access).
269 * vm.c (vm_synchronize_context), cpu.c (cpu_synchronize_context):
270 set up xor table to xor if there is a conflict between the
271 CURRENT_TARGET_ENDIAN and the endian indicated in the MSR. Move
272 check of suported change of endian mode from cpu.c to vm.c.
274 * vm.c (vm_data_map_write_buffer, vm_data_map_read_buffer):
275 Hopefully added correct hack to handle XOR endian mode.
277 FIXME: If NONSTRICT alignment and XOR ENDIAN and MSR indicates
278 little endian mode, the model accepts miss aligned transfers.
280 FIXME: Need to create an `init' device that, during
281 initializatioin for XOR mode, it mushes (XOR address) all the dma
282 data before passing it on to the core for storage. Just like the
285 Wed Nov 8 21:49:52 1995 Andrew Cagney <cagneyhighland.com.au>
287 * devices.c (halt_io_write_buffer_callback): Use value written to
288 halt device to determine exit status. Thus allowing
289 success/failure of OEA tests.
291 Wed Nov 8 00:10:38 1995 Andrew Cagney <cagneyhighland.com.au>
293 * ppc-instructions (icbi): If icache present flush it.
295 Tue Nov 7 23:36:31 1995 Andrew Cagney <cagneyhighland.com.au>
297 * devices.c (htab_init_callback): Add code to create htab/pte.
299 * devices.c (dma_file, file_init_callback, htab_init_callback):
300 New function - Dma the named file into memory at the specified
303 * device_tree.h, device_tree.c (scand_*): New functions.
305 Tue Nov 7 23:36:31 1995 Andrew Cagney <cagneyhighland.com.au>
307 * filter_filename.c, Makefile.in: Change so that only dependant on
308 a very limited nr of files. Stops an unnecessary dependency.
310 Tue Nov 7 15:44:33 1995 Andrew Cagney <cagney@highland.com.au>
312 * core.c (core_map_find_mapping): Use cpu_halt rather than error
313 to abort an access to an undefined address.
315 Sun Nov 12 07:58:09 1995 Michael Meissner <meissner@tiktok.cygnus.com>
317 * igen.c (model_table_insert_{macro,function}): New functions.
318 (insn_table_load_insns): Call them.
319 (gen_model_h): Move section emiting model-macros to be first.
320 (model_{c,h}_function): New functions cloned from semantic
321 functions to print out the prototype and function for
323 (gen_model_{c,h}): Print out model-functions.
325 * ppc-instructions (model_{start,halt,print_info}): Add dummy
328 * options.c (print_options): Print out WITH_{,DEFAULT_}MODEL, not
329 WITH_PPC_{,DEFAULT_}_MODEL.
330 (options_ppc): Delete now unused function.
331 (cpu.h): Include cpu.h, not just basics.h.
333 * std-config.h (WITH_{,DEFAULT_}MODEL): Define.
335 * igen.c (model_macros, last_model_macro): New statics to keep
336 track of macros to go in model.h.
337 (insn_table_load_insns): Add model-macros to model_macros linked
339 (model_table_fields): Add field for printable name.
340 (gen_model_h): If there are model macros defined, print them out.
341 Print out DEFAULT_MODEL as the first model if there any models
342 specified, otherwise MODEL_NONE. Print out external decl for
343 current_model. Print out decl for model_set.
344 (gen_model_c): Add function model_set. Switch to use printable
345 name for the model, not the internal identifier used.
347 * psim.c (current_model): New global variable.
349 * ppc-instructions: Add macros for flag defines. Switch first
350 model so 604 is first.
352 * main.c (main): Call model_set, not function_unit_model.
353 * sim_calls.c (sim_open): Ditto.
354 * sim_calls.c, Makefile.in: sim_calls.c now includes cpu.h.
356 Sat Nov 11 07:27:41 1995 Michael Meissner <meissner@tiktok.cygnus.com>
358 * mon.h (mon_events): New enumeration for other events we want to
360 (mon_event): Add declaration for function.
362 * mon.c (mon_event): New function.
363 (mon_print_info): Print icache misses.
365 * psim.c (run_until_stop): Monitor icache misses.
367 * configure.in (--enable-sim-inline): Fix typos in handling comma
368 separated inline options.
369 (--enable-sim-icache): Echo icache size.
370 * configure: Regenerate.
372 * igen.c (semantics_h_print_function): Emit STATIC_SEMANTICS
373 instead of INLINE_SEMANTICS so that the compiler won't keep all of
374 the semantic functions as inline RTL, given that the address of
375 the function is taken which forces outline calls anyway.
376 (lf_print_c_semantic_function_header): Ditto.
377 (gen_semantics_h): Define STATIC_SEMANTICS as nothing if not
379 (lf_print_c_cracker_function): Emit STATIC_IDECODE instead of
380 STATIC_INLINE_IDECODE.
381 (gen_idecode_c): Define STATIC_IDECODE if not defined.
382 (gen_model_h): Use #ifdefs to define types to hold model units,
384 (model_table_insert): Add a sentinel functional unit at the end to
385 simplify loop processing.
386 (model_c_insn): Use <function-unit>_SENTINAL instead of 0 for any
387 instruction not specifing a function unit for the current model.
388 (gen_model_{c,h}): Provide bounds for model_time_mapping.
390 * inline.h (STATIC_SEMANTICS): Define to be static if
391 SEMANTICS_INLINE is defined.
392 (STATIC_IDECODE): Define to be static if IDECODE_INLINE is
395 * options.c (print_options): Fix typo.
397 Fri Nov 10 06:39:46 1995 Michael Meissner <meissner@tiktok.cygnus.com>
399 * configure.in (--enable-sim-{opcode,config}): Use $srcdir when
400 check for the existence of files.
401 * configure: Regenerate.
403 * table.c (table): New field nr_model_fields.
404 (table_open): New parameter nr_model_fields.
405 (table_entry_read): Parse model fields that begin with a '*' after
407 * igen.c, dgen.c: Change callers of table_open.
409 * igen.c: Add support for dumping model specific information in
411 (insn_field_name): Delete unused array.
412 (global variables): Make global variables static, so we can tell
413 when they are no longer used.
414 (cache_semantic_actual): Delete unused variable.
415 (insn_table_load_insns): If the insn is really a machine model,
416 call model_table_insert instead of other processing.
417 (model_table_insert): New function to handle defining the
418 functional units of a particular machine model.
419 (insn_table): Add last_function field so we can add functions at
421 (insn_table_insert_function): Use last_function field when
422 appending new function.
424 * ppc-instructions: Add a few model specific information for 603,
425 603e, and 604 for testing purposes.
427 * table.h (table_model_entry): New linked list to hold model
428 specific information, one per line.
429 (table_entry): Add model_first, model_last fields.
431 * configure.in (--enable-sim-inline): If gcc is found and
432 --enable-sim-inline is not specified, defaine DEFAULT_INLINE to 1,
434 (--enable-sim-reserved-bits): New switch to check whether reserved
435 bits are set in the instruction.
436 (--enable-sim-opcode): Make complex the default.
437 (all switches): Add appropriate checks and error messages.
438 * configure: Regenerate.
440 * Makefile.in (RESERVED_CFLAGS): New variable set by
441 --enable-sim-reserved-bits.
442 (CONFIG_CFLAGS): Include RESERVED_CFLAGS.
443 (BUILT_SRC): igen now generates model.c and model.h.
444 (LIB_OBJ): Include table.o.
445 (tmp-igen): Add -m/-M options to write model.c/model.h.
446 (model.o): New object.
447 (CPU_H): Include model.h.
449 * cpu.h: Include model.h.
451 * std-config.h (WITH_RESERVED_BITS): Define.
452 (MODEL_INLINE): Ditto.
454 * options.c (print_options): Print out WITH_RESERVED_BITS.
456 Thu Nov 9 12:22:15 1995 Michael Meissner <meissner@tiktok.cygnus.com>
458 * configure.in: If --silent, don't output information messages.
459 * configure: Regenerate.
461 * configure.in (--enable-sim-alignment): Fix typo in specifing non
463 (--enable-sim-switch): Make default on.
464 (--enable-sim-duplicate): Make default on.
465 (--enable-sim-smp): Make default 0.
466 (--enable-sim-mon): Don't set sim_float if not set.
467 (--enable-sim-inline): If gcc is found and --enable-sim-inline is
468 not specified, define DEFAULT_INLINE to be 2.
469 (all --enable-sim-* rules): Echo rules set to non empty to file
471 * configure: Regenerate.
473 * options.c (options_env): Fix typo if WITH_ENV is 0.
474 (print_options): Print GCC compiler version if available and
475 date/time options was compiled. If OPCODE_RULES, IGEN_FLAGS,
476 and/or DGEN_FLAGS are defined, print them.
478 * Makefile.in (all link actions): Pass SIM_CFLAGS as well as
480 (options.o): Compile options.o with OPCODE_RULES, IGEN_FLAGS, and
481 DGEN_FLAGS defined, so they can be printed out.
483 * igen.c (lf_print_c_validate): Check for WITH_ASSERT, so that
484 this test can be compiled away if the user really wants a fast
485 simulator by not doing assertion failures.
487 Wed Nov 8 13:19:47 1995 Michael Meissner <meissner@tiktok.cygnus.com>
489 * options.c: New file to print out all of the WITH_ options.
490 * options.h: New include file to declare print_options.
491 * debug.h (trace_options): Add trace_opts to call print_options.
492 * debug.c (trace_description): Add trace_opts support.
493 * main.c (main): If user requested options, print them.
494 * sim_calls.c (sim_open): Ditto.
496 * igen.c (opcode_field_new): Add void to make it a proper prototype.
498 * emul_generic.c (emul_enter_call): Make printf_filtered arguments
500 * emul_netbsd.c (do_kill): Ditto.
501 * registers.c (registers_dump): Ditto.
502 * vm.c (om_translate_effective_to_real): Ditto.
503 * vm_n.h (vm_data_map_read_N): Ditto.
504 (vm_data_map_write_N): Ditto.
505 * devices.h (DTRACE_INIT): Ditto.
506 (DTRACE_{ATTACH,DETACH}_ADDRESS): Ditto.
507 (DTRACE_IO_{READ,WRITE}_BUFFER): Ditto.
508 (DTRACE_DMA_{READ,WRITE}_BUFFER): Ditto.
509 * devices.c (update_for_binary_section): Ditto.
510 (write_stack_arguments): Ditto.
511 (stack_ioctl_callback): Ditto.
512 * device_tree.c (device_tree_add_passthrough): Ditto.
513 (device_tree_{add,find}_device): Ditto.
514 (device_tree_{add,find}_integer): Ditto.
515 (device_tree_find_{string,boolean}): Ditto.
516 (device_tree_init{,_device}): Ditto.
517 (device_tree_dump): Ditto.
518 * sim_calls.c (sim_{read,write}): Ditto.
519 (sim_{fetch,store}_register): Ditto.
520 (sim_stop_reason): Ditto.
522 * sim_callbacks.h (printf_filtered): Declare with attribute
523 printf, so we can enable format checks.
525 * devices.c (console_io_{read,write}_buffer_callback): Cast swtich
526 argument to int, since ANSI doesn't allow long switch values.
527 * emul_netbsd.c (do___sysctl): Ditto.
529 * emul_netbsd.c (do___sysctl): Fix up printf call.
531 * corefile.c (core_translate): Don't do arithmetic with void *
532 pointers. Cast to char * first.
534 * function_unit.c (FUNC_{LOAD,STORE}): Rename from {LOAD,STORE}
537 * Makefile.in ({FUNC,MODEL,WARNING}_CFLAGS): New flags set by
538 configure --enable switches.
539 (CONFIG_CFLAGS): Include FUNC_CFLAGS and MODE_CFLAGS.
540 (.c.o): Include WARNING_CFLAGS.
541 (CPU_H): Include function_unit.h.
542 (LIB_OBJ): Include function_unit.o.
543 (BUILT_SRC_WO_CONFIG): Split from BUILT_SRC and do not include
544 config.h or ppc-config.h.
545 (BUILT_SRC): Include BUILT_SRC_WO_CONFIG, config.h and
547 (filter_filename.o): Include config.h/ppc-config.h dependencies.
548 (idecode.o, semantics.o, psim.o): Specify CC line without
549 WARNING_CFLAGS so that we don't get all of the unused variable
550 warnings that are generated.
551 (function_unit.o): Add rule to build.
552 (main.o, sim_calls.o): Add function_unit.h, itable.h dependencies.
553 (mon.o): Include mon.c dependency.
554 (TAGS): Depend on BUILT_SRC.
555 (clean): Don't delete config.h or ppc-config.h
557 * basics.h (sim_callbacks.h): Move include after the include of
558 config.h and ppc-config.h.
560 * bits.{h,c} (ROTL32,ROTL64): Move these functions to bits.c. Add
561 support for BITS_INLINE to inline these. Add declarations to
564 * configure.in (--enable-sim-warnings): Add new option to specify
565 compiler warnings for all modules except idecode.o and semantics.o
566 which have lots of unused variables because they are machine
568 (--enable-sim-function-unit): New switch to configure whether
569 function unit support is compiled in or not.
570 (--enable-sim-{,default-}mode): New switches to control which cpu
572 * configure: Regenerate.
574 * corefile.c (core_attach_address_callback): Delete unused
575 variable device_address.
577 * cpu.c (struct _cpu): Add function unit pointer field func_unit.
578 (cpu_create): If WITH_FUNCTION_UNIT, call function_unit_create.
579 (cpu_init): If WITH_FUNCTION_UNIT, call function_unit_init.
580 (cpu_halt): If WITH_FUNCTION_UNIT, call function_unit_halt.
581 (cpu_function_unit): New function to return func_unit field.
583 * cpu.h (function_unit.h): Include new include file.
584 (cpu_function_unit): Declare.
586 * debug.c (stdlib.h): Test HAVE_STDLIB_H, not HAVE_STDLIB.
587 (config.h): Include config.h.
589 * devices.c (icu_io_write_buffer_callback): Delete unused variable
592 * emul_generic.c (emul_exit_call): Print out status value.
594 * emul_netbsd.c (do_read): Delete unused variable nr_moved.
596 * filter_filename.h (includes): Include config.h, ppc-config.h,
599 * inline.c: Include bits.c if BITS_INLINE. Include
600 function_unit.c if FUNCTION_UNIT_INLINE.
602 * inline.h (INLINE_BITS): Define if BITS_INLINE.
603 (INLINE_FUNCTION_UNIT): Define if FUNCTION_UNIT_INLINE.
605 * interrupts.c (instruction_storage_interrupt): Delete unused
608 * lf.h (config.h): Include config.h.
610 * main.c (includes): Include function_unit.c. If HAVE_UNISTD_H,
612 (usage): Update for -m model, -i, and -I options.
613 (main): Delete unused variables stack_pointer and i. Add support
614 for -i, -m model arguments. Call psim_print_info with verbose ==
615 1 if -i, and verbose == 2 if -I.
617 * mon.c (stdio.h): Include stdio.h to pick up sprintf prototype.
618 (mon_issue): Call function_unit_issue if function units are
620 (mon_print_info): Take psim * argument. Print out information
621 from function_unit if available. Move read/write stats to always
622 print, instead of printing if verbose > 1. Fix up plural
625 * mon.h (mon_print_info): Update prototype.
627 * psim.c (current_ppc_model): Add global variable.
628 (psim_print_info): Pass system argument to mon_print_info.
630 * sim_calls.c (function_unit.h): Include.
631 (sim_open): Add support for -i and -m model options. If -i call
632 psim_print_info with verbose == 1, if -I, with verbose == 2.
633 (sim_resume): Delete unused variable program_counter.
635 * std-config.h (WITH_FUNCTION_UNIT): Define.
636 (ppc_model): Add enumeration giving all PowerPC models currently
638 ({WITH,CURRENT}_PPC_MODEL): Define.
639 (FUNCTION_UNIT_INLINE): Define.
641 * table.c (config.h): Include config.h.
643 * vm.c (om_virtual_to_real): Print pte_word_{0,1} so the compiler
644 doesn't complain that they're unused.
646 * vm_n.h (vm_data_map_read_N): Delete unused variable rval.
648 Mon Nov 6 23:15:54 1995 Andrew Cagney <cagney@highland.com.au>
650 * sim-endian.c (ppc-endian.c), sim-endian.h (ppc-endian.h):
651 renameed. These files are target independant.
652 * Makefile.in, basics.h: update for new name.
654 * sim-endian.h (SWAP_N), sim-endian.c (_SWAP_1): Rename existing
655 SWAP_<N> to _SWAP_<N> so that sim-endian.h can contain SWAP_N
658 * sim-endian.c, sim-endian-n.h (new file): Move endian code into a
659 debugable header file.
661 * ppc-instructions (Byte-Reverse): Enable byte reverse
662 instructions using SWAP_N macros.
664 Mon Nov 6 10:39:28 1995 Michael Meissner <meissner@tiktok.cygnus.com>
666 * Makefile.in (config.status): Remove references to config.make
669 * config.{make,hdr}: Delete, no longer used.
672 Mon Nov 6 20:49:56 1995 Andrew Cagney <cagney@highland.com.au>
674 * sim_calls.c (sim_open): Fix parsing of `target sim' options.
676 * device_tree.c (device_tree_add_string): Wasn't saving the value
677 of the string being entered into the tree.
679 * psim.c (create_filed_device_tree): Not terminating string device
682 * psim.c (psim_create): Use `env' instead of
683 `environment-architecture' to be consistent with configure.
684 Reconize user/uea, virtual/vea and operating/oea.
686 Sat Nov 4 12:29:45 1995 Fred Fish <fnf@cygnus.com>
688 * core.c: Rename to corefile.c
689 * core.h: Rename to corefile.h
690 * inline.c: Include corefile.h, renamed from core.h.
691 * cpu.h: Include corefile.h, renamed from core.h
692 * vm.c: Include corefile.h, renamed from core.h
693 * corefile.c: Include corefile.h rather than core.h
694 * README.psim (KNOWN PROBLEMS): Change core.* references to corefile.*
696 * Makefile.in (CPU_H): Change core.h to corefile.h
697 (vm.o): Change dependency to corefile.h
698 (LIB_SRC): Change core.c to corefile.c.
699 (LIB_OBJ): Change core.o to corefile.o.
700 (corefile.o): Change dependencies to corefile.c, corefile.h.
702 Fri Nov 3 11:37:24 1995 Michael Meissner <meissner@tiktok.cygnus.com>
704 * ppc-instructions (data cache instructions): Make all data cache
705 instructions nops instead of invalid instructions.
707 * Makefile.in (CONFIG_CFLAGS): Add ALIGNMENT_CFLAGS and
708 TIMEBASE_CFLAGS which weren't included.
710 Thu Nov 2 08:54:04 1995 Michael Meissner <meissner@tiktok.cygnus.com>
712 * Makefile.in: Uncomment built file dependencies.
714 * configure.in: Rewrite --enable-sim switch handling to use the
715 autoconf builtins so it works correctly if the configure or
716 Makefile.in files are modified and make decides to rebuild
717 Makefile. Also document all of the --enable-sim switches
718 supported. Check whether getrusage and sys/resource.h are
720 * config.in: Regenerate.
721 * configure: Regenerate.
722 * Makefile.in: Add support for all of the variables set with
723 --enable-sim switches.
725 * Makefile.in (clean): make clean now removes all built sources as
728 * cpu.c: Use HAVE_STRING_H, HAVE_STRINGS_H, HAVE_UNISTD_H,
729 HAVE_TIME_H, HAVE_SYS_TIMES_H, HAVE_SYS_RESOURCE_H defined in
730 the generated config.h.
732 * device_tree.c: Ditto.
735 * emul_netbsd.c: Ditto.
740 * registers.c: Ditto.
745 * main.c (main): Call psim_print_info with verbose == 2.
747 * mon.c (mon_print_info): Align the cpu number and number of
748 instructions fields. Do not print an instruction category if the
749 CPU did not execute any of those instructions. Print out number
750 of reads and writes. If getrusage is supported, print out number
751 of simulated instructins per second.
753 * configure.in: Add support for --enable-sim-opcode=stupid.
754 * configure: Regenerate.
756 Wed Nov 1 23:46:59 1995 Andrew Cagney <cagney@highland.com.au>
758 * std-config (INLINE_DEVICE_TREE): Don't inline either of
759 device_tree.c or devices.c. There is no significant gain.
761 * configure.in, Makefile.in: add --enable-sim-icache=[0-9]* and
764 Wed Nov 1 23:46:59 1995 Andrew Cagney <cagney@highland.com.au>
766 * igen.c (main), misc.h (target_a2i, i2target), misc.c: Add
767 functions to convert between target and igen internal bit numbers.
768 Make IO go through these functions. Add -b (bit size) and -h (high
769 bit nr) options to igen. Typical usage would be: ./igen -b 16 -h
770 15 for a 16 bit instruction format with the msb given a number 15.
772 Wed Nov 1 22:17:32 1995 Andrew Cagney <cagney@highland.com.au>
774 * dgen.c (main): Was outputting optarg even when it was NULL.
776 Tue Oct 31 23:48:33 1995 Andrew Cagney <cagney@highland.com.au>
778 * vm_n.h (vm_data_map_load_N, vm_data_map_store_n), debug.h,
779 debug.c: Add tracing of load/store unit (virtual) with -t
782 Tue Oct 31 21:44:01 1995 Andrew Cagney <cagney@highland.com.au>
784 * std-config.h (WITH_ENVIRONMENT): Add USER_ENVIRONMENT which does
785 not include things such as the time base and events.
787 * interrupt.c, sim_calls.c, cpu.h, vm.c, configure.in: Add UEA to
788 all environment switches for above.
790 * psim.c (psim_create): ditto - new device tree node name is
791 /options/environment-architecture with values user, virtual and
794 Tue Oct 31 21:31:32 1995 Andrew Cagney <cagney@highland.com.au>
796 * ppc-opcode-stupid: Third example of use of opcode table - this
797 one expands all mtspr/mfspr and branch instructions. Appears to
798 give about a 10% gain in performance if everything enabled. Also
799 takes about 150mb of swap to build.
801 Wed Nov 1 10:49:48 1995 Michael Meissner <meissner@tiktok.cygnus.com>
803 * emul_netbsd.c (do_exit): Print arguments and close parenthesis
804 if tracing, since exit doesn't go through emul_exit_call.
805 (do_read): Print arguments if tracing.
811 (do_sigprocmask): Replace trace with printing arguments if
813 (do_ioctl): Print arguments if tracing.
817 (do_gettimeofday): Ditto.
818 (do_getrusage): Ditto.
821 * filter_filename.c: New file to provide filter_filename to strip
822 the directory prefix from a file.
823 * filter_filename.h: New include file to declare filter_filename.
825 * debug.h: Include filter_filename.h.
826 (TRACE,DTRACE,ERROR): Use filter_filename on __FILE__.
828 * misc.h: Include filter_filename.h.
829 (ASSERT): Use filter_filename on __FILE__.
831 * igen.c (lf_print_my_prefix): Use filter_filename on the filename
834 * Makefile.in: Add filter_filename support.
836 * ppc-instructions (dcbi, icbi): Make these NOPs rather than
837 invalid instructions.
839 * configure.in: Add support for more --enable-sim-* switches.
840 Use config.make and config.hdr to write to Makefile and config.h
841 respectively. Don't rewrite Makefile, just append to it.
842 * configure: Regenerate.
843 * config.{make,hdr}: New shell scripts.
845 * Makefile.in: Remove all variables set by configure.in.
846 (psim.o): Depend on $(BUILT_SRC) also.
848 * emul_netbsd.c (do_gettimeofday,do_getrusage): When comparing an
849 integer, use 0, not NULL.
851 Tue Oct 31 15:20:04 1995 Michael Meissner <meissner@tiktok.cygnus.com>
853 * configure.in: Add support for --enable-sim-inline,
854 --enable-sim-bswap, --enable-sim-cflags, --enable-sim-complex,
855 --enable-sim-switch, --enable-sim-duplicate, --enable-sim-filter,
856 and --enable-sim-endian switch to control various Makefile
858 * configure: Regenerate from configure.in.
859 * Makefile.in: Add various Make variables that the various
862 * std-config.h (DEFAULT_INLINE): Don't set this to 2 if using GCC
863 and optimizing by default.
865 Fri Oct 27 19:26:27 1995 Andrew Cagney <cagney@highland.com.au>
867 * bits.h (ROTL32, ROTL64): Were functions, made them macros, now
868 make them functions again. Appears 2.6.3 is confused by just a
871 Thu Oct 26 18:31:58 1995 Andrew Cagney <cagney@highland.com.au>
873 * ppc-endian.c (SWAP_8): Fix 8 byte swap!
875 * psim.c (psim_create): Not correctly checking that runtime
876 configuration of things like ENDIAN, ENVIRONMENT and ALIGNMENT
877 matched the compiled in ones.
879 * debug.h (ITRACE), igen.c: Tidy up more tracing flags -
880 trace_semantics is now different to trace_idecode, the former
883 Tue Oct 24 21:54:13 1995 Andrew Cagney <cagney@highland.com.au>
885 * ppc-instructions (mtsrin): Missing instruction
886 * ppc-instructions (mfsrin): Missing instruction
887 * ppc-instructions (eieio): Missing instruction
889 Tue Oct 24 20:55:29 1995 Andrew Cagney <cagney@highland.com.au>
891 * build-psim: New shell script - see internals for usage,
892 simplifies the process of building custom simulators.
894 Mon Oct 23 23:48:59 1995 Andrew Cagney <cagney@highland.com.au>
896 * std-config.h (SEMANTICS_INLINE): Tidy up notes on each of the
897 INLINE macros. Make SEMANTICS_INLINE == 1 if DEFAULT_INLINE == 2.
898 Don't use DEFAULT_INLINE to define REGISTERS_INLINE DEVICES_INLINE
899 DEVICE_TREE_INLINE or INTERRUPTS_INLINE as none of these are on
900 the instruction or data critical paths.
902 * FIXME: need to set up OS_EMUL_INLINE/EMUL_GENERIC_INLINE but
903 not on critical path.
905 * FIXME: devices.c/emul_netbsd.c would benefit (slightly) from
906 the inclusion of device_tree.c/emul_generic.c.
908 Mon Oct 23 00:31:50 1995 Andrew Cagney <cagney@highland.com.au>
910 * os_emul.[hc], emul_generic.[hc], emul_netbsd.[hc]: replace
911 system.[hc]. Start of suport for multiple emulations and
912 emulation state (os_emul object).
914 * emul_generic.[hc]: Start of code to implement proper system call
917 Sun Oct 22 21:33:51 1995 Andrew Cagney <cagney@highland.com.au>
919 * cpu.h, cpu.c (cpu_init): New function, zero the registers before
920 the processor is started. Fixes problem of registers being
921 undefined when restarting from within gdb.
923 * cpu.h, cpu.c (cpu_flush_icache): New function, flushes the
924 instruction cache (if present). Fixes problem of cpu caching gdb
925 breakpoint instructions.
927 FIXME: PSIM sometimes aborts calling error(), it should instead
928 call sim_error() say which takes care of housekeeping such as
929 saving the CIA before calling error.
931 * NOTE: cpu_flush_cache() instead of cpu_synchronize_context() is
932 used when restarting a simulation because the latter has the
933 unwanted side effect (well I as a kernel hacker think it is) of
934 performing an isync when the instruction stream doesn't contain
937 Sun Oct 22 19:27:48 1995 Andrew Cagney <cagney@highland.com.au>
939 * mon.h (new), mon.c (new), std-config.h (WITH_MON): Performance
940 monitoring module. Counts both instructions issued and
943 * NOTE: mon does not contain to count instruction loads as this
944 information is already available from the mon_issue() hook.
946 * FIXME: mon doesn't have access to register usage information.
947 This is needed if the user wants to monitor things like register
950 * igen.c (lf_print_c_semantic), vm_n.h: Add counting code.
952 * psim.h, psim.c (psim_create), cpu.h, cpu.c (cpu_create): Attach
953 a common monitor to each of the cpus. Delete
954 cpu_increment_number_of_insns() and cpu_get_number_of_insns()
955 replaced by copied code in mon.[hc].
957 Sun Oct 22 18:42:45 1995 Andrew Cagney <cagney@highland.com.au>
959 * sim_calls.c, main.c, psim.c (psim_create): always create
960 `WITH_SMP' cpus. The actual number of CPU's active in a
961 simulation run is taken from the device node: /init/smp (an
962 integer). WITH_SMP changed to 2 (remember to put it back to 0).
964 Fri Oct 20 17:26:54 1995 Andrew Cagney <cagney@highland.com.au>
966 * system.c: More system call emulation. If code appears NetBSD
967 specific, make conditional to being compiled on a NetBSD system
970 Wed Oct 18 23:02:20 1995 Andrew Cagney <cagney@highland.com.au>
972 * Makefile.in, gen.c(delete), igen.c(new), dgen.c(new),
973 lf.[ch](new), table.[ch](new): Split into two generators - igen
974 that outputs the instruction tables and dgen that outputs the spr
975 tables. Add -f (filter out) flag to igen to filter out certain
976 instructions (ex 64 bit ones) from the created tables. Include
977 $(LIBIBERTY_LIB) in link options in case host lacks some libc
980 * NOTE: igen, since it was originally written for the
981 PowerPC/RS6000, things the MSB is 0 and the LSB is 63{31}.
983 * Makefile.in, std-config.h, ppc-cache-rules(new),
984 ppc-opcode-complex(new), ppc-opcode-simple(new): (for igen) Create
985 cache-rule and opcode-rule tables from macros found std-config.h.
986 Delete corresponding macro's from std-config.h.
988 * FIXME: under this new igen scheme, when playing around with igen
989 options, you'll find that depenencies don't work very well.
991 * igen.c (gen_itable_c, gen_itable_h), Makefile.in: code to output
992 an table of all the instructions. Code to output a type
993 enumerating all the instructin names.
995 * igen.c(lf_print_c_semantic): Move call to increment instruction
996 counter so that it occures _after_ the instruction has been fully
997 validated, was double counting illegal/invalid instructions. Add
998 conditional so only compiled in when WITH_PROFILE enabled (enabled
1001 * igen.c, cpu.h, cpu.c(cpu_increment_number_of_insns): Include
1002 itable.h, count individual instruction types not just total,
1003 adjust reporting functions to output this.
1005 * ppc-instructions (64 bit Load Doubleword with Update Indexed):
1006 Had 32./ instead of 31./
1008 * ppc-instructions (64 bit Store Double Word Conditional Indexed):
1009 bitrot - updated to use newer CR register operators.
1011 * ppc-instructions (64bit Floating Convert from Integer
1012 Doubleword): Correct call to Round_Float().
1014 Mon Oct 16 00:31:20 1995 Andrew Cagney <cagney@highland.com.au>
1016 * basics.h: #include "sim_callbacks.h" earlier so that its
1017 prototypes are declared in all other header files.
1019 * bits.h, bits.c, idecode_expression.h (ROTL32, ROTL64): Update
1020 doc in bits.h, remove dead code in bits.c, move ROTL32/ROTL64 into
1023 * FIXME: the bits.h/bits.c macro's should be replaced with
1024 (inline) c functions.
1026 * cpu.c(cpu_add_commas), device_tree.h, device_tree.c(scand_*):
1027 Add size of buffer argument to functions writing a string into a
1028 buffer. Check for buffer overflow.
1030 Sun Oct 15 22:16:11 1995 Andrew Cagney <cagney@highland.com.au>
1032 * devices.h, devices.c, debug.h, debug.c: add macro's for tracing
1033 of each device. Make parameter names consistent so macros work.
1034 Use macro's in device functions.
1036 * device_tree.c, devices.h, devices.c: include path to device in a
1037 devices node when creating it.
1039 * device_tree.c, debug.h, debug.c: Add tracing of `device-tree'.
1041 * core.c: add tracing of core-device, adjust parameter names in
1042 core functions to be consistent with those in devices*.
1044 Sun Oct 15 20:33:20 1995 Andrew Cagney <cagney@highland.com.au>
1046 * debug.h, debug.c (trace_option): New function. Parses the trace
1047 option, updating the trace array.
1049 * debug.h, debug.c (trace_usage): New function. Outputs the list
1050 of all possible trace options.
1052 * sim_calls.c (sim_open), main.c (main): Use new trace_option() to
1053 parse trace options specified with the simpler -t flag. Adjust
1056 * FIXME: basic parsing of command line options is still duplicated
1057 by main.c and sim_calls.c
1059 Thu Oct 26 10:42:28 1995 Michael Meissner <meissner@tiktok.cygnus.com>
1061 * Makefile.in (clean): Delete *.i and *.out files.
1063 * ppc-endian.c (SWAP_n): Add SET argument to allow use of SWAP
1064 macros for either assignment or return. Fix SWAP_8 to use a
1065 union, and two SWAP_4's. Delete SWAP_N, since nobody uses it now.
1066 (ENDIAN_N): Add SET argument to SWAP_n calls. Delete macro defs
1067 that hardwired swapping on/off, let optimizer delete dead code.
1069 * main.c (main): Add printf that we caught a signal and print out
1070 the failing address.
1072 Thu Oct 19 21:43:39 1995 Fred Fish <fnf@fishfood.amigalib.com>
1074 * Makefile.in: Remove tabs from otherwise empty line.
1075 Confuses many non-GNU versions of "make".
1077 Wed Oct 18 08:51:25 1995 Michael Meissner <meissner@tiktok.cygnus.com>
1079 * Makefile.in (clean): Delete files produced by gen.
1081 Mon Oct 16 17:34:24 1995 Michael Meissner <meissner@tiktok.cygnus.com>
1083 * gen.c (lf_print_c_semantic_function): Move counting # of
1084 instructions here so it works with caching.
1085 (gen_idecode_c): Move from here.
1087 Wed Oct 11 17:13:15 1995 Andrew Cagney <cagney@highland.com.au>
1089 * gen.c, ppc-instructions, psim.c: Fix code for generating
1090 cracking instruction cache. Delete the code that cached just the
1091 result from doing an instruction lookup - this ran slower than no
1094 Fri Oct 13 09:58:43 1995 Michael Meissner <meissner@tiktok.cygnus.com>
1096 * Makefile.in (gen.o): Include $(INLINE_CFLAGS).
1098 * debug.h (ppc_trace): Rename from trace, to avoid a conflict with
1099 TCL when gdb is linked with the simulator.
1100 * debug.c (ppc_trace): Ditto.
1101 * sim_calls.c (sim_open): Change trace -> ppc_trace.
1102 * main.c (main): Ditto.
1104 * cpu.c (cpu_add_commas): Remove extra static.
1106 Thu Oct 12 11:35:53 1995 Michael Meissner <meissner@tiktok.cygnus.com>
1108 * Makefile.in (psim.o): Now that inlines are turned on, make
1109 psim.o depend on all sources.
1111 * cpu.c (cpu_add_commas): New function to format a long with
1113 (cpu_print_info): Use it to print number_of_insns.
1115 * ppc-endian.c (SWAP_n): New macros to speed up byte swapping for
1117 (ENDIAN_N): If both target and host byte orders are known, don't
1118 bother testing CURRENT_{TARGET,HOST}_BYTE_ORDER.
1120 * ppc-endian.h (target specific H2T_n/T2H_n macros): Remove #if 0
1121 to allow target specific H2T_n/T2H_n macros to be used.
1122 (htonl, ntohl): If compiled on a 486 by GCC and WITH_BSWAP is
1123 non-zero, redefine the htonl/ntohl macros to use the BSWAP instead
1124 of the 3 instruction sequence that runs on 386s.
1126 * std-config.h (WITH_{HOST,TARGET}_BYTE_ORDER): Don't override if
1127 specified on the compile line.
1128 (WITH_BSWAP): If not defined, define as 0.
1130 * Makefile.in (INLINE_CFLAGS): Add -DDEFAULT_INLINE=2 to add
1131 default inline support. Pass INLINE_CFLAGS when compiling.
1133 * devices.{h,c} (unimp_device_ioctl): Use STATIC_DEVICES, not
1134 INLINE_DEVICES since GCC doesn't like inline functions that
1135 accept variable arguments.
1136 (stack_ioctl_callback): Make function just static because GCC
1137 doesn't like inline functions that accept variable arguments.
1139 * devices.h (STATIC_DEVICES): Define as empty if not defined.
1141 * inline.c: Correct pathnames of included C files to match current
1144 * inline.h (STATIC_DEVICES): If DEVICES_INLINE is defined to be
1145 non-zero, define STATIC_DEVICES to be static.
1147 * std-config.h (INLINE): If GNU C and optimizing, define this as
1149 (DEFAULT_INLINE): If not defined, define as 0.
1150 (ENDIAN_INLINE): If not defined, define as DEFAULT_INLINE.
1151 ({CORE,VM,CPU,EVENTS,REGISTERS,INTERRUPTS}_INLINE): Ditto.
1152 ({SPREG,IDECODE}_INLINE): Ditto.
1154 Wed Oct 11 17:13:15 1995 Andrew Cagney <cagney@highland.com.au>
1156 * ppc-instructions: Initial cut of floating point suport added.
1157 Of note include - use of host IEEE floating point instructions,
1158 use of PowerPC manual pseudo code to handle the FPSCR. It is not
1159 currently a pretty sight.
1161 * memory_map.h, memory_map.c, memory_map_n.h, core.h, core.c:
1162 merge into core.h, core.c, core_n.h. The type memory_map replaced
1163 with core_map. This removes a level of pointer indirection when
1164 translating an address.
1166 * memory_map.h, memory_map.c, memory_map_n.h: delete.
1168 * Makefile.in et.al (sorry): tweek to use new core, core_map and
1171 Wed Oct 11 12:10:26 1995 Andrew Cagney <cagney@highland.com.au>
1173 * sim_calls.c, main.c: Add -g (trace_gdb) option, add tracing to
1174 most of the other functions in sim_calls.c.
1176 * basics.h (CONCAT3), memory_map.c, memory_map_n.h, Makefile.in:
1177 Add macros to better cover up `generic' code. Makes it possible
1178 to step through the generic code!
1180 * vm.c, vm_n.h, Makefile.in: ditto
1182 Tue Oct 10 15:42:59 1995 Andrew Cagney <cagney@highland.com.au>
1184 * devices.h, devices.c, memory_map.h, memory_map.c: Changed
1185 callback interface so that there is a read/write buffer but no
1186 read/write_word. VEA default memory read/write handler sometimes
1187 couldn't resolve an access and of those some were for a memory
1188 fault and some were because gdb was making a bogus request.
1190 * devices.h, devices.c, memory_map.h, memory_map.c, vm.h, vm.c:
1191 eliminate transfer_mode (raw or cooked) parameter from read/write
1194 Fri Oct 6 20:23:56 1995 Andrew Cagney <cagney@highland.com.au>
1196 * ppc-instructions (fmul, fmuls): correct instruction format - had
1199 Wed Oct 4 17:31:12 1995 Andrew Cagney <cagney@highland.com.au>
1201 * psim.c, device_tree.h, device_tree.c, devices.c (printd_*,
1202 scand_*): new functions to parse/print fields in device names
1203 while hiding any machine dependency.
1205 * devices.c, psim.c: Change the stack init code so that it is
1206 handled by a device. Arguments passed across using a device ioctl
1209 * devices.h, devices.c: device ioctl callback changed to allow a
1210 variable number of arguments. This gives greater flexability and
1211 greater chance of bugs.
1213 Tue Oct 3 22:01:56 1995 Andrew Cagney <cagney@highland.com.au>
1215 * main.c (printf_filtered, error): Missing va_end() to close off
1216 variable argument use.
1218 * Makefile.in (tmp-gencode): comment out hack to get around some
1219 versions of make not handling files being created as side-effects.
1221 * gen.c (lf_open): Add -n (real_file_name) option. Specifies an
1222 alternative file name to use in output files for things like #line
1225 Makefile.in (tmp-gencode): Use gen -n so that debug info is
1228 * Makefile.in (TARGETLIB): Use this instead of libsim.a in the
1231 Sat Oct 7 22:40:59 1995 Michael Meissner <meissner@tiktok.cygnus.com>
1233 * sim_calls.c (sim_set_callbacks): Define new function.
1235 Fri Oct 6 17:23:10 1995 Michael Meissner <meissner@tiktok.cygnus.com>
1237 * psim.c (psim_print_info): Print exit status or signal number.
1239 Mon Oct 2 11:46:37 1995 Michael Meissner <meissner@tiktok.cygnus.com>
1241 * cpu.c (struct _cpu): Add number_of_insns field to trace how many
1242 instructions are executed.
1243 (cpu_increment_number_of_insns): New function to increment the
1244 number of instructions issued.
1245 (cpu_get_number_of_insns): New function to return the number of
1246 instructions issued.
1247 (cpu_print_info): New function to print cpu related information.
1248 At present, print the number of instructions executed.
1250 * gen_idecode_c: Emit call to cpu_increment_number_of_insns within
1253 * psim.c (psim_print_info): New function to iterate over each of
1254 the CPU's calling cpu_print_info.
1256 * psim.h,cpu.h: Add new declarations.
1258 * sim_calls.c (sim_open): Add argument processing to add the same
1259 switches main.c accepts for the standalone processor.
1260 (sim_close): Call psim_print_info if -I.
1262 * main.c (main): Add comment saying to update sim_calls.c when
1263 adding switches. Add -I to call psim_print_info when done.
1264 (usage): Update usage message.
1266 Sun Oct 1 13:52:59 1995 Michael Meissner <meissner@tiktok.cygnus.com>
1268 * main.c (printf_filtered): Correct to match new prototype.
1270 Sat Sep 30 20:47:05 1995 Michael Meissner <meissner@tiktok.cygnus.com>
1272 * sim_callbacks.h (printf_filtered): Correct prototype.
1274 Thu Sep 21 16:26:49 1995 Michael Meissner <meissner@tiktok.cygnus.com>
1276 * device_tree.c (OEA_MEMORY_SIZE): Define if not defined to
1278 (clayton_memory_size): Define as OEA_MEMORY_SIZE.
1280 * std-config.h (WITH_TRACE): Default to 1 now.
1282 * psim.c (write_stack_arguments): Don't write any stack arguments
1285 * main.c (main): Switch to using getopt. Make -p also set
1286 trace_semantics. Make -a turn on all trace flags. Make -C turn
1289 * device_tree.c (create_option_device_node): Assume a program is
1290 OEA if the start address is < 4096, not just == 0.
1292 Wed Sep 20 13:36:06 1995 Ian Lance Taylor <ian@cygnus.com>
1294 * Makefile.in (maintainer-clean): New synonym for realclean.
1296 Sun Sep 10 10:23:56 1995 Michael Tiemann <tiemann@axon.cygnus.com>
1298 * registers.c (register_description): Add gdb synonyms for cr
1301 Fri Sep 8 13:16:10 1995 Ian Lance Taylor <ian@cygnus.com>
1303 * Makefile.in (install): Don't install in $(tooldir).
1305 * configure.in: Call AC_CONFIG_HEADER. Don't try to use
1306 bfd/hosts/*.h file or bfd/config/*.mh file. Call AC_PROG_CC and
1307 AC_PROG_RANLIB. Substitute in values for CFLAGS, HDEFINES, AR,
1308 and CC_FOR_BUILD. Call AC_CHECK_HEADERS for various header files.
1309 Touch stamp.h if creating config.h.
1310 * configure: Rebuild.
1311 * config.in: New file, created by autoheader.
1312 * Makefile.in (AR): Define as @AR@.
1313 (CC): New variable, defined as @CC@.
1314 (CFLAGS): Define as @CFLAGS@.
1315 (CC_FOR_BUILD): New variable, defined as @CC_FOR_BUILD@.
1316 (RANLIB): Define as @RANLIB@.
1317 (HDEFINES, TDEFINES): New variables.
1318 (@host_makefile_frag@): Remove.
1319 (mostlyclean): Make the same as clean, not distclean.
1320 (clean): Remove config.log.
1321 (distclean): Remove config.h and stamp-h.
1322 (Makefile): Don't depend upon @frags@. Just rebuild Makefile when
1323 invoking config.status.
1324 (config.h, stamp-h): New targets.
1325 (gen, gen.o): Build with CC_FOR_BUILD, not CC.
1326 (ppc-config.h): Rename from old config.h build.
1327 * (basics.h,gen.c,ppc-endian.c,psim.c): Include ppc-config.h.
1329 Fri Sep 8 09:51:03 1995 Michael Meissner <meissner@tiktok.cygnus.com>
1331 * configure{,.in}: Don't include sysdep.h from bfd, since bfd no
1333 * basics.h (sysdep.h): Don't include it.
1334 * Makefile.in (BASICS_H): Remove sysdep.h.
1336 Wed Sep 6 13:25:42 1995 Andrew Cagney <cagney@highland.com.au>
1338 * core.c (core_add_data): First growth of bss was being put at
1339 wrong address (0) instead of &end.
1341 * core.c (core_add_stack, core_add_data): Was not handling case
1342 where bss/stack is grown across the current end-of-{bss,stack}.
1344 Wed Sep 6 00:46:10 1995 Andrew Cagney <cagney@highland.com.au>
1346 * system.c (system_call): Fix SYS_break - was aligning bss to a
1347 page boundary instead of just an 8 byte one; On first call sbrk(0)
1350 Thu Aug 24 14:48:54 1995 Michael Meissner <meissner@tiktok.cygnus.com>
1352 * Makefile.in (install): Fix install rule.
1354 Tue Aug 22 09:31:18 1995 Michael Meissner <meissner@tiktok.cygnus.com>
1356 * system.c (system_call): Add read support.
1358 * main.c (main): -t sets trace_device_tree. Correct usage message
1361 * device_tree.c (update_memory_node_for_section): Make tracing
1362 output line up. If not code or readonly, assume that the section
1363 is a data section and has read/write permissions. Add readonly
1366 * core.c (create_core_from_addresses): Print end address in traces
1367 and make tracing output line up.
1369 * Makefile.in: Rewrite from Makefile to work with the Cygnus
1370 environment, and support compiling in a different directory than
1371 the sources reside in.
1373 * ppc-endian.h: Rename from endian.h so that it doesn't get
1374 confused with /usr/include/sys/endian.h on Linux. Add Linux
1377 * ppc-endian.c: Rename to be consistant with ppc-endian.h.
1378 Include ppc-endian.h, not endian.h.
1380 * basics.h (sysdep.h): Include sysdep.h that configure makes.
1381 Include ppc-endian.h, not endian.h.
1383 * std-config.h: Rename from ppc-config. Put #ifndefs around most
1384 configuration macros, so they can be overridden via CFLAGS. By
1385 default, turn off tracing.
1387 * configure.in: Clone from other simulator targets.
1388 * configure: Generate via autoconf from configure.in.
1390 Sat Aug 19 09:05:32 1995 Andrew Cagney <cagney@highland.com.au>
1392 * ppc-instructions: fix srawi (was geting XER[CA] real wrong).
1394 * interrupts.c (data_storage_interrupt): allow stack to grow by
1395 upto one MB per increment.
1397 * ppc-instructions: divw was computing rA / rA not rA / rB
1399 * main.c (main): really stupid. Wasn't exiting with correct status
1401 Fri Aug 18 00:38:01 1995 Andrew Cagney <cagney@highland.com.au>
1403 * system.c (system_call): add system calls kill(2) and getpid(2).
1405 * main.c (main): Check/return exit status when simulation
1408 Thu Aug 17 14:29:18 1995 Andrew Cagney <cagney@highland.com.au>
1410 * device_tree.c (create_option_device_node): Alignment rules (at
1411 least for the moment) now are for strict alignment only for LE OEA
1412 mode. (Because of compiler problems).
1414 * system.c (system_call) SYS_exit: Wasn't exiting with correct status.
1416 Thu Aug 17 01:16:38 1995 Andrew Cagney <cagney@highland.com.au>
1418 * vm.c (DEFINE_VM_DATA_MAP_WRITE_N): For miss aligned transfer
1421 * system.c (system_call): didn't page align break argument before
1422 determining increment break increment.
1424 * psim/ppc: Re-arange entire directory structure so that
1425 everything lives in the one directory. While a pain for cleaning,
1426 makes building across multiple architectures much simpler.
1428 * devices.c, device_tree.c: Added code that provides a simple
1429 illustration of how an interrupt control device could be
1432 * devices.c: Added code so that the dumb console device can read
1433 (from stdin) as well as write to stdout.