* sim-basics.h (sim_add_commas): Add prototype.
* cgen-scache.c (scache_print_profile): Print commas in numbers.
* sim-profile.c (COMMAS): New macro.
(print_*): Use it to print commas in numbers.
(sim-{module,options,trace,profile,utils}.o): Clean up dependencies.
(sim-model.o): Add new rule.
(cgen-{scache,trace,utils}.o): Add new rules.
* aclocal.m4 (SIM_AC_OPTION_{SCACHE,DEFAULT_MODEL}): Add.
* cgen-scache.c (scache_print_profile): Change `sd' arg to `cpu'.
Indent output by 2 spaces.
* cgen-scache.h (scache_print_profile): Update.
* cgen-trace.c (trace_insn_fini): Indent output by 2 spaces.
Use trace_printf, not fprintf.
(trace_extract): Use trace_printf, not cgen_trace_printf.
* genmloop.sh (!FAST case): Increment `insn_count'.
* sim-base.h (sim_state_base): Only include scache_size if WITH_SCACHE.
(sim_cpu_base): Rename member `sd' to `state' to be consistent with
access macro's name.
* sim-core.c (sim_core_init): Use EXTERN_SIM_CORE to define it.
Change return type to SIM_RC.
(sim_core_{install,uninstall}): New functions.
* sim-core.h (sim_core_{install,uninstall}): Declare.
(sim_core_init): Use EXTERN_SIM_CORE to define it.
Change return type to SIM_RC.
* sim-model.h (models,machs,model_install): Declare.
* sim-module.c (modules): Add scache_install, model_install.
(sim_post_argv_init): Set cpu->state backlinks.
* sim-options.c (standard_options): Delete --simcache-size,--max-insns.
(standard_option_handler): Likewise.
* sim-profile.c (PROFILE_{HISTOGRAM,LABEL}_WIDTH): Move to
sim-profile.h.
(*): Assume ANSI C.
(profile_options): Delete --profile-simcache.
(profile_option_handler): Likewise.
(profile_print_insn): Change `sd' arg to `cpu'. Indent output 2
spaces.
(profile_print_{memory,model}): Likewise.
(profile_print_simcache): Delete.
(profile_print_speed): New function.
(profile_print): Rewrite.
* sim-profile.h (PROFILE_scache): Renamed from PROFILE_simcache.
(WITH_PROFILE_SCACHE_P): Renamed from WITH_PROFILE_SIMCACHE_P.
(PROFILE_DATA): Delete members simcache_{hits,misses}.
(PROFILE_COUNT_SIMCACHE_{HIT,MISS}): Delete.
(PROFILE_{CALLBACK,CPU_CALLBACK}): New types.
(profile_print): Update prototype.
* sim-module.c, sim-profile.c: New files.
* Make-common.in (SIM_PROFILE): Define
(CONFIG_CFLAGS): Add $(SIM_PROFILE).
(sim_main_headers): Add sim-module.h, sim-model.h, sim-profile.h.
(sim_module.o,sim-profile.o): Add rules for.
* aclocal.m4 (--enable-sim-trace): Allow symbolic arguments.
(--enable-sim-profile): Add.
* configure: Regenerated.
* sim-base.h (sim_state_base): New members init_list, uninstall_list,
model. Move trace and profile support to sim-{trace,profile}.h.
New members trace_data, profile_data.
* sim-basics.h: #include sim-module.h, sim-model.h, sim-profile.h.
* sim-config.h: Provide default definition of WITH_PROFILE.
(WITH_TRACE): Change default to -1.
(MAX_NR_PROCESSORS): Always define.
* sim-options.c: Move trace and profile support to
sim-{trace,profile}.h.
(sim_pre_argv_init): Moved to sim-model.c.
(standard_install): New function.
* sim-options.h (sim_pre_argv_init): Move decl to sim-model.c.
(standard_install): Declare.
* sim-trace.c: Tracing option handling moved here from sim-options.c.
(trace_install, trace_uninstall): New functions.
(trace_printf): Update reference to TRACE_FILE.
* sim-trace.h (TRACE_FOO_IDX): Moved here from sim-base.h.
(TRACE_foo): Bit masks for symbolic arguments to --enable-sim-trace.
(WITH_TRACE_FOO_P): Define.
(trace_install): Declare.
(TRACE_DATA): New struct.
Makefiles can have their own clean targets.
* sim-load.c (xprintf eprintf): Use ANSI_PROTOTYPES instead of
__STDC__ to control use of stdarg vs. varargs syntax. Some
systems can't use __STDC__, but require stdarg.
o Provide poll_quit callback to simulators
so that they can poll for SIGINT on
clueless OS's.
o Add sim_stop to simulators so that clients
can request a halt (eg gdbtk's STOP button)
Works for PPC!
o Re-arange remote-sim.c so that the
hard work is moved from gdbsim_resume()
to gdbsim_wait() (where it should be).