From: Joseph Myers <josmyers@redhat.com>
To: caiyinyu <caiyinyu@loongson.cn>
Cc: libc-alpha@sourceware.org, adhemerval.zanella@linaro.org,
xry111@xry111.site
Subject: Re: [PATCH] LoongArch: Add soft floating-point fe* function implementations.
Date: Tue, 26 Mar 2024 17:34:48 +0000 (UTC) [thread overview]
Message-ID: <cb65a988-d564-f783-5eea-3a8fb0d31e58@redhat.com> (raw)
In-Reply-To: <20240326124623.1245676-1-caiyinyu@loongson.cn>
On Tue, 26 Mar 2024, caiyinyu wrote:
> This patch accomplishes the following:
> 1. Implements soft floating-point functions to enhance compatibility and
> flexibility in environments without hardware floating-point support.
Does this actually do anything useful for users, i.e. make the software
floating-point rounding mode and exceptions state affect both user
arithmetic and functions within libc/libm? As far as I can see, while
you're building copies of some software floating-point libgcc functions
for libc, you're not doing anything to make them use the software
floating-point environment state, and not exporting them for use by users.
For software floating-point rounding modes and exceptions to be useful to
users, you need to follow powerpc/nofpu and export the functions from
libc. You then need to arrange for libgcc *not* to provide the functions
when libc does (see how libgcc/configure.ac sets ppc_fp_compat depending
on glibc version, for example). And there's also the matter of providing
libc (as opposed to libm) interfaces for cases where compiler-generated
code may need to manipulate floating-point environment state without
calling libm functions (see how powerpc-nofpu provides
__atomic_feholdexcept __atomic_feclearexcept __atomic_feupdateenv
__flt_rounds and rs6000_atomic_assign_expand_fenv in the GCC back end can
generate calls to the first three of those functions - the fourth is
future-proofing for if GCC gets proper support for making FLT_ROUNDS
depend on the rounding mode in future).
--
Joseph S. Myers
josmyers@redhat.com
next prev parent reply other threads:[~2024-03-26 17:34 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-26 12:46 caiyinyu
2024-03-26 17:34 ` Joseph Myers [this message]
2024-03-27 8:42 ` caiyinyu
2024-03-27 17:10 ` Joseph Myers
2024-03-31 10:14 ` caiyinyu
2024-04-01 13:19 ` Florian Weimer
2024-04-02 3:40 ` caiyinyu
2024-04-02 10:40 ` Xi Ruoyao
2024-04-02 11:45 ` Florian Weimer
2024-04-02 12:02 ` Xi Ruoyao
2024-04-02 12:34 ` Florian Weimer
2024-04-02 12:12 ` Andreas Schwab
2024-04-02 21:18 ` Joseph Myers
2024-03-31 10:31 ` caiyinyu
2024-04-02 21:10 ` Joseph Myers
2024-04-02 14:46 caiyinyu
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=cb65a988-d564-f783-5eea-3a8fb0d31e58@redhat.com \
--to=josmyers@redhat.com \
--cc=adhemerval.zanella@linaro.org \
--cc=caiyinyu@loongson.cn \
--cc=libc-alpha@sourceware.org \
--cc=xry111@xry111.site \
/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).