public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Joseph Myers <joseph@codesourcery.com>
To: Kito Cheng <kito.cheng@sifive.com>
Cc: <gcc-patches@gcc.gnu.org>, <kito.cheng@gmail.com>,
	<jim.wilson.gcc@gmail.com>, <palmer@dabbelt.com>,
	<andrew@sifive.com>, <juzhe.zhong@rivai.ai>
Subject: Re: [PATCH 1/2] RISC-V: Support _Float16 type.
Date: Tue, 26 Jul 2022 21:42:39 +0000	[thread overview]
Message-ID: <alpine.DEB.2.22.394.2207262138470.480542@digraph.polyomino.org.uk> (raw)
In-Reply-To: <20220707085231.68930-2-kito.cheng@sifive.com>

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?

-- 
Joseph S. Myers
joseph@codesourcery.com

  reply	other threads:[~2022-07-26 21:42 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 [this message]
2022-07-27  9:34     ` Kito Cheng
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=alpine.DEB.2.22.394.2207262138470.480542@digraph.polyomino.org.uk \
    --to=joseph@codesourcery.com \
    --cc=andrew@sifive.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jim.wilson.gcc@gmail.com \
    --cc=juzhe.zhong@rivai.ai \
    --cc=kito.cheng@gmail.com \
    --cc=kito.cheng@sifive.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).