* Make-common.in: Get SHELL from configure.
[deliverable/binutils-gdb.git] / sim / common / ChangeLog
1 Tue Mar 24 17:41:35 1998 Stu Grossman <grossman@bhuna.cygnus.co.uk>
2
3 * Make-common.in: Get SHELL from configure.
4 * (stamp-tvals sim-inline.c): Use $(SHELL) when invoking
5 move-if-change. Fixes NT native build problem.
6 * Makefile.in (nltvals.def): Use $(SHELL) when invoking
7 move-if-change. Fixes NT native build problem.
8 * configure: Regenerate with autoconf 2.12.1 to fix shell issues for
9 NT native builds.
10
11 Sun Mar 22 16:54:40 1998 Andrew Cagney <cagney@b1.cygnus.com>
12
13 * hw-device.h, hw-device.c (hw_strdup): New function.
14
15 * hw-base.c (hw_create): Use hw_strdup when saving a copy of the
16 strings name, family and args.
17 (full_name_of_hw): Use hw_strdup when returning the full path.
18
19 * hw-properties.c: Clean up property not found / wrong type error
20 messages.
21
22 * hw-tree.c (hw_tree_parse): Finish a devices initialization
23 before attaching any ports.
24
25 * hw-base.c (hw-config.): Include. Replace hardwired table.
26
27 * dv-glue.c: Copy over ../ppc/hw_glue.c. Update to new framework.
28
29 * Make-common.in: Add rule for dv-glue.o.
30
31 Sun Mar 22 16:45:54 1998 Andrew Cagney <cagney@b1.cygnus.com>
32
33 * hw-base.c (hw_finish): Move setting of trace level to here.
34 (hw_create): From here.
35
36 * hw-base.h, hw-base.c (do_hw_attach_regs): Copy function from
37 ../ppc/device_table.c.
38
39 * dv-pal.c (hw_pal_finish): Attach PAL device to parent bus.
40
41 * hw-tree.c (print_properties): Supress path when printing
42 properties of root node.
43
44 Sun Mar 22 16:21:15 1998 Andrew Cagney <cagney@b1.cygnus.com>
45
46 * hw-device.h (HW_TRACE): Define.
47 (hw_trace): Declare.
48 * hw-device.c (hw_trace): Implement function.
49
50 * hw-base.c (hw_create): Set hw trace level from "trace?"
51 property.
52
53 * dv-core.c (dv_core_attach_address_callback): Add trace.
54
55 * dv-pal.c: Replace DTRACE with HW_TRACE.
56
57 Sun Mar 22 15:23:35 1998 Andrew Cagney <cagney@b1.cygnus.com>
58
59 * hw-device.h (HW_ZALLOC, HW_MALLOC): New macros.
60 (hw_alloc_data): Delcare.
61 (struct hw): Add member alloc_of_hw.
62
63 * hw-device.c (hw_zalloc, hw_malloc, hw_free, hw_free_all): New
64 functions. Assocate memory with a device.
65 (stdlib.h): Include.
66
67 * hw-base.h (set_hw_delete): Define.
68 (hw_delete_callback): Declare.
69 (hw_delete): Declare.
70
71 * hw-base.c (hw_delete): Implement function.
72 (struct hw_base_data): Add member to_delete.
73 (ignore_hw_delete): New function, does nothing.
74 (hw_create): Set the hw_delete method.
75 (hw_create): Allocate the base type using HW_ZALLOC before setting
76 any methods.
77
78 * hw-tree.h, hw-tree.c (hw_tree_delete): New function.
79
80 * hw-properties.c: Replace zalloc/zfree with hw_zalloc/hw_free.
81
82 * hw-ports.c: Replace zalloc/zfree with hw_zalloc/hw_free.
83 (attach_hw_port_edge): Add struct hw argument
84
85 * dv-pal.c (hw_pal_finish): Replace zalloc/zfree with
86 hw_zalloc/hw_free.
87
88 Sun Mar 22 15:09:52 1998 Andrew Cagney <cagney@b1.cygnus.com>
89
90 * hw-device.h (hw_attach_address_callback,
91 hw_detach_address_callback): Attach to a single space not a space
92 mask. Clarify interpretation of SPACE:ADDR parameters.
93
94 * hw-base.c (passthrough_hw_attach_address,
95 passthrough_hw_detach_address): Update.
96 * dv-core.c (dv_core_attach_address_callback): Ditto.
97 * dv-pal.c (hw_pal_attach_address): Ditto.
98
99 Thu Mar 19 00:41:00 1998 Andrew Cagney <cagney@b1.cygnus.com>
100
101 * sim-options.h: Document additional CPU arg to OPTION_HANDLER.
102
103 Wed Mar 18 14:13:02 1998 Andrew Cagney <cagney@b1.cygnus.com>
104
105 * Make-common.in (SIM_HW_OBJS, SIM_HW_SRC, SIM_DV_OBJS): Define.
106 (hw-base_h, hw-device_h, hw-handles_h, hw-instances_h, hw_ports_h,
107 hw-properties_h, hw-tree_h): Define, point at corresponding
108 header.
109 (hw_base_headers): Define list of headers included by hw-base.h
110 (hw-base.o, hw-device.o, hw-instances.o, hw-handles.o, hw-ports.o,
111 hw-properties.o, hw-tree.o): Specify dependencies.
112 (dv-core.o, dv-pal.o): Ditto.
113
114 * sim-hw.h: New file.
115
116 * hw-device.h, hw-device.c, hw-properties.h, hw-properties.c,
117 hw-ports.h, hw-ports.c: New files. Copied from ../ppc/device.[ch].
118
119 * hw-tree.h, hw-tree.c: New files. Copied from ../ppc/tree.[hc].
120
121 * hw-base.h, hw-base.c: new files. Copied from
122 ../ppc/device_table.[hc].
123
124 * dv-core.c, dv-pal.c: New files. Copied from
125 ../ppc/hw_{core,pal}.c
126
127 * sim-basics.h (struct hw): Declare.
128 (enum port_direction, enum object_disposition): Declare.
129
130 Wed Mar 18 12:38:12 1998 Andrew Cagney <cagney@b1.cygnus.com>
131
132 * aclocal.m4 (SIM_AC_OPTION_HARDWARE): Set sim_hw_obj, sim_dv_obj,
133 sim_dv_src in Makefile. Take list of devices as parameter to m4
134 macro..
135
136 * configure: Regenerated to track ../common/aclocal.m4 changes.
137
138 Mon Mar 16 12:37:33 1998 Andrew Cagney <cagney@b1.cygnus.com>
139
140 * sim-trace.h, sim-trace.c (trace_prefix): Pass in sim_cia so that
141 trace_prefix can abort cleanly.
142
143 Sat Mar 14 18:36:12 1998 Doug Evans <devans@seba.cygnus.com>
144
145 * dv-sockser.c, dv-sockser.h: New files.
146 * Make-common.in (dv-sockser.o): Add rule for.
147 * aclocal.m4: Check for fcntl.h.
148 * config.h: Add HAVE_FCNTL_H.
149
150 * sim-break.c (remove_breakpoint): Fix thinko.
151
152 * sim-hload.c (sim_load): Provide default value of SIM_HANDLES_LMA.
153 Use SIM_HANDLES_LMA for lma_p arg to sim_load_file.
154
155 1998-03-13 Fred Fish <fnf@cygnus.com>
156
157 * sim-base.h (struct sim_state_base): Add prog_syms and
158 define macro STATE_PROG_SYMS.
159 * sim-trace.c (trace_prefix): Add variables abfd, symsize,
160 symbol_count, and asymbols. Call bfd_get_symtab_upper_bound
161 and bfd_canonicalize_symtab, to get symbol table on first use
162 and preserve it via STATE_PROG_SYMS for future calls to
163 bfd_find_nearest_line.
164
165 Wed Mar 11 14:02:47 1998 Andrew Cagney <cagney@b1.cygnus.com>
166
167 * sim-core.h, sim-core.c (sim_core_map_to_str): Delete.
168
169 * sim-core.c (sim_core_attach): Handle a generic number of maps -
170 up to nr_maps, not just access_* maps.
171
172 * sim-profile.h (struct PROFILE_DATA): Track nr_maps different
173 maps.
174
175 * sim-profile.c (profile_print_core): Make map unsigned. Iterate
176 over nr_maps not sim_core_nr_maps.
177
178 * sim-events.h, sim-events.c (sim_events_watch_core): Change
179 core_map argument to unsigned.
180 (struct _sim_core): Ditto for struct member core_map.
181
182 * sim-core.h (nr_sim_core_maps, sim_core_*_map): Delete
183
184 * sim-basics.h (access_io, access_*_io): Define.
185 (map_read, map_write, map_exec, map_io): Define.
186
187 * sim-core.c, sim-core.h (sim_core_attach): Replace argument
188 attach with more generic mapmask.
189 (sim_core_{read,write}_*): Change map argument to unsigned.
190
191 * sim-core.c (sim_core_uninstall, sim_core_attach,
192 sim_core_detach): Iterate over nr_maps instead of
193 sim_core_nr_maps.
194
195 * sim-break.c (insert_breakpoint): Write breakpoints to exec_map
196 instead of the write_map.
197 (remove_breakpoint): Ditto.
198
199 * genmloop.sh (engine_resume_full): Replace sim_core_*_map
200 with read_map, write_map, exec_map resp.
201
202 * cgen-mem.h (DECLARE_GETMEM, DECLARE_SETMEM, DECLARE_GETIMEM):
203 Ditto.
204
205 * cgen-utils.c (sim_disassemble_insn): Ditto.
206
207 * sim-hrw.c (sim_write, sim_write): Ditto.
208
209 * sim-utils.h, sim-utils.c (access_to_str, map_to_str,
210 transfer_to_str): New functions.
211
212 Mon Mar 9 12:50:59 1998 Doug Evans <devans@seba.cygnus.com>
213
214 * sim-base.h (sim_state_base): New member environment.
215 (STATE_ENVIRONMENT): New macro.
216 * sim-config.c (current_environment): Delete.
217 (sim_config_default): New function.
218 (sim_config): Set STATE_ENVIRONMENT, not current_environment.
219 * sim-config.h (current_environment,CURRENT_ENVIRONMENT): Delete.
220 (sim_config_default): Add prototype.
221 * sim-module.c (sim_pre_argv_init): Call sim_config_default.
222 * sim-options.c (standard_option_handler, case OPTION_ENVIRONMENT):
223 Set STATE_ENVIRONMENT, not current_environment.
224
225 Mon Mar 9 11:59:03 1998 Jim Wilson <wilson@cygnus.com>
226
227 * sim-fpu.c (NR_GUARDS64): Change NR_PAD32 to NR_PAD64.
228
229 Tue Mar 3 10:53:05 1998 Andrew Cagney <cagney@b1.cygnus.com>
230
231 * sim-types.h (SIGNED32, SIGNED64): Pacify GCC.
232
233 * sim-alu.h (ALU64_BEGIN): Make alu64_r unsigned.
234
235 Mon Mar 2 10:20:06 1998 Doug Evans <devans@seba.cygnus.com>
236
237 * Make-common.in (TAGS): Make smarter.
238 * Makefile.in (TAGS): Ditto.
239
240 Fri Feb 27 19:09:57 1998 Doug Evans <devans@canuck.cygnus.com>
241
242 * sim-module.c (*): Fix typos in assertion tests.
243
244 Sat Feb 28 13:54:10 1998 Andrew Cagney <cagney@b1.cygnus.com>
245
246 * sim-module.c (sim_pre_argv_init): String passed to asprintf
247 can't be constant.
248
249 * sim-options.c (sim_parse_args): Ditto.
250 (sim_args_command): Return OK, instead of nothing, for an empty
251 command.
252
253 Fri Feb 27 13:29:13 1998 Andrew Cagney <cagney@b1.cygnus.com>
254
255 * sim-profile.c (profile_info): Rename from profile_print. Drop
256 misc and misc_cpu callback arguments. Use
257 PROFILE_INFO_CPU_CALLBACK and STATE_PROFILE_INFO_CALLBACK instead.
258 (profile_install): Install profile_info function.
259
260 * sim-profile.h (PROFILE_INFO_CPU_CALLBACK,
261 STATE_PROFILE_INFO_CALLBACK): Define.
262 (struct PROFILE_DATA): Add field info_cpu_callback.
263 (profile_print): Delete function.
264
265 * sim-base.h (STATE_MODULES): Define. Replace individual
266 STATE_*_LIST with single struct module_list.
267
268 * sim-module.h (MODULE_INFO_FN, MODULE_INFO_LIST): Declare.
269 (struct module_list): Declare.
270
271 * sim-module.h, sim-module.c (sim_module_add_info_fn,
272 sim_module_info): New functions.
273 (sim_module_install): Clean up module data structures.
274
275 * sim-info.c (sim_info): New file. New function. Call
276 sim_module_info.
277
278 * Make-common.in (sim-info.o): Define rule.
279 (SIM_NEW_COMMON_OBJS): Add sim-info.o.
280
281
282 Fri Feb 27 18:26:16 1998 Doug Evans <devans@canuck.cygnus.com>
283
284 * sim-base.h (sim_cpu_base): New members name, options.
285 (sim_cpu_lookup): Add prototype.
286 * sim-module.c (sim_pre_argv_init): Provide default names for cpus.
287 * sim-options.h (DECLARE_OPTION_HANDLER): New argument `cpu'.
288 (sim_add_option_table): Update prototype.
289 * sim-options.c (sim_add_option_table): New argument `cpu'.
290 (standard_option_handler,standard_install): Update.
291 (sim_parse_args): Handle cpu specific options.
292 (print_help): New static function.
293 (sim_print_help): Call it. Print cpu specific options.
294 (find_match): New static function.
295 (sim_args_command): Call it. Handle cpu specific options.
296 * sim-utils.c (sim_cpu_lookup): New function.
297 * sim-memopt.c (memory_option_handler): Update.
298 (sim_memopt_install): Update.
299 * sim-model.c (model_option_handler): Update.
300 (model_install): Update.
301 * sim-profile.c (profile_option_handler): Update.
302 (profile_install): Update.
303 * sim-trace.c (trace_option_handler): Update.
304 (trace_install): Update.
305 * sim-watch.c (watchpoint_option_handler): Update.
306 (sim_watchpoint_install): Update.
307 * cgen-scache.c (scache_option_handler): Update.
308 (scache_install): Update.
309
310 Wed Feb 25 11:00:26 1998 Doug Evans <devans@canuck.cygnus.com>
311
312 * Make-common.in (check): Run `make check' in testsuite dir.
313
314 Wed Feb 25 14:40:24 1998 Andrew Cagney <cagney@b1.cygnus.com>
315
316 * sim-trace.c (trace_result0): New function.
317
318 * sim-trace.h (TRACE_FP_*, TRACE_FPU_*): Rename TRACE_FPU_*
319 macro's to TRACE_FP_*. TRACE_FPU_* should be defined and used when
320 tracing sim_fpu variables.
321 (TRACE_ALU_RESULT0): Define.
322 (TRACE_FP_RESULT_WORD): Define.
323 (TRACE_FP_INPUT_WORD1): Define.
324
325 * sim-fpu.c, sim-fpu.h (sim_fpu_max32, sim_fpu_max64, sim_fpu_one,
326 sim_fpu_two): New constants.
327 (sim_fpu_op1, sim_fpu_op2): New types.
328 (struct _sim_fpu): Delete member result. Re-order other members.
329 (sim_fpu_sign, sim_fpu_exp): New functions.
330 (sim_fpu_max, sim_fpu_min): new functions.
331 (EXPMAX32, EXPMAX64, NR_PAD32, NR_PAD64, NR_GUARDS32, NR_GUARDS64,
332 NORMAL_EXPMAX32, NORMAL_EXPMAX64): Define.
333
334 Tue Feb 24 22:45:39 1998 Doug Evans <devans@seba.cygnus.com>
335
336 * sim-profile.c (profile_print): Delete duplicate test of
337 PROFILE_INSN_IDX.
338 (profile_print_pc): Exit early if data collection not set up.
339 (profile_print_core): Simplify by calling sim_core_map_to_str.
340 * sim-core.h (sim_core_map_to_str): Declare.
341 * sim-core.c (sim_core_map_to_str): Make non-static.
342
343 * genmloop.sh (engine_resume): Update insn_count before exiting.
344 (engine_resume_full): Keep accurate core profile data.
345
346 * cgen-utils.c (sim_disassemble_insn): Don't use
347 sim_core_read_aligned_N, it messes up profiling results.
348
349 Mon Feb 23 20:45:57 1998 Mark Alexander <marka@cygnus.com>
350
351 * nltvals.def: Regenerate with MN10300 additions.
352
353 Tue Feb 24 13:18:42 1998 Andrew Cagney <cagney@b1.cygnus.com>
354
355 * sim-trace.h (TRACE_ALU_RESULT2): Define.
356
357 * sim-trace.h, sim-trace.c (trace_result_word2,
358 trace_input_word4, trace_result_word4): New function.
359
360 Mon Feb 23 13:08:35 1998 Doug Evans <devans@canuck.cygnus.com>
361
362 * cgen-sim.h (SEM_NEXT_PC): New arg `len'.
363
364 * sim-xcat.h: Delete.
365 * cgen-mem.h: Delete inclusion of sim-xcat.h.
366 * cgen-sim.h: Ditto.
367 * sim-alu.h: Replace sim-xcat.h with symcat.h.
368 * sim-n-bits.h: Ditto.
369 * sim-n-core.h: Ditto.
370 * sim-n-endian.h: Ditto.
371
372 Mon Feb 23 13:19:58 1998 Michael Meissner <meissner@cygnus.com>
373
374 * syscall.c (cb_syscall): Handle short reads, and EOF.
375
376 Tue Feb 24 00:29:57 1998 Andrew Cagney <cagney@b1.cygnus.com>
377
378 * sim-trace.c (print_data): case trace_fmt_fp missing break. Use
379 sim_fpu to safely print fp_word values.
380 (print_data): Add trace_fmt_bool and trace_fmt_addr.
381 (trace_result_bool1, trace_result_addr1): New functions.
382 (trace_input_bool1, trace_input_addr1): New functions.
383
384 * sim-trace.h (TRACE_FPU_*): Define.
385
386 Mon Feb 23 13:24:54 1998 Andrew Cagney <cagney@b1.cygnus.com>
387
388 * sim-fpu.h (enum sim_fpu_class): Add sim_fpu_class_denorm.
389 (sim_fpu_fpto, sim_fpu_tofp): Define.
390
391 Fri Feb 20 18:08:51 1998 Andrew Cagney <cagney@b1.cygnus.com>
392
393 * sim-fpu.c (sim_fpu_cmp): New function.
394
395 Wed Feb 18 16:29:21 1998 Doug Evans <devans@canuck.cygnus.com>
396
397 * cgen-utils.h (sim_disassemble_insn): Use CGEN_INSN_BITSIZE
398 instead of abuf->length.
399 * sim-trace.c (trace_options): Have -t only trace a few useful things.
400 (set_trace_option_mask): Renamed from set_trace_options.
401 (set_trace_option): New function.
402 (trace_option_handler): Update calls to set_trace_option{,_mask}.
403 * sim-trace.h (TRACE_USEFUL_MASK): New macro.
404
405 Wed Feb 18 12:42:15 1998 Andrew Cagney <cagney@b1.cygnus.com>
406
407 * sim-basics.h: Declare struct _sim_fpu.
408
409 Tue Feb 17 16:27:46 1998 Andrew Cagney <cagney@b1.cygnus.com>
410
411 * sim-trace.h (TRACE_ALU_INPUT*, TRACE_ALU_RESULT): Define.
412 (trace_prefix, trace_input*, trace_result*): Declare.
413 (trace_one_insn): Change declaration, assume trace_prefix called.
414 (trace_generic): Like trace_one_insn.
415 (TRACE_ALU_IDX, TRACE_*_IDX): Change #define's to enum.
416 (TRACE_alu, TRACE_[a-z]*): Update.
417
418 * sim-trace.c (trace_prefix, trace_input*, trace_result*,
419 trace_insn, save_data, trace_idx_to_str, print_data): New
420 functions.
421 (trace_one_insn): Rewrite.
422 (trace_generic): New function.
423
424 Tue Feb 17 17:27:30 1998 Doug Evans <devans@seba.cygnus.com>
425
426 * Make-common.in (CGEN_MAIN_SCM): Update.
427 * aclocal.m4 (USE_MAINTAINER_MODE): New variable.
428
429 * cgen-sim.h (SEMANTIC_CACHE_FN): Delete.
430 (SEMANTIC_FN): Rewrite declaration.
431 (DECODE): Update type of semantic_fast member.
432 ({EX,SEM}_FN_NAME): Have only one version.
433 * cgen.sh: Support building cpu.c.
434 * sim-base.h (sim_state_base): Delete conditionals surrounding
435 member scache_size.
436
437 Tue Feb 10 18:31:49 1998 Andrew Cagney <cagney@b1.cygnus.com>
438
439 * sim-load.c (sim_load_file): Print LMA/VMA according to value
440 used.
441
442 Tue Feb 10 14:56:23 1998 Ian Carmichael <iancarm@cygnus.com>
443
444 * sim-core.c: Add missing prototypes for WITH_DEVICES.
445 Add missing parameters to device_io calls.
446 * sim-core.h: Add missing parameters to device_io calls.
447
448 Mon Feb 9 14:48:37 1998 Doug Evans <devans@canuck.cygnus.com>
449
450 * cgen-sim.h (DECODE): Always use switch for `read' for now.
451 (PAREXEC): Renamed from PARALLEL_EXEC. All uses updated.
452 (SEMANTIC{,_CACHE}_FN): Fix return type.
453 * cgen.sh (decode): Add s/@arch@/$arch/.
454 * genmloop.sh (@cpu@_engine_run): Delete `current_state'.
455 (engine_resume): Likewise. Make `engine' volatile. Save copy
456 of cpu pointer in volatile object. Initialize read switch if
457 -parallel.
458
459 Thu Feb 5 13:27:04 1998 Doug Evans <devans@seba.cygnus.com>
460
461 * cgen-sim.h (EX_FN_NAME): _exc_ -> _ex_.
462 (SEM_INSN): New macro.
463
464 Tue Feb 3 16:31:56 1998 Andrew Cagney <cagney@b1.cygnus.com>
465
466 * sim-run.c (sim_engine_run): Assume IMEM is 32 bit.
467
468 Sun Feb 1 16:47:51 1998 Andrew Cagney <cagney@b1.cygnus.com>
469
470 * configure: Regenerated to track ../common/aclocal.m4 changes.
471
472 Sun Feb 1 16:16:57 1998 Andrew Cagney <cagney@b1.cygnus.com>
473
474 * sim-types.h (fp_word): New type, define according to
475 WITH_TARGET_FLOATING_POINT_BITSIZE.
476
477 * aclocal.m4 (default_sim_floating_point_bitsize): Add
478 configuration of size of floating point registers.
479
480 Sun Feb 1 14:02:31 1998 Andrew Cagney <cagney@b1.cygnus.com>
481
482 * sim-profile.c (profile_print): Only print CPU <N> if other
483 output is going to appear.
484
485 Sat Jan 31 18:15:41 1998 Andrew Cagney <cagney@b1.cygnus.com>
486
487 * configure: Regenerated to track ../common/aclocal.m4 changes.
488
489 Sat Jan 31 18:03:55 1998 Andrew Cagney <cagney@b1.cygnus.com>
490
491 * sim-types.h (address_word): Typedef according to
492 WITH_TARGET_ADDRESS_BITSIZE.
493 (signed_cell, unsigned_cell, natural_cell): Ditto using
494 WITH_TARGET_CELL_BITSIZE.
495
496 * sim-config.h (WITH_TARGET_ADDRESS_BITSIZE): Define.
497 (WITH_TARGET_CELL_BITSIZE): Define.
498 (WITH_HOST_WORD_BITSIZE): Delete.
499
500 * sim-config.c (print_sim_config): Update.
501
502 * aclocal.m4 (SIM_AC_OPTION_BITSIZE): Add support for
503 configuration of address and OpenFirmware cell sizes.
504
505 Fri Jan 30 09:36:33 1998 Andrew Cagney <cagney@b1.cygnus.com>
506
507 * sim-engine.h (sim_engine_run): Add argument nr_cpus.
508 * sim-run.c (sim_engine_run): Update.
509
510 * sim-engine.h (SIM_ENGINE_HALT_HOOK): Use SET_CPU_CIA instead of
511 CPU_CIA.
512 * sim-run.c (sim_engine_run): Ditto.
513
514 * sim-resume.c (sim_resume): Obtain nr_cpus from sim_engine.
515 (sim_resume): Pass nr_cpus to sim_engine_run.
516
517 * sim-engine.h (struct _sim_engine): Add member nr_cpus.
518
519 * sim-engine.c (sim_engine_init): Hardwire nr_cpus to
520 MAX_NR_PROCESSORS.
521 (sim_engine_nr_cpus) sim-engine.c, sim-engine.h: New function
522
523 Thu Jan 29 12:13:01 1998 Doug Evans <devans@canuck.cygnus.com>
524
525 * cgen.sh: Portably read parms past $9.
526
527 Fri Jan 23 14:20:54 1998 Doug Evans <devans@seba.cygnus.com>
528
529 * Make-common.in (stamp-tvals): New rule.
530 (targ-vals.h,targ-map.c): Depend on it.
531 (clean): Remove stamp-tvals.
532
533 Tue Jan 20 21:35:13 1998 Michael Meissner <meissner@cygnus.com>
534
535 * sim-utils.c (sim_state_alloc): #if 0 variable that is only used
536 in code also #if 0'ed.
537
538 Mon Jan 19 22:26:29 1998 Doug Evans <devans@seba>
539
540 * configure: Regenerated to track ../common/aclocal.m4 changes.
541 * aclocal.m4: Recognize --enable-maintainer-mode.
542
543 Mon Jan 19 12:45:45 1998 Doug Evans <devans@seba.cygnus.com>
544
545 start-sanitize-cygnus
546 * Make-common.in (cgen-{arch,cpu,decode}): New targets.
547 * cgen.sh: New file.
548 end-sanitize-cygnus
549 * cgen-scache.h: Deleted.
550 * Make-common.in (cgen-run.o,cgen-scache.o): Delete cgen-scache.h dep.
551 (CGEN_CPU_SCM): Add sim-model.scm.
552 * cgen-scache.c: Only compile contents if WITH_SCACHE.
553 (scache_init): Use runtime computed size of SCACHE.
554 (scache_flush): Likewise.
555 * cgen-mem.h (GETIMEMU[QHSD]I): Declare.
556 ([GS]ETT{QI,UQI,HI,UHI,SI,USI,DI,UDI}): Declare.
557 * cgen-sim.h: Scache support moved here.
558 (PC): Redo definition.
559 (ARGBUF,SCACHE,PARALLEL_EXEC): Provide forward decls.
560 (DECODE): Add parallel execution support.
561 Only include semantic label members if using switch.
562 (SWITCH,CASE,BREAK,DEFAULT,ENDSWITCH): Portable computed goto support.
563 (CGEN_CPU): Delete members exec_state, halt_sigrc, halt_jmp_buf.
564 (IADDR,CIA,SEM_ARG,EX_FN_NAME,SEM_FN_NAME,RECORD_IADDR,SEM_ARGBUF,
565 SEM_NEXT_PC,SEM_BRANCH_VIA_{CACHE,ADDR},SEM_NEW_PC_ADDR): Moved here
566 from cgen-types.h.
567 (engine_{stop,run,resume,halt,signal}): Delete decls.
568 * cgen-types.h (CGEN_{XCAT3,CAT3}): Delete.
569 (argbuf,scache): Delete forward decls.
570 (STATE): Delete decl.
571 * cgen-utils.c: Don't include decode.h, mem-ops.h, sem-ops.h.
572 Include cgen-mem.h, cgen-ops.h.
573 (engine_halt,engine_signal): Delete.
574 ({ex,exc,sem,semc}_illegal): Delete.
575 (sim_disassemble_insn): Result of extract fn is in bits.
576 * genmloop.sh: Rewrite.
577
578 * cgen-trace.c (trace_insn): Set printed_result_p=0 if not tracing
579 line numbers.
580
581 * sim-base.h (sim_state_base): Delete member `model'.
582 (sim_cpu_base): Add member `model'.
583 * sim-model.h (IMP_PROPERTIES): New type.
584 (MACH): New members imp_props, models.
585 (models): Delete decl.
586 * sim-model.c (set_model): Update.
587 * sim-profile.c (profile_print_model): Update.
588
589 * sim-utils.c (sim_state_alloc): Delete setting of cpu backlink here.
590
591 Fri Jan 16 12:33:09 1998 Nick Clifton <nickc@cygnus.com>
592
593 * cgen-trace.c (trace_insn): Call CGEN_INSN_MNEMONIC() rather than
594 CGEN_INSN_SYNTAX().
595
596 Mon Dec 15 23:17:11 1997 Andrew Cagney <cagney@b1.cygnus.com>
597
598 * configure: Regenerated to track ../common/aclocal.m4 changes.
599 * config.in: Ditto.
600
601 Mon Dec 15 23:16:03 1997 Andrew Cagney <cagney@b1.cygnus.com>
602
603 * aclocal.m4 (AR): Check for sigaction.
604
605 Thu Dec 4 09:21:05 1997 Doug Evans <devans@canuck.cygnus.com>
606
607 * Make-common.in (sim-core.o): Depend on $(sim_main_headers).
608
609 * sim-config.h (WITH_TREE_PROPERTIES): Define as 0.
610 * sim-config.c (sim_config): Replace WITH_DEVICES with
611 WITH_TREE_PROPERTIES.
612
613 * configure: Regenerated to track ../common/aclocal.m4 changes.
614
615 Wed Dec 3 17:56:02 1997 Doug Evans <devans@canuck.cygnus.com>
616
617 * Make-common.in (SIM_ENVIRONMENT): New variable.
618 (CONFIG_CFLAGS): Add it.
619 * aclocal.m4 (SIM_AC_OPTION_ENVIRONMENT): Handle
620 --enable-sim-environment option.
621 * configure: Regenerated.
622 * sim-config.h (environment support): Rewrite.
623 * sim-config.c (current_environment): Define as enum, unconditionally.
624 (current_alignment): Define unconditionally.
625 (config_environment_to_a): Update.
626 (config_alignment_to_a): Fix type of argument. Define unconditionally.
627 (sim_config): Handle environment and alignment determination
628 unconditionally. Delete sanity checks of current_environment,
629 unnecessary.
630 (print_sim_config): Update.
631 * sim-options.c (STANDARD_OPTIONS enum): Add OPTION_ENVIRONMENT.
632 (standard_options): Add --environment.
633 (standard_option_handler): Likewise.
634
635 Fri Nov 28 12:21:25 1997 Andrew Cagney <cagney@b1.cygnus.com>
636
637 * sim-alu.h: Add notes on carry vs borrow for subtraction.
638 (ALU{,8,16,32,64}ADD): Redefine ADD macro as add overflowing.
639 (ALU{,8,16,32,64}ADDC): Define - add carrying.
640 (ALU{,8,16,32,64}SUB): Redefine SUB macro as subtract overflowing.
641 (ALU{,8,16,32,64}SUBB): Define - subtract borrowing.
642 (ALU{,8,16,32,64}SUBC): Define - tract carrying.
643 (ALU{,8,16,32,64}ADD_CA, ALU{,8,16,32,64}ADDC_C): Replace single
644 argument ADD_CA macro with two argument ADDC_C - add carrying with
645 carry in.
646 (ALU{,8,16,32,64}SUB_CA, ALU{,8,16,32,64}SUBC_X): Replace single
647 argument SUB_CA macro with two argument SUBC_X - subtract
648 carrying, extended.
649 (ALU{,8,16,32,64}SUBB_B): Define - subtract borrowing with
650 borrow-in.
651 (ALU{,8,16,32,64}NEGC, ALU{,8,16,32,64}NEGB): Define.
652
653 Sun Nov 30 17:40:57 1997 Michael Meissner <meissner@cygnus.com>
654
655 * sim-io.c (sim_io_{syscalls,getstring}): Delete. No longer used.
656 * sim-io.h (sim_io_syscalls): Delete.
657
658 Fri Nov 28 20:10:09 1997 Michael Meissner <meissner@cygnus.com>
659
660 * syscall.c (cb_syscall): Add missing else, so write to stdout
661 isn't doubled.
662
663 * sim-alu.h (ALU{,8,16,32,64}_SET_CARRY): Provide macros to import
664 the carry bit from the CPU's psw.
665
666 Fri Nov 28 11:15:05 1997 Doug Evans <devans@canuck.cygnus.com>
667
668 * gennltvals.sh: Redo syscall support.
669 * nltvals.def: Regenerated.
670
671 Wed Nov 26 16:49:38 1997 Michael Meissner <meissner@cygnus.com>
672
673 * syscall.c (cb_syscall): If writing to stdout or stderr, flush
674 the stream immediately.
675
676 Wed Nov 26 12:32:11 1997 Andrew Cagney <cagney@b1.cygnus.com>
677
678 * sim-io.c (sim_io_getstring): Delete unused len2.
679 (sim_io_syscalls): Ditto for sys_errno.
680
681 Wed Nov 26 11:18:40 1997 Doug Evans <devans@canuck.cygnus.com>
682
683 * syscall.c (cb_syscall): Test CB_SYSCALL struct magic number.
684
685 * Make-common.in (run.o): Depend on remote-sim.h.
686 (nrun.o,sim-hload.o,sim-hrw.o): Likewise.
687 (sim-io.o,sim-reason.o,sim-resume.o): Likewise.
688
689 Tue Nov 25 20:12:46 1997 Michael Meissner <meissner@cygnus.com>
690
691 * sim-io.c (sim_io_syscalls): Disable lseek.
692
693 Tue Nov 25 00:12:38 1997 Doug Evans <devans@seba.cygnus.com>
694
695 start-sanitize-d30v
696 * gennltvals.sh: Generate syscall values for d30v.
697 end-sanitize-d30v
698 * gennltvals.sh: Use libgloss/syscall.h for sparc.
699 * nltvals.def: Regenerate.
700
701 * callback.c (os_stat): Make 3rd arg a host struct stat ptr.
702 (os_fstat): Likewise. Validate fd argument.
703 (cb_host_to_target_stat): Delete big_p arg. If HS arg is NULL,
704 just compute target stat struct length.
705 * syscall.c: #include "libiberty.h", <sys/types.h>, <sys/stat.h>.
706 (ENOSYS,ENAMETOOLONG): Provide definitions if missing.
707 (get_string): Return host errno values so they can be properly
708 translated later.
709 (cb_syscall): Likewise.
710 (cb_syscall, cases open,unlink): Use get_path instead of get_string.
711 (cb_syscall, case read): Use read_stdin for file descriptor 0.
712 (cb_syscall, case write): Use write_stderr for file descriptor 2.
713 (cb_syscall): Add cases for lseek, unlink, stat, fstat, time.
714 (get_path): New function.
715
716 Mon Nov 24 18:56:07 1997 Michael Meissner <meissner@cygnus.com>
717
718 * sim-io.c (sim_io_syscalls): New function to provide system call
719 emulation. Provide exit, open, close, read, write, lseek, and
720 unlink.
721 (sim_io_getstring): New function to return a string from a
722 simulated memory location.
723
724 * sim-io.h (sim_io_syscalls): Add declaration.
725
726 Mon Nov 24 12:09:59 1997 Doug Evans <devans@seba.cygnus.com>
727
728 * sim-core.c (sim_core_signal): Fix spelling error in message.
729
730 * sim-hrw.c (sim_read): Use read map, not write map.
731
732 * Make-common.in (all): Add .gdbinit.
733 * gdbinit.in: Add dump command.
734
735 * sim-model.c (model_options): Use '\0' for `shortopt'.
736
737 * sim-trace.c (trace_option_handler): Set state trace file
738 for --trace-file in addition to cpu's values.
739 (trace_vprintf): If cpu == NULL, try state's trace file.
740 (trace_options): Reorganize table, reword some descriptions.
741
742 Sun Nov 23 10:57:00 1997 Andrew Cagney <cagney@b1.cygnus.com>
743
744 * sim-fpu.c (sim_fpu_abs, sim_fpu_neg, sim_fpu_inv), sim-fpu.h:
745 New functions.
746
747 Sat Nov 22 19:16:54 1997 Andrew Cagney <cagney@b1.cygnus.com>
748
749 * sim-reason.c (sim_stop_reason): For sim_signalled, return the
750 signal untranslated, document problem with this.
751
752 * nrun.c (main): Check for a prog name of `*step'. If present,
753 step the simulator instead of allowing it to run free.
754
755 * sim-signal.c (SIGQUIT): Define on _MSC_VER hosts.
756
757 * Make-common.in (sim_main_headers): Add sim-signal.h.
758
759 Fri Nov 21 09:32:32 1997 Andrew Cagney <cagney@b1.cygnus.com>
760
761 * sim-signal.c (sim_signal_to_host): Return 0 for SIM_SIGNONE.
762
763 Thu Nov 20 20:35:20 1997 Andrew Cagney <cagney@b1.cygnus.com>
764
765 * sim-signal.h: Start simulator signals at 64 so that host signal
766 numbers can be detected and reported.
767
768 * sim-signal.h (SIM_SIGFPE), sim-signal.h: Add signal.
769
770 Wed Nov 19 12:02:41 1997 Doug Evans <devans@seba.cygnus.com>
771
772 * callback.c (cb_host_to_target_stat): Fix return values.
773
774 * cgen-sim.h (enum_signal_type): Delete.
775 (engine_signal): Update prototype.
776 * cgen-utils.c: Don't include <signal.h>.
777 (sim_signal_to_host): Delete, lives in sim-signal.c now.
778 (engine_signal): Update.
779
780 * sim-utils.c (sim_state_alloc): Call SIM_STATE_ALLOC if defined.
781 (sim_state_free): Call SIM_STATE_FREE if defined.
782
783 * sim-module.c (sim_module_install): Don't leave any modules
784 installed if one fails to install.
785
786 Wed Nov 19 13:25:48 1997 Michael Meissner <meissner@cygnus.com>
787
788 * sim-options.c: Don't include ../libiberty/alloca-conf.h any
789 more, since alloca is not used in this file.
790
791 * sim-alu.h (ALU{32,64}_*): Rewrite 32 and 64 bit ALU support to
792 correctly set the carry and overflow bits for those types.
793 (ALU{8,16,32,64}_{ADD,SUB}_CA): Take VAL argument to add along
794 with carry, so carry is correct after doing both adds.
795 (ALU*): Space out '\' to make it easier to read.
796
797 Tue Nov 18 15:53:45 1997 Doug Evans <devans@canuck.cygnus.com>
798
799 * sim-core.c (sim_core_signal): Use sim_stopped instead of
800 sim_signalled.
801
802 * sim-signal.c, sim-signal.h: New files.
803 * Make-common.in (sim-signal.o): Add rule for.
804 (SIM_NEW_COMMON_OBJS): Add sim-signal.o.
805 * sim-abort.c: Don't include <signal.h>.
806 * sim-basics.h: #include "sim-signal.h".
807 * sim-break.c: Don't include <signal.h>.
808 (sim_handle_breakpoint): Replace SIGTRAP with SIM_SIGTRAP.
809 * sim-core.c: Don't include <signal.h>.
810 (SIGBUS): Delete definition.
811 (sim_core_signal): Replace SIGSEGV,SIGBUS with SIM_SIGSEGV,SIM_SIGBUS.
812 * sim-engine.c: Don't include <signal.h>.
813 (sim_engine_abort): Replace SIGABRT with SIM_SIGABRT.
814 * sim-reason.c (sim_stop_reason): Call sim_signal_to_host.
815 * sim-resume.c: Don't include <signal.h>.
816 (SIGTRAP): Delete definition.
817 (has_stepped): Replace SIGTRAP with SIM_SIGTRAP.
818 * sim-stop.c: Don't include <signal.h>.
819 (control_c_simulation): Replace SIGINT with SIM_SIGINT.
820 * sim-watch.c: Don't include <signal.h>.
821 (handle_watchpoint): Replace SIGINT with SIM_SIGINT.
822
823 * Make-common.in (SIM_NEW_COMMON_OBJS): New variable.
824
825 * sim-base.h (CIA_ADDR): Provide default definition.
826 * sim-core.c (sim_core_signal): Use CIA_ADDR to fetch value.
827 * sim-break.c (sim_handle_breakpoint): Likewise.
828
829 Mon Nov 17 14:15:31 1997 Doug Evans <devans@seba.cygnus.com>
830
831 * Make-common.in (srccom): New variable.
832
833 * Make-common.in (DEP, COMMON_DEP_CFLAGS): Define.
834 (LIB_OBJS): Add syscall.o.
835 (gentmap): Pass $(NL_TARGET) to $(CC).
836 (syscall.o): Add rule for.
837 (sim_main_headers): Add $(SIM_EXTRA_DEPS).
838 (sim-bits.o): Depend on $(sim-n-bits_h).
839 (sim-load.o): Depend on callback.h.
840
841 * Make-common.in (cgen-*.o): Update dependencies, mem-ops.h renamed to
842 cgen-mem.h, sem-ops.h renamed to cgen-ops.h.
843 * cgen-mem.h, cgen-ops.h: New files.
844
845 * aclocal.m4 (--enable-sim-scache): Pass -DWITH_SCACHE=0 for "=no".
846
847 * Makefile.in (nltvals.def): Depend on gennltvals.sh.
848 Rewrite build rule.
849 * callback.c: #include string.h or strings.h.
850 #include sys/types.h and sys/stat.h.
851 (cb_init_syscall_map,cb_init_errno_map,cb_init_open_map): Declare.
852 (os_get_errno,os_open): Update.
853 (os_stat,os_fstat): New functions.
854 (os_init): Initialize syscall_map, errno_map, open_map.
855 (default_callback): Add entries for os_stat, os_fstat, syscall_map,
856 errno_map, open_map, signal_map, stat_map.
857 (cb_read_target_syscall_maps): New function.
858 (cb_target_to_host_syscall): New function.
859 (cb_host_to_target_errno): Renamed from host_to_target_errno.
860 (cb_target_to_host_open): Renamed from target_to_host_open.
861 (store): New function.
862 (cb_host_to_target_stat): New function.
863 * syscall.c: New file.
864 * gentmap.c (sys_tdefs): New global.
865 (gen_targ_vals_h): Output target syscall numbers.
866 (gen_targ_map_c): Update. Output target syscall translation map.
867 * gentvals.sh: New first argument `target'. Preface table with
868 #ifdef NL_TARGET_$target if non-null target passed.
869 * gennltvals.sh: New file.
870 * nltvals.def: Regenerated.
871
872 Fri Nov 14 11:33:34 1997 Andrew Cagney <cagney@b1.cygnus.com>
873
874 * sim-n-core.h (sim_core_read_unaligned_N): Return static
875 sim_core_dummy_M.
876 (sim_core_dummy_M): Declare.
877
878 Wed Nov 12 18:16:15 1997 Andrew Cagney <cagney@b1.cygnus.com>
879
880 * sim-core.c (sim_core_signal): Print the address of the
881 instruction.
882
883 Thu Nov 13 11:49:41 1997 Doug Evans <devans@seba.cygnus.com>
884
885 * sim-base.h (sim_state_base): Move `magic' to end of struct.
886
887 * sim-base.h (sim_state_base): Add member trace_data.
888 (STATE_TRACE_DATA): New macro.
889 * sim-trace.h (TRACE_DEBUG_IDX,TRACE_debug): New macros.
890 ({WITH_,}TRACE_DEBUG_P): New macros.
891 (STATE_TRACE_FLAGS,STRACE_P,STRACE_DEBUG_P): New macros.
892 (_sim_cpu): Delete forward reference.
893 (debug_printf): Update.
894 * sim-trace.c (OPTION_TRACE_DEBUG): Define.
895 (trace_options): Add --trace-debug.
896 (set_trace_options): Handle it.
897 (trace_option_handler): Likewise.
898 (trace_install): Init state trace_data struct.
899 (trace_uninstall): Close state trace file.
900 * sim-events.c (ETRACE): Only print source file and line number if
901 --trace-debug.
902 * sim-n-core.h (sim_core_trace_M): Likewise.
903
904 * sim-core.c (sim_core_signal): Add missing "\n" in message.
905
906 1997-11-13 Felix Lee <flee@cygnus.com>
907
908 * sim-n-core.h (sim_core_read_unaligned_N): illegal empty
909 initializer.
910 * sim-types.h (unsigned128,signed128): fix typo for MSVC.
911
912 Wed Nov 12 12:18:08 1997 Doug Evans <devans@canuck.cygnus.com>
913
914 * aclocal.m4 (SIM_AC_OPTION_SCACHE): Fix typo.
915
916 * Make-common.in (BUILT_SRC_FROM_COMMON): Remove files no longer
917 built this way.
918 (sim-config.o): Remove non-existent $(sim-nconfig_h) dependency.
919 (clean): Don't delete $(BUILT_SRC_FROM_COMMON) if building in
920 source tree.
921
922 Tue Nov 11 13:28:02 1997 Andrew Cagney <cagney@b1.cygnus.com>
923
924 * sim-events.c (sim_events_process): Re-compute the time -
925 update_time_from_event - as each event is processed. Reverses
926 previous change.
927
928 Fri Nov 7 00:37:36 1997 Andrew Cagney <cagney@b1.cygnus.com>
929
930 * callback.c (os_poll_quit): Replace _WIN32 with _MSC_VER.
931
932 Fri Nov 7 00:37:36 1997 Andrew Cagney <cagney@b1.cygnus.com>
933
934 * sim-events.c (sim_events_process): Delete redundant call to
935 update_time_from_event.
936 (sim_events_slip): Always decrement time_from_event.
937 (sim_events_tick, sim_events_deschedule, update_time_from_event):
938 Delete assertion that time_from_event >=0 when work in queue, no
939 longer applicable.
940
941 Thu Nov 6 12:06:46 1997 Andrew Cagney <cagney@b1.cygnus.com>
942
943 * sim-options.c (STANDARD_OPTIONS): Change OPTION_* to an enum.
944 (standard_option_handler): Update.
945
946 * sim-options.h: Clarify documentation.
947 (OPTION_LONG_ONLY_P): Delete definition.
948 (OPTION_VALID_P): Define.
949
950 * sim-options.c (sim_print_help): Allow short only options.
951 (sim_parse_args): Ditto.
952 (sim_args_command): Skip short only options.
953 (sim_parse_args): Allocate space for NUM_OPTS not just 256. Make
954 separate entries for short and long options in the HANDLERS and
955 ORIG_VAL tables.
956 (sim_parse_args): Disable argument permutation.
957
958 Wed Nov 5 13:40:31 1997 Andrew Cagney <cagney@b1.cygnus.com>
959
960 * sim-core.h (DECLARE_SIM_CORE_WRITE_N. DECLARE_SIM_CORE_READ_N):
961 Add argument M, size of data type.
962 (sim_core_read_misaligned_3, sim_core_write_misaligned_3):
963 Declare, ditto for 5, 6 & 7 byte transfers.
964 (sim_core_write_unaligned_1, sim_core_write_unaligned_1): Define
965 as aligned variant.
966
967 * sim-n-core.h (sim_core_trace_M): Rename from
968 sim_core_trace_N. Add nr_bytes argument. Replace transfer argument
969 with transfer type. Print transfer direction. Handle 1 and 2 byte
970 transfers.
971 (sim_core_read_unaligned_N, sim_core_write_unaligned_N): Trace
972 unaligned accesses.
973 (unsigned_M, T2H_M, H2T_M): Rename from unsigned_N, T2H_N, H2T_N.
974 Update all functions.
975
976 * sim-core.c: Generate functions starting with 16 not 1.
977 (sim_core_read_unaligned_3): Generate. Ditto for 3 byte write and
978 all 5, 6 & 7 byte transfers.
979
980 * sim-n-core.h (sim_core_read_misaligned_N,
981 sim_core_write_misaligned_N): Implement.
982
983 Mon Nov 3 15:03:04 1997 Andrew Cagney <cagney@b1.cygnus.com>
984
985 * sim-endian.h (U16_8): Implement
986
987 * sim-endian.c (sim_endian_split_16, sim_endian_join_16): New functions
988
989 * sim-endian.h (VL8_16, VH8_16): Implement.
990
991 * sim-memopt.c (memory_option_handler): Typecast 64bit value to
992 long in printf.
993 (memory_option_handler): Only zalloc modulo bytes when non-zero.
994 (memory_option_handler): Skip comma in alias address list
995
996 Fri Oct 31 13:03:33 1997 Andrew Cagney <cagney@b1.cygnus.com>
997
998 * sim-memopt.c (do_memopt_add, do_memopt_delete): Add level and
999 space params.
1000 (parse_size, parse_addr): New functions
1001 (memory_option_handler, memory_options): Parse address & size
1002 using new functions. Pass level, space, modulo to do_memopt_add &
1003 do_memopt_del.
1004
1005 * sim-memopt.h (struct _sim_memopt): Add level & space fields.
1006
1007 * sim-core.h (sim_core_arrach, sim_core_detach): Replace
1008 `attach_type attach' argument with `unsigned level' argument.
1009 Document.
1010
1011 * sim-core.c (new_sim_core_mapping, sim_core_map_attach,
1012 sim_core_attach): Replace argument attach with level. Update
1013 verification of arguments.
1014 (sim_core_map_detach, sim_core_detach): Replace argument attach
1015 with level.
1016
1017 * sim-basics.h (enum _attach_type): Delete.
1018
1019 Thu Oct 30 13:45:00 1997 Doug Evans <devans@seba.cygnus.com>
1020
1021 * sim-core.h (sim_core_write_8): Define.
1022
1023 Tue Oct 28 12:29:22 1997 Andrew Cagney <cagney@b1.cygnus.com>
1024
1025 * sim-bits.h: Document ROTn macro.
1026
1027 * sim-endian.h (H2T): Handle 16 byte variables.
1028
1029 * sim-n-core.h (sim_core_read_unaligned_N): Return a dummy when an
1030 error.
1031
1032 * sim-core.c: Do not generate sim_core_*_word.
1033
1034 * sim-n-core.h (sim_core_trace_N): Add line_nr argument.
1035 (sim_core_write_aligned_N, sim_core_read_aligned_N): Update.
1036
1037 * sim-core.h (sim_core_read_unaligned_word,
1038 sim_core_read_aligned_word, sim_core_read_word,
1039 sim_core_write_unaligned_word, sim_core_write_aligned_word,
1040 sim_core_write_word): Change to macros that map onto sim_core_*_N.
1041
1042 Mon Oct 27 11:25:10 1997 Doug Evans <devans@canuck.cygnus.com>
1043
1044 * sim-n-endian.h: Add TAGS entrys for 16 byte versions.
1045
1046 * sim-endian.h: Disable 16 byte support.
1047
1048 Mon Oct 27 12:00:48 1997 Andrew Cagney <cagney@b1.cygnus.com>
1049
1050 * sim-endian.c (_SWAP_16): Define. Generate 126 bit swap code.
1051
1052 * sim-n-core.h (sim_core_trace_N): New function.
1053 (sim_core_read_aligned_N, sim_core_write_aligned_N): Use,
1054 (sim_core_read_unaligned_N): Do not retyrn bogus value wden error.
1055
1056 * sim-endian.h: Add 128 bit variant.
1057
1058 * sim-core.h, sim-core.c: Add 128 bit variant.
1059
1060 * sim-types.h: Add signed128 and unsigned128 types using a struct.
1061
1062 Fri Oct 24 11:33:07 1997 Andrew Cagney <cagney@b1.cygnus.com>
1063
1064 * sim-events.c (sim_events_process): Clear events->work_pending.
1065 (sim_events_tickn, sim_events_tick): Accumulate, instead of
1066 setting, nr_ticks_to_process.
1067 (sim_events_preprocess): Allow nr_ticks_to_process to be non-zero
1068 when the event queue isn't next.
1069
1070 * sim-events.h, sim-events.c (sim_events_slip): New function.
1071
1072 Wed Oct 22 14:18:38 1997 Andrew Cagney <cagney@b1.cygnus.com>
1073
1074 * sim-hload.c (sim_load): Pass lma_p==0 and do_load=sim_load.
1075
1076 * sim-utils.h, sim-load.c (sim_load_file): Add lma_p and do_load
1077 arguments.
1078
1079 Tue Oct 21 18:37:57 1997 Doug Evans <devans@canuck.cygnus.com>
1080
1081 * nrun.c (main): Remove useless test of name != NULL.
1082 Exit if bfd_openr fails. Call bfd_check_format after bfd_openr.
1083
1084 Tue Oct 21 10:42:38 1997 Andrew Cagney <cagney@b1.cygnus.com>
1085
1086 * sim-fpu.c (EXPMAX): Type is unsigned.
1087 (MIN_INT, MAX_INT): Type is signed64.
1088 (i2fpu): Type of val is signed64.
1089
1090 Tue Oct 21 10:42:38 1997 Andrew Cagney <cagney@b1.cygnus.com>
1091
1092 * sim-profile.h (PROFILE_PC_BUCKET_SIZE): Treat a shift of zero as
1093 a bucket size of zero.
1094
1095 * sim-profile.c (OPTION_PROFILE_PC_GRANULARITY,
1096 OPTION_PROFILE_PC): Define.
1097 (profile_option_handler): Add support for --profile-pc and
1098 --profile-pc-granularity options.
1099 (profile_pc_init): When possible, compute nr buckets from bucket
1100 size.
1101
1102 * sim-profile.c (profile_pc_init): Align the profile-pc end
1103 address with the profile-pc bucket size.
1104
1105 * sim-profile.h (PROFILE_PC_NR_BUCKETS): Rename PROFILE_PC_SIZE to
1106 something less ambiguous.
1107 (PROFILE_PC_BUCKET_SIZE): Ditto for PROFILE_PC_SAMPLE_SIZE.
1108
1109 * sim-profile.c (profile_pc_cleanup): New function. Move
1110 profile_pc_uninstall code to here.
1111 (profile_pc_uninstall): Call.
1112 (profile_pc_init): Call.
1113
1114 Mon Oct 20 17:23:58 1997 Andrew Cagney <cagney@b1.cygnus.com>
1115
1116 * sim-profile.c (profile_print_pc): Dump pc profile to dmon.out
1117 file using BSD gprof format.
1118
1119 * sim-bits.h (LSBIT, MSBIT, BIT): Force result to type
1120 unsigned_word.
1121 (LSBIT8, LSBIT16, LSBIT32, LSBIT64, MSBIT8, MSBIT16, MSBIT32,
1122 MSBIT64): Force result to unsignedN.
1123
1124 Thu Oct 16 11:38:56 1997 Andrew Cagney <cagney@b1.cygnus.com>
1125
1126 * sim-alu.h (ALU16_BEGIN, ALU32_BEGIN, ALU64_BEGIN): Drop opening
1127 brace from macro.
1128 (ALU8_BEGIN, ALU8_SET, ALU8_ADD, ALU8_SUB, ALU8_NEGATE): Define.
1129 (ALU16_ADD, ALU16_SUB, ALU16_NEGATE): Simplify arrithmetic.
1130 (ALU32_ADD, ALU32_SUB, ALU32_NEGATE): Simplify arrithmetic.
1131 (ALU64_ADD, ALU64_SUB, ALU64_NEGATE): Simplify arrithmetic.
1132
1133 Wed Oct 15 09:24:19 1997 Andrew Cagney <cagney@b1.cygnus.com>
1134
1135 * sim-core.h (struct _sim_core_mapping): Change free_buffer to
1136 type void*.
1137
1138 * sim-core.c (sim_core_uninstall, new_sim_core_mapping,
1139 sim_core_map_attach, sim_core_map_detach): Change free_buffer to
1140 type void*.
1141 (sim_core_attach): Rename buffer_freed to free_buffer, type
1142 void*. Ensure that allocated buffer is alligned according to
1143 region's address.
1144
1145 Mon Oct 13 11:34:50 1997 Andrew Cagney <cagney@b1.cygnus.com>
1146
1147 * sim-alu.h (ALU64_HAD_OVERFLOW): Define.
1148 (ALU64_SUB): Define.
1149
1150 * Make-common.in (all): Build SIM_EXTRA_ALL first.
1151 (.gdbinit): Remove dependencies, generate once per build.
1152
1153 Tue Oct 14 19:20:09 1997 Andrew Cagney <cagney@b1.cygnus.com>
1154
1155 * sim-n-core.h (sim_core_read_aligned_N,
1156 sim_core_write_aligned_N): Make xaddr param type address_word not
1157 unsigned_word.
1158
1159 Fri Oct 3 09:49:18 1997 Andrew Cagney <cagney@b1.cygnus.com>
1160
1161 * sim-fpu.h, sim-fpu.c: Rewrite. Change sim_fpu object to an
1162 unpacked floating point struct. Pass sim_fpu object by reference.
1163 Add preliminary support for rounding modes.
1164
1165 Fri Oct 3 09:28:00 1997 Andrew Cagney <cagney@b1.cygnus.com>
1166
1167 * configure: Regenerated to track ../common/aclocal.m4 changes.
1168
1169 Thu Oct 2 19:43:52 1997 Andrew Cagney <cagney@b1.cygnus.com>
1170
1171 * aclocal.m4 (sim-bitsize): Fix typo, WITH_TARGET_WORD_BITSIZE not
1172 WITH_TARGET_BITSIZE.
1173
1174 Thu Sep 25 23:20:20 1997 Felix Lee <flee@yin.cygnus.com>
1175
1176 * sim-profile.c (profile_print_core): label needs empty statement.
1177
1178 Thu Sep 25 11:20:47 1997 Stu Grossman <grossman@babylon-5.cygnus.com>
1179
1180 * sim-break.c (sim_set_breakpoint sim_clear_breakpoint): Use ZALLOC
1181 and zfree instead of xmalloc and free. Prevents warnings.
1182
1183 Wed Sep 24 17:38:57 1997 Andrew Cagney <cagney@b1.cygnus.com>
1184
1185 * configure: Regenerated to track ../common/aclocal.m4 changes.
1186
1187 Wed Sep 24 17:23:31 1997 Andrew Cagney <cagney@b1.cygnus.com>
1188
1189 * Make-common.in (SIM_BITSIZE): Assign from configured value.
1190 (CONFIG_CFLAGS): Add SIM_BITSIZE.
1191
1192 * aclocal.m4 (--enable-sim-bitsize): Developer option for
1193 controling the bitsize/msb of the target.
1194
1195 Wed Sep 24 17:41:40 1997 Stu Grossman <grossman@babylon-5.cygnus.com>
1196
1197 * Make-common.in: New files sim-break.c, sim-break.h.
1198 * sim-base.h: Add point to breakpoint list to sim_state_base.
1199 * sim-break.c sim-break.h: New modules that implement intrinsic
1200 breakpoint support.
1201 * sim-module.c: Add breakpoint module.
1202
1203 Tue Sep 23 00:26:39 1997 Felix Lee <flee@yin.cygnus.com>
1204
1205 * sim-events.c (SIM_EVENTS_POLL_RATE): poll more often than once
1206 an hour.
1207 * sim-n-core.h (WITH_XOR_ENDIAN): MSVC barfs on
1208 if (0) { 1 % 0; }
1209 * sim-core.c (sim_core_xor_write_buffer): WITH_XOR_ENDIAN + 1.
1210 (SIGBUS) define for Windows.
1211 * sim-trace.c (trace_printf,debug_printf): added ALMOST_STDC.
1212 * sim-resume.c: define SIGTRAP for windows.
1213 * sim-xcat.h: use token pasting if ALMOST_STDC.
1214
1215 Tue Sep 23 11:04:38 1997 Andrew Cagney <cagney@b1.cygnus.com>
1216
1217 * Make-common.in (SIM_SCACHE, SIM_DEFAULT_MODEL): Assign
1218 configured values.
1219 (CONFIG_CFLAGS): Add same.
1220
1221 Mon Sep 22 17:20:27 1997 Felix Lee <flee@cygnus.com>
1222
1223 * sim-types.h (SIGNED64): ##i64 when _MSC_VER, not _WIN32.
1224 (SIGNED32): use ##i32.
1225
1226 Tue Sep 23 11:04:38 1997 Andrew Cagney <cagney@b1.cygnus.com>
1227
1228 * configure: Regenerated to track ../common/aclocal.m4 changes.
1229
1230 Tue Sep 23 10:07:47 1997 Andrew Cagney <cagney@b1.cygnus.com>
1231
1232 * aclocal.m4 (sim-endian): Simplify logic determining [default]
1233 endian of target.
1234
1235 * Make-common.in (SIM_WARNINGS, SIM_ALIGNMENT, SIM_ENDIAN,
1236 SIM_HOSTENDIAN, SIM_RESERVED_BITS, SIM_ASSERT, SIM_FLOAT,
1237 SIM_HARDWARE, SIM_INLINE, SIM_PACKAGES, SIM_REGPARM, SIM_SMP,
1238 SIM_STDCALL, SIM_XOR_ENDIAN): Assign configured values.
1239 (CONFIG_CFLAGS): Add same.
1240
1241 * aclocal.m4: Perform AC_SUBST on optional options.
1242
1243 Mon Sep 22 11:46:20 1997 Andrew Cagney <cagney@b1.cygnus.com>
1244
1245 * sim-config.h (WITH_DEFAULT_ALIGNMENT): Don't hardwire any alignment.
1246
1247 * sim-options.c (standard_option_handler): Typo in warning message.
1248
1249 * sim-base.h (STATE_MODEL): Make conditional on SIM_HAVE_MODEL.
1250
1251 * sim-profile.c (profile_print_insn): Check 0 .. MAX_INSN for any
1252 insn count. Make count conditional on there being a valid
1253 INSN_NAME.
1254 (profile_pc_init): Make default PC profile frequency an arbitrary
1255 256.
1256
1257 * sim-base.h: Ditto.
1258
1259 * sim-profile.h (WITH_PROFILE_MODEL_P): Only enable modeling when
1260 SIM_HAVE_MODEL.
1261
1262 * sim-model.h (struct MACH): Depreciate, to be replaced by bfd
1263 archure struct.
1264
1265 Mon Sep 22 11:46:20 1997 Andrew Cagney <cagney@b1.cygnus.com>
1266
1267 * configure: Regenerated to track ../common/aclocal.m4 changes.
1268
1269 Mon Sep 22 11:45:00 1997 Andrew Cagney <cagney@b1.cygnus.com>
1270
1271 * aclocal.m4 (sim_alignment): Simplify logic for selecting the
1272 configured alignment.
1273
1274 Fri Sep 19 17:45:25 1997 Andrew Cagney <cagney@b1.cygnus.com>
1275
1276 * configure: Regenerated to track ../common/aclocal.m4 changes.
1277
1278 Fri Sep 19 17:26:14 1997 Andrew Cagney <cagney@b1.cygnus.com>
1279
1280 * sim-config.c (sim_config): Check for default alignment.
1281
1282 * sim-options.c (standard_option_handler): Add alignment option.
1283
1284 * aclocal.m4 (sim_alignment): Allow configuration of hardwired and
1285 default alignment requirements on memory accesses.
1286
1287 Fri Sep 19 11:51:35 1997 Jeffrey A Law (law@cygnus.com)
1288
1289 * sim-load.c (sim_load_file): Return failure if the executable
1290 had no loadable sections.
1291
1292 Wed Sep 17 13:33:28 1997 Andrew Cagney <cagney@b1.cygnus.com>
1293
1294 * sim-events.c (ETRACE): Use trace_printf not sim_io_printf for
1295 trace output.
1296
1297 * sim-core.c (sim_core_signal): When bad access halt simulator
1298 SIGSEGV / SIGBUS instead of aborting.
1299 (signal.h): Include.
1300
1301 * sim-watch.c (sim_watchpoint_install): Handler for watchpoint
1302 options was missing.
1303
1304 * sim-bits.h (MOVED): Define
1305
1306 Wed Sep 17 10:33:28 1997 Andrew Cagney <cagney@b1.cygnus.com>
1307
1308 * sim-alu.h (ALU32_HAD_OVERFLOW): Pacify GCC, Use MSBIT instead of
1309 BIT.
1310
1311 * sim-bits.h (LSBIT, MSBIT): Check for overflow of shift value.
1312
1313 * sim-bits.c: Add 8 bit versions of bit macros.
1314
1315 * sim-bits.h: Ditto.
1316
1317 Tue Sep 16 16:15:16 1997 Andrew Cagney <cagney@b1.cygnus.com>
1318
1319 * sim-bits.c (LSSEXT, MSSEXT): Replace SEXT.
1320 (LSINSERTED, MSINSERTED): Ditto for INSERTED.
1321
1322 * sim-n-bits.h (MSSEXTn, LSSEXTn): Replace SEXTn.
1323 (LSINSERTDn, MSINSERTEDN): Ditto for INSERTEDn.
1324
1325 * sim-bits.h (SEXT*): Define as MSEXT/LSEXT.
1326 (INSERTED*): Ditto for LSINSERTED/MSINSERTED.
1327
1328 Mon Sep 15 17:36:15 1997 Andrew Cagney <cagney@b1.cygnus.com>
1329
1330 * aclocal.m4 (SIM_AC_COMMON): Add optional config.h file argument.
1331 configure.in: Output to cconfig.h instead of config.h.
1332
1333 * configure: Regenerated to track ../common/aclocal.m4 changes.
1334
1335 Mon Sep 15 15:39:28 1997 Andrew Cagney <cagney@b1.cygnus.com>
1336
1337 * sim-utils.c (sim_analyze_program): Set STATE_ARCHITECTURE from
1338 BFD if known.
1339
1340 Tue Sep 9 21:46:46 1997 Felix Lee <flee@cygnus.com>
1341
1342 * callback.c (os_write): divert stdout and stderr to their
1343 respective hooks.
1344
1345 Thu Sep 11 10:08:48 1997 Andrew Cagney <cagney@b1.cygnus.com>
1346
1347 * sim-profile.c (profile_print_speed): Call
1348 sim_events_elapsed_time instead of PROFILE_EXEC_TIME for moment.
1349
1350 * sim-events.c (sim_events_elapsed_time): New function return nr
1351 host MS consumed by the simulator.
1352 (sim_watch_valid): Use.
1353
1354 * sim-module.c (modules): Install sim_events very very early.
1355
1356 * sim-profile.c (profile_print): Call profile_print_pc.
1357 (print_bar):
1358 (profile_pc_init): New function, set up processor for PC
1359 profiling.
1360 (profile_print_pc): New function, print a PC profile.
1361 (profile_pc_event): New function, sample PC.
1362
1363 * sim-profile.h (PROFILE_PC_COUNT, PROFILE_PC_START,
1364 PROFILE_PC_END, PROFILE_PC_SHIFT, PROFILE_PC_SAMPLE_SIZE): Add to
1365 profile struct.
1366
1367 * sim-options.c (sim_print_help): Pacify GCC.
1368
1369 * sim-n-core.h (sim_core_read_aligned_N,
1370 sim_core_write_aligned_N): Add un-conditional profile call.
1371 (sim_core_read_unaligned_N, sim_core_write_unaligned_N): Add
1372 profile call when aligned read/write isn't used.
1373
1374 * sim-base.h: Include sim-profile, sim-model after sim-core &
1375 sim-events allow sim-core to define useful values.
1376
1377 * sim-profile.c (OPTION_PROFILE_CORE): Define.
1378 (profile_option_handler, profile_options): Add support for
1379 --profile-core option.
1380 (print_bar): Include when core profiling.
1381 (profile_print_core): New function, print core profile.
1382
1383 * sim-config.c (print_sim_config): Print profile status.
1384
1385 * sim-profile.h (PROFILE_NEXT_IDX, PROFILE_core,
1386 WITH_PROFILE_PC_P): Define.
1387 (PROFILE_CORE_COUNT): Count each core-map/size separatly.
1388 (PROFILE_COUNT_CORE): Define.
1389
1390 Thu Sep 11 08:44:52 1997 Andrew Cagney <cagney@b1.cygnus.com>
1391
1392 * sim-watch.c (handle_watchpoint): Pass a char** index into the
1393 interrupt_names array as the data.
1394 (sim-watch.h): Document.
1395
1396 Wed Sep 10 16:15:22 1997 Andrew Cagney <cagney@b1.cygnus.com>
1397
1398 * sim-options.c (sim_print_help): When the doc string is to long
1399 word wrap it.
1400
1401 * sim-watch.c (sim_watchpoint_install): Use option.doc_name so
1402 that only the first few the watch options are listed. Generate
1403 meanginful usage messages.
1404
1405 * sim-options.h (struct OPTION): Clarify use of doc_name field
1406
1407 Wed Sep 10 13:23:24 1997 Andrew Cagney <cagney@b1.cygnus.com>
1408
1409 * sim-options.c (OPTION_ARCHITECTURE_INFO): New option.
1410 (standard_option_handler): Handle --architecture-info.
1411
1412 Tue Sep 9 21:46:46 1997 Felix Lee <flee@cygnus.com>
1413
1414 * sim-core.h (sim_cpu_core): [WITH_XOR_ENDIAN + 1], to avoid
1415 illegal zero-sized array.
1416 * sim-core.c (sim_core_xor_read_buffer): same.
1417
1418 Tue Sep 9 11:20:35 1997 Doug Evans <dje@canuck.cygnus.com>
1419
1420 * nltvals.def: Regenerate.
1421
1422 Tue Sep 9 02:10:36 1997 Andrew Cagney <cagney@b1.cygnus.com>
1423
1424 * sim-fpu.c (DP_FRACHIGH2): Define LL using SIGNED64.
1425
1426 Mon Sep 8 12:22:20 1997 Andrew Cagney <cagney@b1.cygnus.com>
1427
1428 * sim-bits.c (MASKED): Delete.
1429 (EXTRACTED): Delete.
1430 (LSEXTRACTED, MSEXTRACTED): New functions.
1431
1432 * sim-n-bits.h (MASKEDn): Delete, define as MSMASKED or LSMASKED.
1433 (MSMASKEDn, LSMASKEDn): Add last argument.
1434 (MSMASK*): Ditto.
1435
1436 * sim-bits.h (EXTEND8, EXTEND16): Define.
1437 (EXTRACTED64): Define as 64 bit extract, not 32 bit.
1438
1439 * sim-run.c (sim_engine_run): Use CPU_CIA macro.
1440
1441 * sim-engine.h (SIM_ENGINE_HALT_HOOK): Use CPU_CIA to get at
1442 current instruction address.
1443
1444 * sim-inline.h (*_ENGINE): Define.
1445
1446 Fri Sep 5 08:39:02 1997 Andrew Cagney <cagney@b1.cygnus.com>
1447
1448 * sim-core.c (sim_core_attach): Fix checks of modulo/mask.
1449
1450 * sim-watch.c (delete_watchpoint): Delete by ident and type.
1451 (watch_option_handler): Call delete_watchpoint with ident or type.
1452 (sim_watchpoint_install): Create interrupt specific watchpoint
1453 commands on the fly.
1454 (do_watchpoint_create): New function, create a watch point using
1455 type/int-nr info encoded in the option nr.
1456 (do_watchpoint_info): New function. List active watchpoints.
1457
1458 * sim-watch.h: Change data structure to a list.
1459
1460 * sim-memopt.c (memory_option_handler): Require explicit "all"
1461 before deleting all memory regions.
1462
1463 * sim-utils.c (sim_do_commandf): New function, printf version of
1464 sim_do_command.
1465
1466 * sim-basics.h (asprintf, vasprintf): Hack, define for CYGWIN32.
1467
1468 * sim-alu.h (ALU64_ADD): Use explicit MSEXTRACTED64, do not assume
1469 bit endianness.
1470 (SIGNED64, UNSIGNED64): Delete.
1471 (ALU64_ADD): Don't rely on bit endianness.
1472 (ALU64_BEGIN): Define.
1473
1474 * sim-n-bits.h (MSEXTRACTEDn, LSEXTRACTED): New functions.
1475 (EXTRACTEDn): Delete, define as either LSEXTRACTED or MSEXTRACTED.
1476
1477 * sim-types.h (SIGNED64, UNSIGNED64): New macros, attach relevant
1478 suffix - u64, LL - to 64 bit constants.
1479
1480 Thu Sep 4 09:27:54 1997 Andrew Cagney <cagney@b1.cygnus.com>
1481
1482 * sim-config.c (sim_config): Add assert for SIM_MAGIC_NUMBER.
1483
1484 * sim-utils.h (NZALLOC): Define - zalloc * N.
1485
1486 * sim-hrw.c (sim_read, sim_write): New file. Provide generic
1487 implementation of read/write functions.
1488
1489 * Make-common.in (sim-hrw.o): New target.
1490
1491 * sim-base.h (STATE_MEMOPT_P): Delete, simulators _always_ add
1492 memory.
1493
1494 * sim-memopt.c (memory_option_handler): Implement memory-size
1495 command. Implement memory-alias command. Let memory-delete delete
1496 all memory regions.
1497 (add_memopt): New function. Add a memory region.
1498 (do_memopt_delete): New function. Delete a memory region.
1499
1500 * sim-utils.c (sim_elapsed_time_get): Never return zero.
1501
1502 * sim-core.c (sim_core_detach): New function.
1503 (sim_core_map_detach): New function. Perform the actual detach.
1504 (sim_core_init): Move initialization code from here.
1505 (sim_core_install): To here.
1506 (sim_core_uninstall): And here.
1507
1508 * sim-module.c: Add memopt module.
1509
1510 * sim-base.h (STATE_MEMOPT, STATE_MEMOPT_P): Add memopt to
1511 simulator base type.
1512
1513 * Make-common.in (sim_main_headers): Add sim-memopt.h
1514 (sim-memopt.o): New target.
1515
1516 * sim-core.c (sim_core_install): Add core_options to the option
1517 table.
1518
1519 * sim-watch.c (watch_options): Make --delete-watch a synonym for
1520 --watch-delete.
1521
1522 * sim-config.h (WITH_MODULO_MEMORY): Define as 0. Update
1523 comments.
1524
1525 * sim-core.h (struct _sim_core_mapping): Change nr_bytes to type
1526 address_word, add mask member.
1527
1528 * sim-core.h, sim-core.c (sim_core_attach): Make nr_bytes of type
1529 address_word, allow for 64bit targets in 32bit host. Add modulo
1530 argument.
1531 (sim_core_map_attach): Ditto.
1532 (new_sim_core_mapping): Ditto.
1533 (sim_core_translate): Mask address when modulo memory.
1534
1535 Wed Sep 3 17:32:54 1997 Doug Evans <dje@seba.cygnus.com>
1536
1537 * sim-hload.c (sim_load): Add assert for SIM_MAGIC_NUMBER.
1538
1539 * gdbinit.in: New file.
1540 * aclocal.m4 (SIM_AC_OUTPUT): Build .gdbinit.
1541 * Make-common.in (distclean): Delete .gdbinit.
1542 (.gdbinit): Add rule for.
1543 * configure: Regenerated to track ../common/aclocal.m4 changes.
1544
1545 * Make-common.in (cgen-run.o): Add rule for.
1546
1547 Wed Sep 3 10:08:21 1997 Andrew Cagney <cagney@b1.cygnus.com>
1548
1549 * sim-resume.c (sim_resume): Suspend/resume the simulator.
1550
1551 * sim-events.c (sim_watch_valid): Compute total elapsed time from
1552 both resumed and previous elapsed time.
1553 (sim_events_init): Set initial_wallclock and current_wallclock to
1554 zero.
1555 (sim_events_install): Install sim_events_suspend and
1556 sim_events_resume.
1557 (sim_events_watch_clock): Allow for suspended simulator when
1558 computing the time of the clock event.
1559
1560 * sim-events.h (struct _sim_event): Add resume_wallclock, rename
1561 initial_wallclock to elapsed_wallclock, set both to zero.
1562 (sim_events_init, sim_events_uninstall): Delete prototypes.
1563
1564 * sim-module.h (MODULE_SUSPEND_FN, MODULE_RESUME_FN): Define types.
1565
1566 * sim-module.c(sim_module_resume, sim_module_suspend): New
1567 functions.
1568
1569 Wed Sep 3 10:08:21 1997 Andrew Cagney <cagney@b1.cygnus.com>
1570
1571 * sim-core.c (sim_core_map_attach): Clarify memory overlap error
1572 message.
1573
1574 Tue Sep 2 14:57:06 1997 Doug Evans <dje@canuck.cygnus.com>
1575
1576 * Makefile.in (TAGS): Add support for "/* TAGS: foo */" marker.
1577 * Make-common.in (TAGS): Likewise.
1578 * sim-n-bits.h: Add TAGS comments for all functions.
1579 * sim-n-core.h: Likewise.
1580 * sim-n-endian.h: Likewise.
1581
1582 Mon Sep 1 10:50:11 1997 Andrew Cagney <cagney@b1.cygnus.com>
1583
1584 * sim-utils.c (sim_state_alloc): Set CPU backlinks, callback and
1585 kind.
1586
1587 * sim-base.h (sim_state_alloc): Add callback and kind arguments.
1588
1589 * sim-base.h (INVALID_INSTRUCTION_ADDRESS): Add default
1590 definition.
1591
1592 Sat Aug 30 09:47:21 1997 Andrew Cagney <cagney@b1.cygnus.com>
1593
1594 * sim-fpu.c (DP_GARDMSB, ...): Make unsigned.
1595 (DP_FRACHIGH, DP_FRACHIGH2, ..): Use MSMASK to avoid LL.
1596
1597 Fri Aug 29 13:37:44 1997 Andrew Cagney <cagney@b1.cygnus.com>
1598
1599 * sim-core.c (sim_core_map_attach): Cast attach enum to int.
1600 (sim_core_xor_read_buffer, sim_core_xor_write_buffer): Make
1601 nr_transfered and nr_this_transfer unsigned.
1602
1603 * sim-events.c (sim_events_tickn): N is signed, as limited to
1604 MAXINT.
1605
1606 * sim-n-endian.h (offset_N): Change size to unsigned.
1607
1608 * callback.c (os_poll_quit): Add prototypes for kbhit and getkey.
1609
1610 Fri Aug 29 10:10:53 1997 Andrew Cagney <cagney@b1.cygnus.com>
1611
1612 * sim-utils.c (sim_copy_argv): Delete, replaced by dupargv.
1613
1614 * sim-options.c (sim_parse_args): Use dupargv.
1615
1616 Thu Aug 28 10:36:34 1997 Doug Evans <dje@canuck.cygnus.com>
1617
1618 * sim-options.c (standard_option_handler): Use xstrdup, not strdup.
1619
1620 Thu Aug 28 12:09:15 1997 Andrew Cagney <cagney@b1.cygnus.com>
1621
1622 * sim-base.h (STATE_ARCHITECTURE, STATE_TARGET): Add to simulator
1623 base type.
1624
1625 * sim-options.c (standard_options): Add --architecture=MACHINE and
1626 --target=TARGET options.
1627 (OPTION_ARCHITECTURE, OPTION_TARGET): Define.
1628 (standard_option_handler): Handle architecture and target options.
1629 (bfd.h): Include.
1630
1631 * sim-utils.c (sim_analyze_program): Pass STATE_TARGET to
1632 bfd_openr.
1633 (sim_analyze_program): Set prog_bfd architecture from
1634 STATE_ARCHITECTURE if known.
1635
1636 Wed Aug 27 18:13:22 1997 Andrew Cagney <cagney@b1.cygnus.com>
1637
1638 * configure: Regenerated to track ../common/aclocal.m4 changes.
1639 * config.in: Ditto.
1640
1641 Wed Aug 27 18:11:30 1997 Andrew Cagney <cagney@b1.cygnus.com>
1642
1643 * aclocal.m4 (enable-sim-warnings): Remove comment stating
1644 that option does not apply to certain files.
1645
1646 Wed Aug 27 15:13:04 1997 Andrew Cagney <cagney@b1.cygnus.com>
1647
1648 * sim-bits.h (LSBIT8, LSBIT16, LSBIT32, LSBIT64, LSBIT, MSBIT8,
1649 MSBIT16, MSBIT32, MSBIT64, MSBIT): New macros - single bit as
1650 offset from MSB/LSB.
1651
1652 * sim-endian.h (A1_8, A2_8, A4_8, A1_4, A2_4, A1_2): New macro,
1653 access address of sub word quantity of a hosts 16, 32, 64 bit word
1654 type.
1655 (V1_2, V1_4, V2_4, V1_8, V2_8, V4_8): Ditto for values.
1656 (U8_1, U8_2, U8_4, U4_1, U4_2, U2_1): Ditto for set of values.
1657 (V2_H1, V2_L1, V4_H2, V4_L2, V8_L4, V8_H4): Given N byte argument,
1658 return N*2 byte value with argument in Hi/Lo word. Renamed from
1659 V1_H2, V1_L2, V2_H4, V2_L4, V4_H8, V4_L8.
1660
1661 * sim-alu.h (ALU32_HAD_OVERFLOW): Use 64 bit mask not 32bit.
1662 (ALU16_HAD_CARRY, ALU32_HAD_CARRY, ALU16_HAD_OVERFLOW): Use MSBIT
1663 so that bit offset is explicit.
1664
1665 Wed Aug 27 11:55:35 1997 Andrew Cagney <cagney@b1.cygnus.com>
1666
1667 * sim-utils.c (sim_analyze_program): Add prog_name argument.
1668 Update STATE_PROG_BFD when needed with a dup'd copy of the
1669 program.
1670
1671 * sim-config.c (sim_config): Delete ABFD argument, use
1672 STATE_PROG_BFD directly.
1673
1674 Tue Aug 26 12:55:26 1997 Andrew Cagney <cagney@b1.cygnus.com>
1675
1676 * run.c (main): Pass the open ABFD to sim_create_inferior.
1677
1678 * nrun.c (main): Determine prog_bfd. Pass to sim_create_inferior
1679 and sim_load.
1680 (bfd.h): Include.
1681
1682 * sim-hload.c (sim_load): New file. Implement generic sim_load for
1683 hardware only simulator targets.
1684
1685 * Make-common.in (sim-hload.o): Add rule.
1686
1687 Wed Aug 27 09:51:42 1997 Andrew Cagney <cagney@b1.cygnus.com>
1688
1689 * sim-utils.c (sim_copy_argv): Rewrite to match malloc strategy
1690 used by copyargv and freeargv.
1691
1692 * sim-options.c (sim_parse_args): Save a copy of PROG-ARGS in
1693 STATE_PROG_ARGV, not just a pointer.
1694
1695 Mon Aug 25 17:50:22 1997 Andrew Cagney <cagney@b1.cygnus.com>
1696
1697 * configure: Regenerated to track ../common/aclocal.m4 changes.
1698 * config.in: Ditto.
1699
1700 Mon Aug 25 12:11:06 1997 Andrew Cagney <cagney@b1.cygnus.com>
1701
1702 * aclocal.m4 (sim-endian): Add second argument to
1703 SIM_AC_OPTION_ENDIAN. First is hardwired endian, second is
1704 default endian when not hardwired.
1705
1706 * sim-config.h (WITH_DEFAULT_TARGET_BYTE_ORDER): New macro, if all
1707 else failes value for target byte order.
1708
1709 * sim-config.c (sim_config): Add abfd arguments. Set
1710 STATE_PROG_BFD accordingly. Determine prefered_target_byte_order
1711 from same.
1712 (sim_config): Return SIM_RC, don't abort.
1713 (bfd.h): Include.
1714
1715 * run.c (main): Update call to sim_open - add ABFD argument.
1716 * nrun.c (main): Add NULL ABFD argument.
1717
1718 Thu Aug 14 12:48:57 1997 Doug Evans <dje@canuck.cygnus.com>
1719
1720 * callback.c (os_poll_quit): Make static.
1721 Call sim_cb_eprintf, not p->eprintf.
1722 (sim_cb_printf, sim_cb_eprintf): New functions.
1723 * sim-utils.h (sim_cb_printf, sim_cb_eprintf): Declare.
1724
1725 * sim-basics.h (zalloc,zfree,sim_add_commas,SIM_ELAPSED_TIME,
1726 sim_elapsed_time_get,sim_elapsed_time_since): Move decls to
1727 sim-utils.h. #include sim-utils.h.
1728 * sim-utils.h: Above decls moved here.
1729 (sim_analyze_program,sim_load_file): Use `struct _bfd', not `bfd'.
1730
1731 * sim-watch.c (action_watchpoint): Fix thinkos.
1732
1733 Thu Jul 24 08:48:05 1997 Stu Grossman (grossman@critters.cygnus.com)
1734
1735 * sim-types.h: Fix defs of 64 bit data types for MSVC.
1736
1737 Tue Jul 22 10:35:37 1997 Doug Evans <dje@canuck.cygnus.com>
1738
1739 * sim-n-core.h (sim_core_write_unaligned_N): Add missing break
1740 to FORCED_ALIGNMENT case.
1741
1742 Thu Jun 5 13:48:37 1997 Andrew Cagney <cagney@b1.cygnus.com>
1743
1744 * callback.c (target_to_host_open): Handle hosts with O_BINARY.
1745
1746 Thu Jun 5 08:47:10 1997 Jeffrey A Law (law@cygnus.com)
1747
1748 * Make-common.in (libsim.a): Fix typo.
1749
1750 Thu Jun 5 13:48:37 1997 Andrew Cagney <cagney@b1.cygnus.com>
1751
1752 * nrun.c (main): Verify the structure returned before using it.
1753
1754 Wed Jun 4 11:44:06 1997 Andrew Cagney <cagney@b1.cygnus.com>
1755
1756 * sim-config.h (WITH_ENGINE): Enable the sim-engine module by
1757 default.
1758
1759 * sim-engine.c (sim_engine_install): New function. Install the
1760 engine init functions.
1761 (sim_engine_init): [Re]initialize the simulator engine.
1762
1763 * sim-module.c: Add sim_engine to list of modules that always
1764 install.
1765
1766 Tue Jun 3 04:52:04 1997 Andrew Cagney <cagney@b1.cygnus.com>
1767
1768 * sim-watch.c (schedule_watchpoint): Use sim_unschedule_watchpoint
1769 to remove the old watchpoint, not delete_watchpoint.
1770 (watch_option_handler): Action the correct watchpoint, not just
1771 cycles.
1772
1773 Wed May 28 14:47:41 1997 Andrew Cagney <cagney@b1.cygnus.com>
1774
1775 * sim-n-core.h (sim_core_write_aligned_N): For 8byte reads, output
1776 both low and high word.
1777 (sim_core_write_aligned_N): Ditto.
1778
1779 * sim-trace.c (set_trace_options): Delete code explicitly setting
1780 core->trace.
1781
1782 * sim-options.c (sim_print_help): Call the list commands if not a
1783 standalone simulator.
1784 (sim_print_help): Advise that some options may not be applicable.
1785
1786 * sim-trace.c (set_trace_options): Assume core present.
1787
1788 * sim-events.c (sim_events_schedule_after_signal): Overflow signal
1789 buffer when full not almost full.
1790
1791 Tue May 27 14:32:00 1997 Andrew Cagney <cagney@b1.cygnus.com>
1792
1793 * sim-events.c (sim_events_process): Don't blat the event queue
1794 when processing watchpoints.
1795
1796 * sim-watch.h: Make arg unsigned long - stop sign extension.
1797
1798 * sim-events.c (sim_watch_valid): rewrite so debugable.
1799
1800 * sim-config.h (WITH_XOR_ENDIAN): Default to zero.
1801
1802 * sim-watch.c (schedule_watchpoint): Add is_within option so that
1803 inequality test is possible.
1804 (handle_watchpoint): Re-pass is_within arg.
1805 (watch_option_handler): When `!' prefix to pc-watchpoint arg pass
1806 0 to schedule_watchpoint's is_within arg.
1807 (sim_watchpoint_init): Re-pass is_within arg.
1808
1809 * sim-options.c (sim_print_help): Add is_command argument. Don't
1810 include -- prefix when called from the command line interpreter.
1811
1812 * sim-watch.c (schedule_watchpoint): Pass true is_within argument.
1813
1814 * sim-events.c (sim_events_watch_sim): Add is_within argument,
1815 zero indicates that the test should be reversed.
1816 (sim_events_watch_core): Ditto.
1817 (WATCH_CORE): Compare range against is_within.
1818 (WATCH_SIM): Ditto.
1819
1820 Tue May 27 12:48:03 1997 Andrew Cagney <cagney@b2.cygnus.com>
1821
1822 * sim-events.c (WATCH_CORE): Pass NULL cpu argument to
1823 sim_core_read_buffer. Check nr-bytes transfered.
1824
1825 * sim-core.h (sim_core_common): Define a new struct that contains
1826 the common data. to sd and cpu structures.
1827 * sim-core.c (sim_core_attach): Update.
1828 (sim_core_init): Update. Remember to copy initialized data to each
1829 cpu.
1830 (sim_core_find_mapping): Ditto.
1831
1832 * sim-core.c (sim_core_read_buffer): Add cpu argument.
1833 (sim_core_write_buffer): Ditto.
1834
1835 * sim-n-core.h (sim_core_read_unaligned_N): When mis-aligned
1836 transfer use xor version of read buffer.
1837 (sim_core_write_unaligned_N): Ditto for write.
1838
1839 * sim-core.c (sim_core_xor_read_buffer): New function implement
1840 xor-endian data read breaking transfer up into xor-endian sized
1841 blocks.
1842 (sim_core_xor_write_buffer): Ditto for write.
1843 (reverse_n): Reverse order of arbitrary number of bytes in buffer
1844 - needed for xor-endian transfers.
1845
1846 Fri May 23 14:24:31 1997 Andrew Cagney <cagney@b1.cygnus.com>
1847
1848 * sim-inline.h: Review description.
1849
1850 * sim-core.h, sim-core.c: Reduce number of functions being inlined
1851 to just those involved in data transfers and configuration.
1852
1853 * sim-xcat.h (XSTRING): New macro, map macro definition onto
1854 string.
1855 * sim-n-core.h (sim_core_read_aligned_N): Use.
1856 (sim_core_read_unaligned_N): Ditto.
1857 (sim_core_read_unaligned_N): Ditto..
1858 (sim_core_write_unaligned_N): Ditto.
1859
1860 * sim-core.h: Add xor endian bitmap to main structure. *
1861
1862 sim-n-core.h (sim_core_write_aligned_N): Add suport for xor
1863 endian.
1864 (sim_core_read_aligned_N): Ditto.
1865
1866 * sim-core.c (sim_core_set_xor_endian): New function.
1867 (sim_core_attach): Don't overwrite the per-cpu xor map when
1868 cloning the global core.
1869
1870 Fri May 23 10:53:13 1997 Andrew Cagney <cagney@b1.cygnus.com>
1871
1872 * sim-engine.h: Update below so that it is using an enumerated
1873 type.
1874
1875 Thu May 22 09:12:16 1997 Gavin Koch <gavin@cygnus.com>
1876
1877 * sim-engine.c (sim_engine_restart):
1878 * sim-resume.c (sim_resume): Change longjmp param/setjmp
1879 return value used for simulator restart from 0 to 2.
1880
1881 Wed May 21 08:47:30 1997 Andrew Cagney <cagney@b1.cygnus.com>
1882
1883 * cgen-scache.c (scache_option_handler): Add is_command arg.
1884
1885 * sim-model.c (model_option_handler): Add is_command argument.
1886
1887 * sim-profile.c (profile_option_handler): Add is_command arg.
1888
1889 * sim-events.c (sim_watch_valid): Use ub64, lb64 when 64bit value
1890 involved.
1891
1892 * sim-module.c (sim_module_add_init_fn): Call init fn in the same
1893 order that they are registered.
1894
1895 * sim-options.h (OPTION_HANDLER): Add argument to differentiate
1896 between option and command line processing.
1897
1898 * sim-options.c: Include stdlib.h, ctype.h.
1899
1900 * Make-common.in (sim-watch.o): Add rule.
1901 (sim_main_headers): Assume sim-assert.h included.
1902 (sim-*.o): Simplify make rule.
1903
1904 * sim-module.c: Add sim_watch_install to module list.
1905
1906 Tue May 20 14:15:23 1997 Andrew Cagney <cagney@b1.cygnus.com>
1907
1908 * sim-base.h (STATE_LOADED_P): New predicate. Set once everything
1909 has been loaded.
1910
1911 * sim-trace.c (trace_install): Check magic. Include sim-assert.h.
1912 * sim-events.c (sim_events_install): Ditto.
1913 * sim-core.c (sim_core_install): Ditto.
1914 * sim-model.c (model_install): Ditto.
1915 * sim-options.c (standard_install): Ditto.
1916 * sim-profile.c (profile_install): Ditto.
1917 * sim-reason.c (sim_stop_reason): Ditto.
1918 * sim-run.c (sim_engine_run): Ditto.
1919 * sim-utils.c (sim_analyze_program): Ditto.
1920
1921 * sim-module.c (modules): Make profile_install and trace_install
1922 optional.
1923
1924 * sim-base.h (STATE_MEM_BASE): Define for flat memory systems.
1925
1926 * sim-options.c (standard_option_handler): Set the byte order.
1927
1928 * sim-events.c (sim_events_process): Allow multi tick processing.
1929 (sim_events_tickn): New function - multi cycle tick.
1930
1931 * sim-events.h (sim_events_tickn, sim_events_timewarp): Add
1932 prototypes. Under development.
1933 (sim_events): Replace processing with nr_ticks_to_process.
1934
1935 Tue May 20 09:39:22 1997 Andrew Cagney <cagney@b1.cygnus.com>
1936
1937 * nrun.c (main): Pass callbacks to sim_open instead of using
1938 sim_set_callbacks.
1939
1940 * run.c (main): Ditto.
1941
1942 Mon May 19 12:07:22 1997 Andrew Cagney <cagney@b1.cygnus.com>
1943
1944 * sim-events.c (sim_events_zalloc): Signal save memory allocator -
1945 stop tk interrupting malloc calls.
1946 (sim_events_zalloc): Converse.
1947
1948 * Make-common.in (sim_main_headers): Add sim-events.h.
1949
1950 * sim-events.c (sim_events_schedule_after_signal): Change return
1951 type to void - signal events are strictly internal.
1952 (sim_events_init): Allocate a finite buffer for signal events.
1953 (sim_events_schedule_after_signal): Enter signal events into the
1954 signal buffer.
1955
1956 * sim-engine.c (sim_engine_halt): Check SIM_DESC magic.
1957 (sim_engine_restart): Ditto.
1958 (sim_engine_abort): Ditto.
1959 * sim-stop.c (sim_stop): Ditto.
1960 (control_c_simulation): Ditto.
1961 * sim-resume.c (sim_resume): Ditto.
1962 (has_stepped): Ditto.
1963 * sim-abort.c (sim_engine_abort): Ditto.
1964
1965 * sim-basics.h (transfer_type): New type.
1966
1967 * sim-core.c (sim_core_signal): New function. Print core signal
1968 information.
1969 (sim_core_find_mapping): Add transfer argument.
1970
1971 * sim-n-core.h (sim_core_{write,write}_unaligned_N): Call
1972 SIM_CORE_SIGNAL if a recoverable abort.
1973 * sim-core.c (sim_core_find_mapping): Ditto.
1974
1975 Fri May 16 15:13:21 1997 Andrew Cagney <cagney@b1.cygnus.com>
1976
1977 * sim-core.c (sim_core_find_mapping): Replace calls to
1978 sim_io_error to more resiliant sim_engine_abort.
1979
1980 * sim-n-core.h (sim_core_read_unaligned_N): Ditto.
1981 (sim_core_write_unaligned_N): Ditto.
1982
1983 Tue May 13 13:50:06 1997 Andrew Cagney <cagney@b1.cygnus.com>
1984
1985 * sim-module.c: Add sim_events_install to list.
1986
1987 * sim-events.c (sim_events_install, sim_events_uninstall): Clonse
1988 from sim_core_*.
1989 (sim_events_init): Now returns SIG_RC.
1990
1991 * sim-run.c: New file. Generic sim_engine_run.
1992 * sim-reason.c: New file. Generic sim_stop_reason.
1993 * sim-stop.c: New file. Generic sim_stop.
1994 * sim-resume.c: New file. Generic sim_resume.
1995
1996 * Make-common.in (sim-engine.o): Add rule.
1997 (sim-run.o, sim-reason.o, sim-stop.o, sim-resume.o): Ditto.
1998
1999 * sim-engine.h, sim-engine.c: New file. Provide generic
2000 implementation of sim_engine_halt, sim_engine_error. et.al.
2001
2002 * sim-base.h (sim_state_base): Add member halt.
2003 (sim-engine.h): Include.
2004
2005 * sim-events.h (sim_event_handler): Always pass SIM_DESC to event
2006 handlers.
2007 * sim-events.c (sim_events_poll): Update event handler.
2008
2009 Tue May 13 09:57:49 1997 Andrew Cagney <cagney@b2.cygnus.com>
2010
2011 * sim-events.h, sim-events.c (sim_events_watch_clock): New
2012 function.
2013 (sim_events_watch_sim): New function.
2014 (sim_events_watch_core): New function.
2015 (sim_watch_valid): New function.
2016 (sim_events_preprocess): New function.
2017 (sim_events_process): Process the watchpoints as well as the timer
2018 queue.
2019 (sim_events_tick): Check WORK_PENDING instead of the hold queue.
2020 (sim_events_deschedule): Check all the queues when removing an
2021 event.
2022 (sim_events_init): Ditto for cleaning.
2023
2024 Mon May 19 12:07:22 1997 Andrew Cagney <cagney@b1.cygnus.com>
2025
2026 * sim-fpu.c (is_ufpu_number): Comment out - currently unused.
2027
2028 Mon May 19 11:23:03 1997 Andrew Cagney <cagney@b1.cygnus.com>
2029
2030 * callback.c (os_open): Type of arg flags is int.
2031
2032 Fri May 16 22:26:43 1997 Michael Meissner <meissner@cygnus.com>
2033
2034 * sim-fpu.c (sim_fpu_is_{eq,ne,lt,le,gt,ge}): Compare Infinities
2035 just like normal numbers as per IEEE rules.
2036
2037 Wed May 14 21:20:38 1997 Bob Manson <manson@charmed.cygnus.com>
2038
2039 * callback.c (os_close): Mark the descriptor as being
2040 available if the close succeeded.
2041 (os_open): Pass 0644 as the mode of the file being created.
2042
2043 Thu May 15 10:58:52 1997 Andrew Cagney <cagney@b1.cygnus.com>
2044
2045 * sim-fpu.c (pack_fpu, unpack_fpu): New functions - decode a
2046 float.
2047
2048 * sim-inline.c (SIM_INLINE_C): Rename from _SIM_INLINE_C_.
2049 * sim-lnline.h: Update.
2050
2051 * sim-fpu.h, sim-fpu.c (sim_fpu_[iu]{32,64}to): New int2fp
2052 conversion functions.
2053 (sim_fpu_to{32,64}[iu]): New fp2int functions.
2054
2055 * sim-fpu.h, sim-fpu.c (sim_fpu_is_{lt,le,eq,ne,ge,gt}): New fp
2056 compare functions. Replacing.
2057 (sim_fpu_cmp): This. Delete.
2058
2059 Mon May 12 14:49:05 1997 Andrew Cagney <cagney@b1.cygnus.com>
2060
2061 * sim-core.c (sim_core_find_mapping): Call engine_error not
2062 sim_io_error when possible.
2063
2064 Mon May 12 08:55:07 1997 Andrew Cagney <cagney@b2.cygnus.com>
2065
2066 * sim-endian.h (V1_H2): Add macro's to insert a word into a
2067 high/low double word.
2068
2069 * sim-trace.h: Remove definition of attribute - defined in
2070 sim_basics.h.
2071
2072 Mon May 12 08:55:07 1997 Andrew Cagney <cagney@b1.cygnus.com>
2073
2074 * sim-options.h (struct OPTION): Add doc_opt as the documenting
2075 name of the option - or family of options.
2076
2077 * sim-options.c (sim_args_command): Match command `a-b c' with
2078 option `--a-b-c' from option table.
2079
2080 Thu May 8 12:40:07 1997 Andrew Cagney <cagney@b1.cygnus.com>
2081
2082 * sim-options.c (sim_print_help): For optional arguments, wrap
2083 them in [].
2084
2085 * sim-trace.c (set_trace_options): New function, handle optional
2086 argument and multiple assignment.
2087 (trace_option_handler): Update.
2088
2089 * sim-trace.c (trace_option_handler): Trace branch and not fpu
2090 when branch tracing selected.
2091
2092 Wed May 7 15:19:58 1997 Andrew Cagney <cagney@b1.cygnus.com>
2093
2094 * sim-trace.c (trace_one_insn): Make a va-args function.
2095
2096 * sim-trace.c (trace_vprintf): New function, va-arg version of
2097 trace_printf.
2098
2099 Tue May 6 16:38:16 1997 Doug Evans <dje@canuck.cygnus.com>
2100
2101 * sim-trace.c (trace_uninstall): Don't close a file twice.
2102 * sim-profile.c (profile_uninstall): Likewise.
2103
2104 Tue May 6 06:14:01 1997 Mike Meissner <meissner@cygnus.com>
2105
2106 * sim-trace.c (toplevel): Include bfd.h.
2107 (trace_options): Note that --trace-linenum also turns on
2108 --trace-insn. Add --trace-{branch,semantics}.
2109 (trace_option_handler): If --trace-linenum, also turn on
2110 --trace-insn. Add --trace-branch support. If --trace-semantics,
2111 turn on ALU, FPU, branch, and memory tracing.
2112 (trace_one_insn): New function to trace an instruction. Support
2113 --trace-linenum.
2114 (OPTION_TRACE_*): Use an enum, rather than lots of defines.
2115
2116 * sim-trace.h (TRACE_{SEMANTICS,BRANCH}_IDX): Add new macros.
2117 (MAX_TRACE_VALUES): Use 32, not 12 by default.
2118 (TRACE_branch): Add new mask.
2119 (TRACE_*_P): Define all possible trace_p macros.
2120 (trace_one_insn): Declare function.
2121
2122 Mon May 5 14:08:34 1997 Mike Meissner <meissner@cygnus.com>
2123
2124 * sim-trace.h (__attribute__): Define as nothing if not GNU C or
2125 GNU C doesn't support __attributes__.
2126 ({trace,debug}_printf): Add attribute's so -Wformat can check the
2127 format strings.
2128
2129 Mon May 5 11:16:12 1997 Andrew Cagney <cagney@b1.cygnus.com>
2130
2131 * sim-config.h (FORCED_ALIGNMENT): New alignment option -
2132 addresses are masked forcing them to be correctly aligned.
2133 (WITH_ALIGNMENT): Make NONSTRICT_ALIGNMENT the default.
2134 * sim-config.c (config_alignment_to_a): Update.
2135
2136 * sim-core.h (sim_cpu_core): New data type contains cpu specific
2137 core data.
2138 * sim-base.h (CPU_CORE): Add cpu specific core data to cpu base
2139 type.
2140 * sim-core.c (sim_core_attach): Add CPU argument. Ready for
2141 processor specific core maps.
2142 (sim_core_map_attach): Copy the core map data to each of the
2143 processor specific core data structures.
2144 * sim-core.c (sim_core_find_mapping): Update.
2145
2146 * sim-n-core.h (sim_core_read_N, sim_core_write_N): Rename.
2147 (sim_core_write_aligned_N, sim_core_write_aligned_N): New names.
2148 (sim_core_write_unaligned_N, sim_core_write_unaligned_N): New
2149 alternatives that handle unaligned addresses.
2150 (sim_core_{read,write}_{,un}aligned_N): Drop SIM_DESC arg, replace
2151 with just CPU arg.
2152 * cgen-utils.c (sim_disassemble_insn): Update.
2153
2154 Mon May 5 13:19:16 1997 Andrew Cagney <cagney@b1.cygnus.com>
2155
2156 * sim-trace.h (TRACE_FPU_IDX): Add Floating-point specific
2157 tracing.
2158
2159 * sim-fpu.h, sim-fpu.c: New files - prototype for generic target
2160 fpu support.
2161
2162 * sim-inline.h, sim-inline.c: Add support for SIM_FPU.
2163
2164 Fri May 2 17:59:42 1997 Andrew Cagney <cagney@b1.cygnus.com>
2165
2166 * sim-core.c (sim_core_map_to_str): New function ascii equivalent
2167 to map type.
2168
2169 * sim-n-core.h (sim_core_read_N, sim_core_write_N): Use in trace
2170 statement.
2171
2172 Fri May 2 17:28:02 1997 Andrew Cagney <cagney@b2.cygnus.com>
2173
2174 * cgen-trace.c: Prepend additional trace_printf argument.
2175
2176 * cgen-utils.c (sim_disassemble_insn): Add additional core
2177 arguments.
2178
2179 Fri May 2 11:40:23 1997 Andrew Cagney <cagney@b1.cygnus.com>
2180
2181 * nrun.c (main): Catch/report errorenous simulator states.
2182
2183 * sim-module.c: #include "libiberty.h" so that xmalloc is defined.
2184 * sim-trace.c: #include string.h/strings.h so that memset is
2185 defined.
2186 * sim-utils.c: Ditto.
2187 * sim-profile.c: Ditto. And stdlib.h.
2188 (print_bar): Only define when used by instruction or memory profiler.
2189
2190 * sim-options.c (standard_option_handler): Make ul more local.
2191
2192 * sim-load.c (sim_load_file): Make the name constant.
2193 (sim_load_file): Passify gcc.
2194
2195 * sim-utils.h: New file, pre-declare utilites in corresponding .c
2196 file.
2197 * sim-utils.c, sim-load.c: Include sim-utils.h.
2198
2199 * sim-base.h (sim_cpu): Pre define here so available to all.
2200
2201 * sim-core.h (DECLARE_SIM_CORE_WRITE_N, DECLARE_SIM_CORE_READ_N):
2202 Restore the sim_cpu and instruction_address arguments so that full
2203 information is available to the abort function.
2204 * sim-core.c (sim_core_find_mapping, sim_core_write_buffer): Ditto.
2205 * sim-n-core.h (sim_core_write_N, sim_core_read_N): Update.
2206
2207 * sim-trace.h, sim-trace.c (trace_option_handler): Add interim
2208 tracing support for sim-events and sim-core.
2209 (trace_option_handler): Convert #if to if where possible so always
2210 compiled/checked by C compiler.
2211 * sim-n-core.h (sim_core_write_N, sim_core_read_N): Update.
2212
2213 * sim-base.h: Adjust comment documenting how to define the cpu
2214 structure.
2215 (sim_state_base): Add sim_core and sim_events to simulator base
2216 object.
2217
2218 * sim-trace.h, sim-trace.c (trace_printf): Add SIM_DESC argument.
2219 * sim-core.c (sim_core_init, sim_core_attach,
2220 sim_core_find_mapping): Update.
2221 * sim-events.c (ETRACE, sim_events_init, sim_events_time,
2222 update_time_from_event, insert_sim_event,
2223 sim_events_schedule_after_signal, sim_events_deschedule,
2224 sim_events_tick): Ditto.
2225
2226 * sim-basics.h (sim-module.h, sim-trace.h, sim-profile.h,
2227 sim-model.h): Move #includes from here.
2228 * sim-base.h: To here.
2229 (sim-core.h, sim-events.h, sim-io.h): Include also
2230
2231 Wed Apr 30 15:37:54 1997 Andrew Cagney <cagney@b1.cygnus.com>
2232
2233 * callback.c (default_callback): Missing initialisers.
2234
2235 Thu May 1 10:40:47 1997 Doug Evans <dje@canuck.cygnus.com>
2236
2237 * sim-utils.c (sim_add_commas): New function.
2238 * sim-basics.h (sim_add_commas): Add prototype.
2239 * cgen-scache.c (scache_print_profile): Print commas in numbers.
2240 * sim-profile.c (COMMAS): New macro.
2241 (print_*): Use it to print commas in numbers.
2242
2243 * configure: Regenerated.
2244
2245 * cgen-sim.h (sim_signal_type): Add SIM_SIGINT.
2246 (cgen_state): New member run_fast_p.
2247 (cgen_init): Add prototype.
2248 (sim_disassemble_insn): New arg `cpu'.
2249 * cgen-trace.c (trace_insn): Update call to sim_disassemble_insn.
2250 * cgen-utils.c (cgen_init): New function.
2251 (sim_disassemble_insn): New arg `cpu'. Rewrite fetching of insn.
2252 * genmloop.sh: Call engine_halt if loop exits.
2253
2254 * Makefile.in (sim-options_h): Define.
2255 (sim-{module,options,trace,profile,utils}.o): Clean up dependencies.
2256 (sim-model.o): Add new rule.
2257 (cgen-{scache,trace,utils}.o): Add new rules.
2258 * aclocal.m4 (SIM_AC_OPTION_{SCACHE,DEFAULT_MODEL}): Add.
2259 * cgen-scache.c (scache_print_profile): Change `sd' arg to `cpu'.
2260 Indent output by 2 spaces.
2261 * cgen-scache.h (scache_print_profile): Update.
2262 * cgen-trace.c (trace_insn_fini): Indent output by 2 spaces.
2263 Use trace_printf, not fprintf.
2264 (trace_extract): Use trace_printf, not cgen_trace_printf.
2265 * genmloop.sh (!FAST case): Increment `insn_count'.
2266 * sim-base.h (sim_state_base): Only include scache_size if WITH_SCACHE.
2267 (sim_cpu_base): Rename member `sd' to `state' to be consistent with
2268 access macro's name.
2269 * sim-core.c (sim_core_init): Use EXTERN_SIM_CORE to define it.
2270 Change return type to SIM_RC.
2271 (sim_core_{install,uninstall}): New functions.
2272 * sim-core.h (sim_core_{install,uninstall}): Declare.
2273 (sim_core_init): Use EXTERN_SIM_CORE to define it.
2274 Change return type to SIM_RC.
2275 * sim-model.h (models,machs,model_install): Declare.
2276 * sim-module.c (modules): Add scache_install, model_install.
2277 (sim_post_argv_init): Set cpu->state backlinks.
2278 * sim-options.c (standard_options): Delete --simcache-size,--max-insns.
2279 (standard_option_handler): Likewise.
2280 * sim-profile.c (PROFILE_{HISTOGRAM,LABEL}_WIDTH): Move to
2281 sim-profile.h.
2282 (*): Assume ANSI C.
2283 (profile_options): Delete --profile-simcache.
2284 (profile_option_handler): Likewise.
2285 (profile_print_insn): Change `sd' arg to `cpu'. Indent output 2
2286 spaces.
2287 (profile_print_{memory,model}): Likewise.
2288 (profile_print_simcache): Delete.
2289 (profile_print_speed): New function.
2290 (profile_print): Rewrite.
2291 * sim-profile.h (PROFILE_scache): Renamed from PROFILE_simcache.
2292 (WITH_PROFILE_SCACHE_P): Renamed from WITH_PROFILE_SIMCACHE_P.
2293 (PROFILE_DATA): Delete members simcache_{hits,misses}.
2294 (PROFILE_COUNT_SIMCACHE_{HIT,MISS}): Delete.
2295 (PROFILE_{CALLBACK,CPU_CALLBACK}): New types.
2296 (profile_print): Update prototype.
2297
2298 Wed Apr 30 11:34:14 1997 Doug Evans <dje@canuck.cygnus.com>
2299
2300 * cgen-scache.[ch], cgen-sim.h: New files.
2301 * cgen-trace.[ch], cgen-types.h, cgen-utils.c, genmloop.sh: New files.
2302 * sim-model.c: New file.
2303
2304 * Make-common.in (clean targets): Undo patch of Apr. 22.
2305
2306 Fri Apr 25 15:28:32 1997 Mike Meissner <meissner@cygnus.com>
2307
2308 * sim-n-bits.h (signed): If we have a standard compiler, undef
2309 signed, so that signedN is defined correctly.
2310
2311 Thu Apr 24 00:00:07 1997 Doug Evans <dje@canuck.cygnus.com>
2312
2313 * sim-module.h, sim-model.h, sim-profile.h: New files.
2314 * sim-module.c, sim-profile.c: New files.
2315 * Make-common.in (SIM_PROFILE): Define
2316 (CONFIG_CFLAGS): Add $(SIM_PROFILE).
2317 (sim_main_headers): Add sim-module.h, sim-model.h, sim-profile.h.
2318 (sim_module.o,sim-profile.o): Add rules for.
2319 * aclocal.m4 (--enable-sim-trace): Allow symbolic arguments.
2320 (--enable-sim-profile): Add.
2321 * configure: Regenerated.
2322 * sim-base.h (sim_state_base): New members init_list, uninstall_list,
2323 model. Move trace and profile support to sim-{trace,profile}.h.
2324 New members trace_data, profile_data.
2325 * sim-basics.h: #include sim-module.h, sim-model.h, sim-profile.h.
2326 * sim-config.h: Provide default definition of WITH_PROFILE.
2327 (WITH_TRACE): Change default to -1.
2328 (MAX_NR_PROCESSORS): Always define.
2329 * sim-options.c: Move trace and profile support to
2330 sim-{trace,profile}.h.
2331 (sim_pre_argv_init): Moved to sim-model.c.
2332 (standard_install): New function.
2333 * sim-options.h (sim_pre_argv_init): Move decl to sim-model.c.
2334 (standard_install): Declare.
2335 * sim-trace.c: Tracing option handling moved here from sim-options.c.
2336 (trace_install, trace_uninstall): New functions.
2337 (trace_printf): Update reference to TRACE_FILE.
2338 * sim-trace.h (TRACE_FOO_IDX): Moved here from sim-base.h.
2339 (TRACE_foo): Bit masks for symbolic arguments to --enable-sim-trace.
2340 (WITH_TRACE_FOO_P): Define.
2341 (trace_install): Declare.
2342 (TRACE_DATA): New struct.
2343
2344 Wed Apr 23 17:23:15 1997 Doug Evans <dje@canuck.cygnus.com>
2345
2346 * run.c: Undo last exec_bfd patch.
2347 (main): Only pass -E ifdef SIM_HAVE_BIENDIAN.
2348
2349 Wed Apr 23 17:54:27 1997 Mike Meissner <meissner@cygnus.com>
2350
2351 * run.c (exec_bfd): Add back in.
2352 (main): Set exec_bfd.
2353
2354 Tue Apr 22 14:43:46 1997 Doug Evans <dje@canuck.cygnus.com>
2355
2356 * sim-load.c (sim_load_file): #include <stdio.h> for NULL.
2357
2358 Wed Apr 23 02:55:54 1997 Andrew Cagney <cagney@b1.cygnus.com>
2359
2360 * sim-events.c (insert_sim_event): Call sim_io_error instead of
2361 less well defined engine_error.
2362 * sim-core.c: Ditto.
2363
2364 Tue Apr 22 08:48:16 1997 Stu Grossman (grossman@critters.cygnus.com)
2365
2366 * Make-common.in: Change clean targets to use :: so that other
2367 Makefiles can have their own clean targets.
2368 * sim-load.c (xprintf eprintf): Use ANSI_PROTOTYPES instead of
2369 __STDC__ to control use of stdarg vs. varargs syntax. Some
2370 systems can't use __STDC__, but require stdarg.
2371
2372 Fri Apr 18 11:14:43 1997 Doug Evans <dje@canuck.cygnus.com>
2373
2374 * sim-options.c (standard_options): Add --endian.
2375 (standard_option_handler): Likewise.
2376
2377 * nrun.c: #include <signal.h>.
2378 (main, cntrl_c): Wrap calls to sim_resume in a SIGINT
2379 handler that calls sim_stop ().
2380
2381 Fri Apr 18 13:11:36 1997 Andrew Cagney <cagney@b1.cygnus.com>
2382
2383 * run.c (main, cntrl_c): Wrap calls to sim_resume in a SIGINT
2384 handler that calls sim_stop (). Simulators may still be
2385 establishing their own handler.
2386
2387 * sim-events.c (sim_events_poll): Rename from
2388 sim_events_at_large_int. Poll IO.
2389
2390 * sim-io.c (sim_io_poll_quit): New function - pass on a polling
2391 request.
2392
2393 * callback.c (os_poll_quit): New function poll for quit signal
2394 where needed.
2395 (default_callback): Include magic number.
2396
2397 Thu Apr 17 02:25:11 1997 Doug Evans <dje@canuck.cygnus.com>
2398
2399 * aclocal.m4: Check for headers time.h, sys/time.h, sys/resource.h.
2400 Check for functions getrusage, time.
2401 * sim-basics.h (SIM_ELAPSED_TIME): New typedef.
2402 (sim_elapsed_time_get, sim_elapsed_time_since): Add prototypes.
2403 * sim-utils.c: #include time.h, sys/time.h, sys/resource.h if able.
2404 (sim_elapsed_time_get, sim_elapsed_time_since): New functions.
2405
2406 * sim-utils.c (sim_copy_argv, sim_analyze_program): New functions.
2407
2408 * sim-options.c, sim-options.h: New files.
2409 * sim-config.h (WITH_DEBUG): Provide default value of zero.
2410 * Make-common.in (nrun.o): Add rules for.
2411 * nrun.c: New file.
2412
2413 * run.c (main): Check return value of sim_open.
2414
2415 * Make-common.in (sim-options.o, sim-load.o, sim-trace.o): Add rules.
2416 (sim_main_headers): Add sim-trace.h.
2417 * run.c (exec_bfd, target_byte_order): Delete.
2418 (main): Pass -E <endian> to sim_open. Delete code to load sections,
2419 call sim_load instead. Check return code of sim_create_inferior.
2420 * sim-base.h (CURRENT_STATE): Define.
2421 (sim_state_base): Make typedef. New members options, prog_argv,
2422 prog_bfd, text_{section,start,end}, start_addr, simcache_size,
2423 mem_size, memory [+ corresponding access macros].
2424 (sim_cpu_base): New typedef.
2425 * sim-trace.h: New file.
2426 * sim-trace.c: New file.
2427 * sim-basics.h: #include it.
2428 * sim-load.c: New file.
2429
2430 Tue Apr 15 15:10:13 1997 Ian Lance Taylor <ian@cygnus.com>
2431
2432 * Make-common.in (INSTALL): Set to @INSTALL@.
2433 (INSTALL_XFORM, INSTALL_XFORM1): Remove.
2434 (install-common): Depend upon installdirs. Use
2435 $(program_transform_name) directly, rather than using
2436 $(INSTALL_XFORM).
2437 (installdirs): New target.
2438 * Makefile.in (INSTALL): Set to @INSTALL@.
2439 (INSTALL_XFORM, INSTALL_XFORM1): Remove.
2440 (install-man): Depend upon installdirs. Use
2441 $(program_transform_name) directly, rather than using
2442 $(INSTALL_XFORM).
2443 (installdirs): New target.
2444
2445 Tue Apr 15 15:08:12 1997 Andrew Cagney <cagney@b1.cygnus.com>
2446
2447 * sim-assert.h (SIM_ASSERT, ASSERT): Allow these macros to
2448 be overriden.
2449
2450 Wed Apr 9 16:06:44 1997 Andrew Cagney <cagney@kremvax.cygnus.com>
2451
2452 * sim-basics.h: Only bring in config.h and tconfig.h if
2453 HAVE_CONFIG_H.
2454
2455 Mon Apr 7 11:39:45 1997 Andrew Cagney <cagney@kremvax.cygnus.com>
2456
2457 * sim-config.h (WITH_TARGET_WORD_MSB): New Macro. Define the bit
2458 numbering convention of the target.
2459 * sim-config.c (print_sim_config): Print WITH_TARGET_WORD_BITSIZE
2460 and WITH_TARGET_WORD_MSB.
2461 (sim_config): When possible, check for consistency with bitsize
2462 and msb.
2463
2464 * sim-bits.h: Allow MSB to be other than zero.
2465 * sim-bits.c: Ditto.
2466 * sim-n-bits.h: Ditto.
2467
2468 * sim-bits.h (MSMASK*): New macros - converce to LSMASK*.
2469 * sim-n-bits.h (MSMASKEDn): Ditto.
2470
2471 Mon Apr 14 16:29:21 1997 Ian Lance Taylor <ian@cygnus.com>
2472
2473 * Makefile.in (INSTALL): Change install.sh to install-sh.
2474
2475 Mon Apr 7 10:46:38 1997 Doug Evans <dje@canuck.cygnus.com>
2476
2477 * sim-base.h (sim_state_base): Move `magic' to end of struct.
2478
2479 Mon Apr 7 15:53:21 1997 Andrew Cagney <cagney@kremvax.cygnus.com>
2480
2481 * run.c (main): Check that a program to run was specified.
2482
2483 Mon Apr 7 15:45:02 1997 Andrew Cagney <cagney@kremvax.cygnus.com>
2484
2485 * aclocal.m4 (AC_TYPE_SIGNAL): Add check.
2486
2487 * configure: Regenerated to track ../common/aclocal.m4 changes.
2488 * config.in: Ditto.
2489
2490 Wed Apr 2 15:06:28 1997 Doug Evans <dje@canuck.cygnus.com>
2491
2492 * sim-endian.h: Move host {LITTLE,BIG}_ENDIAN support from here,
2493 * sim-config.h: To here.
2494
2495 * Make-common.in (SIM_EXTRA_DEPS): New config var.
2496 (sim_main_headers): Define.
2497 (sim-*.o): Depend on $(SIM_EXTRA_DEPS).
2498 start-sanitize-d30v
2499 (BUILT_SRC_FROM_COMMON): Move here from ../d30v/Makefile.in.
2500 end-sanitize-d30v
2501 (clean): Use it.
2502 (sim-utils.o): Add rule for.
2503 * sim-utils.o: New file.
2504 * sim-basics.h: #include sim-base.h.
2505 (zalloc): Make argument unsigned long.
2506 * sim-base.h: New file.
2507 * sim-inline.h (SIM_IO support): Delete.
2508 * sim-io.h: Delete inline support.
2509 * sim-io.c: Likewise. sim-state.h renamed to sim-main.h.
2510 * sim-config.c: sim-state.h renamed to sim-main.h.
2511 * sim-core.c: Likewise.
2512 * sim-events.c: Likewise.
2513
2514 * run.c (main): Pass SIM_OPEN_STANDALONE to sim_open.
2515
2516 * aclocal.m4: Check for stdlib.h, string.h, strings.h, unistd.h.
2517 (sim-debug): Allow arguments. Define WITH_DEBUG in addition to
2518 -DDEBUG.
2519 * configure: Regenerated to track ../common/aclocal.m4 changes.
2520
2521 Wed Apr 2 14:34:19 1997 Andrew Cagney <cagney@kremvax.cygnus.com>
2522
2523 * configure: Regenerated to track ../common/aclocal.m4 changes.
2524
2525 Wed Apr 2 11:08:11 1997 Andrew Cagney <cagney@kremvax.cygnus.com>
2526
2527 * sim-config.h (WITH_ALIGNMENT, WITH_FLOATING_POINT,
2528 WITH_XOR_ENDIAN, WITH_SMP, WITH_RESERVED_BITS): Assume that these
2529 are defined by the configure.
2530
2531 * aclocal.m4 (sim-stdio): Add option stdio from ../ppc configure.
2532
2533 * aclocal.m4 (floating-point, xor-endian, alignment, smp,
2534 reserved-bits): Always define.
2535
2536 * sim-config.h, sim-config.c (sim_config): New function - and new
2537 file - co-ordinate the setting/checking of the common simulator
2538 configuration options.
2539
2540 * Make-common.in (sim-config.o): Add rule.
2541
2542 Fri Mar 28 15:32:00 1997 Mike Meissner <meissner@cygnus.com>
2543
2544 * callback.c (os_{,e}vprintf_filtered): Change stdarg type to
2545 va_list from void *, since va_list might not be a pointer type.
2546
2547 Mon Mar 24 15:27:12 1997 Andrew Cagney <cagney@kremvax.cygnus.com>
2548
2549 * sim-n-endian.h (offset_N): Correct assertion - word and sub word
2550 in wrong order.
2551 (offset_N): Correct computation of LE offset.
2552
2553 * sim-io.c (sim_io_error): Include a new line when reporting
2554 errors.
2555
2556 * sim-assert.h (SIM_FILTER_PATH): Out by one when locating last
2557 `/'.
2558
2559 Thu Mar 20 22:31:06 1997 Jeffrey A Law (law@cygnus.com)
2560
2561 * run.c: Include alloca-conf.h.
2562
2563 * callback.c (os_evprintf_filtered): Fix typo.
2564
2565 Fri Mar 21 13:36:20 1997 Andrew Cagney <cagney@kremvax.cygnus.com>
2566
2567 * run.c (string.h, strings.h, stdlib.h): Include.
2568
2569 * sim-events.c (sim_events_tick): Recent cleanup failed to return
2570 0 when nothing pending.
2571
2572 * run.c (sim_size, sim_trace): Plicate GCC - these two functions
2573 will soon be going away.
2574 (getopt): Plicate GCC.
2575
2576 * sim-endian.c (sim-io.h): Plicate GCC.
2577 * sim-bits.c (sim-io.h): Ditto.
2578 * sim-n-bits.h (ROTn): Ditto.
2579
2580 * sim-io.c (sim_io_error): Correct check for NULL.
2581
2582 * sim-assert.h (SIM_FILTER_PATH): Separate out the code filtering
2583 the __FILE__.
2584 * sim-events.c: Use SIM_FILTER_PATH to filter out the filename
2585 path.
2586
2587 Wed Mar 19 01:12:06 1997 Andrew Cagney <cagney@kremvax.cygnus.com>
2588
2589 * aclocal.m4 (SIM_AC_OPTION_*: Move so that they are outside of
2590 SIM_AC_COMMON - SIM_AC_COMMON was gobling arguments.
2591
2592 Tue Mar 18 20:48:12 1997 Andrew Cagney <cagney@kremvax.cygnus.com>
2593
2594 * sim-alu.h: Include sim-xcat.h.
2595
2596 Tue Mar 18 13:58:18 1997 Andrew Cagney <cagney@kremvax.cygnus.com>
2597
2598 * Make-common.in (sim-bits.c, sim-core.c, sim-endian.c,
2599 sim-events.c, sim-inline.c, sim-io.c): Define rules for building
2600 these.
2601
2602 * sim-events.c (sim_events_at_large_int): New function. Just
2603 schedules an event every large-int ticks.
2604 (sim_events_init): Call.
2605 (sim_events_tick, sim_events_process): Move async handing to
2606 sim_events_process. Move timer decrement so that it occures after
2607 events have been processed.
2608
2609 * sim-basics.h (struct _engine): Remove declaration.
2610
2611 * sim-events.h, sim-events.c: Rename type to sim_events. Prefix
2612 everything with same. Rename global struct to SIM_DESC.
2613 * sim-core.h, sim-core.c, sim-n-core.c: Ditto for sim_core.
2614 * sim-io.h, sim-io.c: Ditto.
2615
2616 * sim-assert.h: New file. Optional assertion checking macros.
2617 * sim-io.c (sim_io_error): Make just this function tolerant to
2618 null pointers.
2619
2620 * sim-xcat.h: New file. Define concatenate macros.
2621 * sim-basics.h (XCONCAT*): Move to sim-xcat.h.
2622 * sim-n-core.h, sim-n-bits.h, sim-n-endian.h: Explicitly include
2623 concat macros.
2624
2625
2626 Tue Mar 18 12:44:55 1997 Andrew Cagney <cagney@kremvax.cygnus.com>
2627
2628 * sim-bits.h (LSMASK): New macro. Create mask of LS bits.
2629
2630 Mon Mar 17 18:10:05 1997 Andrew Cagney <cagney@kremvax.cygnus.com>
2631
2632 * sim-inline.h: Add definitions for sim-types.
2633 (ALL_BY_MODULE): New macro, encapsulate full inlining by the
2634 module.
2635
2636 Mon Mar 17 15:38:27 1997 Andrew Cagney <cagney@kremvax.cygnus.com>
2637
2638 * sim-events.h: Remove defunct reference to callback struct.
2639
2640 Mon Mar 17 15:10:07 1997 Andrew Cagney <cagney@kremvax.cygnus.com>
2641
2642 * configure: Re-generate.
2643
2644 Mon Mar 17 15:04:47 1997 Andrew Cagney <cagney@kremvax.cygnus.com>
2645
2646 * Make-common.in (CSEARCH): Do not include the gdb directory in
2647 the search path.
2648
2649 Mon Mar 17 13:16:26 1997 Andrew Cagney <cagney@kremvax.cygnus.com>
2650
2651 * Make-common.in (SIM_ENDIAN, SIM_HOSTENDIAN, SIM_INLINE,
2652 SIM_WARNING): Drop, requiring the simulator specific Makefile.in
2653 to explicitly incorporate these.
2654
2655 * aclocal.m4 (--enable-sim-alignment); New option. Strongly
2656 specify the alignment restrictions of the target architecture -
2657 without this option all alignment restrictions are accomodated.
2658 (--enable-sim-assert): New option. Conditionally compile in
2659 assertion statements.
2660 (--enable-sim-float): New option. Strongly specify the target's
2661 floating point support.
2662 (--enable-sim-hardware): New option. Specify the hardware devices
2663 included in the simulation.
2664 (--enable-sim-packages): New option. Specify the hardware
2665 packages included in the simulation.
2666 (--enable-sim-regparm): New option. Specify that parameters be
2667 passed in registers instead of on the stack.
2668 (--enable-sim-reserved-bits): New option. Specify that reserved
2669 bits within an instruction are are correctly set.
2670 (--enable-sim-smp): New option. Specify the level of SMP support
2671 to be included in the simulator.
2672 (--enable-sim-stdcall): New option. Specify an alternative
2673 function call convention.
2674 (--enable-sim-xor-endian): New option. Configure xor-endian
2675 support used by some targets to implement bi-endian support.
2676
2677 Fri Mar 14 19:51:21 1997 Andrew Cagney <cagney@kremvax.cygnus.com>
2678
2679 * aclocal.m4 (--enable-sim-hostendian): New option. Allow the
2680 host endianness to be overridden.
2681 (--enable-sim-endian): Allow the target platform's byte order
2682 to be overridden.
2683 (--enable-sim-inline): Control the inlining of common components.
2684 (--enable-sim-bswap): For compatibility, also define WITH_BSWAP.
2685 (--enable-sim-warnings): Enable additional GCC compiler checks.
2686 * Make-common.in (SIM_ENDIAN, SIM_HOSTENDIAN, SIM_INLINE,
2687 SIM_WARNINGS): Add.
2688
2689 * sim-n-core.h, sim-n-bits.h, sim-n-endian.h: Rename from
2690 sim-*-n.h so that the names are uniq on dos machines
2691 * sim-core.c, sim-bits.c, sim-endian.c: Update.
2692
2693 Thu Mar 13 12:32:42 1997 Doug Evans <dje@canuck.cygnus.com>
2694
2695 * run.c: #include "libiberty.h".
2696 (main): New locals sd,no_args,sim_argv.
2697 Run buildargv on -a option. Pass argv to sim_open, argv[0]
2698 is program name. Update call to sim_set_callbacks.
2699 Record result of sim_open, pass to other sim_foo routines.
2700
2701 Thu Mar 13 10:24:05 1997 Michael Meissner <meissner@cygnus.com>
2702
2703 * callback.c (os_printf_filtered): Do not call exit(1) or print a
2704 final newline.
2705
2706 Thu Mar 6 15:50:28 1997 Andrew Cagney <cagney@kremvax.cygnus.com>
2707
2708 * callback.c: Add os_flush_stdout and vprintf_filtered callbacks.
2709 Route stdout through buffered IO.
2710
2711 * callback.c: Add os_flush_stderr, os_write_stderr,
2712 os_evprintf_filtered functions to route error output through
2713 stderr.
2714
2715 * sim-io.h, sim-io.c (sim_io_flush_stderr, sim_io_flush_stdout):
2716 Correct return type - should be void.
2717
2718 Fri Mar 7 20:14:37 1997 Andrew Cagney <cagney@kremvax.cygnus.com>
2719
2720 * sim-basics.h: Clean up. Many macro's moved to sim-inline.h.
2721
2722 * sim-config.h: Ditto. For some options - eg WITH_DEVICES - do
2723 not provide a default value as undefined indicates disable code.
2724
2725 Thu Mar 6 15:50:28 1997 Andrew Cagney <cagney@kremvax.cygnus.com>
2726
2727 * sim-core.h, sim-core-n.h, sim-core.c: Borrow code from ppc
2728 directory.
2729 * sim-events.h, sim-events.c: Ditto.
2730 * sim-io.h, sim-io.c: Ditto.
2731
2732 Tue Mar 4 09:35:56 1997 Andrew Cagney <cagney@kremvax.cygnus.com>
2733
2734 * sim-alu.h (ALU_SUB_CA, ALU*_SUB_CA): New alu operation.
2735
2736 * sim-bits.h, sim-bits-n.h, sim-bits.c (LSMASKED*): New macro's
2737 extract the tail or least signifiant bits from an integer of the
2738 specified size.
2739
2740 * sim-bits.h, sim-bits.c: Clean up conditionally compiled #if
2741 WITH_TARGET_BITSIZE so that the compilation will fail when an
2742 unsupported bitsize value is defined.
2743
2744 (INSERTED*): Convert to functions.
2745 (EXTRACTED*): Ditto.
2746
2747 (SIGN_EXTEND, SEXT): Change to more terse name.
2748
2749 Tue Mar 4 09:35:56 1997 Andrew Cagney <cagney@kremvax.cygnus.com>
2750
2751 * sim-inline.h: Allow explicit control over which .c files will be
2752 included by their header.
2753
2754 * sim-inline.h: Allow explicit control over which .c files use the
2755 alternative - REGPARM - parameter passing mechanism.
2756
2757 * sim-inline.h, sim-inline.c: Don't attempt to include any of
2758 icache.c, idecode.c, semantics.c or support.c. Those names are
2759 not generally applicable.
2760
2761 Thu Feb 27 10:17:23 1997 Andrew Cagney <cagney@kremvax.cygnus.com>
2762
2763 * sim-bits.c, sim-bits-n.h (new): Split sim-bits.c into two parts
2764 in a fashion similar to sim-endian-n.
2765
2766 * sim-endian.h: (H_word, L_word, AL_*, VL_*): Extend to include
2767 both value and address macro's.
2768
2769 Tue Feb 25 18:51:57 1997 Andrew Cagney <cagney@kremvax.cygnus.com>
2770
2771 * sim-alu.h (ALU16_BEGIN, ALU16_SET, ...): Fill in.
2772
2773 * sim-endian.h (L_word, H_word): Replace MS2W_4, LS2W_4 with more
2774 generic L_word, H_word macro's.
2775
2776 Thu Feb 20 18:36:55 1997 Andrew Cagney <cagney@critters.cygnus.com>
2777
2778 * sim-basics.h: Borrow code from ppc directory.
2779 * sim-bits.c: Ditto.
2780 * sim-bits.h: Ditto.
2781 * sim-config.h: Ditto.
2782 * sim-endian-n.h: Ditto.
2783 * sim-endian.c: Ditto.
2784 * sim-endian.h: Ditto.
2785 * sim-inline.c: Ditto.
2786 * sim-inline.h: Ditto.
2787 * sim-types.h: Ditto.
2788
2789 Wed Feb 19 12:40:50 1997 Andrew Cagney <cagney@critters.cygnus.com>
2790
2791 * sim-alu.h (ALU_SET16, ALU_SET32, ALU_SET64, etc): Make available
2792 all the ALU size alternatives and then auto-configure a default.
2793
2794 * sim-alu.h: Copy ppc/idecode_expression.h.
2795
2796 Mon Feb 17 10:44:18 1997 Andrew Cagney <cagney@critters.cygnus.com>
2797
2798 * bits.h, bits.c (SIGN_EXTEND32, SIGN_EXTEND64): New functions,
2799 sign extend a bit within a value.
2800
2801 * sim-endian.h, sim-endian-n.h (offset_N): New functions - return
2802 a pointer into the middle of a host word.
2803 * sim-endian.h (MS2W_4, LS2W_4): Use this function.
2804
2805 Tue Feb 11 13:46:49 1997 Michael Meissner <meissner@tiktok.cygnus.com>
2806
2807 * callback.c: If HAVE_CONFIG_H is defined, include config.h from
2808 autoconf. If HAVE_UNISTD_H is defined, include unistd.h to get
2809 appropriate definitions of read, write, etc. Add prototype for
2810 system.
2811
2812 Tue Feb 4 13:24:44 1997 Doug Evans <dje@canuck.cygnus.com>
2813
2814 * Makefile.in (libcommon.a): Delete.
2815 (callback.o,targ-map.o): Delete, moved to Make-common.in.
2816 (gentmap,targ-vals.h,targ-map.c): Likewise.
2817 (run-autoconf): Delete.
2818 * aclocal.m4 (SIM_AC_OUTPUT): Redo creation of Makefile.
2819 (common makefile fragment): Moved back into ...
2820 * Make-common.in: Resurrect.
2821 * configure.in (AC_LINK_FILES): Delete, unnecessary now.
2822 * configure: Regenerated.
2823
2824 Fri Jan 31 07:16:49 1997 Doug Evans <dje@canuck.cygnus.com>
2825
2826 * aclocal.m4 (SIM_AC_COMMON): Move COMMON_MAKEFILE_FRAG from here.
2827 (SIM_AC_OUTPUT): To here.
2828
2829 Fri Jan 24 10:37:17 1997 Stu Grossman (grossman@critters.cygnus.com)
2830
2831 * aclocal.m4 (COMMON_MAKEFILE_FRAG): Quote a couple of $'s in
2832 comments and single quotes. Fixes a problem found on hpux.
2833
2834 Thu Jan 23 13:35:03 1997 Stu Grossman (grossman@critters.cygnus.com)
2835
2836 * aclocal.m4: Remove Make-common.in from dependencies.
2837 * (distclean): Remove targ-vals.def.
2838
2839 * aclocal.m4 (SIM_AC_COMMON): Move contents of Make-common.in
2840 into here. Makes insertion into makefiles easier. Also, change
2841 the way that callback.o, gentmap, targ-vals.h, targ-map.c,
2842 targ-map.o, and run are built. They are now built in the
2843 individual simulator directories, taking sources from ../common as
2844 necessary. This replaces the merging of libcommon.a into
2845 linsim.a, which was problematic for the WinGDB build process.
2846 * run.c: Include config.h from . instead of ../common.
2847 * Make-common.in: Remove. It's no longer necessary.
2848
2849 Mon Dec 16 15:02:33 1996 Ian Lance Taylor <ian@cygnus.com>
2850
2851 * Make-common.in (ALL_CLAGS): Put CFLAGS at the end.
2852 (.c.o): Put $(ALL_CFLAGS) before the file being compiled.
2853
2854 Wed Dec 11 11:30:58 1996 Jim Wilson <wilson@cygnus.com>
2855
2856 * run.c (main): Set target_byte_order before call to sim_open.
2857
2858 Sun Dec 8 18:22:06 1996 Doug Evans <dje@canuck.cygnus.com>
2859
2860 * callback.c: #include <stdlib.h>
2861 (os_error): New function.
2862 (default_callback): Add os_error.
2863
2864 Mon Nov 25 19:44:35 1996 Doug Evans <dje@canuck.cygnus.com>
2865
2866 * Make-common.in (Makefile): Set CONFIG_HEADERS="".
2867 * aclocal.m4: Mark the fact that --enable-sim-bswap isn't host
2868 specific.
2869 (SIM_AC_OUTPUT): Don't build Makefile if CONFIG_FILES="".
2870
2871 Wed Nov 20 01:11:04 1996 Doug Evans <dje@canuck.cygnus.com>
2872
2873 * run.c: #include ../common/config.h, tconfig.h.
2874 (myname): New static global.
2875 (main): Recognize new options -a, -c. Also recognize -h if h8/300.
2876 Only process -c ifdef SIM_HAVE_SIMCACHE.
2877 Only process -p/-s ifdef SIM_HAVE_PROFILE.
2878 Parse program name from argv[0] and use in error messages.
2879 Pass sim_args to sim_open. Pass prog_args to sim_create_inferior.
2880 Add support for incomplete h8/300 termination indicators.
2881 (usage): Make more verbose.
2882 * aclocal.m4,config.in,tconfig.in,configure.in,configure: New files.
2883 * Makefile.in,Make-common.in,callback.c: New files.
2884 * nltvals.def,gentmap.c,gentvals.sh: New files.
2885
2886 Tue Nov 12 13:34:00 1996 Dawn Perchik <dawn@cygnus.com>
2887
2888 * run.c: Include stdarg.h if __STDC__.
2889
2890 Tue Oct 15 11:16:31 1996 Jeffrey A Law (law@cygnus.com)
2891
2892 * run.c (main): Don't print out anything if the signal
2893 number is zero (ie no signal).
2894
2895 Tue Oct 15 11:20:44 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2896
2897 * run.c (main): Print out if the program raised a signal.
2898
2899 Wed Sep 18 09:52:14 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2900
2901 * run.c (exec_bfd): Rename from sim_bfd, to use the gdb name.
2902 (main): Ditto.
2903
2904 Tue Sep 17 11:04:50 1996 James G. Smith <jsmith@cygnus.co.uk>
2905
2906 * run.c (main): Explicitly cast malloc() parameter.
2907
2908 Thu Sep 12 11:27:21 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2909
2910 * run.c (sim_bfd): New global to hold the bfd pointer for the
2911 executable.
2912 (main): Initialize sim_bfd.
2913
2914 Fri Dec 15 16:27:49 1995 Ian Lance Taylor <ian@cygnus.com>
2915
2916 * run.c (main): Use new bfd_big_endian macro.
2917
2918 Wed Nov 8 15:49:49 1995 James G. Smith <jsmith@pasanda.cygnus.co.uk>
2919
2920 * run.c (main): Removed SH specific comments, so source is
2921 generic. Also updated to only load relevant sections. Moved
2922 sim_open() to after callback attach (to match GDB).
2923
2924 * run.1: Removed SH specific comments.
2925
2926 Sat Oct 21 12:31:01 1995 Jim Wilson <wilson@chestnut.cygnus.com>
2927
2928 * run.c (main): Always return sigrc at end.
2929
2930 Tue Oct 10 12:03:13 1995 J.T. Conklin <jtc@rtl.cygnus.com>
2931
2932 * run.c (main): Print error diagnostic and exit if bfd_openr() or
2933 bfd_check_format() fails.
2934
2935 Thu Sep 28 15:40:36 1995 steve chamberlain <sac@slash.cygnus.com>
2936
2937 * run.c, run.1: From sh directory.
2938
2939
This page took 0.098353 seconds and 5 git commands to generate.