#include "sim-options.h"
#include "sim-assert.h"
+#if WITH_HW
+#include "sim-hw.h"
+#endif
+
#include "libiberty.h"
/* List of all modules. */
static MODULE_INSTALL_FN * const modules[] = {
standard_install,
sim_events_install,
+#ifdef SIM_HAVE_MODEL
+ sim_model_install,
+#endif
#if WITH_ENGINE
sim_engine_install,
#endif
#if WITH_SCACHE
scache_install,
#endif
-#ifdef SIM_HAVE_MODEL
- model_install,
-#endif
#ifdef SIM_HAVE_BREAKPOINTS
sim_break_install,
+#endif
+#if WITH_HW
+ sim_hw_install,
#endif
/* Configured in [simulator specific] additional modules. */
#ifdef MODULE_LIST
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)
{
CPU_INDEX (STATE_CPU (sd, i)) = i;
}
+ if (sim_module_init (sd) != SIM_RC_OK)
+ return SIM_RC_FAIL;
+
return SIM_RC_OK;
}
\f