Latest changes from Andrew
[binutils-gdb.git] / sim / ppc / ChangeLog
1 Tue Jan 9 15:10:27 1996 Andrew Cagney <cagney@highland.com.au>
2
3 * emul_bugapi.c (emul_bugapi_instruction_call) : Make format type
4 correct.
5 * emul_chirp.c (map_over_chirp_note) : Ditto
6 * emul_chirp.c (chirp_emul_test) : Ditto
7 * device_table.c (register_init): Ditto
8
9 Tue Jan 9 14:16:26 1996 Andrew Cagney <cagney@highland.com.au>
10
11 * configure.in: Make disable-sim-switch default. Switch only
12 useful if using --enable-sim-opcode=ppc-opcode-stupid and then
13 only marginally so.
14
15 Mon Jan 8 12:17:22 1996 Michael Meissner <meissner@tiktok.cygnus.com>
16
17 * device_table.c (register_init): Make format type correct.
18
19 Wed Jan 3 19:21:46 1996 Andrew Cagney <cagney@highland.com.au>
20
21 * emul_bugapi.c (emul_bugapi_create): Add nodes to init the
22 system-call trap to the emul instruction call instruction (Along
23 with an rfi and infinate loop).
24
25 * emul_bugapi.c (emul_bugapi_instruction_call): Expand to include
26 a few real PPC bug calls. Test with simple hello world.
27
28 Tue Jan 2 20:51:19 1996 Andrew Cagney - aka Noid <cagney@highland.com.au>
29
30 * device.h, device.c (device_child, device_sibling): New
31 functions. Return corresponding device value.
32
33 * emul_chirp.c (chirp_emul_child, chirp_emul_peer,
34 chirp_emul_parent): New functions - emulate corresponding OpenBoot
35 interfaces.
36
37 * device_table.c (register_init): Extend properties attached to
38 register init node to allow a specific processor's register to be
39 specified.
40
41 * emul_chirp.c (emul_chirp_create): Init SMP correctly - the
42 initial PC for all processors is an infinate loop but then, for
43 processor zero, is quickly changed to be the correct code starting
44 address.
45
46 * emul_chirp.c (emul_chirp_create): Add fake bootpath
47 et.al. properties to tree.
48
49 * emul_chirp.c (chirp_emul_getproplen): New function. Emulate the
50 getproplen OpenBoot call.
51
52 * emul_chirp.c (emul_chirp_instruction_call): Document other
53 possible chirp emulation internal states.
54
55 * emul_chirp.c (emul_chirp_instruction_call): Trace failed lookups
56 as well as successful ones.
57
58 * emul_chirp.c (emul_chirp_open): New function - handle open
59 client call.
60
61 * Makefile.in (maintainer-clean): Proper rule that eliminates more
62 junk.
63
64 Tue Dec 19 13:00:11 1995 Andrew Cagney <cagney@highland.com.au>
65
66 * emul_chirp.c (chirp_emul_exit): Full out call.
67
68 * device_table.c (htab_map_page): Wasn't handling byte swap when
69 creating entries in the hash table.
70
71 * device.c (device_tree_find_node): Allow primative wild-card match
72 of device names with the path.
73
74 FIXME: As mentioned earlier, the device stuff needs work to bring
75 it into line with OpenBoot. Part of this work is rewriting the
76 find_node function so that it behaves as specified in p1275.
77
78 Mon Dec 18 19:58:56 1995 Andrew Cagney <cagney@highland.com.au>
79
80 * emul_chrp.c (chirp_emul_write, chirp_emul_finddevice): add
81 better tracing.
82
83 * emul_chrp.c: Change return type of emul functions to int. Emul
84 functions either return -1 or zero so unsigned was a bit
85 dangerous.
86
87 * inline.h (*), igen.c, dgen.c, *: Update INLINE macros so that
88 they are paramaterised with the type of the function. Gets around
89 the problem of `static' needing to come first with `attribute'
90 comming last. Format declarations and definitions so that emacs
91 doesn't get confused.
92
93 Fri Dec 15 17:06:44 1995 Andrew Cagney <cagney@highland.com.au>
94
95 * std-config.h (PSIM_INLINE): Add missing inline configuration
96 control for the main loop.
97
98 * mon.c (mon_print_info): If monitoring disabled still print out
99 the number seconds used.
100
101 * psim.c (run_until_stop): Don't monitor the cache misses when
102 monitoring is disabled.
103
104 * configure.in (sim_mon, sim_monitor): Correct typo - sim_mon ->
105 sim_monitor for shell variable (or should that have been the other
106 way around?).
107
108 * vm.c (vm_synchronize_context): Fix wrong test for unsuported
109 change in endian-mode.
110
111 * std-config.h (WITH_REGPARM), inline.h (IDECODE_INLINE,
112 SEMANTICS_INLINE): Add -DWITH_REGPARM=<n> option. Enables the
113 __attribute__((__regparm(WITH_REGPARM))) for some functions.
114 configure with --enable-sim-cflags="-DWITH_REGPARAM=3" (say).
115 Unfortunatly it tickles a bug (gcc?) and can't be used.
116
117 Mon Dec 18 13:36:06 1995 Michael Meissner <meissner@tiktok.cygnus.com>
118
119 * device.c (device_tree_add_device): Make trace fprintf arguments
120 type correct.
121 * device_table.c (htab_decode_hash_table): Ditto.
122 (htab_map_binary): Ditto.
123 (htab_init_callback): Ditto.
124 * vm.c (om_virtual_to_real): Ditto.
125
126 Sat Dec 16 09:54:18 1995 Michael Meissner <meissner@wogglebug.tiac.net>
127
128 * emul_netbsd.c (emul_netbsd_create): Deal with new BFD that
129 changed how big/little endian support is recorded, while remaining
130 compatible with the old BFD with #ifdefs.
131 * emul_chirp.c (emul_chirp_create): Ditto.
132 * emul_bugapi.c (emul_bugapi_create): Ditto.
133
134 Fri Dec 15 15:55:56 1995 Michael Meissner <meissner@tiktok.cygnus.com>
135
136 * std-config.h (MODEL_INLINE): Turn off INLINE_MODULE by default.
137
138 * corefile.h: Delete declarations for unknown functions.
139 * device.h: Ditto.
140 * interrupts.h: Ditto.
141 * interrupts.c: Ditto.
142
143 Thu Dec 14 18:49:34 1995 Andrew Cagney <cagney@highland.com.au>
144
145 * lf.c (lf_print_function_type): New function. Munges a function
146 type so that the prefix (eg INLINE...) is inserted after the type
147 but before any `*'.
148
149 * igen.c: Change to output functions using this.
150
151 Wed Dec 13 23:47:00 1995 Andrew Cagney <cagney@highland.com.au>
152
153 FIXME: Emul CHIRP does not correctly implement the find device
154 function.
155
156 FIXME: Emul CHIRP and device do not implement device instance
157 operations.
158
159 Wed Dec 13 23:47:00 1995 Andrew Cagney <cagney@highland.com.au>
160
161 * options.c (options_inline): Function to output meaningful
162 description of the INLINE options.
163
164 * configure.in (inline): Replace inline magic numbers with macro
165 names. Map 1->LOCALS_INLINE and 2->ALL_INLINE.
166
167 * inline.h, inline.c: update to use inline method.
168
169 * std-config.h (CPU_INLINE), cpu.h, inline.h, inline.c: make cpu.h
170 inline always.
171
172 * std-config.h (EVENTS_INLINE): Inline events in psim.
173
174 Wed Dec 13 22:01:21 1995 Andrew Cagney <cagney@highland.com.au>
175
176 * device_table.c (htab_sum_binary): DMA binaries to correct byte
177 within a page.
178
179 Tue Dec 12 22:51:18 1995 Andrew Cagney <cagney@highland.com.au>
180
181 * psim.c (psim_merge_device_file): Change `=' to `==', was this an
182 error?
183
184 Tue Dec 5 11:56:14 1995 Andrew Cagney <cagney@highland.com.au>
185
186 * ppc-instructions (ppc_nr_mtcrf_crs, ppc_branch_conditional_name,
187 ppc_function_unit_name): Simplify by declaring these arrays as
188 pure and simple static (instead of STATIC_MODEL).
189
190 Tue Dec 5 00:45:34 1995 Andrew Cagney <cagney@highland.com.au>
191
192 * sim_calls.c (sim_create, sim_load), main.c (main), psim.c: Pass
193 an options device into psim_create() so that options can be merged
194 into the tree.
195
196 * device.c (*add*): Change semantics so the add functions only add
197 when the new device (or property) doesn't already exist. This
198 allows merging of options and data.
199
200 Mon Dec 4 17:12:13 1995 Andrew Cagney <cagney@highland.com.au>
201
202 * Makefile.in (BASICS_H): Didn't include basics.h in the list of
203 header files to depend on.
204
205 Mon Dec 4 17:12:13 1995 Andrew Cagney <cagney@highland.com.au>
206
207 * std-config.h: (*_MODULE): Extend the <module>_inline macro's so
208 that they also allow control over static functions. Rewrite
209 document to reflect this.
210
211 * std-config.h: (INLINE): Simplify definition, the above and
212 earlier changes to igen.h eliminate the need to be defensive about
213 enabling the inline of static functions.
214
215 * std-config.h: (SIM_ENDIAN_INLINE, BITS_INLINE): Document limited
216 suport for inlineing of modules for all callers. Adjust relevant
217 macro's so that DEFAULT_INLINE will enable this.
218
219 * basics.h: Re-order #includes and definitions so that c-code for
220 basic include files does not call functions delcared in later
221 #includes.
222
223 * basics.h (__attribute__), sim_callbacks.h: Move attribute macro
224 to basics.h and add hack (include <stdio.h>) to try and bring that
225 and other possible conflicting macros into scope much earler.
226
227 * sim-endian.h,c (SIM_ENDIAN_INLINE) bits.h,c (BITS_INLINE):
228 Change to use the updated inline definitions. If enabled
229 immediatly include the corresponding c-code so that it will inline
230 for all modules.
231
232 * inline.h, inline.c (SIM_ENDIAN_INLINE, BITS_INLINE): Remove
233 these cases, moved to module specific header files.
234
235 Sat Dec 2 18:37:51 1995 Andrew Cagney <cagney@highland.com.au>
236
237 * vm.c, vm_n.c: Fix htab code.
238
239 * vm.c (vm_data_map_read_buffer): Was using EA not RA when reading
240 the data from core.
241
242 * device.c: Fix htab create code.
243
244 Fri Nov 24 23:10:09 1995 Andrew Cagney <cagney@highland.com.au>
245
246 * bits.h, bits.c (EXTRACTED): Convert to function, fix - had &&
247 instead of &.
248
249 * sim-endian.h (SWAP_N), sim-endian-n.h, sim-endian.c: How
250 embarasing - fix yet another bug in the swap code! Simplify
251 everything by using more functions. Add host to big-endian byte
252 swapping support.
253
254 Fri Nov 24 23:10:09 1995 Andrew Cagney <cagney@highland.com.au>
255
256 * devices.h, devices.c: delete, replaced by the files
257 device_table.[ch] and device.[ch].
258 * device_tree.h, device_tree.c: ditto
259
260 * device_table.h, device_table.c: New files. Contain a table of
261 devices.
262
263 * device.h, device.c, Makefile.in, std-config.h (DEVICE_INLINE),
264 options.c (print_options): New files. Define the device object
265 along with any attached properties.
266
267 * device_tree.h, device_tree.c: Update to use new device object.
268 For convenience, change the printd functions into device_tree_add
269 functions.
270
271 * psim.c (create_*_tree): Use new device_tree create functions.
272
273 * corefile.h, corefile.c corefile-n.h (core_n.h): Update to use
274 the new device.h / device_table.h interface. Rename core_n.h to
275 corefile-n.h to be consistent with other n files.
276
277 * Makefile.in (run): add corefile-n.h to dependencies for
278 corefile.
279
280 * basics.h (device_instance), device.h, device.c, device_table.h,
281 device_table.c: Add the concept of a device instance and operators
282 on these instances - corresponds to ihandle in OpenBoot speak.
283 Don't yet implement it.
284
285 Tue Nov 14 12:27:08 1995 Andrew Cagney <cagney@highland.com.au>
286
287 * emul_generic.h, emul_generic.c (emul_syscall_enter,
288 emul_syscall_exit): rename from emul_enter_call /
289 emul_exit_call. As only used by emul_do_system_call simplify
290 associated code.
291
292 * os_emul.h, os_emul.c, emul_generic.h: Correct and fill an
293 os_emul interface.
294
295 * os_emul.c, emul_bugapi.h, emul_bugapi.c, Makefile.in: Add
296 preliminary hooks for a kernel mode rom emulation.
297
298 * cap.h (new), cap.c (new): Capability data base. Some emulations
299 pass object identifiers (capabilities?) to/from the simulated code
300 (for instance the phandle in OpenBoot). The cap object is able to
301 check/map between internal and external (target program)
302 representations of each identifier.
303
304 * os_emul.c, emul_chirp.h, emul_chirp.c, Makefile.in: Add
305 preliminary hooks for a kernel mode IEEE-1275 emulation.
306
307 * cpu.h, cpu.c (cpu_create, cpu_os_emulation, cpu): Add os_emul to
308 list of arguments passed in when creating a cpu. Grant access to
309 the element.
310
311 * std-config.h (OS_EMUL_INLINE), options.c (print_options),
312 inline.h, inline.c: New to allow control over inline of
313 corresponding code files.
314
315 * ppc-instructions (instruction_call): Add illegal instruction to
316 call the instruction-call emulation handler.
317
318 * interrupts.c (system_call_interrupt): Call renamed
319 os_emul_system_call function().
320
321 * emul_netbsd.c: Update to interface to generic emulation. Since
322 all its functions are called via a table don't worry about any
323 inline.
324
325 * emul_generic.h, emul_generic.c, spa-*(delete): Remove references
326 and code for spa, no longer to be used.
327
328 * psim.c (create_chirp_device_tree): Fill out what was previously
329 the openboot create function so that it starts to create a full
330 OpenBoot device tree.
331
332 Tue Nov 28 21:48:06 1995 Andrew Cagney <cagney@highland.com.au>
333
334 * debug.h, debug.c: pte trace is made redundant by htab trace,
335 delete it. Add vm to list of options. Simplify tracing output so
336 lines are not as long.
337
338 Tue Nov 14 12:27:08 1995 Andrew Cagney <cagney@highland.com.au>
339
340 * events.h, events.c (event_queue_init), psim.c (psim_init): (re)
341 initialize the event queue.
342
343
344
345
346
347
348 Tue Nov 28 13:38:26 1995 Michael Meissner <meissner@tiktok.cygnus.com>
349
350 * sim-endian.h: Look at WORDS_BIGENDIAN to determine if the host
351 is big endian or little endian. For SWAP_n, use htonl/htons if
352 host is little endian, not big endian and if WITH_NTOH is defined.
353
354 * configure{,.in} (--enable-sim-model-issue): Instead of defining
355 0/1, define it to be MODEL_ISSUE_{PROCESS,IGNORE}. Add
356 AC_C_BIGENDIAN to determine if the host is big endian or not.
357 * config.in: Regenerate.
358
359 * std-config.h (WITH_MODEL_ISSUE): Default to 0.
360 (CURRENT_MODEL_ISSUE): Reference WITH_MODEL_ISSUE, and if that is
361 0, use current_model_issue.
362 (MODEL_ISSUE_{PROCESS,IGNORE}): Define as -1/1.
363
364 * psim.c (current_model_issue): New global variable.
365
366 * cpu.c (cpu_create): Use CURRENT_MODEL_ISSUE > 0 instead of
367 WITH_MODEL_ISSUE.
368 (cpu_{init,halt}): Ditto.
369 * mon.c (mon_print_info): Ditto.
370 * ppc-instructions (PPC_INSN_* macros, branch handling): Ditto.
371
372 * mon.c (mon_print_info): Print instructions/second if verbose > 0,
373 rather than > 1.
374
375 * main.c (main): Set current_model_issue to MODEL_ISSUE_PROCESS if
376 the -I switch is used.
377 * sim_calls (sim_open): Ditto.
378
379 * ppc-instructions (model support): Add support for determining
380 when we don't have enough writeback slots. Add tracing for the
381 beginning of each cycle.
382
383 Mon Nov 27 17:46:33 1995 Michael Meissner <meissner@tiktok.cygnus.com>
384
385 * mon.c: Check for whether to include sys/types.h and sys/time.h.
386
387 * configure.in: Check for include files sys/types.h and
388 sys/time.h.
389 * configure: Regenerate.
390 * config.in: Regenerate.
391
392 * cpu.h (CONST_ATTRIBUTE): Define as __attribute__((__const__)) if
393 not already defined.
394 (cpu_system): Use CONST_ATTRIBUTE, so that when we're not inlining
395 the world, the optimizer has a fair chance of CSE'ing function
396 calls.
397 (cpu_{monitor,nr,registers,model}): Ditto.
398
399 * std-config.h (MODEL_INLINE): If not defined, define as 1 if
400 DEFAULT_INLINE is non-zero, 0 otherwise, rather than just the
401 value of DEFAULT_INLINE.
402
403 Fri Nov 24 11:24:34 1995 Michael Meissner <meissner@tiktok.cygnus.com>
404
405 * lf.h (__attribute__): If not GCC and at least 2.7.0, define as
406 nothing.
407 (lf_printf): Add printf __attribute__, so the compiler will
408 automatically check the format string.
409
410 * configure{,.in} (--enable-sim-icache): If argument is define,
411 add -R to flags passed to igen.
412
413 * igen.c (stdlib.h): Include if the system supplies one.
414 (semantics_use_cache_struct): New global for -R flag to say
415 semantics is to use the cache structure directly rather than
416 putting the values into local variables.
417 (first_undef, last_undef): New structures to remember names to
418 #undef if -R.
419 (lf_print_c_extraction): If -R and this is semantics, emit names
420 as #defines pointing to the cache structure, rather than loading
421 the values into local variables.
422 (lf_print_c_semantic_function): If -R, #undef all of the names
423 defined in lf_print_c_extraction.
424 (main): Recognize -R.
425
426 * idecode_fields.h (SPR_*): Redefine spr_* macros as SPR_* to
427 avoid a name confict if -R passed to igen.
428
429 * ppc-instructions (mfspr, mtspr): Rename spr field to SPR.
430 (model_data): Add field to count the various # of CRs that the
431 mtcrf instruction used.
432 (model_mon_info): Return structures counting the # of CRs that the
433 mtcrf instruction used.
434 (branches, sync instructions): Do not call model functions if
435 WITH_MODEL_ISSUE is 0.
436
437 * mon.c (stdlib.h): Include if the system supplies one.
438 (mon_sort_instruction_names): New function to sort instruction
439 names alphabetically.
440 (mon_print_info): Call qsort with mon_sort_instruction_names to
441 sort instruction names. Don't abort if WITH_MODEL_ISSUE is 0.
442
443 * debug.h (ITRACE): Make printf_filtered arguments type correct.
444 * idecode_expression.h (CR0_COMPARE): Ditto.
445 * psim.c (psim_read_register): Ditto.
446
447 * igen.c (lf_print_my_prefix): Use __attribute__((__unused__)) to
448 silence compiler warnings about unused automatically generated
449 variables.
450 (lf_print_c_extraction): Ditto.
451 * idecode_expression.h (FPSCR_BEGIN): Ditto.
452
453 * ppc-cache-rules: Define rules for making a bitmask for all
454 registers.
455
456 * ppc-instructions: Rewrite model specific functions to use the
457 bitmask of the register number, instead of using the register
458 pointer to get the register number, and then making the bitmask.
459
460 Wed Nov 22 15:24:27 1995 Michael Meissner <meissner@tiktok.cygnus.com>
461
462 * ppc-instructions (model_branches): Add conditional argument to
463 count the number of times each type of conditional branch is used.
464 (conditional branches): Pass B0 or -1 to model_branches.
465 (model_mon_info): Print out conditional branch counts.
466 (model-data): Add support for printing out conditional branch
467 types.
468
469 Tue Nov 21 16:31:25 1995 Michael Meissner <meissner@tiktok.cygnus.com>
470
471 * igen.c (insn_table_load_insns): Add support for model-static for
472 internal functions that should not be inlined.
473 (lf_print_c_semantic): Remove model_cleanup.
474 (gen_model_{c,h}): Ditto.
475
476 * ppc-instructions: Redo model specific support once again. Add
477 floating point support to the model specific information. Flesh
478 out all of the floating mutiply add/subtract instructions. Add
479 better tracing support to the model specific information.
480
481 Sun Nov 19 23:00:52 1995 Michael Meissner <meissner@tiktok.cygnus.com>
482
483 * ppc-instructions (model data, model_busy): Rather than using a
484 bit mask for the busy units, just use a char array. Also, only
485 support 2 function units an insn can use, rather than a loop.
486
487 Fri Nov 17 14:08:08 1995 Michael Meissner <meissner@tiktok.cygnus.com>
488
489 * table.c (table_entry_read): Move setting entry->line_nr to after
490 the model specific fields so the line numbers for the annex are
491 correct.
492
493 * cpu.c (cpu_{create,init,halt}): Check for WITH_MODEL_ISSUE
494 before calling the model functions.
495
496 * debug.c (trace_descriptor): Add trace_model support.
497 * debug.h (trace_options): Ditto.
498
499 * igen.c (gen_icache_h): Create type idecode_cache as void if not
500 caching instructions.
501 (gen_model_{c,h}): Drop model_issue support. Add support for
502 model_cleanup.
503 (lf_print_my_prefix): Initialize a const itable_index with the
504 current index.
505 (lf_print_c_semantic): Call model_cleanup at the end of the
506 function to check for instructions that aren't supported yet by
507 the scheduling code.
508
509 * mon.h (count_type): New type for counters.
510 * mon.c: Use count_type instead of unsigned.
511
512 * ppc-instructions: Redo scheduling code once again. Make it all
513 inline friendly. Instead of having general code emitted by igen,
514 go the route of having each semantic routine call the appropriate
515 module.
516
517 Thu Nov 16 09:52:26 1995 Michael Meissner <meissner@tiktok.cygnus.com>
518
519 * table.c (table_entry_read): Allow the annex to have blank lines.
520
521 * ppc-instructions: Change lines in model stuff that just have a
522 tab to just newline. Add 601 support. Document most instructions
523 in terms of model specific timing information. Drop 'FUNCTION'
524 from PPC_FUNCTION_UNIT_xxx enums. Change PPC_UNIT_UNKNOWN ->
525 PPC_UNIT_BAD. Add TRACE(trace_tbd) for all data cache
526 instruction.s. Signal illegal instruciton if data cache block
527 invalidate is issued from problem state.
528
529 * igen.c (max_model_fields_len): New static to keep track of the
530 max size for the model specific fields.
531 (model_c_insn): Use max_model_fields_len to size fields.
532 (insn_table_insert_insn): Set max_model_fields_len.
533 (model_table_insert): Ditto.
534 (gen_model_{c,h}): Model_issue is now called with a processor
535 argument.
536
537 * debug.c (trace_description): Add support for trace_tbd.
538
539 * mon.c (mon_issue): Pass processor argument to model_issue.
540
541 * Makefile.in: Delete all function unit support, since the newer
542 table driven model support replaces it.
543 * cpu.{c,h}: Ditto.
544 * mon.c: Ditto.
545 * inline.{c,h}: Ditto.
546 * std-config.h: Ditto.
547 * options.c: Ditto.
548 * configure{,.in}: Ditto.
549 * Makefile.in: Ditto.
550 * psim.c: Ditto.
551 * function_unit.{c,h}: Delete these now usused files.
552
553 * std-config.h (WITH_MODEL_ISSUE): Add new macro on whether to
554 trace instructions in a model specific manor.
555 * options.c (print_options): Print it out.
556 * configure{,.in}: Add --enable-sim-model-issue option.
557 * Makefile.in: Add --enable-sim-model-issue flags.
558 * igen.c (lf_print_c_semantic): Add call to mon_issue here. Check
559 for WITH_MODEL_ISSUE.
560 * mon.c (mon_issue): Remove call to mon_issue_here.
561
562 * ppc-instructions: Move branch tracing to the actual branch
563 instructions, rather than testing it in model_issue. Add code to
564 code successful/unsuccessful branch predictions, and the number of
565 conditional branches that fell through.
566
567 Wed Nov 15 17:32:13 1995 Michael Meissner <meissner@tiktok.cygnus.com>
568
569 * cpu.h (cpu_model): Add declaration.
570
571 * cpu.c (struct _cpu): Add model_ptr to hold model specific
572 information.
573 (cpu_model): Return the model internal pointer.
574 (cpu_{create,init,halt}): Call the appropriate model function.
575
576 * inline.c (mon.c): Move include of mon.c after model.c.
577
578 * mon.c (_cpu_mon): Add fields to count unaligned memory
579 references.
580 (mon_issue): Call model_issue, not function_unit_issue.
581 (mon_{read,write}): Count # of unaligned memory accesses.
582 (mon_print_info): Switch to calling model_mon_info and
583 model_mon_info_free instead of function_unit version. Print out
584 number of unaligned reads/writes.
585
586 * {ppc-instructions,igen.c}: More global changes to add model
587 specific features.
588
589 * inline.{c,h}: Provide for inlining options.c.
590 * options.{c,h}: Ditto.
591 * std-config.h: Add OPTIONS_INLINE.
592
593 Tue Nov 14 04:47:25 1995 Michael Meissner <meissner@tiktok.cygnus.com>
594
595 * Makefile.in (devices.o, main.o): Update dependency.
596
597 * igen.c (gen_model_h): Use correct variable in loop.
598 (gen_model_c): Use strcmp, strcasecmp.
599 (gen_model_c): Use EXTERN_MODEL for arrays.
600 (gen_model_h): Use STATIC_MODEL for arrays.
601 (lf_print_c_semantic_function_header): Delete unused function.
602
603 * main.c (cpu.h): Include cpu.h to get model.h.
604
605 * inline.h ({EXTERN,STATIC}_MODEL): Define.
606
607 Mon Nov 13 09:14:13 1995 Michael Meissner <meissner@tiktok.cygnus.com>
608
609 * igen.c ({insn,model}_table_fields): Spell mnemonic correctly.
610 (gen_itable_h,itable_c_insn): Ditto.
611 (model support): Move model support around, add support for
612 model-data, model-internal. Use annex field for model-macros
613 now.
614
615 * configure.in (--enable-sim-inline): If --enable-sim-inline=no,
616 also define INLINE as nothing.
617 * configure: Regenerate.
618
619 * std-config.h (INLINE): Rather than nuking INLINE, only define it
620 as __inline__ if any of the INLINE flags are non-zero.
621
622 * options.c (print_options): Print out WITH_XOR_ENDAIN.
623
624 Mon Nov 13 23:03:45 1995 Andrew Cagney <cagneyhighland.com.au>
625
626 * ppc-instructions (rfi): Add missing code.
627
628 * cpu.c (cpu_get_time_base): Fix calculation of current value of
629 time base register.
630
631 * ppc-spr-table (TBL, TBU): Fix TBL/TBU entries - was confusing
632 m[tf]tb with m[tf]spr.
633
634 * ppc-instructions (mtspr, mfspr): Fix mttbl - wasn't storing
635 lower word.
636
637 Mon Nov 13 21:35:37 1995 Andrew Cagney <cagneyhighland.com.au>
638
639 * std-config.h (INLINE, STATIC_INLINE): Was being set to static
640 inline.. Only problem being that with ppc-opcode-simple this gave
641 it the chance to inline all the idecode functions with potentially
642 disasterous results on a 16mb PC. For moment hobble INLINE.
643
644 * configure.in, std-config.h (WITH_SMP): Make that 5 processors by
645 default ...
646
647 * configure.in: Tweek flags passed to gcc for --with-sim-warnings.
648 Firstly make them errors and secondly remove the options gcc-245
649 doesn't reconize.
650
651 Mon Nov 13 17:57:24 1995 Andrew Cagney <cagney@highland.com.au>
652
653 * misc.c (zalloc), cpu.c (cpu_init), devices
654 (console_io_read_buffer_callback, icu_io_read_buffer_callback,
655 vm_io_read_buffer_callback), main.c (zalloc), mon.c (memset),
656 sim_calls.c (zalloc) : replace bzero() with memset().
657
658 * emul_netbsd.c (write_direntries), psim.c (psim_read_register,
659 psim_write_register): replace bcopy() with memcpy().
660
661 Sun Nov 12 20:55:41 1995 Andrew Cagney <cagneyhighland.com.au>
662
663 * configure.in: for --disable-sim-inline (--enable-sim-inline=no),
664 force DEFAULT_INLINE to 0 rather then trusting the std
665 configuration.
666
667 Sun Nov 12 20:55:41 1995 Andrew Cagney <cagneyhighland.com.au>
668
669 * igen.c (lf_print_idecode_table, idecode_table_leaf): Fix
670 generation of switch entries in tables - treat the same as
671 cracking/semantic functions.
672
673 * igen.c (idecode_switch_end, idecode_switch_leaf): Fix generation
674 of a boolean switch statement (field zero or non-zero).
675
676 * ppc-opcode-test-1, ppc-opcode-test-2: New files. These test the
677 switch/table generation ability of igen.
678
679 * igen.c (idecode_switch_leaf): Fix code output when a switch
680 statement needs to look up a table.
681
682 * igen.c (idecode_declare_if_switch): New function called from
683 gen_idecode_c - need to declare any idecode switch functions
684 before they are used in idecode tables.
685
686 * igen.c (lf_print_c_cracker_function, idecode_crack_leaf,
687 idecode_crack_insn): Add is_inline_function argument to code
688 printing cracker functions which indicates if STATIC_IDECODE or
689 STATIC_INLINE_IDECODE should be used for definition. For
690 idecode_crack_insn (which implies not duplicating/expanding) don't
691 declare function as inline - we assume that the only time this is
692 code is generated is when things are being tested. For
693 idecode_crack_leaf, make static (instead of INLINE) if the
694 instructions parent is a table as function will always be called
695 via a table.
696
697 * igen.c (idecode_expand_if_switch): Declare as STATIC_IDECODE not
698 STATIC_INLINE_IDECODE. Only the outermost idecode switch will be
699 called directly, all others are called via a table.
700
701 * igen.c (lf_print_semantic_function_header, semantics_h_leaf,
702 semantics_h_insn, semantics_h_function,
703 lf_print_c_semantic_function, semantics_c_function): Add
704 is_inline_function argument to lf_print_semantic_function_header
705 to indicate if an inline or static function declaration/definition
706 should be output. Depending on situtation call accordingly:
707 functions (not instruction semantic routines) are always inline;
708 Semantic routines are made inline when there is no icache (cache
709 will contain the function address) and are duplicating (see above)
710 and the parent of the instruction is a switch statement.
711
712 * igen.c (opcode_field_new): Delete. Code changed to use ZALLOC
713 and moved to insn_table_find_opcode_field.
714
715 * table.c (table_open): Fix typo (nr_model_fields vs nr_fields).
716
717 * igen.c (model_c_insn): Suggestion - document the name of the
718 instruction on each line of the instruction model table.
719
720 Fri Nov 10 00:44:38 1995 Andrew Cagney <cagneyhighland.com.au>
721
722 * emul_netbsd.c (do_ioctl): Cleanup compilation.
723
724 * sim_callbacks.h (__attribute__): Only define if not defined (was
725 already defined on NetBSD host).
726
727 Wed Nov 8 21:49:52 1995 Andrew Cagney <cagneyhighland.com.au>
728
729 * std-config.h (WITH_XOR_ENDIAN), configure.in, Makefile.in: New
730 macro, indicates if the PowerPC's horrible XOR endian mode should
731 be suported. Add to configure and make.
732
733 * vm_n.h (vm_data_map_read_N, vm_data_map_write_N), vm.c
734 (vm_instruction_map_read): If XOR endian, xor the address
735 with a value from an xor table (indexed by size of access).
736
737 * vm.c (vm_synchronize_context), cpu.c (cpu_synchronize_context):
738 set up xor table to xor if there is a conflict between the
739 CURRENT_TARGET_ENDIAN and the endian indicated in the MSR. Move
740 check of suported change of endian mode from cpu.c to vm.c.
741
742 * vm.c (vm_data_map_write_buffer, vm_data_map_read_buffer):
743 Hopefully added correct hack to handle XOR endian mode.
744
745 FIXME: If NONSTRICT alignment and XOR ENDIAN and MSR indicates
746 little endian mode, the model accepts miss aligned transfers.
747
748 FIXME: Need to create an `init' device that, during
749 initializatioin for XOR mode, it mushes (XOR address) all the dma
750 data before passing it on to the core for storage. Just like the
751 real thing really.
752
753 Wed Nov 8 21:49:52 1995 Andrew Cagney <cagneyhighland.com.au>
754
755 * devices.c (halt_io_write_buffer_callback): Use value written to
756 halt device to determine exit status. Thus allowing
757 success/failure of OEA tests.
758
759 Wed Nov 8 00:10:38 1995 Andrew Cagney <cagneyhighland.com.au>
760
761 * ppc-instructions (icbi): If icache present flush it.
762
763 Tue Nov 7 23:36:31 1995 Andrew Cagney <cagneyhighland.com.au>
764
765 * devices.c (htab_init_callback): Add code to create htab/pte.
766
767 * devices.c (dma_file, file_init_callback, htab_init_callback):
768 New function - Dma the named file into memory at the specified
769 address. Use.
770
771 * device_tree.h, device_tree.c (scand_*): New functions.
772
773 Tue Nov 7 23:36:31 1995 Andrew Cagney <cagneyhighland.com.au>
774
775 * filter_filename.c, Makefile.in: Change so that only dependant on
776 a very limited nr of files. Stops an unnecessary dependency.
777
778 Tue Nov 7 15:44:33 1995 Andrew Cagney <cagney@highland.com.au>
779
780 * core.c (core_map_find_mapping): Use cpu_halt rather than error
781 to abort an access to an undefined address.
782
783 Sun Nov 12 07:58:09 1995 Michael Meissner <meissner@tiktok.cygnus.com>
784
785 * igen.c (model_table_insert_{macro,function}): New functions.
786 (insn_table_load_insns): Call them.
787 (gen_model_h): Move section emiting model-macros to be first.
788 (model_{c,h}_function): New functions cloned from semantic
789 functions to print out the prototype and function for
790 model-functions.
791 (gen_model_{c,h}): Print out model-functions.
792
793 * ppc-instructions (model_{start,halt,print_info}): Add dummy
794 model-functions.
795
796 * options.c (print_options): Print out WITH_{,DEFAULT_}MODEL, not
797 WITH_PPC_{,DEFAULT_}_MODEL.
798 (options_ppc): Delete now unused function.
799 (cpu.h): Include cpu.h, not just basics.h.
800
801 * std-config.h (WITH_{,DEFAULT_}MODEL): Define.
802
803 * igen.c (model_macros, last_model_macro): New statics to keep
804 track of macros to go in model.h.
805 (insn_table_load_insns): Add model-macros to model_macros linked
806 list.
807 (model_table_fields): Add field for printable name.
808 (gen_model_h): If there are model macros defined, print them out.
809 Print out DEFAULT_MODEL as the first model if there any models
810 specified, otherwise MODEL_NONE. Print out external decl for
811 current_model. Print out decl for model_set.
812 (gen_model_c): Add function model_set. Switch to use printable
813 name for the model, not the internal identifier used.
814
815 * psim.c (current_model): New global variable.
816
817 * ppc-instructions: Add macros for flag defines. Switch first
818 model so 604 is first.
819
820 * main.c (main): Call model_set, not function_unit_model.
821 * sim_calls.c (sim_open): Ditto.
822 * sim_calls.c, Makefile.in: sim_calls.c now includes cpu.h.
823
824 Sat Nov 11 07:27:41 1995 Michael Meissner <meissner@tiktok.cygnus.com>
825
826 * mon.h (mon_events): New enumeration for other events we want to
827 handle.
828 (mon_event): Add declaration for function.
829
830 * mon.c (mon_event): New function.
831 (mon_print_info): Print icache misses.
832
833 * psim.c (run_until_stop): Monitor icache misses.
834
835 * configure.in (--enable-sim-inline): Fix typos in handling comma
836 separated inline options.
837 (--enable-sim-icache): Echo icache size.
838 * configure: Regenerate.
839
840 * igen.c (semantics_h_print_function): Emit STATIC_SEMANTICS
841 instead of INLINE_SEMANTICS so that the compiler won't keep all of
842 the semantic functions as inline RTL, given that the address of
843 the function is taken which forces outline calls anyway.
844 (lf_print_c_semantic_function_header): Ditto.
845 (gen_semantics_h): Define STATIC_SEMANTICS as nothing if not
846 defined.
847 (lf_print_c_cracker_function): Emit STATIC_IDECODE instead of
848 STATIC_INLINE_IDECODE.
849 (gen_idecode_c): Define STATIC_IDECODE if not defined.
850 (gen_model_h): Use #ifdefs to define types to hold model units,
851 cycles, and flags.
852 (model_table_insert): Add a sentinel functional unit at the end to
853 simplify loop processing.
854 (model_c_insn): Use <function-unit>_SENTINAL instead of 0 for any
855 instruction not specifing a function unit for the current model.
856 (gen_model_{c,h}): Provide bounds for model_time_mapping.
857
858 * inline.h (STATIC_SEMANTICS): Define to be static if
859 SEMANTICS_INLINE is defined.
860 (STATIC_IDECODE): Define to be static if IDECODE_INLINE is
861 defined.
862
863 * options.c (print_options): Fix typo.
864
865 Fri Nov 10 06:39:46 1995 Michael Meissner <meissner@tiktok.cygnus.com>
866
867 * configure.in (--enable-sim-{opcode,config}): Use $srcdir when
868 check for the existence of files.
869 * configure: Regenerate.
870
871 * table.c (table): New field nr_model_fields.
872 (table_open): New parameter nr_model_fields.
873 (table_entry_read): Parse model fields that begin with a '*' after
874 each instruction.
875 * igen.c, dgen.c: Change callers of table_open.
876
877 * igen.c: Add support for dumping model specific information in
878 model.h and model.c.
879 (insn_field_name): Delete unused array.
880 (global variables): Make global variables static, so we can tell
881 when they are no longer used.
882 (cache_semantic_actual): Delete unused variable.
883 (insn_table_load_insns): If the insn is really a machine model,
884 call model_table_insert instead of other processing.
885 (model_table_insert): New function to handle defining the
886 functional units of a particular machine model.
887 (insn_table): Add last_function field so we can add functions at
888 the end.
889 (insn_table_insert_function): Use last_function field when
890 appending new function.
891
892 * ppc-instructions: Add a few model specific information for 603,
893 603e, and 604 for testing purposes.
894
895 * table.h (table_model_entry): New linked list to hold model
896 specific information, one per line.
897 (table_entry): Add model_first, model_last fields.
898
899 * configure.in (--enable-sim-inline): If gcc is found and
900 --enable-sim-inline is not specified, defaine DEFAULT_INLINE to 1,
901 not 2.
902 (--enable-sim-reserved-bits): New switch to check whether reserved
903 bits are set in the instruction.
904 (--enable-sim-opcode): Make complex the default.
905 (all switches): Add appropriate checks and error messages.
906 * configure: Regenerate.
907
908 * Makefile.in (RESERVED_CFLAGS): New variable set by
909 --enable-sim-reserved-bits.
910 (CONFIG_CFLAGS): Include RESERVED_CFLAGS.
911 (BUILT_SRC): igen now generates model.c and model.h.
912 (LIB_OBJ): Include table.o.
913 (tmp-igen): Add -m/-M options to write model.c/model.h.
914 (model.o): New object.
915 (CPU_H): Include model.h.
916
917 * cpu.h: Include model.h.
918
919 * std-config.h (WITH_RESERVED_BITS): Define.
920 (MODEL_INLINE): Ditto.
921
922 * options.c (print_options): Print out WITH_RESERVED_BITS.
923
924 Thu Nov 9 12:22:15 1995 Michael Meissner <meissner@tiktok.cygnus.com>
925
926 * configure.in: If --silent, don't output information messages.
927 * configure: Regenerate.
928
929 * configure.in (--enable-sim-alignment): Fix typo in specifing non
930 strict alignment.
931 (--enable-sim-switch): Make default on.
932 (--enable-sim-duplicate): Make default on.
933 (--enable-sim-smp): Make default 0.
934 (--enable-sim-mon): Don't set sim_float if not set.
935 (--enable-sim-inline): If gcc is found and --enable-sim-inline is
936 not specified, define DEFAULT_INLINE to be 2.
937 (all --enable-sim-* rules): Echo rules set to non empty to file
938 descriptor 6.
939 * configure: Regenerate.
940
941 * options.c (options_env): Fix typo if WITH_ENV is 0.
942 (print_options): Print GCC compiler version if available and
943 date/time options was compiled. If OPCODE_RULES, IGEN_FLAGS,
944 and/or DGEN_FLAGS are defined, print them.
945
946 * Makefile.in (all link actions): Pass SIM_CFLAGS as well as
947 CFLAGS.
948 (options.o): Compile options.o with OPCODE_RULES, IGEN_FLAGS, and
949 DGEN_FLAGS defined, so they can be printed out.
950
951 * igen.c (lf_print_c_validate): Check for WITH_ASSERT, so that
952 this test can be compiled away if the user really wants a fast
953 simulator by not doing assertion failures.
954
955 Wed Nov 8 13:19:47 1995 Michael Meissner <meissner@tiktok.cygnus.com>
956
957 * options.c: New file to print out all of the WITH_ options.
958 * options.h: New include file to declare print_options.
959 * debug.h (trace_options): Add trace_opts to call print_options.
960 * debug.c (trace_description): Add trace_opts support.
961 * main.c (main): If user requested options, print them.
962 * sim_calls.c (sim_open): Ditto.
963
964 * igen.c (opcode_field_new): Add void to make it a proper prototype.
965
966 * emul_generic.c (emul_enter_call): Make printf_filtered arguments
967 type correct.
968 * emul_netbsd.c (do_kill): Ditto.
969 * registers.c (registers_dump): Ditto.
970 * vm.c (om_translate_effective_to_real): Ditto.
971 * vm_n.h (vm_data_map_read_N): Ditto.
972 (vm_data_map_write_N): Ditto.
973 * devices.h (DTRACE_INIT): Ditto.
974 (DTRACE_{ATTACH,DETACH}_ADDRESS): Ditto.
975 (DTRACE_IO_{READ,WRITE}_BUFFER): Ditto.
976 (DTRACE_DMA_{READ,WRITE}_BUFFER): Ditto.
977 * devices.c (update_for_binary_section): Ditto.
978 (write_stack_arguments): Ditto.
979 (stack_ioctl_callback): Ditto.
980 * device_tree.c (device_tree_add_passthrough): Ditto.
981 (device_tree_{add,find}_device): Ditto.
982 (device_tree_{add,find}_integer): Ditto.
983 (device_tree_find_{string,boolean}): Ditto.
984 (device_tree_init{,_device}): Ditto.
985 (device_tree_dump): Ditto.
986 * sim_calls.c (sim_{read,write}): Ditto.
987 (sim_{fetch,store}_register): Ditto.
988 (sim_stop_reason): Ditto.
989
990 * sim_callbacks.h (printf_filtered): Declare with attribute
991 printf, so we can enable format checks.
992
993 * devices.c (console_io_{read,write}_buffer_callback): Cast swtich
994 argument to int, since ANSI doesn't allow long switch values.
995 * emul_netbsd.c (do___sysctl): Ditto.
996
997 * emul_netbsd.c (do___sysctl): Fix up printf call.
998
999 * corefile.c (core_translate): Don't do arithmetic with void *
1000 pointers. Cast to char * first.
1001
1002 * function_unit.c (FUNC_{LOAD,STORE}): Rename from {LOAD,STORE}
1003 and change all uses.
1004
1005 * Makefile.in ({FUNC,MODEL,WARNING}_CFLAGS): New flags set by
1006 configure --enable switches.
1007 (CONFIG_CFLAGS): Include FUNC_CFLAGS and MODE_CFLAGS.
1008 (.c.o): Include WARNING_CFLAGS.
1009 (CPU_H): Include function_unit.h.
1010 (LIB_OBJ): Include function_unit.o.
1011 (BUILT_SRC_WO_CONFIG): Split from BUILT_SRC and do not include
1012 config.h or ppc-config.h.
1013 (BUILT_SRC): Include BUILT_SRC_WO_CONFIG, config.h and
1014 ppc-config.h.
1015 (filter_filename.o): Include config.h/ppc-config.h dependencies.
1016 (idecode.o, semantics.o, psim.o): Specify CC line without
1017 WARNING_CFLAGS so that we don't get all of the unused variable
1018 warnings that are generated.
1019 (function_unit.o): Add rule to build.
1020 (main.o, sim_calls.o): Add function_unit.h, itable.h dependencies.
1021 (mon.o): Include mon.c dependency.
1022 (TAGS): Depend on BUILT_SRC.
1023 (clean): Don't delete config.h or ppc-config.h
1024
1025 * basics.h (sim_callbacks.h): Move include after the include of
1026 config.h and ppc-config.h.
1027
1028 * bits.{h,c} (ROTL32,ROTL64): Move these functions to bits.c. Add
1029 support for BITS_INLINE to inline these. Add declarations to
1030 bits.h.
1031
1032 * configure.in (--enable-sim-warnings): Add new option to specify
1033 compiler warnings for all modules except idecode.o and semantics.o
1034 which have lots of unused variables because they are machine
1035 generated.
1036 (--enable-sim-function-unit): New switch to configure whether
1037 function unit support is compiled in or not.
1038 (--enable-sim-{,default-}mode): New switches to control which cpu
1039 model is used.
1040 * configure: Regenerate.
1041
1042 * corefile.c (core_attach_address_callback): Delete unused
1043 variable device_address.
1044
1045 * cpu.c (struct _cpu): Add function unit pointer field func_unit.
1046 (cpu_create): If WITH_FUNCTION_UNIT, call function_unit_create.
1047 (cpu_init): If WITH_FUNCTION_UNIT, call function_unit_init.
1048 (cpu_halt): If WITH_FUNCTION_UNIT, call function_unit_halt.
1049 (cpu_function_unit): New function to return func_unit field.
1050
1051 * cpu.h (function_unit.h): Include new include file.
1052 (cpu_function_unit): Declare.
1053
1054 * debug.c (stdlib.h): Test HAVE_STDLIB_H, not HAVE_STDLIB.
1055 (config.h): Include config.h.
1056
1057 * devices.c (icu_io_write_buffer_callback): Delete unused variable
1058 system.
1059
1060 * emul_generic.c (emul_exit_call): Print out status value.
1061
1062 * emul_netbsd.c (do_read): Delete unused variable nr_moved.
1063
1064 * filter_filename.h (includes): Include config.h, ppc-config.h,
1065 not basics.h.
1066
1067 * inline.c: Include bits.c if BITS_INLINE. Include
1068 function_unit.c if FUNCTION_UNIT_INLINE.
1069
1070 * inline.h (INLINE_BITS): Define if BITS_INLINE.
1071 (INLINE_FUNCTION_UNIT): Define if FUNCTION_UNIT_INLINE.
1072
1073 * interrupts.c (instruction_storage_interrupt): Delete unused
1074 variable nia.
1075
1076 * lf.h (config.h): Include config.h.
1077
1078 * main.c (includes): Include function_unit.c. If HAVE_UNISTD_H,
1079 include unistd.h.
1080 (usage): Update for -m model, -i, and -I options.
1081 (main): Delete unused variables stack_pointer and i. Add support
1082 for -i, -m model arguments. Call psim_print_info with verbose ==
1083 1 if -i, and verbose == 2 if -I.
1084
1085 * mon.c (stdio.h): Include stdio.h to pick up sprintf prototype.
1086 (mon_issue): Call function_unit_issue if function units are
1087 supported.
1088 (mon_print_info): Take psim * argument. Print out information
1089 from function_unit if available. Move read/write stats to always
1090 print, instead of printing if verbose > 1. Fix up plural
1091 vs. singular usage.
1092
1093 * mon.h (mon_print_info): Update prototype.
1094
1095 * psim.c (current_ppc_model): Add global variable.
1096 (psim_print_info): Pass system argument to mon_print_info.
1097
1098 * sim_calls.c (function_unit.h): Include.
1099 (sim_open): Add support for -i and -m model options. If -i call
1100 psim_print_info with verbose == 1, if -I, with verbose == 2.
1101 (sim_resume): Delete unused variable program_counter.
1102
1103 * std-config.h (WITH_FUNCTION_UNIT): Define.
1104 (ppc_model): Add enumeration giving all PowerPC models currently
1105 known about.
1106 ({WITH,CURRENT}_PPC_MODEL): Define.
1107 (FUNCTION_UNIT_INLINE): Define.
1108
1109 * table.c (config.h): Include config.h.
1110
1111 * vm.c (om_virtual_to_real): Print pte_word_{0,1} so the compiler
1112 doesn't complain that they're unused.
1113
1114 * vm_n.h (vm_data_map_read_N): Delete unused variable rval.
1115
1116 Mon Nov 6 23:15:54 1995 Andrew Cagney <cagney@highland.com.au>
1117
1118 * sim-endian.c (ppc-endian.c), sim-endian.h (ppc-endian.h):
1119 renameed. These files are target independant.
1120 * Makefile.in, basics.h: update for new name.
1121
1122 * sim-endian.h (SWAP_N), sim-endian.c (_SWAP_1): Rename existing
1123 SWAP_<N> to _SWAP_<N> so that sim-endian.h can contain SWAP_N
1124 macro's as required.
1125
1126 * sim-endian.c, sim-endian-n.h (new file): Move endian code into a
1127 debugable header file.
1128
1129 * ppc-instructions (Byte-Reverse): Enable byte reverse
1130 instructions using SWAP_N macros.
1131
1132 Mon Nov 6 10:39:28 1995 Michael Meissner <meissner@tiktok.cygnus.com>
1133
1134 * Makefile.in (config.status): Remove references to config.make
1135 and config.hdr.
1136
1137 * config.{make,hdr}: Delete, no longer used.
1138 * build-psim: Ditto.
1139
1140 Mon Nov 6 20:49:56 1995 Andrew Cagney <cagney@highland.com.au>
1141
1142 * sim_calls.c (sim_open): Fix parsing of `target sim' options.
1143
1144 * device_tree.c (device_tree_add_string): Wasn't saving the value
1145 of the string being entered into the tree.
1146
1147 * psim.c (create_filed_device_tree): Not terminating string device
1148 names with a null.
1149
1150 * psim.c (psim_create): Use `env' instead of
1151 `environment-architecture' to be consistent with configure.
1152 Reconize user/uea, virtual/vea and operating/oea.
1153
1154 Sat Nov 4 12:29:45 1995 Fred Fish <fnf@cygnus.com>
1155
1156 * core.c: Rename to corefile.c
1157 * core.h: Rename to corefile.h
1158 * inline.c: Include corefile.h, renamed from core.h.
1159 * cpu.h: Include corefile.h, renamed from core.h
1160 * vm.c: Include corefile.h, renamed from core.h
1161 * corefile.c: Include corefile.h rather than core.h
1162 * README.psim (KNOWN PROBLEMS): Change core.* references to corefile.*
1163 references.
1164 * Makefile.in (CPU_H): Change core.h to corefile.h
1165 (vm.o): Change dependency to corefile.h
1166 (LIB_SRC): Change core.c to corefile.c.
1167 (LIB_OBJ): Change core.o to corefile.o.
1168 (corefile.o): Change dependencies to corefile.c, corefile.h.
1169
1170 Fri Nov 3 11:37:24 1995 Michael Meissner <meissner@tiktok.cygnus.com>
1171
1172 * ppc-instructions (data cache instructions): Make all data cache
1173 instructions nops instead of invalid instructions.
1174
1175 * Makefile.in (CONFIG_CFLAGS): Add ALIGNMENT_CFLAGS and
1176 TIMEBASE_CFLAGS which weren't included.
1177
1178 Thu Nov 2 08:54:04 1995 Michael Meissner <meissner@tiktok.cygnus.com>
1179
1180 * Makefile.in: Uncomment built file dependencies.
1181
1182 * configure.in: Rewrite --enable-sim switch handling to use the
1183 autoconf builtins so it works correctly if the configure or
1184 Makefile.in files are modified and make decides to rebuild
1185 Makefile. Also document all of the --enable-sim switches
1186 supported. Check whether getrusage and sys/resource.h are
1187 supported.
1188 * config.in: Regenerate.
1189 * configure: Regenerate.
1190 * Makefile.in: Add support for all of the variables set with
1191 --enable-sim switches.
1192
1193 * Makefile.in (clean): make clean now removes all built sources as
1194 well.
1195
1196 * cpu.c: Use HAVE_STRING_H, HAVE_STRINGS_H, HAVE_UNISTD_H,
1197 HAVE_TIME_H, HAVE_SYS_TIMES_H, HAVE_SYS_RESOURCE_H defined in
1198 the generated config.h.
1199 * debug.c: Ditto.
1200 * device_tree.c: Ditto.
1201 * devices.c: Ditto.
1202 * dgen.c: Ditto.
1203 * emul_netbsd.c: Ditto.
1204 * igen.c: Ditto.
1205 * lf.c: Ditto.
1206 * misc.c: Ditto.
1207 * psim.c: Ditto.
1208 * registers.c: Ditto.
1209 * sim_calls.c: Ditt.
1210 * table.c: Ditto.
1211
1212
1213 * main.c (main): Call psim_print_info with verbose == 2.
1214
1215 * mon.c (mon_print_info): Align the cpu number and number of
1216 instructions fields. Do not print an instruction category if the
1217 CPU did not execute any of those instructions. Print out number
1218 of reads and writes. If getrusage is supported, print out number
1219 of simulated instructins per second.
1220
1221 * configure.in: Add support for --enable-sim-opcode=stupid.
1222 * configure: Regenerate.
1223
1224 Wed Nov 1 23:46:59 1995 Andrew Cagney <cagney@highland.com.au>
1225
1226 * std-config (INLINE_DEVICE_TREE): Don't inline either of
1227 device_tree.c or devices.c. There is no significant gain.
1228
1229 * configure.in, Makefile.in: add --enable-sim-icache=[0-9]* and
1230 IGEN_ICACHE macro.
1231
1232 Wed Nov 1 23:46:59 1995 Andrew Cagney <cagney@highland.com.au>
1233
1234 * igen.c (main), misc.h (target_a2i, i2target), misc.c: Add
1235 functions to convert between target and igen internal bit numbers.
1236 Make IO go through these functions. Add -b (bit size) and -h (high
1237 bit nr) options to igen. Typical usage would be: ./igen -b 16 -h
1238 15 for a 16 bit instruction format with the msb given a number 15.
1239
1240 Wed Nov 1 22:17:32 1995 Andrew Cagney <cagney@highland.com.au>
1241
1242 * dgen.c (main): Was outputting optarg even when it was NULL.
1243
1244 Tue Oct 31 23:48:33 1995 Andrew Cagney <cagney@highland.com.au>
1245
1246 * vm_n.h (vm_data_map_load_N, vm_data_map_store_n), debug.h,
1247 debug.c: Add tracing of load/store unit (virtual) with -t
1248 load-store.
1249
1250 Tue Oct 31 21:44:01 1995 Andrew Cagney <cagney@highland.com.au>
1251
1252 * std-config.h (WITH_ENVIRONMENT): Add USER_ENVIRONMENT which does
1253 not include things such as the time base and events.
1254
1255 * interrupt.c, sim_calls.c, cpu.h, vm.c, configure.in: Add UEA to
1256 all environment switches for above.
1257
1258 * psim.c (psim_create): ditto - new device tree node name is
1259 /options/environment-architecture with values user, virtual and
1260 operating.
1261
1262 Tue Oct 31 21:31:32 1995 Andrew Cagney <cagney@highland.com.au>
1263
1264 * ppc-opcode-stupid: Third example of use of opcode table - this
1265 one expands all mtspr/mfspr and branch instructions. Appears to
1266 give about a 10% gain in performance if everything enabled. Also
1267 takes about 150mb of swap to build.
1268
1269 Wed Nov 1 10:49:48 1995 Michael Meissner <meissner@tiktok.cygnus.com>
1270
1271 * emul_netbsd.c (do_exit): Print arguments and close parenthesis
1272 if tracing, since exit doesn't go through emul_exit_call.
1273 (do_read): Print arguments if tracing.
1274 (do_write): Ditto.
1275 (do_open): Ditto.
1276 (do_break): Ditto.
1277 (do_kill): Ditto.
1278 (do_dup): Ditto.
1279 (do_sigprocmask): Replace trace with printing arguments if
1280 tracing.
1281 (do_ioctl): Print arguments if tracing.
1282 (do_umask): Ditto.
1283 (do_dup2): Ditto.
1284 (do_fcntl): Ditto.
1285 (do_gettimeofday): Ditto.
1286 (do_getrusage): Ditto.
1287 (do_fstatfs): Ditto.
1288
1289 * filter_filename.c: New file to provide filter_filename to strip
1290 the directory prefix from a file.
1291 * filter_filename.h: New include file to declare filter_filename.
1292
1293 * debug.h: Include filter_filename.h.
1294 (TRACE,DTRACE,ERROR): Use filter_filename on __FILE__.
1295
1296 * misc.h: Include filter_filename.h.
1297 (ASSERT): Use filter_filename on __FILE__.
1298
1299 * igen.c (lf_print_my_prefix): Use filter_filename on the filename
1300 argument.
1301
1302 * Makefile.in: Add filter_filename support.
1303
1304 * ppc-instructions (dcbi, icbi): Make these NOPs rather than
1305 invalid instructions.
1306
1307 * configure.in: Add support for more --enable-sim-* switches.
1308 Use config.make and config.hdr to write to Makefile and config.h
1309 respectively. Don't rewrite Makefile, just append to it.
1310 * configure: Regenerate.
1311 * config.{make,hdr}: New shell scripts.
1312
1313 * Makefile.in: Remove all variables set by configure.in.
1314 (psim.o): Depend on $(BUILT_SRC) also.
1315
1316 * emul_netbsd.c (do_gettimeofday,do_getrusage): When comparing an
1317 integer, use 0, not NULL.
1318
1319 Tue Oct 31 15:20:04 1995 Michael Meissner <meissner@tiktok.cygnus.com>
1320
1321 * configure.in: Add support for --enable-sim-inline,
1322 --enable-sim-bswap, --enable-sim-cflags, --enable-sim-complex,
1323 --enable-sim-switch, --enable-sim-duplicate, --enable-sim-filter,
1324 and --enable-sim-endian switch to control various Makefile
1325 variables.
1326 * configure: Regenerate from configure.in.
1327 * Makefile.in: Add various Make variables that the various
1328 switches alter.
1329
1330 * std-config.h (DEFAULT_INLINE): Don't set this to 2 if using GCC
1331 and optimizing by default.
1332
1333 Fri Oct 27 19:26:27 1995 Andrew Cagney <cagney@highland.com.au>
1334
1335 * bits.h (ROTL32, ROTL64): Were functions, made them macros, now
1336 make them functions again. Appears 2.6.3 is confused by just a
1337 macro.
1338
1339 Thu Oct 26 18:31:58 1995 Andrew Cagney <cagney@highland.com.au>
1340
1341 * ppc-endian.c (SWAP_8): Fix 8 byte swap!
1342
1343 * psim.c (psim_create): Not correctly checking that runtime
1344 configuration of things like ENDIAN, ENVIRONMENT and ALIGNMENT
1345 matched the compiled in ones.
1346
1347 * debug.h (ITRACE), igen.c: Tidy up more tracing flags -
1348 trace_semantics is now different to trace_idecode, the former
1349 checks the cache.
1350
1351 Tue Oct 24 21:54:13 1995 Andrew Cagney <cagney@highland.com.au>
1352
1353 * ppc-instructions (mtsrin): Missing instruction
1354 * ppc-instructions (mfsrin): Missing instruction
1355 * ppc-instructions (eieio): Missing instruction
1356
1357 Tue Oct 24 20:55:29 1995 Andrew Cagney <cagney@highland.com.au>
1358
1359 * build-psim: New shell script - see internals for usage,
1360 simplifies the process of building custom simulators.
1361
1362 Mon Oct 23 23:48:59 1995 Andrew Cagney <cagney@highland.com.au>
1363
1364 * std-config.h (SEMANTICS_INLINE): Tidy up notes on each of the
1365 INLINE macros. Make SEMANTICS_INLINE == 1 if DEFAULT_INLINE == 2.
1366 Don't use DEFAULT_INLINE to define REGISTERS_INLINE DEVICES_INLINE
1367 DEVICE_TREE_INLINE or INTERRUPTS_INLINE as none of these are on
1368 the instruction or data critical paths.
1369
1370 * FIXME: devices.c/emul_netbsd.c would benefit (slightly) from
1371 the inclusion of device_tree.c/emul_generic.c.
1372
1373 Mon Oct 23 00:31:50 1995 Andrew Cagney <cagney@highland.com.au>
1374
1375 * os_emul.[hc], emul_generic.[hc], emul_netbsd.[hc]: replace
1376 system.[hc]. Start of suport for multiple emulations and
1377 emulation state (os_emul object).
1378
1379 * emul_generic.[hc]: Start of code to implement proper system call
1380 tracing (from spy).
1381
1382 Sun Oct 22 21:33:51 1995 Andrew Cagney <cagney@highland.com.au>
1383
1384 * cpu.h, cpu.c (cpu_init): New function, zero the registers before
1385 the processor is started. Fixes problem of registers being
1386 undefined when restarting from within gdb.
1387
1388 * cpu.h, cpu.c (cpu_flush_icache): New function, flushes the
1389 instruction cache (if present). Fixes problem of cpu caching gdb
1390 breakpoint instructions.
1391
1392 FIXME: PSIM sometimes aborts calling error(), it should instead
1393 call sim_error() say which takes care of housekeeping such as
1394 saving the CIA before calling error.
1395
1396 * NOTE: cpu_flush_cache() instead of cpu_synchronize_context() is
1397 used when restarting a simulation because the latter has the
1398 unwanted side effect (well I as a kernel hacker think it is) of
1399 performing an isync when the instruction stream doesn't contain
1400 one.
1401
1402 Sun Oct 22 19:27:48 1995 Andrew Cagney <cagney@highland.com.au>
1403
1404 * mon.h (new), mon.c (new), std-config.h (WITH_MON): Performance
1405 monitoring module. Counts both instructions issued and
1406 load/stores.
1407
1408 * NOTE: mon does not contain to count instruction loads as this
1409 information is already available from the mon_issue() hook.
1410
1411 * igen.c (lf_print_c_semantic), vm_n.h: Add counting code.
1412
1413 * psim.h, psim.c (psim_create), cpu.h, cpu.c (cpu_create): Attach
1414 a common monitor to each of the cpus. Delete
1415 cpu_increment_number_of_insns() and cpu_get_number_of_insns()
1416 replaced by copied code in mon.[hc].
1417
1418 Sun Oct 22 18:42:45 1995 Andrew Cagney <cagney@highland.com.au>
1419
1420 * sim_calls.c, main.c, psim.c (psim_create): always create
1421 `WITH_SMP' cpus. The actual number of CPU's active in a
1422 simulation run is taken from the device node: /init/smp (an
1423 integer). WITH_SMP changed to 2 (remember to put it back to 0).
1424
1425 Fri Oct 20 17:26:54 1995 Andrew Cagney <cagney@highland.com.au>
1426
1427 * system.c: More system call emulation. If code appears NetBSD
1428 specific, make conditional to being compiled on a NetBSD system
1429 (sigh).
1430
1431 Wed Oct 18 23:02:20 1995 Andrew Cagney <cagney@highland.com.au>
1432
1433 * Makefile.in, gen.c(delete), igen.c(new), dgen.c(new),
1434 lf.[ch](new), table.[ch](new): Split into two generators - igen
1435 that outputs the instruction tables and dgen that outputs the spr
1436 tables. Add -f (filter out) flag to igen to filter out certain
1437 instructions (ex 64 bit ones) from the created tables. Include
1438 $(LIBIBERTY_LIB) in link options in case host lacks some libc
1439 functions.
1440
1441 * NOTE: igen, since it was originally written for the
1442 PowerPC/RS6000, things the MSB is 0 and the LSB is 63{31}.
1443
1444 * Makefile.in, std-config.h, ppc-cache-rules(new),
1445 ppc-opcode-complex(new), ppc-opcode-simple(new): (for igen) Create
1446 cache-rule and opcode-rule tables from macros found std-config.h.
1447 Delete corresponding macro's from std-config.h.
1448
1449 * igen.c (gen_itable_c, gen_itable_h), Makefile.in: code to output
1450 an table of all the instructions. Code to output a type
1451 enumerating all the instructin names.
1452
1453 * igen.c(lf_print_c_semantic): Move call to increment instruction
1454 counter so that it occures _after_ the instruction has been fully
1455 validated, was double counting illegal/invalid instructions. Add
1456 conditional so only compiled in when WITH_PROFILE enabled (enabled
1457 by default).
1458
1459 * igen.c, cpu.h, cpu.c(cpu_increment_number_of_insns): Include
1460 itable.h, count individual instruction types not just total,
1461 adjust reporting functions to output this.
1462
1463 * ppc-instructions (64 bit Load Doubleword with Update Indexed):
1464 Had 32./ instead of 31./
1465
1466 * ppc-instructions (64 bit Store Double Word Conditional Indexed):
1467 bitrot - updated to use newer CR register operators.
1468
1469 * ppc-instructions (64bit Floating Convert from Integer
1470 Doubleword): Correct call to Round_Float().
1471
1472 Mon Oct 16 00:31:20 1995 Andrew Cagney <cagney@highland.com.au>
1473
1474 * basics.h: #include "sim_callbacks.h" earlier so that its
1475 prototypes are declared in all other header files.
1476
1477 * bits.h, bits.c, idecode_expression.h (ROTL32, ROTL64): Update
1478 doc in bits.h, remove dead code in bits.c, move ROTL32/ROTL64 into
1479 bits.h.
1480
1481 * cpu.c(cpu_add_commas), device_tree.h, device_tree.c(scand_*):
1482 Add size of buffer argument to functions writing a string into a
1483 buffer. Check for buffer overflow.
1484
1485 Sun Oct 15 22:16:11 1995 Andrew Cagney <cagney@highland.com.au>
1486
1487 * devices.h, devices.c, debug.h, debug.c: add macro's for tracing
1488 of each device. Make parameter names consistent so macros work.
1489 Use macro's in device functions.
1490
1491 * device_tree.c, devices.h, devices.c: include path to device in a
1492 devices node when creating it.
1493
1494 * device_tree.c, debug.h, debug.c: Add tracing of `device-tree'.
1495
1496 * core.c: add tracing of core-device, adjust parameter names in
1497 core functions to be consistent with those in devices*.
1498
1499 Sun Oct 15 20:33:20 1995 Andrew Cagney <cagney@highland.com.au>
1500
1501 * debug.h, debug.c (trace_option): New function. Parses the trace
1502 option, updating the trace array.
1503
1504 * debug.h, debug.c (trace_usage): New function. Outputs the list
1505 of all possible trace options.
1506
1507 * sim_calls.c (sim_open), main.c (main): Use new trace_option() to
1508 parse trace options specified with the simpler -t flag. Adjust
1509 usage.
1510
1511 * FIXME: basic parsing of command line options is still duplicated
1512 by main.c and sim_calls.c
1513
1514 Thu Oct 26 10:42:28 1995 Michael Meissner <meissner@tiktok.cygnus.com>
1515
1516 * Makefile.in (clean): Delete *.i and *.out files.
1517
1518 * ppc-endian.c (SWAP_n): Add SET argument to allow use of SWAP
1519 macros for either assignment or return. Fix SWAP_8 to use a
1520 union, and two SWAP_4's. Delete SWAP_N, since nobody uses it now.
1521 (ENDIAN_N): Add SET argument to SWAP_n calls. Delete macro defs
1522 that hardwired swapping on/off, let optimizer delete dead code.
1523
1524 * main.c (main): Add printf that we caught a signal and print out
1525 the failing address.
1526
1527 Thu Oct 19 21:43:39 1995 Fred Fish <fnf@fishfood.amigalib.com>
1528
1529 * Makefile.in: Remove tabs from otherwise empty line.
1530 Confuses many non-GNU versions of "make".
1531
1532 Wed Oct 18 08:51:25 1995 Michael Meissner <meissner@tiktok.cygnus.com>
1533
1534 * Makefile.in (clean): Delete files produced by gen.
1535
1536 Mon Oct 16 17:34:24 1995 Michael Meissner <meissner@tiktok.cygnus.com>
1537
1538 * gen.c (lf_print_c_semantic_function): Move counting # of
1539 instructions here so it works with caching.
1540 (gen_idecode_c): Move from here.
1541
1542 Wed Oct 11 17:13:15 1995 Andrew Cagney <cagney@highland.com.au>
1543
1544 * gen.c, ppc-instructions, psim.c: Fix code for generating
1545 cracking instruction cache. Delete the code that cached just the
1546 result from doing an instruction lookup - this ran slower than no
1547 cache at all.
1548
1549 Fri Oct 13 09:58:43 1995 Michael Meissner <meissner@tiktok.cygnus.com>
1550
1551 * Makefile.in (gen.o): Include $(INLINE_CFLAGS).
1552
1553 * debug.h (ppc_trace): Rename from trace, to avoid a conflict with
1554 TCL when gdb is linked with the simulator.
1555 * debug.c (ppc_trace): Ditto.
1556 * sim_calls.c (sim_open): Change trace -> ppc_trace.
1557 * main.c (main): Ditto.
1558
1559 * cpu.c (cpu_add_commas): Remove extra static.
1560
1561 Thu Oct 12 11:35:53 1995 Michael Meissner <meissner@tiktok.cygnus.com>
1562
1563 * Makefile.in (psim.o): Now that inlines are turned on, make
1564 psim.o depend on all sources.
1565
1566 * cpu.c (cpu_add_commas): New function to format a long with
1567 commas.
1568 (cpu_print_info): Use it to print number_of_insns.
1569
1570 * ppc-endian.c (SWAP_n): New macros to speed up byte swapping for
1571 2, 4, and 8 bytes.
1572 (ENDIAN_N): If both target and host byte orders are known, don't
1573 bother testing CURRENT_{TARGET,HOST}_BYTE_ORDER.
1574
1575 * ppc-endian.h (target specific H2T_n/T2H_n macros): Remove #if 0
1576 to allow target specific H2T_n/T2H_n macros to be used.
1577 (htonl, ntohl): If compiled on a 486 by GCC and WITH_BSWAP is
1578 non-zero, redefine the htonl/ntohl macros to use the BSWAP instead
1579 of the 3 instruction sequence that runs on 386s.
1580
1581 * std-config.h (WITH_{HOST,TARGET}_BYTE_ORDER): Don't override if
1582 specified on the compile line.
1583 (WITH_BSWAP): If not defined, define as 0.
1584
1585 * Makefile.in (INLINE_CFLAGS): Add -DDEFAULT_INLINE=2 to add
1586 default inline support. Pass INLINE_CFLAGS when compiling.
1587
1588 * devices.{h,c} (unimp_device_ioctl): Use STATIC_DEVICES, not
1589 INLINE_DEVICES since GCC doesn't like inline functions that
1590 accept variable arguments.
1591 (stack_ioctl_callback): Make function just static because GCC
1592 doesn't like inline functions that accept variable arguments.
1593
1594 * devices.h (STATIC_DEVICES): Define as empty if not defined.
1595
1596 * inline.c: Correct pathnames of included C files to match current
1597 implementation.
1598
1599 * inline.h (STATIC_DEVICES): If DEVICES_INLINE is defined to be
1600 non-zero, define STATIC_DEVICES to be static.
1601
1602 * std-config.h (INLINE): If GNU C and optimizing, define this as
1603 __inline__.
1604 (DEFAULT_INLINE): If not defined, define as 0.
1605 (ENDIAN_INLINE): If not defined, define as DEFAULT_INLINE.
1606 ({CORE,VM,CPU,EVENTS,REGISTERS,INTERRUPTS}_INLINE): Ditto.
1607 ({SPREG,IDECODE}_INLINE): Ditto.
1608
1609 Wed Oct 11 17:13:15 1995 Andrew Cagney <cagney@highland.com.au>
1610
1611 * ppc-instructions: Initial cut of floating point suport added.
1612 Of note include - use of host IEEE floating point instructions,
1613 use of PowerPC manual pseudo code to handle the FPSCR. It is not
1614 currently a pretty sight.
1615
1616 * memory_map.h, memory_map.c, memory_map_n.h, core.h, core.c:
1617 merge into core.h, core.c, core_n.h. The type memory_map replaced
1618 with core_map. This removes a level of pointer indirection when
1619 translating an address.
1620
1621 * memory_map.h, memory_map.c, memory_map_n.h: delete.
1622
1623 * Makefile.in et.al (sorry): tweek to use new core, core_map and
1624 core.h.
1625
1626 Wed Oct 11 12:10:26 1995 Andrew Cagney <cagney@highland.com.au>
1627
1628 * sim_calls.c, main.c: Add -g (trace_gdb) option, add tracing to
1629 most of the other functions in sim_calls.c.
1630
1631 * basics.h (CONCAT3), memory_map.c, memory_map_n.h, Makefile.in:
1632 Add macros to better cover up `generic' code. Makes it possible
1633 to step through the generic code!
1634
1635 * vm.c, vm_n.h, Makefile.in: ditto
1636
1637 Tue Oct 10 15:42:59 1995 Andrew Cagney <cagney@highland.com.au>
1638
1639 * devices.h, devices.c, memory_map.h, memory_map.c: Changed
1640 callback interface so that there is a read/write buffer but no
1641 read/write_word. VEA default memory read/write handler sometimes
1642 couldn't resolve an access and of those some were for a memory
1643 fault and some were because gdb was making a bogus request.
1644
1645 * devices.h, devices.c, memory_map.h, memory_map.c, vm.h, vm.c:
1646 eliminate transfer_mode (raw or cooked) parameter from read/write
1647 buffer.
1648
1649 Fri Oct 6 20:23:56 1995 Andrew Cagney <cagney@highland.com.au>
1650
1651 * ppc-instructions (fmul, fmuls): correct instruction format - had
1652 FRB instead of FRC.
1653
1654 Wed Oct 4 17:31:12 1995 Andrew Cagney <cagney@highland.com.au>
1655
1656 * psim.c, device_tree.h, device_tree.c, devices.c (printd_*,
1657 scand_*): new functions to parse/print fields in device names
1658 while hiding any machine dependency.
1659
1660 * devices.c, psim.c: Change the stack init code so that it is
1661 handled by a device. Arguments passed across using a device ioctl
1662 (hack).
1663
1664 * devices.h, devices.c: device ioctl callback changed to allow a
1665 variable number of arguments. This gives greater flexability and
1666 greater chance of bugs.
1667
1668 Tue Oct 3 22:01:56 1995 Andrew Cagney <cagney@highland.com.au>
1669
1670 * main.c (printf_filtered, error): Missing va_end() to close off
1671 variable argument use.
1672
1673 * Makefile.in (tmp-gencode): comment out hack to get around some
1674 versions of make not handling files being created as side-effects.
1675
1676 * gen.c (lf_open): Add -n (real_file_name) option. Specifies an
1677 alternative file name to use in output files for things like #line
1678 macros.
1679
1680 Makefile.in (tmp-gencode): Use gen -n so that debug info is
1681 correct.
1682
1683 * Makefile.in (TARGETLIB): Use this instead of libsim.a in the
1684 Makefile.
1685
1686 Sat Oct 7 22:40:59 1995 Michael Meissner <meissner@tiktok.cygnus.com>
1687
1688 * sim_calls.c (sim_set_callbacks): Define new function.
1689
1690 Fri Oct 6 17:23:10 1995 Michael Meissner <meissner@tiktok.cygnus.com>
1691
1692 * psim.c (psim_print_info): Print exit status or signal number.
1693
1694 Mon Oct 2 11:46:37 1995 Michael Meissner <meissner@tiktok.cygnus.com>
1695
1696 * cpu.c (struct _cpu): Add number_of_insns field to trace how many
1697 instructions are executed.
1698 (cpu_increment_number_of_insns): New function to increment the
1699 number of instructions issued.
1700 (cpu_get_number_of_insns): New function to return the number of
1701 instructions issued.
1702 (cpu_print_info): New function to print cpu related information.
1703 At present, print the number of instructions executed.
1704
1705 * gen_idecode_c: Emit call to cpu_increment_number_of_insns within
1706 idecode_issue.
1707
1708 * psim.c (psim_print_info): New function to iterate over each of
1709 the CPU's calling cpu_print_info.
1710
1711 * psim.h,cpu.h: Add new declarations.
1712
1713 * sim_calls.c (sim_open): Add argument processing to add the same
1714 switches main.c accepts for the standalone processor.
1715 (sim_close): Call psim_print_info if -I.
1716
1717 * main.c (main): Add comment saying to update sim_calls.c when
1718 adding switches. Add -I to call psim_print_info when done.
1719 (usage): Update usage message.
1720
1721 Sun Oct 1 13:52:59 1995 Michael Meissner <meissner@tiktok.cygnus.com>
1722
1723 * main.c (printf_filtered): Correct to match new prototype.
1724
1725 Sat Sep 30 20:47:05 1995 Michael Meissner <meissner@tiktok.cygnus.com>
1726
1727 * sim_callbacks.h (printf_filtered): Correct prototype.
1728
1729 Thu Sep 21 16:26:49 1995 Michael Meissner <meissner@tiktok.cygnus.com>
1730
1731 * device_tree.c (OEA_MEMORY_SIZE): Define if not defined to
1732 0x100000.
1733 (clayton_memory_size): Define as OEA_MEMORY_SIZE.
1734
1735 * std-config.h (WITH_TRACE): Default to 1 now.
1736
1737 * psim.c (write_stack_arguments): Don't write any stack arguments
1738 if OEA.
1739
1740 * main.c (main): Switch to using getopt. Make -p also set
1741 trace_semantics. Make -a turn on all trace flags. Make -C turn
1742 on console tracing.
1743
1744 * device_tree.c (create_option_device_node): Assume a program is
1745 OEA if the start address is < 4096, not just == 0.
1746
1747 Wed Sep 20 13:36:06 1995 Ian Lance Taylor <ian@cygnus.com>
1748
1749 * Makefile.in (maintainer-clean): New synonym for realclean.
1750
1751 Sun Sep 10 10:23:56 1995 Michael Tiemann <tiemann@axon.cygnus.com>
1752
1753 * registers.c (register_description): Add gdb synonyms for cr
1754 (cnd) and msr (ps).
1755
1756 Fri Sep 8 13:16:10 1995 Ian Lance Taylor <ian@cygnus.com>
1757
1758 * Makefile.in (install): Don't install in $(tooldir).
1759
1760 * configure.in: Call AC_CONFIG_HEADER. Don't try to use
1761 bfd/hosts/*.h file or bfd/config/*.mh file. Call AC_PROG_CC and
1762 AC_PROG_RANLIB. Substitute in values for CFLAGS, HDEFINES, AR,
1763 and CC_FOR_BUILD. Call AC_CHECK_HEADERS for various header files.
1764 Touch stamp.h if creating config.h.
1765 * configure: Rebuild.
1766 * config.in: New file, created by autoheader.
1767 * Makefile.in (AR): Define as @AR@.
1768 (CC): New variable, defined as @CC@.
1769 (CFLAGS): Define as @CFLAGS@.
1770 (CC_FOR_BUILD): New variable, defined as @CC_FOR_BUILD@.
1771 (RANLIB): Define as @RANLIB@.
1772 (HDEFINES, TDEFINES): New variables.
1773 (@host_makefile_frag@): Remove.
1774 (mostlyclean): Make the same as clean, not distclean.
1775 (clean): Remove config.log.
1776 (distclean): Remove config.h and stamp-h.
1777 (Makefile): Don't depend upon @frags@. Just rebuild Makefile when
1778 invoking config.status.
1779 (config.h, stamp-h): New targets.
1780 (gen, gen.o): Build with CC_FOR_BUILD, not CC.
1781 (ppc-config.h): Rename from old config.h build.
1782 * (basics.h,gen.c,ppc-endian.c,psim.c): Include ppc-config.h.
1783
1784 Fri Sep 8 09:51:03 1995 Michael Meissner <meissner@tiktok.cygnus.com>
1785
1786 * configure{,.in}: Don't include sysdep.h from bfd, since bfd no
1787 longer provides it.
1788 * basics.h (sysdep.h): Don't include it.
1789 * Makefile.in (BASICS_H): Remove sysdep.h.
1790
1791 Wed Sep 6 13:25:42 1995 Andrew Cagney <cagney@highland.com.au>
1792
1793 * core.c (core_add_data): First growth of bss was being put at
1794 wrong address (0) instead of &end.
1795
1796 * core.c (core_add_stack, core_add_data): Was not handling case
1797 where bss/stack is grown across the current end-of-{bss,stack}.
1798
1799 Wed Sep 6 00:46:10 1995 Andrew Cagney <cagney@highland.com.au>
1800
1801 * system.c (system_call): Fix SYS_break - was aligning bss to a
1802 page boundary instead of just an 8 byte one; On first call sbrk(0)
1803 != sbrk(0).
1804
1805 Thu Aug 24 14:48:54 1995 Michael Meissner <meissner@tiktok.cygnus.com>
1806
1807 * Makefile.in (install): Fix install rule.
1808
1809 Tue Aug 22 09:31:18 1995 Michael Meissner <meissner@tiktok.cygnus.com>
1810
1811 * system.c (system_call): Add read support.
1812
1813 * main.c (main): -t sets trace_device_tree. Correct usage message
1814 to current reality.
1815
1816 * device_tree.c (update_memory_node_for_section): Make tracing
1817 output line up. If not code or readonly, assume that the section
1818 is a data section and has read/write permissions. Add readonly
1819 support.
1820
1821 * core.c (create_core_from_addresses): Print end address in traces
1822 and make tracing output line up.
1823
1824 * Makefile.in: Rewrite from Makefile to work with the Cygnus
1825 environment, and support compiling in a different directory than
1826 the sources reside in.
1827
1828 * ppc-endian.h: Rename from endian.h so that it doesn't get
1829 confused with /usr/include/sys/endian.h on Linux. Add Linux
1830 endian support.
1831
1832 * ppc-endian.c: Rename to be consistant with ppc-endian.h.
1833 Include ppc-endian.h, not endian.h.
1834
1835 * basics.h (sysdep.h): Include sysdep.h that configure makes.
1836 Include ppc-endian.h, not endian.h.
1837
1838 * std-config.h: Rename from ppc-config. Put #ifndefs around most
1839 configuration macros, so they can be overridden via CFLAGS. By
1840 default, turn off tracing.
1841
1842 * configure.in: Clone from other simulator targets.
1843 * configure: Generate via autoconf from configure.in.
1844
1845 Sat Aug 19 09:05:32 1995 Andrew Cagney <cagney@highland.com.au>
1846
1847 * ppc-instructions: fix srawi (was geting XER[CA] real wrong).
1848
1849 * interrupts.c (data_storage_interrupt): allow stack to grow by
1850 upto one MB per increment.
1851
1852 * ppc-instructions: divw was computing rA / rA not rA / rB
1853
1854 * main.c (main): really stupid. Wasn't exiting with correct status
1855
1856 Fri Aug 18 00:38:01 1995 Andrew Cagney <cagney@highland.com.au>
1857
1858 * system.c (system_call): add system calls kill(2) and getpid(2).
1859
1860 * main.c (main): Check/return exit status when simulation
1861 finishes.
1862
1863 Thu Aug 17 14:29:18 1995 Andrew Cagney <cagney@highland.com.au>
1864
1865 * device_tree.c (create_option_device_node): Alignment rules (at
1866 least for the moment) now are for strict alignment only for LE OEA
1867 mode. (Because of compiler problems).
1868
1869 * system.c (system_call) SYS_exit: Wasn't exiting with correct status.
1870
1871 Thu Aug 17 01:16:38 1995 Andrew Cagney <cagney@highland.com.au>
1872
1873 * vm.c (DEFINE_VM_DATA_MAP_WRITE_N): For miss aligned transfer
1874 forgot to return.
1875
1876 * system.c (system_call): didn't page align break argument before
1877 determining increment break increment.
1878
1879 * psim/ppc: Re-arange entire directory structure so that
1880 everything lives in the one directory. While a pain for cleaning,
1881 makes building across multiple architectures much simpler.
1882
1883 * devices.c, device_tree.c: Added code that provides a simple
1884 illustration of how an interrupt control device could be
1885 implemented.
1886
1887 * devices.c: Added code so that the dumb console device can read
1888 (from stdin) as well as write to stdout.
1889