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