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