public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: FX <fxcoudert@gmail.com>
To: Mikael Morin <morin-mikael@orange.fr>
Cc: fortran@gcc.gnu.org, gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] Fortran: detect signaling NaNs on targets without issignaling macro in libc
Date: Sun, 23 Jan 2022 11:05:11 +0100	[thread overview]
Message-ID: <F8501D81-DF91-49B8-ACFC-17D5A742662F@gmail.com> (raw)
In-Reply-To: <34442988-ae8e-6444-c3c4-0825ce917bed@orange.fr>

Hi Mikael,

> I spotted two unexpected things (to me at least) related to x86 extended type:
> - You check for endianness, so the format is not x86-specific?
> - Is it expected that the padding bits are in the middle of the data in the big-endian case?

IEEE specifies that extended precision types can be present, possibly with any endianness, at least in theory. There are other CPUs with extended precision types than Intel, although we probably don’t support them currently in gfortran: Motorola 68881 has a IEEE-compatible 80-bit format and is big endian. I kept the code generic, but if you think it’s a problem I can remove that part and make it error out.

I followed the logic used in glibc to deal with bit layout and endianness, so it should be safe as currently proposed.

FX

  reply	other threads:[~2022-01-23 10:05 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-16 23:11 FX
2022-01-22 20:58 ` Mikael Morin
2022-01-23 10:05   ` FX [this message]
2022-01-23 15:56     ` Mikael Morin
2022-01-24 14:23       ` FX
2022-01-24 17:21         ` Thomas Koenig
2022-01-24 22:18           ` FX
2022-01-25 11:34 ` Jakub Jelinek
2022-01-25 11:39   ` 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=F8501D81-DF91-49B8-ACFC-17D5A742662F@gmail.com \
    --to=fxcoudert@gmail.com \
    --cc=fortran@gcc.gnu.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=morin-mikael@orange.fr \
    /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).