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

2023-10-26 Thread David Holmes
On Thu, 26 Oct 2023 17:41:52 GMT, Vladimir Ivanov wrote: > > do you have any suggestion about where to move the remaining code that's in > > stubRoutines.cpp? > > As it is now, `globalDefinitions.hpp/cpp` looks the most appropriate one to > me. That seems okay to me too and much better than `

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

2023-10-26 Thread Vladimir Ivanov
On Thu, 26 Oct 2023 10:39:04 GMT, Andrew Haley wrote: > do you have any suggestion about where to move the remaining code that's in > stubRoutines.cpp? As it is now, `globalDefinitions.hpp/cpp` looks the most appropriate one to me. You could create new header file for it (under `share/utiliti

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

2023-10-26 Thread Andrew Haley
On Wed, 18 Oct 2023 19:13:40 GMT, Vladimir Ivanov wrote: > > Meta-question and apologies if this was covered before, but why is this > > logic being added to stubRoutines.cpp? > > Because tha'ts where @iwanowww asked me to put it. I don't much care. Hi @iwanowww , do you have any suggestion ab

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

2023-10-26 Thread Andrew Haley
On Thu, 19 Oct 2023 09:31:36 GMT, Andrew Haley wrote: >> src/hotspot/os/linux/os_linux.cpp line 1853: >> >>> 1851: >>> 1852: #ifndef IA32 >>> 1853: // Quickly test to make sure denormals are correctly handled. >> >> Nit: I recommend using "subnormal" rather than "denormal" for general >>

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

2023-10-19 Thread Vladimir Ivanov
On Thu, 19 Oct 2023 09:33:52 GMT, Andrew Haley 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. `Resto

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

2023-10-19 Thread Andrew Haley
On Thu, 19 Oct 2023 01:26:43 GMT, Joe Darcy wrote: >> Andrew Haley has updated the pull request incrementally with three >> additional commits since the last revision: >> >> - Review feedback >> - Merge branch 'JDK-8295159' of https://github.com/theRealAph/jdk into >> JDK-8295159 >> - Remov

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

2023-10-19 Thread Andrew Haley
On Wed, 18 Oct 2023 08:50:13 GMT, Andrew Haley wrote: >> Meta-question and apologies if this was covered before, but why is this >> logic being added to stubRoutines.cpp? > >> Meta-question and apologies if this was covered before, but why is this >> logic being added to stubRoutines.cpp? > >

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

2023-10-18 Thread Joe Darcy
On Tue, 17 Oct 2023 11:43:59 GMT, Andrew Haley wrote: >> A bug in GCC causes shared libraries linked with -ffast-math to disable >> denormal arithmetic. This breaks Java's floating-point semantics. >> >> The bug is https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55522 >> >> One solution is to sav

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

2023-10-18 Thread Vladimir Ivanov
On Wed, 18 Oct 2023 08:50:13 GMT, Andrew Haley wrote: >> Meta-question and apologies if this was covered before, but why is this >> logic being added to stubRoutines.cpp? > Because tha'ts where @iwanowww asked me to put it. I don't much care. The constants were duplicated in multiple places (i

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

2023-10-18 Thread Andrew Haley
On Wed, 18 Oct 2023 00:01:20 GMT, David Holmes wrote: > Meta-question and apologies if this was covered before, but why is this logic > being added to stubRoutines.cpp? Because tha'ts where @iwanowww asked me to put it. I don't much care. - PR Comment: https://git.openjdk.org/jdk/

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

2023-10-17 Thread David Holmes
On Tue, 17 Oct 2023 11:43:59 GMT, Andrew Haley wrote: >> A bug in GCC causes shared libraries linked with -ffast-math to disable >> denormal arithmetic. This breaks Java's floating-point semantics. >> >> The bug is https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55522 >> >> One solution is to sav

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

2023-10-17 Thread Andrew Haley
> A bug in GCC causes shared libraries linked with -ffast-math to disable > denormal arithmetic. This breaks Java's floating-point semantics. > > The bug is https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55522 > > One solution is to save and restore the floating-point control word around > System