From: Kito Cheng <kito.cheng@sifive.com>
To: Joseph Myers <joseph@codesourcery.com>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>,
Kito Cheng <kito.cheng@gmail.com>,
Jim Wilson <jim.wilson.gcc@gmail.com>,
Palmer Dabbelt <palmer@dabbelt.com>,
Andrew Waterman <andrew@sifive.com>,
"juzhe.zhong" <juzhe.zhong@rivai.ai>
Subject: Re: [PATCH 1/2] RISC-V: Support _Float16 type.
Date: Wed, 27 Jul 2022 17:34:35 +0800 [thread overview]
Message-ID: <CALLt3ThU1oos0rCVUYnAyEVJ4JqCCoa=OadTyBr+BJe7HjfCjQ@mail.gmail.com> (raw)
In-Reply-To: <alpine.DEB.2.22.394.2207262138470.480542@digraph.polyomino.org.uk>
Hi Joseph:
On Wed, Jul 27, 2022 at 5:42 AM Joseph Myers <joseph@codesourcery.com> wrote:
>
> On Thu, 7 Jul 2022, Kito Cheng wrote:
>
> > +/* Implement TARGET_MANGLE_TYPE. */
> > +
> > +static const char *
> > +riscv_mangle_type (const_tree type)
> > +{
> > + /* Half-precision float. */
> > + if (TREE_CODE (type) == REAL_TYPE && TYPE_PRECISION (type) == 16)
> > + return "Dh";
>
> Are you sure you wish to use "Dh" instead of "DF16_" used on x86? The C++
> ABI lists both
>
> ::= Dh # IEEE 754r half-precision floating point (16 bits)
> ::= DF <number> _ # ISO/IEC TS 18661 binary floating point type _FloatN (N bits)
>
> without distinguishing which should be used when - maybe the choice made
> for _Float16 on RISC-V needs documenting in the RISC-V psABI?
Oh, thanks for catching this, we intend to use DF16_, the patch comes
from downstream which used __fp16 before, but we decided to use
_Float16 as RISC-V official half-precision floating point later.
> --
> Joseph S. Myers
> joseph@codesourcery.com
next prev parent reply other threads:[~2022-07-27 9:34 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-07 8:52 [PATCH 0/0] RISC-V: Support IEEE half precision operation Kito Cheng
2022-07-07 8:52 ` [PATCH 1/2] RISC-V: Support _Float16 type Kito Cheng
2022-07-26 21:42 ` Joseph Myers
2022-07-27 9:34 ` Kito Cheng [this message]
2022-07-07 8:52 ` [PATCH 2/2] RISC-V: Support zfh and zfhmin extension 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='CALLt3ThU1oos0rCVUYnAyEVJ4JqCCoa=OadTyBr+BJe7HjfCjQ@mail.gmail.com' \
--to=kito.cheng@sifive.com \
--cc=andrew@sifive.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=jim.wilson.gcc@gmail.com \
--cc=joseph@codesourcery.com \
--cc=juzhe.zhong@rivai.ai \
--cc=kito.cheng@gmail.com \
--cc=palmer@dabbelt.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).