]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - sim/common/ChangeLog
* compile.c (decode): Distinguish inc/dec.[wl] and adds/subs
[thirdparty/binutils-gdb.git] / sim / common / ChangeLog
CommitLineData
7fb283bc
FCE
12000-06-23 Frank Ch. Eigler <fche@redhat.com>
2
3 * cgen-trace.h (TRACE_USEFUL_MASK): Remove TRACE_EVENTS_IDX.
4
ab42ee12
FCE
52000-06-24 Frank Ch. Eigler <fche@redhat.com>
6
7 From Maciej W. Rozycki <macro@ds2.pg.gda.pl>:
8 * Makefile.in (distclean): Clean cconfig.h also.
9
eb2d80b4
AC
10Tue May 23 21:39:23 2000 Andrew Cagney <cagney@b1.cygnus.com>
11
12 * configure: Regenerated to track ../common/aclocal.m4 changes.
13
14Tue May 23 21:35:53 2000 Andrew Cagney <cagney@b1.cygnus.com>
15
16 * aclocal.m4 (sim-profile): Enable the profiler by default.
17
781c552e
AC
18Tue May 23 20:30:12 2000 Andrew Cagney <cagney@amy.cygnus.com>
19
20 * run.c (main): Initialize sigrc.
21
5eb1a8fa
AC
22Wed Apr 26 16:18:44 2000 Andrew Cagney <cagney@b1.cygnus.com>
23
24 * sim-events.c (update_time_from_event): Add more detailed event
25 tracing.
26
b2ac51e4
DB
272000-03-30 Dave Brolley <brolley@redhat.com>
28
29 * aclocal.m4 (cgen): Use guile to run cgen.
30
f8603f2f
DB
312000-03-23 Dave Brolley <brolley@redhat.com>
32
33 * cgen-fpu.h: Rename extsfdf to fextsfdf. Rename truncdfsf to
34 ftruncdfsf.
35 * cgen-accfp.c (fextsfdf): New function.
36 (ftruncdfsf): New function.
37 (cgen_init_accurate_fpu): Initialize fextsfdf and ftruncdfsf.
38
0f831eb3
JJ
392000-03-13 Jeff Johnston <jjohnstn@cygnus.com>
40
41 * cgen-ops.h: Added TRUNCSISI.
42
e88acae7
FCE
432000-03-08 Dave Brolley <brolley@redhat.com>
44
45 * cgen-par.h (cgen_write_queue_kind): Add CGEN_FN_SF_WRITE.
46 (CGEN_WRITE_QUEUE_ELEMENT): Add fn_sf_write.
47 (sim_queue_fn_si_write): Last argument is has type USI.
48 (sim_queue_fn_sf_write): New function.
49 * cgen-par.c (sim_queue_fn_si_write): Declare 'value' as USI.
50 (sim_queue_fn_sf_write): New function.
51 (cgen_write_queue_element_execute): Handle CGEN_FN_SF_WRITE.
52
baa7ae6f
AC
53Tue Feb 22 16:45:09 2000 Andrew Cagney <cagney@b1.cygnus.com>
54
55 * run.c (main): When SIM_HAVE_ENVIRONMENT enable tracing with
56 sim_set_trace and run simulator using sim_resume.
57 (main): Add option ``-o'' - operating environment. Only continue
58 after a signal when operating environment.
59 (main): Always set REASON and SIGRC using sim_stop_reason.
60 (sim_trace): Delete extern declaration.
61
6d358e86
NC
622000-02-08 Nick Clifton <nickc@cygnus.com>
63
64 * callback.c: Fix compile time warning messages.
65 * run.c: Fix compile time warning messages.
66
ed9a39eb
JM
671999-12-17 Dave Brolley <brolley@cygnus.com>
68
69 * sim-profile.h: (set_profile_option_mask): Add prototype.
70 * sim-profile.c (set_profile_option_mask): No longer static.
71
c4093a6a
JM
72Wed Dec 8 21:47:13 1999 Andrew Cagney <cagney@b1.cygnus.com>
73
74 * sim-arange.c: Include <string.h>
75
de57eccd
JM
761999-12-07 Dave Brolley <brolley@cygnus.com>
77
c4093a6a 78 * sim-options.c (print_help): '=' required before optional argument.
de57eccd
JM
79 * cgen-par.h (CGEN_FN_MEM_QI_WRITE): New enumerator.
80 (CGEN_FN_MEM_HI_WRITE): New enumerator.
81 (CGEN_FN_MEM_SI_WRITE): New enumerator.
82 (CGEN_FN_MEM_DI_WRITE): New enumerator.
83 (CGEN_FN_MEM_DF_WRITE): New enumerator.
84 (CGEN_FN_MEM_XI_WRITE): New enumerator.
85 (fn_mem_qi_write): New union members.
86 (fn_mem_hi_write): New union members.
87 (fn_mem_si_write): New union members.
88 (fn_mem_di_write): New union members.
89 (fn_mem_df_write): New union members.
90 (fn_mem_xi_write): New union members.
91 (sim_queue_fn_mem_qi_write): New function.
92 (sim_queue_fn_mem_hi_write): New function.
93 (sim_queue_fn_mem_si_write): New function.
94 (sim_queue_fn_mem_di_write): New function.
95 (sim_queue_fn_mem_df_write): New function.
96 (sim_queue_fn_mem_xi_write): New function.
97 * cgen-par.c (sim_queue_fn_mem_qi_write): New function.
98 (sim_queue_fn_mem_hi_write): New function.
99 (sim_queue_fn_mem_si_write): New function.
100 (sim_queue_fn_mem_di_write): New function.
101 (sim_queue_fn_mem_df_write): New function.
102 (sim_queue_fn_mem_xi_write): New function.
103 (cgen_write_queue_element_execute): Handle CGEN_FN_MEM_QI_WRITE,
104 CGEN_FN_MEM_HI_WRITE, CGEN_FN_MEM_SI_WRITE, CGEN_FN_MEM_DI_WRITE,
105 CGEN_FN_MEM_DF_WRITE, CGEN_FN_MEM_XI_WRITE.
106
c2d11a7d
JM
1071999-12-01 Dave Brolley <brolley@cygnus.com>
108
109 * cgen-accfp.c (subsf): Check status code.
110 (mulsf): Ditto.
111 (negsf): Ditto.
112 (abssf): Ditto.
113 (sqrtsf): Ditto.
114 (invsf): Ditto.
115 (minsf): Ditto.
116 (maxsf): Ditto.
117 (subdf): Ditto.
118 (muldf): Ditto.
119 (divdf): Ditto.
120 (negdf): Ditto.
121 (absdf): Ditto.
122 (sqrtdf): Ditto.
123 (invdf): Ditto.
124 (mindf): Ditto.
125 (maxdf): Ditto.
126
1271999-11-26 Dave Brolley <brolley@cygnus.com>
128
129 * cgen-par.h (fn_df_write): Mode of data is DF.
130 (sim_queue_fn_df_write): Mode of data is DF.
131 * cgen-par.c (sim_queue_fn_df_write): Mode of data is DF.
132
1331999-11-22 Dave Brolley <brolley@cygnus.com>
134
135 * cgen-trace.c (SIZE_TRACE_BUF): Inxrease size of trace buffer.
136 * cgen-par.h (CGEN_WRITE_QUEUE_SIZE): Increase size of queue.
137
11cf8741
JM
1381999-11-04 Dave Brolley <brolley@cygnus.com>
139
140 * cgen-par.h (cgen_write_queue_kind): Add CGEN_FN_XI_WRITE and
141 CGEN_MEM_XI_WRITE members.
142 (CGEN_WRITE_QUEUE_ELEMENT): Add fn_xi_write and mem_xi_write members.
143 (sim_queue_fn_xi_write): New function.
144 (sim_queue_mem_xi_write): New function.
145
146 * cgen-par.c (sim_queue_fn_xi_write): New function.
147 (sim_queue_mem_xi_write): New function.
148 (cgen_write_queue_element_execute): Handle CGEN_FN_XI_WRITE and
149 CGEN_MEM_XI_WRITE.
150
e514a9d6
JM
1511999-10-22 Dave Brolley <brolley@cygnus.com>
152
153 * cgen-par.h (insn_address): New field in CGEN_WRITE_QUEUE_ELEMENT.
154 (CGEN_WRITE_QUEUE_ELEMENT_IADDR): New macro.
155 * cgen-par.c: Set insn_address for each queued write. Get pc from
156 cpu when executing queued writes.
157
1581999-10-19 Dave Brolley <brolley@cygnus.com>
159
160 * cgen-par.h (sim_queue_fn_pc_write): New function.
161 (CGEN_FN_PC_WRITE): New enumerator.
162 (fn_pc_write): New union member.
163 * cgen-par.c (sim_queue_fn_pc_write): New function.
164 (cgen_write_queue_element_execute): Handle CGEN_FN_PC_WRITE.
165
917317f4
JM
1661999-10-18 Dave Brolley <brolley@cygnus.com>
167
168 * cgen-par.h (CGEN_MEM_DI_WRITE): New enumerator.
169 (CGEN_MEM_DF_WRITE): New enumerator.
170 (mem_di_write): New union member.
171 (mem_df_write): New union member.
172 * cgen-par.c (sim_queue_mem_di_write): New function.
173 (sim_queue_mem_df_write): New function.
174 (cgen_write_queue_element_execute): Handle CGEN_MEM_DI_WRITE and
175 CGEN_MEM_DF_WRITE.
176 * cgen-accfp.c (divsf): Check for division errors.
177
1781999-10-14 Doug Evans <devans@casey.cygnus.com>
179
180 * cgen-engine.h (EXTRACT_INT,EXTRACT_UINT): Delete.
181
2df3850c
JM
1821999-10-07 Dave Brolley <brolley@cygnus.com>
183
184 * cgen-par.h (CGEN_FN_HI_WRITE): New enumerator.
185 (fn_hi_write): New union member.
186 (sim_queue_fn_hi_write): New function.
187 * cgen-par.c (sim_queue_fn_hi_write): New function.
188 (cgen_write_queue_element_execute): Handle CGEN_FN_HI_WRITE.
189
2acceee2
JM
1901999-09-29 Doug Evans <devans@casey.cygnus.com>
191
192 * cgen-defs.h (sim_engine_invalid_insn): New arg `vpc'.
193 Change type of result to SEM_PC.
194
195Wed Sep 29 14:43:57 1999 Dave Brolley <brolley@cygnus.com>
196
197 * cgen-defs.h (sim_engine_invalid_insn): Now returns PC.
198
6426a772
JM
1991999-09-25 Doug Evans <devans@casey.cygnus.com>
200
201 * cgen-ops.h (SUBWORD*): Delete cpu arg.
202 (JOIN*): Delete cpu arg.
203
204Tue Sep 21 17:14:16 1999 Dave Brolley <brolley@cygnus.com>
205
206 * genmloop.sh (@cpu@_scache_lookup): No longer takes last_insn_p
207 parameter.
208 (SET_LAST_INSN_P): Set last_insn_p flag in the scache element.
209
c2c6d25f
JM
210Mon Sep 20 21:44:06 1999 Geoffrey Keating <geoffk@cygnus.com>
211
212 * sim-fpu.c (i2fpu): Keep the guard bits sticky when converting
213 large values.
214
7fc5b5ad
AC
215Tue Feb 8 16:33:48 2000 Andrew Cagney <cagney@b1.cygnus.com>
216
217 * run.c (main): Check the sim_stop_reason and only halt simulation
218 when a valid stop condition is identified.
219
c2c6d25f
JM
220Wed Sep 15 14:12:37 1999 Andrew Cagney <cagney@b1.cygnus.com>
221
222 * hw-tree.c, hw-properties.c, hw-instances.c: Include "sim-io.h".
223
224Tue Sep 14 14:15:47 1999 Dave Brolley <brolley@cygnus.com>
225
226 * cgen-par.h (CGEN_BI_WRITE): New enumerator.
227 (bi_write): New union element.
228 (sim_queue_bi_write): New function.
229 * cgen-par.c (sim_queue_bi_write): New function.
230 (cgen_write_queue_element_execute): Handle CGEN_BI_WRITE.
231
d4f3574e
SS
232Thu Sep 2 18:15:53 1999 Andrew Cagney <cagney@b1.cygnus.com>
233
234 * configure: Regenerated to track ../common/aclocal.m4 changes.
235
236 * aclocal.m4 (WERROR_CFLAGS, WARN_CFLAGS): Merge from
237 ../gdb/configure.in.
238 * Make-common.in (WERROR_CFLAGS, WARN_CFLAGS): Define.
239 (SIM_WERROR_CFLAGS, SIM_WARN_CFLAGS): Define.
240 (SIM_WARNINGS): Delete
241 (CONFIG_CFLAGS): Update.
242
243Tue Aug 31 16:01:42 1999 Dave Brolley <brolley@cygnus.com>
244
245 * cgen-par.c: New file.
246 * cgen-par.h: New file.
247 * cgen-sim.h (cgen-par.h): #include it.
248 * cgen-cpu.h (write_queue): New field.
249 (CPU_WRITE_QUEUE): New access macro.
250 * Make-common.in (CGEN_MAIN_CPU_DEPS): Add cgen-par.h.
251 (cgen-par.o): New target.
252
104c1213
JM
2531999-08-28 Doug Evans <devans@casey.cygnus.com>
254
255 * cgen-types.h (mode_type,MODE_VOID): Renamed from MODE_VM.
256 * cgen-utils.c (mode_names): Update.
257
53a5351d
JM
2581999-08-20 Doug Evans <devans@casey.cygnus.com>
259
260 * genmloop.sh: New args -parallel-generic-write, -parallel-only.
261 * cgen-engine.h (SEMANTIC_FN): Don't use version with PAREXEC
262 buffer arg if WITH_PARALLEL_GENWRITE.
263 (struct insn_sem): Handle WITH_PARALLEL_GENWRITE.
264 (struct idesc): Ditto.
265
266Wed Aug 18 18:17:28 1999 Doug Evans <devans@canuck.cygnus.com>
267
268 * sim-model.c (model_option_handler): Add \n to error message.
269
96baa820
JM
2701999-08-08 Doug Evans <devans@casey.cygnus.com>
271
272 * cgen-engine.h (SEM_FN_NAME,SEMF_FN_NAME): Delete.
273 (insn_sem): Rewrite.
274 (sem_fn_desc): New struct.
275 (idesc): Rewrite.
276 * genmloop.sh (scache case,@cpu@_scache_lookup): Profile scache hit,
277 misses if ! FAST_P.
278 (scache case): Split into non-parallel/parallel versions.
279 (@cpu@_engine_run_{full,fast}): Call @cpu@_{sem,semf}_init_idesc_table
280 if not use semantic switch version.
281
2821999-08-04 Doug Evans <devans@casey.cygnus.com>
283
284 * cgen-defs.h (SEM_BRANCH_TYPE): New enum.
285 * cgen-engine.h (SEM_BRANCH_UNTAKEN,SEM_BRANCH_UNCACHEABLE): Delete.
286 (SEM_BRANCH_INIT_EXTRACT): Delete.
287 (SEM_BRANCH_INIT): Replace npc_ptr with br_type.
288 (SEM_BRANCH_FINI): Ditto.
289 (SEM_BRANCH_VIA_ADDR): Ditto.
290 (SEM_BRANCH_VIA_CACHE): Ditto. Delete cachvarptr arg.
291 (SEM_BRANCH_ADDR_CACHE): Delete.
292 (SEM_SKIP_COMPILE,SEM_SKIP_INSN): New macros.
293 * cgen-scache.h (cpu_scache): Replace member pbb_pr_npc_ptr with
294 pbb_br_type.
295 * genmloop.sh (eng.hin): Update prototype of ${cpu}_pbb_cti_chain.
296 (@cpu@_pbb_begin): Initialize branch_target.
297 (@cpu@_pbb_cti_chain): Replace arg new_vpc_ptr with br_type.
298 (@cpu@_engine_run_full): Replace local pbb_br_npc_ptr with
299 pbb_br_type.
300 (@cpu@_engine_run_fast): Ditto.
301
adf40b2e
JM
302Fri Jul 16 14:47:53 1999 Dave Brolley <brolley@cygnus.com>
303
304 * cgen-utils.c (RORSI): New function.
305 (ROLSI): New function.
306
3071999-07-14 Doug Evans <devans@casey.cygnus.com>
308
309 * Makefile.in (TAGS): Tweak TAGS regex.
310 * cgen-mem.h (*): Add TAGS markers.
311
43e526b9
JM
312Sun Jul 11 23:47:20 1999 Andrew Cagney <cagney@b1.cygnus.com>
313
314 * sim-resume.c (sim_resume): Ensure that the siggnal [sic] is only
315 passed in when sim_resume is first entered - don't re-pass it
316 after a restart.
317
318Sun Jul 11 23:34:44 1999 Andrew Cagney <cagney@b1.cygnus.com>
319
320 * sim-options.c (standard_option_handler): Add OPTION_LOAD_VMA and
321 OPTION_LOAD_LMA but only when is defined.
322 (standard_options): When SIM_HANDLES_LMA is defined include
323 options --load-lma and --load-vma.
324 (standard_install): Initialize STATE_LOAD_AT_LMA_P.
325
326 * sim-base.h (STATE_LOAD_AT_LMA_P): Define.
327 (struct sim_state_base): Add load_at_lma_p.
328 * sim-hload.c (sim_load): Replace SIM_HANDLES_LMA with
329 STATE_LOAD_AT_LMA_P.
330
331Sun Jul 11 12:03:36 1999 Andrew Cagney <cagney@b1.cygnus.com>
332
333 * nrun.c (main): Re-format loop gnu style.
334
9846de1b
JM
335Wed Jul 7 19:56:03 1999 Andrew Cagney <cagney@b1.cygnus.com>
336
337 * dv-sockser.c (connected_p): Initialize addrlen.
338
3391999-07-06 Dave Brolley <brolley@cygnus.com>
340
341 * cgen-accfp.c (floatsidf): New function.
342 (fixdfsi): New function.
343
3441999-07-06 Doug Evans <devans@casey.cygnus.com>
345
346 * sim-model.c (sim_model_init): Issue error if machine is unsupported.
347
43ff13b4
JM
3481999-07-05 Doug Evans <devans@casey.cygnus.com>
349
350 * Make-common.in (CGEN_MAIN_CPU_DEPS): Add cgen-fpu.h.
351 (cgen-fpu.o,cgen-accfp.o): Add rules for.
352 * cgen-fpu.c: New file.
353 * cgen-fpu.h: New file.
354 * cgen-accfp.c: New file.
355 * cgen-cpu.h (CGEN_CPU): New member fpu.
356 * cgen-mem.h: Redo fp support.
357 * cgen-ops.h: Delete k&r support. Redo fp support.
358 * cgen-sim.h: Include cgen-fpu.h.
359 * cgen-types.h (SF,DF,XF,TF): Moved to cgen-fpu.h.
360
085dd6e6
JM
3611999-06-23 Doug Evans <devans@casey.cygnus.com>
362
363 * cgen-engine.h (TARGET_SEM_BRANCH_FINI): Remove cruft at end of
364 ifndef.
365 * genmloop.sh (@cpu@_scache_lookup): Delete unused local var.
366 (@cpu@_pbb_cti_chain): Minor clean up.
367
cd0fc7c3
SS
3681999-05-08 Felix Lee <flee@cygnus.com>
369
370 * aclocal.m4: Use AC_EXEEXT instead of AM_EXEEXT. Delete defn of
371 AM_CYGWIN32 and AM_EXEEXT.
372 * configure: Regenerate.
373
7a292a7a
SS
374Fri Apr 16 16:43:22 1999 Doug Evans <devans@charmed.cygnus.com>
375
376 * sim-core.c (device_error,device_io_read_buffer,
377 device_io_write_buffer): Delete decls.
378 * sim-core.h: Put them here.
379
380 * sim-core.c (sim_core_read_buffer): Pass sd to device_io_read_buffer.
381 (sim_core_write_buffer): Pass sd to device_io_write_buffer.
382 * sim-n-core.h (sim_core_read_aligned_N): Ditto.
383 (sim_core_write_aligned_N): Ditto.
384
3851999-04-14 Stephane Carrez <stcarrez@worldnet.fr>
386
387 * sim-memopt.c (sim_memory_uninstall): Don't look into
388 free()d memory.
389
3901999-04-14 Doug Evans <devans@casey.cygnus.com>
391
392 * cgen-utils.scm (virtual_insn_entries): Update attribute definition.
393
3941999-04-13 Doug Evans <devans@casey.cygnus.com>
395
396 * sim-core.c (sim_core_read_buffer): Handle NULL cpu when WITH_DEVICES.
397 (sim_core_write_buffer): Ditto.
398
3991999-04-02 Keith Seitz <keiths@cygnus.com>
400
401 * sim-io.c (sim_io_poll_quit): Only call the poll_quit callback
402 after the interval counter has expired.
403 (POLL_QUIT_INTERVAL): Define. Used to tweak the frequency of
404 poll_quit callbacks. May be overridden by Makefile.
405 (poll_quit_counter): New global.
406 * sim-events.c: Remove all mentions of ui_loop_hook. The
407 host callback "poll_quit" will serve the purpose.
408 * run.c: Add definition of ui_loop_hook when NEED_UI_LOOP_HOOK
409 is defined.
410 * nrun.c: Remove declaration of ui_loop_hook.
411
412Wed Mar 31 18:55:41 1999 Doug Evans <devans@canuck.cygnus.com>
413
414 * cgen-run.c (sim_resume): Don't tell main loop to run "forever"
415 if being used by gdb.
416
4171999-03-22 Doug Evans <devans@casey.cygnus.com>
418
419 * cgen-types.h (XF,TF): Tweak.
420 * cgen-ops.h: Redo inline support. Delete DI_FN_SUPPORT,
421 in cgen-types.h.
422 (SUBWORD*,JOIN*): Define.
423 * cgen-trace.c (sim_cgen_disassemble_insn): Update, base_insn_bitsize
424 moved into cpu descriptor.
425 * sim-model.h (MACH): New member `num'.
426
c906108c
SS
4271999-02-09 Doug Evans <devans@casey.cygnus.com>
428
c906108c
SS
429 * cgen-cpu.h (CGEN_DISASSEMBLER): New type.
430 (CGEN_CPU): Member opcode renamed to cpu_desc.
431 New members get_idata,disassembler.
432 * cgen-defs.h (CGEN_INSN_VIRTUAL_P): CGEN_INSN_ATTR renamed to
433 CGEN_INSN_ATTR_VALUE.
434 (CGEN_STATE): Delete member opcode_table.
435 (sim_disassemble_insn): Delete decl.
436 * cgen-engine.h (struct insn_sem): Moved to here from <cpu>-decode.c.
437 (struct idesc): Moved to here from <cpu>-decode.h.
438 * cgen-run.c (prime_cpu): Call prepare_run callback.
439 * cgen-trace.h (SFILE): New type.
440 (sim_disasm_sprintf): Declare.
441 (sim_disasm_read_memory,sim_disasm_perror_memory): Declare.
442 (sim_cgen_disassemble_insn): Declare.
443 * cgen-trace.c: Include errno.h,dis-asm.h. Don't include cpu-opc.h.
444 (insn_fields): Delete.
445 (trace_insn_fini): STATE_OPCODE_TABLE (sd) replaced with
446 CPU_CPU_DESC (cpu).
447 (trace_insn): Call CPU_DISASSEMBLER hook.
448 (sim_disasm_sprintf): New function.
449 (sim_disasm_read_memory): New function.
450 (sim_disasm_perror_memory): New function.
451 (sim_cgen_disassemble_insn): New function.
452 * cgen-utils.c: Don't include cpu-opc.h.
453 (virtual_insn_entries): New static local.
454 (cgen_virtual_insn_table): Renamed from cgen_virtual_opcode_table.
455 (cgen_insn_name): Rewrite.
456 (disasm_sprintf,sim_disassemble_insn): Moved to cgen-trace.c.
457 * cgen.sh (desc): New file generator handler.
458 * genmloop.sh: -parallel changed to -parallel-read/-parallel-write.
459 Define WITH_PARALLEL_READ/WITH_PARALLEL_WRITE appropriately.
460 Don't include cpu-opc.h,cpu-sim.h.
461 * sim-model.c (model_set): Delete SIM_DESC arg.
462 (sim_model_set): Update.
463 * sim-model.h (MACH): New member prepare_run.
464
4651999-01-28 Frank Ch. Eigler <fche@cygnus.com>
466
467 * sim-memopt.c (memory_option_handler): Avoid memset() calls
468 if redundant with allocator functions.
469
470Wed Jan 27 17:19:09 1999 Doug Evans <devans@canuck.cygnus.com>
471
472 * cgen-engine.h (EXTRACT_LSB0_{INT,UINT}): Fix.
473
474 * sim-profile.h: Make like sim-trace.h.
475 (PROFILE_USEFUL_MASK): New macro.
476 * sim-profile.c (profile_options): Make like trace_options, allow
477 optional on|off arg where applicable.
478 (set_profile_option_mask): New function.
479 (sim_profile_set_option): New function.
480 (profile_option_handler): Simplify.
481 Have -p only enable selected things, not everything.
482 Add missing break to OPTION_PROFILE_PC_RANGE.
483 * cgen-scache.c (scache_options): Allow optional on|off arg to
484 --profile-scache.
485 (scache_option_handler): Use sim_profile_set_option.
486
4871999-01-26 Frank Ch. Eigler <fche@cygnus.com>
488
489 * sim-memopt.c (memory_options): Add MEMORY_FILL option.
490 (memory_option_handler): Implement MEMORY_FILL option. Make
491 MEMORY_CLEAR an alias for MEMORY_FILL=0.
492 (parse_ulong_value): New function.
493 (do_memopt_add): Allocate all buffers. Optionally fill them.
494
4951999-01-15 Richard Henderson <rth@cygnus.com>
496
497 * hw-events.c (hw_event_queue_schedule): _vtracef takes a
498 va_list, not an integer.
499 * sim-events.c (sim_events_schedule): Likewise.
500
501 * sim-types.h (UNSIGNED32, UNSIGNED64): Properly cast to
502 the appropriate type.
503
5041999-01-14 Doug Evans <devans@casey.cygnus.com>
505
506 * cgen-defs.h (PCADDR,CIA): Define in terms of IADDR.
507 (sim_disassemble_insn): Update prototype.
508 (sim_engine_invalid_insn): Ditto.
509 * cgen-engine.h (SEMANTIC_FN): Add !WITH_SCACHE version.
510 (SEM_BRANCH_INIT): PCADDR->IADDR.
511 (SEM_NBRANCH_FINI): New macro for !WITH_SCACHE case.
512 * cgen-scache.c (scache_lookup,scache_lookup_or_alloc): PCADDR->IADDR.
513 * cgen-scache.h (*): Ditto.
514 * cgen-trace.c (*): Ditto.
515 * cgen-trace.h (*): Ditto.
516 * cgen-utils.c (*): Ditto.
517 * cgen-types.h (integer modes): Use signedNN/unsignedNN types.
518 (insn_t): Delete.
519 * genmloop.sh (@cpu@_fill_argbuf): Add !WITH_SCACHE support.
520 (simple engine framework): Rewrite.
521 * sim-module.c (modules): Install model module sooner (and in
522 particular before the profile module).
523
5241999-01-12 Doug Evans <devans@casey.cygnus.com>
525
526 * sim-model.h (sim_mach_lookup_bfd_name): Add prototype.
527 * sim-model.c (sim_mach_lookup_bfd_name): New function.
528 (sim_model_init): Call it.
529
530 * cgen-trace.c (trace_insn): Pass pc to trace_prefix for virtual insns.
531
5321999-01-05 Doug Evans <devans@casey.cygnus.com>
533
534 * Make-common.in (CGEN_INCLUDE_DEPS): Add cgen-defs.h, cgen-engine.h.
c906108c
SS
535 * cgen-engine.h (SEM_BRANCH_FINI): New arg pcvar, all uses updated.
536 (SEM_BRANCH_INIT_EXTRACT): New macro.
537 (SEM_BRANCH_INIT): Add taken_p.
538 (TARGET_SEM_BRANCH_FINI): Provide default definition.
539 (SEM_BRANCH_FINI): Use it.
540 (SEM_INSN): Update.
541 * cgen-run.c (sim_resume): Handle tracing of last insn.
542 * cgen-scache.h (WITH_SCACHE): Define as 0 if not defined.
543 * cgen-trace.c (current_abuf): New static global.
544 (trace_insn_init): Initialize it.
545 (trace_insn_fini): Use it.
546 (trace_insn): Set it.
547 * cgen.sh (arch case): Pass -m ${mach} to cgen.
548 * genmloop.sh (@cpu@_emit_before): Only define if WITH_SCACHE_PBB.
549 (@cpu@_emit_after): Ditto.
550 (simple @cpu@_engine_run_full): New local `pc'. Initialize semantic
551 labels if WITH_SEM_SWITCH_FULL.
552 * sim-model.c: Include bfd.h.
553 (sim_model_init): New function.
554 (sim_model_install): Record init fn.
555 * sim-model.h (MACH): New member bfd_name.
556 * sim-module.c (modules): Initialize model before scache.
557
5581998-12-24 Frank Ch. Eigler <fche@cygnus.com>
559
560 * dv-sockser.c (DEFAULT_TIMEOUT): Increase to 1 ms.
561
562 * nrun.c (main): Remain in simulation loop for traps and
563 exceptions when in operating environment mode.
564 (ui_loop_hook): New stub hook for standalone use.
565 * sim-events.c (sim_events_process): Call ui_loop_hook
566 periodically on CYGWIN host.
567
568 * sim-reason.c (sim_stop_reason): Return host signal numbers
569 to gdb on sim_stopped and sim_signalled cases.
570 * sim-engine.c (sim_engine_halt): Call SIM_CPU_EXCEPTION_SUSPEND
571 hook just before longjmp.
572 * sim-resume.c (sim_resume): Call SIM_CPU_EXCEPTION_RESUME
573 hook just before sim_engine_run.
574
575 * sim-n-core.h (sim_core_trace_M): Allay const warning.
576 * sim-trace.h (trace_generic): Ditto.
577 * sim-trace.c (trace_generic): Ditto.
578
5791998-12-14 Doug Evans <devans@casey.cygnus.com>
580
581 * Make-common.in (SIM_MAIN_DEPS): New var.
582 (CGEN_MAIN_CPU_DEPS): New var.
583 * aclocal.m4: Add --enable-cgen-maint option.
584 * cgen-mem.h (GETMEM*): New arg `pc'. Pass to sim_core routine.
585 (SETMEM*): Ditto.
586 (GETIMEM*): Pass pc value to sim_core routine.
587
588Fri Dec 11 16:58:36 1998 Andrew Cagney <cagney@b1.cygnus.com>
589
590 * hw-handles.c (hw_handle_add_ihandle, hw_handle_add_phandle):
591 Compare with ZERO not NULL.
592
593Thu Dec 10 14:14:39 1998 Andrew Cagney <cagney@b1.cygnus.com>
594
595 * hw-properties.c, hw-instances.c, hw-tree.c: Include
596 "sim-assert.h".
597
5981998-12-09 Doug Evans <devans@casey.cygnus.com>
599
600 * sim-arange.c: Include libiberty.h, and stdlib.h if present.
601 * sim-trace.c: Include stdlib.h if present.
602 * dv-sockser.c: Include unistd.h if present.
603 (dv_sockser_init): Add missing arg to call to sim_io_eprintf.
604 * cgen-scache.c (scache_flush): Delete unused locals i,sc.
605
6061998-12-08 James E Wilson <wilson@wilson-pc.cygnus.com>
607
608 * gennltvals.sh: Add i960.
609 * nltvals.def: Rebuild.
610
6111998-12-04 Doug Evans <devans@casey.cygnus.com>
612
613 * cgen-defs.h: New file, old cgen-sim.h.
614 * cgen-sim.h: Simple header that includes others.
615 * sim-arange.c: New file.
616 * sim-arange.h: New file.
617 * sim-basics.h: Include it.
618 * Make-common.in (SIM_NEW_COMMON_OBJS): Add sim-arange.o.
619 (sim-arange.o): Add rule for.
620 * sim-cpu.h (sim_cpu_msg_prefix): Add prototype.
621 (sim_io_eprintf_cpu): Add prototype.
622 * sim-inline.h (HAVE_INLINE): Define if GNUC.
623 (INLINE2): New macro.
624 (EXTERN_INLINE): New macro.
625 * sim-module.c (sim_post_argv_init): Initialize cpu backlink
626 before calling module init fns.
627 * sim-profile.c (OPTION_PROFILE_*): Move into enum.
628 (profile_init): New function.
629 (profile_options): New option --profile-range.
630 (profile_option_handler): Handle --profile-range.
631 (profile_print_insn): Qualify address range specific section titles.
632 (profile_print_addr_ranges): New function.
633 (profile_info): Print address ranges if specified.
634 (profile_install): Set profile_init init fn.
635 * sim-profile.h (PROFILE_DATA): New member `range'.
636 * sim-trace.c (trace_init): New function.
637 (trace_options): New option --trace-range.
638 (trace_option_handler): Handle --trace-range.
639 (trace_install): Set trace_init init fn.
640 * sim-trace.h (TRACE_DATA): New member `range'.
641 * sim-utils.c (sim_cpu_msg_prefix): New function.
642 (sim_io_eprintf_cpu): New function.
643 * cgen-engine.h (PC_IN_TRACE_RANGE_P): New macro.
644 (PC_IN_PROFILE_RANGE_P): New macro.
645 * cgen-trace.c (trace_insn_init): Set current_insn to NULL.
646 (trace_insn_fini): New arg abuf. All callers updated.
647 Exit early if trace_insn not called. Check ARGBUF_PROFILE_P before
648 printing cycle counts.
649 * cgen-trace.h (trace_insn_fini): Update prototype.
650 (TRACE_RESULT_P): New macro.
651 (TRACE_INSN_INIT,TRACE_INSN_FINI): New arg abuf. All callers updated.
652 (TRACE_INSN): Check ARGBUF_TRACE_P.
653 (TRACE_EXTRACT,TRACE_RESULT): New arg abuf. All callers updated.
654 * cgen-types.h (SIM_INLINE): Delete.
655 (SIM_HAVE_MODEL,SIM_HAVE_ADDR_RANGE): Define.
656 * cgen-utils.c: Don't include cgen-engine.h
657 * genmloop.sh (@cpu@_fill_argbuf): New function.
658 (@cpu@_fill_argbuf_tp): New function.
659 (@cpu@_emit_before,@cpu@_emit_after): New functions.
660 (@cpu@_pbb_begin): Prefix cti_sc,insn_count with '_'.
661 (SET_CTI_VPC,SET_INSN_COUNT): Update.
662 (@cpu@_pbb_before): Check ARGBUF_PROFILE_P before calling
663 doing profiling. Update call to TRACE_INSN_INIT,TRACE_INSN_FINI.
664 (@cpu@_pbb_after): Check ARGBUF_PROFILE_P before calling
665 doing profiling. Update call to TRACE_INSN_FINI.
666
667 * sim-memopt.c (sim_memory_uninstall): Result type is `void'.
668
6691998-12-03 Frank Ch. Eigler <fche@cygnus.com>
670
671 * sim-memopt.c (sim_memory_uninstall): Deallocate all memory
672 regions.
673
6741998-12-01 Doug Evans <devans@casey.cygnus.com>
675
676 * sim-inline.c (SIM_INLINE_P): Fix typo.
677
6781998-11-30 Doug Evans <devans@casey.cygnus.com>
679
680 * cgen-utils.c (cgen_virtual_opcode_table): Update.
681
682Tue Nov 24 18:40:03 1998 Andrew Cagney <cagney@b1.cygnus.com>
683
684 * gennltvals.sh: Add v850 and d10v. Sort alphabetically.
685 * nltvals.def: Re-generate.
686
687Mon Nov 23 13:28:38 1998 Andrew Cagney <cagney@b1.cygnus.com>
688
689 * sim-core.c (reverse_n, sim_core_uninstall, sim_core_init,
690 sim_core_map_attach, sim_core_map_detach, next_event_queue,
691 new_sim_core_mapping): Only define when EXTERN_SIM_CORE_P, pacify
692 GCC.
693 * sim-events.c (sim_events_uninstall, sim_events_suspend,
694 sim_events_resume, sim_events_zalloc, insert_sim_event): Ditto.
695
6961998-11-22 Doug Evans <devans@tobor.to.cygnus.com>
697
698 * genmloop.sh (${cpu}_pbb_chain): Watch for Ctrl-C's.
699 (${cpu}_pbb_cti_chain): Ditto.
700
7011998-11-18 Doug Evans <devans@casey.cygnus.com>
702
703 * Make-common.in (cgen-utils.o): Depend on cgen-engine.h.
c906108c
SS
704 * cgen-engine.h (EXTRACT_[ML]SB0_{INT,UINT}): New macros.
705 (EXTRACT_INT,EXTRACT_UINT): New macros.
706 (SEM_SEM_ARG): New macro.
707 (SEM_NEXT_VPC): New arg `pc'.
708 * cgen-sim.h (EXTRACT_SIGNED,EXTRACT_UNSIGNED): Delete.
709 (sim_disassemble_insn): Update prototype.
710 * cgen-trace.c (current_insn,insn_fields): New static locals.
711 (trace_insn): Set them.
b83266a0 712 * cgen-utils.c: #include cgen-engine.h.
c906108c
SS
713 (sim_disassemble_insn): New arg insn_fields.
714 Handle variable length insns.
715 * genmloop.sh: Only emit pbb decls if -pbb.
716 (${cpu}_scache_lookup): New arg `vpc'.
717 (scache support): Fetch pc before entering loop.
718
719 * gennltvals.sh: Add fr30 support.
720 * nltvals.def: Rebuild.
721
722Wed Nov 18 10:22:22 1998 Andrew Cagney <cagney@b1.cygnus.com>
723
724 * sim-types.h: Re-do type system so that GCC's attribute and mode
725 are used to specify types. Handle case of ALPHA.
726
7271998-11-13 Frank Ch. Eigler <fche@elastic.org>
728
729 * aclocal.m4: Add tests for dlopen family.
730 * config.in: Regenerated.
731
732Wed Nov 11 14:02:25 1998 Doug Evans <devans@canuck.cygnus.com>
733
734 * sim-hload.c (sim_load): Pass `prog_name' to sim_load_file, not NULL.
735
736Wed Nov 4 23:51:19 1998 Doug Evans <devans@seba.cygnus.com>
737
738 * genmloop.sh (eng.hin): Rename HAVE_PARALLEL_EXEC to
739 HAVE_PARALLEL_INSNS, define as 0 or 1. Emit decls of fns in mloop.cin.
740 * cgen-engine.h: Typedefs of IADDR,CIA,SEM_ARG,SEM_PC moved ...
741 * cgen-sim.h: ... to here.
742
743Wed Oct 28 12:00:57 1998 Andrew Cagney <cagney@b1.cygnus.com>
744
745 * aclocal.m4 (enable-build-warnings): Replace
746 enable-sim-warnings. Extend =LIST syntax so that prepend and
747 append of options is possible. Drop -Werror, add
748 -Wstrict-prototypes for GDB compatibility.
749 * Make-common.in (SIM_WARNINGS): Update.
750
751Mon Oct 19 13:56:32 1998 Doug Evans <devans@seba.cygnus.com>
752
753 * Make-common.in (CGEN_INCLUDE_DEPS): Define.
754 (sim-core.o): Delete duplicate dependence on $(SIM_EXTRA_DEPS).
755 (sim-cpu.o,sim-endian.o,sim-hw.o): Ditto.
756 (cgen-run.o,cgen-scache.o,cgen-trace.o,cgen-utils.o): Delete
757 explicit cgen header dependencies, require SIM_EXTRA_DEPS to include
758 CGEN_INCLUDE_DEPS.
759 * cgen-cpu.h: New file.
760 * cgen-engine.h: New file.
761 * cgen-scache.h: New file.
762 * cgen-sim.h: Delete portions moved to new files.
763 * genmloop.sh: Generate two files eng.hin,mloop.cin explicitly,
764 rather than sending result to stdout.
765
766Fri Oct 9 14:20:22 1998 Doug Evans <devans@seba.cygnus.com>
767
768 * Make-common.in (sim-reg.o): New rule.
769 (cgen-run.o): New rule.
770 * cgen-ops.h: Delete many BI macros. Change all UBI -> BI.
771 * cgen-run.c (prime_cpu): New function.
772 * cgen-scache.c: Add pseudo-basic-block (pbb) scaching support.
773 (scache_option_handler, case OPTION_PROFILE_SCACHE): Handle explicitly
774 mentioned cpu.
775 (scache_flush_cpu,scache_lookup,scache_lookup_or_alloc): New fns.
776 * cgen-sim.h (CGEN_INSN_VIRTUAL_TYPE): New enum.
777 (CGEN_INSN_VIRTUAL_P): New macro.
778 (SEM_PC): New typedef.
779 (SEMANTIC_FN): Change type of result to SEM_PC.
780 (SEM_SET_FULL_CODE,SEM_SET_FAST_CODE,SEM_SET_CODE): New macros.
781 (IDESC_CTI_P,IDESC_SKIP_P): New macros.
782 (SCACHE_MAP): New typedef.
783 (CPU_SCACHE): Add pbb support.
784 (scace_lookup,scache_lookup_or_alloc,scache_flush_cpu): Declare.
785 (SEM_BRANCH_INIT_EXTRACT,SEM_BRANCH_INIT,SEM_BRANCH_FINI): New macros.
786 (CGEN_CPU): New members running_p,insn_count,{fast,full}_engine_fn,
787 max_slice_insns.
788 (INSN_NAME): Delete.
789 (cgen_insn_name): Declare.
790 (sim_engine_invalid_insn): Renamed from sim_engine_illegal_insn.
791 * cgen-trace.c (trace_buf): Shrink from 1024 to 256 bytes.
792 (first_insn_p): Make static.
793 (trace_insn): Handle virtual insns specially.
794 (cgen_trace_printf): Ensure we haven't overflowed the buffer.
795 * cgen-types.h (UBI): Delete.
796 (MODE_TYPE): New enum.
797 (HOSTINT,HOSTUINT,HOSTPTR): Delete.
798 * cgen-utils.c (mode_names): Delete UBI. Add INT,UINT,PTR.
799 (cgen_virtual_opcode_table): New global.
800 (cgen_insn_name): New function.
801 (sim_disassemble_insn): Ignore virtual insns.
802 * genmloop.sh: Delete top level loop generation. Add pbb support.
803 * sim-cpu.h (CPU_INSN_NAME_FN): New typedef.
804 (sim_cpu_base): New members max_insns,insn_name,model_data.
805 (CPU_PC_GET,CPU_PC_SET): New macros.
806 (sim_pc_get,sim_pc_set): Declare.
807 * sim-model.c (model_set): Call model init fn.
808 * sim-model.h (MODEL_FN): New typedef.
809 (INSN_TIMING): New member model_fn.
810 (MODEL): New members num,init.
811 * sim-profile.c (sim_profile_print_bar): Renamed from print_bar.
812 All callers updated.
813 (profile_insn_init): New fn.
814 (profile_print_insn): Update, INSN_NAME -> CPU_INSN_NAME.
815 Exit early if insn profiling not supported.
816 (profile_print_memory): Update, MAX_MODES -> MODE_TARGET_MAX.
817 (profile_install): Record profile_insn_init as init fn.
818 (profile_uninstall): Free PROFILE_INSN_COUNT if non-null.
819 * sim-profile.h: Update, MAX_MODES -> MODE_TARGET_MAX.
820 (PROFILE_DATA): Delete member exec_time.
821 Change insn_count to pointer to array, rather than the array.
822 (sim_profile_print_bar): Declare.
823
824Wed Oct 7 16:56:42 1998 Doug Evans <devans@seba.cygnus.com>
825
826 * cgen-run.c: New file.
827 * sim-reg.c: New file.
828
829Mon Sep 14 10:58:19 1998 Frank Ch. Eigler <fche@cygnus.com>
830
831 * aclocal.m4: Add checks for -lsocket and -lnsl.
832
833 * dv-sockser.c (dv_sockser_init): Use SO_REUSEADDR to
834 allow local port reuse on listening socket.
835
836Tue Sep 1 15:36:52 1998 Frank Ch. Eigler <fche@cygnus.com>
837
838 * sim-config.h: Remove reference to linux kernel header.
839
840Tue Aug 25 12:45:27 1998 Frank Ch. Eigler <fche@cygnus.com>
841
842 * dv-sockser.c (sockser_addr): Make variable non-static.
843
844Mon Aug 24 11:47:37 1998 Joyce Janczyn <janczyn@cygnus.com>
845
846 * sim-hw.{c,h} (sim_hw_parse): Return struct hw pointer.
847
848Tue Aug 11 18:12:19 1998 Doug Evans <devans@canuck.cygnus.com>
849
850 * sim-events.c (sim_events_elapsed_time): Fix calculation.
851
852Tue Aug 4 20:36:46 1998 Jeff Holcomb <jeffh@cygnus.com>
853
854 * Make-common.in (install-common): Add $(EXEEXT) when installing
855 run.
856
857Mon Aug 3 11:46:01 1998 Doug Evans <devans@seba.cygnus.com>
858
859 * cgen-sim.h (cgen_state): New member opcode_table.
860 * cgen-utils.c (sim_disassemble_insn): Use it.
861
862Fri Jul 24 10:14:18 1998 Doug Evans <devans@canuck.cygnus.com>
863
864 * cgen-mem.h (DECLARE_SETT): Fix return type.
865 * cgen-sim.h (sim_engine_illegal_insn): Declare.
866 * cgen-scache.c: Include stdlib.h.
867 * cgen-trace.c (trace_extract): Use %lx for PCADDR.
868 * sim-model.c (model_option_handler): Remove unused variable `n'.
869
870Tue Jul 21 16:27:43 1998 Doug Evans <devans@seba.cygnus.com>
871
872 * cgen-utils.c: Include bfd.h.
873 (sim_disassemble_insn): Update call to CGEN_EXTRACT_FN.
874
875Wed Jul 8 18:24:10 1998 Jeffrey A Law (law@cygnus.com)
876
877 * sim-bits.h (EXTEND24): Fix typo.
878
879Wed Jul 8 17:41:47 1998 Andrew Cagney <cagney@b1.cygnus.com>
880
881 * sim-events.c (ETRACE_P): New macro.
882 (struct _sim_event): Add member trace.
883 (sim_events_free): Reclaim trace message.
884
885 * sim-events.c, sim-events.h (sim_events_schedule_vtracef,
886 sim_events_schedule_tracef): New functions, include printf trace
887 information in argument list. If tracing, store asprintf'd trace
888 message in sim_event.
889
890 * hw-events.c, hw-events.h (hw_event_queue_schedule_tracef,
891 hw_event_queue_schedule_vtracef): New functions, mimic
892 sim_event_tracef.
893
894Mon Jul 6 15:51:14 1998 Jeffrey A Law (law@cygnus.com)
895
896 * sim-bits.h (EXTEND24): Define.
897
898Thu Jul 2 17:13:25 1998 Doug Evans <devans@seba.cygnus.com>
899
900 * cgen-sim.h (CPU_SCACHE): Make size unsigned.
901 (CPU_SCACHE_HASH_MASK): New macro.
902 (SCACHE_HASH_PC): Rewrite.
903 * genmloop.sh (engine_resume_{full,fast}): Move some of hash
904 computation out of main loop.
905
906Wed Jul 1 16:44:12 1998 Doug Evans <devans@seba.cygnus.com>
907
c906108c
SS
908 * cgen-sim.h (RECORD_IADDR): Delete.
909 * cgen-types.h (HOSTINT,HOSTUINT,HOSTPTR): New types.
910 * genmloop.sh (engine_resume_{full,fast}): Delete icount.
911
912Wed Jun 17 12:25:08 1998 Mark Alexander <marka@cygnus.com>
913
914 * gennltvals.def (mn10200): Add entry.
915 * nltvals.def: Regenerate with MN10200 additions.
916
917Wed Jun 17 13:18:28 1998 Andrew Cagney <cagney@b1.cygnus.com>
918
919 * sim-inline.h (EXTERN_*): Replace with EXTERN_*_P. Correct
920 documentation on how it works.
921
922 * sim-core.h, sim-core.c (sim_core_install, sim_core_attach,
923 sim_core_detach, sim_core_read_buffer, sim_core_write_buffer,
924 sim_core_set_xor, sim_core_xor_read_buffer,
925 sim_core_xor_write_buffer): Update.
926
927 * sim-events.h, sim-events.c (sim_events_install,
928 sim_events_watch_clock, sim_events_schedule_after_signal,
929 sim_events_schedule, sim_events_watch_sim, sim_events_watch_core,
930 sim_events_deschedule): Update.
931
932 * sim-fpu.h, sim-fpu.c (sim_fpu_zero, sim_fpu_one, sim_fpu_two,
933 sim_fpu_max32, sim_fpu_max64): Update.
934
935Sat Jun 13 07:45:38 1998 Doug Evans <devans@fallis.cygnus.com>
936
937 * cgen-trace.c (trace_insn_fini): Redo cycle handling.
938 * sim-profile.h (PROFILE_DATA): Rename cycle handling members.
939 * sim-profile.c (profile_print_model): Update.
940
941Fri Jun 12 18:35:07 1998 Doug Evans <devans@seba.cygnus.com>
942
943 * gennltvals.def (m32r): Use common syscall.h now.
944 (mn10300): Add entry.
945 * nltvals.def: Regenerate.
946
947 * sim-engine.c (sim_engine_get_run_state): New function.
948 * sim-engine.h (sim_engine_get_run_state): Declare it.
949
950Thu Jun 11 00:50:03 1998 Doug Evans <devans@seba.cygnus.com>
951
952 * sim-core.h (SIM_CORE_SIGNAL_FN): New typedef.
953 * sim-core.c (sim_core_signal): Make extern, always define.
954
955Wed Jun 10 16:02:29 1998 Doug Evans <devans@seba.cygnus.com>
956
957 * Make-common.in (CGEN_FLAGS_TO_PASS): New variable.
958 * cgen-ops.h (ANDIF): New macro.
959 (ANDIF[BQHSD]I): Delete.
960
961Thu Jun 4 13:53:54 1998 Andrew Cagney <cagney@b1.cygnus.com>
962
963 * hw-events.c (create_hw_event, delete_hw_event): Delete.
964 (hw_event_queue_schedule, hw_event_queue_deschedule,
965 bounce_hw_event): Fix hw-event memory corruptions found by Joyce
966 Janczyn.
967
968 * hw-alloc.h (HW_NZALLOC): Define.
969
970 * Make-common.in (test-hw-events): Add target for testing the
971 hw-event code.
972
973Mon May 25 21:11:26 1998 Andrew Cagney <cagney@b1.cygnus.com>
974
975 * Make-common.in (SIM_COMMON_HW_OBJS): Add hw-handles.o and
976 hw-instances.o.
977 hw-handles.c, hw-instances.c, hw-handles.h, hw-instances.h: New
978 files.
979 * hw-main.h: Include hw-handles.h, hw-instances.h.
980 * hw-base.h ({create,delete}_hw_{handles,instances}_data): Declare
981 * hw-base.c (hw_create, hw_delete): Call same.
982
983Mon May 25 18:55:35 1998 Andrew Cagney <cagney@b1.cygnus.com>
984
985 * dv-core.c: Include hw-main.h and sim-main.h.
986 * dv-pal.c: Include hw-main.h and sim-io.h.
987 * dv-glue.c: Include hw-main.h.
988
989 * hw-main.h: New file. Move list of includes to here.
990 * hw-base.h: From here.
991 * Make-common.in (hw_base_headers): Rename to hw_main_headers.
992 (hw-*.o, dv-*.o): Update.
993 * hw-tree.c, hw-base.c, hw-properties.c, hw-ports.c, hw-device.c,
994 hw-events.c, hw-alloc.c, sim-hw.c: Include hw-main.h instead of
995 sim-main.h.
996
997 * hw-base.h (do_hw_attach_regs, do_hw_poll_read_method,
998 do_hw_poll_read): Move declarations from here.
999 * hw-main.h: To here.
1000
1001 * hw-base.h (struct hw_device_descriptor, hw_finish_callback):
1002 Move from here.
1003 * hw-main.h (struct hw_descriptor, hw_finish_method): To here,
1004 rename.
1005 * Make-common.in (hw-config.h): Update
1006 * hw-base.c, dv-pal.c, dv-glue.c: Update
1007
1008 * dv-glue.c, hw-device.h, hw-base.h, hw-ports.c: Rename
1009 `*_callback' to `*_method.
1010
1011Mon May 25 18:41:18 1998 Andrew Cagney <cagney@b1.cygnus.com>
1012
1013 * hw-base.h (set_*): Move set method macros from here.
1014 * hw-device.h: To here.
1015
1016Mon May 25 18:21:38 1998 Andrew Cagney <cagney@b1.cygnus.com>
1017
1018 * hw-base.h (create_hw_property_data, delete_hw_property_data):
1019 Declare.
1020
1021 * hw-base.c (hw_create, hw_delete): Call
1022 * hw-properties.c (create_hw_property_data,
1023 delete_hw_property_data): Define.
1024
1025Mon May 25 17:40:46 1998 Andrew Cagney <cagney@b1.cygnus.com>
1026
1027 * hw-device.c, hw-properties.c: Include hw-base.h
1028
1029 * hw-alloc.h, hw-alloc.c: New files. Move alloc code to here.
1030 * hw-device.c: From here.
1031 * hw-base.h: Include "hw-events.h".
1032
1033 * hw-base.h (create_hw_alloc_data, delete_hw_alloc_data): Declare.
1034 * hw-base.c (hw_create, hw_delete): Call.
1035 * hw-alloc.c (create_hw_alloc_data, delete_hw_alloc_data): Define.
1036
1037 * Make-common.in (SIM_NEW_COMMON_OBJS): Add hw-alloc.o.
1038 (hw-alloc.o): New target.
1039
1040Mon May 25 17:14:27 1998 Andrew Cagney <cagney@b1.cygnus.com>
1041
1042 * hw-events.h, hw-events.c: New files. Move event code to here.
1043 * sim-hw.c: From here.
1044 * hw-base.h: Include "hw-events.h".
1045 * Make-common.in (SIM_NEW_COMMON_OBJS): Add hw-events.o.
1046 (hw-events.o): New target.
1047
1048 * hw-device.h (struct hw): Add struct hw_event_data events_of_hw.
1049 * hw-events.h (struct hw_event): Replace typedef hw_event.
1050
1051 * hw-base.h (create_hw_event_data, delete_hw_event_data): Declare.
1052 * hw-base.c (hw_create, hw_delete): Call.
1053 * hw-events.c (create_hw_event_data, delete_hw_event_data): Define.
1054
1055 * dv-pal.c: Update.
1056
1057Mon May 25 16:55:16 1998 Andrew Cagney <cagney@b1.cygnus.com>
1058
1059 * hw-base.c (panic_hw_port_event, empty_hw_ports): Move from here.
1060 * hw-ports.c: To here.
1061
1062 * hw-base.h, hw-ports.c (create_hw_port_data,
1063 delete_hw_port_data): New functions.
1064 * hw-base.c (hw_delete, hw_create): Call same.
1065
1066 * hw-base.h (set_hw_ports, set_hw_port_event): Move set functions
1067 from here.
1068 * hw-ports.h: To here.
1069
1070Mon May 25 16:42:48 1998 Andrew Cagney <cagney@b1.cygnus.com>
1071
1072 * hw-device.c (hw_ioctl), hw-device.h (hw_ioctl_callback): Drop
1073 PROCESSOR and CIA arguments.
1074
1075Fri May 22 12:16:27 1998 Andrew Cagney <cagney@b1.cygnus.com>
1076
1077 * aclocal.m4 (SIM_AC_OPTION_HW): Add enable / disable argument.
1078 Move common object files from here.
1079 * Make-common.in (SIM_COMMON_HW_OBJS): To here.
1080
1081Thu May 21 17:57:16 1998 Andrew Cagney <cagney@b1.cygnus.com>
1082
1083 * sim-hw.c: Include ctype.h.
1084 (do_hw_poll_read): Do not assume EAGAIN.
1085
1086Wed May 20 04:37:57 1998 Doug Evans <devans@seba.cygnus.com>
1087
1088 * cgen-trace.c (first_insn_p): New static local.
1089 (trace_insn_init): Set it.
1090 (trace_insn_fini): Use TRACE_PREFIX.
1091 (trace_insn): Rewrite to use trace_prefix.
1092 * sim-trace.c (trace_prefix): Don't print filename arg if NULL.
1093 Adjust width accordingly.
1094
1095 * sim-profile.h (PROFILE_DATA): New member profile_any_p.
1096 (PROFILE_ANY_P,PROFILE_INSN_P,PROFILE_MEMORY): New macros.
1097 (PROFILE_SCACHE_P,PROFILE_PC_P,PROFILE_CORE_P): New macros.
1098 (PROFILE_COUNT_INSN,PROFILE_COUNT_READ,PROFILE_COUNT_WRITE): Simplify.
1099 (PROFILE_COUNT_CORE): Simplify.
1100 * sim-profile.c (profile_option_handler): Compute profile_any_p.
1101
1102Tue May 19 23:55:30 1998 Doug Evans <devans@seba.cygnus.com>
1103
1104 * cgen-ops.h (ADDCFSI): Fix typo.
1105
1106Sat May 16 12:44:52 1998 Doug Evans <devans@seba.cygnus.com>
1107
1108 * cgen-sim.h (CGEN_CPU): New members idesc_{read,sem}_init_p.
1109 * genmloop.sh: Use them rather than static locals.
1110
1111 * sim-engine.c (sim_engine_set_run_state): New function.
1112 * sim-engine.h (sim_engine_set_run_state): Declare.
1113 * genmloop.sh (pending_reason,pending_sigrc): New static locals.
1114 (@cpu@_engine_stop): New args reason,sigrc. All callers updated.
1115 (engine_resume): Reorganize. Allow synchronous exit from main loop.
1116
1117Fri May 15 16:06:05 1998 Doug Evans <devans@seba.cygnus.com>
1118
1119 * cgen-trace.c (trace_insn_init): New arg first_p.
1120 All callers updated.
1121 (trace_insn_fini): New arg last_p. All callers updated.
1122 * cgen-trace.h (trace_insn_init,trace_insn_fini): Update.
1123 (TRACE_INSN_INIT,TRACE_INSN_FINI): Update.
1124 * genmloop.sh (engine_resume): Update.
1125
1126Fri May 15 15:59:00 1998 Joyce Janczyn <janczyn@cygnus.com>
1127
1128 * Make-common.in (install-common): Run ranlib on installed copy of
1129 libsim.a.
1130
1131Fri May 15 15:03:00 1998 Joyce Janczyn <janczyn@cygnus.com>
1132
1133 * Make-common.in (install-common): Rename and install libsim.a.
1134
1135Tue May 12 15:23:57 1998 Andrew Cagney <cagney@b1.cygnus.com>
1136
1137 * sim-io.c (unistd.h): Include.
1138
1139Wed May 6 16:04:18 1998 Doug Evans <devans@seba.cygnus.com>
1140
1141 * Make-common (sim_main_headers): Sort.
1142 (cgen-*.o): Add cgen-sim.h dependency.
1143
1144 * cgen-scache.c (scache_init): Only allocate space if scache element
1145 size is non-zero.
1146 (scache_flush,scache_print_profile): Check if scache in use first.
1147
1148 * cgen-sim.h (IDESC): Provide forward declaration.
1149 (DECODE): Delete.
1150 (CGEN_CPU): Always define scache member. New members idesc,opcode.
1151 (cgen_cpu_max_extra_bytes): Declare.
1152 * cgen-utils.c (cgen_cpu_max_extra_bytes): New function.
1153
c906108c
SS
1154 * sim-cpu.h: New file. sim_cpu_base moved here.
1155 Move sim_cpu_lookup decl here.
1156 * sim-base.h: #include "sim-cpu.h".
1157 * sim-cpu.c: New file.
1158 * Make-common (sim_main_headers): Add sim-cpu.h.
1159 (sim-cpu.o): Add rule for.
1160
1161 * sim-model.c (set_model): Delete.
1162 (sim_model_set,model_set): New functions.
1163 (sim_model_install): Renamed from model_install.
1164 Don't set default model here.
1165 (model_option_handler): Rewrite --model processing.
1166 (sim_model_lookup,sim_mach_lookup): New functions.
1167 * sim-model.h (MAX_MODELS,MAX_INSNS): Delete.
1168 (insn_timing): Delete.
1169 (INSN_TIMING): New member `num'.
1170 (IMP_PROPERTIES): Always define scache_elm_size member.
1171 (MACH): New member init_cpu.
1172 (sim_machs): Renamed from machs.
1173 (sim_model_install): Renamed from model_install.
1174 (sim_model_set,sim_model_lookup,sim_mach_lookup): Declare.
1175 * sim-module.c (modules): Update.
1176
1177 * sim-profile.c (profile_print_insn): Add cpu arg to INSN_NAME macro.
1178
1179 * sim-io.c: #include <errno.h>.
1180
1181Wed May 6 12:39:15 1998 Andrew Cagney <cagney@b1.cygnus.com>
1182
1183 * dv-pal.c (struct hw_pal_device): Add reader.
1184 (hw_pal_finish): Initialize reader.
1185 (scan_hw_pal): Use reader.
1186
1187 * hw-base.h, sim-hw.c (do_hw_poll_read): New function.
1188 (HW_IO_EOF, HW_IO_NOT_READY): Define.
1189 * dv-pal.c: Use.
1190
1191 * sim-io.h, sim-io.c (sim_io_poll_read): New function. Copy from
1192 ../ppc/main.c sim_io_read_stdin.
1193
1194Fri May 1 12:11:02 1998 Andrew Cagney <cagney@b1.cygnus.com>
1195
1196 * hw-tree.h (hw_tree_print): Paramaterize with print and file
1197 arguments.
1198 * hw-tree.c: Update.
1199
1200 * hw-base.h (hw_port_event_callback): Delete CPU/CIA args.
1201 * hw-device.h (hw_io_read_buffer, hw_io_write_buffer): Delete
1202 CPU/CIA args.
1203 * hw-ports.h (hw_port_event): Ditto.
1204 * hw-ports.c (hw_port_event): Update.
1205 * hw-base.c (panic_hw_io_read_buffer, panic_hw_io_write_buffer):
1206 Update.
1207 * dv-pal.c (hw_pal_io_read_buffer, hw_pal_io_write_buffer):
1208 Update.
1209 (hw_pal_io_write_buffer): Call hw_halt not sim_engine_halt.
1210 (do_counter_event): Update.
1211 * dv-glue.c (hw_glue_io_read_buffer): Update.
1212 (hw_glue_port_event): Update.
1213
1214 * hw-device.h (SIM_DESC): Replace with struct sim_state.
1215 * hw-base.h (hw_create): Ditto.
1216 * hw-base.c (hw_create): Ditto.
1217
1218 * hw-device.c (hw_abort, hw_trace, hw_hw_event_queue_schedule,
1219 hw_event_queue_deschedule, hw_event_queue_time): Delete, moved
1220 from here to.
1221 * sim-hw.c: Here.
1222 * hw-device.h (hw_system_cpu): Declare.
1223 * sim-hw.c (hw_system_cpu): New function.
1224
1225 * sim-core.c (sim_core_map_attach, sim_core_attach): Call
1226 sim_hw_abort not hw_abort.
1227 (sim-hw.h): Include.
1228 (sim_core_read_buffer, sim_core_write_buffer): Call
1229 sim_hw_io_read_buffer and sim_hw_io_write_buffer. Do not pass CPU
1230 argument.
1231 (sim_core_set_xor): Do not pass CPU when aborting.
1232
1233 * sim-n-core.h (sim_core_read_aligned_N,
1234 sim_core_write_aligned_N): Call sim_hw_abort not hw_abort.
1235 (sim_core_read_aligned_N, sim_core_write_aligned_N): Call
1236 sim_cpu_hw_io_read_buffer and sim_cpu_hw_io_write_buffer. Does not
1237 return length.
1238
1239 * sim-hw.h: Declare sim_hw_io_{read,write}_buffer. Declare
1240 sim_hw_print.
1241 * sim-hw.c (sim_hw_io_read_buffer, sim_hw_io_write_buffer,
1242 sim_cpu_hw_io_read_buffer, sim_cpu_hw_io_write_buffer): New
1243 functions.
1244 (sim_hw_print): New function.
1245
1246 * sim-engine.h (sim_engine_vabort): Declare.
1247 * sim-engine.c (sim_engine_vabort): New function.
1248
1249Wed Apr 29 23:58:52 1998 Andrew Cagney <cagney@b1.cygnus.com>
1250
1251 * sim-trace.c (print_data): For floating-point numbers trace raw
1252 hex value.
1253 (trace_result_fp2): New function.
1254 * sim-trace.h (trace_result_fp2): New declaration.
1255 (TRACE_FP_RESULT2): New macro.
1256
1257Tue Apr 28 18:28:58 1998 Geoffrey Noer <noer@cygnus.com>
1258
1259 * common/aclocal.m4: call AM_EXEEXT in SIM_AC_COMMON, define
1260 AM_CYGWIN32 and AM_EXEEXT.
1261 * common/Make-common.in: set EXEEXT, add missing EXEEXTs
1262 to run and install-common rules.
1263 * common/configure: regenerate
1264
1265Sat Apr 25 17:45:01 1998 Andrew Cagney <cagney@b1.cygnus.com>
1266
1267 * sim-types.h (cell_word): New type.
1268 (natural_cell): Delete type.
1269
1270Sun Apr 26 15:31:55 1998 Tom Tromey <tromey@creche>
1271
1272 * configure: Regenerated to track ../common/aclocal.m4 changes.
1273 * config.in: Ditto.
1274
1275Sun Apr 26 15:25:07 1998 Tom Tromey <tromey@cygnus.com>
1276
1277 * acconfig.h (NEED_DECLARATION_PRINTF): Removed.
1278
1279Fri Apr 24 14:16:40 1998 Tom Tromey <tromey@creche>
1280
1281 * configure: Regenerated to track ../common/aclocal.m4 changes.
1282 * config.in: Ditto.
1283
1284Fri Apr 24 11:38:08 1998 Tom Tromey <tromey@cygnus.com>
1285
1286 * acconfig.h: New file.
1287 * Make-common.in (top_builddir): New macro.
1288 (INTL_LIB): Removed.
1289 (INTLLIBS): New macro.
1290 (INTLDEPS): Likewise.
1291 (LIBDEPS): Use INTLDEPS.
1292 (EXTRA_LIBS): Use INTLLIBS.
1293 * aclocal.m4 (SIM_AC_COMMON): Call CY_GNU_GETTEXT.
1294 (CY_WITH_NLS, CY_GNU_GETTEXT, AM_PATH_PROG_WITH_TEST,
1295 AM_LC_MESSAGES): New macros from GNU gettext.
1296
1297Fri Apr 24 19:57:59 1998 Andrew Cagney <cagney@b1.cygnus.com>
1298
1299 * sim-config.h: Discard leading _ from macros.
1300 * sim-types.h: Ditto.
1301
1302Wed Apr 22 14:14:19 1998 Michael Meissner <meissner@cygnus.com>
1303
1304 * Make-common.in (CSEARCH): Add -I to intl directories.
1305 (INTL_LIB): Point to libintl.a.
1306 (LIBDEPS): Add $(INTL_LIB).
1307 (EXTRA_LIBS): Ditto.
1308
1309Tue Apr 21 12:44:27 1998 Doug Evans <devans@canuck.cygnus.com>
1310
1311 * cgen-types.h (GETHIDI,MAKEDI): Tweak.
1312
1313 * cgen-ops.h (ADDCFSI): Fix.
1314 (SUBCFSI): Tweak.
1315
1316Tue Apr 21 13:18:41 1998 Andrew Cagney <cagney@b1.cygnus.com>
1317
1318 * sim-types.h (signed_address, unsigned_address): Define.
1319
1320Mon Apr 20 21:47:54 1998 Andrew Cagney <cagney@b1.cygnus.com>
1321
1322 * sim-fpu.c (sim_fpu_2d): Don't return an SNaN, convert it into a
1323 QNaN.
1324
1325Thu Apr 16 10:30:14 1998 Andrew Cagney <cagney@b1.cygnus.com>
1326
1327 * sim-fpu.c, sim-fpu.h (sim_fpu_fractionto, sim_fpu_tofraction):
1328 New functions, pack / unpack sim_fpu struct using raw values.
1329 (sim_fpu_is): Differentiate between negative and positive
1330 infinity.
1331
1332Tue Apr 14 18:49:31 1998 Andrew Cagney <cagney@b1.cygnus.com>
1333
1334 * sim-bits.h (EXTEND4): Define.
1335 (EXTEND4, EXTEND15, EXTEND11): Ditto.
1336
1337Tue Apr 14 16:31:35 1998 John Metzler <jmetzler@cygnus.com>
1338
1339 * sim-memopt.c (parse_addr): Sunos 4.5 does not have strtol
1340 declared so we need this cast to prevent long long addresses
1341 from being misconfigures. Results in access to unmapped memory.
1342
1343Tue Apr 14 13:19:14 1998 Doug Evans <devans@canuck.cygnus.com>
1344
1345 * Make-common.in (RUNTESTFLAGS): Define.
1346 (check): Pass RUNTESTFLAGS to recursive make.
1347
1348Tue Apr 14 15:09:19 1998 Andrew Cagney <cagney@b1.cygnus.com>
1349
1350 * sim-info.c (sim_info): Be verbose when either VERBOSE or
1351 STATE_VERBOSE_P.
1352
1353Sat Apr 4 23:24:17 1998 Andrew Cagney <cagney@b1.cygnus.com>
1354
1355 * aclocal.m4 (sim-inline): By default, disable sim-inline when
1356 cross compiling.
1357
1358Sat Apr 4 20:36:25 1998 Andrew Cagney <cagney@b1.cygnus.com>
1359
1360 * aclocal.m4 (sim-cflags): Add -fomit-frame-pointer to defaults.
1361 (sim-inline): Update to match sim-inline.[hc]
1362 * configure: Regenerated to track ../common/aclocal.m4 changes.
1363
1364 * Make-common.in (sim_main_headers): Add sim-inline.h
1365
1366 * sim-bits.h (sim-bits.c): Include when H_REVEALS_MODULE_P.
1367 selected.
1368 * sim-endian.h (sim-endian.c): Ditto.
1369
1370 * sim-events.h (_SIM_EVENTS_H_): Replace with SIM_EVENTS_H.
1371 (sim_events_set_trace): Delete unused prototype.
1372
1373 * sim-core.h (_SIM_CORE_H_): Replace with SIM_CORE_H.
1374 * sim-core.c (_SIM_CORE_C_): Ditto for SIM_CORE_C.
1375
1376 * sim-fpu.h (sim-fpu.c): Include when H_REVEALS_MODULE_P.
1377 (sim_fpu_to232i, sim_fpu_to232u, sim_fpu_i232to, sim_fpu_u232to):
1378 Comment out, not yet implemented in sim-fpu.c.
1379 (sim_fpu_zero, sim_fpu_one, sim_fpu_two, sim_fpu_qnan,
1380 sim_fpu_max32, sim_fpu_max64): Mark as EXTERN_SIM_FPU.
1381
1382 * sim-inline.h: Rewrite description.
1383 (H_REVEALS_MODULE_P, C_REVEALS_MODULE_P): Define.
1384 (SIM_MAIN_INLINE): Add inline option.
1385
1386 * sim-inline.c (semantics.c, idecode.c, engine.c, ...): Do not
1387 include generated files. Handled by generator directly.
1388
1389Sat Apr 4 01:07:06 1998 Andrew Cagney <cagney@b1.cygnus.com>
1390
1391 * sim-trace.c (set_trace_option_mask): Keep TRACE_ANY_P
1392 up-to-date.
1393
1394 * sim-trace.h (TRACE_ANY_P): Define.
1395 (struct _trace_data): Add trace_any_p.
1396
1397Mon Mar 30 17:11:55 1998 Andrew Cagney <cagney@b1.cygnus.com>
1398
1399 * run.c (main): Handle all alternatives of enum sim_stop.
1400 (main): Delete unused `asection *s'.
1401
1402Fri Mar 27 16:15:52 1998 Andrew Cagney <cagney@b1.cygnus.com>
1403
1404 * hw-tree.h, hw-tree.c (hw_tree_vparse): New function
1405
1406 * configure: Regenerated to track ../common/aclocal.m4 changes.
1407
1408 * sim-hw.c: New file.
1409 * sim-hw.h (sim_hw_parse): Declare function.
1410 (hw-tree.h): Do not include.
1411
1412 * sim-base.h (STATE_HW): Define.
1413 (struct sim_state_base): Add member struct *hw.
1414
1415 * sim-module.c (sim-hw.h): Include.
1416 (modules): Add sim_hw_install.
1417
1418 * aclocal.m4 (sim_hw_obj): Add sim-hw.o
1419
1420Fri Mar 27 14:55:06 1998 Andrew Cagney <cagney@b1.cygnus.com>
1421
1422 * sim-base.h (CPU_INDEX): Define.
1423
1424 * sim-utils.c (sim_state_alloc): Initialize.
1425 * sim-module.c (sim_post_argv_init): Ditto.
1426
1427Thu Mar 26 10:07:57 1998 Stu Grossman <grossman@bhuna.cygnus.co.uk>
1428
1429 * aclocal.m4 (sim_hw_obj): Fix sed expression to generate
1430 properly formatted lists.
1431
1432Thu Mar 26 10:37:22 1998 Andrew Cagney <cagney@b1.cygnus.com>
1433
1434 * dv-pal.c (enum hw_pal_address_mask): From Stu Grossman, was
1435 0x2f needs to be 0x3f.
1436
1437Thu Mar 26 09:10:56 1998 Andrew Cagney <cagney@b1.cygnus.com>
1438
1439 * hw-tree.c (hw_tree_find_property): Return NULL when device is
1440 not found.
1441 (hw_tree_find_*_property): Clean up error message when property is
1442 not found.
1443
1444 * dv-pal.c (hw_pal_io_read_buffer): Check the smp property is
1445 present before looking for it.
1446
1447Wed Mar 25 16:17:38 1998 Ian Carmichael <iancarm@cygnus.com>
1448
1449 * aclocal.m4 (AC_CHECK_HEADERS): Add check for fpu_control.h.
1450 (AC_CHECK_FUNCS): Add check for __setfpucw.
1451 * configure: Regenerated.
1452
1453Wed Mar 25 09:18:34 1998 Andrew Cagney <cagney@b1.cygnus.com>
1454
1455 * dv-pal.c (hw_pal_countdown, hw_pal_countdown_value,
1456 hw_pal_timer, hw_pal_timer_value): Define.
1457 (hw_pal_io_read_buffer, hw_pal_io_write_buffer): Add timer support
1458 (do_counter_event, do_counter_read, do_counter_value,
1459 do_counter_write): new functions.
1460
1461Tue Mar 24 12:24:24 1998 Andrew Cagney <cagney@b1.cygnus.com>
1462
1463 * hw-tree.c (hw_printf): Send tree dump to stderr, same as other
1464 trace output.
1465
1466 * hw-base.c (hw_create): Stop searching for a device when one is
1467 found.
1468
1469Wed Mar 25 12:35:29 1998 Andrew Cagney <cagney@b1.cygnus.com>
1470
1471 * configure: Regenerated to track ../common/aclocal.m4 changes.
1472
1473Mon Mar 23 10:25:08 1998 Andrew Cagney <cagney@b1.cygnus.com>
1474
1475 * aclocal.m4 (SIM_AC_OPTION_HARDWARE): Add second argument,
1476 appends extra devices.
1477 (SIM_AC_OPTION_HARDWARE): Substute sim_hw, a non-duplicate list of
1478 the device names.
1479
1480 * Make-common.in (hw-config.h): New target, create hw-config.h
1481 file.
1482 (SIM_HW): Definition from @sim_hw@.
1483 (hw-base.o): Depend on hw-config.h
1484
1485Tue Mar 24 17:41:35 1998 Stu Grossman <grossman@bhuna.cygnus.co.uk>
1486
1487 * Make-common.in: Get SHELL from configure.
1488 * (stamp-tvals sim-inline.c): Use $(SHELL) when invoking
1489 move-if-change. Fixes NT native build problem.
1490 * Makefile.in (nltvals.def): Use $(SHELL) when invoking
1491 move-if-change. Fixes NT native build problem.
1492 * configure: Regenerate with autoconf 2.12.1 to fix shell issues for
1493 NT native builds.
1494
1495Sun Mar 22 16:54:40 1998 Andrew Cagney <cagney@b1.cygnus.com>
1496
1497 * hw-device.h, hw-device.c (hw_strdup): New function.
1498
1499 * hw-base.c (hw_create): Use hw_strdup when saving a copy of the
1500 strings name, family and args.
1501 (full_name_of_hw): Use hw_strdup when returning the full path.
1502
1503 * hw-properties.c: Clean up property not found / wrong type error
1504 messages.
1505
1506 * hw-tree.c (hw_tree_parse): Finish a devices initialization
1507 before attaching any ports.
1508
1509 * hw-base.c (hw-config.): Include. Replace hardwired table.
1510
1511 * dv-glue.c: Copy over ../ppc/hw_glue.c. Update to new framework.
1512
1513 * Make-common.in: Add rule for dv-glue.o.
1514
1515Sun Mar 22 16:45:54 1998 Andrew Cagney <cagney@b1.cygnus.com>
1516
1517 * hw-base.c (hw_finish): Move setting of trace level to here.
1518 (hw_create): From here.
1519
1520 * hw-base.h, hw-base.c (do_hw_attach_regs): Copy function from
1521 ../ppc/device_table.c.
1522
1523 * dv-pal.c (hw_pal_finish): Attach PAL device to parent bus.
1524
1525 * hw-tree.c (print_properties): Supress path when printing
1526 properties of root node.
1527
1528Sun Mar 22 16:21:15 1998 Andrew Cagney <cagney@b1.cygnus.com>
1529
1530 * hw-device.h (HW_TRACE): Define.
1531 (hw_trace): Declare.
1532 * hw-device.c (hw_trace): Implement function.
1533
1534 * hw-base.c (hw_create): Set hw trace level from "trace?"
1535 property.
1536
1537 * dv-core.c (dv_core_attach_address_callback): Add trace.
1538
1539 * dv-pal.c: Replace DTRACE with HW_TRACE.
1540
1541Sun Mar 22 15:23:35 1998 Andrew Cagney <cagney@b1.cygnus.com>
1542
1543 * hw-device.h (HW_ZALLOC, HW_MALLOC): New macros.
1544 (hw_alloc_data): Delcare.
1545 (struct hw): Add member alloc_of_hw.
1546
1547 * hw-device.c (hw_zalloc, hw_malloc, hw_free, hw_free_all): New
1548 functions. Assocate memory with a device.
1549 (stdlib.h): Include.
1550
1551 * hw-base.h (set_hw_delete): Define.
1552 (hw_delete_callback): Declare.
1553 (hw_delete): Declare.
1554
1555 * hw-base.c (hw_delete): Implement function.
1556 (struct hw_base_data): Add member to_delete.
1557 (ignore_hw_delete): New function, does nothing.
1558 (hw_create): Set the hw_delete method.
1559 (hw_create): Allocate the base type using HW_ZALLOC before setting
1560 any methods.
1561
1562 * hw-tree.h, hw-tree.c (hw_tree_delete): New function.
1563
1564 * hw-properties.c: Replace zalloc/zfree with hw_zalloc/hw_free.
1565
1566 * hw-ports.c: Replace zalloc/zfree with hw_zalloc/hw_free.
1567 (attach_hw_port_edge): Add struct hw argument
1568
1569 * dv-pal.c (hw_pal_finish): Replace zalloc/zfree with
1570 hw_zalloc/hw_free.
1571
1572Sun Mar 22 15:09:52 1998 Andrew Cagney <cagney@b1.cygnus.com>
1573
1574 * hw-device.h (hw_attach_address_callback,
1575 hw_detach_address_callback): Attach to a single space not a space
1576 mask. Clarify interpretation of SPACE:ADDR parameters.
1577
1578 * hw-base.c (passthrough_hw_attach_address,
1579 passthrough_hw_detach_address): Update.
1580 * dv-core.c (dv_core_attach_address_callback): Ditto.
1581 * dv-pal.c (hw_pal_attach_address): Ditto.
1582
1583Thu Mar 19 00:41:00 1998 Andrew Cagney <cagney@b1.cygnus.com>
1584
1585 * sim-options.h: Document additional CPU arg to OPTION_HANDLER.
1586
1587Wed Mar 18 14:13:02 1998 Andrew Cagney <cagney@b1.cygnus.com>
1588
1589 * Make-common.in (SIM_HW_OBJS, SIM_HW_SRC, SIM_DV_OBJS): Define.
1590 (hw-base_h, hw-device_h, hw-handles_h, hw-instances_h, hw_ports_h,
1591 hw-properties_h, hw-tree_h): Define, point at corresponding
1592 header.
1593 (hw_base_headers): Define list of headers included by hw-base.h
1594 (hw-base.o, hw-device.o, hw-instances.o, hw-handles.o, hw-ports.o,
1595 hw-properties.o, hw-tree.o): Specify dependencies.
1596 (dv-core.o, dv-pal.o): Ditto.
1597
1598 * sim-hw.h: New file.
1599
1600 * hw-device.h, hw-device.c, hw-properties.h, hw-properties.c,
1601 hw-ports.h, hw-ports.c: New files. Copied from ../ppc/device.[ch].
1602
1603 * hw-tree.h, hw-tree.c: New files. Copied from ../ppc/tree.[hc].
1604
1605 * hw-base.h, hw-base.c: new files. Copied from
1606 ../ppc/device_table.[hc].
1607
1608 * dv-core.c, dv-pal.c: New files. Copied from
1609 ../ppc/hw_{core,pal}.c
1610
1611 * sim-basics.h (struct hw): Declare.
1612 (enum port_direction, enum object_disposition): Declare.
1613
1614Wed Mar 18 12:38:12 1998 Andrew Cagney <cagney@b1.cygnus.com>
1615
1616 * aclocal.m4 (SIM_AC_OPTION_HARDWARE): Set sim_hw_obj, sim_dv_obj,
1617 sim_dv_src in Makefile. Take list of devices as parameter to m4
1618 macro..
1619
1620 * configure: Regenerated to track ../common/aclocal.m4 changes.
1621
1622Mon Mar 16 12:37:33 1998 Andrew Cagney <cagney@b1.cygnus.com>
1623
1624 * sim-trace.h, sim-trace.c (trace_prefix): Pass in sim_cia so that
1625 trace_prefix can abort cleanly.
1626
1627Sat Mar 14 18:36:12 1998 Doug Evans <devans@seba.cygnus.com>
1628
1629 * dv-sockser.c, dv-sockser.h: New files.
1630 * Make-common.in (dv-sockser.o): Add rule for.
1631 * aclocal.m4: Check for fcntl.h.
1632 * config.h: Add HAVE_FCNTL_H.
1633
1634 * sim-break.c (remove_breakpoint): Fix thinko.
1635
1636 * sim-hload.c (sim_load): Provide default value of SIM_HANDLES_LMA.
1637 Use SIM_HANDLES_LMA for lma_p arg to sim_load_file.
1638
16391998-03-13 Fred Fish <fnf@cygnus.com>
1640
1641 * sim-base.h (struct sim_state_base): Add prog_syms and
1642 define macro STATE_PROG_SYMS.
1643 * sim-trace.c (trace_prefix): Add variables abfd, symsize,
1644 symbol_count, and asymbols. Call bfd_get_symtab_upper_bound
1645 and bfd_canonicalize_symtab, to get symbol table on first use
1646 and preserve it via STATE_PROG_SYMS for future calls to
1647 bfd_find_nearest_line.
1648
1649Wed Mar 11 14:02:47 1998 Andrew Cagney <cagney@b1.cygnus.com>
1650
1651 * sim-core.h, sim-core.c (sim_core_map_to_str): Delete.
1652
1653 * sim-core.c (sim_core_attach): Handle a generic number of maps -
1654 up to nr_maps, not just access_* maps.
1655
1656 * sim-profile.h (struct PROFILE_DATA): Track nr_maps different
1657 maps.
1658
1659 * sim-profile.c (profile_print_core): Make map unsigned. Iterate
1660 over nr_maps not sim_core_nr_maps.
1661
1662 * sim-events.h, sim-events.c (sim_events_watch_core): Change
1663 core_map argument to unsigned.
1664 (struct _sim_core): Ditto for struct member core_map.
1665
1666 * sim-core.h (nr_sim_core_maps, sim_core_*_map): Delete
1667
1668 * sim-basics.h (access_io, access_*_io): Define.
1669 (map_read, map_write, map_exec, map_io): Define.
1670
1671 * sim-core.c, sim-core.h (sim_core_attach): Replace argument
1672 attach with more generic mapmask.
1673 (sim_core_{read,write}_*): Change map argument to unsigned.
1674
1675 * sim-core.c (sim_core_uninstall, sim_core_attach,
1676 sim_core_detach): Iterate over nr_maps instead of
1677 sim_core_nr_maps.
1678
1679 * sim-break.c (insert_breakpoint): Write breakpoints to exec_map
1680 instead of the write_map.
1681 (remove_breakpoint): Ditto.
1682
1683 * genmloop.sh (engine_resume_full): Replace sim_core_*_map
1684 with read_map, write_map, exec_map resp.
1685
1686 * cgen-mem.h (DECLARE_GETMEM, DECLARE_SETMEM, DECLARE_GETIMEM):
1687 Ditto.
1688
1689 * cgen-utils.c (sim_disassemble_insn): Ditto.
1690
1691 * sim-hrw.c (sim_write, sim_write): Ditto.
1692
1693 * sim-utils.h, sim-utils.c (access_to_str, map_to_str,
1694 transfer_to_str): New functions.
1695
1696Mon Mar 9 12:50:59 1998 Doug Evans <devans@seba.cygnus.com>
1697
1698 * sim-base.h (sim_state_base): New member environment.
1699 (STATE_ENVIRONMENT): New macro.
1700 * sim-config.c (current_environment): Delete.
1701 (sim_config_default): New function.
1702 (sim_config): Set STATE_ENVIRONMENT, not current_environment.
1703 * sim-config.h (current_environment,CURRENT_ENVIRONMENT): Delete.
1704 (sim_config_default): Add prototype.
1705 * sim-module.c (sim_pre_argv_init): Call sim_config_default.
1706 * sim-options.c (standard_option_handler, case OPTION_ENVIRONMENT):
1707 Set STATE_ENVIRONMENT, not current_environment.
1708
1709Mon Mar 9 11:59:03 1998 Jim Wilson <wilson@cygnus.com>
1710
1711 * sim-fpu.c (NR_GUARDS64): Change NR_PAD32 to NR_PAD64.
1712
1713Tue Mar 3 10:53:05 1998 Andrew Cagney <cagney@b1.cygnus.com>
1714
1715 * sim-types.h (SIGNED32, SIGNED64): Pacify GCC.
1716
1717 * sim-alu.h (ALU64_BEGIN): Make alu64_r unsigned.
1718
1719Mon Mar 2 10:20:06 1998 Doug Evans <devans@seba.cygnus.com>
1720
1721 * Make-common.in (TAGS): Make smarter.
1722 * Makefile.in (TAGS): Ditto.
1723
1724Fri Feb 27 19:09:57 1998 Doug Evans <devans@canuck.cygnus.com>
1725
1726 * sim-module.c (*): Fix typos in assertion tests.
1727
1728Sat Feb 28 13:54:10 1998 Andrew Cagney <cagney@b1.cygnus.com>
1729
1730 * sim-module.c (sim_pre_argv_init): String passed to asprintf
1731 can't be constant.
1732
1733 * sim-options.c (sim_parse_args): Ditto.
1734 (sim_args_command): Return OK, instead of nothing, for an empty
1735 command.
1736
1737Fri Feb 27 13:29:13 1998 Andrew Cagney <cagney@b1.cygnus.com>
1738
1739 * sim-profile.c (profile_info): Rename from profile_print. Drop
1740 misc and misc_cpu callback arguments. Use
1741 PROFILE_INFO_CPU_CALLBACK and STATE_PROFILE_INFO_CALLBACK instead.
1742 (profile_install): Install profile_info function.
1743
1744 * sim-profile.h (PROFILE_INFO_CPU_CALLBACK,
1745 STATE_PROFILE_INFO_CALLBACK): Define.
1746 (struct PROFILE_DATA): Add field info_cpu_callback.
1747 (profile_print): Delete function.
1748
1749 * sim-base.h (STATE_MODULES): Define. Replace individual
1750 STATE_*_LIST with single struct module_list.
1751
1752 * sim-module.h (MODULE_INFO_FN, MODULE_INFO_LIST): Declare.
1753 (struct module_list): Declare.
1754
1755 * sim-module.h, sim-module.c (sim_module_add_info_fn,
1756 sim_module_info): New functions.
1757 (sim_module_install): Clean up module data structures.
1758
1759 * sim-info.c (sim_info): New file. New function. Call
1760 sim_module_info.
1761
1762 * Make-common.in (sim-info.o): Define rule.
1763 (SIM_NEW_COMMON_OBJS): Add sim-info.o.
1764
1765
1766Fri Feb 27 18:26:16 1998 Doug Evans <devans@canuck.cygnus.com>
1767
1768 * sim-base.h (sim_cpu_base): New members name, options.
1769 (sim_cpu_lookup): Add prototype.
1770 * sim-module.c (sim_pre_argv_init): Provide default names for cpus.
1771 * sim-options.h (DECLARE_OPTION_HANDLER): New argument `cpu'.
1772 (sim_add_option_table): Update prototype.
1773 * sim-options.c (sim_add_option_table): New argument `cpu'.
1774 (standard_option_handler,standard_install): Update.
1775 (sim_parse_args): Handle cpu specific options.
1776 (print_help): New static function.
1777 (sim_print_help): Call it. Print cpu specific options.
1778 (find_match): New static function.
1779 (sim_args_command): Call it. Handle cpu specific options.
1780 * sim-utils.c (sim_cpu_lookup): New function.
1781 * sim-memopt.c (memory_option_handler): Update.
1782 (sim_memopt_install): Update.
1783 * sim-model.c (model_option_handler): Update.
1784 (model_install): Update.
1785 * sim-profile.c (profile_option_handler): Update.
1786 (profile_install): Update.
1787 * sim-trace.c (trace_option_handler): Update.
1788 (trace_install): Update.
1789 * sim-watch.c (watchpoint_option_handler): Update.
1790 (sim_watchpoint_install): Update.
1791 * cgen-scache.c (scache_option_handler): Update.
1792 (scache_install): Update.
1793
1794Wed Feb 25 11:00:26 1998 Doug Evans <devans@canuck.cygnus.com>
1795
1796 * Make-common.in (check): Run `make check' in testsuite dir.
1797
1798Wed Feb 25 14:40:24 1998 Andrew Cagney <cagney@b1.cygnus.com>
1799
1800 * sim-trace.c (trace_result0): New function.
1801
1802 * sim-trace.h (TRACE_FP_*, TRACE_FPU_*): Rename TRACE_FPU_*
1803 macro's to TRACE_FP_*. TRACE_FPU_* should be defined and used when
1804 tracing sim_fpu variables.
1805 (TRACE_ALU_RESULT0): Define.
1806 (TRACE_FP_RESULT_WORD): Define.
1807 (TRACE_FP_INPUT_WORD1): Define.
1808
1809 * sim-fpu.c, sim-fpu.h (sim_fpu_max32, sim_fpu_max64, sim_fpu_one,
1810 sim_fpu_two): New constants.
1811 (sim_fpu_op1, sim_fpu_op2): New types.
1812 (struct _sim_fpu): Delete member result. Re-order other members.
1813 (sim_fpu_sign, sim_fpu_exp): New functions.
1814 (sim_fpu_max, sim_fpu_min): new functions.
1815 (EXPMAX32, EXPMAX64, NR_PAD32, NR_PAD64, NR_GUARDS32, NR_GUARDS64,
1816 NORMAL_EXPMAX32, NORMAL_EXPMAX64): Define.
1817
1818Tue Feb 24 22:45:39 1998 Doug Evans <devans@seba.cygnus.com>
1819
1820 * sim-profile.c (profile_print): Delete duplicate test of
1821 PROFILE_INSN_IDX.
1822 (profile_print_pc): Exit early if data collection not set up.
1823 (profile_print_core): Simplify by calling sim_core_map_to_str.
1824 * sim-core.h (sim_core_map_to_str): Declare.
1825 * sim-core.c (sim_core_map_to_str): Make non-static.
1826
1827 * genmloop.sh (engine_resume): Update insn_count before exiting.
1828 (engine_resume_full): Keep accurate core profile data.
1829
1830 * cgen-utils.c (sim_disassemble_insn): Don't use
1831 sim_core_read_aligned_N, it messes up profiling results.
1832
1833Mon Feb 23 20:45:57 1998 Mark Alexander <marka@cygnus.com>
1834
1835 * nltvals.def: Regenerate with MN10300 additions.
1836
1837Tue Feb 24 13:18:42 1998 Andrew Cagney <cagney@b1.cygnus.com>
1838
1839 * sim-trace.h (TRACE_ALU_RESULT2): Define.
1840
1841 * sim-trace.h, sim-trace.c (trace_result_word2,
1842 trace_input_word4, trace_result_word4): New function.
1843
1844Mon Feb 23 13:08:35 1998 Doug Evans <devans@canuck.cygnus.com>
1845
1846 * cgen-sim.h (SEM_NEXT_PC): New arg `len'.
1847
1848 * sim-xcat.h: Delete.
1849 * cgen-mem.h: Delete inclusion of sim-xcat.h.
1850 * cgen-sim.h: Ditto.
1851 * sim-alu.h: Replace sim-xcat.h with symcat.h.
1852 * sim-n-bits.h: Ditto.
1853 * sim-n-core.h: Ditto.
1854 * sim-n-endian.h: Ditto.
1855
1856Mon Feb 23 13:19:58 1998 Michael Meissner <meissner@cygnus.com>
1857
1858 * syscall.c (cb_syscall): Handle short reads, and EOF.
1859
1860Tue Feb 24 00:29:57 1998 Andrew Cagney <cagney@b1.cygnus.com>
1861
1862 * sim-trace.c (print_data): case trace_fmt_fp missing break. Use
1863 sim_fpu to safely print fp_word values.
1864 (print_data): Add trace_fmt_bool and trace_fmt_addr.
1865 (trace_result_bool1, trace_result_addr1): New functions.
1866 (trace_input_bool1, trace_input_addr1): New functions.
1867
1868 * sim-trace.h (TRACE_FPU_*): Define.
1869
1870Mon Feb 23 13:24:54 1998 Andrew Cagney <cagney@b1.cygnus.com>
1871
1872 * sim-fpu.h (enum sim_fpu_class): Add sim_fpu_class_denorm.
1873 (sim_fpu_fpto, sim_fpu_tofp): Define.
1874
1875Fri Feb 20 18:08:51 1998 Andrew Cagney <cagney@b1.cygnus.com>
1876
1877 * sim-fpu.c (sim_fpu_cmp): New function.
1878
1879Wed Feb 18 16:29:21 1998 Doug Evans <devans@canuck.cygnus.com>
1880
1881 * cgen-utils.h (sim_disassemble_insn): Use CGEN_INSN_BITSIZE
1882 instead of abuf->length.
1883 * sim-trace.c (trace_options): Have -t only trace a few useful things.
1884 (set_trace_option_mask): Renamed from set_trace_options.
1885 (set_trace_option): New function.
1886 (trace_option_handler): Update calls to set_trace_option{,_mask}.
1887 * sim-trace.h (TRACE_USEFUL_MASK): New macro.
1888
1889Wed Feb 18 12:42:15 1998 Andrew Cagney <cagney@b1.cygnus.com>
1890
1891 * sim-basics.h: Declare struct _sim_fpu.
1892
1893Tue Feb 17 16:27:46 1998 Andrew Cagney <cagney@b1.cygnus.com>
1894
1895 * sim-trace.h (TRACE_ALU_INPUT*, TRACE_ALU_RESULT): Define.
1896 (trace_prefix, trace_input*, trace_result*): Declare.
1897 (trace_one_insn): Change declaration, assume trace_prefix called.
1898 (trace_generic): Like trace_one_insn.
1899 (TRACE_ALU_IDX, TRACE_*_IDX): Change #define's to enum.
1900 (TRACE_alu, TRACE_[a-z]*): Update.
1901
1902 * sim-trace.c (trace_prefix, trace_input*, trace_result*,
1903 trace_insn, save_data, trace_idx_to_str, print_data): New
1904 functions.
1905 (trace_one_insn): Rewrite.
1906 (trace_generic): New function.
1907
1908Tue Feb 17 17:27:30 1998 Doug Evans <devans@seba.cygnus.com>
1909
c906108c
SS
1910 * aclocal.m4 (USE_MAINTAINER_MODE): New variable.
1911
1912 * cgen-sim.h (SEMANTIC_CACHE_FN): Delete.
1913 (SEMANTIC_FN): Rewrite declaration.
1914 (DECODE): Update type of semantic_fast member.
1915 ({EX,SEM}_FN_NAME): Have only one version.
c906108c
SS
1916 * sim-base.h (sim_state_base): Delete conditionals surrounding
1917 member scache_size.
1918
1919Tue Feb 10 18:31:49 1998 Andrew Cagney <cagney@b1.cygnus.com>
1920
1921 * sim-load.c (sim_load_file): Print LMA/VMA according to value
1922 used.
1923
1924Tue Feb 10 14:56:23 1998 Ian Carmichael <iancarm@cygnus.com>
1925
1926 * sim-core.c: Add missing prototypes for WITH_DEVICES.
1927 Add missing parameters to device_io calls.
1928 * sim-core.h: Add missing parameters to device_io calls.
1929
1930Mon Feb 9 14:48:37 1998 Doug Evans <devans@canuck.cygnus.com>
1931
1932 * cgen-sim.h (DECODE): Always use switch for `read' for now.
1933 (PAREXEC): Renamed from PARALLEL_EXEC. All uses updated.
1934 (SEMANTIC{,_CACHE}_FN): Fix return type.
c906108c
SS
1935 * genmloop.sh (@cpu@_engine_run): Delete `current_state'.
1936 (engine_resume): Likewise. Make `engine' volatile. Save copy
1937 of cpu pointer in volatile object. Initialize read switch if
1938 -parallel.
1939
1940Thu Feb 5 13:27:04 1998 Doug Evans <devans@seba.cygnus.com>
1941
1942 * cgen-sim.h (EX_FN_NAME): _exc_ -> _ex_.
1943 (SEM_INSN): New macro.
1944
1945Tue Feb 3 16:31:56 1998 Andrew Cagney <cagney@b1.cygnus.com>
1946
1947 * sim-run.c (sim_engine_run): Assume IMEM is 32 bit.
1948
1949Sun Feb 1 16:47:51 1998 Andrew Cagney <cagney@b1.cygnus.com>
1950
1951 * configure: Regenerated to track ../common/aclocal.m4 changes.
1952
1953Sun Feb 1 16:16:57 1998 Andrew Cagney <cagney@b1.cygnus.com>
1954
1955 * sim-types.h (fp_word): New type, define according to
1956 WITH_TARGET_FLOATING_POINT_BITSIZE.
1957
1958 * aclocal.m4 (default_sim_floating_point_bitsize): Add
1959 configuration of size of floating point registers.
1960
1961Sun Feb 1 14:02:31 1998 Andrew Cagney <cagney@b1.cygnus.com>
1962
1963 * sim-profile.c (profile_print): Only print CPU <N> if other
1964 output is going to appear.
1965
1966Sat Jan 31 18:15:41 1998 Andrew Cagney <cagney@b1.cygnus.com>
1967
1968 * configure: Regenerated to track ../common/aclocal.m4 changes.
1969
1970Sat Jan 31 18:03:55 1998 Andrew Cagney <cagney@b1.cygnus.com>
1971
1972 * sim-types.h (address_word): Typedef according to
1973 WITH_TARGET_ADDRESS_BITSIZE.
1974 (signed_cell, unsigned_cell, natural_cell): Ditto using
1975 WITH_TARGET_CELL_BITSIZE.
1976
1977 * sim-config.h (WITH_TARGET_ADDRESS_BITSIZE): Define.
1978 (WITH_TARGET_CELL_BITSIZE): Define.
1979 (WITH_HOST_WORD_BITSIZE): Delete.
1980
1981 * sim-config.c (print_sim_config): Update.
1982
1983 * aclocal.m4 (SIM_AC_OPTION_BITSIZE): Add support for
1984 configuration of address and OpenFirmware cell sizes.
1985
1986Fri Jan 30 09:36:33 1998 Andrew Cagney <cagney@b1.cygnus.com>
1987
1988 * sim-engine.h (sim_engine_run): Add argument nr_cpus.
1989 * sim-run.c (sim_engine_run): Update.
1990
1991 * sim-engine.h (SIM_ENGINE_HALT_HOOK): Use SET_CPU_CIA instead of
1992 CPU_CIA.
1993 * sim-run.c (sim_engine_run): Ditto.
1994
1995 * sim-resume.c (sim_resume): Obtain nr_cpus from sim_engine.
1996 (sim_resume): Pass nr_cpus to sim_engine_run.
1997
1998 * sim-engine.h (struct _sim_engine): Add member nr_cpus.
1999
2000 * sim-engine.c (sim_engine_init): Hardwire nr_cpus to
2001 MAX_NR_PROCESSORS.
2002 (sim_engine_nr_cpus) sim-engine.c, sim-engine.h: New function
2003
c906108c
SS
2004Fri Jan 23 14:20:54 1998 Doug Evans <devans@seba.cygnus.com>
2005
2006 * Make-common.in (stamp-tvals): New rule.
2007 (targ-vals.h,targ-map.c): Depend on it.
2008 (clean): Remove stamp-tvals.
2009
2010Tue Jan 20 21:35:13 1998 Michael Meissner <meissner@cygnus.com>
2011
2012 * sim-utils.c (sim_state_alloc): #if 0 variable that is only used
2013 in code also #if 0'ed.
2014
2015Mon Jan 19 22:26:29 1998 Doug Evans <devans@seba>
2016
2017 * configure: Regenerated to track ../common/aclocal.m4 changes.
2018 * aclocal.m4: Recognize --enable-maintainer-mode.
2019
2020Mon Jan 19 12:45:45 1998 Doug Evans <devans@seba.cygnus.com>
2021
2022 * cgen-scache.h: Deleted.
2023 * Make-common.in (cgen-run.o,cgen-scache.o): Delete cgen-scache.h dep.
c906108c
SS
2024 * cgen-scache.c: Only compile contents if WITH_SCACHE.
2025 (scache_init): Use runtime computed size of SCACHE.
2026 (scache_flush): Likewise.
2027 * cgen-mem.h (GETIMEMU[QHSD]I): Declare.
2028 ([GS]ETT{QI,UQI,HI,UHI,SI,USI,DI,UDI}): Declare.
2029 * cgen-sim.h: Scache support moved here.
2030 (PC): Redo definition.
2031 (ARGBUF,SCACHE,PARALLEL_EXEC): Provide forward decls.
2032 (DECODE): Add parallel execution support.
2033 Only include semantic label members if using switch.
2034 (SWITCH,CASE,BREAK,DEFAULT,ENDSWITCH): Portable computed goto support.
2035 (CGEN_CPU): Delete members exec_state, halt_sigrc, halt_jmp_buf.
2036 (IADDR,CIA,SEM_ARG,EX_FN_NAME,SEM_FN_NAME,RECORD_IADDR,SEM_ARGBUF,
2037 SEM_NEXT_PC,SEM_BRANCH_VIA_{CACHE,ADDR},SEM_NEW_PC_ADDR): Moved here
2038 from cgen-types.h.
2039 (engine_{stop,run,resume,halt,signal}): Delete decls.
2040 * cgen-types.h (CGEN_{XCAT3,CAT3}): Delete.
2041 (argbuf,scache): Delete forward decls.
2042 (STATE): Delete decl.
2043 * cgen-utils.c: Don't include decode.h, mem-ops.h, sem-ops.h.
2044 Include cgen-mem.h, cgen-ops.h.
2045 (engine_halt,engine_signal): Delete.
2046 ({ex,exc,sem,semc}_illegal): Delete.
2047 (sim_disassemble_insn): Result of extract fn is in bits.
2048 * genmloop.sh: Rewrite.
2049
2050 * cgen-trace.c (trace_insn): Set printed_result_p=0 if not tracing
2051 line numbers.
2052
2053 * sim-base.h (sim_state_base): Delete member `model'.
2054 (sim_cpu_base): Add member `model'.
2055 * sim-model.h (IMP_PROPERTIES): New type.
2056 (MACH): New members imp_props, models.
2057 (models): Delete decl.
2058 * sim-model.c (set_model): Update.
2059 * sim-profile.c (profile_print_model): Update.
2060
2061 * sim-utils.c (sim_state_alloc): Delete setting of cpu backlink here.
2062
2063Fri Jan 16 12:33:09 1998 Nick Clifton <nickc@cygnus.com>
2064
2065 * cgen-trace.c (trace_insn): Call CGEN_INSN_MNEMONIC() rather than
2066 CGEN_INSN_SYNTAX().
2067
2068Mon Dec 15 23:17:11 1997 Andrew Cagney <cagney@b1.cygnus.com>
2069
2070 * configure: Regenerated to track ../common/aclocal.m4 changes.
2071 * config.in: Ditto.
2072
2073Mon Dec 15 23:16:03 1997 Andrew Cagney <cagney@b1.cygnus.com>
2074
2075 * aclocal.m4 (AR): Check for sigaction.
2076
2077Thu Dec 4 09:21:05 1997 Doug Evans <devans@canuck.cygnus.com>
2078
2079 * Make-common.in (sim-core.o): Depend on $(sim_main_headers).
2080
2081 * sim-config.h (WITH_TREE_PROPERTIES): Define as 0.
2082 * sim-config.c (sim_config): Replace WITH_DEVICES with
2083 WITH_TREE_PROPERTIES.
2084
2085 * configure: Regenerated to track ../common/aclocal.m4 changes.
2086
2087Wed Dec 3 17:56:02 1997 Doug Evans <devans@canuck.cygnus.com>
2088
2089 * Make-common.in (SIM_ENVIRONMENT): New variable.
2090 (CONFIG_CFLAGS): Add it.
2091 * aclocal.m4 (SIM_AC_OPTION_ENVIRONMENT): Handle
2092 --enable-sim-environment option.
2093 * configure: Regenerated.
2094 * sim-config.h (environment support): Rewrite.
2095 * sim-config.c (current_environment): Define as enum, unconditionally.
2096 (current_alignment): Define unconditionally.
2097 (config_environment_to_a): Update.
2098 (config_alignment_to_a): Fix type of argument. Define unconditionally.
2099 (sim_config): Handle environment and alignment determination
2100 unconditionally. Delete sanity checks of current_environment,
2101 unnecessary.
2102 (print_sim_config): Update.
2103 * sim-options.c (STANDARD_OPTIONS enum): Add OPTION_ENVIRONMENT.
2104 (standard_options): Add --environment.
2105 (standard_option_handler): Likewise.
2106
2107Fri Nov 28 12:21:25 1997 Andrew Cagney <cagney@b1.cygnus.com>
2108
2109 * sim-alu.h: Add notes on carry vs borrow for subtraction.
2110 (ALU{,8,16,32,64}ADD): Redefine ADD macro as add overflowing.
2111 (ALU{,8,16,32,64}ADDC): Define - add carrying.
2112 (ALU{,8,16,32,64}SUB): Redefine SUB macro as subtract overflowing.
2113 (ALU{,8,16,32,64}SUBB): Define - subtract borrowing.
2114 (ALU{,8,16,32,64}SUBC): Define - tract carrying.
2115 (ALU{,8,16,32,64}ADD_CA, ALU{,8,16,32,64}ADDC_C): Replace single
2116 argument ADD_CA macro with two argument ADDC_C - add carrying with
2117 carry in.
2118 (ALU{,8,16,32,64}SUB_CA, ALU{,8,16,32,64}SUBC_X): Replace single
2119 argument SUB_CA macro with two argument SUBC_X - subtract
2120 carrying, extended.
2121 (ALU{,8,16,32,64}SUBB_B): Define - subtract borrowing with
2122 borrow-in.
2123 (ALU{,8,16,32,64}NEGC, ALU{,8,16,32,64}NEGB): Define.
2124
2125Sun Nov 30 17:40:57 1997 Michael Meissner <meissner@cygnus.com>
2126
2127 * sim-io.c (sim_io_{syscalls,getstring}): Delete. No longer used.
2128 * sim-io.h (sim_io_syscalls): Delete.
2129
2130Fri Nov 28 20:10:09 1997 Michael Meissner <meissner@cygnus.com>
2131
2132 * syscall.c (cb_syscall): Add missing else, so write to stdout
2133 isn't doubled.
2134
2135 * sim-alu.h (ALU{,8,16,32,64}_SET_CARRY): Provide macros to import
2136 the carry bit from the CPU's psw.
2137
2138Fri Nov 28 11:15:05 1997 Doug Evans <devans@canuck.cygnus.com>
2139
2140 * gennltvals.sh: Redo syscall support.
2141 * nltvals.def: Regenerated.
2142
2143Wed Nov 26 16:49:38 1997 Michael Meissner <meissner@cygnus.com>
2144
2145 * syscall.c (cb_syscall): If writing to stdout or stderr, flush
2146 the stream immediately.
2147
2148Wed Nov 26 12:32:11 1997 Andrew Cagney <cagney@b1.cygnus.com>
2149
2150 * sim-io.c (sim_io_getstring): Delete unused len2.
2151 (sim_io_syscalls): Ditto for sys_errno.
2152
2153Wed Nov 26 11:18:40 1997 Doug Evans <devans@canuck.cygnus.com>
2154
2155 * syscall.c (cb_syscall): Test CB_SYSCALL struct magic number.
2156
2157 * Make-common.in (run.o): Depend on remote-sim.h.
2158 (nrun.o,sim-hload.o,sim-hrw.o): Likewise.
2159 (sim-io.o,sim-reason.o,sim-resume.o): Likewise.
2160
2161Tue Nov 25 20:12:46 1997 Michael Meissner <meissner@cygnus.com>
2162
2163 * sim-io.c (sim_io_syscalls): Disable lseek.
2164
2165Tue Nov 25 00:12:38 1997 Doug Evans <devans@seba.cygnus.com>
2166
2167 * gennltvals.sh: Generate syscall values for d30v.
2168
2169 * gennltvals.sh: Use libgloss/syscall.h for sparc.
2170 * nltvals.def: Regenerate.
2171
2172 * callback.c (os_stat): Make 3rd arg a host struct stat ptr.
2173 (os_fstat): Likewise. Validate fd argument.
2174 (cb_host_to_target_stat): Delete big_p arg. If HS arg is NULL,
2175 just compute target stat struct length.
2176 * syscall.c: #include "libiberty.h", <sys/types.h>, <sys/stat.h>.
2177 (ENOSYS,ENAMETOOLONG): Provide definitions if missing.
2178 (get_string): Return host errno values so they can be properly
2179 translated later.
2180 (cb_syscall): Likewise.
2181 (cb_syscall, cases open,unlink): Use get_path instead of get_string.
2182 (cb_syscall, case read): Use read_stdin for file descriptor 0.
2183 (cb_syscall, case write): Use write_stderr for file descriptor 2.
2184 (cb_syscall): Add cases for lseek, unlink, stat, fstat, time.
2185 (get_path): New function.
2186
2187Mon Nov 24 18:56:07 1997 Michael Meissner <meissner@cygnus.com>
2188
2189 * sim-io.c (sim_io_syscalls): New function to provide system call
2190 emulation. Provide exit, open, close, read, write, lseek, and
2191 unlink.
2192 (sim_io_getstring): New function to return a string from a
2193 simulated memory location.
2194
2195 * sim-io.h (sim_io_syscalls): Add declaration.
2196
2197Mon Nov 24 12:09:59 1997 Doug Evans <devans@seba.cygnus.com>
2198
2199 * sim-core.c (sim_core_signal): Fix spelling error in message.
2200
2201 * sim-hrw.c (sim_read): Use read map, not write map.
2202
2203 * Make-common.in (all): Add .gdbinit.
2204 * gdbinit.in: Add dump command.
2205
2206 * sim-model.c (model_options): Use '\0' for `shortopt'.
2207
2208 * sim-trace.c (trace_option_handler): Set state trace file
2209 for --trace-file in addition to cpu's values.
2210 (trace_vprintf): If cpu == NULL, try state's trace file.
2211 (trace_options): Reorganize table, reword some descriptions.
2212
2213Sun Nov 23 10:57:00 1997 Andrew Cagney <cagney@b1.cygnus.com>
2214
2215 * sim-fpu.c (sim_fpu_abs, sim_fpu_neg, sim_fpu_inv), sim-fpu.h:
2216 New functions.
2217
2218Sat Nov 22 19:16:54 1997 Andrew Cagney <cagney@b1.cygnus.com>
2219
2220 * sim-reason.c (sim_stop_reason): For sim_signalled, return the
2221 signal untranslated, document problem with this.
2222
2223 * nrun.c (main): Check for a prog name of `*step'. If present,
2224 step the simulator instead of allowing it to run free.
2225
2226 * sim-signal.c (SIGQUIT): Define on _MSC_VER hosts.
2227
2228 * Make-common.in (sim_main_headers): Add sim-signal.h.
2229
2230Fri Nov 21 09:32:32 1997 Andrew Cagney <cagney@b1.cygnus.com>
2231
2232 * sim-signal.c (sim_signal_to_host): Return 0 for SIM_SIGNONE.
2233
2234Thu Nov 20 20:35:20 1997 Andrew Cagney <cagney@b1.cygnus.com>
2235
2236 * sim-signal.h: Start simulator signals at 64 so that host signal
2237 numbers can be detected and reported.
2238
2239 * sim-signal.h (SIM_SIGFPE), sim-signal.h: Add signal.
2240
2241Wed Nov 19 12:02:41 1997 Doug Evans <devans@seba.cygnus.com>
2242
2243 * callback.c (cb_host_to_target_stat): Fix return values.
2244
2245 * cgen-sim.h (enum_signal_type): Delete.
2246 (engine_signal): Update prototype.
2247 * cgen-utils.c: Don't include <signal.h>.
2248 (sim_signal_to_host): Delete, lives in sim-signal.c now.
2249 (engine_signal): Update.
2250
2251 * sim-utils.c (sim_state_alloc): Call SIM_STATE_ALLOC if defined.
2252 (sim_state_free): Call SIM_STATE_FREE if defined.
2253
2254 * sim-module.c (sim_module_install): Don't leave any modules
2255 installed if one fails to install.
2256
2257Wed Nov 19 13:25:48 1997 Michael Meissner <meissner@cygnus.com>
2258
2259 * sim-options.c: Don't include ../libiberty/alloca-conf.h any
2260 more, since alloca is not used in this file.
2261
2262 * sim-alu.h (ALU{32,64}_*): Rewrite 32 and 64 bit ALU support to
2263 correctly set the carry and overflow bits for those types.
2264 (ALU{8,16,32,64}_{ADD,SUB}_CA): Take VAL argument to add along
2265 with carry, so carry is correct after doing both adds.
2266 (ALU*): Space out '\' to make it easier to read.
2267
2268Tue Nov 18 15:53:45 1997 Doug Evans <devans@canuck.cygnus.com>
2269
2270 * sim-core.c (sim_core_signal): Use sim_stopped instead of
2271 sim_signalled.
2272
2273 * sim-signal.c, sim-signal.h: New files.
2274 * Make-common.in (sim-signal.o): Add rule for.
2275 (SIM_NEW_COMMON_OBJS): Add sim-signal.o.
2276 * sim-abort.c: Don't include <signal.h>.
2277 * sim-basics.h: #include "sim-signal.h".
2278 * sim-break.c: Don't include <signal.h>.
2279 (sim_handle_breakpoint): Replace SIGTRAP with SIM_SIGTRAP.
2280 * sim-core.c: Don't include <signal.h>.
2281 (SIGBUS): Delete definition.
2282 (sim_core_signal): Replace SIGSEGV,SIGBUS with SIM_SIGSEGV,SIM_SIGBUS.
2283 * sim-engine.c: Don't include <signal.h>.
2284 (sim_engine_abort): Replace SIGABRT with SIM_SIGABRT.
2285 * sim-reason.c (sim_stop_reason): Call sim_signal_to_host.
2286 * sim-resume.c: Don't include <signal.h>.
2287 (SIGTRAP): Delete definition.
2288 (has_stepped): Replace SIGTRAP with SIM_SIGTRAP.
2289 * sim-stop.c: Don't include <signal.h>.
2290 (control_c_simulation): Replace SIGINT with SIM_SIGINT.
2291 * sim-watch.c: Don't include <signal.h>.
2292 (handle_watchpoint): Replace SIGINT with SIM_SIGINT.
2293
2294 * Make-common.in (SIM_NEW_COMMON_OBJS): New variable.
2295
2296 * sim-base.h (CIA_ADDR): Provide default definition.
2297 * sim-core.c (sim_core_signal): Use CIA_ADDR to fetch value.
2298 * sim-break.c (sim_handle_breakpoint): Likewise.
2299
2300Mon Nov 17 14:15:31 1997 Doug Evans <devans@seba.cygnus.com>
2301
2302 * Make-common.in (srccom): New variable.
2303
2304 * Make-common.in (DEP, COMMON_DEP_CFLAGS): Define.
2305 (LIB_OBJS): Add syscall.o.
2306 (gentmap): Pass $(NL_TARGET) to $(CC).
2307 (syscall.o): Add rule for.
2308 (sim_main_headers): Add $(SIM_EXTRA_DEPS).
2309 (sim-bits.o): Depend on $(sim-n-bits_h).
2310 (sim-load.o): Depend on callback.h.
2311
2312 * Make-common.in (cgen-*.o): Update dependencies, mem-ops.h renamed to
2313 cgen-mem.h, sem-ops.h renamed to cgen-ops.h.
2314 * cgen-mem.h, cgen-ops.h: New files.
2315
2316 * aclocal.m4 (--enable-sim-scache): Pass -DWITH_SCACHE=0 for "=no".
2317
2318 * Makefile.in (nltvals.def): Depend on gennltvals.sh.
2319 Rewrite build rule.
2320 * callback.c: #include string.h or strings.h.
2321 #include sys/types.h and sys/stat.h.
2322 (cb_init_syscall_map,cb_init_errno_map,cb_init_open_map): Declare.
2323 (os_get_errno,os_open): Update.
2324 (os_stat,os_fstat): New functions.
2325 (os_init): Initialize syscall_map, errno_map, open_map.
2326 (default_callback): Add entries for os_stat, os_fstat, syscall_map,
2327 errno_map, open_map, signal_map, stat_map.
2328 (cb_read_target_syscall_maps): New function.
2329 (cb_target_to_host_syscall): New function.
2330 (cb_host_to_target_errno): Renamed from host_to_target_errno.
2331 (cb_target_to_host_open): Renamed from target_to_host_open.
2332 (store): New function.
2333 (cb_host_to_target_stat): New function.
2334 * syscall.c: New file.
2335 * gentmap.c (sys_tdefs): New global.
2336 (gen_targ_vals_h): Output target syscall numbers.
2337 (gen_targ_map_c): Update. Output target syscall translation map.
2338 * gentvals.sh: New first argument `target'. Preface table with
2339 #ifdef NL_TARGET_$target if non-null target passed.
2340 * gennltvals.sh: New file.
2341 * nltvals.def: Regenerated.
2342
2343Fri Nov 14 11:33:34 1997 Andrew Cagney <cagney@b1.cygnus.com>
2344
2345 * sim-n-core.h (sim_core_read_unaligned_N): Return static
2346 sim_core_dummy_M.
2347 (sim_core_dummy_M): Declare.
2348
2349Wed Nov 12 18:16:15 1997 Andrew Cagney <cagney@b1.cygnus.com>
2350
2351 * sim-core.c (sim_core_signal): Print the address of the
2352 instruction.
2353
2354Thu Nov 13 11:49:41 1997 Doug Evans <devans@seba.cygnus.com>
2355
2356 * sim-base.h (sim_state_base): Move `magic' to end of struct.
2357
2358 * sim-base.h (sim_state_base): Add member trace_data.
2359 (STATE_TRACE_DATA): New macro.
2360 * sim-trace.h (TRACE_DEBUG_IDX,TRACE_debug): New macros.
2361 ({WITH_,}TRACE_DEBUG_P): New macros.
2362 (STATE_TRACE_FLAGS,STRACE_P,STRACE_DEBUG_P): New macros.
2363 (_sim_cpu): Delete forward reference.
2364 (debug_printf): Update.
2365 * sim-trace.c (OPTION_TRACE_DEBUG): Define.
2366 (trace_options): Add --trace-debug.
2367 (set_trace_options): Handle it.
2368 (trace_option_handler): Likewise.
2369 (trace_install): Init state trace_data struct.
2370 (trace_uninstall): Close state trace file.
2371 * sim-events.c (ETRACE): Only print source file and line number if
2372 --trace-debug.
2373 * sim-n-core.h (sim_core_trace_M): Likewise.
2374
2375 * sim-core.c (sim_core_signal): Add missing "\n" in message.
2376
23771997-11-13 Felix Lee <flee@cygnus.com>
2378
2379 * sim-n-core.h (sim_core_read_unaligned_N): illegal empty
2380 initializer.
2381 * sim-types.h (unsigned128,signed128): fix typo for MSVC.
2382
2383Wed Nov 12 12:18:08 1997 Doug Evans <devans@canuck.cygnus.com>
2384
2385 * aclocal.m4 (SIM_AC_OPTION_SCACHE): Fix typo.
2386
2387 * Make-common.in (BUILT_SRC_FROM_COMMON): Remove files no longer
2388 built this way.
2389 (sim-config.o): Remove non-existent $(sim-nconfig_h) dependency.
2390 (clean): Don't delete $(BUILT_SRC_FROM_COMMON) if building in
2391 source tree.
2392
2393Tue Nov 11 13:28:02 1997 Andrew Cagney <cagney@b1.cygnus.com>
2394
2395 * sim-events.c (sim_events_process): Re-compute the time -
2396 update_time_from_event - as each event is processed. Reverses
2397 previous change.
2398
2399Fri Nov 7 00:37:36 1997 Andrew Cagney <cagney@b1.cygnus.com>
2400
2401 * callback.c (os_poll_quit): Replace _WIN32 with _MSC_VER.
2402
2403Fri Nov 7 00:37:36 1997 Andrew Cagney <cagney@b1.cygnus.com>
2404
2405 * sim-events.c (sim_events_process): Delete redundant call to
2406 update_time_from_event.
2407 (sim_events_slip): Always decrement time_from_event.
2408 (sim_events_tick, sim_events_deschedule, update_time_from_event):
2409 Delete assertion that time_from_event >=0 when work in queue, no
2410 longer applicable.
2411
2412Thu Nov 6 12:06:46 1997 Andrew Cagney <cagney@b1.cygnus.com>
2413
2414 * sim-options.c (STANDARD_OPTIONS): Change OPTION_* to an enum.
2415 (standard_option_handler): Update.
2416
2417 * sim-options.h: Clarify documentation.
2418 (OPTION_LONG_ONLY_P): Delete definition.
2419 (OPTION_VALID_P): Define.
2420
2421 * sim-options.c (sim_print_help): Allow short only options.
2422 (sim_parse_args): Ditto.
2423 (sim_args_command): Skip short only options.
2424 (sim_parse_args): Allocate space for NUM_OPTS not just 256. Make
2425 separate entries for short and long options in the HANDLERS and
2426 ORIG_VAL tables.
2427 (sim_parse_args): Disable argument permutation.
2428
2429Wed Nov 5 13:40:31 1997 Andrew Cagney <cagney@b1.cygnus.com>
2430
2431 * sim-core.h (DECLARE_SIM_CORE_WRITE_N. DECLARE_SIM_CORE_READ_N):
2432 Add argument M, size of data type.
2433 (sim_core_read_misaligned_3, sim_core_write_misaligned_3):
2434 Declare, ditto for 5, 6 & 7 byte transfers.
2435 (sim_core_write_unaligned_1, sim_core_write_unaligned_1): Define
2436 as aligned variant.
2437
2438 * sim-n-core.h (sim_core_trace_M): Rename from
2439 sim_core_trace_N. Add nr_bytes argument. Replace transfer argument
2440 with transfer type. Print transfer direction. Handle 1 and 2 byte
2441 transfers.
2442 (sim_core_read_unaligned_N, sim_core_write_unaligned_N): Trace
2443 unaligned accesses.
2444 (unsigned_M, T2H_M, H2T_M): Rename from unsigned_N, T2H_N, H2T_N.
2445 Update all functions.
2446
2447 * sim-core.c: Generate functions starting with 16 not 1.
2448 (sim_core_read_unaligned_3): Generate. Ditto for 3 byte write and
2449 all 5, 6 & 7 byte transfers.
2450
2451 * sim-n-core.h (sim_core_read_misaligned_N,
2452 sim_core_write_misaligned_N): Implement.
2453
2454Mon Nov 3 15:03:04 1997 Andrew Cagney <cagney@b1.cygnus.com>
2455
2456 * sim-endian.h (U16_8): Implement
2457
2458 * sim-endian.c (sim_endian_split_16, sim_endian_join_16): New functions
2459
2460 * sim-endian.h (VL8_16, VH8_16): Implement.
2461
2462 * sim-memopt.c (memory_option_handler): Typecast 64bit value to
2463 long in printf.
2464 (memory_option_handler): Only zalloc modulo bytes when non-zero.
2465 (memory_option_handler): Skip comma in alias address list
2466
2467Fri Oct 31 13:03:33 1997 Andrew Cagney <cagney@b1.cygnus.com>
2468
2469 * sim-memopt.c (do_memopt_add, do_memopt_delete): Add level and
2470 space params.
2471 (parse_size, parse_addr): New functions
2472 (memory_option_handler, memory_options): Parse address & size
2473 using new functions. Pass level, space, modulo to do_memopt_add &
2474 do_memopt_del.
2475
2476 * sim-memopt.h (struct _sim_memopt): Add level & space fields.
2477
2478 * sim-core.h (sim_core_arrach, sim_core_detach): Replace
2479 `attach_type attach' argument with `unsigned level' argument.
2480 Document.
2481
2482 * sim-core.c (new_sim_core_mapping, sim_core_map_attach,
2483 sim_core_attach): Replace argument attach with level. Update
2484 verification of arguments.
2485 (sim_core_map_detach, sim_core_detach): Replace argument attach
2486 with level.
2487
2488 * sim-basics.h (enum _attach_type): Delete.
2489
2490Thu Oct 30 13:45:00 1997 Doug Evans <devans@seba.cygnus.com>
2491
2492 * sim-core.h (sim_core_write_8): Define.
2493
2494Tue Oct 28 12:29:22 1997 Andrew Cagney <cagney@b1.cygnus.com>
2495
2496 * sim-bits.h: Document ROTn macro.
2497
2498 * sim-endian.h (H2T): Handle 16 byte variables.
2499
2500 * sim-n-core.h (sim_core_read_unaligned_N): Return a dummy when an
2501 error.
2502
2503 * sim-core.c: Do not generate sim_core_*_word.
2504
2505 * sim-n-core.h (sim_core_trace_N): Add line_nr argument.
2506 (sim_core_write_aligned_N, sim_core_read_aligned_N): Update.
2507
2508 * sim-core.h (sim_core_read_unaligned_word,
2509 sim_core_read_aligned_word, sim_core_read_word,
2510 sim_core_write_unaligned_word, sim_core_write_aligned_word,
2511 sim_core_write_word): Change to macros that map onto sim_core_*_N.
2512
2513Mon Oct 27 11:25:10 1997 Doug Evans <devans@canuck.cygnus.com>
2514
2515 * sim-n-endian.h: Add TAGS entrys for 16 byte versions.
2516
2517 * sim-endian.h: Disable 16 byte support.
2518
2519Mon Oct 27 12:00:48 1997 Andrew Cagney <cagney@b1.cygnus.com>
2520
2521 * sim-endian.c (_SWAP_16): Define. Generate 126 bit swap code.
2522
2523 * sim-n-core.h (sim_core_trace_N): New function.
2524 (sim_core_read_aligned_N, sim_core_write_aligned_N): Use,
2525 (sim_core_read_unaligned_N): Do not retyrn bogus value wden error.
2526
2527 * sim-endian.h: Add 128 bit variant.
2528
2529 * sim-core.h, sim-core.c: Add 128 bit variant.
2530
2531 * sim-types.h: Add signed128 and unsigned128 types using a struct.
2532
2533Fri Oct 24 11:33:07 1997 Andrew Cagney <cagney@b1.cygnus.com>
2534
2535 * sim-events.c (sim_events_process): Clear events->work_pending.
2536 (sim_events_tickn, sim_events_tick): Accumulate, instead of
2537 setting, nr_ticks_to_process.
2538 (sim_events_preprocess): Allow nr_ticks_to_process to be non-zero
2539 when the event queue isn't next.
2540
2541 * sim-events.h, sim-events.c (sim_events_slip): New function.
2542
2543Wed Oct 22 14:18:38 1997 Andrew Cagney <cagney@b1.cygnus.com>
2544
2545 * sim-hload.c (sim_load): Pass lma_p==0 and do_load=sim_load.
2546
2547 * sim-utils.h, sim-load.c (sim_load_file): Add lma_p and do_load
2548 arguments.
2549
2550Tue Oct 21 18:37:57 1997 Doug Evans <devans@canuck.cygnus.com>
2551
2552 * nrun.c (main): Remove useless test of name != NULL.
2553 Exit if bfd_openr fails. Call bfd_check_format after bfd_openr.
2554
2555Tue Oct 21 10:42:38 1997 Andrew Cagney <cagney@b1.cygnus.com>
2556
2557 * sim-fpu.c (EXPMAX): Type is unsigned.
2558 (MIN_INT, MAX_INT): Type is signed64.
2559 (i2fpu): Type of val is signed64.
2560
2561Tue Oct 21 10:42:38 1997 Andrew Cagney <cagney@b1.cygnus.com>
2562
2563 * sim-profile.h (PROFILE_PC_BUCKET_SIZE): Treat a shift of zero as
2564 a bucket size of zero.
2565
2566 * sim-profile.c (OPTION_PROFILE_PC_GRANULARITY,
2567 OPTION_PROFILE_PC): Define.
2568 (profile_option_handler): Add support for --profile-pc and
2569 --profile-pc-granularity options.
2570 (profile_pc_init): When possible, compute nr buckets from bucket
2571 size.
2572
2573 * sim-profile.c (profile_pc_init): Align the profile-pc end
2574 address with the profile-pc bucket size.
2575
2576 * sim-profile.h (PROFILE_PC_NR_BUCKETS): Rename PROFILE_PC_SIZE to
2577 something less ambiguous.
2578 (PROFILE_PC_BUCKET_SIZE): Ditto for PROFILE_PC_SAMPLE_SIZE.
2579
2580 * sim-profile.c (profile_pc_cleanup): New function. Move
2581 profile_pc_uninstall code to here.
2582 (profile_pc_uninstall): Call.
2583 (profile_pc_init): Call.
2584
2585Mon Oct 20 17:23:58 1997 Andrew Cagney <cagney@b1.cygnus.com>
2586
2587 * sim-profile.c (profile_print_pc): Dump pc profile to dmon.out
2588 file using BSD gprof format.
2589
2590 * sim-bits.h (LSBIT, MSBIT, BIT): Force result to type
2591 unsigned_word.
2592 (LSBIT8, LSBIT16, LSBIT32, LSBIT64, MSBIT8, MSBIT16, MSBIT32,
2593 MSBIT64): Force result to unsignedN.
2594
2595Thu Oct 16 11:38:56 1997 Andrew Cagney <cagney@b1.cygnus.com>
2596
2597 * sim-alu.h (ALU16_BEGIN, ALU32_BEGIN, ALU64_BEGIN): Drop opening
2598 brace from macro.
2599 (ALU8_BEGIN, ALU8_SET, ALU8_ADD, ALU8_SUB, ALU8_NEGATE): Define.
2600 (ALU16_ADD, ALU16_SUB, ALU16_NEGATE): Simplify arrithmetic.
2601 (ALU32_ADD, ALU32_SUB, ALU32_NEGATE): Simplify arrithmetic.
2602 (ALU64_ADD, ALU64_SUB, ALU64_NEGATE): Simplify arrithmetic.
2603
2604Wed Oct 15 09:24:19 1997 Andrew Cagney <cagney@b1.cygnus.com>
2605
2606 * sim-core.h (struct _sim_core_mapping): Change free_buffer to
2607 type void*.
2608
2609 * sim-core.c (sim_core_uninstall, new_sim_core_mapping,
2610 sim_core_map_attach, sim_core_map_detach): Change free_buffer to
2611 type void*.
2612 (sim_core_attach): Rename buffer_freed to free_buffer, type
2613 void*. Ensure that allocated buffer is alligned according to
2614 region's address.
2615
2616Mon Oct 13 11:34:50 1997 Andrew Cagney <cagney@b1.cygnus.com>
2617
2618 * sim-alu.h (ALU64_HAD_OVERFLOW): Define.
2619 (ALU64_SUB): Define.
2620
2621 * Make-common.in (all): Build SIM_EXTRA_ALL first.
2622 (.gdbinit): Remove dependencies, generate once per build.
2623
2624Tue Oct 14 19:20:09 1997 Andrew Cagney <cagney@b1.cygnus.com>
2625
2626 * sim-n-core.h (sim_core_read_aligned_N,
2627 sim_core_write_aligned_N): Make xaddr param type address_word not
2628 unsigned_word.
2629
2630Fri Oct 3 09:49:18 1997 Andrew Cagney <cagney@b1.cygnus.com>
2631
2632 * sim-fpu.h, sim-fpu.c: Rewrite. Change sim_fpu object to an
2633 unpacked floating point struct. Pass sim_fpu object by reference.
2634 Add preliminary support for rounding modes.
2635
2636Fri Oct 3 09:28:00 1997 Andrew Cagney <cagney@b1.cygnus.com>
2637
2638 * configure: Regenerated to track ../common/aclocal.m4 changes.
2639
2640Thu Oct 2 19:43:52 1997 Andrew Cagney <cagney@b1.cygnus.com>
2641
2642 * aclocal.m4 (sim-bitsize): Fix typo, WITH_TARGET_WORD_BITSIZE not
2643 WITH_TARGET_BITSIZE.
2644
2645Thu Sep 25 23:20:20 1997 Felix Lee <flee@yin.cygnus.com>
2646
2647 * sim-profile.c (profile_print_core): label needs empty statement.
2648
2649Thu Sep 25 11:20:47 1997 Stu Grossman <grossman@babylon-5.cygnus.com>
2650
2651 * sim-break.c (sim_set_breakpoint sim_clear_breakpoint): Use ZALLOC
2652 and zfree instead of xmalloc and free. Prevents warnings.
2653
2654Wed Sep 24 17:38:57 1997 Andrew Cagney <cagney@b1.cygnus.com>
2655
2656 * configure: Regenerated to track ../common/aclocal.m4 changes.
2657
2658Wed Sep 24 17:23:31 1997 Andrew Cagney <cagney@b1.cygnus.com>
2659
2660 * Make-common.in (SIM_BITSIZE): Assign from configured value.
2661 (CONFIG_CFLAGS): Add SIM_BITSIZE.
2662
2663 * aclocal.m4 (--enable-sim-bitsize): Developer option for
2664 controling the bitsize/msb of the target.
2665
2666Wed Sep 24 17:41:40 1997 Stu Grossman <grossman@babylon-5.cygnus.com>
2667
2668 * Make-common.in: New files sim-break.c, sim-break.h.
2669 * sim-base.h: Add point to breakpoint list to sim_state_base.
2670 * sim-break.c sim-break.h: New modules that implement intrinsic
2671 breakpoint support.
2672 * sim-module.c: Add breakpoint module.
2673
2674Tue Sep 23 00:26:39 1997 Felix Lee <flee@yin.cygnus.com>
2675
2676 * sim-events.c (SIM_EVENTS_POLL_RATE): poll more often than once
2677 an hour.
2678 * sim-n-core.h (WITH_XOR_ENDIAN): MSVC barfs on
2679 if (0) { 1 % 0; }
2680 * sim-core.c (sim_core_xor_write_buffer): WITH_XOR_ENDIAN + 1.
2681 (SIGBUS) define for Windows.
2682 * sim-trace.c (trace_printf,debug_printf): added ALMOST_STDC.
2683 * sim-resume.c: define SIGTRAP for windows.
2684 * sim-xcat.h: use token pasting if ALMOST_STDC.
2685
2686Tue Sep 23 11:04:38 1997 Andrew Cagney <cagney@b1.cygnus.com>
2687
2688 * Make-common.in (SIM_SCACHE, SIM_DEFAULT_MODEL): Assign
2689 configured values.
2690 (CONFIG_CFLAGS): Add same.
2691
2692Mon Sep 22 17:20:27 1997 Felix Lee <flee@cygnus.com>
2693
2694 * sim-types.h (SIGNED64): ##i64 when _MSC_VER, not _WIN32.
2695 (SIGNED32): use ##i32.
2696
2697Tue Sep 23 11:04:38 1997 Andrew Cagney <cagney@b1.cygnus.com>
2698
2699 * configure: Regenerated to track ../common/aclocal.m4 changes.
2700
2701Tue Sep 23 10:07:47 1997 Andrew Cagney <cagney@b1.cygnus.com>
2702
2703 * aclocal.m4 (sim-endian): Simplify logic determining [default]
2704 endian of target.
2705
2706 * Make-common.in (SIM_WARNINGS, SIM_ALIGNMENT, SIM_ENDIAN,
2707 SIM_HOSTENDIAN, SIM_RESERVED_BITS, SIM_ASSERT, SIM_FLOAT,
2708 SIM_HARDWARE, SIM_INLINE, SIM_PACKAGES, SIM_REGPARM, SIM_SMP,
2709 SIM_STDCALL, SIM_XOR_ENDIAN): Assign configured values.
2710 (CONFIG_CFLAGS): Add same.
2711
2712 * aclocal.m4: Perform AC_SUBST on optional options.
2713
2714Mon Sep 22 11:46:20 1997 Andrew Cagney <cagney@b1.cygnus.com>
2715
2716 * sim-config.h (WITH_DEFAULT_ALIGNMENT): Don't hardwire any alignment.
2717
2718 * sim-options.c (standard_option_handler): Typo in warning message.
2719
2720 * sim-base.h (STATE_MODEL): Make conditional on SIM_HAVE_MODEL.
2721
2722 * sim-profile.c (profile_print_insn): Check 0 .. MAX_INSN for any
2723 insn count. Make count conditional on there being a valid
2724 INSN_NAME.
2725 (profile_pc_init): Make default PC profile frequency an arbitrary
2726 256.
2727
2728 * sim-base.h: Ditto.
2729
2730 * sim-profile.h (WITH_PROFILE_MODEL_P): Only enable modeling when
2731 SIM_HAVE_MODEL.
2732
2733 * sim-model.h (struct MACH): Depreciate, to be replaced by bfd
2734 archure struct.
2735
2736Mon Sep 22 11:46:20 1997 Andrew Cagney <cagney@b1.cygnus.com>
2737
2738 * configure: Regenerated to track ../common/aclocal.m4 changes.
2739
2740Mon Sep 22 11:45:00 1997 Andrew Cagney <cagney@b1.cygnus.com>
2741
2742 * aclocal.m4 (sim_alignment): Simplify logic for selecting the
2743 configured alignment.
2744
2745Fri Sep 19 17:45:25 1997 Andrew Cagney <cagney@b1.cygnus.com>
2746
2747 * configure: Regenerated to track ../common/aclocal.m4 changes.
2748
2749Fri Sep 19 17:26:14 1997 Andrew Cagney <cagney@b1.cygnus.com>
2750
2751 * sim-config.c (sim_config): Check for default alignment.
2752
2753 * sim-options.c (standard_option_handler): Add alignment option.
2754
2755 * aclocal.m4 (sim_alignment): Allow configuration of hardwired and
2756 default alignment requirements on memory accesses.
2757
2758Fri Sep 19 11:51:35 1997 Jeffrey A Law (law@cygnus.com)
2759
2760 * sim-load.c (sim_load_file): Return failure if the executable
2761 had no loadable sections.
2762
2763Wed Sep 17 13:33:28 1997 Andrew Cagney <cagney@b1.cygnus.com>
2764
2765 * sim-events.c (ETRACE): Use trace_printf not sim_io_printf for
2766 trace output.
2767
2768 * sim-core.c (sim_core_signal): When bad access halt simulator
2769 SIGSEGV / SIGBUS instead of aborting.
2770 (signal.h): Include.
2771
2772 * sim-watch.c (sim_watchpoint_install): Handler for watchpoint
2773 options was missing.
2774
2775 * sim-bits.h (MOVED): Define
2776
2777Wed Sep 17 10:33:28 1997 Andrew Cagney <cagney@b1.cygnus.com>
2778
2779 * sim-alu.h (ALU32_HAD_OVERFLOW): Pacify GCC, Use MSBIT instead of
2780 BIT.
2781
2782 * sim-bits.h (LSBIT, MSBIT): Check for overflow of shift value.
2783
2784 * sim-bits.c: Add 8 bit versions of bit macros.
2785
2786 * sim-bits.h: Ditto.
2787
2788Tue Sep 16 16:15:16 1997 Andrew Cagney <cagney@b1.cygnus.com>
2789
2790 * sim-bits.c (LSSEXT, MSSEXT): Replace SEXT.
2791 (LSINSERTED, MSINSERTED): Ditto for INSERTED.
2792
2793 * sim-n-bits.h (MSSEXTn, LSSEXTn): Replace SEXTn.
2794 (LSINSERTDn, MSINSERTEDN): Ditto for INSERTEDn.
2795
2796 * sim-bits.h (SEXT*): Define as MSEXT/LSEXT.
2797 (INSERTED*): Ditto for LSINSERTED/MSINSERTED.
2798
2799Mon Sep 15 17:36:15 1997 Andrew Cagney <cagney@b1.cygnus.com>
2800
2801 * aclocal.m4 (SIM_AC_COMMON): Add optional config.h file argument.
2802 configure.in: Output to cconfig.h instead of config.h.
2803
2804 * configure: Regenerated to track ../common/aclocal.m4 changes.
2805
2806Mon Sep 15 15:39:28 1997 Andrew Cagney <cagney@b1.cygnus.com>
2807
2808 * sim-utils.c (sim_analyze_program): Set STATE_ARCHITECTURE from
2809 BFD if known.
2810
2811Tue Sep 9 21:46:46 1997 Felix Lee <flee@cygnus.com>
2812
2813 * callback.c (os_write): divert stdout and stderr to their
2814 respective hooks.
2815
2816Thu Sep 11 10:08:48 1997 Andrew Cagney <cagney@b1.cygnus.com>
2817
2818 * sim-profile.c (profile_print_speed): Call
2819 sim_events_elapsed_time instead of PROFILE_EXEC_TIME for moment.
2820
2821 * sim-events.c (sim_events_elapsed_time): New function return nr
2822 host MS consumed by the simulator.
2823 (sim_watch_valid): Use.
2824
2825 * sim-module.c (modules): Install sim_events very very early.
2826
2827 * sim-profile.c (profile_print): Call profile_print_pc.
2828 (print_bar):
2829 (profile_pc_init): New function, set up processor for PC
2830 profiling.
2831 (profile_print_pc): New function, print a PC profile.
2832 (profile_pc_event): New function, sample PC.
2833
2834 * sim-profile.h (PROFILE_PC_COUNT, PROFILE_PC_START,
2835 PROFILE_PC_END, PROFILE_PC_SHIFT, PROFILE_PC_SAMPLE_SIZE): Add to
2836 profile struct.
2837
2838 * sim-options.c (sim_print_help): Pacify GCC.
2839
2840 * sim-n-core.h (sim_core_read_aligned_N,
2841 sim_core_write_aligned_N): Add un-conditional profile call.
2842 (sim_core_read_unaligned_N, sim_core_write_unaligned_N): Add
2843 profile call when aligned read/write isn't used.
2844
2845 * sim-base.h: Include sim-profile, sim-model after sim-core &
2846 sim-events allow sim-core to define useful values.
2847
2848 * sim-profile.c (OPTION_PROFILE_CORE): Define.
2849 (profile_option_handler, profile_options): Add support for
2850 --profile-core option.
2851 (print_bar): Include when core profiling.
2852 (profile_print_core): New function, print core profile.
2853
2854 * sim-config.c (print_sim_config): Print profile status.
2855
2856 * sim-profile.h (PROFILE_NEXT_IDX, PROFILE_core,
2857 WITH_PROFILE_PC_P): Define.
2858 (PROFILE_CORE_COUNT): Count each core-map/size separatly.
2859 (PROFILE_COUNT_CORE): Define.
2860
2861Thu Sep 11 08:44:52 1997 Andrew Cagney <cagney@b1.cygnus.com>
2862
2863 * sim-watch.c (handle_watchpoint): Pass a char** index into the
2864 interrupt_names array as the data.
2865 (sim-watch.h): Document.
2866
2867Wed Sep 10 16:15:22 1997 Andrew Cagney <cagney@b1.cygnus.com>
2868
2869 * sim-options.c (sim_print_help): When the doc string is to long
2870 word wrap it.
2871
2872 * sim-watch.c (sim_watchpoint_install): Use option.doc_name so
2873 that only the first few the watch options are listed. Generate
2874 meanginful usage messages.
2875
2876 * sim-options.h (struct OPTION): Clarify use of doc_name field
2877
2878Wed Sep 10 13:23:24 1997 Andrew Cagney <cagney@b1.cygnus.com>
2879
2880 * sim-options.c (OPTION_ARCHITECTURE_INFO): New option.
2881 (standard_option_handler): Handle --architecture-info.
2882
2883Tue Sep 9 21:46:46 1997 Felix Lee <flee@cygnus.com>
2884
2885 * sim-core.h (sim_cpu_core): [WITH_XOR_ENDIAN + 1], to avoid
2886 illegal zero-sized array.
2887 * sim-core.c (sim_core_xor_read_buffer): same.
2888
2889Tue Sep 9 11:20:35 1997 Doug Evans <dje@canuck.cygnus.com>
2890
2891 * nltvals.def: Regenerate.
2892
2893Tue Sep 9 02:10:36 1997 Andrew Cagney <cagney@b1.cygnus.com>
2894
2895 * sim-fpu.c (DP_FRACHIGH2): Define LL using SIGNED64.
2896
2897Mon Sep 8 12:22:20 1997 Andrew Cagney <cagney@b1.cygnus.com>
2898
2899 * sim-bits.c (MASKED): Delete.
2900 (EXTRACTED): Delete.
2901 (LSEXTRACTED, MSEXTRACTED): New functions.
2902
2903 * sim-n-bits.h (MASKEDn): Delete, define as MSMASKED or LSMASKED.
2904 (MSMASKEDn, LSMASKEDn): Add last argument.
2905 (MSMASK*): Ditto.
2906
2907 * sim-bits.h (EXTEND8, EXTEND16): Define.
2908 (EXTRACTED64): Define as 64 bit extract, not 32 bit.
2909
2910 * sim-run.c (sim_engine_run): Use CPU_CIA macro.
2911
2912 * sim-engine.h (SIM_ENGINE_HALT_HOOK): Use CPU_CIA to get at
2913 current instruction address.
2914
2915 * sim-inline.h (*_ENGINE): Define.
2916
2917Fri Sep 5 08:39:02 1997 Andrew Cagney <cagney@b1.cygnus.com>
2918
2919 * sim-core.c (sim_core_attach): Fix checks of modulo/mask.
2920
2921 * sim-watch.c (delete_watchpoint): Delete by ident and type.
2922 (watch_option_handler): Call delete_watchpoint with ident or type.
2923 (sim_watchpoint_install): Create interrupt specific watchpoint
2924 commands on the fly.
2925 (do_watchpoint_create): New function, create a watch point using
2926 type/int-nr info encoded in the option nr.
2927 (do_watchpoint_info): New function. List active watchpoints.
2928
2929 * sim-watch.h: Change data structure to a list.
2930
2931 * sim-memopt.c (memory_option_handler): Require explicit "all"
2932 before deleting all memory regions.
2933
2934 * sim-utils.c (sim_do_commandf): New function, printf version of
2935 sim_do_command.
2936
2937 * sim-basics.h (asprintf, vasprintf): Hack, define for CYGWIN32.
2938
2939 * sim-alu.h (ALU64_ADD): Use explicit MSEXTRACTED64, do not assume
2940 bit endianness.
2941 (SIGNED64, UNSIGNED64): Delete.
2942 (ALU64_ADD): Don't rely on bit endianness.
2943 (ALU64_BEGIN): Define.
2944
2945 * sim-n-bits.h (MSEXTRACTEDn, LSEXTRACTED): New functions.
2946 (EXTRACTEDn): Delete, define as either LSEXTRACTED or MSEXTRACTED.
2947
2948 * sim-types.h (SIGNED64, UNSIGNED64): New macros, attach relevant
2949 suffix - u64, LL - to 64 bit constants.
2950
2951Thu Sep 4 09:27:54 1997 Andrew Cagney <cagney@b1.cygnus.com>
2952
2953 * sim-config.c (sim_config): Add assert for SIM_MAGIC_NUMBER.
2954
2955 * sim-utils.h (NZALLOC): Define - zalloc * N.
2956
2957 * sim-hrw.c (sim_read, sim_write): New file. Provide generic
2958 implementation of read/write functions.
2959
2960 * Make-common.in (sim-hrw.o): New target.
2961
2962 * sim-base.h (STATE_MEMOPT_P): Delete, simulators _always_ add
2963 memory.
2964
2965 * sim-memopt.c (memory_option_handler): Implement memory-size
2966 command. Implement memory-alias command. Let memory-delete delete
2967 all memory regions.
2968 (add_memopt): New function. Add a memory region.
2969 (do_memopt_delete): New function. Delete a memory region.
2970
2971 * sim-utils.c (sim_elapsed_time_get): Never return zero.
2972
2973 * sim-core.c (sim_core_detach): New function.
2974 (sim_core_map_detach): New function. Perform the actual detach.
2975 (sim_core_init): Move initialization code from here.
2976 (sim_core_install): To here.
2977 (sim_core_uninstall): And here.
2978
2979 * sim-module.c: Add memopt module.
2980
2981 * sim-base.h (STATE_MEMOPT, STATE_MEMOPT_P): Add memopt to
2982 simulator base type.
2983
2984 * Make-common.in (sim_main_headers): Add sim-memopt.h
2985 (sim-memopt.o): New target.
2986
2987 * sim-core.c (sim_core_install): Add core_options to the option
2988 table.
2989
2990 * sim-watch.c (watch_options): Make --delete-watch a synonym for
2991 --watch-delete.
2992
2993 * sim-config.h (WITH_MODULO_MEMORY): Define as 0. Update
2994 comments.
2995
2996 * sim-core.h (struct _sim_core_mapping): Change nr_bytes to type
2997 address_word, add mask member.
2998
2999 * sim-core.h, sim-core.c (sim_core_attach): Make nr_bytes of type
3000 address_word, allow for 64bit targets in 32bit host. Add modulo
3001 argument.
3002 (sim_core_map_attach): Ditto.
3003 (new_sim_core_mapping): Ditto.
3004 (sim_core_translate): Mask address when modulo memory.
3005
3006Wed Sep 3 17:32:54 1997 Doug Evans <dje@seba.cygnus.com>
3007
3008 * sim-hload.c (sim_load): Add assert for SIM_MAGIC_NUMBER.
3009
3010 * gdbinit.in: New file.
3011 * aclocal.m4 (SIM_AC_OUTPUT): Build .gdbinit.
3012 * Make-common.in (distclean): Delete .gdbinit.
3013 (.gdbinit): Add rule for.
3014 * configure: Regenerated to track ../common/aclocal.m4 changes.
3015
3016 * Make-common.in (cgen-run.o): Add rule for.
3017
3018Wed Sep 3 10:08:21 1997 Andrew Cagney <cagney@b1.cygnus.com>
3019
3020 * sim-resume.c (sim_resume): Suspend/resume the simulator.
3021
3022 * sim-events.c (sim_watch_valid): Compute total elapsed time from
3023 both resumed and previous elapsed time.
3024 (sim_events_init): Set initial_wallclock and current_wallclock to
3025 zero.
3026 (sim_events_install): Install sim_events_suspend and
3027 sim_events_resume.
3028 (sim_events_watch_clock): Allow for suspended simulator when
3029 computing the time of the clock event.
3030
3031 * sim-events.h (struct _sim_event): Add resume_wallclock, rename
3032 initial_wallclock to elapsed_wallclock, set both to zero.
3033 (sim_events_init, sim_events_uninstall): Delete prototypes.
3034
3035 * sim-module.h (MODULE_SUSPEND_FN, MODULE_RESUME_FN): Define types.
3036
3037 * sim-module.c(sim_module_resume, sim_module_suspend): New
3038 functions.
3039
3040Wed Sep 3 10:08:21 1997 Andrew Cagney <cagney@b1.cygnus.com>
3041
3042 * sim-core.c (sim_core_map_attach): Clarify memory overlap error
3043 message.
3044
3045Tue Sep 2 14:57:06 1997 Doug Evans <dje@canuck.cygnus.com>
3046
3047 * Makefile.in (TAGS): Add support for "/* TAGS: foo */" marker.
3048 * Make-common.in (TAGS): Likewise.
3049 * sim-n-bits.h: Add TAGS comments for all functions.
3050 * sim-n-core.h: Likewise.
3051 * sim-n-endian.h: Likewise.
3052
3053Mon Sep 1 10:50:11 1997 Andrew Cagney <cagney@b1.cygnus.com>
3054
3055 * sim-utils.c (sim_state_alloc): Set CPU backlinks, callback and
3056 kind.
3057
3058 * sim-base.h (sim_state_alloc): Add callback and kind arguments.
3059
3060 * sim-base.h (INVALID_INSTRUCTION_ADDRESS): Add default
3061 definition.
3062
3063Sat Aug 30 09:47:21 1997 Andrew Cagney <cagney@b1.cygnus.com>
3064
3065 * sim-fpu.c (DP_GARDMSB, ...): Make unsigned.
3066 (DP_FRACHIGH, DP_FRACHIGH2, ..): Use MSMASK to avoid LL.
3067
3068Fri Aug 29 13:37:44 1997 Andrew Cagney <cagney@b1.cygnus.com>
3069
3070 * sim-core.c (sim_core_map_attach): Cast attach enum to int.
3071 (sim_core_xor_read_buffer, sim_core_xor_write_buffer): Make
3072 nr_transfered and nr_this_transfer unsigned.
3073
3074 * sim-events.c (sim_events_tickn): N is signed, as limited to
3075 MAXINT.
3076
3077 * sim-n-endian.h (offset_N): Change size to unsigned.
3078
3079 * callback.c (os_poll_quit): Add prototypes for kbhit and getkey.
3080
3081Fri Aug 29 10:10:53 1997 Andrew Cagney <cagney@b1.cygnus.com>
3082
3083 * sim-utils.c (sim_copy_argv): Delete, replaced by dupargv.
3084
3085 * sim-options.c (sim_parse_args): Use dupargv.
3086
3087Thu Aug 28 10:36:34 1997 Doug Evans <dje@canuck.cygnus.com>
3088
3089 * sim-options.c (standard_option_handler): Use xstrdup, not strdup.
3090
3091Thu Aug 28 12:09:15 1997 Andrew Cagney <cagney@b1.cygnus.com>
3092
3093 * sim-base.h (STATE_ARCHITECTURE, STATE_TARGET): Add to simulator
3094 base type.
3095
3096 * sim-options.c (standard_options): Add --architecture=MACHINE and
3097 --target=TARGET options.
3098 (OPTION_ARCHITECTURE, OPTION_TARGET): Define.
3099 (standard_option_handler): Handle architecture and target options.
3100 (bfd.h): Include.
3101
3102 * sim-utils.c (sim_analyze_program): Pass STATE_TARGET to
3103 bfd_openr.
3104 (sim_analyze_program): Set prog_bfd architecture from
3105 STATE_ARCHITECTURE if known.
3106
3107Wed Aug 27 18:13:22 1997 Andrew Cagney <cagney@b1.cygnus.com>
3108
3109 * configure: Regenerated to track ../common/aclocal.m4 changes.
3110 * config.in: Ditto.
3111
3112Wed Aug 27 18:11:30 1997 Andrew Cagney <cagney@b1.cygnus.com>
3113
3114 * aclocal.m4 (enable-sim-warnings): Remove comment stating
3115 that option does not apply to certain files.
3116
3117Wed Aug 27 15:13:04 1997 Andrew Cagney <cagney@b1.cygnus.com>
3118
3119 * sim-bits.h (LSBIT8, LSBIT16, LSBIT32, LSBIT64, LSBIT, MSBIT8,
3120 MSBIT16, MSBIT32, MSBIT64, MSBIT): New macros - single bit as
3121 offset from MSB/LSB.
3122
3123 * sim-endian.h (A1_8, A2_8, A4_8, A1_4, A2_4, A1_2): New macro,
3124 access address of sub word quantity of a hosts 16, 32, 64 bit word
3125 type.
3126 (V1_2, V1_4, V2_4, V1_8, V2_8, V4_8): Ditto for values.
3127 (U8_1, U8_2, U8_4, U4_1, U4_2, U2_1): Ditto for set of values.
3128 (V2_H1, V2_L1, V4_H2, V4_L2, V8_L4, V8_H4): Given N byte argument,
3129 return N*2 byte value with argument in Hi/Lo word. Renamed from
3130 V1_H2, V1_L2, V2_H4, V2_L4, V4_H8, V4_L8.
3131
3132 * sim-alu.h (ALU32_HAD_OVERFLOW): Use 64 bit mask not 32bit.
3133 (ALU16_HAD_CARRY, ALU32_HAD_CARRY, ALU16_HAD_OVERFLOW): Use MSBIT
3134 so that bit offset is explicit.
3135
3136Wed Aug 27 11:55:35 1997 Andrew Cagney <cagney@b1.cygnus.com>
3137
3138 * sim-utils.c (sim_analyze_program): Add prog_name argument.
3139 Update STATE_PROG_BFD when needed with a dup'd copy of the
3140 program.
3141
3142 * sim-config.c (sim_config): Delete ABFD argument, use
3143 STATE_PROG_BFD directly.
3144
3145Tue Aug 26 12:55:26 1997 Andrew Cagney <cagney@b1.cygnus.com>
3146
3147 * run.c (main): Pass the open ABFD to sim_create_inferior.
3148
3149 * nrun.c (main): Determine prog_bfd. Pass to sim_create_inferior
3150 and sim_load.
3151 (bfd.h): Include.
3152
3153 * sim-hload.c (sim_load): New file. Implement generic sim_load for
3154 hardware only simulator targets.
3155
3156 * Make-common.in (sim-hload.o): Add rule.
3157
3158Wed Aug 27 09:51:42 1997 Andrew Cagney <cagney@b1.cygnus.com>
3159
3160 * sim-utils.c (sim_copy_argv): Rewrite to match malloc strategy
3161 used by copyargv and freeargv.
3162
3163 * sim-options.c (sim_parse_args): Save a copy of PROG-ARGS in
3164 STATE_PROG_ARGV, not just a pointer.
3165
3166Mon Aug 25 17:50:22 1997 Andrew Cagney <cagney@b1.cygnus.com>
3167
3168 * configure: Regenerated to track ../common/aclocal.m4 changes.
3169 * config.in: Ditto.
3170
3171Mon Aug 25 12:11:06 1997 Andrew Cagney <cagney@b1.cygnus.com>
3172
3173 * aclocal.m4 (sim-endian): Add second argument to
3174 SIM_AC_OPTION_ENDIAN. First is hardwired endian, second is
3175 default endian when not hardwired.
3176
3177 * sim-config.h (WITH_DEFAULT_TARGET_BYTE_ORDER): New macro, if all
3178 else failes value for target byte order.
3179
3180 * sim-config.c (sim_config): Add abfd arguments. Set
3181 STATE_PROG_BFD accordingly. Determine prefered_target_byte_order
3182 from same.
3183 (sim_config): Return SIM_RC, don't abort.
3184 (bfd.h): Include.
3185
3186 * run.c (main): Update call to sim_open - add ABFD argument.
3187 * nrun.c (main): Add NULL ABFD argument.
3188
3189Thu Aug 14 12:48:57 1997 Doug Evans <dje@canuck.cygnus.com>
3190
3191 * callback.c (os_poll_quit): Make static.
3192 Call sim_cb_eprintf, not p->eprintf.
3193 (sim_cb_printf, sim_cb_eprintf): New functions.
3194 * sim-utils.h (sim_cb_printf, sim_cb_eprintf): Declare.
3195
3196 * sim-basics.h (zalloc,zfree,sim_add_commas,SIM_ELAPSED_TIME,
3197 sim_elapsed_time_get,sim_elapsed_time_since): Move decls to
3198 sim-utils.h. #include sim-utils.h.
3199 * sim-utils.h: Above decls moved here.
3200 (sim_analyze_program,sim_load_file): Use `struct _bfd', not `bfd'.
3201
3202 * sim-watch.c (action_watchpoint): Fix thinkos.
3203
3204Thu Jul 24 08:48:05 1997 Stu Grossman (grossman@critters.cygnus.com)
3205
3206 * sim-types.h: Fix defs of 64 bit data types for MSVC.
3207
3208Tue Jul 22 10:35:37 1997 Doug Evans <dje@canuck.cygnus.com>
3209
3210 * sim-n-core.h (sim_core_write_unaligned_N): Add missing break
3211 to FORCED_ALIGNMENT case.
3212
3213Thu Jun 5 13:48:37 1997 Andrew Cagney <cagney@b1.cygnus.com>
3214
3215 * callback.c (target_to_host_open): Handle hosts with O_BINARY.
3216
3217Thu Jun 5 08:47:10 1997 Jeffrey A Law (law@cygnus.com)
3218
3219 * Make-common.in (libsim.a): Fix typo.
3220
3221Thu Jun 5 13:48:37 1997 Andrew Cagney <cagney@b1.cygnus.com>
3222
3223 * nrun.c (main): Verify the structure returned before using it.
3224
3225Wed Jun 4 11:44:06 1997 Andrew Cagney <cagney@b1.cygnus.com>
3226
3227 * sim-config.h (WITH_ENGINE): Enable the sim-engine module by
3228 default.
3229
3230 * sim-engine.c (sim_engine_install): New function. Install the
3231 engine init functions.
3232 (sim_engine_init): [Re]initialize the simulator engine.
3233
3234 * sim-module.c: Add sim_engine to list of modules that always
3235 install.
3236
3237Tue Jun 3 04:52:04 1997 Andrew Cagney <cagney@b1.cygnus.com>
3238
3239 * sim-watch.c (schedule_watchpoint): Use sim_unschedule_watchpoint
3240 to remove the old watchpoint, not delete_watchpoint.
3241 (watch_option_handler): Action the correct watchpoint, not just
3242 cycles.
3243
3244Wed May 28 14:47:41 1997 Andrew Cagney <cagney@b1.cygnus.com>
3245
3246 * sim-n-core.h (sim_core_write_aligned_N): For 8byte reads, output
3247 both low and high word.
3248 (sim_core_write_aligned_N): Ditto.
3249
3250 * sim-trace.c (set_trace_options): Delete code explicitly setting
3251 core->trace.
3252
3253 * sim-options.c (sim_print_help): Call the list commands if not a
3254 standalone simulator.
3255 (sim_print_help): Advise that some options may not be applicable.
3256
3257 * sim-trace.c (set_trace_options): Assume core present.
3258
3259 * sim-events.c (sim_events_schedule_after_signal): Overflow signal
3260 buffer when full not almost full.
3261
3262Tue May 27 14:32:00 1997 Andrew Cagney <cagney@b1.cygnus.com>
3263
3264 * sim-events.c (sim_events_process): Don't blat the event queue
3265 when processing watchpoints.
3266
3267 * sim-watch.h: Make arg unsigned long - stop sign extension.
3268
3269 * sim-events.c (sim_watch_valid): rewrite so debugable.
3270
3271 * sim-config.h (WITH_XOR_ENDIAN): Default to zero.
3272
3273 * sim-watch.c (schedule_watchpoint): Add is_within option so that
3274 inequality test is possible.
3275 (handle_watchpoint): Re-pass is_within arg.
3276 (watch_option_handler): When `!' prefix to pc-watchpoint arg pass
3277 0 to schedule_watchpoint's is_within arg.
3278 (sim_watchpoint_init): Re-pass is_within arg.
3279
3280 * sim-options.c (sim_print_help): Add is_command argument. Don't
3281 include -- prefix when called from the command line interpreter.
3282
3283 * sim-watch.c (schedule_watchpoint): Pass true is_within argument.
3284
3285 * sim-events.c (sim_events_watch_sim): Add is_within argument,
3286 zero indicates that the test should be reversed.
3287 (sim_events_watch_core): Ditto.
3288 (WATCH_CORE): Compare range against is_within.
3289 (WATCH_SIM): Ditto.
3290
3291Tue May 27 12:48:03 1997 Andrew Cagney <cagney@b2.cygnus.com>
3292
3293 * sim-events.c (WATCH_CORE): Pass NULL cpu argument to
3294 sim_core_read_buffer. Check nr-bytes transfered.
3295
3296 * sim-core.h (sim_core_common): Define a new struct that contains
3297 the common data. to sd and cpu structures.
3298 * sim-core.c (sim_core_attach): Update.
3299 (sim_core_init): Update. Remember to copy initialized data to each
3300 cpu.
3301 (sim_core_find_mapping): Ditto.
3302
3303 * sim-core.c (sim_core_read_buffer): Add cpu argument.
3304 (sim_core_write_buffer): Ditto.
3305
3306 * sim-n-core.h (sim_core_read_unaligned_N): When mis-aligned
3307 transfer use xor version of read buffer.
3308 (sim_core_write_unaligned_N): Ditto for write.
3309
3310 * sim-core.c (sim_core_xor_read_buffer): New function implement
3311 xor-endian data read breaking transfer up into xor-endian sized
3312 blocks.
3313 (sim_core_xor_write_buffer): Ditto for write.
3314 (reverse_n): Reverse order of arbitrary number of bytes in buffer
3315 - needed for xor-endian transfers.
3316
3317Fri May 23 14:24:31 1997 Andrew Cagney <cagney@b1.cygnus.com>
3318
3319 * sim-inline.h: Review description.
3320
3321 * sim-core.h, sim-core.c: Reduce number of functions being inlined
3322 to just those involved in data transfers and configuration.
3323
3324 * sim-xcat.h (XSTRING): New macro, map macro definition onto
3325 string.
3326 * sim-n-core.h (sim_core_read_aligned_N): Use.
3327 (sim_core_read_unaligned_N): Ditto.
3328 (sim_core_read_unaligned_N): Ditto..
3329 (sim_core_write_unaligned_N): Ditto.
3330
3331 * sim-core.h: Add xor endian bitmap to main structure. *
3332
3333 sim-n-core.h (sim_core_write_aligned_N): Add suport for xor
3334 endian.
3335 (sim_core_read_aligned_N): Ditto.
3336
3337 * sim-core.c (sim_core_set_xor_endian): New function.
3338 (sim_core_attach): Don't overwrite the per-cpu xor map when
3339 cloning the global core.
3340
3341Fri May 23 10:53:13 1997 Andrew Cagney <cagney@b1.cygnus.com>
3342
3343 * sim-engine.h: Update below so that it is using an enumerated
3344 type.
3345
3346Thu May 22 09:12:16 1997 Gavin Koch <gavin@cygnus.com>
3347
3348 * sim-engine.c (sim_engine_restart):
3349 * sim-resume.c (sim_resume): Change longjmp param/setjmp
3350 return value used for simulator restart from 0 to 2.
3351
3352Wed May 21 08:47:30 1997 Andrew Cagney <cagney@b1.cygnus.com>
3353
3354 * cgen-scache.c (scache_option_handler): Add is_command arg.
3355
3356 * sim-model.c (model_option_handler): Add is_command argument.
3357
3358 * sim-profile.c (profile_option_handler): Add is_command arg.
3359
3360 * sim-events.c (sim_watch_valid): Use ub64, lb64 when 64bit value
3361 involved.
3362
3363 * sim-module.c (sim_module_add_init_fn): Call init fn in the same
3364 order that they are registered.
3365
3366 * sim-options.h (OPTION_HANDLER): Add argument to differentiate
3367 between option and command line processing.
3368
3369 * sim-options.c: Include stdlib.h, ctype.h.
3370
3371 * Make-common.in (sim-watch.o): Add rule.
3372 (sim_main_headers): Assume sim-assert.h included.
3373 (sim-*.o): Simplify make rule.
3374
3375 * sim-module.c: Add sim_watch_install to module list.
3376
3377Tue May 20 14:15:23 1997 Andrew Cagney <cagney@b1.cygnus.com>
3378
3379 * sim-base.h (STATE_LOADED_P): New predicate. Set once everything
3380 has been loaded.
3381
3382 * sim-trace.c (trace_install): Check magic. Include sim-assert.h.
3383 * sim-events.c (sim_events_install): Ditto.
3384 * sim-core.c (sim_core_install): Ditto.
3385 * sim-model.c (model_install): Ditto.
3386 * sim-options.c (standard_install): Ditto.
3387 * sim-profile.c (profile_install): Ditto.
3388 * sim-reason.c (sim_stop_reason): Ditto.
3389 * sim-run.c (sim_engine_run): Ditto.
3390 * sim-utils.c (sim_analyze_program): Ditto.
3391
3392 * sim-module.c (modules): Make profile_install and trace_install
3393 optional.
3394
3395 * sim-base.h (STATE_MEM_BASE): Define for flat memory systems.
3396
3397 * sim-options.c (standard_option_handler): Set the byte order.
3398
3399 * sim-events.c (sim_events_process): Allow multi tick processing.
3400 (sim_events_tickn): New function - multi cycle tick.
3401
3402 * sim-events.h (sim_events_tickn, sim_events_timewarp): Add
3403 prototypes. Under development.
3404 (sim_events): Replace processing with nr_ticks_to_process.
3405
3406Tue May 20 09:39:22 1997 Andrew Cagney <cagney@b1.cygnus.com>
3407
3408 * nrun.c (main): Pass callbacks to sim_open instead of using
3409 sim_set_callbacks.
3410
3411 * run.c (main): Ditto.
3412
3413Mon May 19 12:07:22 1997 Andrew Cagney <cagney@b1.cygnus.com>
3414
3415 * sim-events.c (sim_events_zalloc): Signal save memory allocator -
3416 stop tk interrupting malloc calls.
3417 (sim_events_zalloc): Converse.
3418
3419 * Make-common.in (sim_main_headers): Add sim-events.h.
3420
3421 * sim-events.c (sim_events_schedule_after_signal): Change return
3422 type to void - signal events are strictly internal.
3423 (sim_events_init): Allocate a finite buffer for signal events.
3424 (sim_events_schedule_after_signal): Enter signal events into the
3425 signal buffer.
3426
3427 * sim-engine.c (sim_engine_halt): Check SIM_DESC magic.
3428 (sim_engine_restart): Ditto.
3429 (sim_engine_abort): Ditto.
3430 * sim-stop.c (sim_stop): Ditto.
3431 (control_c_simulation): Ditto.
3432 * sim-resume.c (sim_resume): Ditto.
3433 (has_stepped): Ditto.
3434 * sim-abort.c (sim_engine_abort): Ditto.
3435
3436 * sim-basics.h (transfer_type): New type.
3437
3438 * sim-core.c (sim_core_signal): New function. Print core signal
3439 information.
3440 (sim_core_find_mapping): Add transfer argument.
3441
3442 * sim-n-core.h (sim_core_{write,write}_unaligned_N): Call
3443 SIM_CORE_SIGNAL if a recoverable abort.
3444 * sim-core.c (sim_core_find_mapping): Ditto.
3445
3446Fri May 16 15:13:21 1997 Andrew Cagney <cagney@b1.cygnus.com>
3447
3448 * sim-core.c (sim_core_find_mapping): Replace calls to
3449 sim_io_error to more resiliant sim_engine_abort.
3450
3451 * sim-n-core.h (sim_core_read_unaligned_N): Ditto.
3452 (sim_core_write_unaligned_N): Ditto.
3453
3454Tue May 13 13:50:06 1997 Andrew Cagney <cagney@b1.cygnus.com>
3455
3456 * sim-module.c: Add sim_events_install to list.
3457
3458 * sim-events.c (sim_events_install, sim_events_uninstall): Clonse
3459 from sim_core_*.
3460 (sim_events_init): Now returns SIG_RC.
3461
3462 * sim-run.c: New file. Generic sim_engine_run.
3463 * sim-reason.c: New file. Generic sim_stop_reason.
3464 * sim-stop.c: New file. Generic sim_stop.
3465 * sim-resume.c: New file. Generic sim_resume.
3466
3467 * Make-common.in (sim-engine.o): Add rule.
3468 (sim-run.o, sim-reason.o, sim-stop.o, sim-resume.o): Ditto.
3469
3470 * sim-engine.h, sim-engine.c: New file. Provide generic
3471 implementation of sim_engine_halt, sim_engine_error. et.al.
3472
3473 * sim-base.h (sim_state_base): Add member halt.
3474 (sim-engine.h): Include.
3475
3476 * sim-events.h (sim_event_handler): Always pass SIM_DESC to event
3477 handlers.
3478 * sim-events.c (sim_events_poll): Update event handler.
3479
3480Tue May 13 09:57:49 1997 Andrew Cagney <cagney@b2.cygnus.com>
3481
3482 * sim-events.h, sim-events.c (sim_events_watch_clock): New
3483 function.
3484 (sim_events_watch_sim): New function.
3485 (sim_events_watch_core): New function.
3486 (sim_watch_valid): New function.
3487 (sim_events_preprocess): New function.
3488 (sim_events_process): Process the watchpoints as well as the timer
3489 queue.
3490 (sim_events_tick): Check WORK_PENDING instead of the hold queue.
3491 (sim_events_deschedule): Check all the queues when removing an
3492 event.
3493 (sim_events_init): Ditto for cleaning.
3494
3495Mon May 19 12:07:22 1997 Andrew Cagney <cagney@b1.cygnus.com>
3496
3497 * sim-fpu.c (is_ufpu_number): Comment out - currently unused.
3498
3499Mon May 19 11:23:03 1997 Andrew Cagney <cagney@b1.cygnus.com>
3500
3501 * callback.c (os_open): Type of arg flags is int.
3502
3503Fri May 16 22:26:43 1997 Michael Meissner <meissner@cygnus.com>
3504
3505 * sim-fpu.c (sim_fpu_is_{eq,ne,lt,le,gt,ge}): Compare Infinities
3506 just like normal numbers as per IEEE rules.
3507
3508Wed May 14 21:20:38 1997 Bob Manson <manson@charmed.cygnus.com>
3509
3510 * callback.c (os_close): Mark the descriptor as being
3511 available if the close succeeded.
3512 (os_open): Pass 0644 as the mode of the file being created.
3513
3514Thu May 15 10:58:52 1997 Andrew Cagney <cagney@b1.cygnus.com>
3515
3516 * sim-fpu.c (pack_fpu, unpack_fpu): New functions - decode a
3517 float.
3518
3519 * sim-inline.c (SIM_INLINE_C): Rename from _SIM_INLINE_C_.
3520 * sim-lnline.h: Update.
3521
3522 * sim-fpu.h, sim-fpu.c (sim_fpu_[iu]{32,64}to): New int2fp
3523 conversion functions.
3524 (sim_fpu_to{32,64}[iu]): New fp2int functions.
3525
3526 * sim-fpu.h, sim-fpu.c (sim_fpu_is_{lt,le,eq,ne,ge,gt}): New fp
3527 compare functions. Replacing.
3528 (sim_fpu_cmp): This. Delete.
3529
3530Mon May 12 14:49:05 1997 Andrew Cagney <cagney@b1.cygnus.com>
3531
3532 * sim-core.c (sim_core_find_mapping): Call engine_error not
3533 sim_io_error when possible.
3534
3535Mon May 12 08:55:07 1997 Andrew Cagney <cagney@b2.cygnus.com>
3536
3537 * sim-endian.h (V1_H2): Add macro's to insert a word into a
3538 high/low double word.
3539
3540 * sim-trace.h: Remove definition of attribute - defined in
3541 sim_basics.h.
3542
3543Mon May 12 08:55:07 1997 Andrew Cagney <cagney@b1.cygnus.com>
3544
3545 * sim-options.h (struct OPTION): Add doc_opt as the documenting
3546 name of the option - or family of options.
3547
3548 * sim-options.c (sim_args_command): Match command `a-b c' with
3549 option `--a-b-c' from option table.
3550
3551Thu May 8 12:40:07 1997 Andrew Cagney <cagney@b1.cygnus.com>
3552
3553 * sim-options.c (sim_print_help): For optional arguments, wrap
3554 them in [].
3555
3556 * sim-trace.c (set_trace_options): New function, handle optional
3557 argument and multiple assignment.
3558 (trace_option_handler): Update.
3559
3560 * sim-trace.c (trace_option_handler): Trace branch and not fpu
3561 when branch tracing selected.
3562
3563Wed May 7 15:19:58 1997 Andrew Cagney <cagney@b1.cygnus.com>
3564
3565 * sim-trace.c (trace_one_insn): Make a va-args function.
3566
3567 * sim-trace.c (trace_vprintf): New function, va-arg version of
3568 trace_printf.
3569
3570Tue May 6 16:38:16 1997 Doug Evans <dje@canuck.cygnus.com>
3571
3572 * sim-trace.c (trace_uninstall): Don't close a file twice.
3573 * sim-profile.c (profile_uninstall): Likewise.
3574
3575Tue May 6 06:14:01 1997 Mike Meissner <meissner@cygnus.com>
3576
3577 * sim-trace.c (toplevel): Include bfd.h.
3578 (trace_options): Note that --trace-linenum also turns on
3579 --trace-insn. Add --trace-{branch,semantics}.
3580 (trace_option_handler): If --trace-linenum, also turn on
3581 --trace-insn. Add --trace-branch support. If --trace-semantics,
3582 turn on ALU, FPU, branch, and memory tracing.
3583 (trace_one_insn): New function to trace an instruction. Support
3584 --trace-linenum.
3585 (OPTION_TRACE_*): Use an enum, rather than lots of defines.
3586
3587 * sim-trace.h (TRACE_{SEMANTICS,BRANCH}_IDX): Add new macros.
3588 (MAX_TRACE_VALUES): Use 32, not 12 by default.
3589 (TRACE_branch): Add new mask.
3590 (TRACE_*_P): Define all possible trace_p macros.
3591 (trace_one_insn): Declare function.
3592
3593Mon May 5 14:08:34 1997 Mike Meissner <meissner@cygnus.com>
3594
3595 * sim-trace.h (__attribute__): Define as nothing if not GNU C or
3596 GNU C doesn't support __attributes__.
3597 ({trace,debug}_printf): Add attribute's so -Wformat can check the
3598 format strings.
3599
3600Mon May 5 11:16:12 1997 Andrew Cagney <cagney@b1.cygnus.com>
3601
3602 * sim-config.h (FORCED_ALIGNMENT): New alignment option -
3603 addresses are masked forcing them to be correctly aligned.
3604 (WITH_ALIGNMENT): Make NONSTRICT_ALIGNMENT the default.
3605 * sim-config.c (config_alignment_to_a): Update.
3606
3607 * sim-core.h (sim_cpu_core): New data type contains cpu specific
3608 core data.
3609 * sim-base.h (CPU_CORE): Add cpu specific core data to cpu base
3610 type.
3611 * sim-core.c (sim_core_attach): Add CPU argument. Ready for
3612 processor specific core maps.
3613 (sim_core_map_attach): Copy the core map data to each of the
3614 processor specific core data structures.
3615 * sim-core.c (sim_core_find_mapping): Update.
3616
3617 * sim-n-core.h (sim_core_read_N, sim_core_write_N): Rename.
3618 (sim_core_write_aligned_N, sim_core_write_aligned_N): New names.
3619 (sim_core_write_unaligned_N, sim_core_write_unaligned_N): New
3620 alternatives that handle unaligned addresses.
3621 (sim_core_{read,write}_{,un}aligned_N): Drop SIM_DESC arg, replace
3622 with just CPU arg.
3623 * cgen-utils.c (sim_disassemble_insn): Update.
3624
3625Mon May 5 13:19:16 1997 Andrew Cagney <cagney@b1.cygnus.com>
3626
3627 * sim-trace.h (TRACE_FPU_IDX): Add Floating-point specific
3628 tracing.
3629
3630 * sim-fpu.h, sim-fpu.c: New files - prototype for generic target
3631 fpu support.
3632
3633 * sim-inline.h, sim-inline.c: Add support for SIM_FPU.
3634
3635Fri May 2 17:59:42 1997 Andrew Cagney <cagney@b1.cygnus.com>
3636
3637 * sim-core.c (sim_core_map_to_str): New function ascii equivalent
3638 to map type.
3639
3640 * sim-n-core.h (sim_core_read_N, sim_core_write_N): Use in trace
3641 statement.
3642
3643Fri May 2 17:28:02 1997 Andrew Cagney <cagney@b2.cygnus.com>
3644
3645 * cgen-trace.c: Prepend additional trace_printf argument.
3646
3647 * cgen-utils.c (sim_disassemble_insn): Add additional core
3648 arguments.
3649
3650Fri May 2 11:40:23 1997 Andrew Cagney <cagney@b1.cygnus.com>
3651
3652 * nrun.c (main): Catch/report errorenous simulator states.
3653
3654 * sim-module.c: #include "libiberty.h" so that xmalloc is defined.
3655 * sim-trace.c: #include string.h/strings.h so that memset is
3656 defined.
3657 * sim-utils.c: Ditto.
3658 * sim-profile.c: Ditto. And stdlib.h.
3659 (print_bar): Only define when used by instruction or memory profiler.
3660
3661 * sim-options.c (standard_option_handler): Make ul more local.
3662
3663 * sim-load.c (sim_load_file): Make the name constant.
3664 (sim_load_file): Passify gcc.
3665
3666 * sim-utils.h: New file, pre-declare utilites in corresponding .c
3667 file.
3668 * sim-utils.c, sim-load.c: Include sim-utils.h.
3669
3670 * sim-base.h (sim_cpu): Pre define here so available to all.
3671
3672 * sim-core.h (DECLARE_SIM_CORE_WRITE_N, DECLARE_SIM_CORE_READ_N):
3673 Restore the sim_cpu and instruction_address arguments so that full
3674 information is available to the abort function.
3675 * sim-core.c (sim_core_find_mapping, sim_core_write_buffer): Ditto.
3676 * sim-n-core.h (sim_core_write_N, sim_core_read_N): Update.
3677
3678 * sim-trace.h, sim-trace.c (trace_option_handler): Add interim
3679 tracing support for sim-events and sim-core.
3680 (trace_option_handler): Convert #if to if where possible so always
3681 compiled/checked by C compiler.
3682 * sim-n-core.h (sim_core_write_N, sim_core_read_N): Update.
3683
3684 * sim-base.h: Adjust comment documenting how to define the cpu
3685 structure.
3686 (sim_state_base): Add sim_core and sim_events to simulator base
3687 object.
3688
3689 * sim-trace.h, sim-trace.c (trace_printf): Add SIM_DESC argument.
3690 * sim-core.c (sim_core_init, sim_core_attach,
3691 sim_core_find_mapping): Update.
3692 * sim-events.c (ETRACE, sim_events_init, sim_events_time,
3693 update_time_from_event, insert_sim_event,
3694 sim_events_schedule_after_signal, sim_events_deschedule,
3695 sim_events_tick): Ditto.
3696
3697 * sim-basics.h (sim-module.h, sim-trace.h, sim-profile.h,
3698 sim-model.h): Move #includes from here.
3699 * sim-base.h: To here.
3700 (sim-core.h, sim-events.h, sim-io.h): Include also
3701
3702Wed Apr 30 15:37:54 1997 Andrew Cagney <cagney@b1.cygnus.com>
3703
3704 * callback.c (default_callback): Missing initialisers.
3705
3706Thu May 1 10:40:47 1997 Doug Evans <dje@canuck.cygnus.com>
3707
3708 * sim-utils.c (sim_add_commas): New function.
3709 * sim-basics.h (sim_add_commas): Add prototype.
3710 * cgen-scache.c (scache_print_profile): Print commas in numbers.
3711 * sim-profile.c (COMMAS): New macro.
3712 (print_*): Use it to print commas in numbers.
3713
3714 * configure: Regenerated.
3715
3716 * cgen-sim.h (sim_signal_type): Add SIM_SIGINT.
3717 (cgen_state): New member run_fast_p.
3718 (cgen_init): Add prototype.
3719 (sim_disassemble_insn): New arg `cpu'.
3720 * cgen-trace.c (trace_insn): Update call to sim_disassemble_insn.
3721 * cgen-utils.c (cgen_init): New function.
3722 (sim_disassemble_insn): New arg `cpu'. Rewrite fetching of insn.
3723 * genmloop.sh: Call engine_halt if loop exits.
3724
3725 * Makefile.in (sim-options_h): Define.
3726 (sim-{module,options,trace,profile,utils}.o): Clean up dependencies.
3727 (sim-model.o): Add new rule.
3728 (cgen-{scache,trace,utils}.o): Add new rules.
3729 * aclocal.m4 (SIM_AC_OPTION_{SCACHE,DEFAULT_MODEL}): Add.
3730 * cgen-scache.c (scache_print_profile): Change `sd' arg to `cpu'.
3731 Indent output by 2 spaces.
3732 * cgen-scache.h (scache_print_profile): Update.
3733 * cgen-trace.c (trace_insn_fini): Indent output by 2 spaces.
3734 Use trace_printf, not fprintf.
3735 (trace_extract): Use trace_printf, not cgen_trace_printf.
3736 * genmloop.sh (!FAST case): Increment `insn_count'.
3737 * sim-base.h (sim_state_base): Only include scache_size if WITH_SCACHE.
3738 (sim_cpu_base): Rename member `sd' to `state' to be consistent with
3739 access macro's name.
3740 * sim-core.c (sim_core_init): Use EXTERN_SIM_CORE to define it.
3741 Change return type to SIM_RC.
3742 (sim_core_{install,uninstall}): New functions.
3743 * sim-core.h (sim_core_{install,uninstall}): Declare.
3744 (sim_core_init): Use EXTERN_SIM_CORE to define it.
3745 Change return type to SIM_RC.
3746 * sim-model.h (models,machs,model_install): Declare.
3747 * sim-module.c (modules): Add scache_install, model_install.
3748 (sim_post_argv_init): Set cpu->state backlinks.
3749 * sim-options.c (standard_options): Delete --simcache-size,--max-insns.
3750 (standard_option_handler): Likewise.
3751 * sim-profile.c (PROFILE_{HISTOGRAM,LABEL}_WIDTH): Move to
3752 sim-profile.h.
3753 (*): Assume ANSI C.
3754 (profile_options): Delete --profile-simcache.
3755 (profile_option_handler): Likewise.
3756 (profile_print_insn): Change `sd' arg to `cpu'. Indent output 2
3757 spaces.
3758 (profile_print_{memory,model}): Likewise.
3759 (profile_print_simcache): Delete.
3760 (profile_print_speed): New function.
3761 (profile_print): Rewrite.
3762 * sim-profile.h (PROFILE_scache): Renamed from PROFILE_simcache.
3763 (WITH_PROFILE_SCACHE_P): Renamed from WITH_PROFILE_SIMCACHE_P.
3764 (PROFILE_DATA): Delete members simcache_{hits,misses}.
3765 (PROFILE_COUNT_SIMCACHE_{HIT,MISS}): Delete.
3766 (PROFILE_{CALLBACK,CPU_CALLBACK}): New types.
3767 (profile_print): Update prototype.
3768
3769Wed Apr 30 11:34:14 1997 Doug Evans <dje@canuck.cygnus.com>
3770
3771 * cgen-scache.[ch], cgen-sim.h: New files.
3772 * cgen-trace.[ch], cgen-types.h, cgen-utils.c, genmloop.sh: New files.
3773 * sim-model.c: New file.
3774
3775 * Make-common.in (clean targets): Undo patch of Apr. 22.
3776
3777Fri Apr 25 15:28:32 1997 Mike Meissner <meissner@cygnus.com>
3778
3779 * sim-n-bits.h (signed): If we have a standard compiler, undef
3780 signed, so that signedN is defined correctly.
3781
3782Thu Apr 24 00:00:07 1997 Doug Evans <dje@canuck.cygnus.com>
3783
3784 * sim-module.h, sim-model.h, sim-profile.h: New files.
3785 * sim-module.c, sim-profile.c: New files.
3786 * Make-common.in (SIM_PROFILE): Define
3787 (CONFIG_CFLAGS): Add $(SIM_PROFILE).
3788 (sim_main_headers): Add sim-module.h, sim-model.h, sim-profile.h.
3789 (sim_module.o,sim-profile.o): Add rules for.
3790 * aclocal.m4 (--enable-sim-trace): Allow symbolic arguments.
3791 (--enable-sim-profile): Add.
3792 * configure: Regenerated.
3793 * sim-base.h (sim_state_base): New members init_list, uninstall_list,
3794 model. Move trace and profile support to sim-{trace,profile}.h.
3795 New members trace_data, profile_data.
3796 * sim-basics.h: #include sim-module.h, sim-model.h, sim-profile.h.
3797 * sim-config.h: Provide default definition of WITH_PROFILE.
3798 (WITH_TRACE): Change default to -1.
3799 (MAX_NR_PROCESSORS): Always define.
3800 * sim-options.c: Move trace and profile support to
3801 sim-{trace,profile}.h.
3802 (sim_pre_argv_init): Moved to sim-model.c.
3803 (standard_install): New function.
3804 * sim-options.h (sim_pre_argv_init): Move decl to sim-model.c.
3805 (standard_install): Declare.
3806 * sim-trace.c: Tracing option handling moved here from sim-options.c.
3807 (trace_install, trace_uninstall): New functions.
3808 (trace_printf): Update reference to TRACE_FILE.
3809 * sim-trace.h (TRACE_FOO_IDX): Moved here from sim-base.h.
3810 (TRACE_foo): Bit masks for symbolic arguments to --enable-sim-trace.
3811 (WITH_TRACE_FOO_P): Define.
3812 (trace_install): Declare.
3813 (TRACE_DATA): New struct.
3814
3815Wed Apr 23 17:23:15 1997 Doug Evans <dje@canuck.cygnus.com>
3816
3817 * run.c: Undo last exec_bfd patch.
3818 (main): Only pass -E ifdef SIM_HAVE_BIENDIAN.
3819
3820Wed Apr 23 17:54:27 1997 Mike Meissner <meissner@cygnus.com>
3821
3822 * run.c (exec_bfd): Add back in.
3823 (main): Set exec_bfd.
3824
3825Tue Apr 22 14:43:46 1997 Doug Evans <dje@canuck.cygnus.com>
3826
3827 * sim-load.c (sim_load_file): #include <stdio.h> for NULL.
3828
3829Wed Apr 23 02:55:54 1997 Andrew Cagney <cagney@b1.cygnus.com>
3830
3831 * sim-events.c (insert_sim_event): Call sim_io_error instead of
3832 less well defined engine_error.
3833 * sim-core.c: Ditto.
3834
3835Tue Apr 22 08:48:16 1997 Stu Grossman (grossman@critters.cygnus.com)
3836
3837 * Make-common.in: Change clean targets to use :: so that other
3838 Makefiles can have their own clean targets.
3839 * sim-load.c (xprintf eprintf): Use ANSI_PROTOTYPES instead of
3840 __STDC__ to control use of stdarg vs. varargs syntax. Some
3841 systems can't use __STDC__, but require stdarg.
3842
3843Fri Apr 18 11:14:43 1997 Doug Evans <dje@canuck.cygnus.com>
3844
3845 * sim-options.c (standard_options): Add --endian.
3846 (standard_option_handler): Likewise.
3847
3848 * nrun.c: #include <signal.h>.
3849 (main, cntrl_c): Wrap calls to sim_resume in a SIGINT
3850 handler that calls sim_stop ().
3851
3852Fri Apr 18 13:11:36 1997 Andrew Cagney <cagney@b1.cygnus.com>
3853
3854 * run.c (main, cntrl_c): Wrap calls to sim_resume in a SIGINT
3855 handler that calls sim_stop (). Simulators may still be
3856 establishing their own handler.
3857
3858 * sim-events.c (sim_events_poll): Rename from
3859 sim_events_at_large_int. Poll IO.
3860
3861 * sim-io.c (sim_io_poll_quit): New function - pass on a polling
3862 request.
3863
3864 * callback.c (os_poll_quit): New function poll for quit signal
3865 where needed.
3866 (default_callback): Include magic number.
3867
3868Thu Apr 17 02:25:11 1997 Doug Evans <dje@canuck.cygnus.com>
3869
3870 * aclocal.m4: Check for headers time.h, sys/time.h, sys/resource.h.
3871 Check for functions getrusage, time.
3872 * sim-basics.h (SIM_ELAPSED_TIME): New typedef.
3873 (sim_elapsed_time_get, sim_elapsed_time_since): Add prototypes.
3874 * sim-utils.c: #include time.h, sys/time.h, sys/resource.h if able.
3875 (sim_elapsed_time_get, sim_elapsed_time_since): New functions.
3876
3877 * sim-utils.c (sim_copy_argv, sim_analyze_program): New functions.
3878
3879 * sim-options.c, sim-options.h: New files.
3880 * sim-config.h (WITH_DEBUG): Provide default value of zero.
3881 * Make-common.in (nrun.o): Add rules for.
3882 * nrun.c: New file.
3883
3884 * run.c (main): Check return value of sim_open.
3885
3886 * Make-common.in (sim-options.o, sim-load.o, sim-trace.o): Add rules.
3887 (sim_main_headers): Add sim-trace.h.
3888 * run.c (exec_bfd, target_byte_order): Delete.
3889 (main): Pass -E <endian> to sim_open. Delete code to load sections,
3890 call sim_load instead. Check return code of sim_create_inferior.
3891 * sim-base.h (CURRENT_STATE): Define.
3892 (sim_state_base): Make typedef. New members options, prog_argv,
3893 prog_bfd, text_{section,start,end}, start_addr, simcache_size,
3894 mem_size, memory [+ corresponding access macros].
3895 (sim_cpu_base): New typedef.
3896 * sim-trace.h: New file.
3897 * sim-trace.c: New file.
3898 * sim-basics.h: #include it.
3899 * sim-load.c: New file.
3900
3901Tue Apr 15 15:10:13 1997 Ian Lance Taylor <ian@cygnus.com>
3902
3903 * Make-common.in (INSTALL): Set to @INSTALL@.
3904 (INSTALL_XFORM, INSTALL_XFORM1): Remove.
3905 (install-common): Depend upon installdirs. Use
3906 $(program_transform_name) directly, rather than using
3907 $(INSTALL_XFORM).
3908 (installdirs): New target.
3909 * Makefile.in (INSTALL): Set to @INSTALL@.
3910 (INSTALL_XFORM, INSTALL_XFORM1): Remove.
3911 (install-man): Depend upon installdirs. Use
3912 $(program_transform_name) directly, rather than using
3913 $(INSTALL_XFORM).
3914 (installdirs): New target.
3915
3916Tue Apr 15 15:08:12 1997 Andrew Cagney <cagney@b1.cygnus.com>
3917
3918 * sim-assert.h (SIM_ASSERT, ASSERT): Allow these macros to
3919 be overriden.
3920
3921Wed Apr 9 16:06:44 1997 Andrew Cagney <cagney@kremvax.cygnus.com>
3922
3923 * sim-basics.h: Only bring in config.h and tconfig.h if
3924 HAVE_CONFIG_H.
3925
3926Mon Apr 7 11:39:45 1997 Andrew Cagney <cagney@kremvax.cygnus.com>
3927
3928 * sim-config.h (WITH_TARGET_WORD_MSB): New Macro. Define the bit
3929 numbering convention of the target.
3930 * sim-config.c (print_sim_config): Print WITH_TARGET_WORD_BITSIZE
3931 and WITH_TARGET_WORD_MSB.
3932 (sim_config): When possible, check for consistency with bitsize
3933 and msb.
3934
3935 * sim-bits.h: Allow MSB to be other than zero.
3936 * sim-bits.c: Ditto.
3937 * sim-n-bits.h: Ditto.
3938
3939 * sim-bits.h (MSMASK*): New macros - converce to LSMASK*.
3940 * sim-n-bits.h (MSMASKEDn): Ditto.
3941
3942Mon Apr 14 16:29:21 1997 Ian Lance Taylor <ian@cygnus.com>
3943
3944 * Makefile.in (INSTALL): Change install.sh to install-sh.
3945
3946Mon Apr 7 10:46:38 1997 Doug Evans <dje@canuck.cygnus.com>
3947
3948 * sim-base.h (sim_state_base): Move `magic' to end of struct.
3949
3950Mon Apr 7 15:53:21 1997 Andrew Cagney <cagney@kremvax.cygnus.com>
3951
3952 * run.c (main): Check that a program to run was specified.
3953
3954Mon Apr 7 15:45:02 1997 Andrew Cagney <cagney@kremvax.cygnus.com>
3955
3956 * aclocal.m4 (AC_TYPE_SIGNAL): Add check.
3957
3958 * configure: Regenerated to track ../common/aclocal.m4 changes.
3959 * config.in: Ditto.
3960
3961Wed Apr 2 15:06:28 1997 Doug Evans <dje@canuck.cygnus.com>
3962
3963 * sim-endian.h: Move host {LITTLE,BIG}_ENDIAN support from here,
3964 * sim-config.h: To here.
3965
3966 * Make-common.in (SIM_EXTRA_DEPS): New config var.
3967 (sim_main_headers): Define.
3968 (sim-*.o): Depend on $(SIM_EXTRA_DEPS).
3969 (BUILT_SRC_FROM_COMMON): Move here from ../d30v/Makefile.in.
3970 (clean): Use it.
3971 (sim-utils.o): Add rule for.
3972 * sim-utils.o: New file.
3973 * sim-basics.h: #include sim-base.h.
3974 (zalloc): Make argument unsigned long.
3975 * sim-base.h: New file.
3976 * sim-inline.h (SIM_IO support): Delete.
3977 * sim-io.h: Delete inline support.
3978 * sim-io.c: Likewise. sim-state.h renamed to sim-main.h.
3979 * sim-config.c: sim-state.h renamed to sim-main.h.
3980 * sim-core.c: Likewise.
3981 * sim-events.c: Likewise.
3982
3983 * run.c (main): Pass SIM_OPEN_STANDALONE to sim_open.
3984
3985 * aclocal.m4: Check for stdlib.h, string.h, strings.h, unistd.h.
3986 (sim-debug): Allow arguments. Define WITH_DEBUG in addition to
3987 -DDEBUG.
3988 * configure: Regenerated to track ../common/aclocal.m4 changes.
3989
3990Wed Apr 2 14:34:19 1997 Andrew Cagney <cagney@kremvax.cygnus.com>
3991
3992 * configure: Regenerated to track ../common/aclocal.m4 changes.
3993
3994Wed Apr 2 11:08:11 1997 Andrew Cagney <cagney@kremvax.cygnus.com>
3995
3996 * sim-config.h (WITH_ALIGNMENT, WITH_FLOATING_POINT,
3997 WITH_XOR_ENDIAN, WITH_SMP, WITH_RESERVED_BITS): Assume that these
3998 are defined by the configure.
3999
4000 * aclocal.m4 (sim-stdio): Add option stdio from ../ppc configure.
4001
4002 * aclocal.m4 (floating-point, xor-endian, alignment, smp,
4003 reserved-bits): Always define.
4004
4005 * sim-config.h, sim-config.c (sim_config): New function - and new
4006 file - co-ordinate the setting/checking of the common simulator
4007 configuration options.
4008
4009 * Make-common.in (sim-config.o): Add rule.
4010
4011Fri Mar 28 15:32:00 1997 Mike Meissner <meissner@cygnus.com>
4012
4013 * callback.c (os_{,e}vprintf_filtered): Change stdarg type to
4014 va_list from void *, since va_list might not be a pointer type.
4015
4016Mon Mar 24 15:27:12 1997 Andrew Cagney <cagney@kremvax.cygnus.com>
4017
4018 * sim-n-endian.h (offset_N): Correct assertion - word and sub word
4019 in wrong order.
4020 (offset_N): Correct computation of LE offset.
4021
4022 * sim-io.c (sim_io_error): Include a new line when reporting
4023 errors.
4024
4025 * sim-assert.h (SIM_FILTER_PATH): Out by one when locating last
4026 `/'.
4027
4028Thu Mar 20 22:31:06 1997 Jeffrey A Law (law@cygnus.com)
4029
4030 * run.c: Include alloca-conf.h.
4031
4032 * callback.c (os_evprintf_filtered): Fix typo.
4033
4034Fri Mar 21 13:36:20 1997 Andrew Cagney <cagney@kremvax.cygnus.com>
4035
4036 * run.c (string.h, strings.h, stdlib.h): Include.
4037
4038 * sim-events.c (sim_events_tick): Recent cleanup failed to return
4039 0 when nothing pending.
4040
4041 * run.c (sim_size, sim_trace): Plicate GCC - these two functions
4042 will soon be going away.
4043 (getopt): Plicate GCC.
4044
4045 * sim-endian.c (sim-io.h): Plicate GCC.
4046 * sim-bits.c (sim-io.h): Ditto.
4047 * sim-n-bits.h (ROTn): Ditto.
4048
4049 * sim-io.c (sim_io_error): Correct check for NULL.
4050
4051 * sim-assert.h (SIM_FILTER_PATH): Separate out the code filtering
4052 the __FILE__.
4053 * sim-events.c: Use SIM_FILTER_PATH to filter out the filename
4054 path.
4055
4056Wed Mar 19 01:12:06 1997 Andrew Cagney <cagney@kremvax.cygnus.com>
4057
4058 * aclocal.m4 (SIM_AC_OPTION_*: Move so that they are outside of
4059 SIM_AC_COMMON - SIM_AC_COMMON was gobling arguments.
4060
4061Tue Mar 18 20:48:12 1997 Andrew Cagney <cagney@kremvax.cygnus.com>
4062
4063 * sim-alu.h: Include sim-xcat.h.
4064
4065Tue Mar 18 13:58:18 1997 Andrew Cagney <cagney@kremvax.cygnus.com>
4066
4067 * Make-common.in (sim-bits.c, sim-core.c, sim-endian.c,
4068 sim-events.c, sim-inline.c, sim-io.c): Define rules for building
4069 these.
4070
4071 * sim-events.c (sim_events_at_large_int): New function. Just
4072 schedules an event every large-int ticks.
4073 (sim_events_init): Call.
4074 (sim_events_tick, sim_events_process): Move async handing to
4075 sim_events_process. Move timer decrement so that it occures after
4076 events have been processed.
4077
4078 * sim-basics.h (struct _engine): Remove declaration.
4079
4080 * sim-events.h, sim-events.c: Rename type to sim_events. Prefix
4081 everything with same. Rename global struct to SIM_DESC.
4082 * sim-core.h, sim-core.c, sim-n-core.c: Ditto for sim_core.
4083 * sim-io.h, sim-io.c: Ditto.
4084
4085 * sim-assert.h: New file. Optional assertion checking macros.
4086 * sim-io.c (sim_io_error): Make just this function tolerant to
4087 null pointers.
4088
4089 * sim-xcat.h: New file. Define concatenate macros.
4090 * sim-basics.h (XCONCAT*): Move to sim-xcat.h.
4091 * sim-n-core.h, sim-n-bits.h, sim-n-endian.h: Explicitly include
4092 concat macros.
4093
4094
4095Tue Mar 18 12:44:55 1997 Andrew Cagney <cagney@kremvax.cygnus.com>
4096
4097 * sim-bits.h (LSMASK): New macro. Create mask of LS bits.
4098
4099Mon Mar 17 18:10:05 1997 Andrew Cagney <cagney@kremvax.cygnus.com>
4100
4101 * sim-inline.h: Add definitions for sim-types.
4102 (ALL_BY_MODULE): New macro, encapsulate full inlining by the
4103 module.
4104
4105Mon Mar 17 15:38:27 1997 Andrew Cagney <cagney@kremvax.cygnus.com>
4106
4107 * sim-events.h: Remove defunct reference to callback struct.
4108
4109Mon Mar 17 15:10:07 1997 Andrew Cagney <cagney@kremvax.cygnus.com>
4110
4111 * configure: Re-generate.
4112
4113Mon Mar 17 15:04:47 1997 Andrew Cagney <cagney@kremvax.cygnus.com>
4114
4115 * Make-common.in (CSEARCH): Do not include the gdb directory in
4116 the search path.
4117
4118Mon Mar 17 13:16:26 1997 Andrew Cagney <cagney@kremvax.cygnus.com>
4119
4120 * Make-common.in (SIM_ENDIAN, SIM_HOSTENDIAN, SIM_INLINE,
4121 SIM_WARNING): Drop, requiring the simulator specific Makefile.in
4122 to explicitly incorporate these.
4123
4124 * aclocal.m4 (--enable-sim-alignment); New option. Strongly
4125 specify the alignment restrictions of the target architecture -
4126 without this option all alignment restrictions are accomodated.
4127 (--enable-sim-assert): New option. Conditionally compile in
4128 assertion statements.
4129 (--enable-sim-float): New option. Strongly specify the target's
4130 floating point support.
4131 (--enable-sim-hardware): New option. Specify the hardware devices
4132 included in the simulation.
4133 (--enable-sim-packages): New option. Specify the hardware
4134 packages included in the simulation.
4135 (--enable-sim-regparm): New option. Specify that parameters be
4136 passed in registers instead of on the stack.
4137 (--enable-sim-reserved-bits): New option. Specify that reserved
4138 bits within an instruction are are correctly set.
4139 (--enable-sim-smp): New option. Specify the level of SMP support
4140 to be included in the simulator.
4141 (--enable-sim-stdcall): New option. Specify an alternative
4142 function call convention.
4143 (--enable-sim-xor-endian): New option. Configure xor-endian
4144 support used by some targets to implement bi-endian support.
4145
4146Fri Mar 14 19:51:21 1997 Andrew Cagney <cagney@kremvax.cygnus.com>
4147
4148 * aclocal.m4 (--enable-sim-hostendian): New option. Allow the
4149 host endianness to be overridden.
4150 (--enable-sim-endian): Allow the target platform's byte order
4151 to be overridden.
4152 (--enable-sim-inline): Control the inlining of common components.
4153 (--enable-sim-bswap): For compatibility, also define WITH_BSWAP.
4154 (--enable-sim-warnings): Enable additional GCC compiler checks.
4155 * Make-common.in (SIM_ENDIAN, SIM_HOSTENDIAN, SIM_INLINE,
4156 SIM_WARNINGS): Add.
4157
4158 * sim-n-core.h, sim-n-bits.h, sim-n-endian.h: Rename from
4159 sim-*-n.h so that the names are uniq on dos machines
4160 * sim-core.c, sim-bits.c, sim-endian.c: Update.
4161
4162Thu Mar 13 12:32:42 1997 Doug Evans <dje@canuck.cygnus.com>
4163
4164 * run.c: #include "libiberty.h".
4165 (main): New locals sd,no_args,sim_argv.
4166 Run buildargv on -a option. Pass argv to sim_open, argv[0]
4167 is program name. Update call to sim_set_callbacks.
4168 Record result of sim_open, pass to other sim_foo routines.
4169
4170Thu Mar 13 10:24:05 1997 Michael Meissner <meissner@cygnus.com>
4171
4172 * callback.c (os_printf_filtered): Do not call exit(1) or print a
4173 final newline.
4174
4175Thu Mar 6 15:50:28 1997 Andrew Cagney <cagney@kremvax.cygnus.com>
4176
4177 * callback.c: Add os_flush_stdout and vprintf_filtered callbacks.
4178 Route stdout through buffered IO.
4179
4180 * callback.c: Add os_flush_stderr, os_write_stderr,
4181 os_evprintf_filtered functions to route error output through
4182 stderr.
4183
4184 * sim-io.h, sim-io.c (sim_io_flush_stderr, sim_io_flush_stdout):
4185 Correct return type - should be void.
4186
4187Fri Mar 7 20:14:37 1997 Andrew Cagney <cagney@kremvax.cygnus.com>
4188
4189 * sim-basics.h: Clean up. Many macro's moved to sim-inline.h.
4190
4191 * sim-config.h: Ditto. For some options - eg WITH_DEVICES - do
4192 not provide a default value as undefined indicates disable code.
4193
4194Thu Mar 6 15:50:28 1997 Andrew Cagney <cagney@kremvax.cygnus.com>
4195
4196 * sim-core.h, sim-core-n.h, sim-core.c: Borrow code from ppc
4197 directory.
4198 * sim-events.h, sim-events.c: Ditto.
4199 * sim-io.h, sim-io.c: Ditto.
4200
4201Tue Mar 4 09:35:56 1997 Andrew Cagney <cagney@kremvax.cygnus.com>
4202
4203 * sim-alu.h (ALU_SUB_CA, ALU*_SUB_CA): New alu operation.
4204
4205 * sim-bits.h, sim-bits-n.h, sim-bits.c (LSMASKED*): New macro's
4206 extract the tail or least signifiant bits from an integer of the
4207 specified size.
4208
4209 * sim-bits.h, sim-bits.c: Clean up conditionally compiled #if
4210 WITH_TARGET_BITSIZE so that the compilation will fail when an
4211 unsupported bitsize value is defined.
4212
4213 (INSERTED*): Convert to functions.
4214 (EXTRACTED*): Ditto.
4215
4216 (SIGN_EXTEND, SEXT): Change to more terse name.
4217
4218Tue Mar 4 09:35:56 1997 Andrew Cagney <cagney@kremvax.cygnus.com>
4219
4220 * sim-inline.h: Allow explicit control over which .c files will be
4221 included by their header.
4222
4223 * sim-inline.h: Allow explicit control over which .c files use the
4224 alternative - REGPARM - parameter passing mechanism.
4225
4226 * sim-inline.h, sim-inline.c: Don't attempt to include any of
4227 icache.c, idecode.c, semantics.c or support.c. Those names are
4228 not generally applicable.
4229
4230Thu Feb 27 10:17:23 1997 Andrew Cagney <cagney@kremvax.cygnus.com>
4231
4232 * sim-bits.c, sim-bits-n.h (new): Split sim-bits.c into two parts
4233 in a fashion similar to sim-endian-n.
4234
4235 * sim-endian.h: (H_word, L_word, AL_*, VL_*): Extend to include
4236 both value and address macro's.
4237
4238Tue Feb 25 18:51:57 1997 Andrew Cagney <cagney@kremvax.cygnus.com>
4239
4240 * sim-alu.h (ALU16_BEGIN, ALU16_SET, ...): Fill in.
4241
4242 * sim-endian.h (L_word, H_word): Replace MS2W_4, LS2W_4 with more
4243 generic L_word, H_word macro's.
4244
4245Thu Feb 20 18:36:55 1997 Andrew Cagney <cagney@critters.cygnus.com>
4246
4247 * sim-basics.h: Borrow code from ppc directory.
4248 * sim-bits.c: Ditto.
4249 * sim-bits.h: Ditto.
4250 * sim-config.h: Ditto.
4251 * sim-endian-n.h: Ditto.
4252 * sim-endian.c: Ditto.
4253 * sim-endian.h: Ditto.
4254 * sim-inline.c: Ditto.
4255 * sim-inline.h: Ditto.
4256 * sim-types.h: Ditto.
4257
4258Wed Feb 19 12:40:50 1997 Andrew Cagney <cagney@critters.cygnus.com>
4259
4260 * sim-alu.h (ALU_SET16, ALU_SET32, ALU_SET64, etc): Make available
4261 all the ALU size alternatives and then auto-configure a default.
4262
4263 * sim-alu.h: Copy ppc/idecode_expression.h.
4264
4265Mon Feb 17 10:44:18 1997 Andrew Cagney <cagney@critters.cygnus.com>
4266
4267 * bits.h, bits.c (SIGN_EXTEND32, SIGN_EXTEND64): New functions,
4268 sign extend a bit within a value.
4269
4270 * sim-endian.h, sim-endian-n.h (offset_N): New functions - return
4271 a pointer into the middle of a host word.
4272 * sim-endian.h (MS2W_4, LS2W_4): Use this function.
4273
4274Tue Feb 11 13:46:49 1997 Michael Meissner <meissner@tiktok.cygnus.com>
4275
4276 * callback.c: If HAVE_CONFIG_H is defined, include config.h from
4277 autoconf. If HAVE_UNISTD_H is defined, include unistd.h to get
4278 appropriate definitions of read, write, etc. Add prototype for
4279 system.
4280
4281Tue Feb 4 13:24:44 1997 Doug Evans <dje@canuck.cygnus.com>
4282
4283 * Makefile.in (libcommon.a): Delete.
4284 (callback.o,targ-map.o): Delete, moved to Make-common.in.
4285 (gentmap,targ-vals.h,targ-map.c): Likewise.
4286 (run-autoconf): Delete.
4287 * aclocal.m4 (SIM_AC_OUTPUT): Redo creation of Makefile.
4288 (common makefile fragment): Moved back into ...
4289 * Make-common.in: Resurrect.
4290 * configure.in (AC_LINK_FILES): Delete, unnecessary now.
4291 * configure: Regenerated.
4292
4293Fri Jan 31 07:16:49 1997 Doug Evans <dje@canuck.cygnus.com>
4294
4295 * aclocal.m4 (SIM_AC_COMMON): Move COMMON_MAKEFILE_FRAG from here.
4296 (SIM_AC_OUTPUT): To here.
4297
4298Fri Jan 24 10:37:17 1997 Stu Grossman (grossman@critters.cygnus.com)
4299
4300 * aclocal.m4 (COMMON_MAKEFILE_FRAG): Quote a couple of $'s in
4301 comments and single quotes. Fixes a problem found on hpux.
4302
4303Thu Jan 23 13:35:03 1997 Stu Grossman (grossman@critters.cygnus.com)
4304
4305 * aclocal.m4: Remove Make-common.in from dependencies.
4306 * (distclean): Remove targ-vals.def.
4307
4308 * aclocal.m4 (SIM_AC_COMMON): Move contents of Make-common.in
4309 into here. Makes insertion into makefiles easier. Also, change
4310 the way that callback.o, gentmap, targ-vals.h, targ-map.c,
4311 targ-map.o, and run are built. They are now built in the
4312 individual simulator directories, taking sources from ../common as
4313 necessary. This replaces the merging of libcommon.a into
4314 linsim.a, which was problematic for the WinGDB build process.
4315 * run.c: Include config.h from . instead of ../common.
4316 * Make-common.in: Remove. It's no longer necessary.
4317
4318Mon Dec 16 15:02:33 1996 Ian Lance Taylor <ian@cygnus.com>
4319
4320 * Make-common.in (ALL_CLAGS): Put CFLAGS at the end.
4321 (.c.o): Put $(ALL_CFLAGS) before the file being compiled.
4322
4323Wed Dec 11 11:30:58 1996 Jim Wilson <wilson@cygnus.com>
4324
4325 * run.c (main): Set target_byte_order before call to sim_open.
4326
4327Sun Dec 8 18:22:06 1996 Doug Evans <dje@canuck.cygnus.com>
4328
4329 * callback.c: #include <stdlib.h>
4330 (os_error): New function.
4331 (default_callback): Add os_error.
4332
4333Mon Nov 25 19:44:35 1996 Doug Evans <dje@canuck.cygnus.com>
4334
4335 * Make-common.in (Makefile): Set CONFIG_HEADERS="".
4336 * aclocal.m4: Mark the fact that --enable-sim-bswap isn't host
4337 specific.
4338 (SIM_AC_OUTPUT): Don't build Makefile if CONFIG_FILES="".
4339
4340Wed Nov 20 01:11:04 1996 Doug Evans <dje@canuck.cygnus.com>
4341
4342 * run.c: #include ../common/config.h, tconfig.h.
4343 (myname): New static global.
4344 (main): Recognize new options -a, -c. Also recognize -h if h8/300.
4345 Only process -c ifdef SIM_HAVE_SIMCACHE.
4346 Only process -p/-s ifdef SIM_HAVE_PROFILE.
4347 Parse program name from argv[0] and use in error messages.
4348 Pass sim_args to sim_open. Pass prog_args to sim_create_inferior.
4349 Add support for incomplete h8/300 termination indicators.
4350 (usage): Make more verbose.
4351 * aclocal.m4,config.in,tconfig.in,configure.in,configure: New files.
4352 * Makefile.in,Make-common.in,callback.c: New files.
4353 * nltvals.def,gentmap.c,gentvals.sh: New files.
4354
4355Tue Nov 12 13:34:00 1996 Dawn Perchik <dawn@cygnus.com>
4356
4357 * run.c: Include stdarg.h if __STDC__.
4358
4359Tue Oct 15 11:16:31 1996 Jeffrey A Law (law@cygnus.com)
4360
4361 * run.c (main): Don't print out anything if the signal
4362 number is zero (ie no signal).
4363
4364Tue Oct 15 11:20:44 1996 Michael Meissner <meissner@tiktok.cygnus.com>
4365
4366 * run.c (main): Print out if the program raised a signal.
4367
4368Wed Sep 18 09:52:14 1996 Michael Meissner <meissner@tiktok.cygnus.com>
4369
4370 * run.c (exec_bfd): Rename from sim_bfd, to use the gdb name.
4371 (main): Ditto.
4372
4373Tue Sep 17 11:04:50 1996 James G. Smith <jsmith@cygnus.co.uk>
4374
4375 * run.c (main): Explicitly cast malloc() parameter.
4376
4377Thu Sep 12 11:27:21 1996 Michael Meissner <meissner@tiktok.cygnus.com>
4378
4379 * run.c (sim_bfd): New global to hold the bfd pointer for the
4380 executable.
4381 (main): Initialize sim_bfd.
4382
4383Fri Dec 15 16:27:49 1995 Ian Lance Taylor <ian@cygnus.com>
4384
4385 * run.c (main): Use new bfd_big_endian macro.
4386
4387Wed Nov 8 15:49:49 1995 James G. Smith <jsmith@pasanda.cygnus.co.uk>
4388
4389 * run.c (main): Removed SH specific comments, so source is
4390 generic. Also updated to only load relevant sections. Moved
4391 sim_open() to after callback attach (to match GDB).
4392
4393 * run.1: Removed SH specific comments.
4394
4395Sat Oct 21 12:31:01 1995 Jim Wilson <wilson@chestnut.cygnus.com>
4396
4397 * run.c (main): Always return sigrc at end.
4398
4399Tue Oct 10 12:03:13 1995 J.T. Conklin <jtc@rtl.cygnus.com>
4400
4401 * run.c (main): Print error diagnostic and exit if bfd_openr() or
4402 bfd_check_format() fails.
4403
4404Thu Sep 28 15:40:36 1995 steve chamberlain <sac@slash.cygnus.com>
4405
4406 * run.c, run.1: From sh directory.