1 Tue Nov 28 13:38:26 1995 Michael Meissner <meissner@tiktok.cygnus.com>
3 * configure{,.in} (--enable-sim-model-issue): Instead of defining
4 0/1, define it to be MODEL_ISSUE_{PROCESS,IGNORE}.
6 * std-config.h (WITH_MODEL_ISSUE): Default to 0.
7 (CURRENT_MODEL_ISSUE): Reference WITH_MODEL_ISSUE, and if that is
8 0, use current_model_issue.
10 * psim.c (current_model_issue): New global variable.
12 * cpu.c (cpu_create): Use CURRENT_MODEL_ISSUE > 0 instead of
14 (cpu_{init,halt}): Ditto.
15 * mon.c (mon_print_info): Ditto.
16 * ppc-instructions (PPC_INSN_* macros, branch handling): Ditto.
18 * mon.c (mon_print_info): Print instructins/second if verbose > 0,
21 * main.c (main): Set current_model_issue to MODEL_ISSUE_PROCESS if
22 the -I switch is used.
23 * sim_calls (sim_open): Ditto.
25 * ppc-instructions (model support): Add support for determining
26 when we don't have enough writeback slots. Add tracing for the
27 beginning of each cycle.
29 Mon Nov 27 17:46:33 1995 Michael Meissner <meissner@tiktok.cygnus.com>
31 * mon.c: Check for whether to include sys/types.h and sys/time.h.
33 * configure.in: Check for include files sys/types.h and
35 * configure: Regenerate.
36 * config.in: Regenerate.
38 * cpu.h (CONST_ATTRIBUTE): Define as __attribute__((__const__)) if
40 (cpu_system): Use CONST_ATTRIBUTE, so that when we're not inlining
41 the world, the optimizer has a fair chance of CSE'ing function
43 (cpu_{monitor,nr,registers,model}): Ditto.
45 * std-config.h (MODEL_INLINE): If not defined, define as 1 if
46 DEFAULT_INLINE is non-zero, 0 otherwise, rather than just the
47 value of DEFAULT_INLINE.
49 Fri Nov 24 11:24:34 1995 Michael Meissner <meissner@tiktok.cygnus.com>
51 * lf.h (__attribute__): If not GCC and at least 2.7.0, define as
53 (lf_printf): Add printf __attribute__, so the compiler will
54 automatically check the format string.
56 * configure{,.in} (--enable-sim-icache): If argument is define,
57 add -R to flags passed to igen.
59 * igen.c (stdlib.h): Include if the system supplies one.
60 (semantics_use_cache_struct): New global for -R flag to say
61 semantics is to use the cache structure directly rather than
62 putting the values into local variables.
63 (first_undef, last_undef): New structures to remember names to
65 (lf_print_c_extraction): If -R and this is semantics, emit names
66 as #defines pointing to the cache structure, rather than loading
67 the values into local variables.
68 (lf_print_c_semantic_function): If -R, #undef all of the names
69 defined in lf_print_c_extraction.
72 * idecode_fields.h (SPR_*): Redefine spr_* macros as SPR_* to
73 avoid a name confict if -R passed to igen.
75 * ppc-instructions (mfspr, mtspr): Rename spr field to SPR.
76 (model_data): Add field to count the various # of CRs that the
77 mtcrf instruction used.
78 (model_mon_info): Return structures counting the # of CRs that the
79 mtcrf instruction used.
80 (branches, sync instructions): Do not call model functions if
81 WITH_MODEL_ISSUE is 0.
83 * mon.c (stdlib.h): Include if the system supplies one.
84 (mon_sort_instruction_names): New function to sort instruction
86 (mon_print_info): Call qsort with mon_sort_instruction_names to
87 sort instruction names. Don't abort if WITH_MODEL_ISSUE is 0.
89 * debug.h (ITRACE): Make printf_filtered arguments type correct.
90 * idecode_expression.h (CR0_COMPARE): Ditto.
91 * psim.c (psim_read_register): Ditto.
93 * igen.c (lf_print_my_prefix): Use __attribute__((__unused__)) to
94 silence compiler warnings about unused automatically generated
96 (lf_print_c_extraction): Ditto.
97 * idecode_expression.h (FPSCR_BEGIN): Ditto.
99 * ppc-cache-rules: Define rules for making a bitmask for all
102 * ppc-instructions: Rewrite model specific functions to use the
103 bitmask of the register number, instead of using the register
104 pointer to get the register number, and then making the bitmask.
106 Wed Nov 22 15:24:27 1995 Michael Meissner <meissner@tiktok.cygnus.com>
108 * ppc-instructions (model_branches): Add conditional argument to
109 count the number of times each type of conditional branch is used.
110 (conditional branches): Pass B0 or -1 to model_branches.
111 (model_mon_info): Print out conditional branch counts.
112 (model-data): Add support for printing out conditional branch
115 Tue Nov 21 16:31:25 1995 Michael Meissner <meissner@tiktok.cygnus.com>
117 * igen.c (insn_table_load_insns): Add support for model-static for
118 internal functions that should not be inlined.
119 (lf_print_c_semantic): Remove model_cleanup.
120 (gen_model_{c,h}): Ditto.
122 * ppc-instructions: Redo model specific support once again. Add
123 floating point support to the model specific information. Flesh
124 out all of the floating mutiply add/subtract instructions. Add
125 better tracing support to the model specific information.
127 Sun Nov 19 23:00:52 1995 Michael Meissner <meissner@tiktok.cygnus.com>
129 * ppc-instructions (model data, model_busy): Rather than using a
130 bit mask for the busy units, just use a char array. Also, only
131 support 2 function units an insn can use, rather than a loop.
133 Fri Nov 17 14:08:08 1995 Michael Meissner <meissner@tiktok.cygnus.com>
135 * table.c (table_entry_read): Move setting entry->line_nr to after
136 the model specific fields so the line numbers for the annex are
139 * cpu.c (cpu_{create,init,halt}): Check for WITH_MODEL_ISSUE
140 before calling the model functions.
142 * debug.c (trace_descriptor): Add trace_model support.
143 * debug.h (trace_options): Ditto.
145 * igen.c (gen_icache_h): Create type idecode_cache as void if not
146 caching instructions.
147 (gen_model_{c,h}): Drop model_issue support. Add support for
149 (lf_print_my_prefix): Initialize a const itable_index with the
151 (lf_print_c_semantic): Call model_cleanup at the end of the
152 function to check for instructions that aren't supported yet by
155 * mon.h (count_type): New type for counters.
156 * mon.c: Use count_type instead of unsigned.
158 * ppc-instructions: Redo scheduling code once again. Make it all
159 inline friendly. Instead of having general code emitted by igen,
160 go the route of having each semantic routine call the appropriate
163 Thu Nov 16 09:52:26 1995 Michael Meissner <meissner@tiktok.cygnus.com>
165 * table.c (table_entry_read): Allow the annex to have blank lines.
167 * ppc-instructions: Change lines in model stuff that just have a
168 tab to just newline. Add 601 support. Document most instructions
169 in terms of model specific timing information. Drop 'FUNCTION'
170 from PPC_FUNCTION_UNIT_xxx enums. Change PPC_UNIT_UNKNOWN ->
171 PPC_UNIT_BAD. Add TRACE(trace_tbd) for all data cache
172 instruction.s. Signal illegal instruciton if data cache block
173 invalidate is issued from problem state.
175 * igen.c (max_model_fields_len): New static to keep track of the
176 max size for the model specific fields.
177 (model_c_insn): Use max_model_fields_len to size fields.
178 (insn_table_insert_insn): Set max_model_fields_len.
179 (model_table_insert): Ditto.
180 (gen_model_{c,h}): Model_issue is now called with a processor
183 * debug.c (trace_description): Add support for trace_tbd.
185 * mon.c (mon_issue): Pass processor argument to model_issue.
187 * Makefile.in: Delete all function unit support, since the newer
188 table driven model support replaces it.
191 * inline.{c,h}: Ditto.
192 * std-config.h: Ditto.
194 * configure{,.in}: Ditto.
195 * Makefile.in: Ditto.
197 * function_unit.{c,h}: Delete these now usused files.
199 * std-config.h (WITH_MODEL_ISSUE): Add new macro on whether to
200 trace instructions in a model specific manor.
201 * options.c (print_options): Print it out.
202 * configure{,.in}: Add --enable-sim-model-issue option.
203 * Makefile.in: Add --enable-sim-model-issue flags.
204 * igen.c (lf_print_c_semantic): Add call to mon_issue here. Check
205 for WITH_MODEL_ISSUE.
206 * mon.c (mon_issue): Remove call to mon_issue_here.
208 * ppc-instructions: Move branch tracing to the actual branch
209 instructions, rather than testing it in model_issue. Add code to
210 code successful/unsuccessful branch predictions, and the number of
211 conditional branches that fell through.
213 Wed Nov 15 17:32:13 1995 Michael Meissner <meissner@tiktok.cygnus.com>
215 * cpu.h (cpu_model): Add declaration.
217 * cpu.c (struct _cpu): Add model_ptr to hold model specific
219 (cpu_model): Return the model internal pointer.
220 (cpu_{create,init,halt}): Call the appropriate model function.
222 * inline.c (mon.c): Move include of mon.c after model.c.
224 * mon.c (_cpu_mon): Add fields to count unaligned memory
226 (mon_issue): Call model_issue, not function_unit_issue.
227 (mon_{read,write}): Count # of unaligned memory accesses.
228 (mon_print_info): Switch to calling model_mon_info and
229 model_mon_info_free instead of function_unit version. Print out
230 number of unaligned reads/writes.
232 * {ppc-instructions,igen.c}: More global changes to add model
235 * inline.{c,h}: Provide for inlining options.c.
236 * options.{c,h}: Ditto.
237 * std-config.h: Add OPTIONS_INLINE.
239 Tue Nov 14 04:47:25 1995 Michael Meissner <meissner@tiktok.cygnus.com>
241 * Makefile.in (devices.o, main.o): Update dependency.
243 * igen.c (gen_model_h): Use correct variable in loop.
244 (gen_model_c): Use strcmp, strcasecmp.
245 (gen_model_c): Use EXTERN_MODEL for arrays.
246 (gen_model_h): Use STATIC_MODEL for arrays.
247 (lf_print_c_semantic_function_header): Delete unused function.
249 * main.c (cpu.h): Include cpu.h to get model.h.
251 * inline.h ({EXTERN,STATIC}_MODEL): Define.
253 Mon Nov 13 09:14:13 1995 Michael Meissner <meissner@tiktok.cygnus.com>
255 * igen.c ({insn,model}_table_fields): Spell mnemonic correctly.
256 (gen_itable_h,itable_c_insn): Ditto.
257 (model support): Move model support around, add support for
258 model-data, model-internal. Use annex field for model-macros
261 * configure.in (--enable-sim-inline): If --enable-sim-inline=no,
262 also define INLINE as nothing.
263 * configure: Regenerate.
265 * std-config.h (INLINE): Rather than nuking INLINE, only define it
266 as __inline__ if any of the INLINE flags are non-zero.
268 * options.c (print_options): Print out WITH_XOR_ENDAIN.
270 Mon Nov 13 23:03:45 1995 Andrew Cagney <cagneyhighland.com.au>
272 * ppc-instructions (rfi): Add missing code.
274 * cpu.c (cpu_get_time_base): Fix calculation of current value of
277 * ppc-spr-table (TBL, TBU): Fix TBL/TBU entries - was confusing
278 m[tf]tb with m[tf]spr.
280 * ppc-instructions (mtspr, mfspr): Fix mttbl - wasn't storing
283 Mon Nov 13 21:35:37 1995 Andrew Cagney <cagneyhighland.com.au>
285 * std-config.h (INLINE, STATIC_INLINE): Was being set to static
286 inline.. Only problem being that with ppc-opcode-simple this gave
287 it the chance to inline all the idecode functions with potentially
288 disasterous results on a 16mb PC. For moment hobble INLINE.
290 * configure.in, std-config.h (WITH_SMP): Make that 5 processors by
293 * configure.in: Tweek flags passed to gcc for --with-sim-warnings.
294 Firstly make them errors and secondly remove the options gcc-245
297 Mon Nov 13 17:57:24 1995 Andrew Cagney <cagney@highland.com.au>
299 * misc.c (zalloc), cpu.c (cpu_init), devices
300 (console_io_read_buffer_callback, icu_io_read_buffer_callback,
301 vm_io_read_buffer_callback), main.c (zalloc), mon.c (memset),
302 sim_calls.c (zalloc) : replace bzero() with memset().
304 * emul_netbsd.c (write_direntries), psim.c (psim_read_register,
305 psim_write_register): replace bcopy() with memcpy().
307 Sun Nov 12 20:55:41 1995 Andrew Cagney <cagneyhighland.com.au>
309 * configure.in: for --disable-sim-inline (--enable-sim-inline=no),
310 force DEFAULT_INLINE to 0 rather then trusting the std
313 Sun Nov 12 20:55:41 1995 Andrew Cagney <cagneyhighland.com.au>
315 * igen.c (lf_print_idecode_table, idecode_table_leaf): Fix
316 generation of switch entries in tables - treat the same as
317 cracking/semantic functions.
319 * igen.c (idecode_switch_end, idecode_switch_leaf): Fix generation
320 of a boolean switch statement (field zero or non-zero).
322 * ppc-opcode-test-1, ppc-opcode-test-2: New files. These test the
323 switch/table generation ability of igen.
325 * igen.c (idecode_switch_leaf): Fix code output when a switch
326 statement needs to look up a table.
328 * igen.c (idecode_declare_if_switch): New function called from
329 gen_idecode_c - need to declare any idecode switch functions
330 before they are used in idecode tables.
332 * igen.c (lf_print_c_cracker_function, idecode_crack_leaf,
333 idecode_crack_insn): Add is_inline_function argument to code
334 printing cracker functions which indicates if STATIC_IDECODE or
335 STATIC_INLINE_IDECODE should be used for definition. For
336 idecode_crack_insn (which implies not duplicating/expanding) don't
337 declare function as inline - we assume that the only time this is
338 code is generated is when things are being tested. For
339 idecode_crack_leaf, make static (instead of INLINE) if the
340 instructions parent is a table as function will always be called
343 * igen.c (idecode_expand_if_switch): Declare as STATIC_IDECODE not
344 STATIC_INLINE_IDECODE. Only the outermost idecode switch will be
345 called directly, all others are called via a table.
347 * igen.c (lf_print_semantic_function_header, semantics_h_leaf,
348 semantics_h_insn, semantics_h_function,
349 lf_print_c_semantic_function, semantics_c_function): Add
350 is_inline_function argument to lf_print_semantic_function_header
351 to indicate if an inline or static function declaration/definition
352 should be output. Depending on situtation call accordingly:
353 functions (not instruction semantic routines) are always inline;
354 Semantic routines are made inline when there is no icache (cache
355 will contain the function address) and are duplicating (see above)
356 and the parent of the instruction is a switch statement.
358 * igen.c (opcode_field_new): Delete. Code changed to use ZALLOC
359 and moved to insn_table_find_opcode_field.
361 * table.c (table_open): Fix typo (nr_model_fields vs nr_fields).
363 * igen.c (model_c_insn): Suggestion - document the name of the
364 instruction on each line of the instruction model table.
366 Fri Nov 10 00:44:38 1995 Andrew Cagney <cagneyhighland.com.au>
368 * emul_netbsd.c (do_ioctl): Cleanup compilation.
370 * sim_callbacks.h (__attribute__): Only define if not defined (was
371 already defined on NetBSD host).
373 Wed Nov 8 21:49:52 1995 Andrew Cagney <cagneyhighland.com.au>
375 * std-config.h (WITH_XOR_ENDIAN), configure.in, Makefile.in: New
376 macro, indicates if the PowerPC's horrible XOR endian mode should
377 be suported. Add to configure and make.
379 * vm_n.h (vm_data_map_read_N, vm_data_map_write_N), vm.c
380 (vm_instruction_map_read): If XOR endian, xor the address
381 with a value from an xor table (indexed by size of access).
383 * vm.c (vm_synchronize_context), cpu.c (cpu_synchronize_context):
384 set up xor table to xor if there is a conflict between the
385 CURRENT_TARGET_ENDIAN and the endian indicated in the MSR. Move
386 check of suported change of endian mode from cpu.c to vm.c.
388 * vm.c (vm_data_map_write_buffer, vm_data_map_read_buffer):
389 Hopefully added correct hack to handle XOR endian mode.
391 FIXME: If NONSTRICT alignment and XOR ENDIAN and MSR indicates
392 little endian mode, the model accepts miss aligned transfers.
394 FIXME: Need to create an `init' device that, during
395 initializatioin for XOR mode, it mushes (XOR address) all the dma
396 data before passing it on to the core for storage. Just like the
399 Wed Nov 8 21:49:52 1995 Andrew Cagney <cagneyhighland.com.au>
401 * devices.c (halt_io_write_buffer_callback): Use value written to
402 halt device to determine exit status. Thus allowing
403 success/failure of OEA tests.
405 Wed Nov 8 00:10:38 1995 Andrew Cagney <cagneyhighland.com.au>
407 * ppc-instructions (icbi): If icache present flush it.
409 Tue Nov 7 23:36:31 1995 Andrew Cagney <cagneyhighland.com.au>
411 * devices.c (htab_init_callback): Add code to create htab/pte.
413 * devices.c (dma_file, file_init_callback, htab_init_callback):
414 New function - Dma the named file into memory at the specified
417 * device_tree.h, device_tree.c (scand_*): New functions.
419 Tue Nov 7 23:36:31 1995 Andrew Cagney <cagneyhighland.com.au>
421 * filter_filename.c, Makefile.in: Change so that only dependant on
422 a very limited nr of files. Stops an unnecessary dependency.
424 Tue Nov 7 15:44:33 1995 Andrew Cagney <cagney@highland.com.au>
426 * core.c (core_map_find_mapping): Use cpu_halt rather than error
427 to abort an access to an undefined address.
429 Sun Nov 12 07:58:09 1995 Michael Meissner <meissner@tiktok.cygnus.com>
431 * igen.c (model_table_insert_{macro,function}): New functions.
432 (insn_table_load_insns): Call them.
433 (gen_model_h): Move section emiting model-macros to be first.
434 (model_{c,h}_function): New functions cloned from semantic
435 functions to print out the prototype and function for
437 (gen_model_{c,h}): Print out model-functions.
439 * ppc-instructions (model_{start,halt,print_info}): Add dummy
442 * options.c (print_options): Print out WITH_{,DEFAULT_}MODEL, not
443 WITH_PPC_{,DEFAULT_}_MODEL.
444 (options_ppc): Delete now unused function.
445 (cpu.h): Include cpu.h, not just basics.h.
447 * std-config.h (WITH_{,DEFAULT_}MODEL): Define.
449 * igen.c (model_macros, last_model_macro): New statics to keep
450 track of macros to go in model.h.
451 (insn_table_load_insns): Add model-macros to model_macros linked
453 (model_table_fields): Add field for printable name.
454 (gen_model_h): If there are model macros defined, print them out.
455 Print out DEFAULT_MODEL as the first model if there any models
456 specified, otherwise MODEL_NONE. Print out external decl for
457 current_model. Print out decl for model_set.
458 (gen_model_c): Add function model_set. Switch to use printable
459 name for the model, not the internal identifier used.
461 * psim.c (current_model): New global variable.
463 * ppc-instructions: Add macros for flag defines. Switch first
464 model so 604 is first.
466 * main.c (main): Call model_set, not function_unit_model.
467 * sim_calls.c (sim_open): Ditto.
468 * sim_calls.c, Makefile.in: sim_calls.c now includes cpu.h.
470 Sat Nov 11 07:27:41 1995 Michael Meissner <meissner@tiktok.cygnus.com>
472 * mon.h (mon_events): New enumeration for other events we want to
474 (mon_event): Add declaration for function.
476 * mon.c (mon_event): New function.
477 (mon_print_info): Print icache misses.
479 * psim.c (run_until_stop): Monitor icache misses.
481 * configure.in (--enable-sim-inline): Fix typos in handling comma
482 separated inline options.
483 (--enable-sim-icache): Echo icache size.
484 * configure: Regenerate.
486 * igen.c (semantics_h_print_function): Emit STATIC_SEMANTICS
487 instead of INLINE_SEMANTICS so that the compiler won't keep all of
488 the semantic functions as inline RTL, given that the address of
489 the function is taken which forces outline calls anyway.
490 (lf_print_c_semantic_function_header): Ditto.
491 (gen_semantics_h): Define STATIC_SEMANTICS as nothing if not
493 (lf_print_c_cracker_function): Emit STATIC_IDECODE instead of
494 STATIC_INLINE_IDECODE.
495 (gen_idecode_c): Define STATIC_IDECODE if not defined.
496 (gen_model_h): Use #ifdefs to define types to hold model units,
498 (model_table_insert): Add a sentinel functional unit at the end to
499 simplify loop processing.
500 (model_c_insn): Use <function-unit>_SENTINAL instead of 0 for any
501 instruction not specifing a function unit for the current model.
502 (gen_model_{c,h}): Provide bounds for model_time_mapping.
504 * inline.h (STATIC_SEMANTICS): Define to be static if
505 SEMANTICS_INLINE is defined.
506 (STATIC_IDECODE): Define to be static if IDECODE_INLINE is
509 * options.c (print_options): Fix typo.
511 Fri Nov 10 06:39:46 1995 Michael Meissner <meissner@tiktok.cygnus.com>
513 * configure.in (--enable-sim-{opcode,config}): Use $srcdir when
514 check for the existence of files.
515 * configure: Regenerate.
517 * table.c (table): New field nr_model_fields.
518 (table_open): New parameter nr_model_fields.
519 (table_entry_read): Parse model fields that begin with a '*' after
521 * igen.c, dgen.c: Change callers of table_open.
523 * igen.c: Add support for dumping model specific information in
525 (insn_field_name): Delete unused array.
526 (global variables): Make global variables static, so we can tell
527 when they are no longer used.
528 (cache_semantic_actual): Delete unused variable.
529 (insn_table_load_insns): If the insn is really a machine model,
530 call model_table_insert instead of other processing.
531 (model_table_insert): New function to handle defining the
532 functional units of a particular machine model.
533 (insn_table): Add last_function field so we can add functions at
535 (insn_table_insert_function): Use last_function field when
536 appending new function.
538 * ppc-instructions: Add a few model specific information for 603,
539 603e, and 604 for testing purposes.
541 * table.h (table_model_entry): New linked list to hold model
542 specific information, one per line.
543 (table_entry): Add model_first, model_last fields.
545 * configure.in (--enable-sim-inline): If gcc is found and
546 --enable-sim-inline is not specified, defaine DEFAULT_INLINE to 1,
548 (--enable-sim-reserved-bits): New switch to check whether reserved
549 bits are set in the instruction.
550 (--enable-sim-opcode): Make complex the default.
551 (all switches): Add appropriate checks and error messages.
552 * configure: Regenerate.
554 * Makefile.in (RESERVED_CFLAGS): New variable set by
555 --enable-sim-reserved-bits.
556 (CONFIG_CFLAGS): Include RESERVED_CFLAGS.
557 (BUILT_SRC): igen now generates model.c and model.h.
558 (LIB_OBJ): Include table.o.
559 (tmp-igen): Add -m/-M options to write model.c/model.h.
560 (model.o): New object.
561 (CPU_H): Include model.h.
563 * cpu.h: Include model.h.
565 * std-config.h (WITH_RESERVED_BITS): Define.
566 (MODEL_INLINE): Ditto.
568 * options.c (print_options): Print out WITH_RESERVED_BITS.
570 Thu Nov 9 12:22:15 1995 Michael Meissner <meissner@tiktok.cygnus.com>
572 * configure.in: If --silent, don't output information messages.
573 * configure: Regenerate.
575 * configure.in (--enable-sim-alignment): Fix typo in specifing non
577 (--enable-sim-switch): Make default on.
578 (--enable-sim-duplicate): Make default on.
579 (--enable-sim-smp): Make default 0.
580 (--enable-sim-mon): Don't set sim_float if not set.
581 (--enable-sim-inline): If gcc is found and --enable-sim-inline is
582 not specified, define DEFAULT_INLINE to be 2.
583 (all --enable-sim-* rules): Echo rules set to non empty to file
585 * configure: Regenerate.
587 * options.c (options_env): Fix typo if WITH_ENV is 0.
588 (print_options): Print GCC compiler version if available and
589 date/time options was compiled. If OPCODE_RULES, IGEN_FLAGS,
590 and/or DGEN_FLAGS are defined, print them.
592 * Makefile.in (all link actions): Pass SIM_CFLAGS as well as
594 (options.o): Compile options.o with OPCODE_RULES, IGEN_FLAGS, and
595 DGEN_FLAGS defined, so they can be printed out.
597 * igen.c (lf_print_c_validate): Check for WITH_ASSERT, so that
598 this test can be compiled away if the user really wants a fast
599 simulator by not doing assertion failures.
601 Wed Nov 8 13:19:47 1995 Michael Meissner <meissner@tiktok.cygnus.com>
603 * options.c: New file to print out all of the WITH_ options.
604 * options.h: New include file to declare print_options.
605 * debug.h (trace_options): Add trace_opts to call print_options.
606 * debug.c (trace_description): Add trace_opts support.
607 * main.c (main): If user requested options, print them.
608 * sim_calls.c (sim_open): Ditto.
610 * igen.c (opcode_field_new): Add void to make it a proper prototype.
612 * emul_generic.c (emul_enter_call): Make printf_filtered arguments
614 * emul_netbsd.c (do_kill): Ditto.
615 * registers.c (registers_dump): Ditto.
616 * vm.c (om_translate_effective_to_real): Ditto.
617 * vm_n.h (vm_data_map_read_N): Ditto.
618 (vm_data_map_write_N): Ditto.
619 * devices.h (DTRACE_INIT): Ditto.
620 (DTRACE_{ATTACH,DETACH}_ADDRESS): Ditto.
621 (DTRACE_IO_{READ,WRITE}_BUFFER): Ditto.
622 (DTRACE_DMA_{READ,WRITE}_BUFFER): Ditto.
623 * devices.c (update_for_binary_section): Ditto.
624 (write_stack_arguments): Ditto.
625 (stack_ioctl_callback): Ditto.
626 * device_tree.c (device_tree_add_passthrough): Ditto.
627 (device_tree_{add,find}_device): Ditto.
628 (device_tree_{add,find}_integer): Ditto.
629 (device_tree_find_{string,boolean}): Ditto.
630 (device_tree_init{,_device}): Ditto.
631 (device_tree_dump): Ditto.
632 * sim_calls.c (sim_{read,write}): Ditto.
633 (sim_{fetch,store}_register): Ditto.
634 (sim_stop_reason): Ditto.
636 * sim_callbacks.h (printf_filtered): Declare with attribute
637 printf, so we can enable format checks.
639 * devices.c (console_io_{read,write}_buffer_callback): Cast swtich
640 argument to int, since ANSI doesn't allow long switch values.
641 * emul_netbsd.c (do___sysctl): Ditto.
643 * emul_netbsd.c (do___sysctl): Fix up printf call.
645 * corefile.c (core_translate): Don't do arithmetic with void *
646 pointers. Cast to char * first.
648 * function_unit.c (FUNC_{LOAD,STORE}): Rename from {LOAD,STORE}
651 * Makefile.in ({FUNC,MODEL,WARNING}_CFLAGS): New flags set by
652 configure --enable switches.
653 (CONFIG_CFLAGS): Include FUNC_CFLAGS and MODE_CFLAGS.
654 (.c.o): Include WARNING_CFLAGS.
655 (CPU_H): Include function_unit.h.
656 (LIB_OBJ): Include function_unit.o.
657 (BUILT_SRC_WO_CONFIG): Split from BUILT_SRC and do not include
658 config.h or ppc-config.h.
659 (BUILT_SRC): Include BUILT_SRC_WO_CONFIG, config.h and
661 (filter_filename.o): Include config.h/ppc-config.h dependencies.
662 (idecode.o, semantics.o, psim.o): Specify CC line without
663 WARNING_CFLAGS so that we don't get all of the unused variable
664 warnings that are generated.
665 (function_unit.o): Add rule to build.
666 (main.o, sim_calls.o): Add function_unit.h, itable.h dependencies.
667 (mon.o): Include mon.c dependency.
668 (TAGS): Depend on BUILT_SRC.
669 (clean): Don't delete config.h or ppc-config.h
671 * basics.h (sim_callbacks.h): Move include after the include of
672 config.h and ppc-config.h.
674 * bits.{h,c} (ROTL32,ROTL64): Move these functions to bits.c. Add
675 support for BITS_INLINE to inline these. Add declarations to
678 * configure.in (--enable-sim-warnings): Add new option to specify
679 compiler warnings for all modules except idecode.o and semantics.o
680 which have lots of unused variables because they are machine
682 (--enable-sim-function-unit): New switch to configure whether
683 function unit support is compiled in or not.
684 (--enable-sim-{,default-}mode): New switches to control which cpu
686 * configure: Regenerate.
688 * corefile.c (core_attach_address_callback): Delete unused
689 variable device_address.
691 * cpu.c (struct _cpu): Add function unit pointer field func_unit.
692 (cpu_create): If WITH_FUNCTION_UNIT, call function_unit_create.
693 (cpu_init): If WITH_FUNCTION_UNIT, call function_unit_init.
694 (cpu_halt): If WITH_FUNCTION_UNIT, call function_unit_halt.
695 (cpu_function_unit): New function to return func_unit field.
697 * cpu.h (function_unit.h): Include new include file.
698 (cpu_function_unit): Declare.
700 * debug.c (stdlib.h): Test HAVE_STDLIB_H, not HAVE_STDLIB.
701 (config.h): Include config.h.
703 * devices.c (icu_io_write_buffer_callback): Delete unused variable
706 * emul_generic.c (emul_exit_call): Print out status value.
708 * emul_netbsd.c (do_read): Delete unused variable nr_moved.
710 * filter_filename.h (includes): Include config.h, ppc-config.h,
713 * inline.c: Include bits.c if BITS_INLINE. Include
714 function_unit.c if FUNCTION_UNIT_INLINE.
716 * inline.h (INLINE_BITS): Define if BITS_INLINE.
717 (INLINE_FUNCTION_UNIT): Define if FUNCTION_UNIT_INLINE.
719 * interrupts.c (instruction_storage_interrupt): Delete unused
722 * lf.h (config.h): Include config.h.
724 * main.c (includes): Include function_unit.c. If HAVE_UNISTD_H,
726 (usage): Update for -m model, -i, and -I options.
727 (main): Delete unused variables stack_pointer and i. Add support
728 for -i, -m model arguments. Call psim_print_info with verbose ==
729 1 if -i, and verbose == 2 if -I.
731 * mon.c (stdio.h): Include stdio.h to pick up sprintf prototype.
732 (mon_issue): Call function_unit_issue if function units are
734 (mon_print_info): Take psim * argument. Print out information
735 from function_unit if available. Move read/write stats to always
736 print, instead of printing if verbose > 1. Fix up plural
739 * mon.h (mon_print_info): Update prototype.
741 * psim.c (current_ppc_model): Add global variable.
742 (psim_print_info): Pass system argument to mon_print_info.
744 * sim_calls.c (function_unit.h): Include.
745 (sim_open): Add support for -i and -m model options. If -i call
746 psim_print_info with verbose == 1, if -I, with verbose == 2.
747 (sim_resume): Delete unused variable program_counter.
749 * std-config.h (WITH_FUNCTION_UNIT): Define.
750 (ppc_model): Add enumeration giving all PowerPC models currently
752 ({WITH,CURRENT}_PPC_MODEL): Define.
753 (FUNCTION_UNIT_INLINE): Define.
755 * table.c (config.h): Include config.h.
757 * vm.c (om_virtual_to_real): Print pte_word_{0,1} so the compiler
758 doesn't complain that they're unused.
760 * vm_n.h (vm_data_map_read_N): Delete unused variable rval.
762 Mon Nov 6 23:15:54 1995 Andrew Cagney <cagney@highland.com.au>
764 * sim-endian.c (ppc-endian.c), sim-endian.h (ppc-endian.h):
765 renameed. These files are target independant.
766 * Makefile.in, basics.h: update for new name.
768 * sim-endian.h (SWAP_N), sim-endian.c (_SWAP_1): Rename existing
769 SWAP_<N> to _SWAP_<N> so that sim-endian.h can contain SWAP_N
772 * sim-endian.c, sim-endian-n.h (new file): Move endian code into a
773 debugable header file.
775 * ppc-instructions (Byte-Reverse): Enable byte reverse
776 instructions using SWAP_N macros.
778 Mon Nov 6 10:39:28 1995 Michael Meissner <meissner@tiktok.cygnus.com>
780 * Makefile.in (config.status): Remove references to config.make
783 * config.{make,hdr}: Delete, no longer used.
786 Mon Nov 6 20:49:56 1995 Andrew Cagney <cagney@highland.com.au>
788 * sim_calls.c (sim_open): Fix parsing of `target sim' options.
790 * device_tree.c (device_tree_add_string): Wasn't saving the value
791 of the string being entered into the tree.
793 * psim.c (create_filed_device_tree): Not terminating string device
796 * psim.c (psim_create): Use `env' instead of
797 `environment-architecture' to be consistent with configure.
798 Reconize user/uea, virtual/vea and operating/oea.
800 Sat Nov 4 12:29:45 1995 Fred Fish <fnf@cygnus.com>
802 * core.c: Rename to corefile.c
803 * core.h: Rename to corefile.h
804 * inline.c: Include corefile.h, renamed from core.h.
805 * cpu.h: Include corefile.h, renamed from core.h
806 * vm.c: Include corefile.h, renamed from core.h
807 * corefile.c: Include corefile.h rather than core.h
808 * README.psim (KNOWN PROBLEMS): Change core.* references to corefile.*
810 * Makefile.in (CPU_H): Change core.h to corefile.h
811 (vm.o): Change dependency to corefile.h
812 (LIB_SRC): Change core.c to corefile.c.
813 (LIB_OBJ): Change core.o to corefile.o.
814 (corefile.o): Change dependencies to corefile.c, corefile.h.
816 Fri Nov 3 11:37:24 1995 Michael Meissner <meissner@tiktok.cygnus.com>
818 * ppc-instructions (data cache instructions): Make all data cache
819 instructions nops instead of invalid instructions.
821 * Makefile.in (CONFIG_CFLAGS): Add ALIGNMENT_CFLAGS and
822 TIMEBASE_CFLAGS which weren't included.
824 Thu Nov 2 08:54:04 1995 Michael Meissner <meissner@tiktok.cygnus.com>
826 * Makefile.in: Uncomment built file dependencies.
828 * configure.in: Rewrite --enable-sim switch handling to use the
829 autoconf builtins so it works correctly if the configure or
830 Makefile.in files are modified and make decides to rebuild
831 Makefile. Also document all of the --enable-sim switches
832 supported. Check whether getrusage and sys/resource.h are
834 * config.in: Regenerate.
835 * configure: Regenerate.
836 * Makefile.in: Add support for all of the variables set with
837 --enable-sim switches.
839 * Makefile.in (clean): make clean now removes all built sources as
842 * cpu.c: Use HAVE_STRING_H, HAVE_STRINGS_H, HAVE_UNISTD_H,
843 HAVE_TIME_H, HAVE_SYS_TIMES_H, HAVE_SYS_RESOURCE_H defined in
844 the generated config.h.
846 * device_tree.c: Ditto.
849 * emul_netbsd.c: Ditto.
854 * registers.c: Ditto.
859 * main.c (main): Call psim_print_info with verbose == 2.
861 * mon.c (mon_print_info): Align the cpu number and number of
862 instructions fields. Do not print an instruction category if the
863 CPU did not execute any of those instructions. Print out number
864 of reads and writes. If getrusage is supported, print out number
865 of simulated instructins per second.
867 * configure.in: Add support for --enable-sim-opcode=stupid.
868 * configure: Regenerate.
870 Wed Nov 1 23:46:59 1995 Andrew Cagney <cagney@highland.com.au>
872 * std-config (INLINE_DEVICE_TREE): Don't inline either of
873 device_tree.c or devices.c. There is no significant gain.
875 * configure.in, Makefile.in: add --enable-sim-icache=[0-9]* and
878 Wed Nov 1 23:46:59 1995 Andrew Cagney <cagney@highland.com.au>
880 * igen.c (main), misc.h (target_a2i, i2target), misc.c: Add
881 functions to convert between target and igen internal bit numbers.
882 Make IO go through these functions. Add -b (bit size) and -h (high
883 bit nr) options to igen. Typical usage would be: ./igen -b 16 -h
884 15 for a 16 bit instruction format with the msb given a number 15.
886 Wed Nov 1 22:17:32 1995 Andrew Cagney <cagney@highland.com.au>
888 * dgen.c (main): Was outputting optarg even when it was NULL.
890 Tue Oct 31 23:48:33 1995 Andrew Cagney <cagney@highland.com.au>
892 * vm_n.h (vm_data_map_load_N, vm_data_map_store_n), debug.h,
893 debug.c: Add tracing of load/store unit (virtual) with -t
896 Tue Oct 31 21:44:01 1995 Andrew Cagney <cagney@highland.com.au>
898 * std-config.h (WITH_ENVIRONMENT): Add USER_ENVIRONMENT which does
899 not include things such as the time base and events.
901 * interrupt.c, sim_calls.c, cpu.h, vm.c, configure.in: Add UEA to
902 all environment switches for above.
904 * psim.c (psim_create): ditto - new device tree node name is
905 /options/environment-architecture with values user, virtual and
908 Tue Oct 31 21:31:32 1995 Andrew Cagney <cagney@highland.com.au>
910 * ppc-opcode-stupid: Third example of use of opcode table - this
911 one expands all mtspr/mfspr and branch instructions. Appears to
912 give about a 10% gain in performance if everything enabled. Also
913 takes about 150mb of swap to build.
915 Wed Nov 1 10:49:48 1995 Michael Meissner <meissner@tiktok.cygnus.com>
917 * emul_netbsd.c (do_exit): Print arguments and close parenthesis
918 if tracing, since exit doesn't go through emul_exit_call.
919 (do_read): Print arguments if tracing.
925 (do_sigprocmask): Replace trace with printing arguments if
927 (do_ioctl): Print arguments if tracing.
931 (do_gettimeofday): Ditto.
932 (do_getrusage): Ditto.
935 * filter_filename.c: New file to provide filter_filename to strip
936 the directory prefix from a file.
937 * filter_filename.h: New include file to declare filter_filename.
939 * debug.h: Include filter_filename.h.
940 (TRACE,DTRACE,ERROR): Use filter_filename on __FILE__.
942 * misc.h: Include filter_filename.h.
943 (ASSERT): Use filter_filename on __FILE__.
945 * igen.c (lf_print_my_prefix): Use filter_filename on the filename
948 * Makefile.in: Add filter_filename support.
950 * ppc-instructions (dcbi, icbi): Make these NOPs rather than
951 invalid instructions.
953 * configure.in: Add support for more --enable-sim-* switches.
954 Use config.make and config.hdr to write to Makefile and config.h
955 respectively. Don't rewrite Makefile, just append to it.
956 * configure: Regenerate.
957 * config.{make,hdr}: New shell scripts.
959 * Makefile.in: Remove all variables set by configure.in.
960 (psim.o): Depend on $(BUILT_SRC) also.
962 * emul_netbsd.c (do_gettimeofday,do_getrusage): When comparing an
963 integer, use 0, not NULL.
965 Tue Oct 31 15:20:04 1995 Michael Meissner <meissner@tiktok.cygnus.com>
967 * configure.in: Add support for --enable-sim-inline,
968 --enable-sim-bswap, --enable-sim-cflags, --enable-sim-complex,
969 --enable-sim-switch, --enable-sim-duplicate, --enable-sim-filter,
970 and --enable-sim-endian switch to control various Makefile
972 * configure: Regenerate from configure.in.
973 * Makefile.in: Add various Make variables that the various
976 * std-config.h (DEFAULT_INLINE): Don't set this to 2 if using GCC
977 and optimizing by default.
979 Fri Oct 27 19:26:27 1995 Andrew Cagney <cagney@highland.com.au>
981 * bits.h (ROTL32, ROTL64): Were functions, made them macros, now
982 make them functions again. Appears 2.6.3 is confused by just a
985 Thu Oct 26 18:31:58 1995 Andrew Cagney <cagney@highland.com.au>
987 * ppc-endian.c (SWAP_8): Fix 8 byte swap!
989 * psim.c (psim_create): Not correctly checking that runtime
990 configuration of things like ENDIAN, ENVIRONMENT and ALIGNMENT
991 matched the compiled in ones.
993 * debug.h (ITRACE), igen.c: Tidy up more tracing flags -
994 trace_semantics is now different to trace_idecode, the former
997 Tue Oct 24 21:54:13 1995 Andrew Cagney <cagney@highland.com.au>
999 * ppc-instructions (mtsrin): Missing instruction
1000 * ppc-instructions (mfsrin): Missing instruction
1001 * ppc-instructions (eieio): Missing instruction
1003 Tue Oct 24 20:55:29 1995 Andrew Cagney <cagney@highland.com.au>
1005 * build-psim: New shell script - see internals for usage,
1006 simplifies the process of building custom simulators.
1008 Mon Oct 23 23:48:59 1995 Andrew Cagney <cagney@highland.com.au>
1010 * std-config.h (SEMANTICS_INLINE): Tidy up notes on each of the
1011 INLINE macros. Make SEMANTICS_INLINE == 1 if DEFAULT_INLINE == 2.
1012 Don't use DEFAULT_INLINE to define REGISTERS_INLINE DEVICES_INLINE
1013 DEVICE_TREE_INLINE or INTERRUPTS_INLINE as none of these are on
1014 the instruction or data critical paths.
1016 * FIXME: need to set up OS_EMUL_INLINE/EMUL_GENERIC_INLINE but
1017 not on critical path.
1019 * FIXME: devices.c/emul_netbsd.c would benefit (slightly) from
1020 the inclusion of device_tree.c/emul_generic.c.
1022 Mon Oct 23 00:31:50 1995 Andrew Cagney <cagney@highland.com.au>
1024 * os_emul.[hc], emul_generic.[hc], emul_netbsd.[hc]: replace
1025 system.[hc]. Start of suport for multiple emulations and
1026 emulation state (os_emul object).
1028 * emul_generic.[hc]: Start of code to implement proper system call
1031 Sun Oct 22 21:33:51 1995 Andrew Cagney <cagney@highland.com.au>
1033 * cpu.h, cpu.c (cpu_init): New function, zero the registers before
1034 the processor is started. Fixes problem of registers being
1035 undefined when restarting from within gdb.
1037 * cpu.h, cpu.c (cpu_flush_icache): New function, flushes the
1038 instruction cache (if present). Fixes problem of cpu caching gdb
1039 breakpoint instructions.
1041 FIXME: PSIM sometimes aborts calling error(), it should instead
1042 call sim_error() say which takes care of housekeeping such as
1043 saving the CIA before calling error.
1045 * NOTE: cpu_flush_cache() instead of cpu_synchronize_context() is
1046 used when restarting a simulation because the latter has the
1047 unwanted side effect (well I as a kernel hacker think it is) of
1048 performing an isync when the instruction stream doesn't contain
1051 Sun Oct 22 19:27:48 1995 Andrew Cagney <cagney@highland.com.au>
1053 * mon.h (new), mon.c (new), std-config.h (WITH_MON): Performance
1054 monitoring module. Counts both instructions issued and
1057 * NOTE: mon does not contain to count instruction loads as this
1058 information is already available from the mon_issue() hook.
1060 * FIXME: mon doesn't have access to register usage information.
1061 This is needed if the user wants to monitor things like register
1064 * igen.c (lf_print_c_semantic), vm_n.h: Add counting code.
1066 * psim.h, psim.c (psim_create), cpu.h, cpu.c (cpu_create): Attach
1067 a common monitor to each of the cpus. Delete
1068 cpu_increment_number_of_insns() and cpu_get_number_of_insns()
1069 replaced by copied code in mon.[hc].
1071 Sun Oct 22 18:42:45 1995 Andrew Cagney <cagney@highland.com.au>
1073 * sim_calls.c, main.c, psim.c (psim_create): always create
1074 `WITH_SMP' cpus. The actual number of CPU's active in a
1075 simulation run is taken from the device node: /init/smp (an
1076 integer). WITH_SMP changed to 2 (remember to put it back to 0).
1078 Fri Oct 20 17:26:54 1995 Andrew Cagney <cagney@highland.com.au>
1080 * system.c: More system call emulation. If code appears NetBSD
1081 specific, make conditional to being compiled on a NetBSD system
1084 Wed Oct 18 23:02:20 1995 Andrew Cagney <cagney@highland.com.au>
1086 * Makefile.in, gen.c(delete), igen.c(new), dgen.c(new),
1087 lf.[ch](new), table.[ch](new): Split into two generators - igen
1088 that outputs the instruction tables and dgen that outputs the spr
1089 tables. Add -f (filter out) flag to igen to filter out certain
1090 instructions (ex 64 bit ones) from the created tables. Include
1091 $(LIBIBERTY_LIB) in link options in case host lacks some libc
1094 * NOTE: igen, since it was originally written for the
1095 PowerPC/RS6000, things the MSB is 0 and the LSB is 63{31}.
1097 * Makefile.in, std-config.h, ppc-cache-rules(new),
1098 ppc-opcode-complex(new), ppc-opcode-simple(new): (for igen) Create
1099 cache-rule and opcode-rule tables from macros found std-config.h.
1100 Delete corresponding macro's from std-config.h.
1102 * FIXME: under this new igen scheme, when playing around with igen
1103 options, you'll find that depenencies don't work very well.
1105 * igen.c (gen_itable_c, gen_itable_h), Makefile.in: code to output
1106 an table of all the instructions. Code to output a type
1107 enumerating all the instructin names.
1109 * igen.c(lf_print_c_semantic): Move call to increment instruction
1110 counter so that it occures _after_ the instruction has been fully
1111 validated, was double counting illegal/invalid instructions. Add
1112 conditional so only compiled in when WITH_PROFILE enabled (enabled
1115 * igen.c, cpu.h, cpu.c(cpu_increment_number_of_insns): Include
1116 itable.h, count individual instruction types not just total,
1117 adjust reporting functions to output this.
1119 * ppc-instructions (64 bit Load Doubleword with Update Indexed):
1120 Had 32./ instead of 31./
1122 * ppc-instructions (64 bit Store Double Word Conditional Indexed):
1123 bitrot - updated to use newer CR register operators.
1125 * ppc-instructions (64bit Floating Convert from Integer
1126 Doubleword): Correct call to Round_Float().
1128 Mon Oct 16 00:31:20 1995 Andrew Cagney <cagney@highland.com.au>
1130 * basics.h: #include "sim_callbacks.h" earlier so that its
1131 prototypes are declared in all other header files.
1133 * bits.h, bits.c, idecode_expression.h (ROTL32, ROTL64): Update
1134 doc in bits.h, remove dead code in bits.c, move ROTL32/ROTL64 into
1137 * FIXME: the bits.h/bits.c macro's should be replaced with
1138 (inline) c functions.
1140 * cpu.c(cpu_add_commas), device_tree.h, device_tree.c(scand_*):
1141 Add size of buffer argument to functions writing a string into a
1142 buffer. Check for buffer overflow.
1144 Sun Oct 15 22:16:11 1995 Andrew Cagney <cagney@highland.com.au>
1146 * devices.h, devices.c, debug.h, debug.c: add macro's for tracing
1147 of each device. Make parameter names consistent so macros work.
1148 Use macro's in device functions.
1150 * device_tree.c, devices.h, devices.c: include path to device in a
1151 devices node when creating it.
1153 * device_tree.c, debug.h, debug.c: Add tracing of `device-tree'.
1155 * core.c: add tracing of core-device, adjust parameter names in
1156 core functions to be consistent with those in devices*.
1158 Sun Oct 15 20:33:20 1995 Andrew Cagney <cagney@highland.com.au>
1160 * debug.h, debug.c (trace_option): New function. Parses the trace
1161 option, updating the trace array.
1163 * debug.h, debug.c (trace_usage): New function. Outputs the list
1164 of all possible trace options.
1166 * sim_calls.c (sim_open), main.c (main): Use new trace_option() to
1167 parse trace options specified with the simpler -t flag. Adjust
1170 * FIXME: basic parsing of command line options is still duplicated
1171 by main.c and sim_calls.c
1173 Thu Oct 26 10:42:28 1995 Michael Meissner <meissner@tiktok.cygnus.com>
1175 * Makefile.in (clean): Delete *.i and *.out files.
1177 * ppc-endian.c (SWAP_n): Add SET argument to allow use of SWAP
1178 macros for either assignment or return. Fix SWAP_8 to use a
1179 union, and two SWAP_4's. Delete SWAP_N, since nobody uses it now.
1180 (ENDIAN_N): Add SET argument to SWAP_n calls. Delete macro defs
1181 that hardwired swapping on/off, let optimizer delete dead code.
1183 * main.c (main): Add printf that we caught a signal and print out
1184 the failing address.
1186 Thu Oct 19 21:43:39 1995 Fred Fish <fnf@fishfood.amigalib.com>
1188 * Makefile.in: Remove tabs from otherwise empty line.
1189 Confuses many non-GNU versions of "make".
1191 Wed Oct 18 08:51:25 1995 Michael Meissner <meissner@tiktok.cygnus.com>
1193 * Makefile.in (clean): Delete files produced by gen.
1195 Mon Oct 16 17:34:24 1995 Michael Meissner <meissner@tiktok.cygnus.com>
1197 * gen.c (lf_print_c_semantic_function): Move counting # of
1198 instructions here so it works with caching.
1199 (gen_idecode_c): Move from here.
1201 Wed Oct 11 17:13:15 1995 Andrew Cagney <cagney@highland.com.au>
1203 * gen.c, ppc-instructions, psim.c: Fix code for generating
1204 cracking instruction cache. Delete the code that cached just the
1205 result from doing an instruction lookup - this ran slower than no
1208 Fri Oct 13 09:58:43 1995 Michael Meissner <meissner@tiktok.cygnus.com>
1210 * Makefile.in (gen.o): Include $(INLINE_CFLAGS).
1212 * debug.h (ppc_trace): Rename from trace, to avoid a conflict with
1213 TCL when gdb is linked with the simulator.
1214 * debug.c (ppc_trace): Ditto.
1215 * sim_calls.c (sim_open): Change trace -> ppc_trace.
1216 * main.c (main): Ditto.
1218 * cpu.c (cpu_add_commas): Remove extra static.
1220 Thu Oct 12 11:35:53 1995 Michael Meissner <meissner@tiktok.cygnus.com>
1222 * Makefile.in (psim.o): Now that inlines are turned on, make
1223 psim.o depend on all sources.
1225 * cpu.c (cpu_add_commas): New function to format a long with
1227 (cpu_print_info): Use it to print number_of_insns.
1229 * ppc-endian.c (SWAP_n): New macros to speed up byte swapping for
1231 (ENDIAN_N): If both target and host byte orders are known, don't
1232 bother testing CURRENT_{TARGET,HOST}_BYTE_ORDER.
1234 * ppc-endian.h (target specific H2T_n/T2H_n macros): Remove #if 0
1235 to allow target specific H2T_n/T2H_n macros to be used.
1236 (htonl, ntohl): If compiled on a 486 by GCC and WITH_BSWAP is
1237 non-zero, redefine the htonl/ntohl macros to use the BSWAP instead
1238 of the 3 instruction sequence that runs on 386s.
1240 * std-config.h (WITH_{HOST,TARGET}_BYTE_ORDER): Don't override if
1241 specified on the compile line.
1242 (WITH_BSWAP): If not defined, define as 0.
1244 * Makefile.in (INLINE_CFLAGS): Add -DDEFAULT_INLINE=2 to add
1245 default inline support. Pass INLINE_CFLAGS when compiling.
1247 * devices.{h,c} (unimp_device_ioctl): Use STATIC_DEVICES, not
1248 INLINE_DEVICES since GCC doesn't like inline functions that
1249 accept variable arguments.
1250 (stack_ioctl_callback): Make function just static because GCC
1251 doesn't like inline functions that accept variable arguments.
1253 * devices.h (STATIC_DEVICES): Define as empty if not defined.
1255 * inline.c: Correct pathnames of included C files to match current
1258 * inline.h (STATIC_DEVICES): If DEVICES_INLINE is defined to be
1259 non-zero, define STATIC_DEVICES to be static.
1261 * std-config.h (INLINE): If GNU C and optimizing, define this as
1263 (DEFAULT_INLINE): If not defined, define as 0.
1264 (ENDIAN_INLINE): If not defined, define as DEFAULT_INLINE.
1265 ({CORE,VM,CPU,EVENTS,REGISTERS,INTERRUPTS}_INLINE): Ditto.
1266 ({SPREG,IDECODE}_INLINE): Ditto.
1268 Wed Oct 11 17:13:15 1995 Andrew Cagney <cagney@highland.com.au>
1270 * ppc-instructions: Initial cut of floating point suport added.
1271 Of note include - use of host IEEE floating point instructions,
1272 use of PowerPC manual pseudo code to handle the FPSCR. It is not
1273 currently a pretty sight.
1275 * memory_map.h, memory_map.c, memory_map_n.h, core.h, core.c:
1276 merge into core.h, core.c, core_n.h. The type memory_map replaced
1277 with core_map. This removes a level of pointer indirection when
1278 translating an address.
1280 * memory_map.h, memory_map.c, memory_map_n.h: delete.
1282 * Makefile.in et.al (sorry): tweek to use new core, core_map and
1285 Wed Oct 11 12:10:26 1995 Andrew Cagney <cagney@highland.com.au>
1287 * sim_calls.c, main.c: Add -g (trace_gdb) option, add tracing to
1288 most of the other functions in sim_calls.c.
1290 * basics.h (CONCAT3), memory_map.c, memory_map_n.h, Makefile.in:
1291 Add macros to better cover up `generic' code. Makes it possible
1292 to step through the generic code!
1294 * vm.c, vm_n.h, Makefile.in: ditto
1296 Tue Oct 10 15:42:59 1995 Andrew Cagney <cagney@highland.com.au>
1298 * devices.h, devices.c, memory_map.h, memory_map.c: Changed
1299 callback interface so that there is a read/write buffer but no
1300 read/write_word. VEA default memory read/write handler sometimes
1301 couldn't resolve an access and of those some were for a memory
1302 fault and some were because gdb was making a bogus request.
1304 * devices.h, devices.c, memory_map.h, memory_map.c, vm.h, vm.c:
1305 eliminate transfer_mode (raw or cooked) parameter from read/write
1308 Fri Oct 6 20:23:56 1995 Andrew Cagney <cagney@highland.com.au>
1310 * ppc-instructions (fmul, fmuls): correct instruction format - had
1313 Wed Oct 4 17:31:12 1995 Andrew Cagney <cagney@highland.com.au>
1315 * psim.c, device_tree.h, device_tree.c, devices.c (printd_*,
1316 scand_*): new functions to parse/print fields in device names
1317 while hiding any machine dependency.
1319 * devices.c, psim.c: Change the stack init code so that it is
1320 handled by a device. Arguments passed across using a device ioctl
1323 * devices.h, devices.c: device ioctl callback changed to allow a
1324 variable number of arguments. This gives greater flexability and
1325 greater chance of bugs.
1327 Tue Oct 3 22:01:56 1995 Andrew Cagney <cagney@highland.com.au>
1329 * main.c (printf_filtered, error): Missing va_end() to close off
1330 variable argument use.
1332 * Makefile.in (tmp-gencode): comment out hack to get around some
1333 versions of make not handling files being created as side-effects.
1335 * gen.c (lf_open): Add -n (real_file_name) option. Specifies an
1336 alternative file name to use in output files for things like #line
1339 Makefile.in (tmp-gencode): Use gen -n so that debug info is
1342 * Makefile.in (TARGETLIB): Use this instead of libsim.a in the
1345 Sat Oct 7 22:40:59 1995 Michael Meissner <meissner@tiktok.cygnus.com>
1347 * sim_calls.c (sim_set_callbacks): Define new function.
1349 Fri Oct 6 17:23:10 1995 Michael Meissner <meissner@tiktok.cygnus.com>
1351 * psim.c (psim_print_info): Print exit status or signal number.
1353 Mon Oct 2 11:46:37 1995 Michael Meissner <meissner@tiktok.cygnus.com>
1355 * cpu.c (struct _cpu): Add number_of_insns field to trace how many
1356 instructions are executed.
1357 (cpu_increment_number_of_insns): New function to increment the
1358 number of instructions issued.
1359 (cpu_get_number_of_insns): New function to return the number of
1360 instructions issued.
1361 (cpu_print_info): New function to print cpu related information.
1362 At present, print the number of instructions executed.
1364 * gen_idecode_c: Emit call to cpu_increment_number_of_insns within
1367 * psim.c (psim_print_info): New function to iterate over each of
1368 the CPU's calling cpu_print_info.
1370 * psim.h,cpu.h: Add new declarations.
1372 * sim_calls.c (sim_open): Add argument processing to add the same
1373 switches main.c accepts for the standalone processor.
1374 (sim_close): Call psim_print_info if -I.
1376 * main.c (main): Add comment saying to update sim_calls.c when
1377 adding switches. Add -I to call psim_print_info when done.
1378 (usage): Update usage message.
1380 Sun Oct 1 13:52:59 1995 Michael Meissner <meissner@tiktok.cygnus.com>
1382 * main.c (printf_filtered): Correct to match new prototype.
1384 Sat Sep 30 20:47:05 1995 Michael Meissner <meissner@tiktok.cygnus.com>
1386 * sim_callbacks.h (printf_filtered): Correct prototype.
1388 Thu Sep 21 16:26:49 1995 Michael Meissner <meissner@tiktok.cygnus.com>
1390 * device_tree.c (OEA_MEMORY_SIZE): Define if not defined to
1392 (clayton_memory_size): Define as OEA_MEMORY_SIZE.
1394 * std-config.h (WITH_TRACE): Default to 1 now.
1396 * psim.c (write_stack_arguments): Don't write any stack arguments
1399 * main.c (main): Switch to using getopt. Make -p also set
1400 trace_semantics. Make -a turn on all trace flags. Make -C turn
1403 * device_tree.c (create_option_device_node): Assume a program is
1404 OEA if the start address is < 4096, not just == 0.
1406 Wed Sep 20 13:36:06 1995 Ian Lance Taylor <ian@cygnus.com>
1408 * Makefile.in (maintainer-clean): New synonym for realclean.
1410 Sun Sep 10 10:23:56 1995 Michael Tiemann <tiemann@axon.cygnus.com>
1412 * registers.c (register_description): Add gdb synonyms for cr
1415 Fri Sep 8 13:16:10 1995 Ian Lance Taylor <ian@cygnus.com>
1417 * Makefile.in (install): Don't install in $(tooldir).
1419 * configure.in: Call AC_CONFIG_HEADER. Don't try to use
1420 bfd/hosts/*.h file or bfd/config/*.mh file. Call AC_PROG_CC and
1421 AC_PROG_RANLIB. Substitute in values for CFLAGS, HDEFINES, AR,
1422 and CC_FOR_BUILD. Call AC_CHECK_HEADERS for various header files.
1423 Touch stamp.h if creating config.h.
1424 * configure: Rebuild.
1425 * config.in: New file, created by autoheader.
1426 * Makefile.in (AR): Define as @AR@.
1427 (CC): New variable, defined as @CC@.
1428 (CFLAGS): Define as @CFLAGS@.
1429 (CC_FOR_BUILD): New variable, defined as @CC_FOR_BUILD@.
1430 (RANLIB): Define as @RANLIB@.
1431 (HDEFINES, TDEFINES): New variables.
1432 (@host_makefile_frag@): Remove.
1433 (mostlyclean): Make the same as clean, not distclean.
1434 (clean): Remove config.log.
1435 (distclean): Remove config.h and stamp-h.
1436 (Makefile): Don't depend upon @frags@. Just rebuild Makefile when
1437 invoking config.status.
1438 (config.h, stamp-h): New targets.
1439 (gen, gen.o): Build with CC_FOR_BUILD, not CC.
1440 (ppc-config.h): Rename from old config.h build.
1441 * (basics.h,gen.c,ppc-endian.c,psim.c): Include ppc-config.h.
1443 Fri Sep 8 09:51:03 1995 Michael Meissner <meissner@tiktok.cygnus.com>
1445 * configure{,.in}: Don't include sysdep.h from bfd, since bfd no
1447 * basics.h (sysdep.h): Don't include it.
1448 * Makefile.in (BASICS_H): Remove sysdep.h.
1450 Wed Sep 6 13:25:42 1995 Andrew Cagney <cagney@highland.com.au>
1452 * core.c (core_add_data): First growth of bss was being put at
1453 wrong address (0) instead of &end.
1455 * core.c (core_add_stack, core_add_data): Was not handling case
1456 where bss/stack is grown across the current end-of-{bss,stack}.
1458 Wed Sep 6 00:46:10 1995 Andrew Cagney <cagney@highland.com.au>
1460 * system.c (system_call): Fix SYS_break - was aligning bss to a
1461 page boundary instead of just an 8 byte one; On first call sbrk(0)
1464 Thu Aug 24 14:48:54 1995 Michael Meissner <meissner@tiktok.cygnus.com>
1466 * Makefile.in (install): Fix install rule.
1468 Tue Aug 22 09:31:18 1995 Michael Meissner <meissner@tiktok.cygnus.com>
1470 * system.c (system_call): Add read support.
1472 * main.c (main): -t sets trace_device_tree. Correct usage message
1475 * device_tree.c (update_memory_node_for_section): Make tracing
1476 output line up. If not code or readonly, assume that the section
1477 is a data section and has read/write permissions. Add readonly
1480 * core.c (create_core_from_addresses): Print end address in traces
1481 and make tracing output line up.
1483 * Makefile.in: Rewrite from Makefile to work with the Cygnus
1484 environment, and support compiling in a different directory than
1485 the sources reside in.
1487 * ppc-endian.h: Rename from endian.h so that it doesn't get
1488 confused with /usr/include/sys/endian.h on Linux. Add Linux
1491 * ppc-endian.c: Rename to be consistant with ppc-endian.h.
1492 Include ppc-endian.h, not endian.h.
1494 * basics.h (sysdep.h): Include sysdep.h that configure makes.
1495 Include ppc-endian.h, not endian.h.
1497 * std-config.h: Rename from ppc-config. Put #ifndefs around most
1498 configuration macros, so they can be overridden via CFLAGS. By
1499 default, turn off tracing.
1501 * configure.in: Clone from other simulator targets.
1502 * configure: Generate via autoconf from configure.in.
1504 Sat Aug 19 09:05:32 1995 Andrew Cagney <cagney@highland.com.au>
1506 * ppc-instructions: fix srawi (was geting XER[CA] real wrong).
1508 * interrupts.c (data_storage_interrupt): allow stack to grow by
1509 upto one MB per increment.
1511 * ppc-instructions: divw was computing rA / rA not rA / rB
1513 * main.c (main): really stupid. Wasn't exiting with correct status
1515 Fri Aug 18 00:38:01 1995 Andrew Cagney <cagney@highland.com.au>
1517 * system.c (system_call): add system calls kill(2) and getpid(2).
1519 * main.c (main): Check/return exit status when simulation
1522 Thu Aug 17 14:29:18 1995 Andrew Cagney <cagney@highland.com.au>
1524 * device_tree.c (create_option_device_node): Alignment rules (at
1525 least for the moment) now are for strict alignment only for LE OEA
1526 mode. (Because of compiler problems).
1528 * system.c (system_call) SYS_exit: Wasn't exiting with correct status.
1530 Thu Aug 17 01:16:38 1995 Andrew Cagney <cagney@highland.com.au>
1532 * vm.c (DEFINE_VM_DATA_MAP_WRITE_N): For miss aligned transfer
1535 * system.c (system_call): didn't page align break argument before
1536 determining increment break increment.
1538 * psim/ppc: Re-arange entire directory structure so that
1539 everything lives in the one directory. While a pain for cleaning,
1540 makes building across multiple architectures much simpler.
1542 * devices.c, device_tree.c: Added code that provides a simple
1543 illustration of how an interrupt control device could be
1546 * devices.c: Added code so that the dumb console device can read
1547 (from stdin) as well as write to stdout.