[10] RFR(XS): 8194494: SHA-512 stub uses AVX 2 instructions on non-supporting CPUs

Vladimir Kozlov vladimir.kozlov at oracle.com
Wed Jan 3 19:44:28 UTC 2018

Hi Tobias,

Even so sha512 is only implemented for 64-bit I think you should not restrict check with LP64_ONLY(). The only 
implementation uses avx2.


On 1/3/18 8:49 AM, Tobias Hartmann wrote:
> Hi,
> please review the following patch:
> https://bugs.openjdk.java.net/browse/JDK-8194494
> http://cr.openjdk.java.net/~thartmann/8194494/webrev.00/
> The VM crashes with SIGILL on CPUs that have the SHA extension but no AVX 2 support because since JDK-8165381 the
> SHA-512 stub uses AVX 2 instructions (for example, 'vpblendd'). In addition to UseSHA, we need to check for
> supports_avx2() && supports_bmi2() on x86.
> I had no suitable machine available for testing but I was able to trigger the problem by enforcing
> UseSHA512Intrinsics=true on my machine and disabling AVX 2 support (see comments in the bug for details).
> This problem was reported by Csaba Mate [1].
> Thanks,
> Tobias
> [1] http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/2018-January/028002.html

More information about the hotspot-compiler-dev mailing list