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