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