< prev index next >

src/cpu/sparc/vm/vm_version_sparc.cpp

Print this page




 162   }
 163 
 164 #ifdef COMPILER2
 165   // T4 and newer Sparc cpus have fast RDPC.
 166   if (has_fast_rdpc() && FLAG_IS_DEFAULT(UseRDPCForConstantTableBase)) {
 167     FLAG_SET_DEFAULT(UseRDPCForConstantTableBase, true);
 168   }
 169 
 170   // Currently not supported anywhere.
 171   FLAG_SET_DEFAULT(UseFPUForSpilling, false);
 172 
 173   MaxVectorSize = 8;
 174 
 175   assert((InteriorEntryAlignment % relocInfo::addr_unit()) == 0, "alignment is not a multiple of NOP size");
 176 #endif
 177 
 178   assert((CodeEntryAlignment % relocInfo::addr_unit()) == 0, "alignment is not a multiple of NOP size");
 179   assert((OptoLoopAlignment % relocInfo::addr_unit()) == 0, "alignment is not a multiple of NOP size");
 180 
 181   char buf[512];
 182   jio_snprintf(buf, sizeof(buf), "%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s",
 183                (has_v9() ? ", v9" : (has_v8() ? ", v8" : "")),
 184                (has_hardware_popc() ? ", popc" : ""),
 185                (has_vis1() ? ", vis1" : ""),
 186                (has_vis2() ? ", vis2" : ""),
 187                (has_vis3() ? ", vis3" : ""),
 188                (has_blk_init() ? ", blk_init" : ""),
 189                (has_cbcond() ? ", cbcond" : ""),
 190                (has_aes() ? ", aes" : ""),
 191                (has_sha1() ? ", sha1" : ""),
 192                (has_sha256() ? ", sha256" : ""),
 193                (has_sha512() ? ", sha512" : ""),
 194                (has_crc32c() ? ", crc32c" : ""),
 195                (is_ultra3() ? ", ultra3" : ""),

 196                (is_sun4v() ? ", sun4v" : ""),
 197                (is_niagara_plus() ? ", niagara_plus" : (is_niagara() ? ", niagara" : "")),
 198                (is_sparc64() ? ", sparc64" : ""),
 199                (!has_hardware_mul32() ? ", no-mul32" : ""),
 200                (!has_hardware_div32() ? ", no-div32" : ""),
 201                (!has_hardware_fsmuld() ? ", no-fsmuld" : ""));
 202 
 203   // buf is started with ", " or is empty
 204   _features_string = os::strdup(strlen(buf) > 2 ? buf + 2 : buf);
 205 
 206   // UseVIS is set to the smallest of what hardware supports and what
 207   // the command line requires.  I.e., you cannot set UseVIS to 3 on
 208   // older UltraSparc which do not support it.
 209   if (UseVIS > 3) UseVIS=3;
 210   if (UseVIS < 0) UseVIS=0;
 211   if (!has_vis3()) // Drop to 2 if no VIS3 support
 212     UseVIS = MIN2((intx)2,UseVIS);
 213   if (!has_vis2()) // Drop to 1 if no VIS2 support
 214     UseVIS = MIN2((intx)1,UseVIS);
 215   if (!has_vis1()) // Drop to 0 if no VIS1 support


 465 
 466 
 467 int VM_Version::parse_features(const char* implementation) {
 468   int features = unknown_m;
 469   // Convert to UPPER case before compare.
 470   char* impl = os::strdup_check_oom(implementation);
 471 
 472   for (int i = 0; impl[i] != 0; i++)
 473     impl[i] = (char)toupper((uint)impl[i]);
 474 
 475   if (strstr(impl, "SPARC64") != NULL) {
 476     features |= sparc64_family_m;
 477   } else if (strstr(impl, "SPARC-M") != NULL) {
 478     // M-series SPARC is based on T-series.
 479     features |= (M_family_m | T_family_m);
 480   } else if (strstr(impl, "SPARC-T") != NULL) {
 481     features |= T_family_m;
 482     if (strstr(impl, "SPARC-T1") != NULL) {
 483       features |= T1_model_m;
 484     }



 485   } else {
 486     if (strstr(impl, "SPARC") == NULL) {
 487 #ifndef PRODUCT
 488       // kstat on Solaris 8 virtual machines (branded zones)
 489       // returns "(unsupported)" implementation. Solaris 8 is not
 490       // supported anymore, but include this check to be on the
 491       // safe side.
 492       warning("Can't parse CPU implementation = '%s', assume generic SPARC", impl);
 493 #endif
 494     }
 495   }
 496   os::free((void*)impl);
 497   return features;
 498 }


 162   }
 163 
 164 #ifdef COMPILER2
 165   // T4 and newer Sparc cpus have fast RDPC.
 166   if (has_fast_rdpc() && FLAG_IS_DEFAULT(UseRDPCForConstantTableBase)) {
 167     FLAG_SET_DEFAULT(UseRDPCForConstantTableBase, true);
 168   }
 169 
 170   // Currently not supported anywhere.
 171   FLAG_SET_DEFAULT(UseFPUForSpilling, false);
 172 
 173   MaxVectorSize = 8;
 174 
 175   assert((InteriorEntryAlignment % relocInfo::addr_unit()) == 0, "alignment is not a multiple of NOP size");
 176 #endif
 177 
 178   assert((CodeEntryAlignment % relocInfo::addr_unit()) == 0, "alignment is not a multiple of NOP size");
 179   assert((OptoLoopAlignment % relocInfo::addr_unit()) == 0, "alignment is not a multiple of NOP size");
 180 
 181   char buf[512];
 182   jio_snprintf(buf, sizeof(buf), "%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s",
 183                (has_v9() ? ", v9" : (has_v8() ? ", v8" : "")),
 184                (has_hardware_popc() ? ", popc" : ""),
 185                (has_vis1() ? ", vis1" : ""),
 186                (has_vis2() ? ", vis2" : ""),
 187                (has_vis3() ? ", vis3" : ""),
 188                (has_blk_init() ? ", blk_init" : ""),
 189                (has_cbcond() ? ", cbcond" : ""),
 190                (has_aes() ? ", aes" : ""),
 191                (has_sha1() ? ", sha1" : ""),
 192                (has_sha256() ? ", sha256" : ""),
 193                (has_sha512() ? ", sha512" : ""),
 194                (has_crc32c() ? ", crc32c" : ""),
 195                (is_ultra3() ? ", ultra3" : ""),
 196                (has_sparc5_instr() ? ", sparc5" : ""),
 197                (is_sun4v() ? ", sun4v" : ""),
 198                (is_niagara_plus() ? ", niagara_plus" : (is_niagara() ? ", niagara" : "")),
 199                (is_sparc64() ? ", sparc64" : ""),
 200                (!has_hardware_mul32() ? ", no-mul32" : ""),
 201                (!has_hardware_div32() ? ", no-div32" : ""),
 202                (!has_hardware_fsmuld() ? ", no-fsmuld" : ""));
 203 
 204   // buf is started with ", " or is empty
 205   _features_string = os::strdup(strlen(buf) > 2 ? buf + 2 : buf);
 206 
 207   // UseVIS is set to the smallest of what hardware supports and what
 208   // the command line requires.  I.e., you cannot set UseVIS to 3 on
 209   // older UltraSparc which do not support it.
 210   if (UseVIS > 3) UseVIS=3;
 211   if (UseVIS < 0) UseVIS=0;
 212   if (!has_vis3()) // Drop to 2 if no VIS3 support
 213     UseVIS = MIN2((intx)2,UseVIS);
 214   if (!has_vis2()) // Drop to 1 if no VIS2 support
 215     UseVIS = MIN2((intx)1,UseVIS);
 216   if (!has_vis1()) // Drop to 0 if no VIS1 support


 466 
 467 
 468 int VM_Version::parse_features(const char* implementation) {
 469   int features = unknown_m;
 470   // Convert to UPPER case before compare.
 471   char* impl = os::strdup_check_oom(implementation);
 472 
 473   for (int i = 0; impl[i] != 0; i++)
 474     impl[i] = (char)toupper((uint)impl[i]);
 475 
 476   if (strstr(impl, "SPARC64") != NULL) {
 477     features |= sparc64_family_m;
 478   } else if (strstr(impl, "SPARC-M") != NULL) {
 479     // M-series SPARC is based on T-series.
 480     features |= (M_family_m | T_family_m);
 481   } else if (strstr(impl, "SPARC-T") != NULL) {
 482     features |= T_family_m;
 483     if (strstr(impl, "SPARC-T1") != NULL) {
 484       features |= T1_model_m;
 485     }
 486   } else if (strstr(impl, "SUN4V-CPU") != NULL) {
 487     // Generic or migration class LDOM
 488     features |= T_family_m;
 489   } else {
 490     log_info(os, cpu)("Failed to parse CPU implementation = '%s'", impl);







 491   }

 492   os::free((void*)impl);
 493   return features;
 494 }
< prev index next >