< prev index next >

src/cpu/x86/vm/vm_version_x86.cpp

Print this page




1274     FLAG_SET_DEFAULT(UsePopCountInstruction, false);
1275   }
1276 
1277   // Use fast-string operations if available.
1278   if (supports_erms()) {
1279     if (FLAG_IS_DEFAULT(UseFastStosb)) {
1280       UseFastStosb = true;
1281     }
1282   } else if (UseFastStosb) {
1283     warning("fast-string operations are not available on this CPU");
1284     FLAG_SET_DEFAULT(UseFastStosb, false);
1285   }
1286 
1287 #ifdef COMPILER2
1288   if (FLAG_IS_DEFAULT(AlignVector)) {
1289     // Modern processors allow misaligned memory operations for vectors.
1290     AlignVector = !UseUnalignedLoadStores;
1291   }
1292 #endif // COMPILER2
1293 
1294   if( AllocatePrefetchInstr == 3 && !supports_3dnow_prefetch() ) AllocatePrefetchInstr=0;
1295   if( !supports_sse() && supports_3dnow_prefetch() ) AllocatePrefetchInstr = 3;





1296 
1297   // Allocation prefetch settings
1298   intx cache_line_size = prefetch_data_size();
1299   if( cache_line_size > AllocatePrefetchStepSize )
1300     AllocatePrefetchStepSize = cache_line_size;


1301 
1302   AllocatePrefetchDistance = allocate_prefetch_distance();
1303   AllocatePrefetchStyle    = allocate_prefetch_style();
1304 
1305   if (is_intel() && cpu_family() == 6 && supports_sse3()) {
1306     if (AllocatePrefetchStyle == 2) { // watermark prefetching on Core

1307 #ifdef _LP64
1308       AllocatePrefetchDistance = 384;
1309 #else
1310       AllocatePrefetchDistance = 320;
1311 #endif
1312     }
1313     if (supports_sse4_2() && supports_ht()) { // Nehalem based cpus
1314       AllocatePrefetchDistance = 192;


1315       if (FLAG_IS_DEFAULT(AllocatePrefetchLines)) {
1316         FLAG_SET_DEFAULT(AllocatePrefetchLines, 4);
1317       }
1318     }
1319 #ifdef COMPILER2
1320     if (supports_sse4_2()) {
1321       if (FLAG_IS_DEFAULT(UseFPUForSpilling)) {
1322         FLAG_SET_DEFAULT(UseFPUForSpilling, true);
1323       }
1324     }
1325 #endif
1326   }
1327 
1328 #ifdef _LP64
1329   // Prefetch settings
1330   PrefetchCopyIntervalInBytes = prefetch_copy_interval_in_bytes();
1331   PrefetchScanIntervalInBytes = prefetch_scan_interval_in_bytes();
1332   PrefetchFieldsAhead         = prefetch_fields_ahead();
1333 #endif
1334 




1274     FLAG_SET_DEFAULT(UsePopCountInstruction, false);
1275   }
1276 
1277   // Use fast-string operations if available.
1278   if (supports_erms()) {
1279     if (FLAG_IS_DEFAULT(UseFastStosb)) {
1280       UseFastStosb = true;
1281     }
1282   } else if (UseFastStosb) {
1283     warning("fast-string operations are not available on this CPU");
1284     FLAG_SET_DEFAULT(UseFastStosb, false);
1285   }
1286 
1287 #ifdef COMPILER2
1288   if (FLAG_IS_DEFAULT(AlignVector)) {
1289     // Modern processors allow misaligned memory operations for vectors.
1290     AlignVector = !UseUnalignedLoadStores;
1291   }
1292 #endif // COMPILER2
1293 
1294   if (FLAG_IS_DEFAULT(AllocatePrefetchInstr)) {
1295     if (AllocatePrefetchInstr == 3 && !supports_3dnow_prefetch()) {
1296       FLAG_SET_DEFAULT(AllocatePrefetchInstr, 0);
1297     } else if (!supports_sse() && supports_3dnow_prefetch()) {
1298       FLAG_SET_DEFAULT(AllocatePrefetchInstr, 3);
1299     }
1300   }
1301 
1302   // Allocation prefetch settings
1303   intx cache_line_size = prefetch_data_size();
1304   if (FLAG_IS_DEFAULT(AllocatePrefetchDistance) &&
1305       (cache_line_size > AllocatePrefetchStepSize)) {
1306     FLAG_SET_DEFAULT(AllocatePrefetchStepSize, cache_line_size);
1307   }
1308 
1309   AllocatePrefetchDistance = allocate_prefetch_distance();
1310   AllocatePrefetchStyle    = allocate_prefetch_style();
1311 
1312   if (is_intel() && cpu_family() == 6 && supports_sse3()) {
1313     if (FLAG_IS_DEFAULT(AllocatePrefetchDistance) &&
1314         (AllocatePrefetchStyle == 2)) { // watermark prefetching on Core
1315 #ifdef _LP64
1316       FLAG_SET_DEFAULT(AllocatePrefetchDistance, 384);
1317 #else
1318       FLAG_SET_DEFAULT(AllocatePrefetchDistance, 320);
1319 #endif
1320     }
1321     if (supports_sse4_2() && supports_ht()) { // Nehalem based cpus
1322       if (FLAG_IS_DEFAULT(AllocatePrefetchDistance)) {
1323         FLAG_SET_DEFAULT(AllocatePrefetchDistance, 192);
1324       }
1325       if (FLAG_IS_DEFAULT(AllocatePrefetchLines)) {
1326         FLAG_SET_DEFAULT(AllocatePrefetchLines, 4);
1327       }
1328     }
1329 #ifdef COMPILER2
1330     if (supports_sse4_2()) {
1331       if (FLAG_IS_DEFAULT(UseFPUForSpilling)) {
1332         FLAG_SET_DEFAULT(UseFPUForSpilling, true);
1333       }
1334     }
1335 #endif
1336   }
1337 
1338 #ifdef _LP64
1339   // Prefetch settings
1340   PrefetchCopyIntervalInBytes = prefetch_copy_interval_in_bytes();
1341   PrefetchScanIntervalInBytes = prefetch_scan_interval_in_bytes();
1342   PrefetchFieldsAhead         = prefetch_fields_ahead();
1343 #endif
1344 


< prev index next >