--- old/src/cpu/x86/vm/vm_version_x86.cpp 2016-07-13 16:45:05.743461500 -0700 +++ new/src/cpu/x86/vm/vm_version_x86.cpp 2016-07-13 16:45:05.412461500 -0700 @@ -578,7 +578,7 @@ } char buf[256]; - 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", + 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", cores_per_cpu(), threads_per_core(), cpu_family(), _model, _stepping, (supports_cmov() ? ", cmov" : ""), @@ -610,7 +610,8 @@ (supports_bmi2() ? ", bmi2" : ""), (supports_adx() ? ", adx" : ""), (supports_evex() ? ", evex" : ""), - (supports_sha() ? ", sha" : "")); + (supports_sha() ? ", sha" : ""), + (supports_fma() ? ", fma" : "")); _features_string = os::strdup(buf); // UseSSE is set to the smaller of what hardware supports and what @@ -773,6 +774,18 @@ FLAG_SET_DEFAULT(UseAdler32Intrinsics, false); } + if (supports_fma()) { + if (FLAG_IS_DEFAULT(UseFMA)) { + UseFMA = true; + } + } + else if (UseFMA) { + if (!FLAG_IS_DEFAULT(UseFMA)) + warning("FMA instructions not available on this CPU"); + FLAG_SET_DEFAULT(UseFMA, false); + } + + // Adjust RTM (Restricted Transactional Memory) flags if (!supports_rtm() && UseRTMLocking) { // Can't continue because UseRTMLocking affects UseBiasedLocking flag