RFR(S): x86: 8190494: fix for different results with UseAVX=3 when calling AVX-512 native function via JNI.

Deshpande, Vivek R vivek.r.deshpande at intel.com
Thu Nov 30 22:50:53 UTC 2017


Hi Vladimir

Thanks for testing the patch.
To be on the safe side,  I am preserving the rcx register and don't want to introduce any new bugs.

Regards,
Vivek

-----Original Message-----
From: Vladimir Ivanov [mailto:vladimir.x.ivanov at oracle.com] 
Sent: Thursday, November 30, 2017 1:29 PM
To: Deshpande, Vivek R <vivek.r.deshpande at intel.com>; hotspot-compiler-dev at openjdk.java.net
Subject: Re: RFR(S): x86: 8190494: fix for different results with UseAVX=3 when calling AVX-512 native function via JNI.

> http://cr.openjdk.java.net/~vdeshpande/8190494/webrev.00/

Thanks, Vivek. I verified that the reported problem goes away with the fix.

src/hotspot/cpu/x86/macroAssembler_x86.cpp

+  // Reset k1 to 0xffff.
+  if (VM_Version::supports_evex()) {
+    push(rcx);
+    movl(rcx, 0xffff);
+    kmovwl(k1, rcx);
+    pop(rcx);
+  }

Why do you preserve rcx which is already caller-saved and shouldn't contain anything valuable after a JNI call?

Best regards,
Vladimir Ivanov


More information about the hotspot-compiler-dev mailing list