Add access, sigaltstack, sigaction emulations
[deliverable/binutils-gdb.git] / sim / ppc / ChangeLog
CommitLineData
b9f74e0b
MM
1Tue Oct 29 17:55:43 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2
3 * configure.in (AC_CHECK_FUNCS): Add access.
4 * config{.in,ure}: Regenerate.
5
6 * emul_unix.c (do_unix_nop): System call that always succeeds.
7 (do_unix_access): Support access system call.
8 (solaris_descriptors): Make sigaltstack and sigaction nops.
9 ({solaris,linux}_descriptors): Add support for access.
10
11Fri Oct 18 12:12:21 1996 Michael Meissner <meissner@tiktok.cygnus.com>
12
13 * ppc-instructions (Floating Select): Add support for fsel unless
14 model is 601. Allow user to filter out instruction unless -Fs is
15 passed to igen.
16 (Store Floating-Point as Integer Word Indexed): Raise optional
17 instruction program abort. Allow user to filter out instruction
18 unless -Fs is passed to igen.
19 (Floating Square Root{, Single}): Ditto.
20 (Floating Reciprocal Estimate Single): Ditto.
21 (Floating Reciprocal Square Root Estimate): Ditto.
22
23 * configure.in (--enable-sim-filter): If not passed, pass 32,f,s
24 to igen.
25 * configure: Regenerate.
26
27 * interrupts.h (program_interrupt_reasons): Add
28 optional_instruction_program_interrupt.
29
30 * interrupts.c (program_interrupt): Call error with more detailed
31 information on program interrupts, particularly in user mode. Add
32 support for optional_instruction_program_interrupt.
33
34Thu Oct 3 16:15:20 1996 Jason Molenda (crash@godzilla.cygnus.co.jp)
35
36 * Makefile.in (clean): Move config.log to distclean.
37
38Thu Sep 19 14:40:40 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
39
40 * debug.h: Add disklabel-package and disk-device trace options.
41 debug.h (PTRACE): Add macro to simplify tracing in packages.
42
43Thu Sep 19 14:40:40 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
44
45 * device.c (device_create_instance_from): Tighten up loop
46 searching for device instances.
47 (device_instance_delete): Ditto.
48 (device_instance_delete): Only leaf instances need to be removed
49 from a devices list of active instances.
50
51Thu Sep 19 14:40:40 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
52
53 * hw_disk.c: Add the cdrom as an alias.
54
55 * pk_disklabel.c (disklabel_delete): Implement, remembering to
56 delete the raw disk instance while we're at it.
57
58 * pk_disklabel.c (pk_disklabel_create_instance): Implement a
59 little bit more - still a long way to go.
60
61 * pk_disklabel.c (disklabel_write, disklabel_read): Remember the
62 new head position after a read or write.
63
64Thu Sep 19 13:05:40 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
65
66 * emul_chirp.c (chirp_emul_read): Allow reads to be longer then
67 the internal buffer.
68
69Thu Sep 19 13:05:40 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
70
71 * emul_chirp.c (chirp_read_t2h_args): Call memset-0 with the args
72 in the correct order.
73
74 * emul_chirp.c (chirp_emul_call_method): Correct computation for
75 the address of the first stack argument passed in from the client
76 program.
77
78Wed Sep 18 19:33:54 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
79
80 * words.h: Add new types signed_cell and unsigned_cell which
81 correspond to the signed and unsigned IEEE 1275 memory locations.
82 * device.h, device.c, emul_chirp.c: Where refering to an IEEE 1275
83 memory cell, replace uses of unsigned32 with unsigned_cell.
84 * device_table.h: Ditto.
85
86 * sim-endian.h: Add new macros H2BE_cell and BE2H_cell which
87 convert cell sized values to from big endian.
88 * device.c, emul_chirp.c: Where refering to IEEE 1275 memory cells
89 use these new macros.
90
91Tue Sep 17 15:57:44 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
92
93 * device.c (device_tree_add_parsed): Detect and report an
94 interrupt being attached to an invalid device. Was dumping core.
95
96Mon Sep 16 23:09:12 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
97
98 * device.h, device.c (device_address_to_attach_address,
99 device_size_to_attach_size): New functions. Convert a devices
100 unit address or unit size structure into a form suitable for
101 passing on to the attach and detach functions.
102 * device_table.h: Add extra methods to device table.
103
104 * device.h, device.c (device_find_reg_property): New function.
105 For a reg type property, return the selected address + size
106 tupple, along with a positive success status. Add a reg_property
107 to the list of property types.
108 * (device_tree_add_parsed): Make array properties with the name
109 reg or alternate-reg of type reg_property.
110
111 * hw_memory.c (hw_memory_init_address): Rewrite to use new
112 find_reg_property method.
113 * hw_nvram.c (hw_nvram_init_address): Ditto.
114
115 * device.c (device_tree_print_device): Add code to print out a reg
116 property.
117
118 * device_table.c (generic_device_address_to_attach_address,
119 generic_device_size_to_attach_size ): New functions. Generic
120 functions for converting between unit and attach address or size.
121
122 * device_table.c (generic_device_init_address): Rewrite to use the
123 new find_reg and address convert functions. Look for both reg and
124 alternate-reg properties.
125
126Mon Sep 16 23:09:12 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
127
128 * hw_com.c: New file. A '550 serial device that can quickly be
129 attached to any bus.
130 * configure.in (enable-sim-hardware): Add the com device.
131 * configure: re-generate.
132
133Thu Sep 12 17:30:56 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
134
135 * device.c (device_tree_verify_reg_unit_address): New
136 function. Check that the unit address as specified by the reg
137 property correctly corresponds to any unit address previously
138 specified by the devices name.
139 (device_tree_add_parsed): When adding a reg property, verify
140 that the unit-address - first value of property - correctly
141 matches any previous value specified when creating the device
142 node.
143
144Thu Sep 12 17:30:56 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
145
146 * mon.c (mon_event): Remove assertion that an unsigned is >= 0.
147
148Fri Aug 16 12:05:24 1996 Michael Meissner <meissner@tiktok.cygnus.com>
149
150 * device.c (device_full_name): Cast strdup to char *, since AIX
151 3.2.5 mistakenly declares the function to be const char *.
152 (device_create_from): Ditto.
153 (device_create_instance_from): Ditto.
154 (device_add_property): Ditto.
155
156Tue Aug 13 11:40:14 1996 Michael Meissner <meissner@tiktok.cygnus.com>
157
158 * debug.c (trace_option): For -t all, do not set the
159 trace_dump_device_tree flag, so that the simulator is run.
160
83a650d8
MM
161Tue Aug 13 11:40:14 1996 Michael Meissner <meissner@tiktok.cygnus.com>
162
163 * Makefile.in (options.o): Depend on defines.h.
164 (defines.h): New rule, go through config.h and make strings of all
165 of the #define HAVE_xxx macros.
166 (distclean): Remove defines.h.
167
168 * options.c (print_options): Print whether many of the
169 configuration macros are defined.
170
171 * main.c (main): If -t options and no filename, just print the
172 options, and don't print the usage message.
173
9aecf50d
MM
174Mon Aug 12 18:42:37 1996 Michael Meissner <meissner@tiktok.cygnus.com>
175
176 * configure.in: Test whether /dev/zero works on the system, and if
177 it does, define HAVE_DEVZERO.
178 * configure: Regenerate.
179
180 * emul_generic.c (emul_add_tree_hardware): Do not add /iobus/disk
181 if we don't have a working /dev/zero on the system.
182
183 * emul_bugapi.c (emul_bugapi_init): If HAVE_DEVZERO is not
184 defined, don't add disk support.
185 (emul_bugapi_do_diskio): Ditto.
186 (emul_bugapi_instruction_call): Ditto.
187
def7f775
MM
188Wed Aug 7 14:34:20 1996 Michael Meissner <meissner@tiktok.cygnus.com>
189
7b25dea5
MM
190 * emul_unix.c (HAVE_TCGETATTR): If HAVE_TERMIOS_STRUCTURE is not
191 defined, make sure HAVE_TCGETATTR is #undef'ed
192
b9f74e0b
MM
193Wed Aug 7 14:34:20 1996 Michael Meissner <meissner@tiktok.cygnus.com>
194
def7f775
MM
195 * std-config.h (REGPARM): Only define REGPARM attributes if using
196 GNU C. Test for __i686__ in case GCC ever defines it. If not on
197 a x86 platform, define REGPARM as nothing.
198
199 * sim-endian.h (WITH_HOST_BYTE_ORDER): Test for i686 and __i686__
200 also.
201
b9f74e0b
MM
202Wed Aug 7 20:19:55 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
203
204 * ld-decode.h, ld-decode.c: Rename goto_gen to the more correct
205 goto_switch_gen.
206 * gen-idecode.c: Ditto.
207
208 * gen-idecode.c (print_idecode_table): Comment out check for
209 switch/table combination until a bug with it is fixed.
210
211 * ppc-opcode-goto: New file. Like complex and flat but uses
212 goto-switch instead of padded-switch for the tables.
213
214 * gen-idecode.c (print_goto_switch_name): New function.
215 (print_goto_switch_table_leaf): New function.
216 (print_goto_switch_break): New function.
217 (print_goto_switch_table): New function. Prints a jump table
218 that can be jumped into instead of a switch statement.
219
220 * gen-idecode.c (*switch_*): As an option output a switch that is
221 implemented using a jump table but only if the switch is not
222 boolean.
223
2e913166
MM
224Tue Aug 6 09:28:22 1996 Michael Meissner <meissner@tiktok.cygnus.com>
225
226 * configure.in (--enable-sim-{hardware,packages}): Fix typos.
227 * configure: Regenerate.
228
229 * device.c (device_instance_call_method): Fixup format message in
230 error case. Return 0 in case of error to shut up compiler
231 warnings.
232
b9f74e0b
MM
233Wed Aug 7 00:17:37 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
234
235 * device_table.c (generic_device_unit_decode): Require a comma
236 between elements of a unit address.
237
238 * device.c (device_tree_print_device): For reg, alternate-reg and
239 ranges properties use special print functions.
240 (device_print_ranges_property): Print formatted ranges property.
241 (device_print_reg_property): Print formatted reg property.
242
243Tue Aug 6 21:35:18 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
244
245 * device.c (device_tree_add_parsed): For reg, ranges and
246 alternate-reg properties use a special parser.
247 (device_tree_parse_reg_property): New function to parse a reg
248 property.
249 (device_tree_parse_ranges_property): New function to parse a
250 ranges property.
251 (device_encode_unit): Wrapper for encode_unit callback.
252 (device_decoce_unit): Wrapper for decode_unit callback.
253
2e913166
MM
254Wed Jul 31 00:02:30 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
255
256 * device_table.h (device_instance_callbacks): Relace the claim and
257 release methods with a more general table mapping from method-name
258 to method-function.
259
260 * device.c (device_instance_call_method): New function. Implement
261 the OpenBoot call-method client interface. Attempts to locate the
262 instances method in the callback table.
263 (device_instance_claim, device_instance_release): Delete.
264 Replaced with call-method and a lookup table.
265
266 * emul_chirp.c (chirp_emul_call_method): Use the new device
267 instance call method and let that handle a client claim call.
268
269 * hw_htab.c (claim_memory): Wrapper function to call the memory
270 devices "claim" method using the new device-instance call-method
271 interface. Replaces the previous direct calls to claim.
272 (htab_map_region): Use claim_memory.
273 (htab_init_data_callback): Ditto.
274
275 * hw_memory.c (hw_memory_instance_claim): Update function
276 interface so that it is compatible with call-method.
277 (hw_memory_instance_release): Ditto.
278 (hw_memory_instance_methods): New table of memory specific
279 methods claim and release. Add to the hw_memory_callback
280 table.
281
282Tue Jul 30 21:26:14 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
283
284 * psim.c (psim_init): Back out of change to initial value of
285 system->last_cpu.
286
287Tue Jul 30 21:12:24 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
288
289 * sim_callbacks.h (sim_io_printf_filtered): Replace
290 printf_filtered with a local simulator specific version. Add
291 #define printf_filtered to simplify updating of existing code.
292
293 * sim_callbacks.h (sim_io_write_stdout, sim_io_read_stdin,
294 sim_io_write_stderr): New functions. Read / write to the
295 simulations stdin and stdout and stderr interfaces. Merge in code
296 from hw_pal that previously handled async I/O.
297 (sim_io_flush_stdoutput): Rename flush_stdoutput. Add #define
298 flush_stdoutput to simplify updating of existing code.
299
300 * hw_pal.c (scan_hw_pal, write_hw_pal,
301 hw_pal_instance_write_callback): Use the new sim_io functions.
302
303 * main.c: Implement standalone versions of the new sim_io
304 functions. Include support for async I/O.
305 * sim_calls.c: Ditto. This time using the gdb callback table.
306
307 * std-config.h (CURRENT_STDIO, current_stdio): New macro. Set up
308 stdio configuration so that it works in the same way as the rest
309 of the simulation.
310 * psim.c (psim_create): Initialize current_stdio from the device
311 tree.
312 * emul_generic.c (emul_add_tree_options): Enter a default value
313 for use-stdio in the device tree.
314
315Fri Jul 26 19:43:03 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
316
317 * gen-idecode.c (print_jump): Was always generating a jump back to
318 idecode. Only necessary at tail of semantic code.
319 (print_jump): Was always setting the processor's cia, even during
320 startup when the processor was still undefined.
321 (print_jump): For safety, restart smp loop when cpu_nr >= nr_cpus,
322 not just equal.
323
324 * options.c (print_options): Add printing of WITH_REGPARM and
325 WITH_STDCALL.
326
327 * std-config.h (WITH_REGPARM, WITH_STDCALL): Provide default
328 (disabled) values if not defined.
329
330Fri Jul 26 00:36:35 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
331
332 * ppc-cache-rules (cache): Change RS and RB to cache instead of
333 compute. The block move instructions use them.
334
335 * idecode_expression.h (FPSCR_SET): New macro, set specific FPSCR
336 register.
337 (CR_FIELD): New macro, extract specific CR register.
338 (FPSCR_FIELD): New macro, extract specific FPSCR register.
339
340 * registers.h (GPR): New macro, simplify accesses to GPR[i].
341
342 * bits.c (INSERTED): Covert INSERTED macro into a function.
343 (EXTRACTED): Conditionally compile on correct bit size macro.
344
345 * bits.h (BIT8): New macro, set a single bit in an 8 bit byte.
346
347 * ppc-instructions: With hints from Paul Martin, type in missing
348 some instruction semantics. Leave disabled for the moment.
349 (Load Multiple Word): Ditto.
350 (Store Multiple Word): Ditto.
351 (Load String Word Immediate): Ditto.
352 (Load String Word Indexed): Ditto.
353 (Store String Word Immedate): Ditto.
354 (Store String Word Indexed): Ditto.
355 (Move to Condition Register from XER): Ditto.
356 (Move From Condition Register): Ditto.
357 (Move From FPSCR): Ditto.
358 (Move to Condition Register from FPSCR): Ditto.
359 (Move To FPSCR Field Immediate): Ditto.
360 (Move To FPSCR Fields): Ditto.
361 (Move To FPSCR Bit 0): Ditto.
362 (Move To FPSCR Bit 1): Ditto.
363
364Thu Jul 25 22:10:40 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
365
366 * std-config.h (SEMANTICS_INLINE): By default, mask out the
367 inlining of semantic functions from DEFAULT_INLINE. Almost all
368 configurations call the semantic code via a pointer so there is
369 little benefit.
370
371 * std-config.h (ICACHE_INLINE): Ditto.
372
373Thu Jul 25 20:07:30 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
374
375 * configure.in (sim_regparm): Add configuration option for
376 enabling GCC's regparm attribute.
377 * (sim_stdcall): Add configuration option for enabling GCC's
378 stdcall attribute.
379
380 * Makefile.in (REGPARM_CFLAGS): Pass regparam configuration onto
381 compilations.
382 * (STDCALL_CFLAGS): Pass stdcall configuration onto compilations.
383
384 * std-config.h (REGPARM): Extend construction of REGPARM macro so
385 that it can include __stdcall__ function attribute.
386
387Wed Jul 24 19:04:20 1996 Andrew Cagney <cagney@sawnoff>
388
389 * options.c (print_options): Include SUPPORT_INLINE in information
390 dump.
391
392 * gen-idecode.c (print_run_until_stop_body): Only generate loop
393 termination test if creating idecode_run_until_stop. Push the
394 loop termination test back into each alternative branch.
395
396Wed Jul 24 15:47:09 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
397
398 * gen-icache.c (print_icache_function): Have the cache function
399 always update the cache_entries semantic and address fields.
400
401 * gen-idecode.c (print_idecode_switch_illegal): Include a break
402 when generating illegal instructions. This was commented out
403 which is a hangover from looking a at switch statements generated
404 using indirect jumps.
405
406Tue Jul 23 20:57:01 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
407
408 * igen.c (print_my_defines): Replaces print_define_my_index.
409 Print both a definition for MY_INDEX and MY_PREFIX.
410 * gen-icache.c (print_icache_function): Adjust.
411 * gen-idecode.c (print_jump_insn): Adjust.
412 * gen-semantics.c (print_c_semantic): Adjust.
413
414 * gen-support.c (gen_support_h): Add optional include to created
415 support.h so that, like cpu, it is optionally inlined for all
416 modules that include it.
417 * inline.h, inline.c: Adjust so that support.[hc] is handled the
418 same as cpu.[hc].
419
420 * idecode_fields.h (LABEL, GOTO): Macro's that create a unique
421 name for a lable and then branch to it.
422
423 * ppc-instructions (convert_to_integer, Floating Round to
424 Single-Precision, Floating Convert from Integer Doubleword): Use
425 LABEL and GOTO instead of the recently added switch statements.
426
427Wed Jul 24 14:02:42 1996 Andrew Cagney <cagney@sawnoff.highland.com.au>
428
429 * gen-idecode.c (print_run_until_stop_body): Too many rparen in
430 generated code.
431
432Tue Jul 23 20:57:01 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
433
434 * configure.in (--enable-sim-line-nr): Typo - sim_line-nr.
435 * (--enable-sim-inline): Reorder patern matching of arguments so
436 that SUPPORT=ALL_INLINE is reconized as *=* and not *_INLINE.
437
438 * configure: rebuild.
439
440Mon Jul 22 23:25:08 1996 Andrew Cagney <cagney@highland.com.au>
441
442 * configure.in (--enable-sim-hardware, --enable-sim-packages): New
443 configuration options. Let the user specify the packages or
444 hardware devices that are to be included in the build. Makes it
445 possible for user packages to be specified.
446
447 * Makefile.in (tmp-pk, tmp-hw): Just use the list of packages and
448 hardware instead of checking it using ls. configure.in should
449 have taken care of any problems.
450 (HW_SRC, HW_OBJ, PACKAGE_SRC, PACKAGE_OBJ): Set by configure.
451
452Mon Jul 22 22:38:59 1996 Andrew Cagney <cagney@highland.com.au>
453
454 * psim.c (psim_options): Enter the argument to the memory size
455 option directly into the device tree. Was using atol() which is
456 dangerously non portable.
457
458Mon Jul 22 22:17:08 1996 Andrew Cagney <cagney@highland.com.au>
459
460 * configure.in (icache): Extend icache flag to include an insn
461 option. If specifyed the insn - aka instruction - is included in
462 the instruction cache. Make this the default.
463 * configure: re-generate.
464
465 * igen.c (main), igen.h: Add option -S - inSn - for specifying
466 that the instruction should be included in the icache.
467
468 * gen-icache.c (print_icache_body): If enabled, output code to put
469 the instruction into the icache.
470 (print_icache_struct): If enabled, add insn to the icache struct.
471
472Mon Jul 22 20:46:12 1996 Andrew Cagney <cagney@highland.com.au>
473
474 * Makefile.in (BUILD_CFLAGS): Include -g when building the
475 generators.
476
477Mon Jul 22 20:00:25 1996 Andrew Cagney <cagney@highland.com.au>
478
479 * emul_generic.c (emul_add_tree_options): Was incorrectly setting
480 the strict-alignment option when hardwired for non-strict
481 alignment.
482
30c87b55
MM
483Sun Jul 21 21:18:05 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
484
485 * gen-semantics.c: Make the my_index variable a macro MY_INDEX.
486
487 * ppc-instructions: Adjust so that references are to MY_INDEX and
488 not my_index.
489
490Sun Jul 21 21:18:05 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
491
492 * gen-idecode.c: Output the complete run_until_stop function
493 instead of just the code to handle a single instruction issue.
494 * : Have the generated idecode.c include inline.c (instead of psim.c).
495
496 * std-config.h: Change psim.c so that it isn't inlined (as this is
497 no longer needed).
498
499 * psim.c (run_until_stop): Delete the old run_until_stop function
500 instead calling the idecode_run and idecode_run_until_stop
501 functions that gen-idecode.c is now creating.
502
503Sun Jul 21 21:18:05 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
504
505 * dgen.c: Maintenance - update to use new features found in lf.c.
506
507 * filter_filename.c (filter_filename): Maintenance - make the
508 string constant.
509
510Sun Jul 21 21:18:05 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
511
512 * debug.c (TRACE, ITRACE, DTRACE): Have GCC instead of CPP
513 eliminate trace statements.
514
515 * debug.c: Change trace format so that it is consistent
516 (file:line-nr) with CC's error output.
517
518 * gen-itable.c (itable_c_insn): Add the source file name and
519 source line number to the instruction's informational entry.
520
521 * debug.c (ITRACE): Use the itable (and my_index) to get the
522 current instructions name and source line number.
523
524 * gen-semantics.c, gen-icache.c: Adjust generated ITRACE calls to
525 match new interface.
526
527 * emul_bugapi.c (emul_bugapi_instruction_call): Adjust
528 corresponding call to ITRACE so that it still matches.
529
530 * idecode_expression.h (ALU_END, CR0_COMPARE): Use TRACE instead
531 of ITRACE. The CPP line directives would have previously set the
532 line-nr and file name so ITRACE isn't needed.
533
534Sun Jul 21 21:18:05 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
535
536 * gen-idecode.c (print_jump_until_stop_body): New function and
537 idecode generation option. Instead of generating and calling
538 separate functions containing the semantic and icache code
539 generate a single monolythic function and use goto's (and GCC's
540 indirect jump) to move between code blocks.
541
542 * Makefile.in: Add sim_jump flag to those passed to igen.
543
544 * configure.in: New option --enable-sim-jump (default disabled)
545
546 * ppc-instructions: Eliminate any uses of labels and goto's.
547 These result in duplicate declarations when a single flat function
548 is being create.
549
550 * ppc-opcode-jump: New file. Set of opcode rules useful when
551 testing jumping idecodes.
552
553Sun Jul 21 21:18:05 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
554
555 * gen-idecode.c: Optionally include the semantic code for an
556 instruction in the function that is doing the decoding.
557
558 * igen.c: Add option (-C) to generate semantics in the instruction
559 decode functions.
560
561 * configure.in (--enable-sim-icache): Accept an option list such
562 as 1024,define. Add a new choice to the list - semantic - which
563 will cause igen to generate instruction decode functions that
564 include the corresponding semantic code.
565
566Sun Jul 21 21:18:05 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
567
568 * configure.in: New option --enable-sim-line-nr (default enabled).
569 Enable/disable the inclusion of CPP line directives in the
570 generated files. Such directives refer back to the source files
571 used when generating the simulator code.
572
573 * Makefile.in (sim_line_nr): Pass to igen.
574
575Sun Jul 21 21:18:05 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
576
577 * igen.c (main): Revamp the options so that more letters are
578 available.
579
580 * configure.in: Adjust to match igen's revamped options
581
582Sun Jul 21 21:18:05 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
583
584 * Makefile.in (pk.h, hw.h): Rewrite depenencies for hw.h (etc) so
585 that they use the same technique as igen (ie a dummy targets
586 tmp-pk and tmp-hw are created).
587
588Mon Jun 24 22:28:00 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
589
590 * Makefile.in (BUILD_CFLAGS): Include WARNING_CFLAGS.
591
592Wed Jun 19 21:45:28 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
593
594 * ld-cache.[hc], ld-decode.[hc], ld-insn.[hc]: New files. Separate
595 out the loading of each of the tables from the rest of igen.
596 * Makefile.in: Adjust.
597 * igen.c: Adjust.
598
599 * gen-icache.[hc], gen-idecode.[hc], gen-itable.[hc],
600 gen-model.[hc], gen-semantics.[hc]: New files. Separate out the
601 code creating each separate set of generated files.
602 * Makefile.in: Adjust.
603 * igen.c: Adjust.
604
605 * gen-support.[ch]: New files. Output the support functions (found
606 in the ppc-instructions file) into a separate file.
607 * Makefile.in: Add.
608 * inline.h, inline.c: Add.
609 * std-config.h: Add.
610
611 * ld-cache.c: Re-design the cache table format.
612 * ppc-cache-rules: Update to new format.
613
614 * ld-decode.c: Re-design the decode table format.
615 * ppc-opcode-simple: Update to new format
616 * ppc-opcode-complex: Ditto
617 * ppc-opcode-flat: Ditto
618
619 * filter.h, filter.c: New files. Separate the opcode filter table
620 reading code from the rest of igen.c. Re-design the filter so that
621 it works inclusivly not exclusivly.
622 * igen.c: Remove the opcode filter table loading code.
623 * Makefile.in (filter.o): Adjust
624 * configure.in: Adjust filter flag so that default includes 32bit
625 and floating point.
626 * ppc-instructions: Clean up filter fields so that only in use
627 entries are specifed (ie delete `be').
628
629 * misc.c (name2i, i2name): New function. Map between a string and
630 an integer value.
631
632Mon Jun 17 20:08:03 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
633
634 * sim_calls.c (sim_close): If simulator not created, skip printing
635 of run information.
636
637Mon Jun 17 20:08:03 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
638
639 * registers.c (register_description): Typo, insns not insn.
640
641 * ppc-instructions (model_get_number_of_stalls): New model function,
642 returns number of stalls for the specified processor.
643 * psim.c (psim_read_register): Add call to new function
644 model_get_number_of_stalls().
645
646 * ppc-instructions (model_get_number_of_cycles): New model function,
647 returns number of stalls for the specified processor.
648 * psim.c (psim_read_register): Add call to new function
649 model_get_number_of_cycles().
650
651Fri Jun 14 00:11:56 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
652
653 * device_table.h: Don't pass the parent device into a devices
654 create function. This makes the create function consistent with
655 the documentation.
656 * device.c (device_template_create_device): Ditto
657 * hw_pal.c (hw_pal_create): Ditto
658 * hw_core.c (hw_core_create): Ditto
659 * hw_vm.c (hw_vm_create): Ditto
660 * hw_disk.c (hw_disk_create): Ditto
661 * hw_nvram.c (hw_nvram_create): Ditto
662 * hw_memory.c (hw_memory_create): Ditto
663 * hw_cpu.c (hw_cpu_create): Ditto.
664
665 * device.c (split_find_device): Allow a null initial parent device.
666 (device_template_create_device): Ditto.
667
668 * device.c (device_create_from): Make local (static) only used
669 within device.c.
670 * device_table.h: typedef device_callbacks moved here (from
671 device.h) where it belongs.
672
673 * hw_core.c: New file. Implements just the core device using the
674 core object.
675
676 * corefile.c: Moved all core device functions into the new
677 hw_core.c file. core_device_create() disapears.
678
679 * psim.c (psim_tree): Use device_tree_add_parsed() to create the
680 core device.
681
682Thu Jun 13 00:09:29 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
683
684 * hw_init.c: Correct typo in comment.
685
686 * corefile.c (core_init): Remove any remaining references to a
687 default map.
688 (core_map_find_mapping): Ditto.
689
690Wed Jun 12 22:30:32 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
691
692 * corefile.c (core_init): Make function global so that other
693 devices are able to use the full core object.
694
695 * corefile.c (core_create, core_from_device): Break core_create
696 into two functions. The first creates a core object, the second
697 returns the core object associated with a core device.
698
699 * corefile.c (core_device_create): Use core_create to make the
700 core object.
701
702 * psim.c (psim_create): Use core_from_device() instead of
703 core_create().
704
705 * device.c (device_template_create_device): Make static as only
706 needed by functions internal to device.c.
707
708Fri Jun 7 23:47:18 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
709
710 * ppc-opcode-test-2: Remove description of fields.
711 * ppc-opcode-complex: Ditto
712 * ppc-opcode-flat: Ditto
713 * ppc-opcode-simple: Ditto
714 * ppc-opcode-stupid: Ditto
715 * ppc-opcode-test-1: Ditto
716 * ppc-cache-rules: Ditto
717
718 * igen.c: Add description of files as a comment at the front.
719
720Wed Jun 26 12:50:33 1996 Michael Meissner <meissner@tiktok.cygnus.com>
721
722 * configure.in: Check for whether the termios and termio
723 structures are really defined, and whether or not, they define the
724 c_line field.
725 * configure: Regenerate.
726
727 * Makefile.in ({,TERMIO_}CFLAGS): Add TERMIO_CFLAGS options set by
728 configure.
729
730 * emul_unix.c: Various changes to allow for building on systems
731 with different termio and termios structures. If host has both
732 termio and termios, just use termios. No longer include
733 sys/ioctl.h.
734
78c09e4a
JM
735Wed Jun 26 12:26:55 1996 Jason Molenda (crash@godzilla.cygnus.co.jp)
736
737 * Makefile.in (bindir, libdir, datadir, mandir, infodir, includedir,
738 INSTALL_PROGRAM, INSTALL_DATA): Use autoconf-set values.
739 (docdir): Removed.
740 * configure.in (AC_PREREQ): autoconf 2.5 or higher.
741 (AC_PROG_INSTALL): Added.
742 * configure: Rebuilt.
743
30c87b55
MM
744Wed Jun 5 23:53:42 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
745
746 * corefile.h: Rewrite documentation so that it can be extracted and
747 converted into texinfo (and hence ready for translation into html,
748 tex or nroff).
749 * device.h: Ditto
750
78c09e4a
JM
751Thu Jun 6 09:52:37 1996 Michael Meissner <meissner@tiktok.cygnus.com>
752
753 * hw_disk.c (SEEK_SET): If SEEK_SET is not defined, define as 0.
754
755Wed Jun 5 11:46:52 1996 Andrew Cagney <cagney@puddin>
756
757 * hw_disk.c: Include <unistd.h> if available. Under SunOS, that
758 is the source of SEEK_SET.
759
8477437c
MM
760Wed Jun 5 01:39:07 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
761
762 * psim.c (psim_options): Correct type of dummy arguments being
763 passed to a device_ioctl call.
764
765 * hw_init.c (hw_data_init_data_callback): Adjust printf arguments.
766 (write_stack_arguments): Ditto.
767 * hw_trace.c: Instance callback entry no longer a table.
768
769Wed Jun 5 01:39:07 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
770
771 * emul_unix.c (do_unix_umask): Cast printf argument.
772 (convert_to_linux_termios): Use LINUX_VSWTC not LINUX_VSWCH
773
5b18a1a0
MM
774Mon Jun 3 15:02:04 1996 Michael Meissner <meissner@tiktok.cygnus.com>
775
8477437c 776 * hw_init.c (update_for_binary_section): Abort if we find an
fe098bf4
MM
777 .interp section, which indicates the need for shared libraries to
778 be loaded.
779
8477437c
MM
780Mon Jun 3 15:02:04 1996 Michael Meissner <meissner@tiktok.cygnus.com>
781
5b18a1a0
MM
782 * emul_unix.c (do_unix_{time,gettimeofday,getrusage}): Add support
783 for time, gettimeofday, and getrusage system calls.
784 ({solaris,linux}_descriptors): Add new system calls.
785 (do_get{,e}{uid,gid}): Use gid_t/uid_t types.
786 (do_get{,p}pid): Use pic_t types.
787
788 * configure.in (AC_TYPE_{GETGROUPS,SIGNAL}): Define.
789 (AC_TYPE_{MODE,OFF,PID,SIZE,UID}_T): Define.
790 * config{.in,ure}: Regenerate.
791
8477437c
MM
792Mon Jun 3 23:19:57 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
793
794 * emul_netbsd.c (emul_netbsd_create): Use the more specific names
795 `ppc-elf' and `ppc-xcoff' for the stack-type.
796 * emul_unix.c (emul_unix_create): Ditto.
797 * emul_bugapi.c (emul_bugapi_create): Ditto.
798 * hw_init.c: Reconize the new names.
799
800 * emul_unix.c (do_unix_break): Adjust so that the updated ioctl
801 call is used (no system parameter).
802
88f1eac4
MM
803Sun Jun 2 11:21:17 1996 Michael Meissner <meissner@tiktok.cygnus.com>
804
805 * emul_unix.{h,c}: New files to provide Solaris and Linux system
806 call emulations.
807
808 * Makefile.in (LIB_{SRC,OBJ}): Add emul_unix.{c,o}.
809 (os_emul.o): Depend on emul_unix.h.
810 (emul_unix.o): New dependency.
811
812 * configure.in (--enable-sim-alignment): Add 0|default to mean set
813 alignment to 0, which means use appropriate alignment for mode.
814 (AC_CHECK_FUNCS): Add new functions needed by emul_unix.c.
815 (AC_CHECK_HEADERS): Add new include files needed by emul_unix.c.
816 * config.in: Regenerate.
817 * configure: Regenerate.
818
819 * emul_generic.c (emul_write2_status): New function to return
820 results in r3 and r4 for Solaris system calls.
821 (emul_do_system_call): If the system call is not support, but
822 there is a string for the system call name, print out the string
823 instead of the system call number.
824
825 * emul_generic.h (emul_write2_status): Declare it.
826
827 * emul_netbsd.c: Use /* */ around comment on #endif.
828
829 * os_emul.c: Include emul_unix.h.
830 (os_emulations): Add emulations for Solaris, and Linux.
831
832 * psim.c (psim_usage): Add message about solaris, linux
833 emulations.
834
8477437c
MM
835Thu May 30 00:00:10 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
836
837 * hw_iobus.c: Tidy up notes so that they can be auto-extracted.
838
839 * README: Correct PSIM's title
840
841Wed May 29 23:50:26 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
842
843 * basics.h: New global type object_disposition, used to indicate
844 the status of objects when things are restarted.
845
846Fri May 17 17:28:52 1996 Andrew Cagney <cagney@benjimen.highland.com.au>
847
848 * device_table.h: Change the interrupt descriptor structure so
849 that it includes an additional member - an upper bound on the
850 interrupts by that name.
851
852 * device.c (device_interrupt_decode): Allow a range of interrupt
853 ports (eg rst0 .. rst6) if the port descriptors bound is non zero.
854
855 * device.c (device_tree_print_device): Include a list of valid
856 interrupt ports when listing supported devices.
857
858 * device.h, device.c (device_child_interrupt_*): Delete. Not used.
859
860 * emul_generic.c (emul_add_tree_hardware): Modify the creation of
861 the interrupt net so that it uses int0 .. intN.
862
863Tue May 14 23:03:53 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
864
865 * device.h, device.c (device_ioctl): Drop the system argument.
866 Devices can not obtain this using the device_system() call.
867 * device_table.h: Adjust accordingly.
868 * hw_*.c: Adjust accordingly.
869 * emul_netbsd.c (do_break): Adjust call to vm device accordingly.
870 * psim.c (psim_options): Use a device_ioctl call to force the
871 hw_trace device to update the trace options.
872 * hw_trace.c: Replace the init function with an ioctl call. Adjust
873 doc accordingly.
874
875 * psim.c (psim_init): Re-order initialization so that the
876 os-emulation is initialized after the device tree. Without this,
877 os-emul's are not able to create instances or access properties
878 that contain an instance handle.
879
880 * device.h, device.c (device_add_*_property): Make these functions
881 internal to device.c. The user has access to the more generic
882 device_tree_add_parsed function. Differentiate between the initial
883 and current value for each property.
884 * (clean_device_properties): New function that deletes any
885 properties created after the start of a simulation and restores
886 the initial value of any others (ignoring ihandles).
887 * (init_device_properties): (Re)Initialize any properties that
888 contain ihandles. create
889
890 * (device_tree_init): Include calls to clean the device tree's
891 properties and then initialize them. Document this in the device.h
892 file.
893
894Mon May 6 17:36:15 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
895
896 * interrupts.c (decrementer_interrupt): Always pend a decrementer
897 interrupt even if it is not yet possible to deliver it.
898
899Wed May 1 12:26:51 1996 Andrew Cagney <cagney@benjimen>
900
901 * mon.h, mon.c (mon_get_number_of_insns): Make this externally
902 visable adjusting the arguments so that the interface is correct.
903 (mon_print_info): Adjust calls.
904
905 * registers.h, registers.c (register_description): Add phony
906 cycle, insn and stall registers.
907
908 * psim.c (psim_read_register): Return nr of instructions for given
909 processor.
910
911Tue Apr 30 22:09:09 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
912
913 * hw_htab.c: New file. Extract contents from disk_table.c.
914 Contains a device that, during initialization will create a
915 PowerPC htab in memory.
916 * hw_register.c: New file. Extract contents from disk_table.c.
917 Contains a device that, during initialization, will parse its
918 property list and use that to initialize various processor
919 registers (not target specific).
920 * hw_vm.c: New file. Extract contents from disk_table.c. Contains
921 a device that handles accesses to invalid virtual memory addresses
922 (in user mode).
923 * hw_init.c: New file. Extract contents from disk_table.c. Misc
924 devices that can initialize memory from a file.
925 * hw_trace.c: New file. Extract contents from disk_table.c.
926 Configure trace options from property values.
927
928 * Makefile.in (hw_htab.o, hw_register.o, hw_vm.o, hw_init.o,
929 hw_trace.c): Add new device files.
930
931 * device_table.c: Remove above code, now in separate independant
932 files.
933
934Fri Apr 26 00:00:07 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
935
936 * hw_disk.c: New file. Disk and CDROM device.
937
938 * Makefile.in (hw_disk.o): Add device hw_disk.c.
939
940 * pk_disklabel.c: New file. Implement the miss-named disk-label
941 package.
942
943 * Makefile.in (pk.h): Create the file pk.h that contains a list of all
944 the packages.
945
946 * Makefile.in (hw.h, hw.c): Add dependancy on Makefile so that
947 they are re-created when the makefile is updated.
948
949 * emul_generic.c (emul_add_tree_hardware): Add a disk device
950 (below the iobus) to the device tree. Include an ihandle of
951 the disk as /chosen/disk.
952
953 * emul_bugapi.c (emul_bugapi_create): Don't initialize the input,
954 output and (new) disk handles yet.
955 * (emul_bugapi_init): Initialize the input, output (and just added)
956 disk ihandles here.
957 * (emul_bugapi_do_diskio): New. Performs disk i/o (well at least
958 what I think the behavour is).
959 * emul_bugapi.c (emul_bugapi_instruction_call): Add hook to disk
960 i/o bug call. For RETURN call, exit using gpr[3]'s status even
961 though this isn't part of the spec - makes it possible for machine
962 code to signal the aporting of a simulation run.
963
964 * emul_chirp.c (chirp_emul_call_method): Add support for the
965 claim/release methods.
966 * (chirp_emul_exit): Add an optional exit status argument to
967 the exit method. Makes it possible for chirp emul simulations
968 to abort upon an error.
969 * device.h, device.c (device_instance_claim,
970 device_instance_release): New methods for claiming and releasing
971 memory.
972 * hw_memory.c: add claim and release memory methods.
973 * hw_*: Use the claim memory method when allocating physical
974 memory.
975
976Thu Apr 18 23:38:10 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
977
978 * hw_nvram.c (hw_nvram_update_clock): Use the current not previous
979 time when updating the clock.
980
981 * hw_nvram.c: Tidy up documentation
982
f64dbcdd
MM
983Fri May 24 10:08:10 1996 Michael Meissner <meissner@tiktok.cygnus.com>
984
0c18e3f0
MM
985 * configure.in (AC_STRUCT_ST_{BLKSIZE,BLOCKS,RDEV}): Use these
986 macros to determine whether or not the appropriate st_<xxx> fields
987 exist in the stat structure.
988 (AC_CHECK_FUNCS): Check for all unix system calls used, except for
989 the real basic ones like open, read, write, etc.
990 * config{.in,ure}: Regenerate.
991
992 * emul_netbsd.c: Add support for missing system calls, and/or
993 missing stat fields.
119b85f6
MM
994 (MAXPATHLEN): Undefine if including unistd.h, since sys/param.h
995 might define it.
0c18e3f0 996
f64dbcdd
MM
997 * hw_pal.c (WITH_STDIO): Redefine if O_NDELAY, F_GETFL, or F_SETFL
998 are not defined.
999 (scan_hw_pal): Do not cause syntax error if O_NDELAY, F_GETFL, or
1000 F_SETFL not defined.
1001
1002Tue May 21 17:24:45 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1003
1004 * emul_netbsd.c (write_stat): Don't convert st_blocks unless the
1005 host is netbsd.
1006
d61eb812
MM
1007Thu May 16 10:56:45 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1008
1009 * configure.in (AC_CHECK_HEADERS): Add sys/ioctl.h.
1010 * config{.in,ure}: Regenerate.
1011 * emul_netbsd.c: If HAVE_SYS_IOCTL_H is not defined, don't include
1012 sys/ioctl.h.
1013
048668d3
MM
1014Tue May 7 17:28:12 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1015
1016 * hw_pal.c (hw_pal_instance_read_callback): Remove unused
1017 variable.
1018
1019 * misc.c ({,target_}a2i): Rewrite to not use strtoul.
1020
1021 * Makefile.in ({spreg,misc}.o): Add dependency on .c file.
1022 ({i,d}gen): Don't link in liberity. Use BUILD_LIBS instead of
1023 LIBS.
1024
1ed0c0e7
MM
1025Mon May 6 11:31:43 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1026
1027 * hw_pal.c (hw_pal_instance_read_callback): If using stdio, use
1028 fgets to read line. If not using stdio, do a simple blocking read
1029 of len bytes.
1030
08dc78ad
MM
1031Fri May 3 15:07:42 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1032
1033 * Makefile.in: Correctly build simulator for build machine != host
1034 machine.
1035
a72d2509 1036Tue Apr 30 18:46:05 1996 Michael Meissner <meissner@tiktok.cygnus.com>
997f0ee9 1037
a72d2509
MM
1038 * configure.in (--enable-hostendian): Rework so the default uses
1039 the AC_C_BIGENDIAN results. Only run AC_C_BIGENDIAN if not cross
1040 compiling.
1041 * configure: Regenerate.
1042
1043 * sim-endian.h: Add more tests for host endian to support more
1044 platforms in a cross compilation environment.
64646bd3 1045
a72d2509 1046Wed Apr 17 14:38:06 1996 Michael Meissner <meissner@tiktok.cygnus.com>
64646bd3 1047
a72d2509
MM
1048 * hw_pal.c ({scan,write}_hw_pal): If WITH_STDIO == DO_USE_STDIO,
1049 use stdio, instead of unpended read/printf_filtered.
1050 (hw_pal_instance_write_callback): If WITH_STDIO == DO_USE_STDIO,
1051 flush stdout after writing the characters.
d6103e8e 1052
6740925b
MM
1053 * options.c (print_options): Print out WITH_STDIO.
1054
d6103e8e
MM
1055 * Makefile.in (STDIO_CFLAGS): Pass on result of @sim_stdio@
1056 configuration variable.
1057 (CONFIG_CFLAGS): Include STDIO_CFLAGS.
a72d2509
MM
1058 (hw.{c,h}): Allow for source dir != build dir, and for HW_SRC
1059 files to contain directory pieces.
d6103e8e
MM
1060
1061 * std-config.h (DO{,NT}_USE_STDIO): New flags for whether we
1062 should use stdio for console input.
1063 (WITH_STDIO): If not defined, define as DONT_USE_STDIO.
1064
1065 * configure.in (--enable-sim-stdio): Add new switch to control
1066 whether stdio is used for console I/O.
1067 * configure: Regenerate.
1068
a72d2509
MM
1069 * interrupts.c (external_interrupt): Declare it to be
1070 INLINE_INTERRUPTS, not INLINE_CPU.
1dc7c0ed 1071
a72d2509 1072Mon Apr 15 23:30:56 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
1dc7c0ed 1073
a72d2509
MM
1074 * events.c (insert_event_entry): Allow events to be scheduled
1075 *NOW* (at delta time 0). Add assertions to clarify behavour of
1076 event queue.
1dc7c0ed 1077
a72d2509
MM
1078 * events.c (update_time_from_event): New function. Calculates the
1079 number of ticks from the next event. Use this.
1dc7c0ed 1080
a72d2509 1081Sun Apr 14 21:39:45 1996 Andrew Cagney <cagney@highland.com.au>
1dc7c0ed 1082
a72d2509
MM
1083 * emul_netbsd.c (do_break): Return 0 if success (instead of
1084 adjusted break).
1dc7c0ed 1085
a72d2509
MM
1086 * device_table.c (vm_ioctl_callback): Don't return adjusted break
1087 (isn't needed).
1dc7c0ed 1088
a72d2509 1089Sun Apr 14 21:32:41 1996 Andrew Cagney <cagney@highland.com.au>
1dc7c0ed 1090
a72d2509
MM
1091 * device_table.h: Change type of the device ioctl so that it
1092 returns an int (status).
1093 * device.h (device_ioctl): Ditto.
1094 * device.c (device_ioctl): Ditto.
1dc7c0ed 1095
a72d2509
MM
1096 * device_table.c (stack_ioctl_callback): Return 0 status.
1097 (vm_ioctl_callback): Ditto
1dc7c0ed 1098
8477437c
MM
1099Sat Apr 13 00:00:24 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
1100
1101 * emul_netbsd.c (do_read): Correctly set the return value.
1102 (do_getpid): Ditto.
1103 (do_getuid): Ditto.
1104 (do_geteuid): Ditto.
1105 (do_dup): Ditto.
1106 (do_getegid): Ditto.
1107 (do_getgid): Ditto.
1108 (do_sigprocmask): Ditto.
1109 (do_umask): Ditto.
1110 (do_dup2): Ditto.
1111 (do_gettimeofday): Ditto.
1112 (do_getrusage): Ditto.
1113 (do_fstat): Ditto.
1114 (do_stat): Ditto.
1115 (do_lseek): Ditto.
1116 (do___sysctl): Ditto.
1117
1118Fri Apr 12 20:56:47 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
1119
1120 * device_table.c (vm_ioctl_callback): Don't access the processor
1121 registers directly, instead leave it to the caller to handle this.
1122
1123 * emul_netbsd.c (do_break): Which calls vm_ioctl_callback to
1124 perform a break. Pass in the new break value and set the
1125 registers according to the result.
1126
1127 * emul_generic.c (emul_write_status): Change so that r3 contains
1128 either status or errno and failure is indicated by SO.
1129
1130Thu Apr 4 23:03:38 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
1131
1132 * emul_bugapi.c (emul_bugapi_create): More strict check of OEA
1133 address.
1134
a72d2509 1135Thu Apr 4 20:58:05 1996 Andrew Cagney <cagney@highland.com.au>
1dc7c0ed 1136
a72d2509
MM
1137 * interrupts.h (interrupts): New structure contains state of
1138 pending interrupts.
1dc7c0ed 1139
a72d2509
MM
1140 * cpu.c (cpu_interrupts): New function. Pending interrupt status
1141 in the cpu and grant access to it. Add interrupts to cpu
1142 structure.
1dc7c0ed 1143
a72d2509 1144Fri Mar 29 22:09:25 1996 Andrew Cagney <cagney@highland.com.au>
1dc7c0ed 1145
a72d2509
MM
1146 * device.c (device_tree_add_parsed): Check that the creation of a
1147 device instance worked before using it.
1dc7c0ed 1148
a72d2509
MM
1149 * psim.c (psim_halt): Remove cia argument from psim_halt. This
1150 function does not save the CIA so do not pass it in.
1dc7c0ed 1151
a72d2509 1152Fri Mar 29 21:30:56 1996 Andrew Cagney <cagney@highland.com.au>
1dc7c0ed 1153
a72d2509
MM
1154 * hw_pal.c (hw_pal): Merge the halt and icu and console devices
1155 found in device_table.c into a single hack pal.
1dc7c0ed 1156
a72d2509 1157 * device_table.c (halt, icu, console): Delete.
1dc7c0ed 1158
a72d2509 1159 * Makefile.in (hw_pal.o): New dependency.
1dc7c0ed 1160
a72d2509
MM
1161 * emul_generic.c (emul_add_tree_hardware): Re-arange device tree
1162 so that it uses the pal instead of the icu/halt/console devices.
1163 Wire the pal's interrupt ports up to the cpu nodes.
1dc7c0ed 1164
a72d2509 1165Fri Mar 29 20:17:17 1996 Andrew Cagney <cagney@highland.com.au>
1dc7c0ed 1166
a72d2509
MM
1167 * hw_iobus.c (hw_iobus_attach_address_callback): Move from
1168 device_table.c to here.
1dc7c0ed 1169
a72d2509 1170 * Makefile.in (hw_iobus.o): New dependency.
1dc7c0ed 1171
8477437c
MM
1172Fri Mar 29 12:17:58 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
1173
1174 * emul_bugapi.c (_os_emul_data): Add fields for output, input.
1175 (emul_bugapi_create): Create input, output from /chosen/stdin and
1176 /chosen/stdout.
1177 (emul_bugapi_do_{read,write}): Switch to use device_instance
1178 interface.
1179 (emul_bugapi_instruction_call): Change calls to
1180 emul_bugapi_do_{read,write} to pass device instance argument.
1181
1182Tue Mar 26 14:57:58 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1183
1184 * igen.c (idecode_switch_end): Fix 2/26 change so that an extra
1185 default is not written out if a default was already written.
1186
1187 * psim.c (psim_{read,write}_register): Use sizeof unsigned_8 to
1188 size cooked_buf, not sizeof natural_word, since floating point
1189 registers are 8 bytes.
1190
a72d2509 1191Mon Mar 25 22:07:13 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
1dc7c0ed 1192
a72d2509 1193 * configure: Regenerate with autoconf 2.9.
1dc7c0ed 1194
a72d2509 1195Thu Mar 21 00:14:26 1996 Andrew Cagney <cagney@highland.com.au>
1dc7c0ed 1196
a72d2509 1197 * device_table.h: Always include string headers.
1dc7c0ed 1198
8477437c
MM
1199Thu Mar 21 00:06:09 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
1200
1201 * main.c (error): Be careful to not try to print out statistics
1202 when the simulation was never created.
1203
a72d2509 1204Sun Mar 17 22:40:57 1996 Andrew Cagney <cagney@highland.com.au>
1dc7c0ed 1205
a72d2509
MM
1206 * basics.h: Move the event queue's definition to here so that it
1207 can be refered to globally with out importing all of events.h.
1dc7c0ed 1208
a72d2509
MM
1209 * psim.h, psim.c (psim_event_queue): New function. Grant access
1210 to the simulation event queue. Will make this the single point of
1211 access (there is after all only one event queue in the
1212 simulation).
1dc7c0ed 1213
a72d2509
MM
1214 * cpu.c (cpu_create): Use psim_event_queue to obtain the event
1215 queue instead of it being passed in. No longer allow access to
1216 the cpu's copy of the event queue.
1dc7c0ed 1217
a72d2509 1218Sun Mar 17 22:40:57 1996 Andrew Cagney <cagney@highland.com.au>
1dc7c0ed 1219
a72d2509
MM
1220 * events.h, events.c (event_handler): Remove event_queue from
1221 arguments passed to an event handler. That argument is redundant
1222 - the `data' should refer to a data structure that contains the
1223 event queue if queing is needed.
1dc7c0ed 1224
a72d2509 1225 * cpu.c (cpu_decrement_event): adjust
1dc7c0ed 1226
a72d2509 1227 * events.c (event_queue_process): adjust
1dc7c0ed 1228
a72d2509 1229Sun Mar 17 22:40:57 1996 Andrew Cagney <cagney@highland.com.au>
1dc7c0ed 1230
a72d2509
MM
1231 * device.h, device.c (device_system): New, returns a handle for
1232 the system given the device.
1dc7c0ed 1233
a72d2509
MM
1234 * device.c (device_address_init): Store a pointer back to the
1235 system in each devices node.
1dc7c0ed 1236
a72d2509
MM
1237 * device_table.h: Don't pass `system' into each device when it is
1238 being initialized, this is now available using device_system(me).
1dc7c0ed 1239
a72d2509 1240 * device.c (device_address_init, device_data_init): Adjust.
4f965b81 1241
a72d2509
MM
1242 * hw_cpu.c, hw_nvram.c, hw_memory.c, hw_eeprom.c, device_table.c:
1243 Adjust.
4f965b81 1244
a72d2509 1245Sun Mar 17 22:40:57 1996 Andrew Cagney <cagney@highland.com.au>
4f965b81 1246
a72d2509
MM
1247 * interrupts.c (decrementer_interrupt, external_interrupt):
1248 Remember that an interrupt wasn't delivered so that it can be
1249 tried again later.
4f965b81 1250
a72d2509
MM
1251 * interrupts.c (check_masked_interrupt): New function. (re)
1252 checks for the posibility that a recent change to the MSR may have
1253 made it possible to deliver an interrupt that was previously
1254 masked be the EE bit.
4f965b81 1255
a72d2509
MM
1256 * ppc-instructions (mtmsr, mfmsr, rfi): Check for posibility of
1257 a pending interrupt being delivered using check_masked_interrupt().
4f965b81 1258
a72d2509
MM
1259 * cpu.c (cpu_decrement_event): Just call decrementer_interrupt()
1260 leaving it to that module to handle both interrupt synchronization
1261 and masking.
4f965b81 1262
a72d2509
MM
1263 * cpu.c (struct _cpu): remove variables that were going to record
1264 pending decrementer and external interrupts.
cb7a6892 1265
a72d2509 1266Sun Mar 17 22:40:57 1996 Andrew Cagney <cagney@highland.com.au>
cb7a6892 1267
a72d2509
MM
1268 * hw_cpu.c, hw_cpu.h: New files. Implement a device that sits
1269 between the interrupt controller and the simulators internal
1270 processor model. Maps device interrupts onto the processor
1271 interrupt function calls.
cb7a6892 1272
a72d2509 1273Mon Mar 4 06:06:54 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
cb7a6892 1274
a72d2509
MM
1275 * hw_nvram.c: NVRAM device that includes a real-time clock that is
1276 updated each second.
cb7a6892 1277
a72d2509 1278Mon Mar 4 04:18:50 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
cb7a6892 1279
a72d2509
MM
1280 * device.h (attach_type): Remove attach_default type address
1281 spaces. Will replace with levels of callback memory.
cb7a6892 1282
a72d2509
MM
1283 * corefile.h, corefile.c (new_core_mapping), corefile.c
1284 (core_map_attach): Replace default attach with a layerd callback
1285 approach.
cb7a6892 1286
a72d2509 1287Sun Mar 3 03:58:46 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
cb7a6892 1288
a72d2509
MM
1289 * device.c (split_property_specifier): ensure that only a single
1290 property is found.
1291 (split_value): New function, parses the value part of a device
1292 spec.
cb7a6892 1293
a72d2509
MM
1294 * device.c (device_tree_add_parsed): Use the interrupt conversion
1295 functions to determine the interrupt port numbers.
cb7a6892 1296
a72d2509
MM
1297 * device_table.h: Add table that maps between an interrupts
1298 symbolic name and its port number.
cb7a6892 1299
a72d2509
MM
1300 * device.h, device.c (device_interrupt_decode,
1301 device_interrupt_encode): new functions use the recently added
1302 interrupt port name/number tables to perform conversion.
cb7a6892 1303
a72d2509 1304Sun Mar 3 03:23:59 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
cb7a6892 1305
a72d2509
MM
1306 * device.h, device.c (device_set_array_property,
1307 device_set_boolean_property, device_set_ihandle_property,
1308 device_set_integer_property, device_set_string_property): New
1309 functions - allow the value of a given property to be changed.
cb7a6892 1310
a72d2509
MM
1311 * device.h, device.c: Re-order declaration and definition of
1312 property functions.
cb7a6892 1313
a72d2509 1314Sun Mar 3 03:10:22 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
cb7a6892 1315
a72d2509
MM
1316 * device.c (device_tree_print_device, device_tree_add_parsed):
1317 Remove references to phandle properties.
cb7a6892 1318
8477437c
MM
1319Wed Feb 28 00:43:07 1996 Andrew Cagney - aka Noid <cagney@highland.com.au>
1320
1321 * Makefile.in (corefile.o): missing dependency on device_table.h
1322 etc.
1323
a72d2509 1324Tue Feb 27 23:59:35 1996 Andrew Cagney - aka Noid <cagney@highland.com.au>
cb7a6892 1325
a72d2509
MM
1326 * device_table.h: Revamp device init callbacks so that they are a
1327 sub structure.
1328 * device.c (device_init_data, device_init_address): If an init
1329 callback is NULL assume it should do nothing.
1330 * device_table.c (ignore_device_init, unimp_device_init): delete
1331 as redundant.
1332 * device_table.c, hw_memory.c: adjust.
cb7a6892 1333
a72d2509
MM
1334 * (io): ditto.
1335 * (dma): ditto.
1336 * (device_instance): ditto.
1337 * (ioctl): ditto.
1338 * (address nee config_address): ditto.
1339 * (interrupt): ditto.
cb7a6892 1340
8477437c
MM
1341Mon Feb 26 21:11:20 1996 Andrew Cagney - aka Noid <cagney@highland.com.au>
1342
1343 * igen.c (idecode_switch_end): Output a default entry when the
1344 switch statement is perfect. Firstly stops GCC complaining about
1345 an incomplete switch and secondly it will be eliminated by a good
1346 compiler any way.
1347
a72d2509 1348Mon Feb 26 22:47:15 1996 Andrew Cagney - aka Noid <cagney@highland.com.au>
cb7a6892 1349
a72d2509
MM
1350 * Makefile.in (hw.h, hw.c): New targets. Create from the list of
1351 hw_*.c files. hw.h declares a device descriptor table for each hw
1352 device while hw.c lists those tables in a form suitable for the
1353 construction of a top leveltable in device_table.c.
cb7a6892 1354
a72d2509
MM
1355 * Makefile.in (device_table.o): now depends on hw.c a generated
1356 table of hw.
cb7a6892 1357
a72d2509
MM
1358 * device_table.c (device_table): Re-arange the table of devices so
1359 that two levels are possible. Make use of hw.c.
1360 * device_table.h: ditto.
cb7a6892 1361
a72d2509
MM
1362 * device.c (device_template_create_device): Handle new two level
1363 device lookup table.
1364 * device.c (device_usage): ditto.
cb7a6892 1365
a72d2509 1366Mon Feb 26 22:24:00 1996 Andrew Cagney - aka Noid <cagney@highland.com.au>
cb7a6892 1367
a72d2509 1368 * device_table.c: Delete the memory device (moved to hw_memory.c).
cb7a6892 1369
a72d2509 1370 * hw_memory.c: New file. Just an OpenBoot memory device.
8477437c
MM
1371
1372Wed Jan 17 21:47:34 1996 Andrew Cagney <cagney@highland.com.au>
1373
1374 * device.c (device_init_address): New. Split initialization into
1375 two stages, address and address spaces
1376 * device.c (device_init_data): New. ... and data or other work.
1377 With out this, devices try to modify memory before it as been
1378 attached.
1379
1380 * device.c (device_tree_init): Update to perform staged
1381 initialization.
1382
1383 * device.c (device_init): Delete.
1384
1385Wed Jan 17 21:43:09 1996 Andrew Cagney <cagney@highland.com.au>
1386
1387 * device_table.c (data_*): Rewrite to make heaver use of property
1388 nodes. Allow initialization by different data types.
1389 * device_table.c (htab_* pte_*): Rewrite to use properties.
1390
1391 * emul_chirp.c (emul_chirp_create): Use
1392 * emul_bugapi.c (emul_bugapi_create): Ditto
1393 * emul_netbsd.c (emul_netbsd_create): Ditto
1394
1395Wed Jan 17 21:24:50 1996 Andrew Cagney <cagney@highland.com.au>
1396
1397 * emul_generic.c (emul_add_tree_options): Annotate existing tree
1398 with options that haven't yet been specified.
1399 * emul_generic.c (emul_add_tree_hardware): Annotate existing tree
1400 with demo devices and properties.
1401
1402 * emul_chirp.c (emul_chirp_create): Update to use new
1403 device_tree_add_parsed call and additional information now
1404 included in the device tree. Use emul_add_tree* functions to add
1405 any missing details.
1406 * emul_bugapi.c (emul_bugapi_create): Ditto
1407 * emul_netbsd.c (emul_netbsd_create): Ditto
1408
1409Wed Jan 17 21:18:27 1996 Andrew Cagney <cagney@highland.com.au>
1410
1411 * device.c (device_instance_create): New. Create/delete and
1412 operate on instances of a device.
1413 * device.c (device_instance_delete): Ditto
1414 * device.c (device_instance_read): Ditto
1415 * device.c (device_instance_write): Ditto
1416 * device.c (device_instance_seek): Ditto
1417 * device.c (device_instance_data): Ditto
1418 * device.c (device_instance_name): Ditto
1419 * device.c (device_instance_path): Ditto
1420
1421 * emul_chirp.c (chirp_emul_open): Implement using device_instance.
1422 * emul_chirp.c (chirp_emul_close): Ditto
1423 * emul_chirp.c (chirp_emul_read): Ditto
1424 * emul_chirp.c (chirp_emul_write): Ditto
1425 * emul_chirp.c (chirp_emul_seek): Ditto
1426
1427 * emul_chirp.c (chirp_read_t2h_args): Read arguments from device.
1428 Being careful to convert all from target to host byte order.
1429 * emul_chirp.c (chirp_write_h2t_args): Converse.
1430
1431Wed Jan 17 20:07:15 1996 Andrew Cagney <cagney@highland.com.au>
1432
1433 * device.c (device_tree_add_parsed): New. Rewrite code to add
1434 devices to the device tree so that a single printf style function
1435 is used.
1436
1437 * device.c (device_tree_add_*): Delete. Replaced by above.
1438
1439 * device.c (split_device_specifier): Functions to manipulate a
1440 device specifier (path) breaking it into its components
1441 * device.c (split_property_specifier): Ditto
1442 * device.c (split_device_name): Ditto
1443 * device.c (split_find_device): Ditto
1444
1445 * device.c (scan_*): Delete
1446
1447 * device.c (device_tree_find_device): Rewrite to use above.
1448 * device.c (device_add_property): Ditto
1449
1450Wed Jan 17 19:51:56 1996 Andrew Cagney <cagney@highland.com.au>
1451
1452 * psim.c(psim_options): Parse the psim options, installing their
1453 value in the device tree. Options are now first entered into a
1454 device tree and then extracted out again when needed. This allows
1455 greater flexability in configuration.
1456
1457 * psim.c (psim_tree): Returns a basic device tree ready for
1458 parsing by psim_options.
1459 * psim.c (psim_usage): New. Give usage to varing levels of detail
1460 according to the verbosity. In turn output device and trace
1461 usage.
1462
1463 * main.c (main): Update to use new system
1464 * sim_calls.c (sim_open, sim_do_command): Ditto
1465
1466 * psim.c (psim_options): Add `r' option - ram size.
1467 * psim.c (psim_options): Add `o' option - openboot tree entry.
1468 * psim.c (psim_options): Add `h'/`H' options - more help.
1469
1470 * debug.c (trace_usage): Add more detailed help.
1471 * device.c (device_usage): New. Output help including a list of
1472 the devices currently available in the device table.
1473 * device_table.c: Add usage operator to each device.
1474
1475 * corefile.c (core_create, core_device_create): Adjust so that the
1476 core device is created earlier for psim_tree(). Core can later be
1477 created from it.
1478
1479 * psim.c (psim_create): Update to handle above way of creating
1480 things. Extract all information from the device tree.
1481
1482 * device_tree.c (trace_*): New device node, its properties are
1483 used to set the value of the trace options. Init this device (in
1484 psim_options) when ever the options are updated.
1485
1486Wed Jan 17 19:46:07 1996 Andrew Cagney <cagney@highland.com.au>
1487
1488 * debug.h: Add trace_print_info, trace_print_device_tree and
1489 trace_dump_device_tree. The first is a replacement for the
1490 variable `print_info' found in main.c and sim_calls.c. The latter
1491 two enable the dumping of the entire device tree.
1492
1493 * debug.c: Add to trace_description table.
1494
1495 * main.c (main): Use above trace instead of local variable
1496 * sim_calls.c (sim_close): Ditto
1497
1498 * device.c (device_tree_print_device): New. Prints the device
1499 tree in a format that is consistent with what can be parsed by the
1500 device tree load from file code.
1501
1502 * psim.c (psim_create): Dump device tree if enabled. If nump
1503 selected, exit psim immediatly.
1504
1505Wed Jan 17 19:36:52 1996 Andrew Cagney <cagney@highland.com.au>
1506
1507 * corefile-n.h (core_map_read_N): When mapping from an address to
1508 a device, do not subtract the devices base. The device its self
1509 can do this. Brings the behavour into line with OpenBoot.
1510 * corefile-n.h (core_map_write_N): Ditto
1511 * corefile.c (core_map_read_buffer): Ditto
1512 * corefile.c (core_map_write_buffer): Ditto
1513
1514 * device_table.c (console_io_read_buffer_callback): Adjust to
1515 handle biased address.
1516 * device_table.c (console_io_write_buffer_callback): Ditto
1517
1518Wed Jan 17 18:36:09 1996 Andrew Cagney <cagney@highland.com.au>
1519
1520 * device.c (attach_device_interrupt_edge): New. Interrupt model
1521 did not allow interrupts to be wired up as a general net (edges).
1522 Re-implement so that interrupt events can be passed to multiple
1523 controllers and interrupt controllers can further propogate
1524 interrupt events.
1525
1526 * device.c (attach_device_interrupt_edge) : New, Ditto
1527 * device.c (detach_device_interrupt_edge) : New, Ditto
1528 * device.c (clean_device_interrupt_edges) : New, Ditto
1529 * device.c (device_interrupt_event) : New, Ditto
1530 * device.c (device_interrupt_attach) : New, Ditto
1531 * device.c (device_interrupt_detach) : New, Ditto
1532 * device.c (device_child_interrupt_attach) : New, Ditto
1533 * device.c (device_child_interrupt_detach) : New, Ditto
1534
1535 * device.c (device_attach_interrupt) : Delete old
1536 * device.c (device_detach_interrupt) : Delete old
1537 * device.c (device_interrupt) : Delete old
1538 * device.c (device_interrupt_ack) : Delete old
1539
1540 * device_table.c (unimp_*) : Update to match
1541
1542 * device_table.c (icu_io_write_buffer_callback) : Update to use
1543 interface.
1544 * device_table.c (icu_interrupt_event_callback) : Ditto
1545
1546Wed Jan 17 18:18:40 1996 Andrew Cagney <cagney@highland.com.au>
1547
1548 * device.c (external_to_device) : New function that provides a
1549 standard mapping between a devices internal representation (a
1550 pointer) and its external (or what is passed to a client)
1551 representation (a phandle). Implement using the cap object
1552 attached to the root node.
1553
1554 * device.c (device_to_external) : Ditto
1555 * device.c (external_to_device_instance) : Ditto but for ihandle
1556 and device instance.
1557 * device.c (device_instance_to_external) : Ditto
1558
1559 * Makefile (device.o): Add dependency on cap.
1560
1561 * emul_chirp.c (struct _emul_chirp_data) : Elimate use of cap. Code
1562 needing to translate between internal and external representations
1563 changed to use the external_to_device et.al. device operations.
1564 * emul_chirp.c (chirp_emul_*) : Ditto
1565
1566 * Makefile (emul_chirp.o): Remove dependency on cap
1567
1568Sat Jan 6 10:13:26 1996 Andrew Cagney - aka Noid <cagney@highland.com.au>
1569
1570 * emul_chirp.c (map_over_chirp_note): Tighten up (and fix) checks
1571 on OpenBoot note section.
1572
1573Fri Jan 5 20:28:53 1996 Andrew Cagney <cagney@hignland.com.au>
1574
1575 * emul_generic.c (emul_write_buffer): Use vm faulting byte
1576 read/write calls for buffer transfers. This will cause a fault to
1577 occure if the transfer fails. CHRP catches the fault while the
1578 others suffer the consequences.
1579 (emul_read_buffer): Ditto.
1580 (emul_write_word): Ditto.
1581 (emul_read_word): Ditto.
1582 (emul_read_string): Ditto.
1583
1584Fri Jan 5 18:55:34 1996 Andrew Cagney <cagney@highland.com.au>
1585
1586 * emul_chirp.c (emul_chirp_create, emul_chirp_instruction_call),
1587 emul_generic (emul_blr_instruction): Use a real blr instruction to
1588 return from a client service call.
1589
1590 * emul_chirp.c (services): Add all OpenBoot services to table.
1591
1592 * emul_generic.h, emul_bugapi.c (emul_bugapi_create), emul_chirp.c
1593 (emul_chirp_create) : Use names instead of numbers for
1594 instructions being stored in memory.
1595
1596Fri Jan 5 18:52:28 1996 Andrew Cagney <cagney@highland.com.au>
1597
1598 * Makefile.in (maintainer-clean): Remove .log, core and *.core
1599 (From NetBSD) files.
1600
1601Wed May 29 22:57:40 1996 Andrew Cagney <cagney@kremvax.highland.com.au>
1602
1603 * ChangeLog.00, ChangeLog: ChangeLog from gdb-4.16 becomes
1604 ChangeLog.00
1605
This page took 0.123147 seconds and 4 git commands to generate.