1 Wed Mar 4 11:36:51 1998 Doug Evans <devans@seba.cygnus.com>
3 * Makefile.in (SIM_EXTRA_DEPS): Add cpu-opc.h.
4 (arch.o): Delete cpu-opc.h dependency.
5 (decode.o,model.o): Likewise.
7 (decodex.o,modelx.o): Likewise.
10 * cpu.h,model.c,sem-switch.c,sem.c: Regenerate.
12 * cpux.h,decodex.[ch],modelx.c,readx.c,semx.c: Regenerate.
15 Thu Feb 26 18:38:35 1998 Andrew Cagney <cagney@b1.cygnus.com>
17 * sim-if.c (sim_open): Initialize PROFILE_INFO_CPU_CALLBACK.
19 * sim-if.c (sim_info): Delete.
22 Fri Feb 27 10:14:29 1998 Doug Evans <devans@canuck.cygnus.com>
24 * mloopx.in: Fix handling of branch in parallel with another insn.
28 Mon Feb 23 13:30:46 1998 Doug Evans <devans@seba.cygnus.com>
30 * sim-main.h: #include symcat.h.
31 * m32r-sim.h (BRANCH_NEW_PC): Delete current_cpu arg.
32 (NEW_PC_{BASE,SKIP,2,4,BRANCH_P}): New macros.
33 * cpu.[ch],decode.[ch],extract.c,model.c: Regenerate.
34 * sem.c,sem-switch.c: Regenerate.
36 * m32r-sim.h (SEM_NEXT_PC): Modify to handle parallel exec.
38 * cpux.[ch],decodex.[ch],readx.c,semx.c: Regenerate.
41 Mon Feb 23 12:27:52 1998 Nick Clifton <nickc@cygnus.com>
43 * m32r.c (m32r_h_cr_set, m32r_h_cr_get): Shadow control register 6
44 in the backup PC register.
46 * m32rx.c (m32r_h_cr_set, m32r_h_cr_get): Shadow control register 6
47 in the backup PC register.
50 Thu Feb 19 16:39:35 1998 Doug Evans <devans@canuck.cygnus.com>
52 * m32r.c (do_lock,do_unlock): Delete.
53 * cpu.[ch],decode.[ch],extract.c,model.c: Regenerate.
54 * sem.c,sem-switch.c: Regenerate.
56 * cpux.[ch],decodex.[ch],readx.c,semx.c: Regenerate.
59 Tue Feb 17 18:18:10 1998 Doug Evans <devans@seba.cygnus.com>
61 * Makefile.in (M32R_OBJS): Add cpu.o.
62 (cpu.o): Add rule for.
64 * configure.in: Add AC_CHECK_PROG(SCHEME).
66 * cpuall.h,cpu.h,decode.c,decode.h,extract.c,model.c: Regenerate.
67 * sem-switch.c,sem.c: Regenerate.
68 * mloop.in (execute): Update call to semantic fn.
70 (M32RX_OBJS): Add cpux.o.
71 (cpux.o): Add rule for.
73 * cpux.h,decodex.c,decodex.h,modelx.c,readx.c,semx.c: Regenerate.
74 * m32rx.c (m32rx_h_accums_{get,set}): Rewrite.
75 (m32rx_h_cr_{get,set}): New functions.
76 (m32rx_h_accums_{get,set}): New functions.
77 * mloopx.in: Rewrite main loop.
80 * m32r.c (do_trap): Move from here.
81 * sim-if.c (do_trap): To here, and rewrite to use CB_SYSCALL support.
82 (sim_create_inferior): Use h_pc_set.
83 (h_pc_{get,set}): New functions.
84 (h_gr_{get,set}): New functions.
85 (syscall_{read,write}_mem): New functions.
86 * sim-main.h (h_{gr,pc}_{get,set}): Declare.
88 Tue Feb 17 12:44:38 1998 Andrew Cagney <cagney@b1.cygnus.com>
90 * sim-if.c (sim_store_register, sim_fetch_register): Pass in
91 length parameter. Return -1.
92 (sim_create_inferior): Pass 4 sim_store_register.
94 Wed Feb 11 19:53:48 1998 Doug Evans <devans@canuck.cygnus.com>
96 * sim-main.h (CIA_GET,CIA_SET): Provide dummy definitions for now.
98 * decode.c, decode.h, sem.c, sem-switch.c, model.c: Regenerate.
100 * cpux.c, decodex.c, decodex.h, readx.c, semx.c, modelx.c: Regenerate.
103 Mon Feb 9 19:41:54 1998 Doug Evans <devans@canuck.cygnus.com>
105 * decode.c, sem.c: Regenerate.
107 * cpux.h, decodex.c, readx.c, semx.c: Regenerate.
108 * m32rx.c (m32rx_h_accums_set): New function.
109 (m32rx_model_mark_[gs]et_h_gr): New function.
110 * mloopx.in: Rewrite.
111 * Makefile.in (mloopx.o): Build with -parallel.
112 * sim-main.h (_sim_cpu): Delete member `par_exec'.
113 * tconfig.in (WITH_SEM_SWITCH_FULL): Define as 0 for m32rx.
116 Thu Feb 5 12:44:31 1998 Doug Evans <devans@seba.cygnus.com>
118 * Makefile.in (m32r.o): Depend on cpu.h
119 (extract.o): Pass -DSCACHE_P.
120 * mloop.in (extract{16,32}): Update call to m32r_decode.
121 * arch.h,cpu.h,cpuall.h,decode.[ch]: Regenerate.
122 * extract.c,model.c,sem-switch.c,sem.c: Regenerate.
123 * sim-main.h: #include "ansidecl.h".
124 Don't include cpu-opc.h, done by arch.h.
126 * Makefile.in (M32RX_OBJS): Build m32rx support now.
128 * m32r-sim.h (m32rx_h_cr_[gs]et): Define.
129 * m32rx.c (m32rx_{fetch,store}_register): Update {get,set} of PC.
130 (m32rx_h_accums_get): New function.
131 * mloopx.in: Update call to m32rx_decode. Rewrite exec loop.
132 * cpux.h,decodex.[ch],modelx.c,readx.c,semx.c: Regenerate.
135 Sun Feb 1 16:47:51 1998 Andrew Cagney <cagney@b1.cygnus.com>
137 * configure: Regenerated to track ../common/aclocal.m4 changes.
139 Sat Jan 31 18:15:41 1998 Andrew Cagney <cagney@b1.cygnus.com>
141 * configure: Regenerated to track ../common/aclocal.m4 changes.
144 Thu Jan 29 11:22:00 1998 Doug Evans <devans@canuck.cygnus.com>
146 * Makefile.in (M32RX_OBJS): Comment out until m32rx port working.
147 * arch.h (HAVE_CPU_M32R{,X}): Delete, moved to m32r-opc.h.
148 * arch.c (machs): Check ifdef HAVE_CPU_FOO for each entry.
151 Tue Jan 20 14:16:02 1998 Nick Clifton <nickc@cygnus.com>
153 * cpux.h: Fix duplicate definition of h_accums field for
154 fmt_53_sadd structure.
157 Tue Jan 20 01:42:17 1998 Doug Evans <devans@seba.cygnus.com>
159 * Makefile.in: Add m32rx objs, and rules to build them.
160 * cpux.h, decodex.h, decodex.c, readx.c, semx.c, modelx.c: New files.
161 * m32rx.c, mloopx.in: New files.
164 Mon Jan 19 22:26:29 1998 Doug Evans <devans@seba>
166 * configure: Regenerated to track ../common/aclocal.m4 changes.
168 Mon Jan 19 14:13:40 1998 Doug Evans <devans@seba.cygnus.com>
170 * arch.c, arch.h, cpuall.h: New files.
171 * arch-defs.h: Deleted.
172 * mloop.in: Renamed from mainloop.in.
173 * Makefile.in: Update.
174 * sem-ops.h: Deleted.
175 * mem-ops.h: Deleted.
176 start-sanitize-cygnus
177 Add cgen support for generating files.
179 (arch): Renamed from CPU.
185 * sem-switch.c: Redone.
186 * sem.c: Renamed from semantics.c, and redone.
187 * m32r-sim.h (PROFILE_COUNT_FILLNOPS): Update.
188 (GETTWI,SETTWI,BRANCH_NEW_PC): Define.
189 * m32r.c (WANT_CPU,WANT_CPU_M32R): Define.
190 (m32r_{fetch,store}_register): New functions.
191 (model_mark_{get,set}_h_gr): Prefix with m32r_.
192 (m32r_model_mark_{busy,unbusy}_reg): Prefix with m32r_.
193 (h_cr_{get,set}): Prefix with m32r_.
194 (do_trap): Fetch state from current_cpu, not current_state.
195 Call sim_engine_halt instead of engine_halt.
196 * sim-if.c (alloc_cpu): New function.
197 (free_state): New function.
198 (sim_open): Call sim_state_alloc, and malloc space for selected cpu
199 type. Call sim_analyze_program.
200 (sim_create_inferior): Handle selected cpu type when setting PC.
202 (sim_resume): Handle m32rx.
204 (sim_stop_reason): Deleted.
205 (print_m32r_misc_cpu): Update.
207 (sim_{fetch,store}_register): Handle m32rx.
209 (sim_{read,write}): Deleted.
210 (sim_engine_illegal_insn): New function.
211 * sim-main.h: Don't include arch-defs.h,sim-core.h,sim-events.h.
212 Include arch.h,cpuall.h. Include cpu.h,decode.h if m32r.
214 Include cpux.h,decodex.h if m32rx.
216 (_sim_cpu): Include member appropriate cpu_data member for the cpu.
217 (M32R_MISC_PROFILE): Renamed from M32R_PROFILE.
218 (sim_state): Delete members core,events,halt_jmp_buf.
219 Change `cpu' member to be a pointer to the cpu's struct, rather than
220 record inside the state struct.
221 * tconfig.in (WITH_DEVICES): Define here.
222 (WITH_FAST,WITH_SEM_SWITCH_{FULL,FAST}): Define for the cpu.
224 Fri Jan 16 12:16:56 1998 Nick Clifton <nickc@cygnus.com>
226 * arch-defs.h (INSN_NAME): Fix typo.
228 Mon Dec 15 23:17:11 1997 Andrew Cagney <cagney@b1.cygnus.com>
230 * configure: Regenerated to track ../common/aclocal.m4 changes.
233 Thu Dec 4 09:21:05 1997 Doug Evans <devans@canuck.cygnus.com>
235 * m32r-sim.h (MSPR_ADDR): New macro.
236 (m32r_mspr_device): Declare.
237 (struct _device): Define.
238 * m32r.c (m32r_mspr_device): New global.
239 (device_{io_{read,write}_buffer,error}): New functions.
240 * mem-ops.h (SETMEM*): Use sim_core_write_map, not read map.
241 * sim-if.c: Delete redundant inclusion of cpu-sim.h.
242 (sim_open): Attach device to handle MSPR register.
243 * sim-main.h (WITH_DEVICES): Define as 1.
246 * configure: Regenerated to track ../common/aclocal.m4 changes.
248 Wed Dec 3 18:08:44 1997 Doug Evans <devans@canuck.cygnus.com>
250 * configure.in (SIM_AC_OPTION_ENVIRONMENT): Call.
251 * configure: Regenerated.
253 Wed Nov 19 12:17:08 1997 Doug Evans <devans@canuck.cygnus.com>
255 * mem-ops.h: Rename SIM_SIG{ACCESS,ALIGN} to SIM_SIG{SEGV,BUS}.
256 * sim-if.c (sim_open): Call sim_config.
257 (sim_stop_reason): Update call to sim_signal_to_host.
259 Tue Nov 18 15:33:48 1997 Doug Evans <devans@canuck.cygnus.com>
261 * Makefile.in (SIM_OBJS): Use $(SIM_NEW_COMMON_OBJS).
263 Fri Oct 31 18:46:46 1997 Andrew Cagney <cagney@b1.cygnus.com>
265 * sim-if.c (sim_open): Delete dead call to sim_core_attach.
267 Mon Oct 27 12:43:54 1997 Doug Evans <devans@canuck.cygnus.com>
269 * sem-ops.h (U{DIV,MOD}[BHSD]I): Use unsigned division.
271 Fri Oct 3 09:28:00 1997 Andrew Cagney <cagney@b1.cygnus.com>
273 * configure: Regenerated to track ../common/aclocal.m4 changes.
275 Wed Sep 24 17:38:57 1997 Andrew Cagney <cagney@b1.cygnus.com>
277 * configure: Regenerated to track ../common/aclocal.m4 changes.
279 Tue Sep 23 11:04:38 1997 Andrew Cagney <cagney@b1.cygnus.com>
281 * configure: Regenerated to track ../common/aclocal.m4 changes.
283 Tue Sep 23 10:19:51 1997 Andrew Cagney <cagney@b1.cygnus.com>
285 * Makefile.in (SIM_ENDIAN, SIM_HOSTENDIAN, SIM_SCACHE,
286 SIM_DEFAULT_MODEL): Delete, moved to common.
287 (SIM_EXTRA_CFLAGS): Update.
289 Mon Sep 22 11:46:20 1997 Andrew Cagney <cagney@b1.cygnus.com>
291 * configure.in (sim_link_links): Configure non-strict memory
294 * configure: Regenerated to track ../common/aclocal.m4 changes.
296 Fri Sep 19 17:45:25 1997 Andrew Cagney <cagney@b1.cygnus.com>
298 * configure: Regenerated to track ../common/aclocal.m4 changes.
300 Wed Sep 17 17:44:40 1997 Andrew Cagney <cagney@b1.cygnus.com>
302 * sim-if.c (sim_open): Allocate memory under sim-memopt module
303 using sim_do_commandf.
304 (sim_open): Set magic-number at the start.
305 (sim_do_command): Implement.
307 * sim-main.h (sim_engine_halt): Map onto engine_halt.
309 Mon Sep 15 17:36:15 1997 Andrew Cagney <cagney@b1.cygnus.com>
311 * configure: Regenerated to track ../common/aclocal.m4 changes.
313 Thu Sep 4 17:21:23 1997 Doug Evans <dje@seba>
315 * configure: Regenerated to track ../common/aclocal.m4 changes.
317 Fri Sep 5 10:21:48 1997 Andrew Cagney <cagney@b1.cygnus.com>
319 * Makefile.in (SIM_OBJS): Add sim-memopt.o module.
321 Thu Sep 4 10:30:02 1997 Andrew Cagney <cagney@b1.cygnus.com>
323 * sim-if.c (sim_open): Pass zero modulo arg to sim_core_attach.
325 Wed Aug 27 18:13:22 1997 Andrew Cagney <cagney@b1.cygnus.com>
327 * configure: Regenerated to track ../common/aclocal.m4 changes.
330 Tue Aug 26 10:39:42 1997 Andrew Cagney <cagney@b1.cygnus.com>
332 * sim-if.c (sim_kill): Delete.
333 (sim_create_inferior): Add ABFD argument.
334 (sim_load): Move setting of PC from here.
335 (sim_create_inferior): To here.
336 (sim_load): Delete, use sim-hload.c instead.
338 * Makefile.in (SIM_OBJS): Add sim-hload.o module.
340 Mon Aug 25 17:50:22 1997 Andrew Cagney <cagney@b1.cygnus.com>
342 * configure: Regenerated to track ../common/aclocal.m4 changes.
345 Mon Aug 25 15:54:08 1997 Andrew Cagney <cagney@b1.cygnus.com>
347 * sim-if.c (sim_open): Add ABFD argument.
349 Tue Jul 22 10:16:16 1997 Doug Evans <dje@canuck.cygnus.com>
351 * sim-main.h (M32R_DEFAULT_MEM_SIZE): New macro.
352 * sim-if.c (sim_open): Use it.
354 Wed Jun 4 12:48:12 1997 Andrew Cagney <cagney@b1.cygnus.com>
356 * sim-main.h (WITH_ENGINE): Disable the common engine for now.
358 Tue May 27 14:15:44 1997 Andrew Cagney <cagney@b1.cygnus.com>
360 * sim-if.c (sim_read): Pass NULL cpu to sim_core_read_buffer.
361 (sim_write): Ditto for write.
363 * m32r.c (do_trap): Ditto for read/write.
365 Tue May 20 10:18:25 1997 Andrew Cagney <cagney@b1.cygnus.com>
367 * sim-if.c (sim_open): Add callback argument.
368 (sim_set_callbacks, sim_callback): Delete.
369 (sim_load): Set STATE_LOADED_P.
371 Mon May 19 12:55:42 1997 Andrew Cagney <cagney@b1.cygnus.com>
373 * Makefile.in (SIM_OBJS): Link in sim-abort.o as a stub for
376 Mon May 5 12:45:28 1997 Andrew Cagney <cagney@b1.cygnus.com>
378 * sim-if.c (sim_open): Update to reflect changes to core in
380 * mem-ops.h (GETMEMQI, GETMEMHI, GETMEMSI, GETMEMDI, GETMEMUQI,
381 GETMEMUHI, GETMEMUSI, GETMEMUDI, SETMEMQI, SETMEMHI, SETMEMSI,
382 SETMEMDI, SETMEMUQI, SETMEMUHI, SETMEMUSI, SETMEMUDI): Ditto.
384 Sat May 3 08:38:55 1997 Doug Evans <dje@seba.cygnus.com>
386 * decode.c (decode): Add computed goto support.
388 Fri May 2 16:30:26 1997 Andrew Cagney <cagney@b1.cygnus.com>
390 * mem-ops.h: Stub additional core read/write arguments.
392 * sim-main.h: Declare sim_cia - type SI.
393 (struct _sim_cpu): Move base type to end per common.
394 (struct _sim_state): Ditto.
396 Thu May 1 11:15:34 1997 Doug Evans <dje@canuck.cygnus.com>
398 Merge from branch into devo. CGEN generic files moved to common
399 directory. K&R C support is no longer provided.
401 Thu Apr 24 00:39:51 1997 Doug Evans <dje@canuck.cygnus.com>
403 * configure: Regenerated to track ../common/aclocal.m4 changes.
405 Sat Apr 12 12:57:33 1997 Felix Lee <flee@yin.cygnus.com>
407 * Makefile.in, seman-cache.c: new file, for wingdb build.
408 * sim-alloca.h: fixed for wingdb.
410 Mon Apr 7 13:33:29 1997 Doug Evans <dje@seba.cygnus.com>
412 * decode.c (*): m32r_cgen_insn_table renamed to ..._entries.
413 * mainloop.in: Use CGEN_INSN_INDEX instead of CGEN_INSN_TYPE.
414 * simdefs.h (INSN_NAME): m32r_cgen_insn_table renamed to ..._entries.
416 Fri Apr 4 19:23:12 1997 Doug Evans <dje@canuck.cygnus.com>
418 * cgen-utils.in (ex_illegal): Fill in abuf->length, abuf->addr.
419 (exc_illegal): Likewise.
420 * decode.c (decode_vars): Add decode_illegal.
421 * genmloop.sh: #include "cpu-opc.h".
422 * sem-switch.c (case_INSN_ILLEGAL): Declare.
423 (labels): Add case_INSN_ILLEGAL.
424 (SWITCH): Add INSN_ILLEGAL case.
426 Wed Mar 26 12:34:00 1997 Doug Evans <dje@canuck.cygnus.com>
428 * model.c (model_module): Use 0 not NULL.
430 * genmloop.sh (sim_main_loop): Handle k&r c.
432 * sem-switch.c: Regenerate to get k&r c support.
433 * semantics.c: Likewise.
435 * m32r.c (ADD_{OV,CA}_SI,SUB_{OV,CA}_SI): Renamed to {ADD,SUB}[OC]FSI.
436 (ADDCSI,SUBCSI): New functions.
437 * sem-switch.c (addv,addv3,addx,subv,subx): Fix carry bit handling.
438 * semantics.c (addv,addv3,addx,subv,subx): Fix carry bit handling.
440 * simcache.c (simcache_{install,init,uninstall}): Use
441 DECLARE_MODULE_INSTALL_HANDLER.
442 (simcache_option_handler): Use DECLARE_OPTION_HANDLER.
444 * utils.c: #include "semops.h".
446 Tue Mar 11 14:30:26 1997 Doug Evans <dje@seba.cygnus.com>
448 * profile.c (profile_print_simcache): Fix thinko in printf text.
450 * simdefs.h (struct argbuf): Add member to fmt_20 so it's not empty.
452 Mon Mar 10 11:06:29 1997 Doug Evans <dje@seba.cygnus.com>
454 * m32r.c (h_cr_get): Rewrite.
456 * sem-switch.c (rte): bcarry renamed to bcond.
457 * semantics.c (rte): Likewise.
458 * simdefs.h (CPU_STATE): Likewise.
460 * config.in (HAVE_SYS_TIME_H): Add.
461 * configure.in: Check for sys/time.h.
462 * configure: Regenerated.
463 * utils.c: Include sys/time.h if present.
465 * common.c (sim_parse_args): Account for NULL terminating entry
466 in long_options table.
468 * genmloop.sh (RUN_FAST_P): Don't run fast if tracing.
469 Always use cache if configured in.
470 * mainloop.in (do_extract_insn{16,32}): New functions.
471 (normal,fast): Call them. Handle starting in left slot.
472 * simcache.c (simcache_option_handler): Disallow -c0.
473 * sem-switch.c (TRACE_RESULT): Redefine so no tracing.
475 * profile.c (profile_print_simcache): Fix percentage calc.
477 * Makefile.in (INCLUDE_DEPS): Delete simcommon.h.
479 Sun Mar 9 20:42:17 1997 Doug Evans <dje@seba.cygnus.com>
481 * Makefile.in (COMMON_{PRE,POST}_CONFIG_FRAG): Add delimiters for.
482 (M32R_INCLUDE_DEPS): Use cpu-sim.h instead of m32r-sim.h.
484 (mrun.o): Don't depend on M32R_INCLUDE_DEPS.
485 (sim-if.o,m32r.o,utils.o): Likewise.
486 (common.o): Don't explicitly depend on mod-list.h.
487 (mainloop.c): Pass CPU to genmloop.sh.
488 (stamp-modules): Depend on configure.
489 (decode.o): Depend on decode,h, memops.h, semops.h, cpu-opc.h.
490 (extract.o): Depend on decode.h, memops.h, semops.h.
491 (semantics.o,seman-cache.o): Likewise.
492 (model.o,ops.o): Depend on memops.h.
493 (extr-cache.o): Disable building for the moment.
495 * simcommon.h: Delete, move contents into cgen-sim.h.
496 * cgen-sim.h: Don't include ansidecl.h,bfd.h,simfns.h.
497 (UINT,CGEN_CAT3): Define.
498 ({extract,semantic}_fn_t): Renamed to {EXTRACT,SEMANTIC}_FN.
499 (decode_t): Renamed to DECODE.
501 * simfns.h: Delete, contents moved to memops.h,semops.h.
502 * memops.h: New file.
503 * semops.h: New file.
504 * decode.h: Renamed from semantics.h.
506 * sim-argv.h: New file.
507 * Makefile.in (memory.o,trace.o,profile.o,simcache.o,common): Add
508 dependency of sim-argv.h.
510 * sim-alloca.h: New file.
511 * common.c: Include it.
512 * Makefile.in (common.o): Add dependency.
514 * config.in (HAVE_TIME_H,HAVE_SYS_RESOURCE_H): Add.
515 (HAVE_GETRUSAGE,HAVE_TIME): Add.
516 * configure.in: sinclude ../common/aclocal.m4.
517 Check for headers time.h, sys/resource.h.
518 Check for functions time, getrusage.
519 (sim_link_{files,links}): Add link cpu-opc.h.
520 (sim_profile): Add simcache.
521 (SIM_AC_PROFILE): Add simcache, profile.o.
522 (simcache module): Delete extr-cache.o for now.
523 (--enable-sim-cache): Allow specification of default cache size.
524 * configure: Regenerated.
526 * decode.c: #include cgen-sim.h,memops.h,semops.h,decode.h,
527 cpu-sim.h,cpu-opc.h. Don't include m32r-sim.h.
530 * extract.c: #include cgen-sim.h,decode.h,cpu-sim.h.
531 Don't include m32r-sim.h.
532 (*): Define/Undef FLD macro. Use it to reference ARGBUF.
533 Simplify profiling test with PROFILE_MODEL_P.
534 (mvfc,mvtc): Fix access of control registers.
535 * semantic.c: #include cgen-sim.h,memops.h,semops.h,decode.h,cpu-sim.h.
536 Don't include m32r-sim.h.
537 (*): Define/Undef FLD macro. Use it to reference ARGBUF.
538 Simplify profiling test with PROFILE_MODEL_P.
539 (mvfc,mvtc): Fix access of control registers.
541 * sem-switch.c: New file, for GCC computed goto support.
543 * genmloop.sh: Add #include's of bfd.h,callback.h,cgen-sim.h,
544 memops.h,semops.h,trace.h,cpu-sim.h.
545 (RUN_FAST_P): Change default to run fast if cache size > 0
547 (sim_main_loop): Record execution time.
548 Record instruction count even in fast mode.
549 (init): Allow cpu to provide init code in mainloop.in.
550 (FAST): Define as 0 or 1 depending on fast mode.
551 * mainloop.in (normal): Combine with fast case.
552 Add support for GCC computed gotos. Count simcache hits/misses.
553 (init): Initialize "switch" labels if GNUC.
555 * cgen-utils.in: Don't include opcode/cgen.h.
556 Include cgen-sim.h, cpu-opc.h.
557 * common.c: Don't include simcommon.h,mod-list.h. Include cgen-sim.h.
558 * m32r-sim.h: Don't include mod-list.h
559 (RUN_FAST_P): Delete.
560 * m32r.c: Don't include profile.h. #include ansidecl.h,cgen-sim.h,
561 semops.h,memory.h,trace.h
562 (h_cr_get,h_cr_set): New functions.
563 * memory.c: #include cgen-sim.h,callback.h.
564 * ops.c: Don't include profile.h,m32r-sim.h.
565 Include cgen-sim.h,memops.h,cpu-sim.h.
566 (MEMOPS_DEFINE_INLINE): Renamed from SIMFNS_DEFINE_INLINE.
567 * trace.c: Include cgen-sim.h,cpu-opc.h.
568 * trace.h (trace_insn_{init,fini}): Declare.
570 * model.c: Don't include signal.h,stdlib.h,m32r-sim.h.
571 Include cgen-sim.h,cpu-sim.h,cpu-opc.h.
572 Regenerate to get new insn aliases.
574 * mrun.c: #include "ansidecl.h".
575 (STATE): Use struct sim_state instead.
577 * profile.c: Surround #include <stdlib.h> with HAVE_STDLIB_H.
578 Don't include simcommon.h. Include cgen-sim.h,cpu-opc.h.
579 (PROFILE_{READ,WRITE}_MASK): Replace with PROFILE_MEMORY_MASK.
580 (profile_print_simcache): New function.
581 (profile_print): Call it. Print simulator speed stats.
582 * profile.h (PROFILE_{READ,WRITE}_MASK): Replace with
584 (MODULE_PROFILE_SIMCACHE_P): Define.
585 (PROFILE_SIMCACHE_MASK): Define.
586 (PROFILE_COUNT): New members total_insn_count,exec_time.
587 New members simcache_hits,simcache_misses.
588 (PROFILE_SIMCACHE_{HITS,MISSES}): Define.
589 (PROFILE_MODEL_P): New macro.
590 (PROFILE_COUNT_SIMCACHE_{HIT,MISS}): New macros.
592 * sim-if.c: Surround #include <stdlib.h> with HAVE_STDLIB_H.
593 Don't include simcommon.h,m32r-sim.h. Include cgen-sim.h,cpu-sim.h.
594 (sim_resume): Use USING_SIMCACHE_P instead of RUN_FAST_P.
595 (sim_info): Pass verbose to profile_print.
597 * simcache.c: Include cgen-sim.h,callback.h.
598 (USING_SIMCACHE_P): Replace with SIMCACHE_P.
599 (simcache_option_handler): Ensure cache size at least 2.
600 Allow config time specification of default cache size.
601 * simcache.h (struct simcache): Support GCC computed gotos.
602 (SIMCACHE_DEFAULT_CACHE_SIZE): USe CONFIG_SIM_CACHE_SIZE if defined.
603 (USING_SIMCACHE_P): New macro.
605 * simdefs.h: Don't include m32r-opc.h.
606 (CGEN_MAX_SIM_INSNS): Define.
607 (CPU_STATE): Regenerate.
608 (ARGBUF): Regenerate.
609 (extract,semantic handler decls): Delete, moved to decode.h.
611 * tconfig.in: Don't include cgen-sim.h,m32r-sim.h.
612 (USE_SEM_SWITCH): Define.
614 * utils.c: Include bfd.h,time.h,sys/resource.h.
615 (sim_time_get,sim_time_elapsed): New functions.
616 * cgen-sim.h (SIM_TIME,sim_time_get,sim_time_elapsed): Declare.
618 Fri Jan 31 20:25:06 1997 Doug Evans <dje@canuck.cygnus.com>
620 * configure.in (AC_CHECK_HEADERS): Handle i386-windows.
621 * configure: Regenerated.
622 * model.c: #include <stdlib.h>.
623 * simcache.c: #include "libiberty.h".
624 * simcommon.h (alloca): Handle i386-windows.
626 * common.c: #include libiberty.h.
627 (sim_signal_to_host): Return 5 if wingdb.
629 Mon Jan 27 15:22:49 1997 Doug Evans <dje@seba.cygnus.com>
631 * configure.in (sim_cache): Enabled by default now, pass default
632 cache size to --enable-sim-cache.
633 * simcache.c (simcache_option_handler): Allow -c 0.
635 * simdefs.h,simfns.h: Regenerate
636 * decode.c,extract.c,model.c,ops.c,semantics.c: Regenerate.
638 Tue Jan 21 16:21:01 1997 Doug Evans <dje@seba.cygnus.com>
640 Add model profiling support.
641 * configure.in: Handle --enable-sim-model.
642 (sim_profile): Add model.
643 * Makefile.in (model.o): Add rule.
644 * cgen-sim.h (UNIT,INSN_TIMING,MACH,MODEL): New types.
645 * extract.c (*): Add model profiling support.
646 * m32r.c (model_mark_{get,set}_h_gr): New functions.
647 (model_mark_{busy,unbusy}_reg): New functions.
648 * profile.c (profile_option_handler): Recognize --profile model.
649 (profile_print_model): New function.
650 (profile_print): Call it.
651 * profile.h (MODULE_profile_model,MODULE_PROFILE_MODEL_P): Define.
652 (PROFILE_MODEL_MASK,PROFILE_LABEL_WIDTH): Define.
653 (PROFILE_COUNT): New members cycle_count,cti_stall_count,
654 load_stall_count,taken_count,untaken_count.
655 * semantics.c (*): Add model profiling support.
656 * simcommon.h (struct sim_state): New members mach,model.
657 * simdefs.h (CPU_PROFILE,MODEL_TYPE,UNIT_TYPE): New type.
658 (MAX_MODELS,MAX_UNITS): Define.
659 * tconfig.in (STATE_EXTRA_MEMBERS): Add cpu_profile.
661 * Makefile.in (INCLUDE_DEPS): Add $(SIM_MODULES_HDRS).
662 (stamp-modules): Depend on genmodlist.sh.
663 * common.c (standard_options): Add --max-insns.
664 (copy_argv): New function.
665 * tconfig.in (SIM_HAVE_MAX_INSNS): Define.
666 * genmloop.sh: Allow mainloop.in to contain support code.
667 * mainloop.in: Move do_insn16,do_insn32 here.
668 * m32r.c (do_trap): Handle SYS_argvlen,SYS_argv,SYS_read.
669 * sim-if.c (sim_open): Don't set max insn count.
670 (sim_create_inferior): Save argv,envp.
671 * simcommon.h (struct sim_state): New members argv,envp.
672 * simdefs.h ([GS]ETTWI,[GS]ETTUWI,[GS]ETTAI): Define.
673 ([GS]ETMEMWI,[GS]ETMEMUWI,[GS]ETMEMAI): Define.
674 (ARGBUF): New members h_gr_get, h_gr_set.
675 * trace.c (trace_insn_init,trace_insn_fini): New functions.
676 (trace_printf): Print to buffer, output later by trace_insn_fini.
677 * trace.h (TRACE_INSN_{INIT,FINI}): Define.
679 Thu Dec 19 16:01:59 1996 Doug Evans <dje@canuck.cygnus.com>
681 * configure.in (AC_FUNC_ALLOCA): Call.
682 * configure: Regenerate.
683 * config.h (HAVE_ALLOCA_H): Add.
684 * simcommon.h: Add alloca support.
685 (DECLARE_MODULE_INSTALL_HANDLER): Define.
686 (DECLARE_OPTION_HANDLER): Define.
687 (MEM_FN): Declare using PARAMS.
688 (DECLARE_MEM_FN): Define.
689 * trace.c (trace_result): Tweak for !STDC.
690 * cgen-sim.h (UDI_FN_SUPPORT): Define if ! HAVE_LONGLONG.
691 * cgen-utils.in (disasm_sprintf): Fix va_arg call in !STDC case.
692 * common.c (sim_print_help_fn): Use PARAMS.
693 (standard_option_handler): Fix decl for !STDC systems.
694 * memory.c: #include <stdio.h>
695 (mem_flat_{install,init,uninstall}): Fix decl for !STDC systems.
696 (mem_flat_{read,write},mem_flat_option_handler): Likewise.
697 * profile.c (profile_install): Likewise.
698 (profile_option_handler): Likewise.
700 Thu Dec 19 11:06:19 1996 Doug Evans <dje@seba.cygnus.com>
702 * semantics.c (*): Don't suffix big unsigned numbers with "U".
703 Prefix them with 0x instead.
705 * cgen-sim.h (DI_FN_SUPPORT): Define if ! HAVE_LONGLONG.
706 (SLADI,SRADI,CONVSIDI,CONVDISI): Delete, moved to simfns.h.
707 * semantics.c (machi,maclo,macwhi,macwlo,mulhi,mullo): Implement.
708 (mulwhi,mulwlo,mvtachi,mvtaclo,rac,rach): Implement.
709 * simfns.h: Add decls for functional DI,UDI,SF,DF,XF,TF support.
710 Add support for boolean and/or.
711 * utils.c: Redo naming of DI functional support.
712 (ANDDI,ORDI,ADDDI,MULDI,GEDI,LEDI,CONVHIDI): New functions.
714 Tue Dec 17 12:57:48 1996 Doug Evans <dje@seba.cygnus.com>