RFR: 8319429: Resetting MXCSR flags degrades ecore [v2]

Volodymyr Paprotski duke at openjdk.org
Tue Nov 7 15:44:30 UTC 2023


On Tue, 7 Nov 2023 03:37:20 GMT, Jatin Bhateja <jbhateja at openjdk.org> wrote:

> As per JVM specification section 2.8 "The floating-point instructions of the Java Virtual Machine do not throw exceptions, trap, or otherwise signal the IEEE 754 exceptional conditions of invalid operation, division by zero, overflow, underflow, or inexact.", thus JVM does not check these exceptions.
> 
> Your patch is always setting lower 6 bits of MXCSR on hybrid CPUs which has both E and P core, do you see any concerns if these bits are default ON for other server targets with just P-cores.

I considered it. There doesn't appear to be any functional correctness issues, since Java does not support the signaling part of BFP IEEE anyway, those flags are essentially noop. I also measured on a some PCore systems, the performance is unaffected.  I mostly went with this fix to be conservative, since there probably should be more performance testing otherwise. Might be cleaner to have it set to just one value.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/16504#issuecomment-1798936849


More information about the hotspot-compiler-dev mailing list