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