src/cpu/x86/vm/vm_version_x86.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File 8038633_8u Sdiff src/cpu/x86/vm

src/cpu/x86/vm/vm_version_x86.cpp

Print this page




 368     __ movl(Address(rsi, 8), rcx);
 369     __ movl(Address(rsi,12), rdx);
 370 
 371     //
 372     // return
 373     //
 374     __ bind(done);
 375     __ popf();
 376     __ pop(rsi);
 377     __ pop(rbx);
 378     __ pop(rbp);
 379     __ ret(0);
 380 
 381 #   undef __
 382 
 383     return start;
 384   };
 385 };
 386 
 387 








 388 void VM_Version::get_processor_features() {
 389 
 390   _cpu = 4; // 486 by default
 391   _model = 0;
 392   _stepping = 0;
 393   _cpuFeatures = 0;
 394   _logical_processors_per_package = 1;
 395 
 396   if (!Use486InstrsOnly) {
 397     // Get raw processor info
 398     getPsrInfo_stub(&_cpuid_info);




 399     assert_is_initialized();
 400     _cpu = extended_cpu_family();
 401     _model = extended_cpu_model();
 402     _stepping = cpu_stepping();
 403 
 404     if (cpu_family() > 4) { // it supports CPUID
 405       _cpuFeatures = feature_flags();
 406       // Logical processors are only available on P4s and above,
 407       // and only if hyperthreading is available.
 408       _logical_processors_per_package = logical_processor_count();
 409     }
 410   }
 411 
 412   _supports_cx8 = supports_cmpxchg8();
 413   // xchg and xadd instructions
 414   _supports_atomic_getset4 = true;
 415   _supports_atomic_getadd4 = true;
 416   LP64_ONLY(_supports_atomic_getset8 = true);
 417   LP64_ONLY(_supports_atomic_getadd8 = true);
 418 




 368     __ movl(Address(rsi, 8), rcx);
 369     __ movl(Address(rsi,12), rdx);
 370 
 371     //
 372     // return
 373     //
 374     __ bind(done);
 375     __ popf();
 376     __ pop(rsi);
 377     __ pop(rbx);
 378     __ pop(rbp);
 379     __ ret(0);
 380 
 381 #   undef __
 382 
 383     return start;
 384   };
 385 };
 386 
 387 
 388 void VM_Version::getPsrInfo_wrapper() {
 389   getPsrInfo_stub(&_cpuid_info);
 390 }
 391 
 392 #ifndef TARGET_OS_FAMILY_windows
 393   #define CALL_TEST_FUNC_WITH_WRAPPER_IF_NEEDED(f) f()
 394 #endif
 395 
 396 void VM_Version::get_processor_features() {
 397 
 398   _cpu = 4; // 486 by default
 399   _model = 0;
 400   _stepping = 0;
 401   _cpuFeatures = 0;
 402   _logical_processors_per_package = 1;
 403 
 404   if (!Use486InstrsOnly) {
 405     // Get raw processor info
 406 
 407     // Some platforms (like Win*) need a wrapper around here
 408     // in order to properly handle SEGV for YMM registers test.
 409     CALL_TEST_FUNC_WITH_WRAPPER_IF_NEEDED(getPsrInfo_wrapper);
 410 
 411     assert_is_initialized();
 412     _cpu = extended_cpu_family();
 413     _model = extended_cpu_model();
 414     _stepping = cpu_stepping();
 415 
 416     if (cpu_family() > 4) { // it supports CPUID
 417       _cpuFeatures = feature_flags();
 418       // Logical processors are only available on P4s and above,
 419       // and only if hyperthreading is available.
 420       _logical_processors_per_package = logical_processor_count();
 421     }
 422   }
 423 
 424   _supports_cx8 = supports_cmpxchg8();
 425   // xchg and xadd instructions
 426   _supports_atomic_getset4 = true;
 427   _supports_atomic_getadd4 = true;
 428   LP64_ONLY(_supports_atomic_getset8 = true);
 429   LP64_ONLY(_supports_atomic_getadd8 = true);
 430 


src/cpu/x86/vm/vm_version_x86.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File