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