public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Iain Sandoe <idsandoe@googlemail.com>
To: Thomas Koenig <tkoenig@netcologne.de>
Cc: Jakub Jelinek <jakub@redhat.com>,
	Michael Meissner <meissner@linux.ibm.com>,
	fortran@gcc.gnu.org, GCC Development <gcc@gcc.gnu.org>,
	Tobias Burnus <tobias@codesourcery.com>,
	Segher Boessenkool <segher@kernel.crashing.org>,
	David Edelsohn <dje.gcc@gmail.com>,
	Paul Thomas <pault@gcc.gnu.org>
Subject: Re: libgfortran.so SONAME and powerpc64le-linux ABI changes
Date: Fri, 8 Oct 2021 20:11:00 +0100	[thread overview]
Message-ID: <FF8235BA-2349-4A53-8B74-5EC5BB9BDDD9@googlemail.com> (raw)
In-Reply-To: <334901cf-72b6-d1d7-dae6-3ec45170cf95@netcologne.de>

Hi Thomas,

recognising that this is complex - the intent here is to see if there are ways
to partition the problem (where the pain falls does depend on the choices
made).

perhaps:

 *A  library (interface, name)
 *B  compiler internals
 *C  user-facing changes

> On 8 Oct 2021, at 17:26, Thomas Koenig <tkoenig@netcologne.de> wrote:
> 

>> If one wanted to prioritize library SO name stability - then, perhaps, the
>> approach Jonathan mentioned has been used for libstdc++ (add new
>> symbols for ieee128 with a different mangling to the existing r/c_16 ..)
>> would be preferable (the FE then has to choose the relevant symbol/
>> mangling depending on target).

(A) the points here ^^ are:

1/ the SO name could be left as it is
2/ a target that defaulted to QP routines would still (perhaps under
   some command line flag be able to use the older implementation).

I think both of those could be very helpful to end-users…

> That's not all that would have to be changed.


