576 // HT processor could be installed on a system which doesn't support HT. |
576 // HT processor could be installed on a system which doesn't support HT. |
577 _features &= ~CPU_HT; |
577 _features &= ~CPU_HT; |
578 } |
578 } |
579 |
579 |
580 char buf[256]; |
580 char buf[256]; |
581 jio_snprintf(buf, sizeof(buf), "(%u cores per cpu, %u threads per core) family %d model %d stepping %d%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s", |
581 jio_snprintf(buf, sizeof(buf), "(%u cores per cpu, %u threads per core) family %d model %d stepping %d%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s", |
582 cores_per_cpu(), threads_per_core(), |
582 cores_per_cpu(), threads_per_core(), |
583 cpu_family(), _model, _stepping, |
583 cpu_family(), _model, _stepping, |
584 (supports_cmov() ? ", cmov" : ""), |
584 (supports_cmov() ? ", cmov" : ""), |
585 (supports_cmpxchg8() ? ", cx8" : ""), |
585 (supports_cmpxchg8() ? ", cx8" : ""), |
586 (supports_fxsr() ? ", fxsr" : ""), |
586 (supports_fxsr() ? ", fxsr" : ""), |
608 (supports_tscinv() ? ", tscinv": ""), |
608 (supports_tscinv() ? ", tscinv": ""), |
609 (supports_bmi1() ? ", bmi1" : ""), |
609 (supports_bmi1() ? ", bmi1" : ""), |
610 (supports_bmi2() ? ", bmi2" : ""), |
610 (supports_bmi2() ? ", bmi2" : ""), |
611 (supports_adx() ? ", adx" : ""), |
611 (supports_adx() ? ", adx" : ""), |
612 (supports_evex() ? ", evex" : ""), |
612 (supports_evex() ? ", evex" : ""), |
613 (supports_sha() ? ", sha" : "")); |
613 (supports_sha() ? ", sha" : ""), |
|
614 (supports_fma() ? ", fma" : "")); |
614 _features_string = os::strdup(buf); |
615 _features_string = os::strdup(buf); |
615 |
616 |
616 // UseSSE is set to the smaller of what hardware supports and what |
617 // UseSSE is set to the smaller of what hardware supports and what |
617 // the command line requires. I.e., you cannot set UseSSE to 2 on |
618 // the command line requires. I.e., you cannot set UseSSE to 2 on |
618 // older Pentiums which do not support it. |
619 // older Pentiums which do not support it. |
730 if (!FLAG_IS_DEFAULT(UseGHASHIntrinsics)) |
731 if (!FLAG_IS_DEFAULT(UseGHASHIntrinsics)) |
731 warning("GHASH intrinsic requires CLMUL and SSE2 instructions on this CPU"); |
732 warning("GHASH intrinsic requires CLMUL and SSE2 instructions on this CPU"); |
732 FLAG_SET_DEFAULT(UseGHASHIntrinsics, false); |
733 FLAG_SET_DEFAULT(UseGHASHIntrinsics, false); |
733 } |
734 } |
734 |
735 |
|
736 if (supports_fma() && UseSSE >= 2) { |
|
737 if (FLAG_IS_DEFAULT(UseFMA)) { |
|
738 UseFMA = true; |
|
739 } |
|
740 } else if (UseFMA) { |
|
741 warning("FMA instructions are not available on this CPU"); |
|
742 FLAG_SET_DEFAULT(UseFMA, false); |
|
743 } |
|
744 |
735 if (supports_sha() LP64_ONLY(|| supports_avx2() && supports_bmi2())) { |
745 if (supports_sha() LP64_ONLY(|| supports_avx2() && supports_bmi2())) { |
736 if (FLAG_IS_DEFAULT(UseSHA)) { |
746 if (FLAG_IS_DEFAULT(UseSHA)) { |
737 UseSHA = true; |
747 UseSHA = true; |
738 } |
748 } |
739 } else if (UseSHA) { |
749 } else if (UseSHA) { |
771 if (UseAdler32Intrinsics) { |
781 if (UseAdler32Intrinsics) { |
772 warning("Adler32Intrinsics not available on this CPU."); |
782 warning("Adler32Intrinsics not available on this CPU."); |
773 FLAG_SET_DEFAULT(UseAdler32Intrinsics, false); |
783 FLAG_SET_DEFAULT(UseAdler32Intrinsics, false); |
774 } |
784 } |
775 |
785 |
776 // Adjust RTM (Restricted Transactional Memory) flags |
|
777 if (!supports_rtm() && UseRTMLocking) { |
786 if (!supports_rtm() && UseRTMLocking) { |
778 // Can't continue because UseRTMLocking affects UseBiasedLocking flag |
787 // Can't continue because UseRTMLocking affects UseBiasedLocking flag |
779 // setting during arguments processing. See use_biased_locking(). |
788 // setting during arguments processing. See use_biased_locking(). |
780 // VM_Version_init() is executed after UseBiasedLocking is used |
789 // VM_Version_init() is executed after UseBiasedLocking is used |
781 // in Thread::allocate(). |
790 // in Thread::allocate(). |