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