public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Wilco Dijkstra <Wilco.Dijkstra@arm.com>
To: Kito Cheng <kito.cheng@sifive.com>
Cc: GNU C Library <libc-alpha@sourceware.org>,
	Joseph Myers <joseph@codesourcery.com>
Subject: Re: [PATCH] riscv: Set __GLIBC_FLT_EVAL_METHOD to 0 if __FLT_EVAL_METHOD__ is -1
Date: Thu, 16 Feb 2023 16:57:14 +0000	[thread overview]
Message-ID: <PAWPR08MB898227412F5EF829AB2F932183A09@PAWPR08MB8982.eurprd08.prod.outlook.com> (raw)
In-Reply-To: <CALLt3TiafMYKibace3PNE99eVhjTUvWRo2jqdLX8265brRX7BQ@mail.gmail.com>

Hi Kito,

> According to the comment in the flt-eval-method.h,
> it says its mapping -1 to 2 is because it's the most conservatively
> safe assumption[1],
> so that's why I consider fixing that for RISC-V port only.

The most conservative option would be to map -1 to 0 since that is what
the undefined case already does, and this is correct on all targets (68k and x86
have overrides that force it to 2 - IIRC s390 used to use 1 but now uses 0).

> I am happy to send patches to update the generic flt-eval-method.h if
> there are other maintainers that think it's reasonable to change the
> default mapping in glibc.

This bug affects almost all targets, so we want a generic fix. Mapping -1 to 0
seems a reasonable default, but we could also decide to decouple the
float_t/double_t ABI from __FLT_EVAL_METHOD__ if it is no longer treated as
a fixed value for the whole application.

Cheers,
Wilco

  reply	other threads:[~2023-02-16 16:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-15 14:13 Wilco Dijkstra
2023-02-16 13:48 ` Kito Cheng
2023-02-16 16:57   ` Wilco Dijkstra [this message]
  -- strict thread matches above, loose matches on Subject: below --
2023-02-15 11:17 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=PAWPR08MB898227412F5EF829AB2F932183A09@PAWPR08MB8982.eurprd08.prod.outlook.com \
    --to=wilco.dijkstra@arm.com \
    --cc=joseph@codesourcery.com \
    --cc=kito.cheng@sifive.com \
    --cc=libc-alpha@sourceware.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).