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