1 Fri Nov 24 11:24:34 1995 Michael Meissner <meissner@tiktok.cygnus.com>
3 * configure{,.in} (--enable-sim-icache): If argument is define,
4 add -R to flags passed to igen.
6 * igen.c (stdlib.h): Include if the system supplies one.
7 (semantics_use_cache_struct): New global for -R flag to say
8 semantics is to use the cache structure directly rather than
9 putting the values into local variables.
10 (first_undef, last_undef): New structures to remember names to
12 (lf_print_c_extraction): If -R and this is semantics, emit names
13 as #defines pointing to the cache structure, rather than loading
14 the values into local variables.
15 (lf_print_c_semantic_function): If -R, #undef all of the names
16 defined in lf_print_c_extraction.
19 * idecode_fields.h (SPR_*): Redefine spr_* macros as SPR_* to
20 avoid a name confict if -R passed to igen.
22 * ppc-instructions (mfspr, mtspr): Rename spr field to SPR.
23 (model_data): Add field to count the various # of CRs that the
24 mtcrf instruction used.
25 (model_mon_info): Return structures counting the # of CRs that the
26 mtcrf instruction used.
28 * mon.c (stdlib.h): Include if the system supplies one.
29 (mon_sort_instruction_names): New function to sort instruction
31 (mon_print_info): Call qsort with mon_sort_instruction_names to
32 sort instruction names.
34 * debug.h (ITRACE): Make printf_filtered arguments type correct.
35 * idecode_expression.h (CR0_COMPARE): Ditto.
36 * psim.c (psim_read_register): Ditto.
38 * igen.c (lf_print_my_prefix): Use __attribute__((__unused__)) to
39 silence compiler warnings about unused automatically generated
41 (lf_print_c_extraction): Ditto.
42 * idecode_expression.h (FPSCR_BEGIN): Ditto.
44 * ppc-cache-rules: Define rules for making a bitmask for all
47 * ppc-instructions: Rewrite model specific functions to use the
48 bitmask of the register number, instead of using the register
49 pointer to get the register number, and then making the bitmask.
51 Wed Nov 22 15:24:27 1995 Michael Meissner <meissner@tiktok.cygnus.com>
53 * ppc-instructions (model_branches): Add conditional argument to
54 count the number of times each type of conditional branch is used.
55 (conditional branches): Pass B0 or -1 to model_branches.
56 (model_mon_info): Print out conditional branch counts.
57 (model-data): Add support for printing out conditional branch
60 Tue Nov 21 16:31:25 1995 Michael Meissner <meissner@tiktok.cygnus.com>
62 * igen.c (insn_table_load_insns): Add support for model-static for
63 internal functions that should not be inlined.
64 (lf_print_c_semantic): Remove model_cleanup.
65 (gen_model_{c,h}): Ditto.
67 * ppc-instructions: Redo model specific support once again. Add
68 floating point support to the model specific information. Flesh
69 out all of the floating mutiply add/subtract instructions. Add
70 better tracing support to the model specific information.
72 Sun Nov 19 23:00:52 1995 Michael Meissner <meissner@tiktok.cygnus.com>
74 * ppc-instructions (model data, model_busy): Rather than using a
75 bit mask for the busy units, just use a char array. Also, only
76 support 2 function units an insn can use, rather than a loop.
78 Fri Nov 17 14:08:08 1995 Michael Meissner <meissner@tiktok.cygnus.com>
80 * table.c (table_entry_read): Move setting entry->line_nr to after
81 the model specific fields so the line numbers for the annex are
84 * cpu.c (cpu_{create,init,halt}): Check for WITH_MODEL_ISSUE
85 before calling the model functions.
87 * debug.c (trace_descriptor): Add trace_model support.
88 * debug.h (trace_options): Ditto.
90 * igen.c (gen_icache_h): Create type idecode_cache as void if not
92 (gen_model_{c,h}): Drop model_issue support. Add support for
94 (lf_print_my_prefix): Initialize a const itable_index with the
96 (lf_print_c_semantic): Call model_cleanup at the end of the
97 function to check for instructions that aren't supported yet by
100 * mon.h (count_type): New type for counters.
101 * mon.c: Use count_type instead of unsigned.
103 * ppc-instructions: Redo scheduling code once again. Make it all
104 inline friendly. Instead of having general code emitted by igen,
105 go the route of having each semantic routine call the appropriate
108 Thu Nov 16 09:52:26 1995 Michael Meissner <meissner@tiktok.cygnus.com>
110 * table.c (table_entry_read): Allow the annex to have blank lines.
112 * ppc-instructions: Change lines in model stuff that just have a
113 tab to just newline. Add 601 support. Document most instructions
114 in terms of model specific timing information. Drop 'FUNCTION'
115 from PPC_FUNCTION_UNIT_xxx enums. Change PPC_UNIT_UNKNOWN ->
116 PPC_UNIT_BAD. Add TRACE(trace_tbd) for all data cache
117 instruction.s. Signal illegal instruciton if data cache block
118 invalidate is issued from problem state.
120 * igen.c (max_model_fields_len): New static to keep track of the
121 max size for the model specific fields.
122 (model_c_insn): Use max_model_fields_len to size fields.
123 (insn_table_insert_insn): Set max_model_fields_len.
124 (model_table_insert): Ditto.
125 (gen_model_{c,h}): Model_issue is now called with a processor
128 * debug.c (trace_description): Add support for trace_tbd.
130 * mon.c (mon_issue): Pass processor argument to model_issue.
132 * Makefile.in: Delete all function unit support, since the newer
133 table driven model support replaces it.
136 * inline.{c,h}: Ditto.
137 * std-config.h: Ditto.
139 * configure{,.in}: Ditto.
140 * Makefile.in: Ditto.
142 * function_unit.{c,h}: Delete these now usused files.
144 * std-config.h (WITH_MODEL_ISSUE): Add new macro on whether to
145 trace instructions in a model specific manor.
146 * options.c (print_options): Print it out.
147 * configure{,.in}: Add --enable-sim-model-issue option.
148 * Makefile.in: Add --enable-sim-model-issue flags.
149 * igen.c (lf_print_c_semantic): Add call to mon_issue here. Check
150 for WITH_MODEL_ISSUE.
151 * mon.c (mon_issue): Remove call to mon_issue_here.
153 * ppc-instructions: Move branch tracing to the actual branch
154 instructions, rather than testing it in model_issue. Add code to
155 code successful/unsuccessful branch predictions, and the number of
156 conditional branches that fell through.
158 Wed Nov 15 17:32:13 1995 Michael Meissner <meissner@tiktok.cygnus.com>
160 * cpu.h (cpu_model): Add declaration.
162 * cpu.c (struct _cpu): Add model_ptr to hold model specific
164 (cpu_model): Return the model internal pointer.
165 (cpu_{create,init,halt}): Call the appropriate model function.
167 * inline.c (mon.c): Move include of mon.c after model.c.
169 * mon.c (_cpu_mon): Add fields to count unaligned memory
171 (mon_issue): Call model_issue, not function_unit_issue.
172 (mon_{read,write}): Count # of unaligned memory accesses.
173 (mon_print_info): Switch to calling model_mon_info and
174 model_mon_info_free instead of function_unit version. Print out
175 number of unaligned reads/writes.
177 * {ppc-instructions,igen.c}: More global changes to add model
180 * inline.{c,h}: Provide for inlining options.c.
181 * options.{c,h}: Ditto.
182 * std-config.h: Add OPTIONS_INLINE.
184 Tue Nov 14 04:47:25 1995 Michael Meissner <meissner@tiktok.cygnus.com>
186 * Makefile.in (devices.o, main.o): Update dependency.
188 * igen.c (gen_model_h): Use correct variable in loop.
189 (gen_model_c): Use strcmp, strcasecmp.
190 (gen_model_c): Use EXTERN_MODEL for arrays.
191 (gen_model_h): Use STATIC_MODEL for arrays.
192 (lf_print_c_semantic_function_header): Delete unused function.
194 * main.c (cpu.h): Include cpu.h to get model.h.
196 * inline.h ({EXTERN,STATIC}_MODEL): Define.
198 Mon Nov 13 09:14:13 1995 Michael Meissner <meissner@tiktok.cygnus.com>
200 * igen.c ({insn,model}_table_fields): Spell mnemonic correctly.
201 (gen_itable_h,itable_c_insn): Ditto.
202 (model support): Move model support around, add support for
203 model-data, model-internal. Use annex field for model-macros
206 * configure.in (--enable-sim-inline): If --enable-sim-inline=no,
207 also define INLINE as nothing.
208 * configure: Regenerate.
210 * std-config.h (INLINE): Rather than nuking INLINE, only define it
211 as __inline__ if any of the INLINE flags are non-zero.
213 * options.c (print_options): Print out WITH_XOR_ENDAIN.
215 Mon Nov 13 23:03:45 1995 Andrew Cagney <cagneyhighland.com.au>
217 * ppc-instructions (rfi): Add missing code.
219 * cpu.c (cpu_get_time_base): Fix calculation of current value of
222 * ppc-spr-table (TBL, TBU): Fix TBL/TBU entries - was confusing
223 m[tf]tb with m[tf]spr.
225 * ppc-instructions (mtspr, mfspr): Fix mttbl - wasn't storing
228 Mon Nov 13 21:35:37 1995 Andrew Cagney <cagneyhighland.com.au>
230 * std-config.h (INLINE, STATIC_INLINE): Was being set to static
231 inline.. Only problem being that with ppc-opcode-simple this gave
232 it the chance to inline all the idecode functions with potentially
233 disasterous results on a 16mb PC. For moment hobble INLINE.
235 * configure.in, std-config.h (WITH_SMP): Make that 5 processors by
238 * configure.in: Tweek flags passed to gcc for --with-sim-warnings.
239 Firstly make them errors and secondly remove the options gcc-245
242 Mon Nov 13 17:57:24 1995 Andrew Cagney <cagney@highland.com.au>
244 * misc.c (zalloc), cpu.c (cpu_init), devices
245 (console_io_read_buffer_callback, icu_io_read_buffer_callback,
246 vm_io_read_buffer_callback), main.c (zalloc), mon.c (memset),
247 sim_calls.c (zalloc) : replace bzero() with memset().
249 * emul_netbsd.c (write_direntries), psim.c (psim_read_register,
250 psim_write_register): replace bcopy() with memcpy().
252 Sun Nov 12 20:55:41 1995 Andrew Cagney <cagneyhighland.com.au>
254 * configure.in: for --disable-sim-inline (--enable-sim-inline=no),
255 force DEFAULT_INLINE to 0 rather then trusting the std
258 Sun Nov 12 20:55:41 1995 Andrew Cagney <cagneyhighland.com.au>
260 * igen.c (lf_print_idecode_table, idecode_table_leaf): Fix
261 generation of switch entries in tables - treat the same as
262 cracking/semantic functions.
264 * igen.c (idecode_switch_end, idecode_switch_leaf): Fix generation
265 of a boolean switch statement (field zero or non-zero).
267 * ppc-opcode-test-1, ppc-opcode-test-2: New files. These test the
268 switch/table generation ability of igen.
270 * igen.c (idecode_switch_leaf): Fix code output when a switch
271 statement needs to look up a table.
273 * igen.c (idecode_declare_if_switch): New function called from
274 gen_idecode_c - need to declare any idecode switch functions
275 before they are used in idecode tables.
277 * igen.c (lf_print_c_cracker_function, idecode_crack_leaf,
278 idecode_crack_insn): Add is_inline_function argument to code
279 printing cracker functions which indicates if STATIC_IDECODE or
280 STATIC_INLINE_IDECODE should be used for definition. For
281 idecode_crack_insn (which implies not duplicating/expanding) don't
282 declare function as inline - we assume that the only time this is
283 code is generated is when things are being tested. For
284 idecode_crack_leaf, make static (instead of INLINE) if the
285 instructions parent is a table as function will always be called
288 * igen.c (idecode_expand_if_switch): Declare as STATIC_IDECODE not
289 STATIC_INLINE_IDECODE. Only the outermost idecode switch will be
290 called directly, all others are called via a table.
292 * igen.c (lf_print_semantic_function_header, semantics_h_leaf,
293 semantics_h_insn, semantics_h_function,
294 lf_print_c_semantic_function, semantics_c_function): Add
295 is_inline_function argument to lf_print_semantic_function_header
296 to indicate if an inline or static function declaration/definition
297 should be output. Depending on situtation call accordingly:
298 functions (not instruction semantic routines) are always inline;
299 Semantic routines are made inline when there is no icache (cache
300 will contain the function address) and are duplicating (see above)
301 and the parent of the instruction is a switch statement.
303 * igen.c (opcode_field_new): Delete. Code changed to use ZALLOC
304 and moved to insn_table_find_opcode_field.
306 * table.c (table_open): Fix typo (nr_model_fields vs nr_fields).
308 * igen.c (model_c_insn): Suggestion - document the name of the
309 instruction on each line of the instruction model table.
311 Fri Nov 10 00:44:38 1995 Andrew Cagney <cagneyhighland.com.au>
313 * emul_netbsd.c (do_ioctl): Cleanup compilation.
315 * sim_callbacks.h (__attribute__): Only define if not defined (was
316 already defined on NetBSD host).
318 Wed Nov 8 21:49:52 1995 Andrew Cagney <cagneyhighland.com.au>
320 * std-config.h (WITH_XOR_ENDIAN), configure.in, Makefile.in: New
321 macro, indicates if the PowerPC's horrible XOR endian mode should
322 be suported. Add to configure and make.
324 * vm_n.h (vm_data_map_read_N, vm_data_map_write_N), vm.c
325 (vm_instruction_map_read): If XOR endian, xor the address
326 with a value from an xor table (indexed by size of access).
328 * vm.c (vm_synchronize_context), cpu.c (cpu_synchronize_context):
329 set up xor table to xor if there is a conflict between the
330 CURRENT_TARGET_ENDIAN and the endian indicated in the MSR. Move
331 check of suported change of endian mode from cpu.c to vm.c.
333 * vm.c (vm_data_map_write_buffer, vm_data_map_read_buffer):
334 Hopefully added correct hack to handle XOR endian mode.
336 FIXME: If NONSTRICT alignment and XOR ENDIAN and MSR indicates
337 little endian mode, the model accepts miss aligned transfers.
339 FIXME: Need to create an `init' device that, during
340 initializatioin for XOR mode, it mushes (XOR address) all the dma
341 data before passing it on to the core for storage. Just like the
344 Wed Nov 8 21:49:52 1995 Andrew Cagney <cagneyhighland.com.au>
346 * devices.c (halt_io_write_buffer_callback): Use value written to
347 halt device to determine exit status. Thus allowing
348 success/failure of OEA tests.
350 Wed Nov 8 00:10:38 1995 Andrew Cagney <cagneyhighland.com.au>
352 * ppc-instructions (icbi): If icache present flush it.
354 Tue Nov 7 23:36:31 1995 Andrew Cagney <cagneyhighland.com.au>
356 * devices.c (htab_init_callback): Add code to create htab/pte.
358 * devices.c (dma_file, file_init_callback, htab_init_callback):
359 New function - Dma the named file into memory at the specified
362 * device_tree.h, device_tree.c (scand_*): New functions.
364 Tue Nov 7 23:36:31 1995 Andrew Cagney <cagneyhighland.com.au>
366 * filter_filename.c, Makefile.in: Change so that only dependant on
367 a very limited nr of files. Stops an unnecessary dependency.
369 Tue Nov 7 15:44:33 1995 Andrew Cagney <cagney@highland.com.au>
371 * core.c (core_map_find_mapping): Use cpu_halt rather than error
372 to abort an access to an undefined address.
374 Sun Nov 12 07:58:09 1995 Michael Meissner <meissner@tiktok.cygnus.com>
376 * igen.c (model_table_insert_{macro,function}): New functions.
377 (insn_table_load_insns): Call them.
378 (gen_model_h): Move section emiting model-macros to be first.
379 (model_{c,h}_function): New functions cloned from semantic
380 functions to print out the prototype and function for
382 (gen_model_{c,h}): Print out model-functions.
384 * ppc-instructions (model_{start,halt,print_info}): Add dummy
387 * options.c (print_options): Print out WITH_{,DEFAULT_}MODEL, not
388 WITH_PPC_{,DEFAULT_}_MODEL.
389 (options_ppc): Delete now unused function.
390 (cpu.h): Include cpu.h, not just basics.h.
392 * std-config.h (WITH_{,DEFAULT_}MODEL): Define.
394 * igen.c (model_macros, last_model_macro): New statics to keep
395 track of macros to go in model.h.
396 (insn_table_load_insns): Add model-macros to model_macros linked
398 (model_table_fields): Add field for printable name.
399 (gen_model_h): If there are model macros defined, print them out.
400 Print out DEFAULT_MODEL as the first model if there any models
401 specified, otherwise MODEL_NONE. Print out external decl for
402 current_model. Print out decl for model_set.
403 (gen_model_c): Add function model_set. Switch to use printable
404 name for the model, not the internal identifier used.
406 * psim.c (current_model): New global variable.
408 * ppc-instructions: Add macros for flag defines. Switch first
409 model so 604 is first.
411 * main.c (main): Call model_set, not function_unit_model.
412 * sim_calls.c (sim_open): Ditto.
413 * sim_calls.c, Makefile.in: sim_calls.c now includes cpu.h.
415 Sat Nov 11 07:27:41 1995 Michael Meissner <meissner@tiktok.cygnus.com>
417 * mon.h (mon_events): New enumeration for other events we want to
419 (mon_event): Add declaration for function.
421 * mon.c (mon_event): New function.
422 (mon_print_info): Print icache misses.
424 * psim.c (run_until_stop): Monitor icache misses.
426 * configure.in (--enable-sim-inline): Fix typos in handling comma
427 separated inline options.
428 (--enable-sim-icache): Echo icache size.
429 * configure: Regenerate.
431 * igen.c (semantics_h_print_function): Emit STATIC_SEMANTICS
432 instead of INLINE_SEMANTICS so that the compiler won't keep all of
433 the semantic functions as inline RTL, given that the address of
434 the function is taken which forces outline calls anyway.
435 (lf_print_c_semantic_function_header): Ditto.
436 (gen_semantics_h): Define STATIC_SEMANTICS as nothing if not
438 (lf_print_c_cracker_function): Emit STATIC_IDECODE instead of
439 STATIC_INLINE_IDECODE.
440 (gen_idecode_c): Define STATIC_IDECODE if not defined.
441 (gen_model_h): Use #ifdefs to define types to hold model units,
443 (model_table_insert): Add a sentinel functional unit at the end to
444 simplify loop processing.
445 (model_c_insn): Use <function-unit>_SENTINAL instead of 0 for any
446 instruction not specifing a function unit for the current model.
447 (gen_model_{c,h}): Provide bounds for model_time_mapping.
449 * inline.h (STATIC_SEMANTICS): Define to be static if
450 SEMANTICS_INLINE is defined.
451 (STATIC_IDECODE): Define to be static if IDECODE_INLINE is
454 * options.c (print_options): Fix typo.
456 Fri Nov 10 06:39:46 1995 Michael Meissner <meissner@tiktok.cygnus.com>
458 * configure.in (--enable-sim-{opcode,config}): Use $srcdir when
459 check for the existence of files.
460 * configure: Regenerate.
462 * table.c (table): New field nr_model_fields.
463 (table_open): New parameter nr_model_fields.
464 (table_entry_read): Parse model fields that begin with a '*' after
466 * igen.c, dgen.c: Change callers of table_open.
468 * igen.c: Add support for dumping model specific information in
470 (insn_field_name): Delete unused array.
471 (global variables): Make global variables static, so we can tell
472 when they are no longer used.
473 (cache_semantic_actual): Delete unused variable.
474 (insn_table_load_insns): If the insn is really a machine model,
475 call model_table_insert instead of other processing.
476 (model_table_insert): New function to handle defining the
477 functional units of a particular machine model.
478 (insn_table): Add last_function field so we can add functions at
480 (insn_table_insert_function): Use last_function field when
481 appending new function.
483 * ppc-instructions: Add a few model specific information for 603,
484 603e, and 604 for testing purposes.
486 * table.h (table_model_entry): New linked list to hold model
487 specific information, one per line.
488 (table_entry): Add model_first, model_last fields.
490 * configure.in (--enable-sim-inline): If gcc is found and
491 --enable-sim-inline is not specified, defaine DEFAULT_INLINE to 1,
493 (--enable-sim-reserved-bits): New switch to check whether reserved
494 bits are set in the instruction.
495 (--enable-sim-opcode): Make complex the default.
496 (all switches): Add appropriate checks and error messages.
497 * configure: Regenerate.
499 * Makefile.in (RESERVED_CFLAGS): New variable set by
500 --enable-sim-reserved-bits.
501 (CONFIG_CFLAGS): Include RESERVED_CFLAGS.
502 (BUILT_SRC): igen now generates model.c and model.h.
503 (LIB_OBJ): Include table.o.
504 (tmp-igen): Add -m/-M options to write model.c/model.h.
505 (model.o): New object.
506 (CPU_H): Include model.h.
508 * cpu.h: Include model.h.
510 * std-config.h (WITH_RESERVED_BITS): Define.
511 (MODEL_INLINE): Ditto.
513 * options.c (print_options): Print out WITH_RESERVED_BITS.
515 Thu Nov 9 12:22:15 1995 Michael Meissner <meissner@tiktok.cygnus.com>
517 * configure.in: If --silent, don't output information messages.
518 * configure: Regenerate.
520 * configure.in (--enable-sim-alignment): Fix typo in specifing non
522 (--enable-sim-switch): Make default on.
523 (--enable-sim-duplicate): Make default on.
524 (--enable-sim-smp): Make default 0.
525 (--enable-sim-mon): Don't set sim_float if not set.
526 (--enable-sim-inline): If gcc is found and --enable-sim-inline is
527 not specified, define DEFAULT_INLINE to be 2.
528 (all --enable-sim-* rules): Echo rules set to non empty to file
530 * configure: Regenerate.
532 * options.c (options_env): Fix typo if WITH_ENV is 0.
533 (print_options): Print GCC compiler version if available and
534 date/time options was compiled. If OPCODE_RULES, IGEN_FLAGS,
535 and/or DGEN_FLAGS are defined, print them.
537 * Makefile.in (all link actions): Pass SIM_CFLAGS as well as
539 (options.o): Compile options.o with OPCODE_RULES, IGEN_FLAGS, and
540 DGEN_FLAGS defined, so they can be printed out.
542 * igen.c (lf_print_c_validate): Check for WITH_ASSERT, so that
543 this test can be compiled away if the user really wants a fast
544 simulator by not doing assertion failures.
546 Wed Nov 8 13:19:47 1995 Michael Meissner <meissner@tiktok.cygnus.com>
548 * options.c: New file to print out all of the WITH_ options.
549 * options.h: New include file to declare print_options.
550 * debug.h (trace_options): Add trace_opts to call print_options.
551 * debug.c (trace_description): Add trace_opts support.
552 * main.c (main): If user requested options, print them.
553 * sim_calls.c (sim_open): Ditto.
555 * igen.c (opcode_field_new): Add void to make it a proper prototype.
557 * emul_generic.c (emul_enter_call): Make printf_filtered arguments
559 * emul_netbsd.c (do_kill): Ditto.
560 * registers.c (registers_dump): Ditto.
561 * vm.c (om_translate_effective_to_real): Ditto.
562 * vm_n.h (vm_data_map_read_N): Ditto.
563 (vm_data_map_write_N): Ditto.
564 * devices.h (DTRACE_INIT): Ditto.
565 (DTRACE_{ATTACH,DETACH}_ADDRESS): Ditto.
566 (DTRACE_IO_{READ,WRITE}_BUFFER): Ditto.
567 (DTRACE_DMA_{READ,WRITE}_BUFFER): Ditto.
568 * devices.c (update_for_binary_section): Ditto.
569 (write_stack_arguments): Ditto.
570 (stack_ioctl_callback): Ditto.
571 * device_tree.c (device_tree_add_passthrough): Ditto.
572 (device_tree_{add,find}_device): Ditto.
573 (device_tree_{add,find}_integer): Ditto.
574 (device_tree_find_{string,boolean}): Ditto.
575 (device_tree_init{,_device}): Ditto.
576 (device_tree_dump): Ditto.
577 * sim_calls.c (sim_{read,write}): Ditto.
578 (sim_{fetch,store}_register): Ditto.
579 (sim_stop_reason): Ditto.
581 * sim_callbacks.h (printf_filtered): Declare with attribute
582 printf, so we can enable format checks.
584 * devices.c (console_io_{read,write}_buffer_callback): Cast swtich
585 argument to int, since ANSI doesn't allow long switch values.
586 * emul_netbsd.c (do___sysctl): Ditto.
588 * emul_netbsd.c (do___sysctl): Fix up printf call.
590 * corefile.c (core_translate): Don't do arithmetic with void *
591 pointers. Cast to char * first.
593 * function_unit.c (FUNC_{LOAD,STORE}): Rename from {LOAD,STORE}
596 * Makefile.in ({FUNC,MODEL,WARNING}_CFLAGS): New flags set by
597 configure --enable switches.
598 (CONFIG_CFLAGS): Include FUNC_CFLAGS and MODE_CFLAGS.
599 (.c.o): Include WARNING_CFLAGS.
600 (CPU_H): Include function_unit.h.
601 (LIB_OBJ): Include function_unit.o.
602 (BUILT_SRC_WO_CONFIG): Split from BUILT_SRC and do not include
603 config.h or ppc-config.h.
604 (BUILT_SRC): Include BUILT_SRC_WO_CONFIG, config.h and
606 (filter_filename.o): Include config.h/ppc-config.h dependencies.
607 (idecode.o, semantics.o, psim.o): Specify CC line without
608 WARNING_CFLAGS so that we don't get all of the unused variable
609 warnings that are generated.
610 (function_unit.o): Add rule to build.
611 (main.o, sim_calls.o): Add function_unit.h, itable.h dependencies.
612 (mon.o): Include mon.c dependency.
613 (TAGS): Depend on BUILT_SRC.
614 (clean): Don't delete config.h or ppc-config.h
616 * basics.h (sim_callbacks.h): Move include after the include of
617 config.h and ppc-config.h.
619 * bits.{h,c} (ROTL32,ROTL64): Move these functions to bits.c. Add
620 support for BITS_INLINE to inline these. Add declarations to
623 * configure.in (--enable-sim-warnings): Add new option to specify
624 compiler warnings for all modules except idecode.o and semantics.o
625 which have lots of unused variables because they are machine
627 (--enable-sim-function-unit): New switch to configure whether
628 function unit support is compiled in or not.
629 (--enable-sim-{,default-}mode): New switches to control which cpu
631 * configure: Regenerate.
633 * corefile.c (core_attach_address_callback): Delete unused
634 variable device_address.
636 * cpu.c (struct _cpu): Add function unit pointer field func_unit.
637 (cpu_create): If WITH_FUNCTION_UNIT, call function_unit_create.
638 (cpu_init): If WITH_FUNCTION_UNIT, call function_unit_init.
639 (cpu_halt): If WITH_FUNCTION_UNIT, call function_unit_halt.
640 (cpu_function_unit): New function to return func_unit field.
642 * cpu.h (function_unit.h): Include new include file.
643 (cpu_function_unit): Declare.
645 * debug.c (stdlib.h): Test HAVE_STDLIB_H, not HAVE_STDLIB.
646 (config.h): Include config.h.
648 * devices.c (icu_io_write_buffer_callback): Delete unused variable
651 * emul_generic.c (emul_exit_call): Print out status value.
653 * emul_netbsd.c (do_read): Delete unused variable nr_moved.
655 * filter_filename.h (includes): Include config.h, ppc-config.h,
658 * inline.c: Include bits.c if BITS_INLINE. Include
659 function_unit.c if FUNCTION_UNIT_INLINE.
661 * inline.h (INLINE_BITS): Define if BITS_INLINE.
662 (INLINE_FUNCTION_UNIT): Define if FUNCTION_UNIT_INLINE.
664 * interrupts.c (instruction_storage_interrupt): Delete unused
667 * lf.h (config.h): Include config.h.
669 * main.c (includes): Include function_unit.c. If HAVE_UNISTD_H,
671 (usage): Update for -m model, -i, and -I options.
672 (main): Delete unused variables stack_pointer and i. Add support
673 for -i, -m model arguments. Call psim_print_info with verbose ==
674 1 if -i, and verbose == 2 if -I.
676 * mon.c (stdio.h): Include stdio.h to pick up sprintf prototype.
677 (mon_issue): Call function_unit_issue if function units are
679 (mon_print_info): Take psim * argument. Print out information
680 from function_unit if available. Move read/write stats to always
681 print, instead of printing if verbose > 1. Fix up plural
684 * mon.h (mon_print_info): Update prototype.
686 * psim.c (current_ppc_model): Add global variable.
687 (psim_print_info): Pass system argument to mon_print_info.
689 * sim_calls.c (function_unit.h): Include.
690 (sim_open): Add support for -i and -m model options. If -i call
691 psim_print_info with verbose == 1, if -I, with verbose == 2.
692 (sim_resume): Delete unused variable program_counter.
694 * std-config.h (WITH_FUNCTION_UNIT): Define.
695 (ppc_model): Add enumeration giving all PowerPC models currently
697 ({WITH,CURRENT}_PPC_MODEL): Define.
698 (FUNCTION_UNIT_INLINE): Define.
700 * table.c (config.h): Include config.h.
702 * vm.c (om_virtual_to_real): Print pte_word_{0,1} so the compiler
703 doesn't complain that they're unused.
705 * vm_n.h (vm_data_map_read_N): Delete unused variable rval.
707 Mon Nov 6 23:15:54 1995 Andrew Cagney <cagney@highland.com.au>
709 * sim-endian.c (ppc-endian.c), sim-endian.h (ppc-endian.h):
710 renameed. These files are target independant.
711 * Makefile.in, basics.h: update for new name.
713 * sim-endian.h (SWAP_N), sim-endian.c (_SWAP_1): Rename existing
714 SWAP_<N> to _SWAP_<N> so that sim-endian.h can contain SWAP_N
717 * sim-endian.c, sim-endian-n.h (new file): Move endian code into a
718 debugable header file.
720 * ppc-instructions (Byte-Reverse): Enable byte reverse
721 instructions using SWAP_N macros.
723 Mon Nov 6 10:39:28 1995 Michael Meissner <meissner@tiktok.cygnus.com>
725 * Makefile.in (config.status): Remove references to config.make
728 * config.{make,hdr}: Delete, no longer used.
731 Mon Nov 6 20:49:56 1995 Andrew Cagney <cagney@highland.com.au>
733 * sim_calls.c (sim_open): Fix parsing of `target sim' options.
735 * device_tree.c (device_tree_add_string): Wasn't saving the value
736 of the string being entered into the tree.
738 * psim.c (create_filed_device_tree): Not terminating string device
741 * psim.c (psim_create): Use `env' instead of
742 `environment-architecture' to be consistent with configure.
743 Reconize user/uea, virtual/vea and operating/oea.
745 Sat Nov 4 12:29:45 1995 Fred Fish <fnf@cygnus.com>
747 * core.c: Rename to corefile.c
748 * core.h: Rename to corefile.h
749 * inline.c: Include corefile.h, renamed from core.h.
750 * cpu.h: Include corefile.h, renamed from core.h
751 * vm.c: Include corefile.h, renamed from core.h
752 * corefile.c: Include corefile.h rather than core.h
753 * README.psim (KNOWN PROBLEMS): Change core.* references to corefile.*
755 * Makefile.in (CPU_H): Change core.h to corefile.h
756 (vm.o): Change dependency to corefile.h
757 (LIB_SRC): Change core.c to corefile.c.
758 (LIB_OBJ): Change core.o to corefile.o.
759 (corefile.o): Change dependencies to corefile.c, corefile.h.
761 Fri Nov 3 11:37:24 1995 Michael Meissner <meissner@tiktok.cygnus.com>
763 * ppc-instructions (data cache instructions): Make all data cache
764 instructions nops instead of invalid instructions.
766 * Makefile.in (CONFIG_CFLAGS): Add ALIGNMENT_CFLAGS and
767 TIMEBASE_CFLAGS which weren't included.
769 Thu Nov 2 08:54:04 1995 Michael Meissner <meissner@tiktok.cygnus.com>
771 * Makefile.in: Uncomment built file dependencies.
773 * configure.in: Rewrite --enable-sim switch handling to use the
774 autoconf builtins so it works correctly if the configure or
775 Makefile.in files are modified and make decides to rebuild
776 Makefile. Also document all of the --enable-sim switches
777 supported. Check whether getrusage and sys/resource.h are
779 * config.in: Regenerate.
780 * configure: Regenerate.
781 * Makefile.in: Add support for all of the variables set with
782 --enable-sim switches.
784 * Makefile.in (clean): make clean now removes all built sources as
787 * cpu.c: Use HAVE_STRING_H, HAVE_STRINGS_H, HAVE_UNISTD_H,
788 HAVE_TIME_H, HAVE_SYS_TIMES_H, HAVE_SYS_RESOURCE_H defined in
789 the generated config.h.
791 * device_tree.c: Ditto.
794 * emul_netbsd.c: Ditto.
799 * registers.c: Ditto.
804 * main.c (main): Call psim_print_info with verbose == 2.
806 * mon.c (mon_print_info): Align the cpu number and number of
807 instructions fields. Do not print an instruction category if the
808 CPU did not execute any of those instructions. Print out number
809 of reads and writes. If getrusage is supported, print out number
810 of simulated instructins per second.
812 * configure.in: Add support for --enable-sim-opcode=stupid.
813 * configure: Regenerate.
815 Wed Nov 1 23:46:59 1995 Andrew Cagney <cagney@highland.com.au>
817 * std-config (INLINE_DEVICE_TREE): Don't inline either of
818 device_tree.c or devices.c. There is no significant gain.
820 * configure.in, Makefile.in: add --enable-sim-icache=[0-9]* and
823 Wed Nov 1 23:46:59 1995 Andrew Cagney <cagney@highland.com.au>
825 * igen.c (main), misc.h (target_a2i, i2target), misc.c: Add
826 functions to convert between target and igen internal bit numbers.
827 Make IO go through these functions. Add -b (bit size) and -h (high
828 bit nr) options to igen. Typical usage would be: ./igen -b 16 -h
829 15 for a 16 bit instruction format with the msb given a number 15.
831 Wed Nov 1 22:17:32 1995 Andrew Cagney <cagney@highland.com.au>
833 * dgen.c (main): Was outputting optarg even when it was NULL.
835 Tue Oct 31 23:48:33 1995 Andrew Cagney <cagney@highland.com.au>
837 * vm_n.h (vm_data_map_load_N, vm_data_map_store_n), debug.h,
838 debug.c: Add tracing of load/store unit (virtual) with -t
841 Tue Oct 31 21:44:01 1995 Andrew Cagney <cagney@highland.com.au>
843 * std-config.h (WITH_ENVIRONMENT): Add USER_ENVIRONMENT which does
844 not include things such as the time base and events.
846 * interrupt.c, sim_calls.c, cpu.h, vm.c, configure.in: Add UEA to
847 all environment switches for above.
849 * psim.c (psim_create): ditto - new device tree node name is
850 /options/environment-architecture with values user, virtual and
853 Tue Oct 31 21:31:32 1995 Andrew Cagney <cagney@highland.com.au>
855 * ppc-opcode-stupid: Third example of use of opcode table - this
856 one expands all mtspr/mfspr and branch instructions. Appears to
857 give about a 10% gain in performance if everything enabled. Also
858 takes about 150mb of swap to build.
860 Wed Nov 1 10:49:48 1995 Michael Meissner <meissner@tiktok.cygnus.com>
862 * emul_netbsd.c (do_exit): Print arguments and close parenthesis
863 if tracing, since exit doesn't go through emul_exit_call.
864 (do_read): Print arguments if tracing.
870 (do_sigprocmask): Replace trace with printing arguments if
872 (do_ioctl): Print arguments if tracing.
876 (do_gettimeofday): Ditto.
877 (do_getrusage): Ditto.
880 * filter_filename.c: New file to provide filter_filename to strip
881 the directory prefix from a file.
882 * filter_filename.h: New include file to declare filter_filename.
884 * debug.h: Include filter_filename.h.
885 (TRACE,DTRACE,ERROR): Use filter_filename on __FILE__.
887 * misc.h: Include filter_filename.h.
888 (ASSERT): Use filter_filename on __FILE__.
890 * igen.c (lf_print_my_prefix): Use filter_filename on the filename
893 * Makefile.in: Add filter_filename support.
895 * ppc-instructions (dcbi, icbi): Make these NOPs rather than
896 invalid instructions.
898 * configure.in: Add support for more --enable-sim-* switches.
899 Use config.make and config.hdr to write to Makefile and config.h
900 respectively. Don't rewrite Makefile, just append to it.
901 * configure: Regenerate.
902 * config.{make,hdr}: New shell scripts.
904 * Makefile.in: Remove all variables set by configure.in.
905 (psim.o): Depend on $(BUILT_SRC) also.
907 * emul_netbsd.c (do_gettimeofday,do_getrusage): When comparing an
908 integer, use 0, not NULL.
910 Tue Oct 31 15:20:04 1995 Michael Meissner <meissner@tiktok.cygnus.com>
912 * configure.in: Add support for --enable-sim-inline,
913 --enable-sim-bswap, --enable-sim-cflags, --enable-sim-complex,
914 --enable-sim-switch, --enable-sim-duplicate, --enable-sim-filter,
915 and --enable-sim-endian switch to control various Makefile
917 * configure: Regenerate from configure.in.
918 * Makefile.in: Add various Make variables that the various
921 * std-config.h (DEFAULT_INLINE): Don't set this to 2 if using GCC
922 and optimizing by default.
924 Fri Oct 27 19:26:27 1995 Andrew Cagney <cagney@highland.com.au>
926 * bits.h (ROTL32, ROTL64): Were functions, made them macros, now
927 make them functions again. Appears 2.6.3 is confused by just a
930 Thu Oct 26 18:31:58 1995 Andrew Cagney <cagney@highland.com.au>
932 * ppc-endian.c (SWAP_8): Fix 8 byte swap!
934 * psim.c (psim_create): Not correctly checking that runtime
935 configuration of things like ENDIAN, ENVIRONMENT and ALIGNMENT
936 matched the compiled in ones.
938 * debug.h (ITRACE), igen.c: Tidy up more tracing flags -
939 trace_semantics is now different to trace_idecode, the former
942 Tue Oct 24 21:54:13 1995 Andrew Cagney <cagney@highland.com.au>
944 * ppc-instructions (mtsrin): Missing instruction
945 * ppc-instructions (mfsrin): Missing instruction
946 * ppc-instructions (eieio): Missing instruction
948 Tue Oct 24 20:55:29 1995 Andrew Cagney <cagney@highland.com.au>
950 * build-psim: New shell script - see internals for usage,
951 simplifies the process of building custom simulators.
953 Mon Oct 23 23:48:59 1995 Andrew Cagney <cagney@highland.com.au>
955 * std-config.h (SEMANTICS_INLINE): Tidy up notes on each of the
956 INLINE macros. Make SEMANTICS_INLINE == 1 if DEFAULT_INLINE == 2.
957 Don't use DEFAULT_INLINE to define REGISTERS_INLINE DEVICES_INLINE
958 DEVICE_TREE_INLINE or INTERRUPTS_INLINE as none of these are on
959 the instruction or data critical paths.
961 * FIXME: need to set up OS_EMUL_INLINE/EMUL_GENERIC_INLINE but
962 not on critical path.
964 * FIXME: devices.c/emul_netbsd.c would benefit (slightly) from
965 the inclusion of device_tree.c/emul_generic.c.
967 Mon Oct 23 00:31:50 1995 Andrew Cagney <cagney@highland.com.au>
969 * os_emul.[hc], emul_generic.[hc], emul_netbsd.[hc]: replace
970 system.[hc]. Start of suport for multiple emulations and
971 emulation state (os_emul object).
973 * emul_generic.[hc]: Start of code to implement proper system call
976 Sun Oct 22 21:33:51 1995 Andrew Cagney <cagney@highland.com.au>
978 * cpu.h, cpu.c (cpu_init): New function, zero the registers before
979 the processor is started. Fixes problem of registers being
980 undefined when restarting from within gdb.
982 * cpu.h, cpu.c (cpu_flush_icache): New function, flushes the
983 instruction cache (if present). Fixes problem of cpu caching gdb
984 breakpoint instructions.
986 FIXME: PSIM sometimes aborts calling error(), it should instead
987 call sim_error() say which takes care of housekeeping such as
988 saving the CIA before calling error.
990 * NOTE: cpu_flush_cache() instead of cpu_synchronize_context() is
991 used when restarting a simulation because the latter has the
992 unwanted side effect (well I as a kernel hacker think it is) of
993 performing an isync when the instruction stream doesn't contain
996 Sun Oct 22 19:27:48 1995 Andrew Cagney <cagney@highland.com.au>
998 * mon.h (new), mon.c (new), std-config.h (WITH_MON): Performance
999 monitoring module. Counts both instructions issued and
1002 * NOTE: mon does not contain to count instruction loads as this
1003 information is already available from the mon_issue() hook.
1005 * FIXME: mon doesn't have access to register usage information.
1006 This is needed if the user wants to monitor things like register
1009 * igen.c (lf_print_c_semantic), vm_n.h: Add counting code.
1011 * psim.h, psim.c (psim_create), cpu.h, cpu.c (cpu_create): Attach
1012 a common monitor to each of the cpus. Delete
1013 cpu_increment_number_of_insns() and cpu_get_number_of_insns()
1014 replaced by copied code in mon.[hc].
1016 Sun Oct 22 18:42:45 1995 Andrew Cagney <cagney@highland.com.au>
1018 * sim_calls.c, main.c, psim.c (psim_create): always create
1019 `WITH_SMP' cpus. The actual number of CPU's active in a
1020 simulation run is taken from the device node: /init/smp (an
1021 integer). WITH_SMP changed to 2 (remember to put it back to 0).
1023 Fri Oct 20 17:26:54 1995 Andrew Cagney <cagney@highland.com.au>
1025 * system.c: More system call emulation. If code appears NetBSD
1026 specific, make conditional to being compiled on a NetBSD system
1029 Wed Oct 18 23:02:20 1995 Andrew Cagney <cagney@highland.com.au>
1031 * Makefile.in, gen.c(delete), igen.c(new), dgen.c(new),
1032 lf.[ch](new), table.[ch](new): Split into two generators - igen
1033 that outputs the instruction tables and dgen that outputs the spr
1034 tables. Add -f (filter out) flag to igen to filter out certain
1035 instructions (ex 64 bit ones) from the created tables. Include
1036 $(LIBIBERTY_LIB) in link options in case host lacks some libc
1039 * NOTE: igen, since it was originally written for the
1040 PowerPC/RS6000, things the MSB is 0 and the LSB is 63{31}.
1042 * Makefile.in, std-config.h, ppc-cache-rules(new),
1043 ppc-opcode-complex(new), ppc-opcode-simple(new): (for igen) Create
1044 cache-rule and opcode-rule tables from macros found std-config.h.
1045 Delete corresponding macro's from std-config.h.
1047 * FIXME: under this new igen scheme, when playing around with igen
1048 options, you'll find that depenencies don't work very well.
1050 * igen.c (gen_itable_c, gen_itable_h), Makefile.in: code to output
1051 an table of all the instructions. Code to output a type
1052 enumerating all the instructin names.
1054 * igen.c(lf_print_c_semantic): Move call to increment instruction
1055 counter so that it occures _after_ the instruction has been fully
1056 validated, was double counting illegal/invalid instructions. Add
1057 conditional so only compiled in when WITH_PROFILE enabled (enabled
1060 * igen.c, cpu.h, cpu.c(cpu_increment_number_of_insns): Include
1061 itable.h, count individual instruction types not just total,
1062 adjust reporting functions to output this.
1064 * ppc-instructions (64 bit Load Doubleword with Update Indexed):
1065 Had 32./ instead of 31./
1067 * ppc-instructions (64 bit Store Double Word Conditional Indexed):
1068 bitrot - updated to use newer CR register operators.
1070 * ppc-instructions (64bit Floating Convert from Integer
1071 Doubleword): Correct call to Round_Float().
1073 Mon Oct 16 00:31:20 1995 Andrew Cagney <cagney@highland.com.au>
1075 * basics.h: #include "sim_callbacks.h" earlier so that its
1076 prototypes are declared in all other header files.
1078 * bits.h, bits.c, idecode_expression.h (ROTL32, ROTL64): Update
1079 doc in bits.h, remove dead code in bits.c, move ROTL32/ROTL64 into
1082 * FIXME: the bits.h/bits.c macro's should be replaced with
1083 (inline) c functions.
1085 * cpu.c(cpu_add_commas), device_tree.h, device_tree.c(scand_*):
1086 Add size of buffer argument to functions writing a string into a
1087 buffer. Check for buffer overflow.
1089 Sun Oct 15 22:16:11 1995 Andrew Cagney <cagney@highland.com.au>
1091 * devices.h, devices.c, debug.h, debug.c: add macro's for tracing
1092 of each device. Make parameter names consistent so macros work.
1093 Use macro's in device functions.
1095 * device_tree.c, devices.h, devices.c: include path to device in a
1096 devices node when creating it.
1098 * device_tree.c, debug.h, debug.c: Add tracing of `device-tree'.
1100 * core.c: add tracing of core-device, adjust parameter names in
1101 core functions to be consistent with those in devices*.
1103 Sun Oct 15 20:33:20 1995 Andrew Cagney <cagney@highland.com.au>
1105 * debug.h, debug.c (trace_option): New function. Parses the trace
1106 option, updating the trace array.
1108 * debug.h, debug.c (trace_usage): New function. Outputs the list
1109 of all possible trace options.
1111 * sim_calls.c (sim_open), main.c (main): Use new trace_option() to
1112 parse trace options specified with the simpler -t flag. Adjust
1115 * FIXME: basic parsing of command line options is still duplicated
1116 by main.c and sim_calls.c
1118 Thu Oct 26 10:42:28 1995 Michael Meissner <meissner@tiktok.cygnus.com>
1120 * Makefile.in (clean): Delete *.i and *.out files.
1122 * ppc-endian.c (SWAP_n): Add SET argument to allow use of SWAP
1123 macros for either assignment or return. Fix SWAP_8 to use a
1124 union, and two SWAP_4's. Delete SWAP_N, since nobody uses it now.
1125 (ENDIAN_N): Add SET argument to SWAP_n calls. Delete macro defs
1126 that hardwired swapping on/off, let optimizer delete dead code.
1128 * main.c (main): Add printf that we caught a signal and print out
1129 the failing address.
1131 Thu Oct 19 21:43:39 1995 Fred Fish <fnf@fishfood.amigalib.com>
1133 * Makefile.in: Remove tabs from otherwise empty line.
1134 Confuses many non-GNU versions of "make".
1136 Wed Oct 18 08:51:25 1995 Michael Meissner <meissner@tiktok.cygnus.com>
1138 * Makefile.in (clean): Delete files produced by gen.
1140 Mon Oct 16 17:34:24 1995 Michael Meissner <meissner@tiktok.cygnus.com>
1142 * gen.c (lf_print_c_semantic_function): Move counting # of
1143 instructions here so it works with caching.
1144 (gen_idecode_c): Move from here.
1146 Wed Oct 11 17:13:15 1995 Andrew Cagney <cagney@highland.com.au>
1148 * gen.c, ppc-instructions, psim.c: Fix code for generating
1149 cracking instruction cache. Delete the code that cached just the
1150 result from doing an instruction lookup - this ran slower than no
1153 Fri Oct 13 09:58:43 1995 Michael Meissner <meissner@tiktok.cygnus.com>
1155 * Makefile.in (gen.o): Include $(INLINE_CFLAGS).
1157 * debug.h (ppc_trace): Rename from trace, to avoid a conflict with
1158 TCL when gdb is linked with the simulator.
1159 * debug.c (ppc_trace): Ditto.
1160 * sim_calls.c (sim_open): Change trace -> ppc_trace.
1161 * main.c (main): Ditto.
1163 * cpu.c (cpu_add_commas): Remove extra static.
1165 Thu Oct 12 11:35:53 1995 Michael Meissner <meissner@tiktok.cygnus.com>
1167 * Makefile.in (psim.o): Now that inlines are turned on, make
1168 psim.o depend on all sources.
1170 * cpu.c (cpu_add_commas): New function to format a long with
1172 (cpu_print_info): Use it to print number_of_insns.
1174 * ppc-endian.c (SWAP_n): New macros to speed up byte swapping for
1176 (ENDIAN_N): If both target and host byte orders are known, don't
1177 bother testing CURRENT_{TARGET,HOST}_BYTE_ORDER.
1179 * ppc-endian.h (target specific H2T_n/T2H_n macros): Remove #if 0
1180 to allow target specific H2T_n/T2H_n macros to be used.
1181 (htonl, ntohl): If compiled on a 486 by GCC and WITH_BSWAP is
1182 non-zero, redefine the htonl/ntohl macros to use the BSWAP instead
1183 of the 3 instruction sequence that runs on 386s.
1185 * std-config.h (WITH_{HOST,TARGET}_BYTE_ORDER): Don't override if
1186 specified on the compile line.
1187 (WITH_BSWAP): If not defined, define as 0.
1189 * Makefile.in (INLINE_CFLAGS): Add -DDEFAULT_INLINE=2 to add
1190 default inline support. Pass INLINE_CFLAGS when compiling.
1192 * devices.{h,c} (unimp_device_ioctl): Use STATIC_DEVICES, not
1193 INLINE_DEVICES since GCC doesn't like inline functions that
1194 accept variable arguments.
1195 (stack_ioctl_callback): Make function just static because GCC
1196 doesn't like inline functions that accept variable arguments.
1198 * devices.h (STATIC_DEVICES): Define as empty if not defined.
1200 * inline.c: Correct pathnames of included C files to match current
1203 * inline.h (STATIC_DEVICES): If DEVICES_INLINE is defined to be
1204 non-zero, define STATIC_DEVICES to be static.
1206 * std-config.h (INLINE): If GNU C and optimizing, define this as
1208 (DEFAULT_INLINE): If not defined, define as 0.
1209 (ENDIAN_INLINE): If not defined, define as DEFAULT_INLINE.
1210 ({CORE,VM,CPU,EVENTS,REGISTERS,INTERRUPTS}_INLINE): Ditto.
1211 ({SPREG,IDECODE}_INLINE): Ditto.
1213 Wed Oct 11 17:13:15 1995 Andrew Cagney <cagney@highland.com.au>
1215 * ppc-instructions: Initial cut of floating point suport added.
1216 Of note include - use of host IEEE floating point instructions,
1217 use of PowerPC manual pseudo code to handle the FPSCR. It is not
1218 currently a pretty sight.
1220 * memory_map.h, memory_map.c, memory_map_n.h, core.h, core.c:
1221 merge into core.h, core.c, core_n.h. The type memory_map replaced
1222 with core_map. This removes a level of pointer indirection when
1223 translating an address.
1225 * memory_map.h, memory_map.c, memory_map_n.h: delete.
1227 * Makefile.in et.al (sorry): tweek to use new core, core_map and
1230 Wed Oct 11 12:10:26 1995 Andrew Cagney <cagney@highland.com.au>
1232 * sim_calls.c, main.c: Add -g (trace_gdb) option, add tracing to
1233 most of the other functions in sim_calls.c.
1235 * basics.h (CONCAT3), memory_map.c, memory_map_n.h, Makefile.in:
1236 Add macros to better cover up `generic' code. Makes it possible
1237 to step through the generic code!
1239 * vm.c, vm_n.h, Makefile.in: ditto
1241 Tue Oct 10 15:42:59 1995 Andrew Cagney <cagney@highland.com.au>
1243 * devices.h, devices.c, memory_map.h, memory_map.c: Changed
1244 callback interface so that there is a read/write buffer but no
1245 read/write_word. VEA default memory read/write handler sometimes
1246 couldn't resolve an access and of those some were for a memory
1247 fault and some were because gdb was making a bogus request.
1249 * devices.h, devices.c, memory_map.h, memory_map.c, vm.h, vm.c:
1250 eliminate transfer_mode (raw or cooked) parameter from read/write
1253 Fri Oct 6 20:23:56 1995 Andrew Cagney <cagney@highland.com.au>
1255 * ppc-instructions (fmul, fmuls): correct instruction format - had
1258 Wed Oct 4 17:31:12 1995 Andrew Cagney <cagney@highland.com.au>
1260 * psim.c, device_tree.h, device_tree.c, devices.c (printd_*,
1261 scand_*): new functions to parse/print fields in device names
1262 while hiding any machine dependency.
1264 * devices.c, psim.c: Change the stack init code so that it is
1265 handled by a device. Arguments passed across using a device ioctl
1268 * devices.h, devices.c: device ioctl callback changed to allow a
1269 variable number of arguments. This gives greater flexability and
1270 greater chance of bugs.
1272 Tue Oct 3 22:01:56 1995 Andrew Cagney <cagney@highland.com.au>
1274 * main.c (printf_filtered, error): Missing va_end() to close off
1275 variable argument use.
1277 * Makefile.in (tmp-gencode): comment out hack to get around some
1278 versions of make not handling files being created as side-effects.
1280 * gen.c (lf_open): Add -n (real_file_name) option. Specifies an
1281 alternative file name to use in output files for things like #line
1284 Makefile.in (tmp-gencode): Use gen -n so that debug info is
1287 * Makefile.in (TARGETLIB): Use this instead of libsim.a in the
1290 Sat Oct 7 22:40:59 1995 Michael Meissner <meissner@tiktok.cygnus.com>
1292 * sim_calls.c (sim_set_callbacks): Define new function.
1294 Fri Oct 6 17:23:10 1995 Michael Meissner <meissner@tiktok.cygnus.com>
1296 * psim.c (psim_print_info): Print exit status or signal number.
1298 Mon Oct 2 11:46:37 1995 Michael Meissner <meissner@tiktok.cygnus.com>
1300 * cpu.c (struct _cpu): Add number_of_insns field to trace how many
1301 instructions are executed.
1302 (cpu_increment_number_of_insns): New function to increment the
1303 number of instructions issued.
1304 (cpu_get_number_of_insns): New function to return the number of
1305 instructions issued.
1306 (cpu_print_info): New function to print cpu related information.
1307 At present, print the number of instructions executed.
1309 * gen_idecode_c: Emit call to cpu_increment_number_of_insns within
1312 * psim.c (psim_print_info): New function to iterate over each of
1313 the CPU's calling cpu_print_info.
1315 * psim.h,cpu.h: Add new declarations.
1317 * sim_calls.c (sim_open): Add argument processing to add the same
1318 switches main.c accepts for the standalone processor.
1319 (sim_close): Call psim_print_info if -I.
1321 * main.c (main): Add comment saying to update sim_calls.c when
1322 adding switches. Add -I to call psim_print_info when done.
1323 (usage): Update usage message.
1325 Sun Oct 1 13:52:59 1995 Michael Meissner <meissner@tiktok.cygnus.com>
1327 * main.c (printf_filtered): Correct to match new prototype.
1329 Sat Sep 30 20:47:05 1995 Michael Meissner <meissner@tiktok.cygnus.com>
1331 * sim_callbacks.h (printf_filtered): Correct prototype.
1333 Thu Sep 21 16:26:49 1995 Michael Meissner <meissner@tiktok.cygnus.com>
1335 * device_tree.c (OEA_MEMORY_SIZE): Define if not defined to
1337 (clayton_memory_size): Define as OEA_MEMORY_SIZE.
1339 * std-config.h (WITH_TRACE): Default to 1 now.
1341 * psim.c (write_stack_arguments): Don't write any stack arguments
1344 * main.c (main): Switch to using getopt. Make -p also set
1345 trace_semantics. Make -a turn on all trace flags. Make -C turn
1348 * device_tree.c (create_option_device_node): Assume a program is
1349 OEA if the start address is < 4096, not just == 0.
1351 Wed Sep 20 13:36:06 1995 Ian Lance Taylor <ian@cygnus.com>
1353 * Makefile.in (maintainer-clean): New synonym for realclean.
1355 Sun Sep 10 10:23:56 1995 Michael Tiemann <tiemann@axon.cygnus.com>
1357 * registers.c (register_description): Add gdb synonyms for cr
1360 Fri Sep 8 13:16:10 1995 Ian Lance Taylor <ian@cygnus.com>
1362 * Makefile.in (install): Don't install in $(tooldir).
1364 * configure.in: Call AC_CONFIG_HEADER. Don't try to use
1365 bfd/hosts/*.h file or bfd/config/*.mh file. Call AC_PROG_CC and
1366 AC_PROG_RANLIB. Substitute in values for CFLAGS, HDEFINES, AR,
1367 and CC_FOR_BUILD. Call AC_CHECK_HEADERS for various header files.
1368 Touch stamp.h if creating config.h.
1369 * configure: Rebuild.
1370 * config.in: New file, created by autoheader.
1371 * Makefile.in (AR): Define as @AR@.
1372 (CC): New variable, defined as @CC@.
1373 (CFLAGS): Define as @CFLAGS@.
1374 (CC_FOR_BUILD): New variable, defined as @CC_FOR_BUILD@.
1375 (RANLIB): Define as @RANLIB@.
1376 (HDEFINES, TDEFINES): New variables.
1377 (@host_makefile_frag@): Remove.
1378 (mostlyclean): Make the same as clean, not distclean.
1379 (clean): Remove config.log.
1380 (distclean): Remove config.h and stamp-h.
1381 (Makefile): Don't depend upon @frags@. Just rebuild Makefile when
1382 invoking config.status.
1383 (config.h, stamp-h): New targets.
1384 (gen, gen.o): Build with CC_FOR_BUILD, not CC.
1385 (ppc-config.h): Rename from old config.h build.
1386 * (basics.h,gen.c,ppc-endian.c,psim.c): Include ppc-config.h.
1388 Fri Sep 8 09:51:03 1995 Michael Meissner <meissner@tiktok.cygnus.com>
1390 * configure{,.in}: Don't include sysdep.h from bfd, since bfd no
1392 * basics.h (sysdep.h): Don't include it.
1393 * Makefile.in (BASICS_H): Remove sysdep.h.
1395 Wed Sep 6 13:25:42 1995 Andrew Cagney <cagney@highland.com.au>
1397 * core.c (core_add_data): First growth of bss was being put at
1398 wrong address (0) instead of &end.
1400 * core.c (core_add_stack, core_add_data): Was not handling case
1401 where bss/stack is grown across the current end-of-{bss,stack}.
1403 Wed Sep 6 00:46:10 1995 Andrew Cagney <cagney@highland.com.au>
1405 * system.c (system_call): Fix SYS_break - was aligning bss to a
1406 page boundary instead of just an 8 byte one; On first call sbrk(0)
1409 Thu Aug 24 14:48:54 1995 Michael Meissner <meissner@tiktok.cygnus.com>
1411 * Makefile.in (install): Fix install rule.
1413 Tue Aug 22 09:31:18 1995 Michael Meissner <meissner@tiktok.cygnus.com>
1415 * system.c (system_call): Add read support.
1417 * main.c (main): -t sets trace_device_tree. Correct usage message
1420 * device_tree.c (update_memory_node_for_section): Make tracing
1421 output line up. If not code or readonly, assume that the section
1422 is a data section and has read/write permissions. Add readonly
1425 * core.c (create_core_from_addresses): Print end address in traces
1426 and make tracing output line up.
1428 * Makefile.in: Rewrite from Makefile to work with the Cygnus
1429 environment, and support compiling in a different directory than
1430 the sources reside in.
1432 * ppc-endian.h: Rename from endian.h so that it doesn't get
1433 confused with /usr/include/sys/endian.h on Linux. Add Linux
1436 * ppc-endian.c: Rename to be consistant with ppc-endian.h.
1437 Include ppc-endian.h, not endian.h.
1439 * basics.h (sysdep.h): Include sysdep.h that configure makes.
1440 Include ppc-endian.h, not endian.h.
1442 * std-config.h: Rename from ppc-config. Put #ifndefs around most
1443 configuration macros, so they can be overridden via CFLAGS. By
1444 default, turn off tracing.
1446 * configure.in: Clone from other simulator targets.
1447 * configure: Generate via autoconf from configure.in.
1449 Sat Aug 19 09:05:32 1995 Andrew Cagney <cagney@highland.com.au>
1451 * ppc-instructions: fix srawi (was geting XER[CA] real wrong).
1453 * interrupts.c (data_storage_interrupt): allow stack to grow by
1454 upto one MB per increment.
1456 * ppc-instructions: divw was computing rA / rA not rA / rB
1458 * main.c (main): really stupid. Wasn't exiting with correct status
1460 Fri Aug 18 00:38:01 1995 Andrew Cagney <cagney@highland.com.au>
1462 * system.c (system_call): add system calls kill(2) and getpid(2).
1464 * main.c (main): Check/return exit status when simulation
1467 Thu Aug 17 14:29:18 1995 Andrew Cagney <cagney@highland.com.au>
1469 * device_tree.c (create_option_device_node): Alignment rules (at
1470 least for the moment) now are for strict alignment only for LE OEA
1471 mode. (Because of compiler problems).
1473 * system.c (system_call) SYS_exit: Wasn't exiting with correct status.
1475 Thu Aug 17 01:16:38 1995 Andrew Cagney <cagney@highland.com.au>
1477 * vm.c (DEFINE_VM_DATA_MAP_WRITE_N): For miss aligned transfer
1480 * system.c (system_call): didn't page align break argument before
1481 determining increment break increment.
1483 * psim/ppc: Re-arange entire directory structure so that
1484 everything lives in the one directory. While a pain for cleaning,
1485 makes building across multiple architectures much simpler.
1487 * devices.c, device_tree.c: Added code that provides a simple
1488 illustration of how an interrupt control device could be
1491 * devices.c: Added code so that the dumb console device can read
1492 (from stdin) as well as write to stdout.