public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jonathan Wakely <jwakely.gcc@gmail.com>
To: Kito Cheng <kito.cheng@gmail.com>
Cc: GCC <gcc@gcc.gnu.org>
Subject: Re: [RFC] Appropriate portable data type for IEEE half-precision on C/C++
Date: Fri, 12 Mar 2021 10:06:17 +0000	[thread overview]
Message-ID: <CAH6eHdTPt+MSuwJn2Kfamk0mQ1f_mQerLPj+C-2kUraJCds8Lw@mail.gmail.com> (raw)
In-Reply-To: <CA+yXCZDsZgNrB5dy6tfNtHN9y4OtQWJa7eoo-PQ9bW0QRE2Msg@mail.gmail.com>

On Fri, 12 Mar 2021 at 09:58, Kito Cheng <kito.cheng@gmail.com> wrote:
>
> Hi Jonathan:
>
> > I would forget about the decimal types. I thought you were just
> > talking about _Float16?
> >
> > You will need to decide on a mangling for it in C++, which should be
> > co-ordinated with other compilers that are likely to support the type.
> > You could mangle it as "u8_Float16" which is in the namespace reserved
> > for vendor-extensions but if you wanted to assign a new shorter,
> > non-extension then it should be discussed at
> > https://github.com/itanium-cxx-abi/cxx-abi/issues (which will need to
> > happen anyway if std::float16 is expected to go into the C++
> > standard).
> >
> > Are you planning to support this in Clang too?
>
> clang already supports _Float16 on C++ for a while, but only very few targets,
> ARM, AArch64, SPIR and AMDGPU.
>
> > That's documented at
> > http://itanium-cxx-abi.github.io/cxx-abi/abi.html#mangling-builtin
>
> Seems like it is already defined for _FloatN types, and clang already
> follow that.
>
> ::= DF <number> _ # ISO/IEC TS 18661 binary floating point type _FloatN (N bits)
>
> Thank you, Jonathan, I'll start to add that to C++ :)

Oh good, that makes it easy then!

  reply	other threads:[~2021-03-12 10:06 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-12  8:33 Kito Cheng
2021-03-12  9:23 ` Jonathan Wakely
2021-03-12  9:37   ` Kito Cheng
2021-03-12  9:44     ` Jonathan Wakely
2021-03-12  9:46       ` Jonathan Wakely
2021-03-12  9:57       ` Kito Cheng
2021-03-12 10:06         ` Jonathan Wakely [this message]
2021-03-12 18:07   ` Joseph Myers
2021-03-12 19:28     ` Gabriel Ravier
2021-03-15 15:35     ` Kito Cheng

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=CAH6eHdTPt+MSuwJn2Kfamk0mQ1f_mQerLPj+C-2kUraJCds8Lw@mail.gmail.com \
    --to=jwakely.gcc@gmail.com \
    --cc=gcc@gcc.gnu.org \
    --cc=kito.cheng@gmail.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).