summaryrefslogtreecommitdiff
path: root/sim/common/sim-module.c
diff options
context:
space:
mode:
authorDoug Evans <dje@google.com>1999-01-06 00:42:34 +0000
committerDoug Evans <dje@google.com>1999-01-06 00:42:34 +0000
commitf5cd4d758c52b6746046da1fafd0e70b41022178 (patch)
tree3eb8c2ebe80f7fb26095862240191e4ae138adc6 /sim/common/sim-module.c
parent5730d39d2cd1974c77899555dac466babc316589 (diff)
downloadbinutils-gdb-f5cd4d758c52b6746046da1fafd0e70b41022178.tar.gz
* Make-common.in (CGEN_INCLUDE_DEPS): Add cgen-defs.h, cgen-engine.h.
(CGEN_MAIN_SCM): Add rtx-funcs.scm. (cgen-arch): Pass $(mach) to cgen.sh. * cgen-engine.h (SEM_BRANCH_FINI): New arg pcvar, all uses updated. (SEM_BRANCH_INIT_EXTRACT): New macro. (SEM_BRANCH_INIT): Add taken_p. (TARGET_SEM_BRANCH_FINI): Provide default definition. (SEM_BRANCH_FINI): Use it. (SEM_INSN): Update. * cgen-run.c (sim_resume): Handle tracing of last insn. * cgen-scache.h (WITH_SCACHE): Define as 0 if not defined. * cgen-trace.c (current_abuf): New static global. (trace_insn_init): Initialize it. (trace_insn_fini): Use it. (trace_insn): Set it. * cgen.sh (arch case): Pass -m ${mach} to cgen. * genmloop.sh (@cpu@_emit_before): Only define if WITH_SCACHE_PBB. (@cpu@_emit_after): Ditto. (simple @cpu@_engine_run_full): New local `pc'. Initialize semantic labels if WITH_SEM_SWITCH_FULL. * sim-model.c: Include bfd.h. (sim_model_init): New function. (sim_model_install): Record init fn. * sim-model.h (MACH): New member bfd_name. * sim-module.c (modules): Initialize model before scache.
Diffstat (limited to 'sim/common/sim-module.c')
-rw-r--r--sim/common/sim-module.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/sim/common/sim-module.c b/sim/common/sim-module.c
index 970e7258233..ebdd64e44ae 100644
--- a/sim/common/sim-module.c
+++ b/sim/common/sim-module.c
@@ -23,11 +23,9 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "sim-options.h"
#include "sim-assert.h"
-/* start-sanitize-am30 */
#if WITH_HW
#include "sim-hw.h"
#endif
-/* end-sanitize-am30 */
#include "libiberty.h"
@@ -52,20 +50,18 @@ static MODULE_INSTALL_FN * const modules[] = {
#if WITH_WATCHPOINTS
sim_watchpoint_install,
#endif
-#if WITH_SCACHE
- scache_install,
-#endif
#ifdef SIM_HAVE_MODEL
sim_model_install,
#endif
+#if WITH_SCACHE
+ scache_install,
+#endif
#ifdef SIM_HAVE_BREAKPOINTS
sim_break_install,
#endif
- /* start-sanitize-am30 */
#if WITH_HW
sim_hw_install,
#endif
- /* end-sanitize-am30 */
/* Configured in [simulator specific] additional modules. */
#ifdef MODULE_LIST
MODULE_LIST
@@ -116,9 +112,6 @@ sim_post_argv_init (SIM_DESC sd)
SIM_ASSERT (STATE_MAGIC (sd) == SIM_MAGIC_NUMBER);
SIM_ASSERT (STATE_MODULES (sd) != NULL);
- if (sim_module_init (sd) != SIM_RC_OK)
- return SIM_RC_FAIL;
-
/* Set the cpu->state backlinks for each cpu. */
for (i = 0; i < MAX_NR_PROCESSORS; ++i)
{
@@ -126,6 +119,9 @@ sim_post_argv_init (SIM_DESC sd)
CPU_INDEX (STATE_CPU (sd, i)) = i;
}
+ if (sim_module_init (sd) != SIM_RC_OK)
+ return SIM_RC_FAIL;
+
return SIM_RC_OK;
}