public inbox for fortran@gcc.gnu.org
 help / color / mirror / Atom feed
From: Tobias Burnus <tobias@codesourcery.com>
To: Jakub Jelinek <jakub@redhat.com>,
	Thomas Koenig <tkoenig@netcologne.de>, FX <fxcoudert@gmail.com>
Cc: <fortran@gcc.gnu.org>
Subject: Re: powerpc64le real(kind=16) and IEEE_{ARITHMETIC,EXCEPTIONS} modules
Date: Tue, 25 Jan 2022 12:59:03 +0100	[thread overview]
Message-ID: <b504bc8f-3324-c91d-520b-5c185929a2aa@codesourcery.com> (raw)
In-Reply-To: <20220125114427.GH2646553@tucnak>

Hi,

On 25.01.22 12:44, Jakub Jelinek via Fortran wrote:
> Apparently something we (at least I) have totally missed, we clearly have a
> problem with the IEEE modules for the dual -mabi={ibm,ieee}longdouble.
> We have:
>      __ieee_arithmetic_MOD_ieee_class_16;
>      __ieee_arithmetic_MOD_ieee_support_datatype_16;
... exported from the library, but no corresponding _17 entrypoints.
> Can everything these modules do be resolved at compile time inline
> such that for the abi_kind 17 nothing is really called, or
> any other thoughts on this?

We already have in gfc_conv_function_expr:

   /* The IEEE_ARITHMETIC functions are caught here. */
   if (sym->from_intmod == INTMOD_IEEE_ARITHMETIC)
     if (gfc_conv_ieee_arithmetic_function (se, expr))
       return;

which handles:
   if (startswith (name, "_gfortran_ieee_is_nan"))
   else if (startswith (name, "_gfortran_ieee_is_finite"))
   else if (startswith (name, "_gfortran_ieee_unordered"))
   else if (startswith (name, "_gfortran_ieee_is_normal"))
   else if (startswith (name, "_gfortran_ieee_is_negative"))
   else if (startswith (name, "_gfortran_ieee_copy_sign"))
   else if (startswith (name, "_gfortran_ieee_scalb"))
   else if (startswith (name, "_gfortran_ieee_next_after"))
   else if (startswith (name, "_gfortran_ieee_rem"))
   else if (startswith (name, "_gfortran_ieee_logb"))
   else if (startswith (name, "_gfortran_ieee_rint"))
else -> 'return false;' -> library call.

Thus, more functions could be handled in the compiler itself.
(Likewise for INTMOD_IEEE_EXCEPTIONS, not that I know whether
that has any relevant functions.)

Alternatively, kind= tweaking could be done here as well.

Tobias

-----------------
Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955

  reply	other threads:[~2022-01-25 11:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-25 11:44 Jakub Jelinek
2022-01-25 11:59 ` Tobias Burnus [this message]
2022-01-25 15:13   ` FX

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=b504bc8f-3324-c91d-520b-5c185929a2aa@codesourcery.com \
    --to=tobias@codesourcery.com \
    --cc=fortran@gcc.gnu.org \
    --cc=fxcoudert@gmail.com \
    --cc=jakub@redhat.com \
    --cc=tkoenig@netcologne.de \
    /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).