< prev index next >

src/hotspot/cpu/x86/vm_version_x86.cpp

Print this page




1399   if (supports_popcnt()) {
1400     if (FLAG_IS_DEFAULT(UsePopCountInstruction)) {
1401       UsePopCountInstruction = true;
1402     }
1403   } else if (UsePopCountInstruction) {
1404     warning("POPCNT instruction is not available on this CPU");
1405     FLAG_SET_DEFAULT(UsePopCountInstruction, false);
1406   }
1407 
1408   // Use fast-string operations if available.
1409   if (supports_erms()) {
1410     if (FLAG_IS_DEFAULT(UseFastStosb)) {
1411       UseFastStosb = true;
1412     }
1413   } else if (UseFastStosb) {
1414     warning("fast-string operations are not available on this CPU");
1415     FLAG_SET_DEFAULT(UseFastStosb, false);
1416   }
1417 
1418   // Use XMM/YMM MOVDQU instruction for Object Initialization
1419   if (!UseFastStosb && UseSSE >= 2 && UseUnalignedLoadStores) {
1420     if (FLAG_IS_DEFAULT(UseXMMForObjInit)) {
1421       UseXMMForObjInit = true;
1422     }
1423   } else if (UseXMMForObjInit) {
1424     warning("UseXMMForObjInit requires SSE2 and unaligned load/stores. Feature is switched off.");
1425     FLAG_SET_DEFAULT(UseXMMForObjInit, false);
1426   }
1427 
1428 #ifdef COMPILER2
1429   if (FLAG_IS_DEFAULT(AlignVector)) {
1430     // Modern processors allow misaligned memory operations for vectors.
1431     AlignVector = !UseUnalignedLoadStores;
1432   }
1433 #endif // COMPILER2
1434 
1435   if (FLAG_IS_DEFAULT(AllocatePrefetchInstr)) {
1436     if (AllocatePrefetchInstr == 3 && !supports_3dnow_prefetch()) {
1437       FLAG_SET_DEFAULT(AllocatePrefetchInstr, 0);
1438     } else if (!supports_sse() && supports_3dnow_prefetch()) {
1439       FLAG_SET_DEFAULT(AllocatePrefetchInstr, 3);




1399   if (supports_popcnt()) {
1400     if (FLAG_IS_DEFAULT(UsePopCountInstruction)) {
1401       UsePopCountInstruction = true;
1402     }
1403   } else if (UsePopCountInstruction) {
1404     warning("POPCNT instruction is not available on this CPU");
1405     FLAG_SET_DEFAULT(UsePopCountInstruction, false);
1406   }
1407 
1408   // Use fast-string operations if available.
1409   if (supports_erms()) {
1410     if (FLAG_IS_DEFAULT(UseFastStosb)) {
1411       UseFastStosb = true;
1412     }
1413   } else if (UseFastStosb) {
1414     warning("fast-string operations are not available on this CPU");
1415     FLAG_SET_DEFAULT(UseFastStosb, false);
1416   }
1417 
1418   // Use XMM/YMM MOVDQU instruction for Object Initialization
1419   if (UseSSE >= 2 && UseUnalignedLoadStores) {
1420     if (FLAG_IS_DEFAULT(UseXMMForObjInit)) {
1421       UseXMMForObjInit = true;
1422     }
1423   } else if (UseXMMForObjInit) {
1424     warning("UseXMMForObjInit requires SSE2 and unaligned load/stores. Feature is switched off.");
1425     FLAG_SET_DEFAULT(UseXMMForObjInit, false);
1426   }
1427 
1428 #ifdef COMPILER2
1429   if (FLAG_IS_DEFAULT(AlignVector)) {
1430     // Modern processors allow misaligned memory operations for vectors.
1431     AlignVector = !UseUnalignedLoadStores;
1432   }
1433 #endif // COMPILER2
1434 
1435   if (FLAG_IS_DEFAULT(AllocatePrefetchInstr)) {
1436     if (AllocatePrefetchInstr == 3 && !supports_3dnow_prefetch()) {
1437       FLAG_SET_DEFAULT(AllocatePrefetchInstr, 0);
1438     } else if (!supports_sse() && supports_3dnow_prefetch()) {
1439       FLAG_SET_DEFAULT(AllocatePrefetchInstr, 3);


< prev index next >