public inbox for fortran@gcc.gnu.org
 help / color / mirror / Atom feed
From: Thomas Koenig <tkoenig@netcologne.de>
To: wschmidt@linux.ibm.com,
	"fortran@gcc.gnu.org" <fortran@gcc.gnu.org>,
	Jakub Jelinek <jakub@redhat.com>,
	Segher Boessenkool <segher@kernel.crashing.org>,
	Peter Bergner <bergner@linux.ibm.com>,
	David Edelsohn <dje.gcc@gmail.com>,
	Michael Meissner <meissner@linux.ibm.com>
Subject: Re: [RFC] User-visible changes for powerpc64-le-linux ABI changes
Date: Mon, 1 Nov 2021 18:32:51 +0100	[thread overview]
Message-ID: <7cee9ce9-7fea-4d2d-5c53-e5d708f93c6b@netcologne.de> (raw)
In-Reply-To: <bdc02706-a5ae-1389-906d-50c502b87d5f@linux.ibm.com>


Hi Bill,

> We had previously been concerned about whether the
> necessary name mangling support would be possible, but it sounds like you aren't
> overly worried about that.

We can always add a letter to the kind number, or use a different
number in the encoding, or someting

This has to be done in fortran/iresolve.c, where the function
name is set, for example, in gfc_resolve_matmul, by


   f->value.function.name
     = gfc_get_string (PREFIX ("matmul_%c%d"), gfc_type_letter (f->ts.type),
		      f->ts.kind);

Easy enough to add something there if ts.type is BT_REAL,
ts.kind is 16 and the compiler is currently using
double double (for example), or just use KIND=15 then
(although that would only be a naming convention).

On the library side, it could become a bit harier, because there
is some m4 stuff going on there, and as we all know, m4 is sort
of a write-only language...

The place to look into are the macro definitions in
libgfortran/iparm/iparm.m4.  If we leave these alone
(which might be easier), we could then define GFC_REAL_15
to be IBM long double and change the Makefile.am to make
sure they are compiled with the right options.

As far as I can see, the rtype_kind and atype_kind numbers
are never used in calculations, just for namings, so we
should be safe.

As far as the other functions are concerned, we have the
list in gfortran.map.  Anything with _r16 should have a
_r15 equivalent.

Hmm... one question there.  I assume there is no problem if
something in gfortran.map is not present in the library file,
correct?  So, I think we should be able to put symbols there
which are unused on other systems.

So, I think the idea of differentiating the two real types
by the KIND number encoded in the file names should work.

Best regards

	Thomas

  reply	other threads:[~2021-11-01 17:33 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-31 14:43 Thomas Koenig
2021-11-01 15:54 ` Bill Schmidt
2021-11-01 17:32   ` Thomas Koenig [this message]
2021-11-01 17:45     ` Jakub Jelinek
2021-11-02  6:19       ` Thomas Koenig
2021-11-04  4:41         ` Michael Meissner
2021-11-01 18:46   ` Michael Meissner
2021-11-15 20:27     ` Thomas Koenig
2021-11-15 22:14       ` Peter Bergner
2021-11-15 23:42       ` Michael Meissner
2021-11-16  7:51         ` Thomas Koenig
2021-11-19 14:19           ` Jakub Jelinek
2021-11-19 17:30         ` Segher Boessenkool
2021-11-19 19:09           ` Thomas Koenig
2021-11-19 19:36             ` Peter Bergner
2021-11-19 21:30               ` Segher Boessenkool
2022-01-02 22:58     ` [power-iee128] How to specify linker flags Thomas Koenig
2022-01-03 10:19       ` Thomas Koenig
2022-01-03 10:33         ` Jakub Jelinek
2022-01-03 15:23           ` [power-iee128] libgfortran: Use -mno-gnu-attribute in libgfortran Jakub Jelinek
2022-01-03 15:27             ` Thomas Koenig
2022-01-03 10:34         ` [power-iee128] How to specify linker flags Segher Boessenkool
2022-01-05 21:20       ` Michael Meissner

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=7cee9ce9-7fea-4d2d-5c53-e5d708f93c6b@netcologne.de \
    --to=tkoenig@netcologne.de \
    --cc=bergner@linux.ibm.com \
    --cc=dje.gcc@gmail.com \
    --cc=fortran@gcc.gnu.org \
    --cc=jakub@redhat.com \
    --cc=meissner@linux.ibm.com \
    --cc=segher@kernel.crashing.org \
    --cc=wschmidt@linux.ibm.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).