void be_init_arch_ppc32(void);
void be_init_arch_mips(void);
void be_init_arch_arm(void);
+void be_init_arch_sta(void);
void be_init_ilpsched(void);
void be_init_copyilp(void);
-void be_init_spillremat(void);
void be_init_javacoal(void);
void be_init_ra(void);
+void be_init_spillbelady(void);
+void be_init_spillmorgan(void);
+void be_init_spillremat(void);
+void be_init_ifg(void);
void be_quit_copystat(void);
be_init_raextern();
be_init_copystat();
be_init_ra();
+ be_init_spillbelady();
+ be_init_spillmorgan();
+ be_init_ifg();
be_init_arch_ia32();
be_init_arch_ppc32();
#ifdef WITH_JVM
be_init_javacoal();
#endif
+
+#ifdef WITH_STA
+ be_init_arch_sta();
+#endif
}
void be_quit_modules(void)
//---------------------------------------------------------------------------
+#ifdef WITH_LIBCORE
typedef struct module_opt_data_t {
void **var;
- const be_module_list_entry_t * const *list_head;
+ be_module_list_entry_t * const *list_head;
} module_opt_data_t;
-static int set_opt_module(const char *name, lc_opt_type_t type, void *data, size_t length, ...)
+/**
+ * Beware: return value of 0 means error.
+ */
+static int set_opt_module(const char *name, lc_opt_type_t type, void *data,
+ size_t length, ...)
{
module_opt_data_t *moddata = data;
va_list args;
const char* opt;
const be_module_list_entry_t *module;
+ int res = 0;
va_start(args, length);
opt = va_arg(args, const char*);
for(module = *(moddata->list_head); module != NULL; module = module->next) {
if(strcmp(module->name, opt) == 0) {
*(moddata->var) = module->data;
+ res = 1;
break;
}
}
va_end(args);
- return 0;
+ return res;
}
int dump_opt_module(char *buf, size_t buflen, const char *name,
entry->name = name;
entry->data = module;
entry->next = *list_head;
- *list_head = entry->next;
+ *list_head = entry;
}
void be_add_module_list_opt(lc_opt_entry_t *grp, const char *name,
const char *description,
- const be_module_list_entry_t * const * list_head,
+ be_module_list_entry_t * const * list_head,
void **var)
{
module_opt_data_t *moddata = xmalloc(sizeof(moddata[0]));
set_opt_module, dump_opt_module, dump_opt_module_vals,
NULL);
}
+
+#endif