From: Paul E Murphy <murphyp@linux.ibm.com>
To: Paul Clarke <pc@us.ibm.com>, libc-alpha@sourceware.org
Cc: tuliom@ascii.art.br
Subject: Re: [PATCH v2 1/6] [powerpc] fenv_private.h clean up
Date: Mon, 23 Sep 2019 09:58:21 -0500 [thread overview]
Message-ID: <3bc12e4f-601c-93cf-f02a-19e002c3bc25@linux.ibm.com> (raw)
In-Reply-To: <7961f154-8cbd-c90e-b6e4-6274a3b1e02c@us.ibm.com>
On 9/22/19 12:11 AM, Paul Clarke wrote:
> On 9/20/19 10:36 AM, Paul E Murphy wrote:
>> On 9/19/19 1:46 PM, Paul A. Clarke wrote:
>>> -static __always_inline void
>>> -libc_feholdexcept_ppc (fenv_t *envp)
>>> -{
>>> - __libc_feholdbits_ppc (envp, _FPU_MASK_NOT_RN_NI, 0LL);
>>> -}
>>> -
>>> -static __always_inline void
>>> -libc_feholdexcept_setround_ppc (fenv_t *envp, int r)
>>> -{
>>> - __libc_feholdbits_ppc (envp, _FPU_MASK_NOT_RN_NI & _FPU_MASK_RN, r);
>>> -}
>>> -
>>> -static __always_inline void
>>> -libc_fesetround_ppc (int r)
>>> -{
>>> - __fesetround_inline (r);
>>> -}
>>> -
>>> -static __always_inline int
>>> -libc_fetestexcept_ppc (int e)
>>> -{
>>> - fenv_union_t u;
>>> - u.fenv = fegetenv_register ();
>>> - return u.l & e;
>>> -}
>>> -
>>> -static __always_inline void
>>> -libc_feholdsetround_ppc (fenv_t *e, int r)
>>> -{
>>> - __libc_feholdbits_ppc (e, _FPU_MASK_TRAPS_RN, r);
>>> -}
>>
>> Are these unused? I still see the macro redirections calling out to them after applying this patch.
>
> Fair question. I'll admit I'm not an expert, especially in the corner cases, but here's what I see:
>
>>> -libc_feholdexcept_ppc
>
> This shows up in the ieee754 version of s_nearbyint{f}.c, but that is not used in favor of sysdeps/powerpc/fpu/s_nearbyint{f}.c which does not use it.
>
>>> -libc_feholdexcept_setround_ppc
>
> This is still used, but my patch doesn't remove it, in spite of how it looks above. As noted in the Changelog, I moved the code from __libc_feholdbits_ppc into libc_feholdexcept_setround_ppc, which makes the patch look like it was removed.
>
>>> -libc_fesetround_ppc
>>> -libc_fetestexcept_ppc
>
> These show up in the ieee754 version of s_fma.c, but there is a powerpc version which uses different code (__builtin_fma) instead.
>
>>> -libc_feholdsetround_ppc
>
> This _appears_ to be referenced in some uses of SET_RESTORE_ROUND_GENERIC, but actually gets mapped to libc_feholdsetround_ppc_ctx.
>
> PC
>
OK. I agree with your conclusions.
Reviewed-By: Paul E Murphy <murphyp@linux.ibm.com>
next prev parent reply other threads:[~2019-09-23 14:58 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-19 18:46 [PATCH v2 0/6] Various FPSCR-related changes Paul A. Clarke
2019-09-19 18:46 ` [PATCH v2 1/6] [powerpc] fenv_private.h clean up Paul A. Clarke
2019-09-20 15:36 ` Paul E Murphy
2019-09-22 5:11 ` Paul Clarke
2019-09-23 14:58 ` Paul E Murphy [this message]
2019-09-19 18:46 ` [PATCH v2 2/6] [powerpc] No need to enter "Ignore Exceptions Mode" Paul A. Clarke
2019-09-23 15:15 ` Paul E Murphy
2019-09-19 18:46 ` [PATCH v2 3/6] [powerpc] libc_feupdateenv_test: optimize FPSCR access Paul A. Clarke
2019-09-23 15:39 ` Paul E Murphy
2019-09-19 18:46 ` [PATCH v2 4/6] [powerpc] libc_feholdsetround_noex_ppc_ctx: optimize FPSCR write Paul A. Clarke
2019-09-23 15:54 ` Paul E Murphy
2019-09-23 17:54 ` Paul Clarke
2019-09-27 14:27 ` Paul E Murphy
2019-09-19 18:46 ` [PATCH v2 5/6] [powerpc] __fesetround_inline optimizations Paul A. Clarke
2019-09-23 16:08 ` Paul E Murphy
2019-09-19 18:46 ` [PATCH v2 6/6] [powerpc] Rename fegetenv_status to fegetenv_control Paul A. Clarke
2019-09-23 16:21 ` Paul E Murphy
2019-09-23 17:48 ` Paul Clarke
2019-09-19 19:14 ` [PATCH v2 7/6] [powerpc] Rename fesetenv_mode to fesetenv_control Paul A. Clarke
2019-09-23 16:24 ` Paul E Murphy
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
List information: https://www.gnu.org/software/libc/involved.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3bc12e4f-601c-93cf-f02a-19e002c3bc25@linux.ibm.com \
--to=murphyp@linux.ibm.com \
--cc=libc-alpha@sourceware.org \
--cc=pc@us.ibm.com \
--cc=tuliom@ascii.art.br \
/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).