--- old/src/cpu/sparc/vm/vm_version_sparc.cpp 2016-12-01 16:34:58.494308123 +0000 +++ new/src/cpu/sparc/vm/vm_version_sparc.cpp 2016-12-01 16:34:58.187845121 +0000 @@ -360,6 +360,16 @@ FLAG_SET_DEFAULT(UseVectorizedMismatchIntrinsic, false); } + // SPARC T4 and above should have support for lzcnt instruction + if (has_vis3()) { + if (FLAG_IS_DEFAULT(UseCountLeadingZerosInstruction)) { + UseCountLeadingZerosInstruction = true; + } + } else if (UseCountLeadingZerosInstruction) { + warning("lzcnt instruction is not available on this CPU"); + FLAG_SET_DEFAULT(UseCountLeadingZerosInstruction, false); + } + if (FLAG_IS_DEFAULT(ContendedPaddingWidth) && (cache_line_size > ContendedPaddingWidth)) ContendedPaddingWidth = cache_line_size;