3 * configure: Regenerated to track ../common/aclocal.m4 changes.
11 * cpuall.h: Regenerate.
14 * decode.c: Regenerate.
15 * decode.h: Regenerate.
16 * decodex.c: Regenerate.
17 * decodex.h: Regenerate.
18 * model.c: Regenerate.
19 * modelx.c: Regenerate.
20 * sem-switch.c: Regenerate.
22 * semx-switch.c: Regenerate.
26 * Makefile.in (stamp-arch): Use $(CGEN_CPU_DIR).
27 (stamp-cpu): Likewise.
28 (stamp-xcpu): Likewise.
36 * cpuall.h: Regenerate.
39 * decode.c: Regenerate.
40 * decode.h: Regenerate.
41 * decodex.c: Regenerate.
42 * decodex.h: Regenerate.
43 * model.c: Regenerate.
44 * modelx.c: Regenerate.
45 * sem-switch.c: Regenerate.
47 * semx-switch.c: Regenerate.
51 * configure: Regenerated with sim_scache fix.
55 * Makefile.in: remove `@true' commands for rules that have
56 $(CGEN_MAINT) as a prerequisite.
61 * sem-switch.c: Regenerated.
62 * semx-switch.c: Regenerated.
66 * Makefile.in: Use of @true confuses VPATH. Remove it.
68 * cpux.h: Regenerated.
69 * decode.c: Regenerated.
70 * decodex.c: Regenerated.
71 * model.c: Regenerated.
72 * modelx.c: Regenerated.
73 * sem-switch.c: Regenerated.
75 * semx-switch.c: Regenerated.
79 * Makefile.in (m32r-clean): Add stamp-arch, stamp-cpu.
80 (stamp-arch, stamp-cpu): New targets.
84 * configure: Regenerated to track ../common/aclocal.m4 changes.
88 * configure: Regenerated.
92 * arch.c,arch.h,cpuall.h: Rebuild.
93 * cpux.h,decodex.c,decodex.h,modelx.c,semx-switch.c: Rebuild.
97 * mloop.in: Update call to sim_engine_invalid_insn.
98 * sem.c,sem-switch.c: Rebuild.
99 * traps.c (sim_engine_invalid_insn): New arg `vpc'. Change type of
100 result to SEM_PC. Return vpc.
102 * semx-switch.c: Rebuild.
106 * traps.c (sim_engine_invalid_insn): Return PC.
110 * configure: Regenerated to track ../common/aclocal.m4 changes.
114 * decodex.c: Rebuild.
124 * cpu.h,decode.c,decode.h,model.c,sem-switch.c,sem.c: Rebuild.
125 * cpux.h,decodex.c,decodex.h,modelx.c,semx-switch.c: Rebuild.
129 * m32r-sim.h (SEM_SKIP_INSN): Delete.
130 * cpu.h,cpuall.h,decode.c,model.c,sem-switch.c,sem.c: Rebuild.
131 * cpux.h,decodex.c,modelx.c,semx-switch.c: Rebuild.
132 * mloopx.in (emit_parallel): Call SEM_SKIP_COMPILE.
133 (emit_full_parallel): Ditto.
137 * configure: Regenerated to track ../common/aclocal.m4 changes.
141 * devices.c (device_io_read_buffer): New arg `sd'.
142 (device_io_write_buffer): New arg `sd'.
143 (device_error): Give proper arg spec.
147 * sem-switch.c,sem.c: Rebuild.
148 * cpux.h,semx-switch.c: Rebuild.
153 * decodex.c: Rebuild.
157 * m32r-sim.h (M32R_DEVICE_LEN): Fix off by one error.
161 * arch.c,arch.h,model.c: Rebuild.
163 * m32r-sim.h (a_m32r_h_gr_get,a_m32r_h_gr_set): Declare.
164 (a_m32r_h_cr_get,a_m32r_h_cr_set): Declare.
165 * m32r.c (m32rbf_fetch_register): Replace calls to a_m32r_h_pc_get,
166 a_m32r_h_accum_get with appropriate calls to m32rbf_*.
167 (m32rbf_store_register): Ditto.
168 (a_m32r_h_gr_get,a_m32r_h_gr_set): New functions.
169 (a_m32r_h_cr_get,a_m32r_h_cr_set): Ditto.
170 * sim-if.c (sim_open): Update call to m32r_cgen_cpu_open.
171 * traps.c (m32r_core_signal): Replace calls to a_m32r_h_*,
172 with appropriate calls to m32rbf_*.
176 * arch.c,arch.h,cpu.c,cpu.h,sem.c,sem-switch.c: Rebuild.
177 * cpux.c,cpux.h,semx-switch.c: Rebuild.
178 * m32r-sim.h (GET_H_*,SET_H_*, except GET_H_SM): Delete.
179 * sim-if.c (sim_open): Update call to m32r_cgen_cpu_open.
183 * cpu.c,cpu.h: Rebuild.
187 * Makefile.in (SIM_EXTRA_DEPS): Add m32r-desc.h, delete cpu-opc.h.
188 (stamp-xmloop): s/-parallel/-parallel-write/.
189 * configure.in (sim_link_files,sim_link_links): Delete.
190 * configure: Rebuild.
191 * decode.c,decode.h,model.c,sem-switch.c,sem.c: Rebuild.
192 * decodex.c,decodex.h,modelx.c,semx-switch.c: Rebuild.
193 * mloop.in (execute): CGEN_INSN_ATTR renamed to CGEN_INSN_ATTR_VALUE.
194 * sim-if.c (sim_open): m32r_cgen_cpu_open renamed from
195 m32r_cgen_opcode_open. Set disassembler.
196 (sim_close): m32r_cgen_cpu_open renamed from m32r_cgen_opcode_open.
197 * sim-main.h: Don't include cpu-opc.h,cpu-sim.h. Include
198 m32r-desc.h,m32r-opc.h,m32r-sim.h.
202 * cpux.h,decodex.c,modelx.c,semx-switch.c: Regenerate.
206 * cpu.h,decode.c,model.c,sem-switch.c,sem.c: Rebuild.
207 * cpux.h,decodex.c,modelx.c,semx-switch.c: Rebuild.
211 * decode.h,model.c: Regenerate.
212 * decodex.h,modelx.c: Regenerate.
216 * arch.c,arch.h,cpuall.h: Regenerate.
217 * cpu.c,cpu.h,decode.c,decode.h,model.c,sem-switch.c,sem.c: Regenerate.
218 * traps.c (sim_engine_invalid_insn): PCADDR->IADDR.
219 * cpux.c,cpux.h,decodex.c,decodex.h,modelx.c,semx-switch.c: Regenerate.
223 * Makefile.in (m32r-clean): rm eng.h.
224 * sim-main.h: Delete inclusion of ansidecl.h.
226 * cpux.h: Regenerate.
231 * cpux.h: Regenerate.
235 * Makefile.in (MAIN_INCLUDE_DEPS): Delete.
236 (INCLUDE_DEPS,OPS_INCLUDE_DEPS): Delete.
237 (sim-if.o): Use SIM_MAIN_DEPS.
238 (arch.o,traps.o,devices.o): Ditto.
239 (M32RBF_INCLUDE_DEPS): Use CGEN_MAIN_CPU_DEPS.
240 (m32r.o,mloop.o,cpu.o,decode.o,sem.o,model.o): Simplify dependencies.
241 (m32rx.o,mloopx.o,cpux.o,decodex.o,semx.o,modelx.o): Ditto.
242 * cpu.c,cpu.h,decode.c,model.c,sem-switch.c,sem.c: Regenerate.
243 * m32r-sim.h (m32rbf_h_cr_[gs]et_handler): Declare.
244 ([GS]ET_H_CR): Define.
245 (m32rbf_h_psw_[gs]et_handler): Declare.
246 ([GS]ET_H_PSW): Define.
247 (m32rbf_h_accum_[gs]et_handler): Declare.
248 ([GS]ET_H_ACCUM): Define.
249 (m32rxf_h_{cr,psw,accum}_[gs]et_handler): Declare.
250 (m32rxf_h_accums_[gs]et_handler): Declare.
251 ([GS]ET_H_ACCUMS): Define.
252 * sim-if.c (sim_open): Model probing code moved to sim-model.c.
253 * m32r.c (WANT_CPU): Define as m32rbf.
254 (all register access fns): Rename to ..._handler.
255 * cpux.c,cpux.h,decodex.c,modelx.c,semx.c: Regenerate.
256 * m32rx.c (WANT_CPU): Define as m32rxf.
257 (all register access fns): Rename to ..._handler.
261 * configure.in: --enable-cgen-maint support moved to common/aclocal.m4.
262 (SIM_AC_OPTION_ALIGNMENT): Make strict.
263 * configure: Regenerate.
265 * sem-switch.c,sem.c,semx-switch.c: Regenerate.
266 * sim-main.h (SIM_ENGINE_HALT_HOOK,SIM_ENGINE_RESTART_HOOK): Define.
267 * traps.c (m32r_core_signal): Handle --environment=operating.
271 * cpu.h,decode.c,sem-switch.c,sem.c: Regenerate.
272 * cpux.h,decodex.c,semx-switch.c: Regenerate.
274 * sim-if.c: Include string.h or strings.h if present.
278 * configure.in: Call SIM_AC_OPTION_INLINE.
279 * configure: Regenerate.
280 * sim-main.h: Protect against multiple inclusion.
281 Don't include cgen-scache.h,cgen-cpu.h,cgen-trace.h,cpuall.h.
282 Done by cgen-sim.h now.
283 * tconfig.in (SIM_HAVE_MODEL): Delete, moved to cgen-types.h.
284 * cpuall.h: Regenerate.
285 * cpu.h,decode.c,sem-switch.c,sem.c: Regenerate.
286 * mloop.in (extract16): Make static inline again.
287 Simplify with call to @cpu@_fill_argbuf,@cpu@_fill_argbuf_tp.
289 Simplify with call to @cpu@_fill_argbuf,@cpu@_fill_argbuf_tp.
290 (execute): Test ARGBUF_PROFILE_P before profiling.
291 Update calls to TRACE_INSN_INIT,TRACE_INSN_FINI.
292 * cpux.h,decodex.c,modelx.c,semx-switch.c: Regenerate.
293 * mloopx.in: Rewrite.
297 * devices.c (device_io_write_buffer): Fix typo.
298 * sim-if.c (sim_open): Hack in call to dv_sockser_install.
299 * tconfig.in (HAVE_DV_SOCKSER): Add but comment out.
303 * Makefile.in (M32R_OBJS): Delete extract.o.
305 * cpu.c,cpu.h,decode.c,decode.h,sem-switch.c,sem.c: Rebuild.
306 * mloop.in (extract16): Update type of `insn' arg.
307 Delete call to d->extract.
309 * cpux.c,cpux.h,decodex.c,decodex.h,semx-switch.c: Rebuild.
310 * mloopx.in (extractx16): Update type of `insn' arg.
311 Delete call to d->extract. Delete arg pbb_p. All callers updated.
312 (extract-simple,full-exec-simple,fast-exec-simple): Delete.
317 * sim-main.h: Delete inclusion of config.h, include sim-basics.h
319 * tconfig.in: Guard against multiple inclusion.
320 * cpu.h: Delete decls moved to genmloop.sh.
325 * sim-main.h: #include cpu-opc.h.
326 * arch.c,arch.h,decode.c,extract.c,model.c,sem.c: Regenerate
327 to get #include cleanup.
328 * decodex.c,extractx.c,modelx.c: Ditto.
330 * Makefile.in (SIM_EXTRA_DEPS): Replace cgen headers with
332 (M32RBF_INCLUDE_DEPS): Define.
333 (m32r .o's): Depend on it.
334 (mloop.c): Update call to genmloop.sh.
335 * cpu.h,cpuall.h: Regenerate.
336 * sim-main.h: Delete inclusion of cpu.h,decode.h, moved to cpuall.h.
337 #include cgen-scache.h,cgen-cpu.h.
338 * tconfig.in (WITH_FOO semantic macros): Delete.
339 * Makefile.in (M32RXF_INCLUDE_DEPS): Define.
340 (m32rx .o's): Depend on it.
341 (mloopx.c): Update call to genmloop.sh.
342 * cpux.h: Regenerate.
346 * sim-if.c (sim_do_command): Handle "sim info reg {bbpsw,bbpc}".
350 Add pseudo-basic-block execution support.
351 * Makefile.in (SIM_OBJS): Add sim-reg.o, cgen-run.o, sim-stop.o.
352 (SIM_EXTRA_DEPS): Add include/opcode/cgen.h.
353 (INCLUDE_DEPS): Delete cpu-sim.h, include/opcode/cgen.h.
354 (mloop.c): Build pseudo-basic-block version. Depend on stamp-cpu.
355 * arch.c,arch.h,cpuall.h: Regenerate.
356 * cpu.c,cpu.h,decode.c,decode.h,extract.c,model.c: Regenerate.
357 * sem-switch.c,sem.c: Regenerate.
358 * m32r-sim.h (M32R_MISC_PROFILE): New members load_regs,
360 * m32r.c (m32rbf_fetch_register): Renamed from m32rb_fetch_register.
361 (m32rbf_store_register,m32rbf_h_cr_get,m32rbf_h_cr_set,
362 m32rbf_h_psw_get,m32rbf_h_psw_set,m32rbf_h_accum_get,
363 m32rbf_h_accum_set): Likewise.
364 (m32r_model_{init,update}_insn_cycles): Delete.
365 (m32rbf_model_insn_{before,after}): New fns.
366 (m32r_model_record_cti,m32r_model_record_cycles): Delete.
367 (m32rb_model_mark_get_h_gr,m32rb_model_mark_set_h_gr): Delete.
368 (m32rb_model_mark_busy_reg,m32rb_model_mark_unbusy_reg): Delete.
369 (check_load_stall): New fn.
370 (m32rbf_model_m32r_d_u_{exec,cmp,mac,cti,load,store}): New fns.
371 (m32rbf_model_test_u_exec): New fn.
372 * mloop.in: Rewrite, use pbb support.
373 * sim-if.c (sim_stop,sim_sync_stop,sim_resume): Delete.
374 (sim_fetch_register,sim_store_register): Delete.
375 * sim-main.h (CIA_GET,CIA_SET): Fix.
376 (SIM_ENGINE_HALT_HOOK,SIM_ENGINE_RESTART_HOOK): Delete.
377 * tconfig.in (WITH_SCACHE_PBB): Define.
378 (WITH_SCACHE_PBB_M32RBF): Define.
379 * traps.c (sim_engine_invalid_insn): Renamed from ..._illegal_....
380 (m32r_trap): Pass pc to sim_engine_halt.
381 * configure.in (SIM_AC_OPTION_SCACHE): Change 1024 to 16384.
382 * configure: Regenerate.
383 * Makefile.in (M32RX_OBJS): Delete semx.o, add extract.o.
384 (mloopx.c): Build pseudo-basic-block version.
387 * cpux.c,cpux.h,decodex.c,decodex.h,modelx.c: Regenerate.
390 * extractx.c: New file.
391 * semx-switch.c: New file.
392 * m32r-sim.h (BRANCH_NEW_PC): Delete.
393 (SEM_SKIP_INSN): New macro.
394 * m32rx.c (m32rxf_fetch_register): Renamed from m32rx_fetch_register.
395 (m32rxf_store_register,m32rxf_h_cr_get,m32rxf_h_cr_set,
396 m32rxf_h_psw_get,m32rxf_h_psw_set,m32rxf_h_accum_get,
397 m32rxf_h_accum_set,m32rxf_h_accums_get,m32rxf_h_accums_set): Likewise.
398 (m32rxf_model_insn_{before,after}): New fns.
399 (m32rx_model_mark_get_h_gr,m32rx_model_mark_set_h_gr): Delete.
400 (m32rx_model_mark_busy_reg,m32rx_model_mark_unbusy_reg): Delete.
401 (check_load_stall): New fn.
402 (m32rxf_model_m32rx_u_{exec,cmp,mac,cti,load,store}): New fns.
403 * mloopx.in: Rewrite, use pbb support.
404 * tconfig.in (WITH_SCACHE_PBB_M32RXF): Define.
405 (WITH_SEM_SWITCH_FULL): Change from 0 to 1.
409 * m32r-sim.h ({PSW,CBR,SPI,SPU,BPC,BBPSW,BBPC}_REGNUM): New macros.
410 ({ACC1L,ACC1H}_REGNUM): New macros.
411 (m32r_decode_gdb_ctrl_regnum): Add prototype.
412 * m32r.c (m32r_decode_gdb_ctrl_regnum): New function.
413 (m32r_fetch_register,m32r_store_register): Rewrite.
414 * m32rx.c (m32rx_fetch_register,m32rx_store_register): Rewrite.
418 * m32r-sim.h (GET_H_SM): New macro.
419 (UART params): Update to msa2000.
420 * devices.c (device_io_read_buffer): Update to msa2000.
421 * m32r.c (m32rb_h_cr_get,m32rb_h_cr_set): Handle bbpc,bbpsw.
422 (m32rb_h_psw_get,m32rb_h_psw_set): New functions.
423 * arch.c,arch.h,cpu.c,cpu.h,sem-switch.c,sem.c: Regenerate.
424 * m32rx.c (m32rx_h_cr_get,m32rx_h_cr_set): Handle bbpc,bbpsw.
425 (m32rx_h_psw_get,m32rx_h_psw_set): New functions.
426 * cpux.c,cpux.h,readx.c,semx.c: Regenerate.
430 * m32r-sim.h (m32r_trap): Update prototype.
431 * traps.c (m32r_trap): New arg `pc'.
432 * sem.c,sem-switch.c: Regenerated.
433 * cpux.h,readx.c,semx.c: Regenerated.
437 Rename cpu m32r to m32rb to distinguish from architecture name.
438 * Makefile.in (mloop.c): cpu m32r renamed to m32rb.
439 * sim-main.h (WANT_CPU_M32RB): Renamed from WANT_CPU_M32R.
440 * tconfig.in (WANT_CPU_M32RB): Ditto.
441 * m32r.c (WANT_CPU_M32RB): Ditto.
442 (*): m32r_ cpu fns renamed to m32rb_.
443 * sim-if.c (sim_stop,sim_sync_stop,sim_resume): Update.
444 * arch.h,arch.c: Regenerate.
445 * cpu.c,cpu.h,decode.c,decode.h,extract.c,model.c: Regenerate.
446 * sem-switch.c,sem.c: Regenerate.
448 * sim-if.c (sim_open): Don't allocate memory on top of any user
450 (h_gr_get,h_gr_set): Delete.
451 * sim-main.h (h_gr_get,h_gr_set): Delete.
452 * traps.c (m32r_trap): Replace calls to h_gr_[gs]et with
455 * Makefile.in (INCLUDE_DEPS): Add include/opcode/cgen.h.
457 * sim-if.c (sim_open): Open opcode table.
458 (sim_close): Close it.
462 Add support for new versions of mulwhi,mulwlo,macwhi,macwlo that
463 accept an accumulator choice.
464 * cpux.c,decodex.c,decodex.h,modelx.c,readx.c,semx.c: Regenerate.
468 * m32r.c: Include cgen-mem.h.
469 * traps.c (m32r_trap): Tweak for -Wall.
470 * m32rx.c: Include cgen-mem.h.
471 * semx.c: Regenerate, get -Wall cleanups.
475 * cpu.h,extract.c: Regenerate. pc-rel calcs done on f_dispNN now.
476 * cpux.h,readx.c,semx.c: Ditto.
480 * Makefile.in: cgen_maint -> CGEN_MAINT.
481 * configure.in: AC_SUBST cgen,cgendir. No longer look for guile.
482 * configure: Regenerate.
483 * arch.c,arch.h,cpuall.h: Regenerate.
484 * cpu.c,cpu.h,decode.c,decode.h,extract.c,model.c: Regenerate.
485 * sem-switch.c,sem.c: Regenerate.
486 * cpux.c,cpux.h,decodex.c,decodex.h,modelx.c,readx.c: Regenerate.
487 * semx.c: Regenerate.
488 * mloopx.in (icount): Moved here from genmloop.sh.
492 * m32r-sim.h (M32R_MISC_PROFILE): New members insn_cycles, cti_stall,
493 load_stall,biggest_cycles.
494 * m32r.c (m32r_model_mark_get_h_gr): Update.
495 (m32r_model_init_insn_cycles,m32r_model_update_insn_cycles): New fns.
496 (m32r_model_record_cti,m32r_model_record_cycles): New functions.
497 * mloop.in: Call cycle init/update fns.
498 * model.c: Regenerate.
499 * m32rx.c (m32rx_model_mark_get_h_gr): Update.
500 * mloopx.in: Call cycle init/update fns.
501 * modelx.c: Regenerate.
505 * traps.c: New file. Trap support moved here from sim-if.c.
506 * Makefile.in (SIM_OBJS): Add traps.o
507 * sim-if.c: Don't include targ-vals.h.
508 (sim_engine_illegal_insn): Moved to traps.c
509 * sim-main.h (SIM_CORE_SIGNAL): Define.
510 (m32r_core_signal): Declare.
511 * m32r-sim.h (m32r_trap): Declare.
513 * devices.c (device_io_read_buffer): Handle cache purging via MCCR
516 * m32r-sim.h (M32R_MISC_PROFILE): Move here from sim-main.h.
517 (PROFILE_COUNT_SHORTINSNS,PROFILE_COUNT_LONGINSNS): New macros.
518 (TRAP_SYSCALL,TRAP_BREAKPOINT): New macros.
520 * extract.c,sem-switch.c,sem.c: Regenerate.
521 * cpux.h,readx.c,semx.c: Regenerate.
525 * m32r-sim.h (PROFILE_COUNT_PARINSNS): New macro.
526 * mloopx.in (extract): Set abuf.addr for proper fill nop counting.
527 (execute): Count parallel insns.
528 * sim-if.c (print_m32r_misc_cpu): Print count.
529 * sim-main.h (M32R_MISC_PROFILE): New member parallel_count.
531 Zero bottom two bits of pc in jmp,jl insns.
532 * sem.c,sem-switch.c: Regenerate.
533 * semx.c: Regenerate.
537 * sim-if.c (do_trap): Treat traps 2-15 as hardware does.
541 * sim-if.c (sim_stop): Update call to @cpu@_engine_stop.
542 (sim_sync_stop): New function.
546 * Makefile.in (devices.o): Add dependencies.
548 * arch.h,cpu.c,cpu.h,cpuall.h: Regenerate.
549 * sem-switch.c,sem.c: Regenerate.
550 * mloop.in (execute): Update calls to TRACE_INSN_{INIT,FINI}.
551 * cpux.c,cpux.h,modelx.c,semx.c: Regenerate.
552 * m32rx.c (m32rx_model_mark_{busy,unbusy}_reg): New functions.
553 * mloopx.in (execute): Update calls to TRACE_INSN_{INIT,FINI}.
554 Fix pc value passed to TRACE_INSN for second parallel insn.
558 * Makefile.in (SIM_OBJS): Add sim-cpu.o.
562 * arch.h,arch.c,cpu.h,cpuall.h: Regenerate, tweaks mostly.
563 * model.c: Ditto. Reorganize model/mach data.
567 * Makefile.in (m32r.o,mloop.o,cpu.o,model.o): Add decode.h dependency.
568 (m32rx.o,mloopx.o,cpux.o,modelx.o): Add decodex.h dependency.
569 * decode.c,decode.h: Regenerate, introduces IDESC table.
570 * mloop.in (extract16,extract32): Add IDESC support.
571 Update names of semantic handler member names.
572 (execute): Ditto. Delete call to PROFILE_COUNT_INSN.
573 * decodex.c,decodex.h: Regenerate, introduces IDESC table.
574 * mloopx.in: Add IDESC support.
575 Update names of semantic handler member names.
576 Delete call to PROFILE_COUNT_INSN.
578 * sem-switch.c: Regenerate. Redo computed goto label handling.
579 * sem.c: Regenerate. Call PROFILE_COUNT_INSN.
580 * readx.c: Regenerate. Redo computed goto label handling.
581 * semx.c: Regenerate. Call PROFILE_COUNT_INSN. Finish profiling
584 * m32r.c (m32r_fetch_register): Change result type and args to
585 conform to sim_fetch_register interface.
586 (m32r_store_register): Ditto for sim_store_register interface.
587 * m32rx.c (m32rx_fetch_register): Change result type and args to
588 conform to sim_fetch_register interface.
589 (m32rx_store_register): Ditto for sim_store_register interface.
591 * sim-if.c (alloc_cpu): Delete.
592 (free_state): Uninstall modules here ...
593 (sim_open): ... and not here. Call sim_cpu_alloc_all.
594 Set default architecture/model if not specified.
595 (sim_fetch_register,sim_store_register): Rewrite.
597 * sim-if.c (h_pc_get,h_pc_set): Delete. Renamed to sim_pc_[gs]et
598 and moved to common/sim-cpu.c.
599 (sim_create_inferior): Update.
601 * sim-main.h (h_pc_get,h_pc_set): Delete.
603 * sim-main.h (sim_cia): Change to USI.
604 (sim_cpu): Move m32r_misc_profile before machine generated part.
608 * configure: Regenerated to track ../common/aclocal.m4 changes.
617 * cpu.h,model.c,sem-switch.c,sem.c: Regenerated. Mostly comment
618 and variable renaming due to macro insn additions.
619 * mloop.in: Update to use CGEN_INSN_NUM.
620 * cpux.h,modelx.c,readx.c,semx.c: Regenerated.
621 * mloopx.in: Update to use CGEN_INSN_NUM.
623 Sun Apr 26 15:31:55 1998 Tom Tromey <tromey@creche>
625 * configure: Regenerated to track ../common/aclocal.m4 changes.
630 * acconfig.h: New file.
631 * configure.in: Reverted change of Apr 24; use sinclude again.
633 Fri Apr 24 14:16:40 1998 Tom Tromey <tromey@creche>
635 * configure: Regenerated to track ../common/aclocal.m4 changes.
640 * configure.in: Don't call sinclude.
644 * cpu.c,sem.c,sem-switch.c: Regenerate. From
645 - cgen/m32r.cpu (h-accum): Add attribute FUN-ACCESS.
646 * m32r.c (m32r_h_accum_get,m32r_h_accum_set): New functions.
648 * cpux.c,readx.c,semx.c: Regenerate.
649 * m32rx.c (m32r_h_accum_get,m32r_h_accum_set): New functions.
650 #include cgen-ops.h. Delete inclusion of several unnecessary headers.
651 (m32r_h_accums_get): Sign extend top 8 bits.
655 * semx.c: Regenerate.
659 * cpu.h,decode.c,decode.h,extract.c,sem.c,sem-switch.c: Regenerate.
660 * cpux.h,decodex.c,decodex.h,readx.c,semx.c: Regenerate.
664 * configure: Regenerated to track ../common/aclocal.m4 changes.
668 * configure: Regenerated to track ../common/aclocal.m4 changes.
672 * configure: Regenerated to track ../common/aclocal.m4 changes.
676 * configure: Regenerated to track ../common/aclocal.m4 changes.
680 * config.in (HAVE_FCNTL_H): Add.
681 * configure: Regenerate.
682 * Makefile.in (SIM_OBJS): Add devices.o.
683 * m32r-sim.h (m32r_devices): Renamed from m32r_mspr_device.
684 (UART_*): Define m32r serial port parameters.
685 (M32R_DEVICE_ADDR,M32R_DEVICE_LEN): Define.
686 * m32r.c (device_io_{read,write}_buffer,device_error): Move from here,
687 * devices.c: To here.
688 * sim-if.c: Don't include signal.h,sim-core.h.
689 (sim_open): Use M32R_DEVICE_{ADDR,LEN} in sim_core_attach call.
690 (sim_resume): Call sim_module_{resume,suspend}.
691 * m32r.c (m32r_h_cr_{get,set}): Use register number enums.
693 * tconfig.in (SIM_HANDLES_LMA): Define.
695 * sim-if.c (do_trap): Result is new pc.
696 Handle --environment=operating.
697 * sem-switch.c,sem.c: Regenerate.
698 * semx.c: Regenerate.
702 * sim-if.c (syscall_read_mem, syscall_write_mem): Replace
703 sim_core_*_map with read_map, write_map, exec_map resp.
707 * Makefile.in (SIM_EXTRA_DEPS): Add cpu-opc.h.
708 (arch.o): Delete cpu-opc.h dependency.
709 (decode.o,model.o): Likewise.
710 (decodex.o,modelx.o): Likewise.
712 * cpu.h,model.c,sem-switch.c,sem.c: Regenerate.
713 * cpux.h,decodex.[ch],modelx.c,readx.c,semx.c: Regenerate.
717 * sim-if.c (sim_open): Initialize PROFILE_INFO_CPU_CALLBACK.
719 * sim-if.c (sim_info): Delete.
723 * mloopx.in: Fix handling of branch in parallel with another insn.
724 * semx.c: Regenerate.
728 * sim-main.h: #include symcat.h.
729 * m32r-sim.h (BRANCH_NEW_PC): Delete current_cpu arg.
730 (NEW_PC_{BASE,SKIP,2,4,BRANCH_P}): New macros.
731 * cpu.[ch],decode.[ch],extract.c,model.c: Regenerate.
732 * sem.c,sem-switch.c: Regenerate.
733 * m32r-sim.h (SEM_NEXT_PC): Modify to handle parallel exec.
734 * mloopx.in: Rewrite.
735 * cpux.[ch],decodex.[ch],readx.c,semx.c: Regenerate.
739 * m32r.c (m32r_h_cr_set, m32r_h_cr_get): Shadow control register 6
740 in the backup PC register.
741 * m32rx.c (m32r_h_cr_set, m32r_h_cr_get): Shadow control register 6
742 in the backup PC register.
746 * m32r.c (do_lock,do_unlock): Delete.
747 * cpu.[ch],decode.[ch],extract.c,model.c: Regenerate.
748 * sem.c,sem-switch.c: Regenerate.
749 * cpux.[ch],decodex.[ch],readx.c,semx.c: Regenerate.
753 * Makefile.in (M32R_OBJS): Add cpu.o.
754 (cpu.o): Add rule for.
756 * configure.in: Add AC_CHECK_PROG(SCHEME).
758 * cpuall.h,cpu.h,decode.c,decode.h,extract.c,model.c: Regenerate.
759 * sem-switch.c,sem.c: Regenerate.
760 * mloop.in (execute): Update call to semantic fn.
761 (M32RX_OBJS): Add cpux.o.
762 (cpux.o): Add rule for.
764 * cpux.h,decodex.c,decodex.h,modelx.c,readx.c,semx.c: Regenerate.
765 * m32rx.c (m32rx_h_accums_{get,set}): Rewrite.
766 (m32rx_h_cr_{get,set}): New functions.
767 (m32rx_h_accums_{get,set}): New functions.
768 * mloopx.in: Rewrite main loop.
770 * m32r.c (do_trap): Move from here.
771 * sim-if.c (do_trap): To here, and rewrite to use CB_SYSCALL support.
772 (sim_create_inferior): Use h_pc_set.
773 (h_pc_{get,set}): New functions.
774 (h_gr_{get,set}): New functions.
775 (syscall_{read,write}_mem): New functions.
776 * sim-main.h (h_{gr,pc}_{get,set}): Declare.
780 * sim-if.c (sim_store_register, sim_fetch_register): Pass in
781 length parameter. Return -1.
782 (sim_create_inferior): Pass 4 sim_store_register.
786 * sim-main.h (CIA_GET,CIA_SET): Provide dummy definitions for now.
788 * decode.c, decode.h, sem.c, sem-switch.c, model.c: Regenerate.
789 * cpux.c, decodex.c, decodex.h, readx.c, semx.c, modelx.c: Regenerate.
793 * decode.c, sem.c: Regenerate.
794 * cpux.h, decodex.c, readx.c, semx.c: Regenerate.
795 * m32rx.c (m32rx_h_accums_set): New function.
796 (m32rx_model_mark_[gs]et_h_gr): New function.
797 * mloopx.in: Rewrite.
798 * Makefile.in (mloopx.o): Build with -parallel.
799 * sim-main.h (_sim_cpu): Delete member `par_exec'.
800 * tconfig.in (WITH_SEM_SWITCH_FULL): Define as 0 for m32rx.
804 * Makefile.in (m32r.o): Depend on cpu.h
805 (extract.o): Pass -DSCACHE_P.
806 * mloop.in (extract{16,32}): Update call to m32r_decode.
807 * arch.h,cpu.h,cpuall.h,decode.[ch]: Regenerate.
808 * extract.c,model.c,sem-switch.c,sem.c: Regenerate.
809 * sim-main.h: #include "ansidecl.h".
810 Don't include cpu-opc.h, done by arch.h.
811 * Makefile.in (M32RX_OBJS): Build m32rx support now.
813 * m32r-sim.h (m32rx_h_cr_[gs]et): Define.
814 * m32rx.c (m32rx_{fetch,store}_register): Update {get,set} of PC.
815 (m32rx_h_accums_get): New function.
816 * mloopx.in: Update call to m32rx_decode. Rewrite exec loop.
817 * cpux.h,decodex.[ch],modelx.c,readx.c,semx.c: Regenerate.
821 * configure: Regenerated to track ../common/aclocal.m4 changes.
825 * configure: Regenerated to track ../common/aclocal.m4 changes.
829 * Makefile.in (M32RX_OBJS): Comment out until m32rx port working.
830 * arch.h (HAVE_CPU_M32R{,X}): Delete, moved to m32r-opc.h.
831 * arch.c (machs): Check ifdef HAVE_CPU_FOO for each entry.
835 * cpux.h: Fix duplicate definition of h_accums field for
836 fmt_53_sadd structure.
840 * Makefile.in: Add m32rx objs, and rules to build them.
841 * cpux.h, decodex.h, decodex.c, readx.c, semx.c, modelx.c: New files.
842 * m32rx.c, mloopx.in: New files.
844 Mon Jan 19 22:26:29 1998 Doug Evans <devans@seba>
846 * configure: Regenerated to track ../common/aclocal.m4 changes.
850 * arch.c, arch.h, cpuall.h: New files.
851 * arch-defs.h: Deleted.
852 * mloop.in: Renamed from mainloop.in.
853 * Makefile.in: Update.
854 * sem-ops.h: Deleted.
855 * mem-ops.h: Deleted.
856 (arch): Renamed from CPU.
862 * sem-switch.c: Redone.
863 * sem.c: Renamed from semantics.c, and redone.
864 * m32r-sim.h (PROFILE_COUNT_FILLNOPS): Update.
865 (GETTWI,SETTWI,BRANCH_NEW_PC): Define.
866 * m32r.c (WANT_CPU,WANT_CPU_M32R): Define.
867 (m32r_{fetch,store}_register): New functions.
868 (model_mark_{get,set}_h_gr): Prefix with m32r_.
869 (m32r_model_mark_{busy,unbusy}_reg): Prefix with m32r_.
870 (h_cr_{get,set}): Prefix with m32r_.
871 (do_trap): Fetch state from current_cpu, not current_state.
872 Call sim_engine_halt instead of engine_halt.
873 * sim-if.c (alloc_cpu): New function.
874 (free_state): New function.
875 (sim_open): Call sim_state_alloc, and malloc space for selected cpu
876 type. Call sim_analyze_program.
877 (sim_create_inferior): Handle selected cpu type when setting PC.
878 (sim_resume): Handle m32rx.
879 (sim_stop_reason): Deleted.
880 (print_m32r_misc_cpu): Update.
881 (sim_{fetch,store}_register): Handle m32rx.
882 (sim_{read,write}): Deleted.
883 (sim_engine_illegal_insn): New function.
884 * sim-main.h: Don't include arch-defs.h,sim-core.h,sim-events.h.
885 Include arch.h,cpuall.h. Include cpu.h,decode.h if m32r.
886 Include cpux.h,decodex.h if m32rx.
887 (_sim_cpu): Include member appropriate cpu_data member for the cpu.
888 (M32R_MISC_PROFILE): Renamed from M32R_PROFILE.
889 (sim_state): Delete members core,events,halt_jmp_buf.
890 Change `cpu' member to be a pointer to the cpu's struct, rather than
891 record inside the state struct.
892 * tconfig.in (WITH_DEVICES): Define here.
893 (WITH_FAST,WITH_SEM_SWITCH_{FULL,FAST}): Define for the cpu.
897 * arch-defs.h (INSN_NAME): Fix typo.
901 * configure: Regenerated to track ../common/aclocal.m4 changes.
906 * m32r-sim.h (MSPR_ADDR): New macro.
907 (m32r_mspr_device): Declare.
908 (struct _device): Define.
909 * m32r.c (m32r_mspr_device): New global.
910 (device_{io_{read,write}_buffer,error}): New functions.
911 * mem-ops.h (SETMEM*): Use sim_core_write_map, not read map.
912 * sim-if.c: Delete redundant inclusion of cpu-sim.h.
913 (sim_open): Attach device to handle MSPR register.
914 * sim-main.h (WITH_DEVICES): Define as 1.
917 * configure: Regenerated to track ../common/aclocal.m4 changes.
921 * configure.in (SIM_AC_OPTION_ENVIRONMENT): Call.
922 * configure: Regenerated.
926 * mem-ops.h: Rename SIM_SIG{ACCESS,ALIGN} to SIM_SIG{SEGV,BUS}.
927 * sim-if.c (sim_open): Call sim_config.
928 (sim_stop_reason): Update call to sim_signal_to_host.
932 * Makefile.in (SIM_OBJS): Use $(SIM_NEW_COMMON_OBJS).
936 * sim-if.c (sim_open): Delete dead call to sim_core_attach.
940 * sem-ops.h (U{DIV,MOD}[BHSD]I): Use unsigned division.
944 * configure: Regenerated to track ../common/aclocal.m4 changes.
948 * configure: Regenerated to track ../common/aclocal.m4 changes.
952 * configure: Regenerated to track ../common/aclocal.m4 changes.
956 * Makefile.in (SIM_ENDIAN, SIM_HOSTENDIAN, SIM_SCACHE,
957 SIM_DEFAULT_MODEL): Delete, moved to common.
958 (SIM_EXTRA_CFLAGS): Update.
962 * configure.in (sim_link_links): Configure non-strict memory
965 * configure: Regenerated to track ../common/aclocal.m4 changes.
969 * configure: Regenerated to track ../common/aclocal.m4 changes.
973 * sim-if.c (sim_open): Allocate memory under sim-memopt module
974 using sim_do_commandf.
975 (sim_open): Set magic-number at the start.
976 (sim_do_command): Implement.
978 * sim-main.h (sim_engine_halt): Map onto engine_halt.
982 * configure: Regenerated to track ../common/aclocal.m4 changes.
984 Thu Sep 4 17:21:23 1997 Doug Evans <dje@seba>
986 * configure: Regenerated to track ../common/aclocal.m4 changes.
990 * Makefile.in (SIM_OBJS): Add sim-memopt.o module.
994 * sim-if.c (sim_open): Pass zero modulo arg to sim_core_attach.
998 * configure: Regenerated to track ../common/aclocal.m4 changes.
1003 * sim-if.c (sim_kill): Delete.
1004 (sim_create_inferior): Add ABFD argument.
1005 (sim_load): Move setting of PC from here.
1006 (sim_create_inferior): To here.
1007 (sim_load): Delete, use sim-hload.c instead.
1009 * Makefile.in (SIM_OBJS): Add sim-hload.o module.
1013 * configure: Regenerated to track ../common/aclocal.m4 changes.
1018 * sim-if.c (sim_open): Add ABFD argument.
1022 * sim-main.h (M32R_DEFAULT_MEM_SIZE): New macro.
1023 * sim-if.c (sim_open): Use it.
1027 * sim-main.h (WITH_ENGINE): Disable the common engine for now.
1031 * sim-if.c (sim_read): Pass NULL cpu to sim_core_read_buffer.
1032 (sim_write): Ditto for write.
1034 * m32r.c (do_trap): Ditto for read/write.
1038 * sim-if.c (sim_open): Add callback argument.
1039 (sim_set_callbacks, sim_callback): Delete.
1040 (sim_load): Set STATE_LOADED_P.
1044 * Makefile.in (SIM_OBJS): Link in sim-abort.o as a stub for
1049 * sim-if.c (sim_open): Update to reflect changes to core in
1051 * mem-ops.h (GETMEMQI, GETMEMHI, GETMEMSI, GETMEMDI, GETMEMUQI,
1052 GETMEMUHI, GETMEMUSI, GETMEMUDI, SETMEMQI, SETMEMHI, SETMEMSI,
1053 SETMEMDI, SETMEMUQI, SETMEMUHI, SETMEMUSI, SETMEMUDI): Ditto.
1057 * decode.c (decode): Add computed goto support.
1061 * mem-ops.h: Stub additional core read/write arguments.
1063 * sim-main.h: Declare sim_cia - type SI.
1064 (struct _sim_cpu): Move base type to end per common.
1065 (struct _sim_state): Ditto.
1069 Merge from branch into devo. CGEN generic files moved to common
1070 directory. K&R C support is no longer provided.
1074 * configure: Regenerated to track ../common/aclocal.m4 changes.
1078 * Makefile.in, seman-cache.c: new file, for wingdb build.
1079 * sim-alloca.h: fixed for wingdb.
1083 * decode.c (*): m32r_cgen_insn_table renamed to ..._entries.
1084 * mainloop.in: Use CGEN_INSN_INDEX instead of CGEN_INSN_TYPE.
1085 * simdefs.h (INSN_NAME): m32r_cgen_insn_table renamed to ..._entries.
1089 * cgen-utils.in (ex_illegal): Fill in abuf->length, abuf->addr.
1090 (exc_illegal): Likewise.
1091 * decode.c (decode_vars): Add decode_illegal.
1092 * genmloop.sh: #include "cpu-opc.h".
1093 * sem-switch.c (case_INSN_ILLEGAL): Declare.
1094 (labels): Add case_INSN_ILLEGAL.
1095 (SWITCH): Add INSN_ILLEGAL case.
1099 * model.c (model_module): Use 0 not NULL.
1101 * genmloop.sh (sim_main_loop): Handle k&r c.
1103 * sem-switch.c: Regenerate to get k&r c support.
1104 * semantics.c: Likewise.
1106 * m32r.c (ADD_{OV,CA}_SI,SUB_{OV,CA}_SI): Renamed to {ADD,SUB}[OC]FSI.
1107 (ADDCSI,SUBCSI): New functions.
1108 * sem-switch.c (addv,addv3,addx,subv,subx): Fix carry bit handling.
1109 * semantics.c (addv,addv3,addx,subv,subx): Fix carry bit handling.
1111 * simcache.c (simcache_{install,init,uninstall}): Use
1112 DECLARE_MODULE_INSTALL_HANDLER.
1113 (simcache_option_handler): Use DECLARE_OPTION_HANDLER.
1115 * utils.c: #include "semops.h".
1119 * profile.c (profile_print_simcache): Fix thinko in printf text.
1121 * simdefs.h (struct argbuf): Add member to fmt_20 so it's not empty.
1125 * m32r.c (h_cr_get): Rewrite.
1126 (h_cr_set): Rewrite.
1127 * sem-switch.c (rte): bcarry renamed to bcond.
1128 * semantics.c (rte): Likewise.
1129 * simdefs.h (CPU_STATE): Likewise.
1131 * config.in (HAVE_SYS_TIME_H): Add.
1132 * configure.in: Check for sys/time.h.
1133 * configure: Regenerated.
1134 * utils.c: Include sys/time.h if present.
1136 * common.c (sim_parse_args): Account for NULL terminating entry
1137 in long_options table.
1139 * genmloop.sh (RUN_FAST_P): Don't run fast if tracing.
1140 Always use cache if configured in.
1141 * mainloop.in (do_extract_insn{16,32}): New functions.
1142 (normal,fast): Call them. Handle starting in left slot.
1143 * simcache.c (simcache_option_handler): Disallow -c0.
1144 * sem-switch.c (TRACE_RESULT): Redefine so no tracing.
1146 * profile.c (profile_print_simcache): Fix percentage calc.
1148 * Makefile.in (INCLUDE_DEPS): Delete simcommon.h.
1152 * Makefile.in (COMMON_{PRE,POST}_CONFIG_FRAG): Add delimiters for.
1153 (M32R_INCLUDE_DEPS): Use cpu-sim.h instead of m32r-sim.h.
1155 (mrun.o): Don't depend on M32R_INCLUDE_DEPS.
1156 (sim-if.o,m32r.o,utils.o): Likewise.
1157 (common.o): Don't explicitly depend on mod-list.h.
1158 (mainloop.c): Pass CPU to genmloop.sh.
1159 (stamp-modules): Depend on configure.
1160 (decode.o): Depend on decode,h, memops.h, semops.h, cpu-opc.h.
1161 (extract.o): Depend on decode.h, memops.h, semops.h.
1162 (semantics.o,seman-cache.o): Likewise.
1163 (model.o,ops.o): Depend on memops.h.
1164 (extr-cache.o): Disable building for the moment.
1166 * simcommon.h: Delete, move contents into cgen-sim.h.
1167 * cgen-sim.h: Don't include ansidecl.h,bfd.h,simfns.h.
1168 (UINT,CGEN_CAT3): Define.
1169 ({extract,semantic}_fn_t): Renamed to {EXTRACT,SEMANTIC}_FN.
1170 (decode_t): Renamed to DECODE.
1172 * simfns.h: Delete, contents moved to memops.h,semops.h.
1173 * memops.h: New file.
1174 * semops.h: New file.
1175 * decode.h: Renamed from semantics.h.
1177 * sim-argv.h: New file.
1178 * Makefile.in (memory.o,trace.o,profile.o,simcache.o,common): Add
1179 dependency of sim-argv.h.
1181 * sim-alloca.h: New file.
1182 * common.c: Include it.
1183 * Makefile.in (common.o): Add dependency.
1185 * config.in (HAVE_TIME_H,HAVE_SYS_RESOURCE_H): Add.
1186 (HAVE_GETRUSAGE,HAVE_TIME): Add.
1187 * configure.in: sinclude ../common/aclocal.m4.
1188 Check for headers time.h, sys/resource.h.
1189 Check for functions time, getrusage.
1190 (sim_link_{files,links}): Add link cpu-opc.h.
1191 (sim_profile): Add simcache.
1192 (SIM_AC_PROFILE): Add simcache, profile.o.
1193 (simcache module): Delete extr-cache.o for now.
1194 (--enable-sim-cache): Allow specification of default cache size.
1195 * configure: Regenerated.
1197 * decode.c: #include cgen-sim.h,memops.h,semops.h,decode.h,
1198 cpu-sim.h,cpu-opc.h. Don't include m32r-sim.h.
1201 * extract.c: #include cgen-sim.h,decode.h,cpu-sim.h.
1202 Don't include m32r-sim.h.
1203 (*): Define/Undef FLD macro. Use it to reference ARGBUF.
1204 Simplify profiling test with PROFILE_MODEL_P.
1205 (mvfc,mvtc): Fix access of control registers.
1206 * semantic.c: #include cgen-sim.h,memops.h,semops.h,decode.h,cpu-sim.h.
1207 Don't include m32r-sim.h.
1208 (*): Define/Undef FLD macro. Use it to reference ARGBUF.
1209 Simplify profiling test with PROFILE_MODEL_P.
1210 (mvfc,mvtc): Fix access of control registers.
1212 * sem-switch.c: New file, for GCC computed goto support.
1214 * genmloop.sh: Add #include's of bfd.h,callback.h,cgen-sim.h,
1215 memops.h,semops.h,trace.h,cpu-sim.h.
1216 (RUN_FAST_P): Change default to run fast if cache size > 0
1218 (sim_main_loop): Record execution time.
1219 Record instruction count even in fast mode.
1220 (init): Allow cpu to provide init code in mainloop.in.
1221 (FAST): Define as 0 or 1 depending on fast mode.
1222 * mainloop.in (normal): Combine with fast case.
1223 Add support for GCC computed gotos. Count simcache hits/misses.
1224 (init): Initialize "switch" labels if GNUC.
1226 * cgen-utils.in: Don't include opcode/cgen.h.
1227 Include cgen-sim.h, cpu-opc.h.
1228 * common.c: Don't include simcommon.h,mod-list.h. Include cgen-sim.h.
1229 * m32r-sim.h: Don't include mod-list.h
1230 (RUN_FAST_P): Delete.
1231 * m32r.c: Don't include profile.h. #include ansidecl.h,cgen-sim.h,
1232 semops.h,memory.h,trace.h
1233 (h_cr_get,h_cr_set): New functions.
1234 * memory.c: #include cgen-sim.h,callback.h.
1235 * ops.c: Don't include profile.h,m32r-sim.h.
1236 Include cgen-sim.h,memops.h,cpu-sim.h.
1237 (MEMOPS_DEFINE_INLINE): Renamed from SIMFNS_DEFINE_INLINE.
1238 * trace.c: Include cgen-sim.h,cpu-opc.h.
1239 * trace.h (trace_insn_{init,fini}): Declare.
1241 * model.c: Don't include signal.h,stdlib.h,m32r-sim.h.
1242 Include cgen-sim.h,cpu-sim.h,cpu-opc.h.
1243 Regenerate to get new insn aliases.
1245 * mrun.c: #include "ansidecl.h".
1246 (STATE): Use struct sim_state instead.
1248 * profile.c: Surround #include <stdlib.h> with HAVE_STDLIB_H.
1249 Don't include simcommon.h. Include cgen-sim.h,cpu-opc.h.
1250 (PROFILE_{READ,WRITE}_MASK): Replace with PROFILE_MEMORY_MASK.
1251 (profile_print_simcache): New function.
1252 (profile_print): Call it. Print simulator speed stats.
1253 * profile.h (PROFILE_{READ,WRITE}_MASK): Replace with
1254 PROFILE_MEMORY_MASK.
1255 (MODULE_PROFILE_SIMCACHE_P): Define.
1256 (PROFILE_SIMCACHE_MASK): Define.
1257 (PROFILE_COUNT): New members total_insn_count,exec_time.
1258 New members simcache_hits,simcache_misses.
1259 (PROFILE_SIMCACHE_{HITS,MISSES}): Define.
1260 (PROFILE_MODEL_P): New macro.
1261 (PROFILE_COUNT_SIMCACHE_{HIT,MISS}): New macros.
1263 * sim-if.c: Surround #include <stdlib.h> with HAVE_STDLIB_H.
1264 Don't include simcommon.h,m32r-sim.h. Include cgen-sim.h,cpu-sim.h.
1265 (sim_resume): Use USING_SIMCACHE_P instead of RUN_FAST_P.
1266 (sim_info): Pass verbose to profile_print.
1268 * simcache.c: Include cgen-sim.h,callback.h.
1269 (USING_SIMCACHE_P): Replace with SIMCACHE_P.
1270 (simcache_option_handler): Ensure cache size at least 2.
1271 Allow config time specification of default cache size.
1272 * simcache.h (struct simcache): Support GCC computed gotos.
1273 (SIMCACHE_DEFAULT_CACHE_SIZE): USe CONFIG_SIM_CACHE_SIZE if defined.
1274 (USING_SIMCACHE_P): New macro.
1276 * simdefs.h: Don't include m32r-opc.h.
1277 (CGEN_MAX_SIM_INSNS): Define.
1278 (CPU_STATE): Regenerate.
1279 (ARGBUF): Regenerate.
1280 (extract,semantic handler decls): Delete, moved to decode.h.
1282 * tconfig.in: Don't include cgen-sim.h,m32r-sim.h.
1283 (USE_SEM_SWITCH): Define.
1285 * utils.c: Include bfd.h,time.h,sys/resource.h.
1286 (sim_time_get,sim_time_elapsed): New functions.
1287 * cgen-sim.h (SIM_TIME,sim_time_get,sim_time_elapsed): Declare.
1291 * configure.in (AC_CHECK_HEADERS): Handle i386-windows.
1292 * configure: Regenerated.
1293 * model.c: #include <stdlib.h>.
1294 * simcache.c: #include "libiberty.h".
1295 * simcommon.h (alloca): Handle i386-windows.
1297 * common.c: #include libiberty.h.
1298 (sim_signal_to_host): Return 5 if wingdb.
1302 * configure.in (sim_cache): Enabled by default now, pass default
1303 cache size to --enable-sim-cache.
1304 * simcache.c (simcache_option_handler): Allow -c 0.
1306 * simdefs.h,simfns.h: Regenerate
1307 * decode.c,extract.c,model.c,ops.c,semantics.c: Regenerate.
1311 Add model profiling support.
1312 * configure.in: Handle --enable-sim-model.
1313 (sim_profile): Add model.
1314 * Makefile.in (model.o): Add rule.
1315 * cgen-sim.h (UNIT,INSN_TIMING,MACH,MODEL): New types.
1316 * extract.c (*): Add model profiling support.
1317 * m32r.c (model_mark_{get,set}_h_gr): New functions.
1318 (model_mark_{busy,unbusy}_reg): New functions.
1319 * profile.c (profile_option_handler): Recognize --profile model.
1320 (profile_print_model): New function.
1321 (profile_print): Call it.
1322 * profile.h (MODULE_profile_model,MODULE_PROFILE_MODEL_P): Define.
1323 (PROFILE_MODEL_MASK,PROFILE_LABEL_WIDTH): Define.
1324 (PROFILE_COUNT): New members cycle_count,cti_stall_count,
1325 load_stall_count,taken_count,untaken_count.
1326 * semantics.c (*): Add model profiling support.
1327 * simcommon.h (struct sim_state): New members mach,model.
1328 * simdefs.h (CPU_PROFILE,MODEL_TYPE,UNIT_TYPE): New type.
1329 (MAX_MODELS,MAX_UNITS): Define.
1330 * tconfig.in (STATE_EXTRA_MEMBERS): Add cpu_profile.
1332 * Makefile.in (INCLUDE_DEPS): Add $(SIM_MODULES_HDRS).
1333 (stamp-modules): Depend on genmodlist.sh.
1334 * common.c (standard_options): Add --max-insns.
1335 (copy_argv): New function.
1336 * tconfig.in (SIM_HAVE_MAX_INSNS): Define.
1337 * genmloop.sh: Allow mainloop.in to contain support code.
1338 * mainloop.in: Move do_insn16,do_insn32 here.
1339 * m32r.c (do_trap): Handle SYS_argvlen,SYS_argv,SYS_read.
1340 * sim-if.c (sim_open): Don't set max insn count.
1341 (sim_create_inferior): Save argv,envp.
1342 * simcommon.h (struct sim_state): New members argv,envp.
1343 * simdefs.h ([GS]ETTWI,[GS]ETTUWI,[GS]ETTAI): Define.
1344 ([GS]ETMEMWI,[GS]ETMEMUWI,[GS]ETMEMAI): Define.
1345 (ARGBUF): New members h_gr_get, h_gr_set.
1346 * trace.c (trace_insn_init,trace_insn_fini): New functions.
1347 (trace_printf): Print to buffer, output later by trace_insn_fini.
1348 * trace.h (TRACE_INSN_{INIT,FINI}): Define.
1352 * configure.in (AC_FUNC_ALLOCA): Call.
1353 * configure: Regenerate.
1354 * config.h (HAVE_ALLOCA_H): Add.
1355 * simcommon.h: Add alloca support.
1356 (DECLARE_MODULE_INSTALL_HANDLER): Define.
1357 (DECLARE_OPTION_HANDLER): Define.
1358 (MEM_FN): Declare using PARAMS.
1359 (DECLARE_MEM_FN): Define.
1360 * trace.c (trace_result): Tweak for !STDC.
1361 * cgen-sim.h (UDI_FN_SUPPORT): Define if ! HAVE_LONGLONG.
1362 * cgen-utils.in (disasm_sprintf): Fix va_arg call in !STDC case.
1363 * common.c (sim_print_help_fn): Use PARAMS.
1364 (standard_option_handler): Fix decl for !STDC systems.
1365 * memory.c: #include <stdio.h>
1366 (mem_flat_{install,init,uninstall}): Fix decl for !STDC systems.
1367 (mem_flat_{read,write},mem_flat_option_handler): Likewise.
1368 * profile.c (profile_install): Likewise.
1369 (profile_option_handler): Likewise.
1373 * semantics.c (*): Don't suffix big unsigned numbers with "U".
1374 Prefix them with 0x instead.
1376 * cgen-sim.h (DI_FN_SUPPORT): Define if ! HAVE_LONGLONG.
1377 (SLADI,SRADI,CONVSIDI,CONVDISI): Delete, moved to simfns.h.
1378 * semantics.c (machi,maclo,macwhi,macwlo,mulhi,mullo): Implement.
1379 (mulwhi,mulwlo,mvtachi,mvtaclo,rac,rach): Implement.
1380 * simfns.h: Add decls for functional DI,UDI,SF,DF,XF,TF support.
1381 Add support for boolean and/or.
1382 * utils.c: Redo naming of DI functional support.
1383 (ANDDI,ORDI,ADDDI,MULDI,GEDI,LEDI,CONVHIDI): New functions.
1387 * Directory created.