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