public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Kito Cheng <kito.cheng@sifive.com>
To: Wilco Dijkstra <Wilco.Dijkstra@arm.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 21:48:50 +0800	[thread overview]
Message-ID: <CALLt3TiafMYKibace3PNE99eVhjTUvWRo2jqdLX8265brRX7BQ@mail.gmail.com> (raw)
In-Reply-To: <PAWPR08MB898222154C8FB5A0ECF896C983A39@PAWPR08MB8982.eurprd08.prod.outlook.com>

For anyone who interested on this issue, but not tracking LLVM community:
LLVM has created a bug to track this:
https://github.com/llvm/llvm-project/issues/60781

Hi Wilco:

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.

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.

[1] https://github.com/bminor/glibc/blob/master/bits/flt-eval-method.h#L23

On Wed, Feb 15, 2023 at 10:13 PM Wilco Dijkstra <Wilco.Dijkstra@arm.com> wrote:
>
> Hi Kito,
>
> This looks like a recent bug in LLVM - even with -Ofast compilers continue to
> use float and double for evaluation (obviously!), so float_t and double_t should
> not change (which may break ABI if some code uses -Ofast and some doesn't,
> leading to incompatible float_t/double_t definitions).
>
> So this should be reported to and fixed in LLVM, and if we want/need to work
> around it in GLIBC, it should be done in the generic flt-eval-method.h header
> so that it works on all targets.
>
> Cheers,
> Wilco

  reply	other threads:[~2023-02-16 13:49 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 [this message]
2023-02-16 16:57   ` Wilco Dijkstra
  -- 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=CALLt3TiafMYKibace3PNE99eVhjTUvWRo2jqdLX8265brRX7BQ@mail.gmail.com \
    --to=kito.cheng@sifive.com \
    --cc=Wilco.Dijkstra@arm.com \
    --cc=joseph@codesourcery.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).