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