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