Re: [power-ieee128] OPEN CONV

2022-01-08 Thread Michael Meissner via Fortran
On Sat, Jan 08, 2022 at 02:15:14PM -0500, David Edelsohn wrote: > On Sat, Jan 8, 2022 at 1:59 PM Michael Meissner > wrote: > > > > On Sat, Jan 08, 2022 at 03:18:07PM +0100, Jakub Jelinek wrote: > > > On Sat, Jan 08, 2022 at 03:13:10PM +0100, Thomas Koenig wrote: > > > > > > > > On 08.01.22 15:02,

Re: [power-ieee128] OPEN CONV

2022-01-08 Thread Michael Meissner via Fortran
On Sat, Jan 08, 2022 at 03:18:07PM +0100, Jakub Jelinek wrote: > On Sat, Jan 08, 2022 at 03:13:10PM +0100, Thomas Koenig wrote: > > > > On 08.01.22 15:02, Jakub Jelinek via Fortran wrote: > > > Note, as for byteswapping, apparently it wasn't ever working right fox > > > the IBM extended real(kind=

Re: [power-ieee128] RFH: LTO broken

2022-01-05 Thread Michael Meissner via Fortran
On Tue, Jan 04, 2022 at 12:07:49PM +0100, Jakub Jelinek wrote: > On Mon, Jan 03, 2022 at 11:43:57PM +0100, Thomas Koenig wrote: > > > clearly there is still work to fix (but seems e.g. most of the lto tests > > > are related to the gnu attributes stuff:( ). > > > > This is looking better than wha

Re: [power-ieee128] RFH: LTO broken

2022-01-05 Thread Michael Meissner via Fortran
On Tue, Jan 04, 2022 at 12:07:49PM +0100, Jakub Jelinek wrote: > On Mon, Jan 03, 2022 at 11:43:57PM +0100, Thomas Koenig wrote: > > > clearly there is still work to fix (but seems e.g. most of the lto tests > > > are related to the gnu attributes stuff:( ). > > > > This is looking better than wha

Re: [power-ieee128] RFH: LTO broken

2022-01-05 Thread Michael Meissner via Fortran
On Tue, Jan 04, 2022 at 12:07:49PM +0100, Jakub Jelinek wrote: > On Mon, Jan 03, 2022 at 11:43:57PM +0100, Thomas Koenig wrote: > > > clearly there is still work to fix (but seems e.g. most of the lto tests > > > are related to the gnu attributes stuff:( ). > > > > This is looking better than wha

Re: [power-ieee128] libquadmath: Use -mno-gnu-attribute in libquadmath

2022-01-05 Thread Michael Meissner via Fortran
On Mon, Jan 03, 2022 at 04:24:50PM +0100, Jakub Jelinek wrote: > Hi! > > Testing found that we also need libquadmath to be built with > -mno-gnu-attribute, otherwise -mabi=ieeelongdouble programs don't link. > > Ok for power-ieee128? > > 2022-01-03 Jakub Jelinek > > * configure.ac: Set

Re: [power-iee128] How to specify linker flags

2022-01-05 Thread Michael Meissner via Fortran
On Sun, Jan 02, 2022 at 11:58:29PM +0100, Thomas Koenig wrote: > Hi Michael, > > > If you are building libraries that contain modules with multiple long double > > types, you must use the '-mno-gnu-attribute'. We also use the '-Wno-psabi' > > option, which silences the warning that you are switch

Re: [power-ieee128] Which options for libquadmath / native ieee128

2021-12-13 Thread Michael Meissner via Fortran
On Mon, Dec 13, 2021 at 09:29:16PM +0100, Thomas Koenig wrote: > > Hi, > > looking at what the REAL(KIND=17) numbers should be compiled for, I see > the following options that should be considered: > > a) xsaddqp and friends are not supported by the CPU; libquadmath should >be called for all

Re: [power-ieee128] What should the math functions be annotated with?

2021-12-06 Thread Michael Meissner via Fortran
On Sun, Dec 05, 2021 at 12:16:38PM +0100, Thomas Koenig wrote: > > On 05.12.21 01:35, Peter Bergner wrote: > > Instead of setting LD_LIBRARY_PATH=/home/tkoenig/lib64 could you try > > setting it to LD_LIBRARY_PATH='$ORIGIN/lib64' instead? This would > > allow the other system binaries to not find

Re: [power-ieee128] What should the math functions be annotated with?

2021-12-04 Thread Michael Meissner via Fortran
On Sat, Dec 04, 2021 at 02:42:13PM +0100, Thomas Koenig wrote: > On 04.12.21 11:29, Jakub Jelinek wrote: > > If zlib devel isn't installed, drop --with-system-zlib option > > or use --without-system-zlib. > > > > You've asked in another mail how to configure gcc to default to > > -mabi=ieeelongdou

Re: [power-ieee128] What should the math functions be annotated with?

2021-12-03 Thread Michael Meissner via Fortran
On Fri, Dec 03, 2021 at 08:57:54AM -0600, Bill Schmidt wrote: > Hi! > > On 12/3/21 5:56 AM, Thomas Koenig wrote: > > > > Hi Jakub, > > > >> Note, we want to test both building gcc on ppc64le with older glibc > >> and newer glibc (and that libgfortran will have the same ABI between both > >> and on

Re: [RFC] User-visible changes for powerpc64-le-linux ABI changes

2021-11-15 Thread Michael Meissner via Fortran
On Mon, Nov 15, 2021 at 09:27:38PM +0100, Thomas Koenig wrote: > Hi, > > is there an update on this? I am still waiting on a response for > the account on the development machine. > > I assume we would to the development on a branch. My git fu > is extremely weak, so I would appreciate if someb

Re: [RFC] User-visible changes for powerpc64-le-linux ABI changes

2021-11-03 Thread Michael Meissner via Fortran
On Tue, Nov 02, 2021 at 07:19:10AM +0100, Thomas Koenig wrote: > > On 01.11.21 18:45, Jakub Jelinek wrote: > > Note, if we go the way of C/C++ with -mabi=ieeelongdouble vs. > > -mabi=ibmlongdouble choosing between the two ABIs and libgfortran being > > ABI compatible with both, then we don't need

Re: libgfortran.so SONAME and powerpc64le-linux ABI changes (work in progress patches)

2021-11-02 Thread Michael Meissner via Fortran
On Mon, Nov 01, 2021 at 10:56:33AM -0500, Bill Schmidt wrote: > Would starting from Advance Toolchain 15 with the most recent glibc make > things easier for Thomas to test? The problem is gcc135 runs Centos 7.x which is not compatible with AT 13-15. -- Michael Meissner, IBM PO Box 98, Ayer, Mas

Re: [RFC] User-visible changes for powerpc64-le-linux ABI changes

2021-11-01 Thread Michael Meissner via Fortran
On Mon, Nov 01, 2021 at 10:54:27AM -0500, Bill Schmidt wrote: > Hi Thomas, > > To me this looks excellent.  If you feel that support for both forms is > achievable, > that's certainly superior. We had previously been concerned about whether the > necessary name mangling support would be possible

Re: libgfortran.so SONAME and powerpc64le-linux ABI changes (2nd patch)

2021-10-29 Thread Michael Meissner via Fortran
This patch replaces the first patch. Instead of disallowing long double and only dealing with float128 types, this patch tries to accommodate the two. It adds target hooks so the back end can overwrite the kind number for types. I made the IBM long double type use KIND=15 instead of KIND=16, and

Re: libgfortran.so SONAME and powerpc64le-linux ABI changes (work in progress patches)

2021-10-29 Thread Michael Meissner via Fortran
On Fri, Oct 29, 2021 at 11:21:33PM +0200, Bernhard Reutner-Fischer wrote: > Michael, > > On Thu, 28 Oct 2021 23:36:20 -0400 > Michael Meissner via Fortran wrote: > > ISTM the second > @defmac FORTRAN_USE_LONG_DOUBLE > in tm.texi.in should be FORTRAN_USE_FLOAT128 Tha

Re: libgfortran.so SONAME and powerpc64le-linux ABI changes (work in progress patches)

2021-10-29 Thread Michael Meissner via Fortran
On Fri, Oct 29, 2021 at 09:07:38PM +0200, Thomas Koenig wrote: > Hi Michael, > > I tried this out on the one POWER machine where I can get something > installed :-) It runs Ubuntu 20.04, but does not appear to have the > right glibc version; it has > > $ lsb_release -a > No LSB modules are availa

Re: libgfortran.so SONAME and powerpc64le-linux ABI changes (work in progress patches)

2021-10-28 Thread Michael Meissner via Fortran
Here are the patches I worked on today. It does seem to fix KIND=16 to use Float128, but by not considering long double for KIND processing, it breaks the tests that want to do ISO C binding to long double. Feel free to completely ignore the patches and go off in a different direction. But I tho

Re: libgfortran.so SONAME and powerpc64le-linux ABI changes

2021-10-27 Thread Michael Meissner via Fortran
I've played with some patches to PowerPC to set the defaults for fortran. But without doing a full rebuild like you would do with a new distribution, I think it will be problematical, unless you build everything with the default long double set to IEEE 128-bit. First off all, libquadmath is curre

Re: libgfortran.so SONAME and powerpc64le-linux ABI changes

2021-10-07 Thread Michael Meissner via Fortran
On Thu, Oct 07, 2021 at 08:08:21AM +0200, Thomas Koenig wrote: > On 07.10.21 05:35, Michael Meissner via Fortran wrote: > > I tried this at one point. There are a lot of hidden assumptions that the > > kind > > number is the number of bytes. I'm sure it can be tracked

Re: libgfortran.so SONAME and powerpc64le-linux ABI changes

2021-10-06 Thread Michael Meissner via Fortran
On Wed, Oct 06, 2021 at 10:17:44AM -0500, Segher Boessenkool wrote: > On Wed, Oct 06, 2021 at 08:59:53AM +0200, Thomas Koenig wrote: > > On 05.10.21 23:54, Segher Boessenkool wrote: > > >>There is also the issue of binary data. If some user has written > > >>out data in double double and wants to

Re: libgfortran.so SONAME and powerpc64le-linux ABI changes

2021-10-06 Thread Michael Meissner via Fortran
On Mon, Oct 04, 2021 at 12:07:54PM +0200, Jakub Jelinek wrote: > etc. Could we just pretend in the compiler to libgfortran ABI that > powerpc64le-linux real(kind=16) is kind 17 and make sure that if anything > would actually think it is 17 bytes it uses 16 instead (though, kind=10 > on x86-64 or i

Re: [Patch v3 Fortran] Fix c_float128 and c_float128_complex on targets with 128-bit long double.

2021-08-11 Thread Michael Meissner via Fortran
On Wed, Aug 11, 2021 at 05:55:39AM -0500, Segher Boessenkool wrote: > Hi! > > On Tue, Aug 10, 2021 at 04:46:11PM -0600, Sandra Loosemore wrote: > > OK. I used your wording verbatim for the first one. For the second > > one, I'm still pretty confused as I think it is at least theoretically > >

Re: [RFC, Fortran] Fix c_float128 and c_float128_complex on targets with 128-bit long double.

2021-08-05 Thread Michael Meissner via Fortran
On Thu, Aug 05, 2021 at 12:19:37PM -0600, Sandra Loosemore wrote: > On 8/5/21 11:33 AM, Michael Meissner wrote: > >At the moment, we only fully support C and C++ when changing the long double > >format (between IEEE 128-bit, IBM 128-bit, and 64-bit) when the compiler is > >invoked (and assuming you

Re: [RFC, Fortran] Fix c_float128 and c_float128_complex on targets with 128-bit long double.

2021-08-05 Thread Michael Meissner via Fortran
On Wed, Aug 04, 2021 at 02:14:07PM -0600, Sandra Loosemore wrote: > I was trying last week to run my not-yet-committed TS29113 testsuite > on a powerpc64le-linux-gnu target and ran into some problems with > the kind constants c_float128 and c_float128_complex from the > ISO_C_BINDING module; per th

Re: Fix Fortran rounding issues, PR fortran/96983.

2021-04-22 Thread Michael Meissner via Fortran
On Wed, Apr 21, 2021 at 10:10:07AM +0200, Tobias Burnus wrote: > On 20.04.21 08:58, Richard Biener via Fortran wrote: > >On Mon, Apr 19, 2021 at 9:40 PM Michael Meissner via Fortran > > wrote: > Is there any reason to not only send the email to fortran@ _and_ > gcc-patches@

Fix Fortran rounding issues, PR fortran/96983.

2021-04-19 Thread Michael Meissner via Fortran
Fix Fortran rounding issues, PR fortran/96983. I was looking at Fortran PR 96983, which fails on the PowerPC when trying to run the test PR96711.F90. The compiler ICEs because the PowerPC does not have a floating point type with a type precision of 128. The reason is that the PowerPC has 3 diffe