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