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