From: Richard Henderson <richard.henderson@linaro.org>
To: Shiqi Zhang <shiqi@isrc.iscas.ac.cn>, libc-alpha@sourceware.org
Cc: schwab@linux-m68k.org
Subject: Re: [PATCH v2] riscv: Add macros for FPUCW/fcsr in fpu_control.h
Date: Mon, 13 Feb 2023 08:17:13 -1000 [thread overview]
Message-ID: <191630a8-913e-74bd-2052-8199290ee0df@linaro.org> (raw)
In-Reply-To: <68996dd3-9fbe-b6ed-0642-0e1c860c3c78@isrc.iscas.ac.cn>
On 2/12/23 20:16, Shiqi Zhang wrote:
>
>> Honestly, no one should be using <fpu_control.h> at all. It was
>> originally an x86 specific thing. The only reason to fill in this
>> header at all is to match the original x86 API. Therefore the symbol
>> names should match ./sysdeps/x86/fpu_control.h.
>
>
> Actually other architectures also defines these arch-specific macros in
> ./sysdeps/***/fpu_control.h. And the symbol names doesn't match x86,
> too. For example I checked the macro _FPU_FPCR_MASK_OFE in
> ./sysdeps/aarch64/fpu/fpu_control.h, nothing in glibc referenced it so I
> think it can only be for the users to control FPU in an arch-specific
> manner.
Oh the other hand, note the number of targets that use
_FPU_RC_NEAREST, _FPU_RC_DOWN, _FPU_RC_UP, _FPU_RC_ZERO
x86, alpha, csky, loongarch, m68k, mips, ppc, sparc, sh (nearest, zero).
Indeed, arm and aarch64 seem to be the outliers in being completely different.
r~
next prev parent reply other threads:[~2023-02-13 18:17 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-12 6:52 Shiqi Zhang
2023-02-12 19:36 ` Richard Henderson
2023-02-13 6:16 ` Shiqi Zhang
2023-02-13 8:39 ` Andreas Schwab
2023-02-13 10:17 ` Shiqi Zhang
2023-02-13 22:00 ` Joseph Myers
2023-02-13 18:17 ` Richard Henderson [this message]
2023-02-13 19:31 ` Shiqi Zhang
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=191630a8-913e-74bd-2052-8199290ee0df@linaro.org \
--to=richard.henderson@linaro.org \
--cc=libc-alpha@sourceware.org \
--cc=schwab@linux-m68k.org \
--cc=shiqi@isrc.iscas.ac.cn \
/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).