public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@redhat.com>
To: Segher Boessenkool <segher@kernel.crashing.org>
Cc: richard.sandiford@arm.com, gcc-patches@gcc.gnu.org,
	"Joseph S. Myers" <joseph@codesourcery.com>,
	Richard Earnshaw <richard.earnshaw@arm.com>
Subject: Re: [PATCH] i386, rs6000, ia64, s390: Fix C++ ICEs with _Float64x or _Float128 [PR107080]
Date: Fri, 30 Sep 2022 17:31:26 +0200	[thread overview]
Message-ID: <YzcLzlu3Cq8bj4J2@tucnak> (raw)
In-Reply-To: <20220930150759.GH25951@gate.crashing.org>

On Fri, Sep 30, 2022 at 10:07:59AM -0500, Segher Boessenkool wrote:
> Hi!
> 
> On Thu, Sep 29, 2022 at 12:01:43PM +0200, Jakub Jelinek via Gcc-patches wrote:
> > --- gcc/config/i386/i386.cc.jj	2022-09-29 09:13:25.713718513 +0200
> > +++ gcc/config/i386/i386.cc	2022-09-29 11:29:20.828358152 +0200
> > @@ -22725,6 +22725,9 @@ ix86_mangle_type (const_tree type)
> >        && TREE_CODE (type) != INTEGER_TYPE && TREE_CODE (type) != REAL_TYPE)
> >      return NULL;
> >  
> > +  if (type == float128_type_node || type == float64x_type_node)
> > +    return NULL;
> 
> Is float128_type_node always IEEE QP, never double-double?  I couldn't
> find this documented anywhere.  If this is not true, this part of the
> patch is incorrect.

It is always IEEE quad, if there is no IEEE quad support, it is NULL.
The C++ wording is:

"If the implementation supports an extended floating-point type whose
properties are specified by the ISO/IEC/IEEE 60559 floating-point
interchange format binary128, then the typedef-name std::float128_t is
defined in the header <stdfloat> and names such a type, the macro
__STDCPP_FLOAT128_T__ is defined, and the floating-point literal suffixes
f128 and F128 are supported."
and C:
Types designated:
_FloatN
where N is 16, 32, 64, or ≥128 and a multiple of 32; and, types designated
_DecimalN
where N ≥ 32 and a multiple of 32, are collectively called the interchange floating types. Each
interchange floating type has the IEC 60559 interchange format corresponding to its width (N) and
radix (2 for _FloatN, 10 for _DecimalN). Each interchange floating type is not compatible with any
other type."

So, _Float128 and std::float128_t which we use float128_type_node for
must be IEEE binary128, nothing else.

Internally, it is implemented by using targetm.floatn_mode hook to query
which mode if any is the IEEE one with corresponding width.

	Jakub


  reply	other threads:[~2022-09-30 15:32 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-29 10:01 Jakub Jelinek
2022-09-30 13:54 ` Jason Merrill
2022-09-30 17:13   ` [PATCH] arm, aarch64, csky: Fix C++ ICEs with _Float16 and __fp16 [PR107080] Jakub Jelinek
2022-09-30 17:38     ` Richard Sandiford
2022-09-30 17:49       ` Jakub Jelinek
2022-09-30 19:44     ` Jason Merrill
2022-09-30 15:07 ` [PATCH] i386, rs6000, ia64, s390: Fix C++ ICEs with _Float64x or _Float128 [PR107080] Segher Boessenkool
2022-09-30 15:31   ` Jakub Jelinek [this message]
2022-09-30 15:50     ` Segher Boessenkool

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=YzcLzlu3Cq8bj4J2@tucnak \
    --to=jakub@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=joseph@codesourcery.com \
    --cc=richard.earnshaw@arm.com \
    --cc=richard.sandiford@arm.com \
    --cc=segher@kernel.crashing.org \
    /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).