RFR: 8295159: DSO created with -ffast-math breaks Java floating-point arithmetic [v11]

Vladimir Ivanov vlivanov at openjdk.org
Fri Oct 20 00:53:44 UTC 2023


On Thu, 19 Oct 2023 09:33:52 GMT, Andrew Haley <aph at openjdk.org> wrote:

> I took them out because of a potential backwards-compatibility breakage.

Ok, I checked the removed code (https://github.com/openjdk/jdk/pull/10661/commits/b817d4757c78594be5960ee0be27013e2588d30a) and agree it is not needed here. 

`RestoreMXCSROnJNICalls` unconditionally restores MXCSR contents while the aforementioned code made it conditional based on FTZ bit fast check.  It could be considered as an optimization (to speed up `-XX:+RestoreMXCSROnJNICalls` mode), but then the fast path check should be extended to cover all possible failure modes (e.g., rounding issues).

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

PR Comment: https://git.openjdk.org/jdk/pull/10661#issuecomment-1771900576


More information about the build-dev mailing list