< prev index next >

src/cpu/x86/vm/vm_version_x86.cpp

Print this page




 456     __ pop(rbx);
 457     __ pop(rbp);
 458     __ ret(0);
 459 
 460 #   undef __
 461 
 462     return start;
 463   };
 464 };
 465 
 466 void VM_Version::get_processor_features() {
 467 
 468   _cpu = 4; // 486 by default
 469   _model = 0;
 470   _stepping = 0;
 471   _cpuFeatures = 0;
 472   _logical_processors_per_package = 1;
 473   // i486 internal cache is both I&D and has a 16-byte line size
 474   _L1_data_cache_line_size = 16;
 475 
 476   if (!Use486InstrsOnly) {
 477     // Get raw processor info
 478 
 479     get_cpu_info_stub(&_cpuid_info);
 480 
 481     assert_is_initialized();
 482     _cpu = extended_cpu_family();
 483     _model = extended_cpu_model();
 484     _stepping = cpu_stepping();
 485 
 486     if (cpu_family() > 4) { // it supports CPUID
 487       _cpuFeatures = feature_flags();
 488       // Logical processors are only available on P4s and above,
 489       // and only if hyperthreading is available.
 490       _logical_processors_per_package = logical_processor_count();
 491       _L1_data_cache_line_size = L1_line_size();
 492     }
 493   }
 494 
 495   _supports_cx8 = supports_cmpxchg8();
 496   // xchg and xadd instructions
 497   _supports_atomic_getset4 = true;
 498   _supports_atomic_getadd4 = true;
 499   LP64_ONLY(_supports_atomic_getset8 = true);
 500   LP64_ONLY(_supports_atomic_getadd8 = true);
 501 
 502 #ifdef _LP64
 503   // OS should support SSE for x64 and hardware should support at least SSE2.
 504   if (!VM_Version::supports_sse2()) {
 505     vm_exit_during_initialization("Unknown x64 processor: SSE2 not supported");
 506   }
 507   // in 64 bit the use of SSE2 is the minimum
 508   if (UseSSE < 2) UseSSE = 2;
 509 #endif
 510 
 511 #ifdef AMD64
 512   // flush_icache_stub have to be generated first.




 456     __ pop(rbx);
 457     __ pop(rbp);
 458     __ ret(0);
 459 
 460 #   undef __
 461 
 462     return start;
 463   };
 464 };
 465 
 466 void VM_Version::get_processor_features() {
 467 
 468   _cpu = 4; // 486 by default
 469   _model = 0;
 470   _stepping = 0;
 471   _cpuFeatures = 0;
 472   _logical_processors_per_package = 1;
 473   // i486 internal cache is both I&D and has a 16-byte line size
 474   _L1_data_cache_line_size = 16;
 475 

 476   // Get raw processor info
 477 
 478   get_cpu_info_stub(&_cpuid_info);
 479 
 480   assert_is_initialized();
 481   _cpu = extended_cpu_family();
 482   _model = extended_cpu_model();
 483   _stepping = cpu_stepping();
 484 
 485   if (cpu_family() > 4) { // it supports CPUID
 486     _cpuFeatures = feature_flags();
 487     // Logical processors are only available on P4s and above,
 488     // and only if hyperthreading is available.
 489     _logical_processors_per_package = logical_processor_count();
 490     _L1_data_cache_line_size = L1_line_size();

 491   }
 492 
 493   _supports_cx8 = supports_cmpxchg8();
 494   // xchg and xadd instructions
 495   _supports_atomic_getset4 = true;
 496   _supports_atomic_getadd4 = true;
 497   LP64_ONLY(_supports_atomic_getset8 = true);
 498   LP64_ONLY(_supports_atomic_getadd8 = true);
 499 
 500 #ifdef _LP64
 501   // OS should support SSE for x64 and hardware should support at least SSE2.
 502   if (!VM_Version::supports_sse2()) {
 503     vm_exit_during_initialization("Unknown x64 processor: SSE2 not supported");
 504   }
 505   // in 64 bit the use of SSE2 is the minimum
 506   if (UseSSE < 2) UseSSE = 2;
 507 #endif
 508 
 509 #ifdef AMD64
 510   // flush_icache_stub have to be generated first.


< prev index next >