/* ==================================================================== * * TI_Initialize * * See interface description * * ==================================================================== */ void TI_Initialize(ABI_PROPERTIES_ABI tabi, ISA_SUBSET tisa, PROCESSOR tproc) { static BOOL initialized; if ( !initialized ) { #ifndef TARG_NVISA /* no scheduling info for NVISA */ INT i; BOOL found_targ = FALSE; const char *targ_name = PROCESSOR_Name(tproc); for (i = 0; i < (sizeof(si_machines) / sizeof(si_machines[0])); i++) { if (strcmp(targ_name, si_machines[i].name) == 0) { si_current_machine = i; found_targ = TRUE; break; } } Is_True(found_targ, ("Scheduling info missing for target %s", targ_name)); #endif ISA_SUBSET_Value = tisa; PROCESSOR_Value = tproc; ABI_PROPERTIES_ABI_Value = tabi; ABI_PROPERTIES_Initialize(); ISA_HAZARD_Initialize(); ISA_REGISTER_Initialize(); initialized = TRUE; } }
TI_Initialize(ABI_PROPERTIES_ABI tabi, ISA_SUBSET tisa, PROCESSOR tproc, char *tpath) #endif { static BOOL initialized; if ( !initialized ) { INT i; const char *targ_name = PROCESSOR_Name(tproc); #ifdef TARG_IA64 INT targ_name_len = strlen(targ_name) + strlen(version); #else INT targ_name_len = strlen(targ_name); #endif char *targ_so_name = alloca(targ_name_len + strlen(".so") + 1); for (i = 0; i < targ_name_len; i++) { targ_so_name[i] = tolower(targ_name[i]); } #ifdef TARG_IA64 if (strlen(version) > 0) strcat(targ_so_name, version); #endif strcpy(targ_so_name + targ_name_len, ".so"); load_so(targ_so_name, tpath, FALSE /*verbose*/); ISA_SUBSET_Value = tisa; PROCESSOR_Value = tproc; ABI_PROPERTIES_ABI_Value = tabi; ABI_PROPERTIES_Initialize(); ISA_HAZARD_Initialize(); ISA_REGISTER_Initialize(); initialized = TRUE; } }