Line 835... |
Line 835... |
if (func[i]) free_func (func[i]);
|
if (func[i]) free_func (func[i]);
|
|
|
fclose (flog);
|
fclose (flog);
|
}
|
}
|
|
|
|
/*----------------------------------------------------[ CUC Configuration ]---*/
|
|
void cuc_calling_convention(union param_val val, void *dat)
|
|
{
|
|
config.cuc.calling_convention = val.int_val;
|
|
}
|
|
|
|
void cuc_enable_bursts(union param_val val, void *dat)
|
|
{
|
|
config.cuc.enable_bursts = val.int_val;
|
|
}
|
|
|
|
void cuc_no_multicycle(union param_val val, void *dat)
|
|
{
|
|
config.cuc.no_multicycle = val.int_val;
|
|
}
|
|
|
|
void cuc_memory_order(union param_val val, void *dat)
|
|
{
|
|
if (strcmp (val.str_val, "none") == 0)
|
|
config.cuc.memory_order = MO_NONE;
|
|
else if (strcmp (val.str_val, "weak") == 0)
|
|
config.cuc.memory_order = MO_WEAK;
|
|
else if (strcmp (val.str_val, "strong") == 0)
|
|
config.cuc.memory_order = MO_STRONG;
|
|
else if (strcmp (val.str_val, "exact") == 0) {
|
|
config.cuc.memory_order = MO_EXACT;
|
|
} else {
|
|
char tmp[200];
|
|
sprintf (tmp, "invalid memory order '%s'.\n", val.str_val);
|
|
CONFIG_ERROR(tmp);
|
|
}
|
|
}
|
|
|
|
void cuc_timings_fn(union param_val val, void *dat)
|
|
{
|
|
strcpy(config.cuc.timings_fn, val.str_val);
|
|
}
|
|
|
|
void reg_cuc_sec(void)
|
|
{
|
|
struct config_section *sec = reg_config_sec("cuc", NULL, NULL);
|
|
|
|
reg_config_param(sec, "calling_convention", paramt_int, cuc_calling_convention);
|
|
reg_config_param(sec, "enable_bursts", paramt_int, cuc_enable_bursts);
|
|
reg_config_param(sec, "no_multicycle", paramt_int, cuc_no_multicycle);
|
|
reg_config_param(sec, "memory_order", paramt_word, cuc_memory_order);
|
|
reg_config_param(sec, "timings_fn", paramt_str, cuc_timings_fn);
|
|
}
|
|
|
No newline at end of file
|
No newline at end of file
|