>  Consider
> 
>  write (*,*) 1.0_16
> end program
> 
> which is translated (using -fdump-tree-original) to
> 
> 
>    _gfortran_st_write (&dt_parm.0);
>    {
>      static real(kind=16) C.3873 = 1.0e+0;
> 
>      _gfortran_transfer_real128_write (&dt_parm.0, &C.3873, 16);
>    }
>    _gfortran_st_write_done (&dt_parm.0);
> 
> so we actually pass a separate kind number as well (why, I'm not sure).
> We would have to go through libgfortran with a fine comb to find all
> the occurrences.  Probably some m4 hackery in iparm.m4 and ifunction.m4.
> So, doable from the library side, if some work.

(B) This is the second area of interest, the fact that changes in the compiler internals
would be needed - and those take the time of the volunteers to implement (believe
me, I am painfully aware of how that pressure falls).

> Things get interesting for user code, calling a routine compiled
> for double double with newer IEEE QP will result in breakage.

That would not happen with the proposal above, since the library would
have different entry points for the two formats.

> We cannot use the KIND number to differentiate, because we must
> assume that people have used KIND=16 and selected_real_kind(30)
> interchangably, and we certainly do not want to nail people to
> the old double double precision on hardware for which IEEE QP
> is available.  

you don’t *have* to use the KIND number to differentiate to the library or the compiler
(although some alternate, more flexible, token would have to be invented).

(C) It’s the mapping between that internal token and the user’s view of the world that
needs to be defined in terms of what the combination of platform and command line
flags implies to the treatment of KIND=NN and selected_real_kind().

> So, KIND=15 for IEEE QP is out.

(C) I must confess this kind of change is where things seem very tricky to me.

changing how the language represents things seems to be something
that would benefit from agreement between compiler vendors

> It's not an easy problem, unfortunately.

no. it is not.
Iain



  reply	other threads:[~2021-10-08 19:11 UTC|newest]

Thread overview: 75+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-04 10:07 Jakub Jelinek
2021-10-04 11:24 ` Richard Biener
2021-10-04 11:36   ` Jakub Jelinek
2021-10-04 12:31     ` Jakub Jelinek
2021-10-04 14:14 ` Jakub Jelinek
2021-10-04 16:47   ` Joseph Myers
2021-10-04 18:33   ` Segher Boessenkool
2021-10-04 19:24     ` Joseph Myers
2021-10-05 17:43       ` Segher Boessenkool
2021-10-14 19:39         ` Bill Schmidt
2021-10-15  0:26           ` Segher Boessenkool
2021-10-05 20:16   ` Thomas Koenig
2021-10-05 21:54     ` Segher Boessenkool
2021-10-06  6:59       ` Thomas Koenig
2021-10-06 15:17         ` Segher Boessenkool
2021-10-06 15:41           ` Jakub Jelinek
2021-10-06 16:07             ` Segher Boessenkool
2021-10-06 16:34               ` Jakub Jelinek
2021-10-06 16:59                 ` Segher Boessenkool
2021-10-06 17:07                   ` Jakub Jelinek
2021-10-06 17:50                     ` Segher Boessenkool
2021-10-06 19:30                       ` Peter Bergner
2021-10-06 17:13                 ` Joseph Myers
2021-10-06 18:39                   ` Segher Boessenkool
2021-10-06 19:42                     ` Joseph Myers
2021-10-06 20:57                       ` Segher Boessenkool
2021-10-06 21:55                         ` Joseph Myers
2021-10-06 22:03                         ` Joseph Myers
2021-10-08 17:53                           ` Segher Boessenkool
2021-10-11 20:11                             ` Joseph Myers
2021-10-15  0:16                               ` Segher Boessenkool
2021-10-06 15:42           ` David Edelsohn
2021-10-06 16:19             ` Segher Boessenkool
2021-10-06 17:38               ` David Edelsohn
2021-10-07  3:42           ` Michael Meissner
2021-10-08 21:10             ` Segher Boessenkool
2021-10-07  9:48         ` Alastair McKinstry
2021-10-07  9:56           ` Andreas Schwab
2021-10-07 10:01             ` Jakub Jelinek
2021-10-07 12:43               ` Alastair McKinstry
2021-10-05 21:53   ` Jonathan Wakely
2021-10-07  3:35 ` Michael Meissner
2021-10-07  6:08   ` Thomas Koenig
2021-10-07  9:40     ` Jakub Jelinek
2021-10-07 15:24     ` Michael Meissner
2021-10-07 15:33       ` Jakub Jelinek
2021-10-08  6:35         ` Thomas Koenig
2021-10-08  7:20           ` Iain Sandoe
2021-10-08 16:26             ` Thomas Koenig
2021-10-08 19:11               ` Iain Sandoe [this message]
2021-10-08 22:55                 ` Thomas Koenig
2021-10-08 23:18                   ` Iain Sandoe
2021-10-09  9:11                     ` Thomas Koenig
2021-10-09  9:19                       ` Iain Sandoe
2021-10-09  9:25                       ` Jakub Jelinek
2021-10-09  7:44                   ` Andreas Schwab
2021-10-10 16:14                     ` Florian Weimer
2021-10-15 13:50 ` Bill Schmidt
2021-10-15 14:20   ` Jakub Jelinek
2021-10-15 18:05     ` Thomas Koenig
2021-10-15 18:11       ` Jakub Jelinek
2021-10-15 18:58         ` Thomas Koenig
2021-10-15 22:24     ` Segher Boessenkool
2021-10-15 22:36   ` Segher Boessenkool
2021-10-18 19:02   ` Joseph Myers
2021-10-28  3:10 ` Michael Meissner
2021-10-29  3:36 ` libgfortran.so SONAME and powerpc64le-linux ABI changes (work in progress patches) Michael Meissner
2021-10-29 19:07   ` Thomas Koenig
2021-10-29 21:06     ` Michael Meissner
2021-11-01 15:56       ` Bill Schmidt
2021-11-02 15:40         ` Michael Meissner
2021-10-30  0:16 ` libgfortran.so SONAME and powerpc64le-linux ABI changes (2nd patch) Michael Meissner
2021-10-30  9:30   ` Thomas Koenig
2021-10-30 10:03     ` Jakub Jelinek
2021-10-30 10:31       ` Thomas Koenig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=FF8235BA-2349-4A53-8B74-5EC5BB9BDDD9@googlemail.com \
    --to=idsandoe@googlemail.com \
    --cc=dje.gcc@gmail.com \
    --cc=fortran@gcc.gnu.org \
    --cc=gcc@gcc.gnu.org \
    --cc=jakub@redhat.com \
    --cc=meissner@linux.ibm.com \
    --cc=pault@gcc.gnu.org \
    --cc=segher@kernel.crashing.org \
    --cc=tkoenig@netcologne.de \
    --cc=tobias@codesourcery.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).